opkg & opkg-utils upgrade to 0.4.0
cover opkg & opkg-utils upgrade to 0.4.0
Alejandro del Castillo (3):
opkg: upgrade to version 0.4.0
opkg-utils: upgrade to version 0.4.0
package_ip.bbclass: add xz threading
meta/classes/package_ipk.bbclass | 2 +-
...me-on-versions-of-tar-which-support-.patch | 51 -----------------
...Switch-all-scripts-to-use-Python-3.x.patch | 5 +-
...rnatives-Fix-link-relocation-support.patch | 40 -------------
...ocal-time-for-build_date-since-opkg-.patch | 44 ---------------
.../opkg-utils/opkg-utils/pigz.patch | 51 -----------------
.../opkg-utils/tar_ignore_error.patch | 48 ----------------
.../opkg-utils/opkg-utils/threaded-xz.patch | 18 ------
...pkg-utils_0.3.6.bb => opkg-utils_0.4.0.bb} | 10 +---
...intainer_scripts-use-strict-matching.patch | 56 -------------------
.../opkg/{opkg_0.3.6.bb => opkg_0.4.0.bb} | 5 +-
11 files changed, 8 insertions(+), 322 deletions(-)
delete mode 100644 meta/recipes-devtools/opkg-utils/opkg-utils/0001-Only-use-sort-name-on-versions-of-tar-which-support-.patch
delete mode 100644 meta/recipes-devtools/opkg-utils/opkg-utils/0001-update-alternatives-Fix-link-relocation-support.patch
delete mode 100644 meta/recipes-devtools/opkg-utils/opkg-utils/0002-opkg-build-Use-local-time-for-build_date-since-opkg-.patch
delete mode 100644 meta/recipes-devtools/opkg-utils/opkg-utils/pigz.patch
delete mode 100644 meta/recipes-devtools/opkg-utils/opkg-utils/tar_ignore_error.patch
delete mode 100644 meta/recipes-devtools/opkg-utils/opkg-utils/threaded-xz.patch
rename meta/recipes-devtools/opkg-utils/{opkg-utils_0.3.6.bb => opkg-utils_0.4.0.bb} (82%)
delete mode 100644 meta/recipes-devtools/opkg/opkg/0001-remove_maintainer_scripts-use-strict-matching.patch
rename meta/recipes-devtools/opkg/{opkg_0.3.6.bb => opkg_0.4.0.bb} (90%)Signature · 1 line
2.20.1
PATCH 1/3 opkg: upgrade to version 0.4.0
- Drop 0001-remove_maintainer_scripts-use-strict-matching.patch
---
...intainer_scripts-use-strict-matching.patch | 56 -------------------
.../opkg/{opkg_0.3.6.bb => opkg_0.4.0.bb} | 5 +-
2 files changed, 2 insertions(+), 59 deletions(-)
delete mode 100644 meta/recipes-devtools/opkg/opkg/0001-remove_maintainer_scripts-use-strict-matching.patch
rename meta/recipes-devtools/opkg/{opkg_0.3.6.bb => opkg_0.4.0.bb} (90%)meta/recipes-devtools/opkg/opkg/0001-remove_maintainer_scripts-use-strict-matching.patch deleted +0 -56
@@ -1,56 +0,0 @@ -From 55c4ad666e76281bdd0db55fa6f4ab2744fea7e4 Mon Sep 17 00:00:00 2001 -From: Alejandro del Castillo <[email protected]> -Date: Tue, 4 Sep 2018 18:06:00 -0500 -Subject: [PATCH] remove_maintainer_scripts: use strict matching - -The function is using a glob to select which metadata files needs to be -deleted during package removal, on the info_dir. However, the glob may -match metadata files from packages with similar names. For example, -during removal of package glibc-binary-localedata-de-at, the current -logic was also removing the metadata for -glibc-binary-localedata-de-at.iso-8859-1. Add check for an exact match -before deletion. - -Fixes bugzilla: 12905 - -Upstream-Status: Submitted [https://groups.google.com/forum/#!topic/opkg-devel/Fr40Yt0NBno] -Signed-off-by: Alejandro del Castillo <[email protected]> ---- - libopkg/opkg_remove.c | 14 +++++++++++--- - 1 file changed, 11 insertions(+), 3 deletions(-) - -diff --git a/libopkg/opkg_remove.c b/libopkg/opkg_remove.c -index 82125fa..3936628 100644 ---- a/libopkg/opkg_remove.c -+++ b/libopkg/opkg_remove.c -@@ -137,7 +137,7 @@ void remove_maintainer_scripts(pkg_t * pkg) - { - unsigned int i; - int err; -- char *globpattern; -+ char *globpattern, *filename, *lastdot; - glob_t globbuf; - - if (opkg_config->noaction) -@@ -151,8 +151,16 @@ void remove_maintainer_scripts(pkg_t * pkg) - return; - - for (i = 0; i < globbuf.gl_pathc; i++) { -- opkg_msg(INFO, "Deleting %s.\n", globbuf.gl_pathv[i]); -- unlink(globbuf.gl_pathv[i]); -+ filename = xstrdup(basename(globbuf.gl_pathv[i])); -+ lastdot = strrchr(filename, '.'); -+ *lastdot = '\0'; -+ // Only delete files that match the package name (the glob may match files -+ // with similar names) -+ if (!strcmp(filename, pkg->name)) { -+ opkg_msg(INFO, "Deleting %s.\n", globbuf.gl_pathv[i]); -+ unlink(globbuf.gl_pathv[i]); -+ } -+ free(filename); - } - globfree(&globbuf); - } --- -2.18.0 -
meta/recipes-devtools/opkg/opkg_0.4.0.bb renamed from meta/recipes-devtools/opkg/opkg_0.3.6.bb +2 -3
@@ -14,11 +14,10 @@ PE = "1" SRC_URI = "http://downloads.yoctoproject.org/releases/${BPN}/${BPN}-${PV}.tar.gz \ file://opkg.conf \ file://0001-opkg_conf-create-opkg.lock-in-run-instead-of-var-run.patch \ - file://0001-remove_maintainer_scripts-use-strict-matching.patch \ " -SRC_URI[md5sum] = "79e04307f6f54db431c251772d7d987c" -SRC_URI[sha256sum] = "f607f0e61be8cf8a3bbd0d2dccd9ec9e9b6c21dd4307b671c600d6eeaf84d30b" +SRC_URI[md5sum] = "ae51d95fee599bb4dce08453529158f5" +SRC_URI[sha256sum] = "f6c00515d8a2ad8f6742a8e73830315d1983ed0459cba77c4d656cfc9e7fe6fe" inherit autotools pkgconfig systemd
Signature · 1 line
2.20.1
PATCH 2/3 opkg-utils: upgrade to version 0.4.0
In reply to Alejandro del CastilloDrop patches already merged upstream.
---
...me-on-versions-of-tar-which-support-.patch | 51 -------------------
...Switch-all-scripts-to-use-Python-3.x.patch | 5 +-
...rnatives-Fix-link-relocation-support.patch | 40 ---------------
...ocal-time-for-build_date-since-opkg-.patch | 44 ----------------
.../opkg-utils/opkg-utils/pigz.patch | 51 -------------------
.../opkg-utils/tar_ignore_error.patch | 48 -----------------
.../opkg-utils/opkg-utils/threaded-xz.patch | 18 -------
...pkg-utils_0.3.6.bb => opkg-utils_0.4.0.bb} | 10 +---
8 files changed, 5 insertions(+), 262 deletions(-)
delete mode 100644 meta/recipes-devtools/opkg-utils/opkg-utils/0001-Only-use-sort-name-on-versions-of-tar-which-support-.patch
delete mode 100644 meta/recipes-devtools/opkg-utils/opkg-utils/0001-update-alternatives-Fix-link-relocation-support.patch
delete mode 100644 meta/recipes-devtools/opkg-utils/opkg-utils/0002-opkg-build-Use-local-time-for-build_date-since-opkg-.patch
delete mode 100644 meta/recipes-devtools/opkg-utils/opkg-utils/pigz.patch
delete mode 100644 meta/recipes-devtools/opkg-utils/opkg-utils/tar_ignore_error.patch
delete mode 100644 meta/recipes-devtools/opkg-utils/opkg-utils/threaded-xz.patch
rename meta/recipes-devtools/opkg-utils/{opkg-utils_0.3.6.bb => opkg-utils_0.4.0.bb} (82%)meta/recipes-devtools/opkg-utils/opkg-utils/0001-Only-use-sort-name-on-versions-of-tar-which-support-.patch deleted +0 -51
@@ -1,51 +0,0 @@ -From ef5db062b7d25e6070acc6922ea48f50491313b5 Mon Sep 17 00:00:00 2001 -From: Michael Hansen <[email protected]> -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 <[email protected]> -Signed-off-by: Alejandro del Castillo <[email protected]> -Upstream-Status: Backport - ---- - opkg-build | 11 ++++++++--- - 1 file changed, 8 insertions(+), 3 deletions(-) - -Index: opkg-utils-0.3.6/opkg-build -=================================================================== ---- opkg-utils-0.3.6.orig/opkg-build -+++ opkg-utils-0.3.6/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 -crf $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
meta/recipes-devtools/opkg-utils/opkg-utils/0001-Switch-all-scripts-to-use-Python-3.x.patch +3 -2
@@ -64,8 +64,9 @@ index 3f757f6..2988f9f 100755 @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 - from __future__ import absolute_import - from __future__ import print_function + """ + Utility to create opkg compatible indexes + """ diff --git a/opkg-show-deps b/opkg-show-deps index 153f21e..4e18b4f 100755
meta/recipes-devtools/opkg-utils/opkg-utils/0001-update-alternatives-Fix-link-relocation-support.patch deleted +0 -40
@@ -1,40 +0,0 @@ -From 18562ccae6996431d37767653b061d4e9e1b9424 Mon Sep 17 00:00:00 2001 -From: Niko Mauno <[email protected]> -Date: Sun, 11 Nov 2018 15:50:22 +0200 -Subject: [opkg-utils PATCH] update-alternatives: Fix link relocation support - -Commit fcb26339000021eb9bb711aa264247aebcfdd4ae which added Debian-style -support for link relocation tries to relocate symbolic link on host OS, -resulting in following-like error when two alternative packages have -symbolic link source located in different directories (/bin/rev -> -/bin/busybox.nosuid and /usr/bin/rev -> /usr/bin/rev.util-linux): - - update-alternatives: renaming rev link from /bin/rev to /usr/bin/rev - mv: cannot stat '/bin/rev': No such file or directory - -Fix the issue by prefixing 'olink' and 'link' variable references with -path to targeted root filesystem's root directory. - -Upstream-Status: Submitted [opkg-utils] - -Signed-off-by: Niko Mauno <[email protected]> ---- - update-alternatives | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/update-alternatives b/update-alternatives -index 89a440b..d4fa7eb 100644 ---- a/update-alternatives -+++ b/update-alternatives -@@ -58,7 +58,7 @@ register_alt() { - local link_str=`echo $link | protect_slashes` - sed -e "1s/.*/$link_str/" $ad/$name > $ad/$name.new - mv $ad/$name.new $ad/$name -- mv $olink $link -+ mv $OPKG_OFFLINE_ROOT$olink $OPKG_OFFLINE_ROOT$link - fi - else - echo "$link" > "$ad/$name" --- -2.19.1 -
meta/recipes-devtools/opkg-utils/opkg-utils/0002-opkg-build-Use-local-time-for-build_date-since-opkg-.patch deleted +0 -44
44 lines not on this page · raw message
meta/recipes-devtools/opkg-utils/opkg-utils/pigz.patch deleted +0 -51
51 lines not on this page · raw message
meta/recipes-devtools/opkg-utils/opkg-utils/tar_ignore_error.patch deleted +0 -48
48 lines not on this page · raw message
meta/recipes-devtools/opkg-utils/opkg-utils/threaded-xz.patch deleted +0 -18
@@ -1,18 +0,0 @@ -Pass --threads=0 to xz so that it will use as many threads as there are cores to compress the packages. This makes qemu's do_package_ipk run in 34s instead of 275s on my machine. - -Upstream-Status: Inappropriate (ugly but works, discussing with upstream now) -Signed-off-by: Ross Burton <[email protected]> - -diff --git a/opkg-build b/opkg-build -index 0050c2b..93a7956 100755 ---- a/opkg-build -+++ b/opkg-build -@@ -230,6 +230,8 @@ if gzip --help 2>&1 | grep -- "-T" > /dev/null; then - fi - if [ $compressor = "gzip" ] ; then - compressorargs=$zipargs -+elif [ $compressor = "xz" ] ; then -+ compressorargs="--threads 0" - fi - - tsortargs=
meta/recipes-devtools/opkg-utils/opkg-utils_0.4.0.bb renamed from meta/recipes-devtools/opkg-utils/opkg-utils_0.3.6.bb +2 -8
@@ -9,18 +9,12 @@ 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 \ - file://threaded-xz.patch \ - file://pigz.patch \ - file://0001-update-alternatives-Fix-link-relocation-support.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] = "391c1c80aca26961375dd22e1d2d0cbf" -SRC_URI[sha256sum] = "26b3f4dd1c1ef65f519d4cddfb35ebea41ae8af989aea2699a39783598c33769" +SRC_URI[md5sum] = "6e1c2eae96239520a8eb3d05372773ea" +SRC_URI[sha256sum] = "8153f4e5dadde422d35feaf86bf595266af9d0037389bc418fa87feb0437efb3" TARGET_CC_ARCH += "${LDFLAGS}"
Signature · 1 line
2.20.1
PATCH 3/3 package_ip.bbclass: add xz threading
In reply to Alejandro del CastilloBefore, threading was enabled via a patch to opkg-build. Now that opkg-build provides a hook for extra arguments, use that.
--- meta/classes/package_ipk.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/package_ipk.bbclass +1 -1
@@ -8,7 +8,7 @@ IPKGCONF_SDK = "${WORKDIR}/opkg-sdk.conf" PKGWRITEDIRIPK = "${WORKDIR}/deploy-ipks" # Program to be used to build opkg packages -OPKGBUILDCMD ??= "opkg-build -Z xz" +OPKGBUILDCMD ??= "opkg-build -Z xz -a "--threads 0"" OPKG_ARGS += "--force_postinstall --prefer-arch-to-version" OPKG_ARGS += "${@['', '--no-install-recommends'][d.getVar("NO_RECOMMENDATIONS") == "1"]}"
Signature · 1 line
2.20.1
Re: [PATCH 3/3] package_ip.bbclass: add xz threading
Quoted 14 lines · Alejandro del Castillo
Before, threading was enabled via a patch to opkg-build. Now that opkg-build provides a hook for extra arguments, use that.
Signed-off-by Alejandro del Castillo <[email protected]>--- meta/classes/package_ipk.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meta/classes/package_ipk.bbclass +0
-0
meta/classes/package_ipk.bbclass IPKGCONF_SDK = "${WORKDIR}/opkg-sdk.conf" · line 11
Quoted 5 lines
meta/classes/package_ipk.bbclass +1
-1@@ -8,7 +8,7 @@ IPKGCONF_SDK = "${WORKDIR}/opkg-sdk.conf" PKGWRITEDIRIPK = "${WORKDIR}/deploy-ipks" # Program to be used to build opkg packages -OPKGBUILDCMD ??= "opkg-build -Z xz" +OPKGBUILDCMD ??= "opkg-build -Z xz -a "--threads 0""
double strings look confusing, may be use single quotes here ?
Quoted 11 lines
meta/classes/package_ipk.bbclass +0
-1OPKG_ARGS += "--force_postinstall --prefer-arch-to-version" OPKG_ARGS += "${@['', '--no-install-recommends'][d.getVar("NO_RECOMMENDATIONS") == "1"]}" --2.20.1
--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
PATCH v2 3/3 package_ip.bbclass: add xz threading
Before, threading was enabled via a patch to opkg-build. Now that opkg-build provides a hook for extra arguments, use that.
--- meta/classes/package_ipk.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/package_ipk.bbclass +1 -1
@@ -8,7 +8,7 @@ IPKGCONF_SDK = "${WORKDIR}/opkg-sdk.conf" PKGWRITEDIRIPK = "${WORKDIR}/deploy-ipks" # Program to be used to build opkg packages -OPKGBUILDCMD ??= "opkg-build -Z xz" +OPKGBUILDCMD ??= "opkg-build -Z xz -a '--threads 0'" OPKG_ARGS += "--force_postinstall --prefer-arch-to-version" OPKG_ARGS += "${@['', '--no-install-recommends'][d.getVar("NO_RECOMMENDATIONS") == "1"]}"
Signature · 1 line
2.20.1
Re: [PATCH 3/3 v2] package_ip.bbclass: add xz threading
Quoted 14 lines · Alejandro del Castillo
Before, threading was enabled via a patch to opkg-build. Now that opkg-build provides a hook for extra arguments, use that.
Signed-off-by Alejandro del Castillo <[email protected]>--- meta/classes/package_ipk.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meta/classes/package_ipk.bbclass +0
-0
meta/classes/package_ipk.bbclass IPKGCONF_SDK = "${WORKDIR}/opkg-sdk.conf" · line 14
Quoted 8 lines
meta/classes/package_ipk.bbclass +1
-1@@ -8,7 +8,7 @@ IPKGCONF_SDK = "${WORKDIR}/opkg-sdk.conf" PKGWRITEDIRIPK = "${WORKDIR}/deploy-ipks" # Program to be used to build opkg packages -OPKGBUILDCMD ??= "opkg-build -Z xz" +OPKGBUILDCMD ??= "opkg-build -Z xz -a '--threads 0'" OPKG_ARGS += "--force_postinstall --prefer-arch-to-version" OPKG_ARGS += "${@['', '--no-install-recommends'][d.getVar("NO_RECOMMENDATIONS") == "1"]}"
thanks for addressing this.