Debian Bug report logs - #1022130
tsdecrypt: reproducible-builds: build path embedded in various binaries

version graph

Package: src:tsdecrypt; Maintainer for src:tsdecrypt is Debian Multimedia Maintainers <pkg-multimedia-maintainers@lists.alioth.debian.org>;

Reported by: Vagrant Cascadian <vagrant@reproducible-builds.org>

Date: Thu, 20 Oct 2022 17:39:01 UTC

Severity: normal

Tags: patch

Fixed in version tsdecrypt/10.0-2.1

Done: Vagrant Cascadian <vagrant@reproducible-builds.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, reproducible-bugs@lists.alioth.debian.org, Debian Multimedia Maintainers <pkg-multimedia-maintainers@lists.alioth.debian.org>:
Bug#1022130; Package src:tsdecrypt. (Thu, 20 Oct 2022 17:39:03 GMT) (full text, mbox, link).


Acknowledgement sent to Vagrant Cascadian <vagrant@reproducible-builds.org>:
New Bug report received and forwarded. Copy sent to reproducible-bugs@lists.alioth.debian.org, Debian Multimedia Maintainers <pkg-multimedia-maintainers@lists.alioth.debian.org>. (Thu, 20 Oct 2022 17:39:03 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Vagrant Cascadian <vagrant@reproducible-builds.org>
To: submit@bugs.debian.org
Subject: tsdecrypt: reproducible-builds: build path embedded in various binaries
Date: Thu, 20 Oct 2022 10:35:06 -0700
[Message part 1 (text/plain, inline)]
Source: tsdecrypt
Severity: normal
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: buildpath
X-Debbugs-Cc: reproducible-bugs@lists.alioth.debian.org

The build path is embedded in various binaries:

  https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/diffoscope-results/tsdecrypt.html

  /usr/bin/tsdecrypt_dvbcsa

  /build/1st/tsdecrypt-10.0/tsdecrypt.c:948
  vs.
  /build/2/tsdecrypt-10.0/2nd/tsdecrypt.c:948

The attached patch to debian/rules fixes this by passing the default
CFLAGS to the two make invocations, which includes -ffile-prefix-map to
avoid embedding build paths.

According to my local tests, with this patch applied, and the patch
submitted in https://bugs.debian.org/829713, tsdecrypt should build
reproducibly on tests.reproducible-builds.org!

If it would be helpful, I would like to NMU with this patch and the
patch from #829713 in the near future in time for bookworm.

Thanks for maintaining tsdecrypt!

live well,
  vagrant
[0004-debian-rules-Pass-default-CFLAGS.patch (text/x-diff, inline)]
From 94b07c835c7706b0ad5891458b142e8c4a9158b9 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@reproducible-builds.org>
Date: Thu, 20 Oct 2022 17:20:19 +0000
Subject: [PATCH 4/4] debian/rules: Pass default CFLAGS.

---
 debian/rules | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/debian/rules b/debian/rules
index cd33eef..10a8fa7 100755
--- a/debian/rules
+++ b/debian/rules
@@ -10,11 +10,11 @@ override_dh_auto_configure:
 override_dh_auto_build:
 override_dh_auto_install:
 	# Build with FFdecsa
-	$(MAKE) ffdecsa
+	$(MAKE) CFLAGS="$(shell dpkg-buildflags --get CFLAGS)" ffdecsa
 	mv tsdecrypt tsdecrypt_ffdecsa
 	$(MAKE) distclean
 	# Build against libdvbcsa
-	$(MAKE) dvbcsa
+	$(MAKE) CFLAGS="$(shell dpkg-buildflags --get CFLAGS)" dvbcsa
 	mv tsdecrypt tsdecrypt_dvbcsa
 	# Install binaries
 	mkdir -p $(DESTDIR)$(PREFIX)/bin
-- 
2.37.2

[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Multimedia Maintainers <pkg-multimedia-maintainers@lists.alioth.debian.org>:
Bug#1022130; Package src:tsdecrypt. (Thu, 10 Nov 2022 22:09:05 GMT) (full text, mbox, link).


Acknowledgement sent to Vagrant Cascadian <vagrant@reproducible-builds.org>:
Extra info received and forwarded to list. Copy sent to Debian Multimedia Maintainers <pkg-multimedia-maintainers@lists.alioth.debian.org>. (Thu, 10 Nov 2022 22:09:05 GMT) (full text, mbox, link).


Message #10 received at 1022130@bugs.debian.org (full text, mbox, reply):

From: Vagrant Cascadian <vagrant@reproducible-builds.org>
To: 1022130@bugs.debian.org, 829713@bugs.debian.org
Subject: Re: tsdecrypt: NMU fixing reproducible builds bugs
Date: Thu, 10 Nov 2022 14:05:34 -0800
[Message part 1 (text/plain, inline)]
Control: tags 1022130 pending
Control: tags 829713 pending

I've uploaded an NMU fixing these two bugs to DELAYED/10:

diff -Nru tsdecrypt-10.0/debian/changelog tsdecrypt-10.0/debian/changelog
--- tsdecrypt-10.0/debian/changelog	2014-02-24 06:52:11.000000000 -0800
+++ tsdecrypt-10.0/debian/changelog	2022-11-10 13:54:44.000000000 -0800
@@ -1,3 +1,15 @@
+tsdecrypt (10.0-2.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+
+  [ Reiner Herrmann ]
+  * strip build date to enable reproducible building (Closes: #829713)
+
+  [ Vagrant Cascadian ]
+  * debian/rules: Pass default CFLAGS. (Closes: #1022130)
+
+ -- Vagrant Cascadian <vagrant@reproducible-builds.org>  Thu, 10 Nov 2022 13:54:44 -0800
+
 tsdecrypt (10.0-2) unstable; urgency=low
 
   [ Peter Michael Green ]
diff -Nru tsdecrypt-10.0/debian/patches/series tsdecrypt-10.0/debian/patches/series
--- tsdecrypt-10.0/debian/patches/series	2014-02-24 06:48:10.000000000 -0800
+++ tsdecrypt-10.0/debian/patches/series	2022-11-10 13:54:44.000000000 -0800
@@ -1 +1,2 @@
 avoid-inappropriate-compiler-flags
+strip-build-date-to-enable-reproducible-.patch
diff -Nru tsdecrypt-10.0/debian/patches/strip-build-date-to-enable-reproducible-.patch tsdecrypt-10.0/debian/patches/strip-build-date-to-enable-reproducible-.patch
--- tsdecrypt-10.0/debian/patches/strip-build-date-to-enable-reproducible-.patch	1969-12-31 16:00:00.000000000 -0800
+++ tsdecrypt-10.0/debian/patches/strip-build-date-to-enable-reproducible-.patch	2022-11-10 13:54:44.000000000 -0800
@@ -0,0 +1,35 @@
+From: Reiner Herrmann <reiner@reiner-h.de>
+Date: Tue, 5 Jul 2016 16:30:30 +0200
+X-Dgit-Generated: 10.0-2.1 49e1f21bd0c38dda987a7157ce5a7b0e0cc7e986
+Subject: strip build date to enable reproducible building (Closes: #829713)
+
+
+---
+
+diff --git a/Makefile b/Makefile
+index 4e659f8..b1785ab 100644
+--- a/Makefile
++++ b/Makefile
+@@ -19,8 +19,7 @@ CFLAGS ?= -O2 -ggdb \
+  -W -Wall -Wextra \
+  -Wshadow -Wformat-security -Wstrict-prototypes
+ 
+-DEFS = -DBUILD_ID=\"$(BUILD_ID)\" \
+- -DVERSION=\"$(VERSION)\" -DGIT_VER=\"$(GIT_VER)\"
++DEFS = -DVERSION=\"$(VERSION)\" -DGIT_VER=\"$(GIT_VER)\"
+ DEFS += -D_FILE_OFFSET_BITS=64
+ 
+ PREFIX ?= /usr/local
+diff --git a/tsdecrypt.c b/tsdecrypt.c
+index cd55f48..178084a 100644
+--- a/tsdecrypt.c
++++ b/tsdecrypt.c
+@@ -40,7 +40,7 @@
+ #define FIRST_REPORT_SEC 3
+ 
+ #define PROGRAM_NAME "tsdecrypt"
+-static const char *program_id = PROGRAM_NAME " v" VERSION " (" GIT_VER ", build " BUILD_ID " " DLIB ")";
++static const char *program_id = PROGRAM_NAME " v" VERSION " (" GIT_VER ", " DLIB ")";
+ 
+ int keep_running = 1;
+ static FILE *log_file = NULL;
diff -Nru tsdecrypt-10.0/debian/rules tsdecrypt-10.0/debian/rules
--- tsdecrypt-10.0/debian/rules	2014-02-24 06:48:20.000000000 -0800
+++ tsdecrypt-10.0/debian/rules	2022-11-10 13:54:44.000000000 -0800
@@ -10,11 +10,11 @@
 override_dh_auto_build:
 override_dh_auto_install:
 	# Build with FFdecsa
-	$(MAKE) ffdecsa
+	$(MAKE) CFLAGS="$(shell dpkg-buildflags --get CFLAGS)" ffdecsa
 	mv tsdecrypt tsdecrypt_ffdecsa
 	$(MAKE) distclean
 	# Build against libdvbcsa
-	$(MAKE) dvbcsa
+	$(MAKE) CFLAGS="$(shell dpkg-buildflags --get CFLAGS)" dvbcsa
 	mv tsdecrypt tsdecrypt_dvbcsa
 	# Install binaries
 	mkdir -p $(DESTDIR)$(PREFIX)/bin
[signature.asc (application/pgp-signature, inline)]

Added tag(s) pending. Request was from Vagrant Cascadian <vagrant@reproducible-builds.org> to 1022130-submit@bugs.debian.org. (Thu, 10 Nov 2022 22:09:05 GMT) (full text, mbox, link).


Reply sent to Vagrant Cascadian <vagrant@reproducible-builds.org>:
You have taken responsibility. (Sun, 20 Nov 2022 22:54:03 GMT) (full text, mbox, link).


Notification sent to Vagrant Cascadian <vagrant@reproducible-builds.org>:
Bug acknowledged by developer. (Sun, 20 Nov 2022 22:54:03 GMT) (full text, mbox, link).


Message #17 received at 1022130-close@bugs.debian.org (full text, mbox, reply):

From: Debian FTP Masters <ftpmaster@ftp-master.debian.org>
To: 1022130-close@bugs.debian.org
Subject: Bug#1022130: fixed in tsdecrypt 10.0-2.1
Date: Sun, 20 Nov 2022 22:51:06 +0000
Source: tsdecrypt
Source-Version: 10.0-2.1
Done: Vagrant Cascadian <vagrant@reproducible-builds.org>

We believe that the bug you reported is fixed in the latest version of
tsdecrypt, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1022130@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Vagrant Cascadian <vagrant@reproducible-builds.org> (supplier of updated tsdecrypt package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Thu, 10 Nov 2022 13:54:44 -0800
Source: tsdecrypt
Architecture: source
Version: 10.0-2.1
Distribution: unstable
Urgency: medium
Maintainer: Debian Multimedia Maintainers <pkg-multimedia-maintainers@lists.alioth.debian.org>
Changed-By: Vagrant Cascadian <vagrant@reproducible-builds.org>
Closes: 829713 1022130
Changes:
 tsdecrypt (10.0-2.1) unstable; urgency=medium
 .
   * Non-maintainer upload.
 .
   [ Reiner Herrmann ]
   * strip build date to enable reproducible building (Closes: #829713)
 .
   [ Vagrant Cascadian ]
   * debian/rules: Pass default CFLAGS. (Closes: #1022130)
Checksums-Sha1:
 c8f19eddbdc499ec1a5fc0119c66520c210a2df6 1558 tsdecrypt_10.0-2.1.dsc
 b2e08ad640a91472e18d8cf15f5ecac21d6d26bf 5332 tsdecrypt_10.0-2.1.debian.tar.xz
Checksums-Sha256:
 aee46ab8029687a845187d0104d43bf674d82aa5a9ab276e5078db1799a2399b 1558 tsdecrypt_10.0-2.1.dsc
 dba0edad2921c27605413feb79355563f0accfb2d18955d7e4d8d50509e179d1 5332 tsdecrypt_10.0-2.1.debian.tar.xz
Files:
 39fa38019ad788a63c6ae05fdaa223bb 1558 video optional tsdecrypt_10.0-2.1.dsc
 90943127c742290c172a27f5ad003a73 5332 video optional tsdecrypt_10.0-2.1.debian.tar.xz

-----BEGIN PGP SIGNATURE-----

iJYEARYKAD4WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCY210/CAcdmFncmFudEBy
ZXByb2R1Y2libGUtYnVpbGRzLm9yZwAKCRDcUY/If5cWqsbCAQD8447lMqI0bFdT
Cpy/VWmlKWltGbsN/QPaHOAQ4aKAmgEAqus4BiNBmsTSgraY1PPtHhih5XjtXMT8
mzMbIEqj1gg=
=GLI3
-----END PGP SIGNATURE-----




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sat, 24 Dec 2022 07:26:03 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed May 17 11:33:10 2023; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.