unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#48726] [PATCH] gnu: nsis: Respect SOURCE-DATE-EPOCH for reproducibility
@ 2021-05-29  5:31 Carl Dong
  2021-05-29  8:59 ` Maxime Devos
  2021-06-01 21:19 ` Ludovic Courtès
  0 siblings, 2 replies; 6+ messages in thread
From: Carl Dong @ 2021-05-29  5:31 UTC (permalink / raw)
  To: 48726; +Cc: Carl Dong

* 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





^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [bug#48726] [PATCH] gnu: nsis: Respect SOURCE-DATE-EPOCH for reproducibility
  2021-05-29  5:31 [bug#48726] [PATCH] gnu: nsis: Respect SOURCE-DATE-EPOCH for reproducibility Carl Dong
@ 2021-05-29  8:59 ` Maxime Devos
  2021-05-30 18:54   ` Carl Dong
  2021-06-01 21:19 ` Ludovic Courtès
  1 sibling, 1 reply; 6+ messages in thread
From: Maxime Devos @ 2021-05-29  8:59 UTC (permalink / raw)
  To: Carl Dong, 48726

[-- Attachment #1: Type: text/plain, Size: 493 bytes --]

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.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [bug#48726] [PATCH] gnu: nsis: Respect SOURCE-DATE-EPOCH for reproducibility
  2021-05-29  8:59 ` Maxime Devos
@ 2021-05-30 18:54   ` Carl Dong
  0 siblings, 0 replies; 6+ messages in thread
From: Carl Dong @ 2021-05-30 18:54 UTC (permalink / raw)
  To: Maxime Devos; +Cc: 48726

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"



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [bug#48726] [PATCH] gnu: nsis: Respect SOURCE-DATE-EPOCH for reproducibility
  2021-05-29  5:31 [bug#48726] [PATCH] gnu: nsis: Respect SOURCE-DATE-EPOCH for reproducibility Carl Dong
  2021-05-29  8:59 ` Maxime Devos
@ 2021-06-01 21:19 ` Ludovic Courtès
  2021-06-03 19:46   ` [bug#48726] [PATCH v2] " Carl Dong
  1 sibling, 1 reply; 6+ messages in thread
From: Ludovic Courtès @ 2021-06-01 21:19 UTC (permalink / raw)
  To: Carl Dong; +Cc: 48726

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’.




^ permalink raw reply	[flat|nested] 6+ messages in thread

* [bug#48726] [PATCH v2] gnu: nsis: Respect SOURCE-DATE-EPOCH for reproducibility
  2021-06-01 21:19 ` Ludovic Courtès
@ 2021-06-03 19:46   ` Carl Dong
  2021-06-04 15:39     ` Ludovic Courtès
  0 siblings, 1 reply; 6+ messages in thread
From: Carl Dong @ 2021-06-03 19:46 UTC (permalink / raw)
  To: ludo; +Cc: 48726, Carl Dong

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





^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [bug#48726] [PATCH v2] gnu: nsis: Respect SOURCE-DATE-EPOCH for reproducibility
  2021-06-03 19:46   ` [bug#48726] [PATCH v2] " Carl Dong
@ 2021-06-04 15:39     ` Ludovic Courtès
  0 siblings, 0 replies; 6+ messages in thread
From: Ludovic Courtès @ 2021-06-04 15:39 UTC (permalink / raw)
  To: Carl Dong; +Cc: 48726

Carl Dong <contact@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’.




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-06-04 15:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-29  5:31 [bug#48726] [PATCH] gnu: nsis: Respect SOURCE-DATE-EPOCH for reproducibility Carl Dong
2021-05-29  8:59 ` Maxime Devos
2021-05-30 18:54   ` Carl Dong
2021-06-01 21:19 ` Ludovic Courtès
2021-06-03 19:46   ` [bug#48726] [PATCH v2] " Carl Dong
2021-06-04 15:39     ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).