diff options
| author | Sören Tempel <soeren+git@soeren-tempel.net> | 2026-03-14 12:56:35 +0100 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2026-03-30 23:41:32 +0200 |
| commit | 116078f3664d1fadc544c85b002571899c5ea709 (patch) | |
| tree | d62b4dbbbe57610efa92e3252a3a2b25641c4d51 | |
| parent | 51abc3b55e10325957927ffd51296de1677d2d39 (diff) | |
gnu: binutils: Make build reproducible.
binutils is not reproducible because it includes an examples tarball
which is not created in a reproducible way. This patch modifies the
tarball creation to make it reproducible.
Refer to https://reproducible-builds.org/docs/archives/ for more info.
See also #7041.
* gnu/packages/base.scm (binutils)
[source]: Apply patch to make tarball creation reproducible.
* gnu/packages/patches/binutils-reproducible-tar.patch: New patch.
* gnu/local.mk (dist_patch_DATA): Register it.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
| -rw-r--r-- | gnu/local.mk | 1 | ||||
| -rw-r--r-- | gnu/packages/base.scm | 1 | ||||
| -rw-r--r-- | gnu/packages/patches/binutils-reproducible-tar.patch | 26 |
3 files changed, 28 insertions, 0 deletions
diff --git a/gnu/local.mk b/gnu/local.mk index 74de0655d68..04f895b71f5 100644 --- a/gnu/local.mk +++ b/gnu/local.mk | |||
| @@ -1064,6 +1064,7 @@ dist_patch_DATA = \ | |||
| 1064 | %D%/packages/patches/binutils-loongson-workaround.patch \ | 1064 | %D%/packages/patches/binutils-loongson-workaround.patch \ |
| 1065 | %D%/packages/patches/binutils-mingw-w64-deterministic.patch \ | 1065 | %D%/packages/patches/binutils-mingw-w64-deterministic.patch \ |
| 1066 | %D%/packages/patches/binutils-2.41-fix-cross.patch \ | 1066 | %D%/packages/patches/binutils-2.41-fix-cross.patch \ |
| 1067 | %D%/packages/patches/binutils-reproducible-tar.patch \ | ||
| 1067 | %D%/packages/patches/bloomberg-bde-tools-fix-install-path.patch \ | 1068 | %D%/packages/patches/bloomberg-bde-tools-fix-install-path.patch \ |
| 1068 | %D%/packages/patches/bmake-run-check-separately.patch \ | 1069 | %D%/packages/patches/bmake-run-check-separately.patch \ |
| 1069 | %D%/packages/patches/boolector-find-googletest.patch \ | 1070 | %D%/packages/patches/boolector-find-googletest.patch \ |
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index 54e0d2be3c5..4a0403d912b 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm | |||
| @@ -678,6 +678,7 @@ change. GNU make offers many powerful extensions over the standard utility.") | |||
| 678 | (sha256 | 678 | (sha256 |
| 679 | (base32 "0fnwaasfglbphqzvz5n25js9gl695p7pjbmb1z81g8gsc6k90qzn")) | 679 | (base32 "0fnwaasfglbphqzvz5n25js9gl695p7pjbmb1z81g8gsc6k90qzn")) |
| 680 | (patches (search-patches | 680 | (patches (search-patches |
| 681 | "binutils-reproducible-tar.patch" | ||
| 681 | "binutils-2.41-fix-cross.patch" | 682 | "binutils-2.41-fix-cross.patch" |
| 682 | "binutils-loongson-workaround.patch")))) | 683 | "binutils-loongson-workaround.patch")))) |
| 683 | (build-system gnu-build-system) | 684 | (build-system gnu-build-system) |
diff --git a/gnu/packages/patches/binutils-reproducible-tar.patch b/gnu/packages/patches/binutils-reproducible-tar.patch new file mode 100644 index 00000000000..857daf1e6bd --- /dev/null +++ b/gnu/packages/patches/binutils-reproducible-tar.patch | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | Ensure that the examples tarball is reproducible. | ||
| 2 | |||
| 3 | See https://reproducible-builds.org/docs/archives/ | ||
| 4 | |||
| 5 | diff -upr a/gprofng/doc/Makefile.in b/gprofng/doc/Makefile.in | ||
| 6 | --- a/gprofng/doc/Makefile.in 2025-02-02 01:00:00.000000000 +0100 | ||
| 7 | +++ b/gprofng/doc/Makefile.in 2026-03-15 11:03:49.597737186 +0100 | ||
| 8 | @@ -894,14 +894,14 @@ gprofng-display-text.1: $(srcdir)/gprofn | ||
| 9 | |||
| 10 | info: $(man_MANS) | ||
| 11 | |||
| 12 | -examples.tar.gz: | ||
| 13 | - $(AM_V_at)( tar czf $@ $(srcdir)/../examples ) | ||
| 14 | +examples.tar: | ||
| 15 | + $(AM_V_at)( tar --owner=0 --group=0 --sort=name --mtime='2015-10-21 00:00Z' -cf $@ $(srcdir)/../examples ) | ||
| 16 | |||
| 17 | .PHONY: install-data-local | ||
| 18 | |||
| 19 | -install-data-local: examples.tar.gz | ||
| 20 | +install-data-local: examples.tar | ||
| 21 | $(mkinstalldirs) $(DESTDIR)$(docdir)/gprofng | ||
| 22 | - $(INSTALL_DATA) examples.tar.gz $(DESTDIR)$(docdir)/gprofng | ||
| 23 | + $(INSTALL_DATA) examples.tar $(DESTDIR)$(docdir)/gprofng | ||
| 24 | |||
| 25 | # Tell versions [3.59,3.63) of GNU make to not export all variables. | ||
| 26 | # Otherwise a system limit (for SysV at least) may be exceeded. | ||
