GNU bug report logs -
#40414
[PATCH] gnu: mingw: Add mingw-w64 reproducibility patches.
Previous Next
Reported by: Carl Dong <contact <at> carldong.me>
Date: Fri, 3 Apr 2020 19:02:02 UTC
Severity: normal
Tags: patch
Done: Mathieu Othacehe <m.othacehe <at> gmail.com>
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 40414 in the body.
You can then email your comments to 40414 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#40414
; Package
guix-patches
.
(Fri, 03 Apr 2020 19:02: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
.
(Fri, 03 Apr 2020 19:02:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Round 2! Now for some patches applied to mingw-w64 itself, rather than just binutils.
I've checked:
- That the mode of the patches are correct
- guix build mingw-w64-{x86_64,i686}{,-winpthreads}
- guix build hello
-----
These patches were originally found at the debian mingw-w64 team's
mingw-w64 repo, and should improve the reproducibility of our mingw-w64
toolchain.
* gnu/packages/patches/mingw-w64-dlltool-temp-prefix.patch: New file.
* gnu/packages/patches/mingw-w64-reproducible-gendef.patch: New file.
* gnu/local.mk (dist_patch_DATA): Update accordingly.
* gnu/packages/mingw.scm (make-mingw-w64): Apply patches.
---
gnu/local.mk | 2 ++
gnu/packages/mingw.scm | 4 ++-
.../mingw-w64-dlltool-temp-prefix.patch | 26 +++++++++++++++++++
.../mingw-w64-reproducible-gendef.patch | 23 ++++++++++++++++
4 files changed, 54 insertions(+), 1 deletion(-)
create mode 100644 gnu/packages/patches/mingw-w64-dlltool-temp-prefix.patch
create mode 100644 gnu/packages/patches/mingw-w64-reproducible-gendef.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index 8328165e17..713d97da86 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1201,6 +1201,8 @@ dist_patch_DATA = \
%D%/packages/patches/metabat-fix-compilation.patch \
%D%/packages/patches/mhash-keygen-test-segfault.patch \
%D%/packages/patches/mingw-w64-6.0.0-gcc.patch \
+ %D%/packages/patches/mingw-w64-dlltool-temp-prefix.patch \
+ %D%/packages/patches/mingw-w64-reproducible-gendef.patch \
%D%/packages/patches/minisat-friend-declaration.patch \
%D%/packages/patches/minisat-install.patch \
%D%/packages/patches/mpc123-initialize-ao.patch \
diff --git a/gnu/packages/mingw.scm b/gnu/packages/mingw.scm
index d0785c5067..37726e5851 100644
--- a/gnu/packages/mingw.scm
+++ b/gnu/packages/mingw.scm
@@ -53,7 +53,9 @@ specified, recurse and return a mingw-w64 with support for winpthreads."
"mingw-w64-release/mingw-w64-v" version ".tar.bz2"))
(sha256
(base32 "0a5njsa2zw2ssdz10jkb10mhrf3cb8qp9avs89zqmw4n6pzxy85a"))
- (patches (search-patches "mingw-w64-6.0.0-gcc.patch"))))
+ (patches (search-patches "mingw-w64-6.0.0-gcc.patch"
+ "mingw-w64-dlltool-temp-prefix.patch"
+ "mingw-w64-reproducible-gendef.patch"))))
(native-inputs `(("xgcc-core" ,(if xgcc xgcc (cross-gcc triplet)))
("xbinutils" ,(if xbinutils xbinutils (cross-binutils triplet)))
,@(if with-winpthreads?
diff --git a/gnu/packages/patches/mingw-w64-dlltool-temp-prefix.patch b/gnu/packages/patches/mingw-w64-dlltool-temp-prefix.patch
new file mode 100644
index 0000000000..432cafc162
--- /dev/null
+++ b/gnu/packages/patches/mingw-w64-dlltool-temp-prefix.patch
@@ -0,0 +1,26 @@
+This following patch was originally found at the debian mingw-w64 team's
+mingw-w64 repo located here:
+https://salsa.debian.org/mingw-w64-team/mingw-w64.git
+
+Invoke the following in the aforementioned repo to see the original patch:
+
+ $ git show 4974e2c:debian/patches/dlltool-temp-prefix.patch
+
+Description: Specify dlltool's temp prefix
+Author: Stephen Kitt <steve <at> sk2.org>
+
+By default dlltool uses its pid for the object files it generates.
+Enforcing its temp prefix allows the files it generates to be
+reproducible.
+
+--- a/mingw-w64-crt/Makefile.am
++++ b/mingw-w64-crt/Makefile.am
+@@ -36,7 +36,7 @@
+ DTDEF32=$(GENLIB) $(DLLTOOLFLAGS32) $(AM_DLLTOOLFLAGS)
+ DTDEF64=$(GENLIB) $(DLLTOOLFLAGS64) $(AM_DLLTOOLFLAGS)
+ else
+- AM_DLLTOOLFLAGS=-k --as=$(AS) --output-lib $@
++ AM_DLLTOOLFLAGS=-k --as=$(AS) --output-lib $@ --temp-prefix $$(basename $@ .a)
+ DLLTOOLFLAGSARM32=-m arm
+ DLLTOOLFLAGSARM64=-m arm64
+ DLLTOOLFLAGS32=--as-flags=--32 -m i386
diff --git a/gnu/packages/patches/mingw-w64-reproducible-gendef.patch b/gnu/packages/patches/mingw-w64-reproducible-gendef.patch
new file mode 100644
index 0000000000..ee676af7a0
--- /dev/null
+++ b/gnu/packages/patches/mingw-w64-reproducible-gendef.patch
@@ -0,0 +1,23 @@
+This following patch was originally found at the debian mingw-w64 team's
+mingw-w64 repo located here:
+https://salsa.debian.org/mingw-w64-team/mingw-w64.git
+
+Invoke the following in the aforementioned repo to see the original patch:
+
+ $ git show 4974e2c:debian/patches/reproducible-gendef.patch
+
+Description: Drop __DATE__ from gendef
+Author: Stephen Kitt <skitt <at> debian.org>
+
+This allows gendef to be built reproducibly.
+
+--- a/mingw-w64-tools/gendef/src/gendef.c
++++ b/mingw-w64-tools/gendef/src/gendef.c
+@@ -196,7 +196,6 @@
+ " By default, the output files are named after their DLL counterparts\n"
+ " gendef MYDLL.DLL Produces MYDLL.def\n"
+ " gendef - MYDLL.DLL Prints the exports to stdout\n");
+- fprintf (stderr, "\nBuilt on %s\n", __DATE__);
+ fprintf (stderr, "\nReport bugs to <mingw-w64-public <at> lists.sourceforge.net>\n");
+ exit (0);
+ }
--
2.25.1
</mingw-w64-public <at> lists.sourceforge.net></skitt <at> debian.org></steve <at> sk2.org>
Information forwarded
to
guix-patches <at> gnu.org
:
bug#40414
; Package
guix-patches
.
(Sat, 04 Apr 2020 10:55:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 40414 <at> debbugs.gnu.org (full text, mbox):
Hello Carl,
This patch LGTM. Do you know if there are plans to apply those patches
mainline?
Thanks,
Mathieu
Information forwarded
to
guix-patches <at> gnu.org
:
bug#40414
; Package
guix-patches
.
(Sat, 04 Apr 2020 11:02:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 40414 <at> debbugs.gnu.org (full text, mbox):
> + (patches (search-patches "mingw-w64-6.0.0-gcc.patch"
> + "mingw-w64-dlltool-temp-prefix.patch"
> + "mingw-w64-reproducible-gendef.patch"))))
Also you can add a break after "patches" so that you respect the 78
columns limit, this way:
--8<---------------cut here---------------start------------->8---
(patches
(search-patches "mingw-w64-6.0.0-gcc.patch"
"mingw-w64-dlltool-temp-prefix.patch"
"mingw-w64-reproducible-gendef.patch"))))
--8<---------------cut here---------------end--------------->8---
Thanks,
Mathieu
Information forwarded
to
guix-patches <at> gnu.org
:
bug#40414
; Package
guix-patches
.
(Sat, 04 Apr 2020 19:47:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 40414 <at> debbugs.gnu.org (full text, mbox):
Great to hear Mathieu, I will push my changes along with the line break suggestion.
Not sure about plans to apply patches mainline⦠I will reach out to the original author to ask about this.
Cheers,
Carl Dong
> On Apr 4, 2020, at 6:54 AM, Mathieu Othacehe <m.othacehe <at> gmail.com> wrote:
>
>
>
> Hello Carl,
>
> This patch LGTM. Do you know if there are plans to apply those patches
> mainline?
>
> Thanks,
>
> Mathieu
Reply sent
to
Mathieu Othacehe <m.othacehe <at> gmail.com>
:
You have taken responsibility.
(Sun, 05 Apr 2020 09:29:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Carl Dong <contact <at> carldong.me>
:
bug acknowledged by developer.
(Sun, 05 Apr 2020 09:29:02 GMT)
Full text and
rfc822 format available.
Message #19 received at 40414-done <at> debbugs.gnu.org (full text, mbox):
Hey,
> Not sure about plans to apply patches mainline⦠I will reach out to the original author to ask about this.
Great, don't forget to close the ticket once pushed :)
Thanks,
Mathieu
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 03 May 2020 11:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 5 years and 42 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.