summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/opkg/opkg/sourcedateepoch.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/opkg/opkg/sourcedateepoch.patch')
-rw-r--r--meta/recipes-devtools/opkg/opkg/sourcedateepoch.patch25
1 files changed, 25 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 @@
1Having CLEAN_DATE come from the current date doesn't allow for build
2reproducibility. Add the option of using SOURCE_DATE_EPOCH if set
3which for OE, it will be.
4
5Upstream-Status: Pending
6RP 2021/2/2
7
8Index: 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