From 074b18dca06d9e8663747d182a48827496f02178 Mon Sep 17 00:00:00 2001 From: Piraty Date: Sat, 10 Feb 2024 02:43:19 +0100 Subject: [PATCH 1/2] New package: libsolv-0.7.28 --- common/shlibs | 1 + srcpkgs/libsolv-devel | 1 + srcpkgs/libsolv-tools | 1 + srcpkgs/libsolv/template | 40 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 43 insertions(+) create mode 120000 srcpkgs/libsolv-devel create mode 120000 srcpkgs/libsolv-tools create mode 100644 srcpkgs/libsolv/template diff --git a/common/shlibs b/common/shlibs index bf79a52760b09..3459f7f2b7fd6 100644 --- a/common/shlibs +++ b/common/shlibs @@ -1002,6 +1002,7 @@ libnilfs.so.0 libnilfs-2.1.0_1 libnilfsgc.so.0 libnilfs-2.1.0_1 libnilfscleaner.so.0 libnilfs-2.1.0_1 libchicken.so.11 libchicken-5.1.0_1 +libsolv.so.1 libsolv-0.7.28_1 libmdb.so.0 libmdb-0.5_1 libmdbsql.so.0 libmdb-0.5_1 libkmod.so.2 libkmod-5_1 diff --git a/srcpkgs/libsolv-devel b/srcpkgs/libsolv-devel new file mode 120000 index 0000000000000..bbfd1569051b4 --- /dev/null +++ b/srcpkgs/libsolv-devel @@ -0,0 +1 @@ +libsolv \ No newline at end of file diff --git a/srcpkgs/libsolv-tools b/srcpkgs/libsolv-tools new file mode 120000 index 0000000000000..bbfd1569051b4 --- /dev/null +++ b/srcpkgs/libsolv-tools @@ -0,0 +1 @@ +libsolv \ No newline at end of file diff --git a/srcpkgs/libsolv/template b/srcpkgs/libsolv/template new file mode 100644 index 0000000000000..d7ca79098d907 --- /dev/null +++ b/srcpkgs/libsolv/template @@ -0,0 +1,40 @@ +# Template file for 'libsolv' +pkgname=libsolv +version=0.7.28 +revision=1 +build_style=cmake +configure_args="-DENABLE_STATIC=ON + -DENABLE_ZSTD_COMPRESSION=ON + -DENABLE_DEBIAN=ON" +makedepends="liblzma-devel zlib-devel libzstd-devel" +short_desc="Package dependency solver using a satisfiability algorithm" +maintainer="Piraty " +license="BSD-3-Clause" +homepage="https://en.opensuse.org/openSUSE:Libzypp_satsolver" +distfiles="https://github.com/openSUSE/libsolv/archive/refs/tags/${version}.tar.gz" +checksum=bd2406f498fea6086ae0eacbf8b188c98b380e59af2267170e6a7b7d715cb207 + +post_install() { + vlicense LICENSE.BSD +} + +libsolv-tools_package() { + short_desc+=" - tools" + depends="${sourcepkg}>=${version}_${revision}" + pkg_install() { + vmove usr/bin + vmove usr/share/man/man1 + } +} + +libsolv-devel_package() { + short_desc+=" - development files" + depends="${sourcepkg}>=${version}_${revision}" + pkg_install() { + vmove usr/include + vmove "usr/lib/*.a" + vmove "usr/lib/*.so" + vmove usr/lib/pkgconfig + vmove usr/share/man/man3 + } +} From 97d024c8a07919d11a335f221f3d6648d397160d Mon Sep 17 00:00:00 2001 From: Piraty Date: Sat, 10 Feb 2024 03:00:58 +0100 Subject: [PATCH 2/2] opkg: update to 0.6.3, switch to libsolv --- ...Use-libgen.h-to-provide-basename-API.patch | 60 +++++++++++++++++++ srcpkgs/opkg/template | 12 ++-- 2 files changed, 67 insertions(+), 5 deletions(-) create mode 100644 srcpkgs/opkg/patches/0001-libopkg-Use-libgen.h-to-provide-basename-API.patch diff --git a/srcpkgs/opkg/patches/0001-libopkg-Use-libgen.h-to-provide-basename-API.patch b/srcpkgs/opkg/patches/0001-libopkg-Use-libgen.h-to-provide-basename-API.patch new file mode 100644 index 0000000000000..73cfe3f463f13 --- /dev/null +++ b/srcpkgs/opkg/patches/0001-libopkg-Use-libgen.h-to-provide-basename-API.patch @@ -0,0 +1,60 @@ +From 74fc3a991f974095644897d18d43846b5f359dae Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sun, 10 Dec 2023 19:49:27 -0800 +Subject: [PATCH] libopkg: Use libgen.h to provide basename API + +Also ensure that copy of filename is passed into archive_entry_set_pathname +so it can be operated upon by posix basename which expect non-const +character pointer as input. + +This became evident with latest musl where basename declaration was +dropped from string.h [1] + +[1] https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7 + +Signed-off-by: Khem Raj +Signed-off-by: Alex Stewart +--- + libopkg/opkg_archive.c | 6 ++++-- + libopkg/opkg_remove.c | 1 + + 2 files changed, 5 insertions(+), 2 deletions(-) + +diff --git a/libopkg/opkg_archive.c b/libopkg/opkg_archive.c +index 8dd902d..23575b1 100644 +--- a/libopkg/opkg_archive.c ++++ b/libopkg/opkg_archive.c +@@ -20,6 +20,7 @@ + + #include + #include ++#include + #include + #include + #include +@@ -797,8 +798,9 @@ int gz_write_archive(const char *filename, const char *gz_filename) + } + + /* Remove path hierarchy, as we are only compressing a single file */ +- archive_entry_set_pathname(entry, basename(filename)); +- ++ char* tmp = xstrdup(filename); ++ archive_entry_set_pathname(entry, basename(tmp)); ++ free(tmp); + r = archive_write_header(a, entry); + if (r != ARCHIVE_OK) { + opkg_msg(ERROR, "Failed to create compressed file: '%s' : %s (errno=%d)", +diff --git a/libopkg/opkg_remove.c b/libopkg/opkg_remove.c +index 889c672..5254388 100644 +--- a/libopkg/opkg_remove.c ++++ b/libopkg/opkg_remove.c +@@ -20,6 +20,7 @@ + + #include "config.h" + ++#include + #include + #include + #include +-- +2.43.0 + diff --git a/srcpkgs/opkg/template b/srcpkgs/opkg/template index 82f802fb0db1d..4c3751f8346f7 100644 --- a/srcpkgs/opkg/template +++ b/srcpkgs/opkg/template @@ -1,19 +1,21 @@ # Template file for 'opkg' pkgname=opkg -version=0.6.1 -revision=2 +version=0.6.3 +revision=1 build_style=gnu-configure -configure_args="--enable-sha256 --enable-zstd --without-libsolv --with-static-libopkg +configure_args="--enable-sha256 --enable-zstd --without-libsolv + --with-static-libopkg --with-libsolv $(vopt_if ssl '--enable-ssl-curl') $(vopt_enable gpg)" hostmakedepends="pkg-config libtool automake" -makedepends="libarchive-devel libcurl-devel libzstd-devel $(vopt_if gpg gpgme-devel)" +makedepends="libarchive-devel libcurl-devel libsolv-devel libzstd-devel + $(vopt_if gpg gpgme-devel)" checkdepends="python3" short_desc="Lightweight package management system, compatible with ipkg" maintainer="Piraty " license="GPL-2.0-or-later" homepage="http://code.google.com/p/opkg/" distfiles="https://downloads.yoctoproject.org/releases/opkg/opkg-${version}.tar.gz" -checksum=e87fccb575c64d3ac0559444016a2795f12125986a0da896bab97c4a1a2f1b2a +checksum=f3938e359646b406c40d5d442a1467c7e72357f91ab822e442697529641e06de build_options="gpg lz4 ssl" build_options_default="ssl"