summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/wget/wget
diff options
context:
space:
mode:
authorHongxu Jia <hongxu.jia@windriver.com>2018-01-12 03:11:22 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-01-19 12:37:13 +0000
commit03352b1ce34536ca7fe98959fe2f59c5708e773a (patch)
tree98d8f11b27159139b8d504dec4fd3abb171bd5bb /meta/recipes-extended/wget/wget
parentd94199ef3b2b91a7a3a33ae885bf76721c442e9f (diff)
downloadpoky-03352b1ce34536ca7fe98959fe2f59c5708e773a.tar.gz
wget: improve reproducibility
Remove build host references from the internally generated file version.c. The references get compiled into executables, which leads to non-reproducible builds. The removed references (--sysroot, -fdebug-prefix-map) were only used as part of the `wget --version' which do not have side effect. (From OE-Core rev: c7fc89c136311c69bc96edf110e988f1be691781) Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/wget/wget')
-rw-r--r--meta/recipes-extended/wget/wget/0002-improve-reproducibility.patch61
1 files changed, 61 insertions, 0 deletions
diff --git a/meta/recipes-extended/wget/wget/0002-improve-reproducibility.patch b/meta/recipes-extended/wget/wget/0002-improve-reproducibility.patch
new file mode 100644
index 0000000000..8781df21c0
--- /dev/null
+++ b/meta/recipes-extended/wget/wget/0002-improve-reproducibility.patch
@@ -0,0 +1,61 @@
1From 7f1357529d23b356b45fbb0dd7388588162e4cb8 Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Wed, 10 Jan 2018 14:43:20 +0800
4Subject: [PATCH] src/Makefile.am: improve reproducibility
5
6Remove build host references from the internally
7generated file version.c. The references get compiled into
8executables, which leads to non-reproducible builds.
9The removed references (--sysroot, -fdebug-prefix-map) were
10only used as part of the `wget --version' which do not have
11side effect.
12
13...
14$ wget --version
15GNU Wget 1.14 built on linux-gnu.
16
17+digest +https +ipv6 +iri +large-file +nls +ntlm +opie +ssl/openssl
18
19Wgetrc:
20 /etc/wgetrc (system)
21Locale: /usr/share/locale
22Compile: gcc -DHAVE_CONFIG_H -DSYSTEM_WGETRC="/etc/wgetrc"
23 -DLOCALEDIR="/usr/share/locale" -I. -I../lib -I../lib -O2 -g -pipe
24 -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong
25 --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic
26Link: gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
27 -fstack-protector-strong --param=ssp-buffer-size=4
28 -grecord-gcc-switches -m64 -mtune=generic -lssl -lcrypto
29 /usr/lib64/libssl.so /usr/lib64/libcrypto.so /usr/lib64/libz.so
30 -ldl -lz -lz -lidn -luuid -lpcre ftp-opie.o openssl.o http-ntlm.o
31 ../lib/libgnu.a
32...
33
34Upstream-Status: Inappropriate [oe-core specific]
35
36Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
37---
38 src/Makefile.am | 4 ++++
39 1 file changed, 4 insertions(+)
40
41diff --git a/src/Makefile.am b/src/Makefile.am
42index 28c0be2..44084a3 100644
43--- a/src/Makefile.am
44+++ b/src/Makefile.am
45@@ -87,9 +87,13 @@ version.c: $(wget_SOURCES) ../lib/libgnu.a
46 echo '#include "version.h"' >> $@
47 echo 'const char *version_string = "@VERSION@";' >> $@
48 echo 'const char *compilation_string = "'$(COMPILE)'";' \
49+ | sed -e "s,$(TOOLCHAIN_OPTIONS),,g" \
50+ -e "s,$(DEBUG_PREFIX_MAP),,g" \
51 | $(ESCAPEQUOTE) >> $@
52 echo 'const char *link_string = "'$(CCLD) $(AM_CFLAGS) $(CFLAGS) \
53 $(AM_LDFLAGS) $(LDFLAGS) $(LIBS) $(wget_LDADD)'";' \
54+ | sed -e "s,$(TOOLCHAIN_OPTIONS),,g" \
55+ -e "s,$(DEBUG_PREFIX_MAP),,g" \
56 | $(ESCAPEQUOTE) >> $@
57
58 css.c: $(srcdir)/css.l
59--
601.8.3.1
61