diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-02-02 23:45:18 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-02-26 15:30:39 +0000 |
commit | 316333ec91a3f5b8db2b198bd45807f93ac95246 (patch) | |
tree | 9e593d801d078f852ce2ccd4d509817959f144bc /meta/recipes-devtools | |
parent | 0b80065beacaac69c3069cc207a278f8447f6237 (diff) | |
download | poky-316333ec91a3f5b8db2b198bd45807f93ac95246.tar.gz |
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: 8ca725351bbb9a8909bb2345118c6f261d1e152e)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 6a9ca7aec4991eabd425e32fdf85f51bb1686b8b)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r-- | meta/recipes-devtools/opkg/opkg/sourcedateepoch.patch | 25 | ||||
-rw-r--r-- | meta/recipes-devtools/opkg/opkg_0.4.3.bb | 1 |
2 files changed, 26 insertions, 0 deletions
diff --git a/meta/recipes-devtools/opkg/opkg/sourcedateepoch.patch b/meta/recipes-devtools/opkg/opkg/sourcedateepoch.patch new file mode 100644 index 0000000000..285d258c63 --- /dev/null +++ b/meta/recipes-devtools/opkg/opkg/sourcedateepoch.patch | |||
@@ -0,0 +1,25 @@ | |||
1 | Having CLEAN_DATE come from the current date doesn't allow for build | ||
2 | reproducibility. Add the option of using SOURCE_DATE_EPOCH if set | ||
3 | which for OE, it will be. | ||
4 | |||
5 | Upstream-Status: Pending | ||
6 | RP 2021/2/2 | ||
7 | |||
8 | Index: opkg-0.4.4/configure.ac | ||
9 | =================================================================== | ||
10 | --- opkg-0.4.4.orig/configure.ac | ||
11 | +++ opkg-0.4.4/configure.ac | ||
12 | @@ -281,7 +281,12 @@ AC_FUNC_UTIME_NULL | ||
13 | AC_FUNC_VPRINTF | ||
14 | AC_CHECK_FUNCS([memmove memset mkdir regcomp strchr strcspn strdup strerror strndup strrchr strstr strtol strtoul sysinfo utime]) | ||
15 | |||
16 | -CLEAN_DATE=`date +"%B %Y" | tr -d '\n'` | ||
17 | +1607446883 | ||
18 | +if [ ! -z "$SOURCE_DATE_EPOCH" ]; then | ||
19 | + CLEAN_DATE=`LC_ALL=C date -d @$SOURCE_DATE_EPOCH +"%B %Y" | tr -d '\n'` | ||
20 | +else | ||
21 | + CLEAN_DATE=`date +"%B %Y" | tr -d '\n'` | ||
22 | +fi | ||
23 | |||
24 | AC_SUBST([CLEAN_DATE]) | ||
25 | |||
diff --git a/meta/recipes-devtools/opkg/opkg_0.4.3.bb b/meta/recipes-devtools/opkg/opkg_0.4.3.bb index 46b7aa2523..ea01d473fc 100644 --- a/meta/recipes-devtools/opkg/opkg_0.4.3.bb +++ b/meta/recipes-devtools/opkg/opkg_0.4.3.bb | |||
@@ -14,6 +14,7 @@ PE = "1" | |||
14 | SRC_URI = "http://downloads.yoctoproject.org/releases/${BPN}/${BPN}-${PV}.tar.gz \ | 14 | SRC_URI = "http://downloads.yoctoproject.org/releases/${BPN}/${BPN}-${PV}.tar.gz \ |
15 | file://opkg.conf \ | 15 | file://opkg.conf \ |
16 | file://0001-opkg_conf-create-opkg.lock-in-run-instead-of-var-run.patch \ | 16 | file://0001-opkg_conf-create-opkg.lock-in-run-instead-of-var-run.patch \ |
17 | file://sourcedateepoch.patch \ | ||
17 | file://run-ptest \ | 18 | file://run-ptest \ |
18 | " | 19 | " |
19 | 20 | ||