All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] opkg & opkg-utils upgrade to 0.3.6
@ 2018-02-22 19:57 Alejandro del Castillo
  2018-02-22 19:57 ` [PATCH 1/2] opkg: upgrade to version 0.3.6 Alejandro del Castillo
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Alejandro del Castillo @ 2018-02-22 19:57 UTC (permalink / raw)
  To: openembedded-core

Alejandro del Castillo (2):
  opkg: upgrade to version 0.3.6
  opkg-utils: upgrade to version 0.3.6

 .../recipes-devtools/opkg-utils/opkg-utils/tar_ignore_error.patch | 8 ++++----
 .../opkg-utils/{opkg-utils_0.3.5.bb => opkg-utils_0.3.6.bb}       | 4 ++--
 meta/recipes-devtools/opkg/{opkg_0.3.5.bb => opkg_0.3.6.bb}       | 4 ++--
 3 files changed, 8 insertions(+), 8 deletions(-)
 rename meta/recipes-devtools/opkg-utils/{opkg-utils_0.3.5.bb => opkg-utils_0.3.6.bb} (94%)
 rename meta/recipes-devtools/opkg/{opkg_0.3.5.bb => opkg_0.3.6.bb} (95%)

-- 
2.16.1



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/2] opkg: upgrade to version 0.3.6
  2018-02-22 19:57 [PATCH 0/2] opkg & opkg-utils upgrade to 0.3.6 Alejandro del Castillo
@ 2018-02-22 19:57 ` Alejandro del Castillo
  2018-02-22 19:57 ` [PATCH 2/2] opkg-utils: " Alejandro del Castillo
  2018-02-28 21:05 ` ✗ patchtest: failure for opkg & opkg-utils upgrade to 0.3.6 (rev2) Patchwork
  2 siblings, 0 replies; 6+ messages in thread
From: Alejandro del Castillo @ 2018-02-22 19:57 UTC (permalink / raw)
  To: openembedded-core

0.3.5 -> 0.3.6

Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
---
 meta/recipes-devtools/opkg/{opkg_0.3.5.bb => opkg_0.3.6.bb} | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 rename meta/recipes-devtools/opkg/{opkg_0.3.5.bb => opkg_0.3.6.bb} (95%)

diff --git a/meta/recipes-devtools/opkg/opkg_0.3.5.bb b/meta/recipes-devtools/opkg/opkg_0.3.6.bb
similarity index 95%
rename from meta/recipes-devtools/opkg/opkg_0.3.5.bb
rename to meta/recipes-devtools/opkg/opkg_0.3.6.bb
index 3e511b6bb6..70f20af739 100644
--- a/meta/recipes-devtools/opkg/opkg_0.3.5.bb
+++ b/meta/recipes-devtools/opkg/opkg_0.3.6.bb
@@ -17,8 +17,8 @@ SRC_URI = "http://downloads.yoctoproject.org/releases/${BPN}/${BPN}-${PV}.tar.gz
            file://0001-opkg_conf-create-opkg.lock-in-run-instead-of-var-run.patch \
 "
 
-SRC_URI[md5sum] = "d202d09ea0932943071b842626cab13c"
-SRC_URI[sha256sum] = "734bc21dea11262113fa86b928d09812618b3966f352350cf916a6ae0d343f32"
+SRC_URI[md5sum] = "79e04307f6f54db431c251772d7d987c"
+SRC_URI[sha256sum] = "f607f0e61be8cf8a3bbd0d2dccd9ec9e9b6c21dd4307b671c600d6eeaf84d30b"
 
 inherit autotools pkgconfig systemd
 
-- 
2.16.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] opkg-utils: upgrade to version 0.3.6
  2018-02-22 19:57 [PATCH 0/2] opkg & opkg-utils upgrade to 0.3.6 Alejandro del Castillo
  2018-02-22 19:57 ` [PATCH 1/2] opkg: upgrade to version 0.3.6 Alejandro del Castillo
@ 2018-02-22 19:57 ` Alejandro del Castillo
  2018-02-28 20:36   ` [PATCH v2] " Alejandro del Castillo
  2018-03-01  0:03   ` [PATCH v3] " Alejandro del Castillo
  2018-02-28 21:05 ` ✗ patchtest: failure for opkg & opkg-utils upgrade to 0.3.6 (rev2) Patchwork
  2 siblings, 2 replies; 6+ messages in thread
From: Alejandro del Castillo @ 2018-02-22 19:57 UTC (permalink / raw)
  To: openembedded-core

0.3.5 -> 0.3.6

Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
---
 .../recipes-devtools/opkg-utils/opkg-utils/tar_ignore_error.patch | 8 ++++----
 .../opkg-utils/{opkg-utils_0.3.5.bb => opkg-utils_0.3.6.bb}       | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)
 rename meta/recipes-devtools/opkg-utils/{opkg-utils_0.3.5.bb => opkg-utils_0.3.6.bb} (94%)

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..99c0883e17 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
@@ -25,19 +25,19 @@ Index: git/opkg-build
  mkdir $tmp_dir
  
  echo $CONTROL > $tmp_dir/tarX
--( cd $pkg_dir && tar $ogargs -X $tmp_dir/tarX -c --$compressor $tarformat -f $tmp_dir/data.tar.$cext . )
--( cd $pkg_dir/$CONTROL && tar $ogargs -cz $tarformat -f $tmp_dir/control.tar.gz . )
+-( 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 )
 +
 +
 +# Ignore error code 1, caused by modifying the number of hard links while creating the tar file
 +rc=0
-+( cd $pkg_dir && tar $ogargs -X $tmp_dir/tarX -c --$compressor $tarformat -f $tmp_dir/data.tar.$cext . ) || rc=$?
++( cd $pkg_dir && tar $ogargs --sort=name --mtime=$build_date -X $tmp_dir/tarX -c $tarformat . | $compressor $compressorargs > $tmp_dir/data.tar.$cext ) || rc=$?
 +if [ $rc -ne 1 ] && [ $rc -ne 0 ]; then
 +        exit $rc 
 +fi
 +
 +rc=0
-+( cd $pkg_dir/$CONTROL && tar $ogargs -cz $tarformat -f $tmp_dir/control.tar.gz . ) || rc=$?
++( cd $pkg_dir/$CONTROL && tar $ogargs --sort=name --mtime=$build_date -c $tarformat . | gzip $zipargs > $tmp_dir/control.tar.gz ) || rc=$?
 +if [ $rc -ne 1 ] && [ $rc -ne 0 ]; then
 +        exit $rc
 +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
similarity index 94%
rename from meta/recipes-devtools/opkg-utils/opkg-utils_0.3.5.bb
rename to meta/recipes-devtools/opkg-utils/opkg-utils_0.3.6.bb
index e9ba9de094..0c21142b6d 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
@@ -14,8 +14,8 @@ SRC_URI_append_class-native = " file://tar_ignore_error.patch"
 UPSTREAM_CHECK_URI = "http://git.yoctoproject.org/cgit/cgit.cgi/opkg-utils/refs/"
 
 
-SRC_URI[md5sum] = "a19e09c79bf1152aac62e8a120d679ff"
-SRC_URI[sha256sum] = "7f4b08912e26a3f4f6f423f3b4e7157a73b1f3a7483fc59b216d1a80b50b0c38"
+SRC_URI[md5sum] = "391c1c80aca26961375dd22e1d2d0cbf"
+SRC_URI[sha256sum] = "26b3f4dd1c1ef65f519d4cddfb35ebea41ae8af989aea2699a39783598c33769"
 
 TARGET_CC_ARCH += "${LDFLAGS}"
 
-- 
2.16.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v2] opkg-utils: upgrade to version 0.3.6
  2018-02-22 19:57 ` [PATCH 2/2] opkg-utils: " Alejandro del Castillo
@ 2018-02-28 20:36   ` Alejandro del Castillo
  2018-03-01  0:03   ` [PATCH v3] " Alejandro del Castillo
  1 sibling, 0 replies; 6+ messages in thread
From: Alejandro del Castillo @ 2018-02-28 20:36 UTC (permalink / raw)
  To: openembedded-core

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>
---

Changes since V1:
 - Add patch to support versions of tar that don't support --sort
 - Add patch to correctly set the modification time on the payload

 ...rt-name-on-versions-of-tar-which-support-.patch | 52 ++++++++++++++++++++++
 ...Use-local-time-for-build_date-since-opkg-.patch | 45 +++++++++++++++++++
 .../opkg-utils/opkg-utils/tar_ignore_error.patch   | 13 +++---
 .../{opkg-utils_0.3.5.bb => opkg-utils_0.3.6.bb}   |  6 ++-
 4 files changed, 108 insertions(+), 8 deletions(-)
 create mode 100644 meta/recipes-devtools/opkg-utils/opkg-utils/0001-Only-use-sort-name-on-versions-of-tar-which-support-.patch
 create mode 100644 meta/recipes-devtools/opkg-utils/opkg-utils/0002-opkg-build-Use-local-time-for-build_date-since-opkg-.patch
 rename meta/recipes-devtools/opkg-utils/{opkg-utils_0.3.5.bb => opkg-utils_0.3.6.bb} (88%)

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
+
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 @@
+From 5727826b51cf99feaff3483a9df8af2043e7efc1 Mon Sep 17 00:00:00 2001
+From: Michael Hansen <michael.j.hansen@hp.com>
+Date: Mon, 26 Feb 2018 10:17:01 -0800
+Subject: [PATCH 2/2] opkg-build: Use local time for build_date, since opkg
+ extracts files assuming local time rather than UTC. Also increase resolution
+ of build date down to the second, rather than clamping to midnight of the
+ current date.
+
+Signed-off-by: Michael Hansen <michael.j.hansen@hp.com>
+Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
+---
+ opkg-build | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/opkg-build b/opkg-build
+index 094d69f..0050c2b 100755
+--- a/opkg-build
++++ b/opkg-build
+@@ -282,11 +282,11 @@ fi
+ tmp_dir=$dest_dir/IPKG_BUILD.$$
+ mkdir $tmp_dir
+ 
+-build_date="$(date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y-%m-%d)"
++build_date="$(date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" "+%Y-%m-%d %H:%M:%S")"
+ 
+ echo $CONTROL > $tmp_dir/tarX
+-( 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 )
++( 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
+@@ -301,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 $tsortargs --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
+
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>
 
 
 Index: git/opkg-build
+
 ===================================================================
 --- git.orig/opkg-build
 +++ git/opkg-build
-@@ -250,8 +250,21 @@ tmp_dir=$dest_dir/IPKG_BUILD.$$
- mkdir $tmp_dir
+@@ -285,8 +285,21 @@ mkdir $tmp_dir
+ build_date="$(date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" "+%Y-%m-%d %H:%M:%S")"
  
  echo $CONTROL > $tmp_dir/tarX
--( cd $pkg_dir && tar $ogargs -X $tmp_dir/tarX -c --$compressor $tarformat -f $tmp_dir/data.tar.$cext . )
--( cd $pkg_dir/$CONTROL && tar $ogargs -cz $tarformat -f $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 )
 +
 +
 +# Ignore error code 1, caused by modifying the number of hard links while creating the tar file
 +rc=0
-+( cd $pkg_dir && tar $ogargs -X $tmp_dir/tarX -c --$compressor $tarformat -f $tmp_dir/data.tar.$cext . ) || rc=$?
++( cd $pkg_dir && tar $ogargs $tsortargs --mtime="$build_date" -X $tmp_dir/tarX -c $tarformat . | $compressor $compressorargs > $tmp_dir/data.tar.$cext ) || rc=$?
 +if [ $rc -ne 1 ] && [ $rc -ne 0 ]; then
 +        exit $rc 
 +fi
 +
 +rc=0
-+( cd $pkg_dir/$CONTROL && tar $ogargs -cz $tarformat -f $tmp_dir/control.tar.gz . ) || rc=$?
++( cd $pkg_dir/$CONTROL && tar $ogargs $tsortargs --mtime="$build_date" -c $tarformat . | gzip $zipargs > $tmp_dir/control.tar.gz ) || rc=$?
 +if [ $rc -ne 1 ] && [ $rc -ne 0 ]; then
 +        exit $rc
 +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
similarity index 88%
rename from meta/recipes-devtools/opkg-utils/opkg-utils_0.3.5.bb
rename to 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
 
 SRC_URI = "http://git.yoctoproject.org/cgit/cgit.cgi/${BPN}/snapshot/${BPN}-${PV}.tar.gz \
            file://0001-Switch-all-scripts-to-use-Python-3.x.patch \
+           file://0001-Only-use-sort-name-on-versions-of-tar-which-support-.patch \
+           file://0002-opkg-build-Use-local-time-for-build_date-since-opkg-.patch \
 "
 SRC_URI_append_class-native = " file://tar_ignore_error.patch"
 UPSTREAM_CHECK_URI = "http://git.yoctoproject.org/cgit/cgit.cgi/opkg-utils/refs/"
 
 
-SRC_URI[md5sum] = "a19e09c79bf1152aac62e8a120d679ff"
-SRC_URI[sha256sum] = "7f4b08912e26a3f4f6f423f3b4e7157a73b1f3a7483fc59b216d1a80b50b0c38"
+SRC_URI[md5sum] = "391c1c80aca26961375dd22e1d2d0cbf"
+SRC_URI[sha256sum] = "26b3f4dd1c1ef65f519d4cddfb35ebea41ae8af989aea2699a39783598c33769"
 
 TARGET_CC_ARCH += "${LDFLAGS}"
 
-- 
2.16.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* ✗ patchtest: failure for opkg & opkg-utils upgrade to 0.3.6 (rev2)
  2018-02-22 19:57 [PATCH 0/2] opkg & opkg-utils upgrade to 0.3.6 Alejandro del Castillo
  2018-02-22 19:57 ` [PATCH 1/2] opkg: upgrade to version 0.3.6 Alejandro del Castillo
  2018-02-22 19:57 ` [PATCH 2/2] opkg-utils: " Alejandro del Castillo
@ 2018-02-28 21:05 ` Patchwork
  2 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2018-02-28 21:05 UTC (permalink / raw)
  To: Alejandro del Castillo; +Cc: openembedded-core

== Series Details ==

Series: opkg & opkg-utils upgrade to 0.3.6 (rev2)
Revision: 2
URL   : https://patchwork.openembedded.org/series/11058/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Issue             Added patch file is missing Upstream-Status in the header [test_upstream_status_presence_format] 
  Suggested fix    Add Upstream-Status: <Valid status> to the header of meta/recipes-devtools/opkg-utils/opkg-utils/0001-Only-use-sort-name-on-versions-of-tar-which-support-.patch
  Standard format  Upstream-Status: <Valid status>
  Valid status     Pending, Accepted, Backport, Denied, Inappropriate [reason], Submitted [where]



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Guidelines:     https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v3] opkg-utils: upgrade to version 0.3.6
  2018-02-22 19:57 ` [PATCH 2/2] opkg-utils: " Alejandro del Castillo
  2018-02-28 20:36   ` [PATCH v2] " Alejandro del Castillo
@ 2018-03-01  0:03   ` Alejandro del Castillo
  1 sibling, 0 replies; 6+ messages in thread
From: Alejandro del Castillo @ 2018-03-01  0:03 UTC (permalink / raw)
  To: openembedded-core

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>
---
 ...rt-name-on-versions-of-tar-which-support-.patch | 54 ++++++++++++++++++++++
 ...Use-local-time-for-build_date-since-opkg-.patch | 47 +++++++++++++++++++
 .../opkg-utils/opkg-utils/tar_ignore_error.patch   | 13 +++---
 .../{opkg-utils_0.3.5.bb => opkg-utils_0.3.6.bb}   |  6 ++-
 4 files changed, 112 insertions(+), 8 deletions(-)
 create mode 100644 meta/recipes-devtools/opkg-utils/opkg-utils/0001-Only-use-sort-name-on-versions-of-tar-which-support-.patch
 create mode 100644 meta/recipes-devtools/opkg-utils/opkg-utils/0002-opkg-build-Use-local-time-for-build_date-since-opkg-.patch
 rename meta/recipes-devtools/opkg-utils/{opkg-utils_0.3.5.bb => opkg-utils_0.3.6.bb} (88%)

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..4fbaa26d18
--- /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,54 @@
+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).
+
+Upstream-Status: Backport
+
+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
+
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..cfb9a77fb4
--- /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,47 @@
+From 5727826b51cf99feaff3483a9df8af2043e7efc1 Mon Sep 17 00:00:00 2001
+From: Michael Hansen <michael.j.hansen@hp.com>
+Date: Mon, 26 Feb 2018 10:17:01 -0800
+Subject: [PATCH 2/2] opkg-build: Use local time for build_date, since opkg
+ extracts files assuming local time rather than UTC. Also increase resolution
+ of build date down to the second, rather than clamping to midnight of the
+ current date.
+
+Upstream-Status: Backport
+
+Signed-off-by: Michael Hansen <michael.j.hansen@hp.com>
+Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com>
+---
+ opkg-build | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/opkg-build b/opkg-build
+index 094d69f..0050c2b 100755
+--- a/opkg-build
++++ b/opkg-build
+@@ -282,11 +282,11 @@ fi
+ tmp_dir=$dest_dir/IPKG_BUILD.$$
+ mkdir $tmp_dir
+ 
+-build_date="$(date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y-%m-%d)"
++build_date="$(date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" "+%Y-%m-%d %H:%M:%S")"
+ 
+ echo $CONTROL > $tmp_dir/tarX
+-( 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 )
++( 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
+@@ -301,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 $tsortargs --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
+
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>
 
 
 Index: git/opkg-build
+
 ===================================================================
 --- git.orig/opkg-build
 +++ git/opkg-build
-@@ -250,8 +250,21 @@ tmp_dir=$dest_dir/IPKG_BUILD.$$
- mkdir $tmp_dir
+@@ -285,8 +285,21 @@ mkdir $tmp_dir
+ build_date="$(date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" "+%Y-%m-%d %H:%M:%S")"
  
  echo $CONTROL > $tmp_dir/tarX
--( cd $pkg_dir && tar $ogargs -X $tmp_dir/tarX -c --$compressor $tarformat -f $tmp_dir/data.tar.$cext . )
--( cd $pkg_dir/$CONTROL && tar $ogargs -cz $tarformat -f $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 )
 +
 +
 +# Ignore error code 1, caused by modifying the number of hard links while creating the tar file
 +rc=0
-+( cd $pkg_dir && tar $ogargs -X $tmp_dir/tarX -c --$compressor $tarformat -f $tmp_dir/data.tar.$cext . ) || rc=$?
++( cd $pkg_dir && tar $ogargs $tsortargs --mtime="$build_date" -X $tmp_dir/tarX -c $tarformat . | $compressor $compressorargs > $tmp_dir/data.tar.$cext ) || rc=$?
 +if [ $rc -ne 1 ] && [ $rc -ne 0 ]; then
 +        exit $rc 
 +fi
 +
 +rc=0
-+( cd $pkg_dir/$CONTROL && tar $ogargs -cz $tarformat -f $tmp_dir/control.tar.gz . ) || rc=$?
++( cd $pkg_dir/$CONTROL && tar $ogargs $tsortargs --mtime="$build_date" -c $tarformat . | gzip $zipargs > $tmp_dir/control.tar.gz ) || rc=$?
 +if [ $rc -ne 1 ] && [ $rc -ne 0 ]; then
 +        exit $rc
 +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
similarity index 88%
rename from meta/recipes-devtools/opkg-utils/opkg-utils_0.3.5.bb
rename to 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
 
 SRC_URI = "http://git.yoctoproject.org/cgit/cgit.cgi/${BPN}/snapshot/${BPN}-${PV}.tar.gz \
            file://0001-Switch-all-scripts-to-use-Python-3.x.patch \
+           file://0001-Only-use-sort-name-on-versions-of-tar-which-support-.patch \
+           file://0002-opkg-build-Use-local-time-for-build_date-since-opkg-.patch \
 "
 SRC_URI_append_class-native = " file://tar_ignore_error.patch"
 UPSTREAM_CHECK_URI = "http://git.yoctoproject.org/cgit/cgit.cgi/opkg-utils/refs/"
 
 
-SRC_URI[md5sum] = "a19e09c79bf1152aac62e8a120d679ff"
-SRC_URI[sha256sum] = "7f4b08912e26a3f4f6f423f3b4e7157a73b1f3a7483fc59b216d1a80b50b0c38"
+SRC_URI[md5sum] = "391c1c80aca26961375dd22e1d2d0cbf"
+SRC_URI[sha256sum] = "26b3f4dd1c1ef65f519d4cddfb35ebea41ae8af989aea2699a39783598c33769"
 
 TARGET_CC_ARCH += "${LDFLAGS}"
 
-- 
2.16.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-03-01  0:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-22 19:57 [PATCH 0/2] opkg & opkg-utils upgrade to 0.3.6 Alejandro del Castillo
2018-02-22 19:57 ` [PATCH 1/2] opkg: upgrade to version 0.3.6 Alejandro del Castillo
2018-02-22 19:57 ` [PATCH 2/2] opkg-utils: " Alejandro del Castillo
2018-02-28 20:36   ` [PATCH v2] " Alejandro del Castillo
2018-03-01  0:03   ` [PATCH v3] " Alejandro del Castillo
2018-02-28 21:05 ` ✗ patchtest: failure for opkg & opkg-utils upgrade to 0.3.6 (rev2) Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.