[arch-commits] Commit in syslinux/trunk (0025-reproducible-build.patch PKGBUILD)
Anatol Pomozov
anatolik at archlinux.org
Thu Nov 21 08:17:25 UTC 2019
Date: Thursday, November 21, 2019 @ 08:17:24
Author: anatolik
Revision: 369531
Make the build reproducible
Use date of the last git commit for HEXDATE compile-time const
Sort list of source files to make it determenistic
Added:
syslinux/trunk/0025-reproducible-build.patch
Modified:
syslinux/trunk/PKGBUILD
-------------------------------+
0025-reproducible-build.patch | 39 +++++++++++++++++++++++++++++++++++++++
PKGBUILD | 8 ++++++--
2 files changed, 45 insertions(+), 2 deletions(-)
Added: 0025-reproducible-build.patch
===================================================================
--- 0025-reproducible-build.patch (rev 0)
+++ 0025-reproducible-build.patch 2019-11-21 08:17:24 UTC (rev 369531)
@@ -0,0 +1,39 @@
+diff --git a/core/Makefile b/core/Makefile
+index 50ff35af..f1af71b7 100644
+--- a/core/Makefile
++++ b/core/Makefile
+@@ -112,7 +112,7 @@ CFLAGS += -D__SYSLINUX_CORE__ -D__FIRMWARE_$(FIRMWARE)__ \
+ # official release. Otherwise, substitute a hex string that is pretty much
+ # guaranteed to be unique to be unique from build to build.
+ ifndef HEXDATE
+-HEXDATE := $(shell $(PERL) $(SRC)/../now.pl $(SRCS))
++HEXDATE := $(shell printf '0x%x\n' $(git log -1 --format=%ct)) # make the build more predictable
+ endif
+ ifndef DATE
+ DATE := $(shell sh $(SRC)/../gen-id.sh $(VERSION) $(HEXDATE))
+diff --git a/mk/lib.mk b/mk/lib.mk
+index f3fb07c7..bece24a0 100644
+--- a/mk/lib.mk
++++ b/mk/lib.mk
+@@ -58,8 +58,8 @@ CFLAGS += -mregparm=3 -DREGPARM=3
+ endif
+
+ ARCH_MATH_OBJS = \
+- $(patsubst $(com32)/lib/%.c,%.o,$(wildcard $(com32)/lib/$(ARCH)/math/*.c)) \
+- $(patsubst $(com32)/lib/%.S,%.o,$(wildcard $(com32)/lib/$(ARCH)/math/*.S))
++ $(patsubst $(com32)/lib/%.c,%.o,$(sort $(wildcard $(com32)/lib/$(ARCH)/math/*.c))) \
++ $(patsubst $(com32)/lib/%.S,%.o,$(sort $(wildcard $(com32)/lib/$(ARCH)/math/*.S)))
+
+ VPATH = $(SRC)
+ LIBOTHER_OBJS = \
+@@ -130,8 +130,8 @@ LIBENTRY_OBJS = \
+ exit.o
+
+ LIBGCC_OBJS = \
+- $(patsubst $(com32)/lib/%.c,%.o,$(wildcard $(com32)/lib/$(ARCH)/libgcc/*.c)) \
+- $(patsubst $(com32)/lib/%.S,%.o,$(wildcard $(com32)/lib/$(ARCH)/libgcc/*.S))
++ $(patsubst $(com32)/lib/%.c,%.o,$(sort $(wildcard $(com32)/lib/$(ARCH)/libgcc/*.c))) \
++ $(patsubst $(com32)/lib/%.S,%.o,$(sort $(wildcard $(com32)/lib/$(ARCH)/libgcc/*.S)))
+
+ LIBCONSOLE_OBJS = \
+ \
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2019-11-21 04:08:14 UTC (rev 369530)
+++ PKGBUILD 2019-11-21 08:17:24 UTC (rev 369531)
@@ -7,7 +7,7 @@
pkgver=6.04.pre2.r11.gbf6db5b4
#_tag=syslinux-$pkgver
_commit=bf6db5b4
-pkgrel=2
+pkgrel=3
pkgdesc='Collection of boot loaders that boot from FAT, ext2/3/4 and btrfs filesystems, from CDs and via PXE'
url='https://www.syslinux.org/'
arch=(x86_64)
@@ -38,6 +38,7 @@
0004-gnu-efi-from-arch.patch
0016-strip-gnu-property.patch
0018-prevent-pow-optimization.patch
+ 0025-reproducible-build.patch
)
sha1sums=('SKIP'
'1145f454bd297d373ad123425f93620c3e92f585'
@@ -47,7 +48,8 @@
'81d05572b15dc5c55b63489fecdc79a6a332959c'
'4c3706e7a5620e450a6abb9238c08d7b39bb6945'
'f4a6768c7e5b8d02428ae550e37a7ca445ad1bb8'
- 'c94622eaa14ad9512e4f43b13302ba35d1787cbc')
+ 'c94622eaa14ad9512e4f43b13302ba35d1787cbc'
+ '5b3878a1fff74bbb09ddbc66cc8afa38f34ed05c')
_targets='bios efi64 efi32'
@@ -68,6 +70,8 @@
# patch -p1 < ../0004-gnu-efi-from-arch.patch
# patch -p1 < ../0005-gnu-efi-version-compatibility.patch
+ patch -p1 < ../0025-reproducible-build.patch
+
# do not swallow efi compilation output to make debugging easier
sed 's|> /dev/null 2>&1||' -i efi/check-gnu-efi.sh
More information about the arch-commits
mailing list