From patchwork Sat Oct 16 01:16:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vagrant Cascadian X-Patchwork-Id: 31130 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6602:2084:0:0:0:0 with SMTP id a4csp936309ioa; Fri, 15 Oct 2021 18:16:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxWnXwSYPmqVw2yNPeEpsT5Y08bsMukCDsV/1Fpq4LrKJF4gnkvR8C+lGEI0HaCxaxasycZ X-Received: by 2002:a17:907:7703:: with SMTP id kw3mr11200729ejc.34.1634346986665; Fri, 15 Oct 2021 18:16:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634346986; cv=none; d=google.com; s=arc-20160816; b=vMtgFDbhUcJ4aeXFCap7bjitI66GIn6SO0w+PC27QdW7IGYz1NgpDhje7lrCm5WxR+ NbyePNZnNplQRH8oAMqYzrx7QWqY7pH9TZXhP74RlmXHa4I82dlcca9xyf7S0UsWsNOe kmcJJuCg2TeG7Qn9tnNf1Wo3ovIO8/WorwU3D8nm1JFfNJRANMMKiaxg/oglwnFk0Bpc MPaEfTK4WdhU6v4JF7tPk2D3J2clpYG31mL+WXkk07TpuRGPoQI3JpfF+0G3DuOPS+UZ Pzh7XudoGpo87BhOtJ87eZh0aIOWdlgGrls7YLp50lRCqG59OudHMeuzs1mtq5NFWKM0 LLCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:message-id:date:to:from:delivered-to; bh=SdjbPyvolFA2PtwLmc2lAqpe0sJ5rVWE0NSDxRll+DI=; b=G67xl/FV2Amrd+QAiRR3jUQAYqrtErYUlHpl6NtlJ2WvSACeD50wv8QJbar9L+jx+y wrKpLc6GI06HNBEBn5Pz0hYtkZtSwoBX48MidNL56lpQrJjny1kNNF6FsVl4qiLeuTxM 8Y4uKBxwBRtUZU8RPMmcw3UYUIHiWUJ1bnKKiE/l4ahmhC/P19VGVsM6+hYXYsWNF+hr cmTtPy4errXqzYlW31YEApzsvvTNxZ8vwSRFNVg3Cg9L7IVy++Jwzq86FR8Upnf0WBoE FQ7wp6mPfSfLVv+kYxTvMn30367qvRMRgimRq1w0BkYgbcXurP7eezXzFT974j4AOmu7 V/4Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id v19si10276621eja.747.2021.10.15.18.16.25; Fri, 15 Oct 2021 18:16:26 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 827DB68A75B; Sat, 16 Oct 2021 04:16:21 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from cascadia.aikidev.net (cascadia.aikidev.net [173.255.214.101]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 33ACD6898FB for ; Sat, 16 Oct 2021 04:16:15 +0300 (EEST) Received: from localhost (unknown [IPv6:2600:3c01:e000:21:21:21:0:100b]) (Authenticated sender: vagrant@aikidev.net) by cascadia.aikidev.net (Postfix) with ESMTPSA id B0AF51AA31; Fri, 15 Oct 2021 18:16:12 -0700 (PDT) From: Vagrant Cascadian To: ffmpeg-devel@ffmpeg.org Date: Fri, 15 Oct 2021 18:16:07 -0700 Message-ID: <875ytxpy5k.fsf@yucca> MIME-Version: 1.0 Subject: [FFmpeg-devel] Patch to remove build path from tools/cl2c X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: 985187@bugs.debian.org Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: ONk2hpdFBwdH The attached patch removes build paths from the resulting binaries, which makes it easier to verify the reproducibility of a build without needing to know the path from which it was originally built. I ran "make fate" with and without the patch applied, and all of the tests that passed as of commit 3cc3f5de2afda5b8f880c0817e9d67c2dafbfe1e still passed (fate-sws-slice-yuv422-12bit-rgb48 and fate-sws-slice-bgr0-nv12 both failed regardless of weather the patch was applied). This was originally reported at https://bugs.debian.org/985187 With this change applied, the ffmpeg package in Debian should build reproducibly: https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/ffmpeg.html Thanks for maintaining and developing ffmpeg, it is a very useful tool! live well, vagrant Subject: [PATCH 1/1] tools/cl2c: Strip full path from input file in embedded output. Without this patch, the full build path gets embedded into various binaries shipped in the package, for example, libavfilter.a contains a reference to: #line 1 "/build/1st/ffmpeg-4.3.2/libavfilter/opencl/avgblur.cl" By not embedding the build path, it makes it easier to recreate the build environment and reproduce the build: https://reproducible-builds.org/docs/build-path/ Originally submitted to Debian as: https://bugs.debian.org/985187 Signed-off-by: Vagrant Cascadian --- tools/cl2c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/cl2c b/tools/cl2c index e3f92bab1c..48444e61a7 100755 --- a/tools/cl2c +++ b/tools/cl2c @@ -23,11 +23,13 @@ input="$1" output="$2" name=$(basename "$input" | sed 's/.cl$//') +# Avoid embedded the build path, using only the basename of the input file. +base_input=$(basename "$input") cat >$output <