summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlejandro del Castillo <alejandro.delcastillo@ni.com>2019-02-19 13:44:09 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-02-20 11:30:35 +0000
commita79bc39033c07e5cb0aa5ca95afe8f035c403f33 (patch)
treeeae6a9058ab3c1d4c1894b60fa6659572fa82359
parent6f0b28f00987b6cb5016332e80a498d6a8f5aaac (diff)
downloadpoky-a79bc39033c07e5cb0aa5ca95afe8f035c403f33.tar.gz
opkg-utils: do not set mtime on data.tar.X
Suggested-by: Tristan Ramseyer <t@ramseyer.email> (From OE-Core rev: 212f9ecc18aed653c852d21989093841d063fa44) Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-devtools/opkg-utils/opkg-utils/0001-opkg-build-do-not-set-mtime-on-data.tar.X.patch33
-rw-r--r--meta/recipes-devtools/opkg-utils/opkg-utils_0.4.0.bb1
2 files changed, 34 insertions, 0 deletions
diff --git a/meta/recipes-devtools/opkg-utils/opkg-utils/0001-opkg-build-do-not-set-mtime-on-data.tar.X.patch b/meta/recipes-devtools/opkg-utils/opkg-utils/0001-opkg-build-do-not-set-mtime-on-data.tar.X.patch
new file mode 100644
index 0000000000..6c058c71d7
--- /dev/null
+++ b/meta/recipes-devtools/opkg-utils/opkg-utils/0001-opkg-build-do-not-set-mtime-on-data.tar.X.patch
@@ -0,0 +1,33 @@
1From 42afc1f652d28dce3c5b9915d0cd3087a144e445 Mon Sep 17 00:00:00 2001
2From: Alejandro del Castillo <alejandro.delcastillo@ni.com>
3Date: Mon, 18 Feb 2019 11:25:43 -0600
4Subject: [PATCH] opkg-build: do not set mtime on data.tar.X
5
6Opkg should make sure the binaries it creates are created in a
7repoducibe way, but it shouldn't modify the mtime of the binaries it
8consumes. Doing so has side effects, for exmaple, Python pyc files are
9invalidated.
10
11Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
12
13Upstream-Status: Submitted
14---
15 opkg-build | 2 +-
16 1 file changed, 1 insertion(+), 1 deletion(-)
17
18diff --git a/opkg-build b/opkg-build
19index 13782ee..363cd01 100755
20--- a/opkg-build
21+++ b/opkg-build
22@@ -301,7 +301,7 @@ build_date="${SOURCE_DATE_EPOCH:-$(date +%s)}"
23
24 ( cd $pkg_dir/$CONTROL && find . -type f > $tmp_dir/control_list )
25 ( cd $pkg_dir && find . -path ./$CONTROL -prune -o -print > $tmp_dir/file_list )
26-( cd $pkg_dir && tar $ogargs $tsortargs --no-recursion --mtime=@$build_date -c $tarformat -T $tmp_dir/file_list | $compressor $compressorargs > $tmp_dir/data.tar.$cext )
27+( cd $pkg_dir && tar $ogargs $tsortargs --no-recursion -c $tarformat -T $tmp_dir/file_list | $compressor $compressorargs > $tmp_dir/data.tar.$cext )
28 ( cd $pkg_dir/$CONTROL && tar $ogargs $tsortargs --no-recursion --mtime=@$build_date -c $tarformat -T $tmp_dir/control_list | gzip $zipargs > $tmp_dir/control.tar.gz )
29 rm $tmp_dir/file_list
30 rm $tmp_dir/control_list
31--
322.20.1
33
diff --git a/meta/recipes-devtools/opkg-utils/opkg-utils_0.4.0.bb b/meta/recipes-devtools/opkg-utils/opkg-utils_0.4.0.bb
index eab74eabd6..9a3e06b92e 100644
--- a/meta/recipes-devtools/opkg-utils/opkg-utils_0.4.0.bb
+++ b/meta/recipes-devtools/opkg-utils/opkg-utils_0.4.0.bb
@@ -9,6 +9,7 @@ PROVIDES += "${@bb.utils.contains('PACKAGECONFIG', 'update-alternatives', 'virtu
9 9
10SRC_URI = "http://git.yoctoproject.org/cgit/cgit.cgi/${BPN}/snapshot/${BPN}-${PV}.tar.gz \ 10SRC_URI = "http://git.yoctoproject.org/cgit/cgit.cgi/${BPN}/snapshot/${BPN}-${PV}.tar.gz \
11 file://0001-Switch-all-scripts-to-use-Python-3.x.patch \ 11 file://0001-Switch-all-scripts-to-use-Python-3.x.patch \
12 file://0001-opkg-build-do-not-set-mtime-on-data.tar.X.patch \
12" 13"
13UPSTREAM_CHECK_URI = "http://git.yoctoproject.org/cgit/cgit.cgi/opkg-utils/refs/" 14UPSTREAM_CHECK_URI = "http://git.yoctoproject.org/cgit/cgit.cgi/opkg-utils/refs/"
14 15