mirror of
https://git.yoctoproject.org/poky
synced 2026-03-19 21:59:42 +01:00
opkg: Fix build reproducibility issue
A build date was leaking into the generated docs and makefile used for ptests leading to reproducibility issues each time the month changed. Add a patch to use SOURCE_DATE_EPOCH to derive it if available. (From OE-Core rev: 61c639fcfdaa0a14e2a6a2bcca3215f99af94634) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 6a9ca7aec4991eabd425e32fdf85f51bb1686b8b) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
25
meta/recipes-devtools/opkg/opkg/sourcedateepoch.patch
Normal file
25
meta/recipes-devtools/opkg/opkg/sourcedateepoch.patch
Normal file
@@ -0,0 +1,25 @@
|
||||
Having CLEAN_DATE come from the current date doesn't allow for build
|
||||
reproducibility. Add the option of using SOURCE_DATE_EPOCH if set
|
||||
which for OE, it will be.
|
||||
|
||||
Upstream-Status: Pending
|
||||
RP 2021/2/2
|
||||
|
||||
Index: opkg-0.4.4/configure.ac
|
||||
===================================================================
|
||||
--- opkg-0.4.4.orig/configure.ac
|
||||
+++ opkg-0.4.4/configure.ac
|
||||
@@ -281,7 +281,12 @@ AC_FUNC_UTIME_NULL
|
||||
AC_FUNC_VPRINTF
|
||||
AC_CHECK_FUNCS([memmove memset mkdir regcomp strchr strcspn strdup strerror strndup strrchr strstr strtol strtoul sysinfo utime])
|
||||
|
||||
-CLEAN_DATE=`date +"%B %Y" | tr -d '\n'`
|
||||
+1607446883
|
||||
+if [ ! -z "$SOURCE_DATE_EPOCH" ]; then
|
||||
+ CLEAN_DATE=`LC_ALL=C date -d @$SOURCE_DATE_EPOCH +"%B %Y" | tr -d '\n'`
|
||||
+else
|
||||
+ CLEAN_DATE=`date +"%B %Y" | tr -d '\n'`
|
||||
+fi
|
||||
|
||||
AC_SUBST([CLEAN_DATE])
|
||||
|
||||
@@ -14,6 +14,7 @@ PE = "1"
|
||||
SRC_URI = "http://downloads.yoctoproject.org/releases/${BPN}/${BPN}-${PV}.tar.gz \
|
||||
file://opkg.conf \
|
||||
file://0001-opkg_conf-create-opkg.lock-in-run-instead-of-var-run.patch \
|
||||
file://sourcedateepoch.patch \
|
||||
file://run-ptest \
|
||||
"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user