Message ID | 20210529053107.381628-1-contact@carldong.me |
---|---|
State | Accepted |
Headers | show |
Series | [bug#48726] gnu: nsis: Respect SOURCE-DATE-EPOCH for reproducibility | expand |
Context | Check | Description |
---|---|---|
cbaines/comparison | success | View comparision |
cbaines/git branch | success | View Git branch |
cbaines/applying patch | success | View Laminar job |
cbaines/issue | success | View issue |
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.
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@carldong.me "I fight for the users"
Hi, Carl Dong <contact@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’.
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() +