diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2020-12-09 10:29:49 (EST) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2020-12-09 10:29:49 (EST) |
commit | 728a320be3a425ae330005563f430d5d1bad33ea (patch) | |
tree | b525603abd6a9e1992723dbdba1c50c166ec447a | |
parent | 845d7894509e9ab85908c7bae0d62a1da5861d33 (diff) |
patches: Improve build reproducibility
-rw-r--r-- | changelog | 6 | ||||
-rw-r--r-- | patches/0001-ob-buildopk-touch-after-gzip-not-before.patch | 26 | ||||
-rw-r--r-- | patches/0002-ob-buildenv-Set-ffile-prefix-map.patch | 27 |
3 files changed, 59 insertions, 0 deletions
@@ -1,3 +1,9 @@ +opkbuild (4.2.1-2) trunk + + * Apply patches from upstream to improve build reproducibility. + + -- Patrick McDermott <patrick.mcdermott@libiquity.com> Wed, 09 Dec 2020 10:29:21 -0500 + opkbuild (4.2.1-1) trunk * New upstream version. diff --git a/patches/0001-ob-buildopk-touch-after-gzip-not-before.patch b/patches/0001-ob-buildopk-touch-after-gzip-not-before.patch new file mode 100644 index 0000000..d5c44ff --- /dev/null +++ b/patches/0001-ob-buildopk-touch-after-gzip-not-before.patch @@ -0,0 +1,26 @@ +From e39a6e99302e8a780ca9867f92713e3fdfc518fc Mon Sep 17 00:00:00 2001 +From: Patrick McDermott <patrick.mcdermott@libiquity.com> +Date: Wed, 9 Dec 2020 09:40:50 -0500 +Subject: [PATCH] ob-buildopk: touch after gzip, not before + +--- + src/ob-buildopk.sh | 1 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/ob-buildopk.sh b/src/ob-buildopk.sh +index 11c4434..dc88758 100644 +--- a/src/ob-buildopk.sh ++++ b/src/ob-buildopk.sh +@@ -87,8 +87,8 @@ build_opk() + ${TAR} -cf '../control.tar' --no-recursion -T -) + (cd -- "${binary}.data" && find '.' | LC_ALL=C sort ${sort_r} | \ + ${TAR} -cf '../data.tar' --no-recursion -T -) +- ${TOUCH} -t "${date}" 'control.tar' 'data.tar' + ${GZIP} 'control.tar' 'data.tar' ++ ${TOUCH} -t "${date}" 'control.tar.gz' 'data.tar.gz' + + ${TAR} -cf "../../${binary_qual}_${version}_${arch}_${plat}.tar" \ + 'debian-binary' 'control.tar.gz' 'data.tar.gz' +-- +2.11.0 + diff --git a/patches/0002-ob-buildenv-Set-ffile-prefix-map.patch b/patches/0002-ob-buildenv-Set-ffile-prefix-map.patch new file mode 100644 index 0000000..0dee900 --- /dev/null +++ b/patches/0002-ob-buildenv-Set-ffile-prefix-map.patch @@ -0,0 +1,27 @@ +From c18744dc6fcc5a0a82338ab218001d0994c79571 Mon Sep 17 00:00:00 2001 +From: Patrick McDermott <patrick.mcdermott@libiquity.com> +Date: Wed, 9 Dec 2020 10:21:05 -0500 +Subject: [PATCH] ob-buildenv: Set -ffile-prefix-map + +--- + src/ob-buildenv.sh | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/ob-buildenv.sh b/src/ob-buildenv.sh +index 6d42851..0bbfdbb 100644 +--- a/src/ob-buildenv.sh ++++ b/src/ob-buildenv.sh +@@ -84,6 +84,10 @@ setup_build_flags() + if [ -r "${build_flags}" ]; then + . "${build_flags}" + fi ++ printf "CFLAGS='%s %s'\\n" "${CFLAGS:-}" \ ++ "-ffile-prefix-map=${PWD}=." ++ printf "CXXFLAGS='%s %s'\\n" "${CXXFLAGS:-}" \ ++ "-ffile-prefix-map=${PWD}=." + + return 0 + } +-- +2.11.0 + |