diff options
author | Zach van Rijn <me@zv.io> | 2023-05-16 10:54:03 -0500 |
---|---|---|
committer | Zach van Rijn <me@zv.io> | 2023-05-16 16:39:06 +0000 |
commit | ff842839bc761ecb7c11cb1fbcf2d00b1d5963dd (patch) | |
tree | 9b42fffe7c45ad5056856953eef9450db4390820 /system/abuild | |
parent | d4cc0e8d5a0e29e9b66e7058c180a7aa9b2cdac7 (diff) | |
download | packages-ff842839bc761ecb7c11cb1fbcf2d00b1d5963dd.tar.gz packages-ff842839bc761ecb7c11cb1fbcf2d00b1d5963dd.tar.bz2 packages-ff842839bc761ecb7c11cb1fbcf2d00b1d5963dd.tar.xz packages-ff842839bc761ecb7c11cb1fbcf2d00b1d5963dd.zip |
system/abuild: add patch for noarch semantics. fixes #1031.
Diffstat (limited to 'system/abuild')
-rw-r--r-- | system/abuild/APKBUILD | 6 | ||||
-rw-r--r-- | system/abuild/noarch.patch | 116 |
2 files changed, 120 insertions, 2 deletions
diff --git a/system/abuild/APKBUILD b/system/abuild/APKBUILD index 1f70cacf8..6c16562e1 100644 --- a/system/abuild/APKBUILD +++ b/system/abuild/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=abuild pkgver=3.4.2 -pkgrel=2 +pkgrel=3 pkgdesc="Script to build APK packages" url="https://git.adelielinux.org/adelie/abuild" arch="all" @@ -22,6 +22,7 @@ source="https://distfiles.adelielinux.org/source/abuild-$pkgver.tar.xz inode.patch keyhole.patch libarchive.patch + noarch.patch " # secfixes: @@ -58,4 +59,5 @@ _rootbld() { sha512sums="9bdeb31f54879878697b4a5436ec2bc7764e1b9840798e913ba3dd47c344437e362a3067b89440ca8a7940af1efcaa83a24e7c1077187f924bf73fb058f97fbf abuild-3.4.2.tar.xz 53b0f2c15da767fbdde5a28b6f428943907e8752490ffae580e4a4198fea76fd71fc253a526c81bbbf17311ce3c72a563649a416ea0fda219a35cee50fcd46d1 inode.patch 757d750d4b5c88bf00774b64f2b93a9461e03f284d9423dc58c581e1309f276628de3114fcb510afd7c3cd55ceb721c1278e42756977c97ebe2597207805318d keyhole.patch -2452a2b2ecf64bb6bfef1e71c35d39f02be1a5930ebd3e4c139156979b6c2249adcd4437c5c49f4af5b478f2a69529807fcbcd31ca01e6be6430165bcad74353 libarchive.patch" +2452a2b2ecf64bb6bfef1e71c35d39f02be1a5930ebd3e4c139156979b6c2249adcd4437c5c49f4af5b478f2a69529807fcbcd31ca01e6be6430165bcad74353 libarchive.patch +5ba235c3f3c3c5cf8c8973ea8cc3fdf97364b5bb69c6e60b8738c3f0cf585868bcf77a0b05ff1a49879eec1ad5c37f28f5fe28f883643a44b3ba6c543616bbe7 noarch.patch" diff --git a/system/abuild/noarch.patch b/system/abuild/noarch.patch new file mode 100644 index 000000000..8c61d32a6 --- /dev/null +++ b/system/abuild/noarch.patch @@ -0,0 +1,116 @@ +diff --git a/abuild.in b/abuild.in +index b0c0f9c..a6a0fe1 100644 +--- a/abuild.in ++++ b/abuild.in +@@ -516,7 +516,7 @@ cleanpkg() { + rm -f "$REPODEST/$repo/src/$pkgname-$pkgver-r$pkgrel.src.tar.gz" + for i in $allpackages; do + subpkg_set "$i" +- [ "$subpkgarch" = "noarch" ] && subpkgarch="$CARCH" ++ list_has noarch "$subpkgarch" && subpkgarch="$CARCH" + rm -f "$REPODEST/$repo/$subpkgarch/$subpkgname-$pkgver-r$pkgrel.apk" + done + subpkg_unset +@@ -931,7 +931,7 @@ prepare_metafiles() { + + if [ "$arch" != "$apkbuild_arch" ]; then + local msg="Split function set arch=\"$arch\" for $name, use subpackages=pkg:split:arch format instead" +- [ "$arch" != "noarch" ] && die "$msg" ++ ! list_has noarch "$arch" && die "$msg" + warning "$msg" + subpkgarch="$arch" + fi +@@ -1027,7 +1027,7 @@ prepare_metafiles() { + prepare_trace_rpaths() { + local dir="${subpkgdir:-$pkgdir}" + local etype= soname= file= sover= +- [ "${subpkgarch:-$pkgarch}" = "noarch" ] && return 0 ++ list_has noarch "${subpkgarch:-$pkgarch}" && return 0 + options_has "!tracedeps" && return 0 + # lets tell all the places we should look for .so files - all rpaths + scanelf --quiet --recursive --rpath "$dir" \ +@@ -1115,10 +1115,10 @@ is_openrc_pkg() { + archcheck() { + options_has "!archcheck" && return 0 + if dir_has_arch_binaries "${subpkgdir:-$pkgdir}"; then +- [ "${subpkgarch:-$pkgarch}" != "noarch" ] && return 0 ++ ! list_has noarch "${subpkgarch:-$pkgarch}" && return 0 + error "Arch specific binaries found so arch must not be set to \"noarch\"" + return 1 +- elif [ "${subpkgarch:-$pkgarch}" != "noarch" ] && ! is_dev_pkg; then ++ elif ! list_has noarch "${subpkgarch:-$pkgarch}" && ! is_dev_pkg; then + # we dont want -dev package go to noarch + warning "No arch specific binaries found so arch should probably be set to \"noarch\"" + fi +@@ -1317,7 +1317,7 @@ scan_shared_objects() { + local name="$1" controldir="$2" datadir="$3" + local opt= i= + +- if [ "${subpkgarch:-$pkgarch}" = "noarch" ]; then ++ if list_has noarch "${subpkgarch:-$pkgarch}"; then + return 0 + fi + +@@ -1520,7 +1520,7 @@ create_apks() { + abuild-sign -q control.tar.gz || exit 1 + + msg "Create $apk" +- [ "$subpkgarch" = "noarch" ] && subpkgarch="$CARCH" ++ list_has noarch "$subpkgarch" && subpkgarch="$CARCH" + mkdir -p "$REPODEST"/$repo/$subpkgarch + cat control.tar.gz data.tar.gz > "$REPODEST"/$repo/$subpkgarch/$apk + ) +@@ -1562,7 +1562,7 @@ update_abuildrepo_index() { + # thinks they are for $CARCH and apk-tools will fetch them from + # correct URL path. Remainder of the script uses ${subpkgarch/noarch/$CARCH} + # when expanding to the target repository path. +- [ "$subpkgarch" = "noarch" ] && subpkgarch="$CARCH" ++ list_has noarch "$subpkgarch" && subpkgarch="$CARCH" + list_has "$subpkgarch" "$allarch" || allarch="$allarch $subpkgarch" + done + subpkg_unset +@@ -1856,7 +1856,7 @@ apk_up2date() { + local i s + for i in $allpackages; do + subpkg_set "$i" +- [ "$subpkgarch" = "noarch" ] && subpkgarch="$CARCH" ++ list_has noarch "$subpkgarch" && subpkgarch="$CARCH" + if [ ! -f "$REPODEST/$repo/$subpkgarch/$subpkgname-$pkgver-r$pkgrel.apk" ]; then + subpkg_unset + return 1 +@@ -1872,7 +1872,7 @@ apk_up2date() { + else + s="$startdir/${i##*/}" + fi +- [ "$pkgarch" = "noarch" ] && pkgarch="$CARCH" ++ list_has noarch "$pkgarch" && pkgarch="$CARCH" + if [ "$s" -nt "$REPODEST/$repo/$pkgarch/$pkgname-$pkgver-r$pkgrel.apk" ]; then + return 1 + fi +@@ -1886,7 +1886,7 @@ abuildindex_up2date() { + + for i in $allpackages; do + subpkg_set "$i" +- [ "$subpkgarch" = "noarch" ] && subpkgarch="$CARCH" ++ list_has noarch "$subpkgarch" && subpkgarch="$CARCH" + local dir="$REPODEST"/$repo/$subpkgarch + local idx="$dir"/APKINDEX.tar.gz + local file="$dir"/$subpkgname-$pkgver-r$pkgrel.apk +@@ -2253,7 +2253,7 @@ rootbld() { + + stripbin() { + local bin +- if options_has "!strip" || [ "${subpkgarch:-$pkgarch}" = "noarch" ]; then ++ if options_has "!strip" || list_has noarch "${subpkgarch:-$pkgarch}"; then + return 0 + fi + cd "${subpkgdir:-$pkgdir}" || return 1 +@@ -2597,7 +2597,7 @@ fi + export REPODEST SRCDEST + + # add dbg subpackage if its enabled globally +-if [ -n "$DEFAULT_DBG" ] && ! subpackage_types_has "dbg" && ! options_has "!dbg" && [ "$arch" != "noarch" ]; then ++if [ -n "$DEFAULT_DBG" ] && ! subpackage_types_has "dbg" && ! options_has "!dbg" && ! list_has noarch "$arch"; then + subpackages="$pkgname-dbg $subpackages" + fi + |