aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/opkg-utils/opkg-utils/0001-Only-use-sort-name-on-versions-of-tar-which-support-.patch
diff options
context:
space:
mode:
authorAlejandro del Castillo <alejandro.delcastillo@ni.com>2018-02-28 14:36:45 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-03-03 17:08:28 +0000
commitfd551c5ad4c82f295470f278c524d55562a67a28 (patch)
tree6245c02df33a690d5bf7b455582e3afa6c9ce71a /meta/recipes-devtools/opkg-utils/opkg-utils/0001-Only-use-sort-name-on-versions-of-tar-which-support-.patch
parent151094f603ad817a5106360d1f51656fbe271121 (diff)
downloadopenembedded-core-contrib-fd551c5ad4c82f295470f278c524d55562a67a28.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 Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/recipes-devtools/opkg-utils/opkg-utils/0001-Only-use-sort-name-on-versions-of-tar-which-support-.patch')
-rw-r--r--meta/recipes-devtools/opkg-utils/opkg-utils/0001-Only-use-sort-name-on-versions-of-tar-which-support-.patch52
1 files changed, 52 insertions, 0 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 @@
+From ef5db062b7d25e6070acc6922ea48f50491313b5 Mon Sep 17 00:00:00 2001
+From: Michael Hansen <michael.j.hansen@hp.com>
+Date: Mon, 26 Feb 2018 09:42:56 -0800
+Subject: [PATCH 1/2] Only use --sort=name on versions of tar which support it.
+ This fixes compatibility with bsdtar and old versions of GNU tar (e.g.
+ RHEL6).
+
+Signed-off-by: Michael Hansen <michael.j.hansen@hp.com>
+Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
+---
+ opkg-build | 11 ++++++++---
+ 1 file changed, 8 insertions(+), 3 deletions(-)
+
+diff --git a/opkg-build b/opkg-build
+index 265906f..094d69f 100755
+--- a/opkg-build
++++ b/opkg-build
+@@ -232,6 +232,11 @@ if [ $compressor = "gzip" ] ; then
+ compressorargs=$zipargs
+ fi
+
++tsortargs=
++if tar --help 2>&1 | grep -- "--sort=" > /dev/null; then
++ tsortargs="--sort=name"
++fi
++
+ shift $(($OPTIND - 1))
+
+ # continue on to process additional arguments
+@@ -280,8 +285,8 @@ mkdir $tmp_dir
+ build_date="$(date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y-%m-%d)"
+
+ echo $CONTROL > $tmp_dir/tarX
+-( cd $pkg_dir && tar $ogargs --sort=name --mtime=$build_date -X $tmp_dir/tarX -c $tarformat . | $compressor $compressorargs > $tmp_dir/data.tar.$cext )
+-( cd $pkg_dir/$CONTROL && tar $ogargs --sort=name --mtime=$build_date -c $tarformat . | gzip $zipargs > $tmp_dir/control.tar.gz )
++( cd $pkg_dir && tar $ogargs $tsortargs --mtime=$build_date -X $tmp_dir/tarX -c $tarformat . | $compressor $compressorargs > $tmp_dir/data.tar.$cext )
++( cd $pkg_dir/$CONTROL && tar $ogargs $tsortargs --mtime=$build_date -c $tarformat . | gzip $zipargs > $tmp_dir/control.tar.gz )
+ rm $tmp_dir/tarX
+
+ echo "2.0" > $tmp_dir/debian-binary
+@@ -296,7 +301,7 @@ rm -f $pkg_file
+ if [ "$outer" = "ar" ] ; then
+ ( cd $tmp_dir && ar -crfD $pkg_file ./debian-binary ./control.tar.gz ./data.tar.$cext )
+ else
+- ( cd $tmp_dir && tar -c --sort=name --mtime=$build_date $tarformat ./debian-binary ./control.tar.gz ./data.tar.$cext | gzip $zipargs > $pkg_file )
++ ( cd $tmp_dir && tar -c $tsortargs --mtime=$build_date $tarformat ./debian-binary ./control.tar.gz ./data.tar.$cext | gzip $zipargs > $pkg_file )
+ fi
+
+ rm $tmp_dir/debian-binary $tmp_dir/data.tar.$cext $tmp_dir/control.tar.gz
+--
+2.16.1
+