GNU bug report logs -
#48726
[PATCH] gnu: nsis: Respect SOURCE-DATE-EPOCH for reproducibility
Previous Next
Reported by: Carl Dong <contact <at> carldong.me>
Date: Sat, 29 May 2021 05:32:01 UTC
Severity: normal
Tags: patch
Fixed in version 20d9535e1bf981a37f39f171ad72f67cdb1e6919
Done: Carl Dong <contact <at> carldong.me>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 48726 in the body.
You can then email your comments to 48726 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#48726
; Package
guix-patches
.
(Sat, 29 May 2021 05:32:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Carl Dong <contact <at> carldong.me>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Sat, 29 May 2021 05:32:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/patches/nsis-SConstruct-sde-support.patch: New patch.
* gnu/packages/installers.scm (make-nsis)[source]: Apply it.
---
gnu/packages/installers.scm | 3 ++-
.../patches/nsis-SConstruct-sde-support.patch | 15 +++++++++++++++
2 files changed, 17 insertions(+), 1 deletion(-)
create mode 100644 gnu/packages/patches/nsis-SConstruct-sde-support.patch
diff --git a/gnu/packages/installers.scm b/gnu/packages/installers.scm
index 775b91f0f7..3587174d06 100644
--- a/gnu/packages/installers.scm
+++ b/gnu/packages/installers.scm
@@ -42,7 +42,8 @@
(sha256
(base32
"1sbwx5vzpddharkb7nj4q5z3i5fbg4lan63ng738cw4hmc4v7qdn"))
- (patches (search-patches "nsis-env-passthru.patch"))))
+ (patches (search-patches "nsis-env-passthru.patch"
+ "nsis-SConstruct-sde-support.patch"))))
(build-system scons-build-system)
(native-inputs `(("xgcc" ,xgcc)
("xbinutils" ,xbinutils)
diff --git a/gnu/packages/patches/nsis-SConstruct-sde-support.patch b/gnu/packages/patches/nsis-SConstruct-sde-support.patch
new file mode 100644
index 0000000000..5edf1b7c8e
--- /dev/null
+++ b/gnu/packages/patches/nsis-SConstruct-sde-support.patch
@@ -0,0 +1,15 @@
+diff --git a/SConstruct b/SConstruct
+index e8252c9..41786f2 100755
+--- a/SConstruct
++++ b/SConstruct
+@@ -95,8 +95,8 @@ default_doctype = 'html'
+ if defenv.WhereIs('hhc', os.environ['PATH']):
+ default_doctype = 'chm'
+
+-from time import strftime, gmtime
+-cvs_version = strftime('%d-%b-%Y.cvs', gmtime())
++import time
++cvs_version = time.strftime('%d-%b-%Y.cvs', time.gmtime(int(os.environ.get('SOURCE_DATE_EPOCH', time.time()))))
+
+ opts = Variables()
+
--
2.31.1
Information forwarded
to
guix-patches <at> gnu.org
:
bug#48726
; Package
guix-patches
.
(Sat, 29 May 2021 09:00:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 48726 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Carl Dong schreef op za 29-05-2021 om 01:31 [-0400]:
> * gnu/packages/patches/nsis-SConstruct-sde-support.patch: New patch.
> * gnu/packages/installers.scm (make-nsis)[source]: Apply it.
> [...]
More reproducibility, good!
One question: does upstream know about the patch?
If accepted upstream, then other distro's will automatically
be a little more reproducible as well. In the mean time
(or if the patch isn't accepted upstream) we can patch nsis in guix.
Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#48726
; Package
guix-patches
.
(Sun, 30 May 2021 18:55:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 48726 <at> debbugs.gnu.org (full text, mbox):
Maxime,
> One question: does upstream know about the patch?
Yup! In fact it’s already merged: https://github.com/kichik/nsis/pull/13
> If accepted upstream, then other distro's will automatically
> be a little more reproducible as well. In the mean time
> (or if the patch isn't accepted upstream) we can patch nsis in guix.
There’s no release with this patch yet, so I think we should patch it in guix for now and remove the patch once a release comes out with this patch included.
Cheers,
Carl Dong
contact <at> carldong.me
"I fight for the users"
Information forwarded
to
guix-patches <at> gnu.org
:
bug#48726
; Package
guix-patches
.
(Tue, 01 Jun 2021 21:20:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 48726 <at> debbugs.gnu.org (full text, mbox):
Hi,
Carl Dong <contact <at> carldong.me> skribis:
> * gnu/packages/patches/nsis-SConstruct-sde-support.patch: New patch.
> * gnu/packages/installers.scm (make-nsis)[source]: Apply it.
Nice! Minor issues:
> gnu/packages/installers.scm | 3 ++-
> .../patches/nsis-SConstruct-sde-support.patch | 15 +++++++++++++++
How about ‘nsis-source-date-epoch.patch’? It might be slightly clearer
in my view.
Please make sure to add it to ‘gnu/local.mk’.
> diff --git a/gnu/packages/patches/nsis-SConstruct-sde-support.patch b/gnu/packages/patches/nsis-SConstruct-sde-support.patch
> new file mode 100644
> index 0000000000..5edf1b7c8e
> --- /dev/null
> +++ b/gnu/packages/patches/nsis-SConstruct-sde-support.patch
Please add a line at the top saying what it does and linking to the
upstream issue (or ‘guix lint’ will complain, which would be so bad :-)).
OK to push with these changes, thank you!
Ludo’.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#48726
; Package
guix-patches
.
(Thu, 03 Jun 2021 19:47:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 48726 <at> debbugs.gnu.org (full text, mbox):
Does this look correct?
* gnu/packages/patches/nsis-source-date-epoch.patch: New patch.
* gnu/packages/installers.scm (make-nsis)[source]: Apply it.
---
gnu/local.mk | 1 +
gnu/packages/installers.scm | 3 ++-
.../patches/nsis-source-date-epoch.patch | 23 +++++++++++++++++++
3 files changed, 26 insertions(+), 1 deletion(-)
create mode 100644 gnu/packages/patches/nsis-source-date-epoch.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index 792ebac1e1..db96f55bf0 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1464,6 +1464,7 @@ dist_patch_DATA = \
%D%/packages/patches/network-manager-plugin-path.patch \
%D%/packages/patches/nginx-socket-cloexec.patch \
%D%/packages/patches/nsis-env-passthru.patch \
+ %D%/packages/patches/nsis-source-date-epoch.patch \
%D%/packages/patches/nss-increase-test-timeout.patch \
%D%/packages/patches/nss-3.56-pkgconfig.patch \
%D%/packages/patches/ntfs-3g-CVE-2019-9755.patch \
diff --git a/gnu/packages/installers.scm b/gnu/packages/installers.scm
index 775b91f0f7..c768a367aa 100644
--- a/gnu/packages/installers.scm
+++ b/gnu/packages/installers.scm
@@ -42,7 +42,8 @@
(sha256
(base32
"1sbwx5vzpddharkb7nj4q5z3i5fbg4lan63ng738cw4hmc4v7qdn"))
- (patches (search-patches "nsis-env-passthru.patch"))))
+ (patches (search-patches "nsis-env-passthru.patch"
+ "nsis-source-date-epoch.patch"))))
(build-system scons-build-system)
(native-inputs `(("xgcc" ,xgcc)
("xbinutils" ,xbinutils)
diff --git a/gnu/packages/patches/nsis-source-date-epoch.patch b/gnu/packages/patches/nsis-source-date-epoch.patch
new file mode 100644
index 0000000000..744c2a8011
--- /dev/null
+++ b/gnu/packages/patches/nsis-source-date-epoch.patch
@@ -0,0 +1,23 @@
+Honour SOURCE_DATE_EPOCH for VERSION default
+
+Merged upstream as cd3f1024a37a332f1d4fa96a817ca80dfa2a478c, but not yet in a
+release. GitHub PR: https://github.com/kichik/nsis/pull/13
+
+Python snippet from: https://reproducible-builds.org/docs/source-date-epoch/#python
+
+
+diff --git a/SConstruct b/SConstruct
+index e8252c9..41786f2 100755
+--- a/SConstruct
++++ b/SConstruct
+@@ -95,8 +95,8 @@ default_doctype = 'html'
+ if defenv.WhereIs('hhc', os.environ['PATH']):
+ default_doctype = 'chm'
+
+-from time import strftime, gmtime
+-cvs_version = strftime('%d-%b-%Y.cvs', gmtime())
++import time
++cvs_version = time.strftime('%d-%b-%Y.cvs', time.gmtime(int(os.environ.get('SOURCE_DATE_EPOCH', time.time()))))
+
+ opts = Variables()
+
--
2.31.1
Information forwarded
to
guix-patches <at> gnu.org
:
bug#48726
; Package
guix-patches
.
(Fri, 04 Jun 2021 15:40:01 GMT)
Full text and
rfc822 format available.
Message #20 received at 48726 <at> debbugs.gnu.org (full text, mbox):
Carl Dong <contact <at> carldong.me> skribis:
> Does this look correct?
>
> * gnu/packages/patches/nsis-source-date-epoch.patch: New patch.
> * gnu/packages/installers.scm (make-nsis)[source]: Apply it.
You should mention gnu/local.mk in the commit log, but apart from that,
it LGTM!
Thanks,
Ludo’.
bug marked as fixed in version 20d9535e1bf981a37f39f171ad72f67cdb1e6919, send any further explanations to
48726 <at> debbugs.gnu.org and Carl Dong <contact <at> carldong.me>
Request was from
Carl Dong <contact <at> carldong.me>
to
control <at> debbugs.gnu.org
.
(Tue, 08 Jun 2021 15:51:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 07 Jul 2021 11:24:06 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 287 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.