Debian Bug report logs - #995886
cxref: reproducible builds: Embedded timestamps in .dvi and .ps files

version graph

Package: src:cxref; Maintainer for src:cxref is Camm Maguire <camm@debian.org>;

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

Date: Thu, 7 Oct 2021 17:03:01 UTC

Severity: normal

Tags: patch

Fixed in version 1.6e-4

Done: Philip Rinn <rinni@inventati.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, Camm Maguire <camm@debian.org>:
Bug#995886; Package src:cxref. (Thu, 07 Oct 2021 17:03: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, Camm Maguire <camm@debian.org>. (Thu, 07 Oct 2021 17:03: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: cxref: reproducible builds: Embedded timestamps in .dvi and .ps files
Date: Thu, 07 Oct 2021 10:01:01 -0700
[Message part 1 (text/plain, inline)]
Source: cxref
Severity: normal
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-Cc: reproducible-bugs@lists.alioth.debian.org

The build timestamp is embedded in various .dvi and .ps files:

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

  /usr/share/doc/cxref/README.ps.gz

  %DVIPSSource:··TeX·output·2021.09.14:1340
vs.
  %DVIPSSource:··TeX·output·2022.10.18:2205

The attached patch fixes this by setting FORCE_SOURCE_DATE=1 in
debian/rules, which texlive needs in order to respect SOURCE_DATE_EPOCH,
which is set during debian package builds to the timestamp in the latest
debian/changelog entry.

  https://reproducible-builds.org/docs/source-date-epoch/

There are other reproducibility issues for cxref(build paths and
usrmerge), so this patch alone will not make cxref reproducible, but
should reduce the overall reproducibility diff, making it easier to
troubleshoot remaining issues.


Thanks for maintaining cxref!


live well,
  vagrant
[0001-debian-rules-Export-FORCE_SOURCE_DATE-1-in-order-for.patch (text/x-diff, inline)]
From 404ab1548ba4d9a6c7cfb8974e1ff0497972b1c6 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagrant@reproducible-builds.org>
Date: Tue, 5 Oct 2021 05:44:26 +0000
Subject: [PATCH 1/2] debian/rules: Export FORCE_SOURCE_DATE=1 in order for
 texlive to respect SOURCE_DATE_EPOCH when generating .dvi and .ps files.

https://reproducible-builds.org/docs/source-date-epoch/
---
 debian/rules | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/debian/rules b/debian/rules
index 5a7bf13..d28ac30 100755
--- a/debian/rules
+++ b/debian/rules
@@ -16,6 +16,9 @@ VERS:=$(shell cat debian/changelog |grep ^cxref|head -n 1|cut -f2 -d\ |tr -d '()
 
 DPKG_EXPORT_BUILDFLAGS=1
 
+# Ensure texlive respects SOURCE_DATE_EPOCH
+export FORCE_SOURCE_DATE=1
+
 include /usr/share/dpkg/buildflags.mk
 
 build: build-arch build-indep
-- 
2.30.2

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

Information forwarded to debian-bugs-dist@lists.debian.org, Camm Maguire <camm@debian.org>:
Bug#995886; Package src:cxref. (Mon, 04 Jul 2022 19:33:02 GMT) (full text, mbox, link).


Acknowledgement sent to Philip Rinn <rinni@inventati.org>:
Extra info received and forwarded to list. Copy sent to Camm Maguire <camm@debian.org>. (Mon, 04 Jul 2022 19:33:02 GMT) (full text, mbox, link).


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

From: Philip Rinn <rinni@inventati.org>
To: 995886@bugs.debian.org, 995896@bugs.debian.org, 995953@bugs.debian.org, 995954@bugs.debian.org, camm@debian.org
Subject: Intent to NMU cxref to fix reproducibility issues
Date: Mon, 4 Jul 2022 21:22:43 +0200
[Message part 1 (text/plain, inline)]
Hi,

I intend to nmu cxref with fixes for the reproducibility issues. This 
would close #995886, #995896, #995953 and #995954.

I prepared a version at https://mentors.debian.net/package/cxref/.
I do have a sponsor for the upload already and plan to upload it to 
DELAYED/14.

If you have any doubts about the nmu, please just cancel the upload.

Best,
Philip
[OpenPGP_signature (application/pgp-signature, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Camm Maguire <camm@debian.org>:
Bug#995886; Package src:cxref. (Tue, 05 Jul 2022 21:33:03 GMT) (full text, mbox, link).


Acknowledgement sent to Philip Rinn <rinni@inventati.org>:
Extra info received and forwarded to list. Copy sent to Camm Maguire <camm@debian.org>. (Tue, 05 Jul 2022 21:33:03 GMT) (full text, mbox, link).


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

From: Philip Rinn <rinni@inventati.org>
To: 995886@bugs.debian.org, 995896@bugs.debian.org, 995953@bugs.debian.org, 995954@bugs.debian.org, camm@debian.org
Subject: Re: Intent to NMU cxref to fix reproducibility issues
Date: Tue, 5 Jul 2022 23:31:12 +0200
[Message part 1 (text/plain, inline)]
Hi,

On 04.07.22 at 21:22, Philip Rinn wrote:
> Hi,
> 
> I intend to nmu cxref with fixes for the reproducibility issues. This 
> would close #995886, #995896, #995953 and #995954.
> 
> I prepared a version at https://mentors.debian.net/package/cxref/.
> I do have a sponsor for the upload already and plan to upload it to 
> DELAYED/14.

I forgot to attach the nmudiff here, so let's do it now.

Best,
Philip

[cxref-1.6e-3.2-nmu.diff (text/x-patch, attachment)]
[OpenPGP_signature (application/pgp-signature, attachment)]

Reply sent to Philip Rinn <rinni@inventati.org>:
You have taken responsibility. (Tue, 12 Jul 2022 21:06:05 GMT) (full text, mbox, link).


Notification sent to Vagrant Cascadian <vagrant@reproducible-builds.org>:
Bug acknowledged by developer. (Tue, 12 Jul 2022 21:06:05 GMT) (full text, mbox, link).


Message #20 received at 995886-done@bugs.debian.org (full text, mbox, reply):

From: Philip Rinn <rinni@inventati.org>
To: 995886-done@bugs.debian.org, 99589-done@bugs.debian.org, 995953-done@bugs.debian.org, 995954-done@bugs.debian.org, 1014588-done@bugs.debian.org
Subject: Close bugs fixed in new upload of cxref
Date: Tue, 12 Jul 2022 22:55:33 +0200
[Message part 1 (text/plain, inline)]
Version: 1.6e-4


This bug is closed by the upload of version 1.6e-4, thanks Camm!
[OpenPGP_signature (application/pgp-signature, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Camm Maguire <camm@debian.org>:
Bug#995886; Package src:cxref. (Tue, 12 Jul 2022 21:18:02 GMT) (full text, mbox, link).


Acknowledgement sent to Camm Maguire <camm@maguirefamily.org>:
Extra info received and forwarded to list. Copy sent to Camm Maguire <camm@debian.org>. (Tue, 12 Jul 2022 21:18:02 GMT) (full text, mbox, link).


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

From: Camm Maguire <camm@maguirefamily.org>
To: Philip Rinn <rinni@inventati.org>,camm@debian.org
Cc: 995886@bugs.debian.org, 995896@bugs.debian.org, 995953@bugs.debian.org, 995954@bugs.debian.org, camm@debian.org
Subject: Re: Intent to NMU cxref to fix reproducibility issues
Date: Tue, 12 Jul 2022 17:04:27 -0400
Greetings, and thank you so much for this contribution!  I've
incorporated into the latest.  Got the EGREP bit to work too, hopefully
:-).

Take care,

Philip Rinn <rinni@inventati.org> writes:

> Hi,
>
> On 04.07.22 at 21:22, Philip Rinn wrote:
>> Hi,
>> I intend to nmu cxref with fixes for the reproducibility
>> issues. This would close #995886, #995896, #995953 and #995954.
>> I prepared a version at https://mentors.debian.net/package/cxref/.
>> I do have a sponsor for the upload already and plan to upload it to
>> DELAYED/14.
>
> I forgot to attach the nmudiff here, so let's do it now.
>
> Best,
> Philip
>
> diff -Nru cxref-1.6e/debian/changelog cxref-1.6e/debian/changelog
> --- cxref-1.6e/debian/changelog	2021-01-03 17:31:29.000000000 +0100
> +++ cxref-1.6e/debian/changelog	2022-07-04 18:08:52.000000000 +0200
> @@ -1,3 +1,10 @@
> +cxref (1.6e-3.2) unstable; urgency=medium
> +
> +  * Non-maintainer upload by the Reproducible Builds team.
> +  * Fix reproducibility issues (Closes: #995886, #995896, #995953, #995954)
> +
> + -- Philip Rinn <rinni@inventati.org>  Mon, 04 Jul 2022 18:08:52 +0200
> +
>  cxref (1.6e-3.1) unstable; urgency=medium
>  
>    * Non maintainer upload by the Reproducible Builds team.
> diff -Nru cxref-1.6e/debian/patches/0002-cpp-cxref-cpp-configure.in-Use-specific-path-for-EGR.patch cxref-1.6e/debian/patches/0002-cpp-cxref-cpp-configure.in-Use-specific-path-for-EGR.patch
> --- cxref-1.6e/debian/patches/0002-cpp-cxref-cpp-configure.in-Use-specific-path-for-EGR.patch	1970-01-01 01:00:00.000000000 +0100
> +++ cxref-1.6e/debian/patches/0002-cpp-cxref-cpp-configure.in-Use-specific-path-for-EGR.patch	2022-07-04 18:08:52.000000000 +0200
> @@ -0,0 +1,34 @@
> +From 0f5bc18bb094b9c199b2471830e2a25ee255c04c Mon Sep 17 00:00:00 2001
> +From: Vagrant Cascadian <vagrant@reproducible-builds.org>
> +Date: Tue, 5 Oct 2021 05:54:24 +0000
> +Subject: [PATCH 2/2] cpp/cxref-cpp-configure.in: Use specific path for EGREP.
> +
> +This hard-codes the path to grep to ensure reproducible builds
> +regardless of weather the package was built on a usrmerge or
> +non-usrmerge system.
> +
> +Passing EGREP via configure did not appear to work, possibly due to
> +makefile variable inheritance issues, though that would be preferable
> +if it could be made to work.
> +
> +https://tests.reproducible-builds.org/debian/issues/unstable/paths_vary_due_to_usrmerge_issue.html
> +---
> + cpp/cxref-cpp-configure.in | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/cpp/cxref-cpp-configure.in b/cpp/cxref-cpp-configure.in
> +index d37764f..ab50792 100755
> +--- a/cpp/cxref-cpp-configure.in
> ++++ b/cpp/cxref-cpp-configure.in
> +@@ -18,7 +18,7 @@
> + # Programs and paths
> + # (Default to the ones from the configure script).
> + 
> +-EGREP="@EGREP@"
> ++EGREP="/bin/egrep -E"
> + 
> + prefix="@prefix@"
> + datarootdir="@datarootdir@"
> +-- 
> +2.30.2
> +
> diff -Nru cxref-1.6e/debian/patches/series cxref-1.6e/debian/patches/series
> --- cxref-1.6e/debian/patches/series	2018-01-30 17:50:37.000000000 +0100
> +++ cxref-1.6e/debian/patches/series	2022-07-04 18:08:52.000000000 +0200
> @@ -3,3 +3,4 @@
>  kr-crash-doc
>  c_warning_cleanups_and_defines_for_Float128
>  # CPPFLAGS-hardening-patch
> +0002-cpp-cxref-cpp-configure.in-Use-specific-path-for-EGR.patch
> diff -Nru cxref-1.6e/debian/rules cxref-1.6e/debian/rules
> --- cxref-1.6e/debian/rules	2018-01-30 17:50:37.000000000 +0100
> +++ cxref-1.6e/debian/rules	2022-07-04 18:08:52.000000000 +0200
> @@ -16,6 +16,12 @@
>  
>  DPKG_EXPORT_BUILDFLAGS=1
>  
> +# Ensure texlive respects SOURCE_DATE_EPOCH
> +export FORCE_SOURCE_DATE=1
> +
> +# Force locale to avoid differences when building with obscure locales
> +export LC_ALL=C.UTF-8
> +
>  include /usr/share/dpkg/buildflags.mk
>  
>  build: build-arch build-indep
> @@ -61,6 +67,9 @@
>  	$(MAKE) install DESTDIR=`pwd`/debian/tmp
>  	$(MAKE) docs DESTDIR=`pwd`/debian/tmp
>  
> +	# Remove build path from documentation
> +	find doc/ -type f -exec sed -i -e "s,$(CURDIR),BUILDPATH,g" '{}' \;
> +
>  	mkdir -p debian/tmp/usr/share/cxref
>  	mv debian/tmp/etc/cxref/cxref-cpp.defines debian/tmp/usr/share/cxref
>  
>

-- 
Camm Maguire			     		    camm@maguirefamily.org
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah



Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Thu, 18 Aug 2022 07:27:26 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 12:59:49 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.