diff options
author | Alejandro del Castillo <alejandro.delcastillo@ni.com> | 2018-02-28 14:36:45 -0600 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-03-04 11:35:40 +0000 |
commit | 2a8d728681c321179f9091269e7da10c1b8f3af5 (patch) | |
tree | f9df84a5b6f17bd4fcbcbd69e7de9e84cb3111cc /meta | |
parent | 795b4b4563bc33c04c3a28c0acddc8aa57fd683f (diff) | |
download | poky-2a8d728681c321179f9091269e7da10c1b8f3af5.tar.gz |
opkg-utils: upgrade to version 0.3.6
0.3.5 -> 0.3.6
Patches:
- Add support for tar versions that don't support --sort
- Use local time when setting the modication time on the archives
(From OE-Core rev: fd551c5ad4c82f295470f278c524d55562a67a28)
Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-devtools/opkg-utils/opkg-utils/0001-Only-use-sort-name-on-versions-of-tar-which-support-.patch | 52 | ||||
-rw-r--r-- | meta/recipes-devtools/opkg-utils/opkg-utils/0002-opkg-build-Use-local-time-for-build_date-since-opkg-.patch | 45 | ||||
-rw-r--r-- | meta/recipes-devtools/opkg-utils/opkg-utils/tar_ignore_error.patch | 13 | ||||
-rw-r--r-- | meta/recipes-devtools/opkg-utils/opkg-utils_0.3.6.bb (renamed from meta/recipes-devtools/opkg-utils/opkg-utils_0.3.5.bb) | 6 |
4 files changed, 108 insertions, 8 deletions
diff --git a/meta/recipes-devtools/opkg-utils/opkg-utils/0001-Only-use-sort-name-on-versions-of-tar-which-support-.patch b/meta/recipes-devtools/opkg-utils/opkg-utils/0001-Only-use-sort-name-on-versions-of-tar-which-support-.patch new file mode 100644 index 0000000000..7de4b7f723 --- /dev/null +++ b/meta/recipes-devtools/opkg-utils/opkg-utils/0001-Only-use-sort-name-on-versions-of-tar-which-support-.patch | |||
@@ -0,0 +1,52 @@ | |||
1 | From ef5db062b7d25e6070acc6922ea48f50491313b5 Mon Sep 17 00:00:00 2001 | ||
2 | From: Michael Hansen <michael.j.hansen@hp.com> | ||
3 | Date: Mon, 26 Feb 2018 09:42:56 -0800 | ||
4 | Subject: [PATCH 1/2] Only use --sort=name on versions of tar which support it. | ||
5 | This fixes compatibility with bsdtar and old versions of GNU tar (e.g. | ||
6 | RHEL6). | ||
7 | |||
8 | Signed-off-by: Michael Hansen <michael.j.hansen@hp.com> | ||
9 | Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com> | ||
10 | --- | ||
11 | opkg-build | 11 ++++++++--- | ||
12 | 1 file changed, 8 insertions(+), 3 deletions(-) | ||
13 | |||
14 | diff --git a/opkg-build b/opkg-build | ||
15 | index 265906f..094d69f 100755 | ||
16 | --- a/opkg-build | ||
17 | +++ b/opkg-build | ||
18 | @@ -232,6 +232,11 @@ if [ $compressor = "gzip" ] ; then | ||
19 | compressorargs=$zipargs | ||
20 | fi | ||
21 | |||
22 | +tsortargs= | ||
23 | +if tar --help 2>&1 | grep -- "--sort=" > /dev/null; then | ||
24 | + tsortargs="--sort=name" | ||
25 | +fi | ||
26 | + | ||
27 | shift $(($OPTIND - 1)) | ||
28 | |||
29 | # continue on to process additional arguments | ||
30 | @@ -280,8 +285,8 @@ mkdir $tmp_dir | ||
31 | build_date="$(date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y-%m-%d)" | ||
32 | |||
33 | echo $CONTROL > $tmp_dir/tarX | ||
34 | -( cd $pkg_dir && tar $ogargs --sort=name --mtime=$build_date -X $tmp_dir/tarX -c $tarformat . | $compressor $compressorargs > $tmp_dir/data.tar.$cext ) | ||
35 | -( cd $pkg_dir/$CONTROL && tar $ogargs --sort=name --mtime=$build_date -c $tarformat . | gzip $zipargs > $tmp_dir/control.tar.gz ) | ||
36 | +( cd $pkg_dir && tar $ogargs $tsortargs --mtime=$build_date -X $tmp_dir/tarX -c $tarformat . | $compressor $compressorargs > $tmp_dir/data.tar.$cext ) | ||
37 | +( cd $pkg_dir/$CONTROL && tar $ogargs $tsortargs --mtime=$build_date -c $tarformat . | gzip $zipargs > $tmp_dir/control.tar.gz ) | ||
38 | rm $tmp_dir/tarX | ||
39 | |||
40 | echo "2.0" > $tmp_dir/debian-binary | ||
41 | @@ -296,7 +301,7 @@ rm -f $pkg_file | ||
42 | if [ "$outer" = "ar" ] ; then | ||
43 | ( cd $tmp_dir && ar -crfD $pkg_file ./debian-binary ./control.tar.gz ./data.tar.$cext ) | ||
44 | else | ||
45 | - ( cd $tmp_dir && tar -c --sort=name --mtime=$build_date $tarformat ./debian-binary ./control.tar.gz ./data.tar.$cext | gzip $zipargs > $pkg_file ) | ||
46 | + ( cd $tmp_dir && tar -c $tsortargs --mtime=$build_date $tarformat ./debian-binary ./control.tar.gz ./data.tar.$cext | gzip $zipargs > $pkg_file ) | ||
47 | fi | ||
48 | |||
49 | rm $tmp_dir/debian-binary $tmp_dir/data.tar.$cext $tmp_dir/control.tar.gz | ||
50 | -- | ||
51 | 2.16.1 | ||
52 | |||
diff --git a/meta/recipes-devtools/opkg-utils/opkg-utils/0002-opkg-build-Use-local-time-for-build_date-since-opkg-.patch b/meta/recipes-devtools/opkg-utils/opkg-utils/0002-opkg-build-Use-local-time-for-build_date-since-opkg-.patch new file mode 100644 index 0000000000..b42d7878c9 --- /dev/null +++ b/meta/recipes-devtools/opkg-utils/opkg-utils/0002-opkg-build-Use-local-time-for-build_date-since-opkg-.patch | |||
@@ -0,0 +1,45 @@ | |||
1 | From 5727826b51cf99feaff3483a9df8af2043e7efc1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Michael Hansen <michael.j.hansen@hp.com> | ||
3 | Date: Mon, 26 Feb 2018 10:17:01 -0800 | ||
4 | Subject: [PATCH 2/2] opkg-build: Use local time for build_date, since opkg | ||
5 | extracts files assuming local time rather than UTC. Also increase resolution | ||
6 | of build date down to the second, rather than clamping to midnight of the | ||
7 | current date. | ||
8 | |||
9 | Signed-off-by: Michael Hansen <michael.j.hansen@hp.com> | ||
10 | Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com> | ||
11 | --- | ||
12 | opkg-build | 8 ++++---- | ||
13 | 1 file changed, 4 insertions(+), 4 deletions(-) | ||
14 | |||
15 | diff --git a/opkg-build b/opkg-build | ||
16 | index 094d69f..0050c2b 100755 | ||
17 | --- a/opkg-build | ||
18 | +++ b/opkg-build | ||
19 | @@ -282,11 +282,11 @@ fi | ||
20 | tmp_dir=$dest_dir/IPKG_BUILD.$$ | ||
21 | mkdir $tmp_dir | ||
22 | |||
23 | -build_date="$(date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y-%m-%d)" | ||
24 | +build_date="$(date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" "+%Y-%m-%d %H:%M:%S")" | ||
25 | |||
26 | echo $CONTROL > $tmp_dir/tarX | ||
27 | -( cd $pkg_dir && tar $ogargs $tsortargs --mtime=$build_date -X $tmp_dir/tarX -c $tarformat . | $compressor $compressorargs > $tmp_dir/data.tar.$cext ) | ||
28 | -( cd $pkg_dir/$CONTROL && tar $ogargs $tsortargs --mtime=$build_date -c $tarformat . | gzip $zipargs > $tmp_dir/control.tar.gz ) | ||
29 | +( cd $pkg_dir && tar $ogargs $tsortargs --mtime="$build_date" -X $tmp_dir/tarX -c $tarformat . | $compressor $compressorargs > $tmp_dir/data.tar.$cext ) | ||
30 | +( cd $pkg_dir/$CONTROL && tar $ogargs $tsortargs --mtime="$build_date" -c $tarformat . | gzip $zipargs > $tmp_dir/control.tar.gz ) | ||
31 | rm $tmp_dir/tarX | ||
32 | |||
33 | echo "2.0" > $tmp_dir/debian-binary | ||
34 | @@ -301,7 +301,7 @@ rm -f $pkg_file | ||
35 | if [ "$outer" = "ar" ] ; then | ||
36 | ( cd $tmp_dir && ar -crfD $pkg_file ./debian-binary ./control.tar.gz ./data.tar.$cext ) | ||
37 | else | ||
38 | - ( cd $tmp_dir && tar -c $tsortargs --mtime=$build_date $tarformat ./debian-binary ./control.tar.gz ./data.tar.$cext | gzip $zipargs > $pkg_file ) | ||
39 | + ( cd $tmp_dir && tar -c $tsortargs --mtime="$build_date" $tarformat ./debian-binary ./control.tar.gz ./data.tar.$cext | gzip $zipargs > $pkg_file ) | ||
40 | fi | ||
41 | |||
42 | rm $tmp_dir/debian-binary $tmp_dir/data.tar.$cext $tmp_dir/control.tar.gz | ||
43 | -- | ||
44 | 2.16.1 | ||
45 | |||
diff --git a/meta/recipes-devtools/opkg-utils/opkg-utils/tar_ignore_error.patch b/meta/recipes-devtools/opkg-utils/opkg-utils/tar_ignore_error.patch index 75c6f3b8de..d8931b281f 100644 --- a/meta/recipes-devtools/opkg-utils/opkg-utils/tar_ignore_error.patch +++ b/meta/recipes-devtools/opkg-utils/opkg-utils/tar_ignore_error.patch | |||
@@ -18,26 +18,27 @@ Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> | |||
18 | 18 | ||
19 | 19 | ||
20 | Index: git/opkg-build | 20 | Index: git/opkg-build |
21 | |||
21 | =================================================================== | 22 | =================================================================== |
22 | --- git.orig/opkg-build | 23 | --- git.orig/opkg-build |
23 | +++ git/opkg-build | 24 | +++ git/opkg-build |
24 | @@ -250,8 +250,21 @@ tmp_dir=$dest_dir/IPKG_BUILD.$$ | 25 | @@ -285,8 +285,21 @@ mkdir $tmp_dir |
25 | mkdir $tmp_dir | 26 | build_date="$(date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" "+%Y-%m-%d %H:%M:%S")" |
26 | 27 | ||
27 | echo $CONTROL > $tmp_dir/tarX | 28 | echo $CONTROL > $tmp_dir/tarX |
28 | -( cd $pkg_dir && tar $ogargs -X $tmp_dir/tarX -c --$compressor $tarformat -f $tmp_dir/data.tar.$cext . ) | 29 | -( cd $pkg_dir && tar $ogargs $tsortargs --mtime="$build_date" -X $tmp_dir/tarX -c $tarformat . | $compressor $compressorargs > $tmp_dir/data.tar.$cext ) |
29 | -( cd $pkg_dir/$CONTROL && tar $ogargs -cz $tarformat -f $tmp_dir/control.tar.gz . ) | 30 | -( cd $pkg_dir/$CONTROL && tar $ogargs $tsortargs --mtime="$build_date" -c $tarformat . | gzip $zipargs > $tmp_dir/control.tar.gz ) |
30 | + | 31 | + |
31 | + | 32 | + |
32 | +# Ignore error code 1, caused by modifying the number of hard links while creating the tar file | 33 | +# Ignore error code 1, caused by modifying the number of hard links while creating the tar file |
33 | +rc=0 | 34 | +rc=0 |
34 | +( cd $pkg_dir && tar $ogargs -X $tmp_dir/tarX -c --$compressor $tarformat -f $tmp_dir/data.tar.$cext . ) || rc=$? | 35 | +( cd $pkg_dir && tar $ogargs $tsortargs --mtime="$build_date" -X $tmp_dir/tarX -c $tarformat . | $compressor $compressorargs > $tmp_dir/data.tar.$cext ) || rc=$? |
35 | +if [ $rc -ne 1 ] && [ $rc -ne 0 ]; then | 36 | +if [ $rc -ne 1 ] && [ $rc -ne 0 ]; then |
36 | + exit $rc | 37 | + exit $rc |
37 | +fi | 38 | +fi |
38 | + | 39 | + |
39 | +rc=0 | 40 | +rc=0 |
40 | +( cd $pkg_dir/$CONTROL && tar $ogargs -cz $tarformat -f $tmp_dir/control.tar.gz . ) || rc=$? | 41 | +( cd $pkg_dir/$CONTROL && tar $ogargs $tsortargs --mtime="$build_date" -c $tarformat . | gzip $zipargs > $tmp_dir/control.tar.gz ) || rc=$? |
41 | +if [ $rc -ne 1 ] && [ $rc -ne 0 ]; then | 42 | +if [ $rc -ne 1 ] && [ $rc -ne 0 ]; then |
42 | + exit $rc | 43 | + exit $rc |
43 | +fi | 44 | +fi |
diff --git a/meta/recipes-devtools/opkg-utils/opkg-utils_0.3.5.bb b/meta/recipes-devtools/opkg-utils/opkg-utils_0.3.6.bb index e9ba9de094..081d8d8b7d 100644 --- a/meta/recipes-devtools/opkg-utils/opkg-utils_0.3.5.bb +++ b/meta/recipes-devtools/opkg-utils/opkg-utils_0.3.6.bb | |||
@@ -9,13 +9,15 @@ PROVIDES += "${@bb.utils.contains('PACKAGECONFIG', 'update-alternatives', 'virtu | |||
9 | 9 | ||
10 | SRC_URI = "http://git.yoctoproject.org/cgit/cgit.cgi/${BPN}/snapshot/${BPN}-${PV}.tar.gz \ | 10 | SRC_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-Only-use-sort-name-on-versions-of-tar-which-support-.patch \ | ||
13 | file://0002-opkg-build-Use-local-time-for-build_date-since-opkg-.patch \ | ||
12 | " | 14 | " |
13 | SRC_URI_append_class-native = " file://tar_ignore_error.patch" | 15 | SRC_URI_append_class-native = " file://tar_ignore_error.patch" |
14 | UPSTREAM_CHECK_URI = "http://git.yoctoproject.org/cgit/cgit.cgi/opkg-utils/refs/" | 16 | UPSTREAM_CHECK_URI = "http://git.yoctoproject.org/cgit/cgit.cgi/opkg-utils/refs/" |
15 | 17 | ||
16 | 18 | ||
17 | SRC_URI[md5sum] = "a19e09c79bf1152aac62e8a120d679ff" | 19 | SRC_URI[md5sum] = "391c1c80aca26961375dd22e1d2d0cbf" |
18 | SRC_URI[sha256sum] = "7f4b08912e26a3f4f6f423f3b4e7157a73b1f3a7483fc59b216d1a80b50b0c38" | 20 | SRC_URI[sha256sum] = "26b3f4dd1c1ef65f519d4cddfb35ebea41ae8af989aea2699a39783598c33769" |
19 | 21 | ||
20 | TARGET_CC_ARCH += "${LDFLAGS}" | 22 | TARGET_CC_ARCH += "${LDFLAGS}" |
21 | 23 | ||