]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
opkg: upgrade 0.8.0 -> 0.9.0
authorEtienne Cordonnier <ecordonnier@snap.com>
Thu, 23 Oct 2025 13:46:56 +0000 (15:46 +0200)
committerMathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Wed, 5 Nov 2025 12:05:41 +0000 (13:05 +0100)
See release notes at
- http://downloads.yoctoproject.org/releases/opkg/opkg-0.9.0.release-notes

[0.9.0] - 2025-06-27

Semiannual opkg release.
Bumping the minor version as a result of the project build tooling changing from autotools to cmake.

- Added a Dockerfile container definition (`:docker/`) for a valid developer build environment for opkg.
  - It's recommended that project contributors use this container to build and test their changes.
- The AutoTools-based build framework has [been replaced](https://git.yoctoproject.org/opkg/commit/?id=3f6040e321634471ec442fb0e80f140f1437e90b) with a more modern, CMake framework.
  - Refer to the `docs/CONTRIBUTING.md` documentation for updated build instructions.

Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
meta/recipes-devtools/opkg/opkg/0002-config.h.in-fix-typo.patch [new file with mode: 0644]
meta/recipes-devtools/opkg/opkg/run-ptest
meta/recipes-devtools/opkg/opkg_0.9.0.bb [moved from meta/recipes-devtools/opkg/opkg_0.8.0.bb with 76% similarity]

diff --git a/meta/recipes-devtools/opkg/opkg/0002-config.h.in-fix-typo.patch b/meta/recipes-devtools/opkg/opkg/0002-config.h.in-fix-typo.patch
new file mode 100644 (file)
index 0000000..626bbd0
--- /dev/null
@@ -0,0 +1,27 @@
+From 5a81faadbc2397d554bc598d535fd2d44cbc8d10 Mon Sep 17 00:00:00 2001
+From: Etienne Cordonnier <ecordonnier@snap.com>
+Date: Mon, 20 Oct 2025 18:57:56 +0200
+Subject: [PATCH] config.h.in: fix typo
+
+Upstream-Status: Backport [https://git.yoctoproject.org/opkg/commit/?id=d723a90bfe6409c7ad983ed911225d4aefbfd09e]
+Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>
+---
+ config.h.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/config.h.in b/config.h.in
+index 4fa9842..877b8c7 100644
+--- a/config.h.in
++++ b/config.h.in
+@@ -2,7 +2,7 @@
+ #cmakedefine01 WITH_XZ
+ #cmakedefine01 WITH_BZIP2
+ #cmakedefine01 WITH_LZ4
+-#cmakedefine01 WITH_LZSTD
++#cmakedefine01 WITH_ZSTD
+ #cmakedefine01 WITH_CURL
+ #cmakedefine01 WITH_SSLCURL
+ #cmakedefine01 WITH_ACL
+-- 
+2.43.0
+
index 5fb7077eec980d912314434fcbe2425f72104d26..d485a4aace57437f4985fd7092375ea1b886ef3f 100644 (file)
@@ -2,4 +2,4 @@
 
 OPKG_PATH=$(which opkg)
 
-make OPKG_PATH=$OPKG_PATH run-tests
+make -C tests DATADIR=/share SYSCONFDIR=/etc VARDIR=/var OPKG_PATH=$OPKG_PATH
similarity index 76%
rename from meta/recipes-devtools/opkg/opkg_0.8.0.bb
rename to meta/recipes-devtools/opkg/opkg_0.9.0.bb
index 12e2edf7e3f145514e148750d6105a6c40ccc12f..ed2f36d636b30180184e430741eb2b7c856f0404 100644 (file)
@@ -15,34 +15,35 @@ 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://0002-config.h.in-fix-typo.patch \
            file://run-ptest \
            "
 
-SRC_URI[sha256sum] = "582a4c9e220cce0b7d08a0915c95db9f24ae43ad372ed5d42d5ec5f6cd413f0c"
+SRC_URI[sha256sum] = "440ef321862e01f83da4d02884a0cbb4d9d7b32f82faa81a6a85493f0c89d0f5"
 
 # This needs to be before ptest inherit, otherwise all ptest files end packaged
 # in libopkg package if OPKGLIBDIR == libdir, because default
 # PTEST_PATH ?= "${libdir}/${BPN}/ptest"
 PACKAGES =+ "libopkg"
 
-inherit autotools pkgconfig ptest
+inherit cmake pkgconfig ptest
 
 target_localstatedir := "${localstatedir}"
 OPKGLIBDIR ??= "${target_localstatedir}/lib"
 
 PACKAGECONFIG ??= "libsolv"
 
-PACKAGECONFIG[gpg] = "--enable-gpg,--disable-gpg,\
+PACKAGECONFIG[gpg] = "-DWITH_GPGME=ON,-DWITH_GPGME=OFF,\
     gnupg gpgme libgpg-error,\
     ${@ "gnupg" if ("native" in d.getVar("PN")) else "gnupg-gpg"}\
     "
-PACKAGECONFIG[curl] = "--enable-curl,--disable-curl,curl"
-PACKAGECONFIG[ssl-curl] = "--enable-ssl-curl,--disable-ssl-curl,curl openssl"
-PACKAGECONFIG[sha256] = "--enable-sha256,--disable-sha256"
-PACKAGECONFIG[libsolv] = "--with-libsolv,--without-libsolv,libsolv"
+PACKAGECONFIG[curl] = "-DWITH_CURL=ON,-DWITH_CURL=OFF,curl"
+PACKAGECONFIG[ssl-curl] = "-DWITH_SSLCURL=ON,-DWITH_SSLCURL=OFF,curl openssl"
+PACKAGECONFIG[sha256] = "-DWITH_SHA256=ON,-DWITH_SHA256=OFF"
+PACKAGECONFIG[libsolv] = "-DUSE_SOLVER_LIBSOLV=ON,-DUSE_SOLVER_LIBSOLV=OFF,libsolv"
 
-EXTRA_OECONF = "--enable-zstd"
-EXTRA_OECONF:append:class-native = " --localstatedir=/${@os.path.relpath('${localstatedir}', '${STAGING_DIR_NATIVE}')} --sysconfdir=/${@os.path.relpath('${sysconfdir}', '${STAGING_DIR_NATIVE}')}"
+EXTRA_OECMAKE = "-DWITH_ZSTD=ON"
+EXTRA_OECMAKE:append:class-native = " -DVARDIR=/${@os.path.relpath('${localstatedir}', '${STAGING_DIR_NATIVE}')} -DSYSCONFDIR=/${@os.path.relpath('${sysconfdir}', '${STAGING_DIR_NATIVE}')}"
 
 do_install:append () {
        install -d ${D}${sysconfdir}/opkg
@@ -56,6 +57,9 @@ do_install:append () {
 }
 
 do_install_ptest () {
+       # the ptest class uses a Makefile for installation, but cmake uses Ninja per default so we need to install ptests manually:
+       cp -r ${S}/tests ${D}${PTEST_PATH}
+
        sed -i -e '/@echo $^/d' ${D}${PTEST_PATH}/tests/Makefile
        sed -i -e '/@PYTHONPATH=. $(PYTHON) $^/a\\t@if [ "$$?" != "0" ];then echo "FAIL:"$^;else echo "PASS:"$^;fi' ${D}${PTEST_PATH}/tests/Makefile
 }