summaryrefslogtreecommitdiff
path: root/system/apk-tools
diff options
context:
space:
mode:
authorMax Rees <maxcrees@me.com>2020-12-30 02:42:00 -0500
committerMax Rees <maxcrees@me.com>2020-12-30 02:42:00 -0500
commitaa6e477aa00f7eb9ab556591465d571e2400120f (patch)
tree13ca8ddd646b9ab2ffd477cf3e69e2cbd6b967f2 /system/apk-tools
parent3465fcf878a4f0e00a9378a4299eaa48a0af5bea (diff)
downloadpackages-aa6e477aa00f7eb9ab556591465d571e2400120f.tar.gz
packages-aa6e477aa00f7eb9ab556591465d571e2400120f.tar.bz2
packages-aa6e477aa00f7eb9ab556591465d571e2400120f.tar.xz
packages-aa6e477aa00f7eb9ab556591465d571e2400120f.zip
system/apk-tools: bump to 2.12.0
Diffstat (limited to 'system/apk-tools')
-rw-r--r--system/apk-tools/APKBUILD36
-rw-r--r--system/apk-tools/apk.zsh-completion240
-rw-r--r--system/apk-tools/dash.patch14
-rw-r--r--system/apk-tools/pmmx.patch11
4 files changed, 261 insertions, 40 deletions
diff --git a/system/apk-tools/APKBUILD b/system/apk-tools/APKBUILD
index cbbf3ceaf..5f0683e86 100644
--- a/system/apk-tools/APKBUILD
+++ b/system/apk-tools/APKBUILD
@@ -1,28 +1,31 @@
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Adelie Platform Group <adelie-devel@lists.adelielinux.org>
pkgname=apk-tools
-pkgver=2.10.5
+pkgver=2.12.0
pkgrel=0
pkgdesc="Alpine Package Keeper - package manager"
-url="https://git.alpinelinux.org/cgit/apk-tools/"
+url="https://code.foxkit.us/adelie/apk-tools"
arch="all"
license="GPL-2.0-only"
depends="ca-certificates"
makedepends_build=""
makedepends_host="zlib-dev openssl openssl-dev linux-headers"
makedepends="$makedepends_build $makedepends_host"
-subpackages="$pkgname-static"
-source="https://dev.alpinelinux.org/archive/$pkgname/$pkgname-$pkgver.tar.xz
- dash.patch
- pmmx.patch
+subpackages="$pkgname-dev $pkgname-static $pkgname-doc"
+source="https://dev.sick.bike/dist/$pkgname-v$pkgver+adelie.tar.gz
+ https://dev.sick.bike/dist/$pkgname-help-v$pkgver.tar.gz
+ apk.zsh-completion
"
+builddir="$srcdir/$pkgname-v$pkgver"
prepare() {
default_prepare
sed -i -e 's:-Werror::' Make.rules
- echo "FULL_VERSION=$pkgver-r$pkgrel" > config.mk
- echo "LUAAPK=" >> config.mk
- echo "export LUAAPK" >> config.mk
+ cat >config.mk <<-EOF
+ FULL_VERSION=$pkgver-r$pkgrel
+ LUA=no
+ export LUA
+ EOF
}
build() {
@@ -40,13 +43,16 @@ package() {
"$pkgdir"/var/cache/misc \
"$pkgdir"/etc/apk/keys \
"$pkgdir"/etc/apk/protected_paths.d
- # the shipped README is empty
- rm -r "$pkgdir"/usr/share/
+ # the shipped README is not useful
+ rm -r "$pkgdir"/usr/share/doc
+
+ install -Dm644 "$srcdir"/apk.zsh-completion \
+ "$pkgdir"/usr/share/zsh/site-functions/_apk
}
static() {
pkgdesc="Alpine Package Keeper - static binary"
- install -Dm755 "$srcdir"/$pkgname-$pkgver/src/apk.static \
+ install -Dm755 "$builddir"/src/apk.static \
"$subpkgdir"/sbin/apk.static
# Sign the static binary so it can be vefified from distros
@@ -64,6 +70,6 @@ static() {
"$subpkgdir"/sbin/apk.static
}
-sha512sums="0f85ec7c734f2ffc671007fa029f3c96eacfb196c45e465e33aa65c32a6fbcd7523153b6441fdf826a5b4d2e66de02d338620474d333c28cb1ce0233f1120495 apk-tools-2.10.5.tar.xz
-5892ad7038c942e82b011a64484253a157711ad65cb754b884c2b9b6047dd4693b530b6639f6d8c35aa21f9c293ee01a3f36ead1d148f77a2012053766f75ee2 dash.patch
-edff13f21debc227c7448f0ac42744b2655f8f23ea23aefa04db7d2c44e8a91f77227e84ef090e65364f6999b6ee1138c98490530cb6b9b0594b7cfeeef25b61 pmmx.patch"
+sha512sums="739cbf487a9184aba56c87448d18acebf357b6eddb4852033cc0cd331fc910d425a5d01f7b0bf109f5cd62f78f10cca96ebcbdb4fa00d197edb90726998e1523 apk-tools-v2.12.0+adelie.tar.gz
+b8e6e6e9efe2fc3a900e5fea54ed2f047bbf8917c8c3e470e001865c2169167ce6a273869ba577aceb1a1580b7dd684de115a4d92250786958fa13b9e8abf28b apk-tools-help-v2.12.0.tar.gz
+cedda9bf11e0a516c9bf0fd1a239ffa345cdd236419cbd8b10273410610ae7d0f0f61fd36e1e9ccc3bbf32f895508cdca4fb57a0e04f78dd88469b33bf64a32a apk.zsh-completion"
diff --git a/system/apk-tools/apk.zsh-completion b/system/apk-tools/apk.zsh-completion
new file mode 100644
index 000000000..955d504be
--- /dev/null
+++ b/system/apk-tools/apk.zsh-completion
@@ -0,0 +1,240 @@
+#compdef apk
+
+function _apk {
+
+ local -a global_opts=(
+ "(-h --help)"{-h,--help}"[Print help information]"
+ "(-i --interactive)"{-i,--interactive}"[Ask confirmation before performing certain operations]"
+ "(-p --root)"{-p,--root}"[Manage file system at ROOT]"
+ "(-q --quiet)"{-q,--quiet}"[Print less information]"
+ "(-U --update-cache)"{-U,--update-cache}"[Alias for '--cache-max-age 1']"
+ "(-v --verbose)"{-v,--verbose}"[Print more information]"
+ "(-V --version)"{-V,--version}"[Print program version and exit]"
+ "(-X --repository)"{-X,--repository}"[Specify additional package repository]:repository:_host"
+ "--allow-untrusted[Install packages with untrusted signature or no signature]"
+ "--arch[Temporarily override architecture]:arch:(armhf mips64 s390x x86_64 x86 aarch64 ppc64le armv7)"
+ "--cache-dir[Temporarily override the cache directory]:directory:_dir_list"
+ "--cache-max-age[Maximum age for index in cache before it's refreshed]:minutes"
+ "--force-binary-stdout[Continue even if binary data will be printed to the terminal]"
+ "--force-broken-world[Continue even if world cannot be satisfied]"
+ "--force-non-repository[Continue even if packages may be lost on reboot]"
+ "--force-old-apk[Continue even if packages use unsupported features]"
+ "--force-overwrite[Overwrite files in other packages]"
+ "--force-refresh[Do not use cached files]"
+ "--keys-dir[Override directory of trusted keys]:directory:_dir_list"
+ "--no-cache[Do not use any local cache path]"
+ "--no-network[Do not use the network]"
+ "--no-progress[Disable progress bar even for TTYs]"
+ "--print-arch[Print default arch and exit]"
+ "--progress[Show progress]"
+ "--progress-fd[Write progress to the specified file descriptor]:file descriptor"
+ "--purge[Delete modified configuration files or uninstalled packages from cache]"
+ "--repositories-file[Override system repositories]:repository file:_files"
+ "--wait[Wait to get an exclusive repository lock before failing]:seconds"
+ )
+
+ local -a commit_opts=(
+ "(-s --simulate)"{-s,--simulate}"[Simulate the requested operation without making any changes]"
+ "--clean-protected[Do not create .apk-new files in configuration directories]"
+ "--overlay-from-stdin[Read list of overlay files from stdin]"
+ "--no-scripts[Do not execute any scripts]"
+ "--no-commit-hooks[Skip pre/post hook scripts]"
+ "--initramfs-diskless-boot[Enables selected force options, disables commit hooks and more]"
+ )
+
+ local -a latest_opt=("(-l --latest)"{-l,--latest}"[Always choose the latest package by version]")
+ local -a upgrade_opt=("(-u --upgrade)"{-u,--upgrade}"[Upgrade packages and it's dependencies]")
+
+ local context state state_descr line
+ typeset -A opt_args
+ local curcontext="$curcontext"
+ local ret=1
+
+ function _ccache_apk_world { [[ "$1" -ot /etc/apk/world ]] }
+ function _ccache_apk_avail {
+ for i in /etc/apk/cache/APKINDEX.*; do
+ [[ "$1" -ot "$i" ]] && return
+ done
+ }
+
+ function _apk_available_pkgs {
+ local -a _apk_available_packs
+ zstyle ":completion:${curcontext}:" cache-policy _ccache_apk_avail
+ local IFS=$'\n'
+ if _cache_invalid apk_index_packages_available || ! _retrieve_cache apk_index_packages_available; then
+ _apk_available_packs=(${$(/sbin/apk list -a 2>/dev/null)%-[[:digit:][:lower:]._]##-r[[:digit:]]## * \{*\} (*)})
+ _store_cache apk_index_packages_available _apk_available_packs
+ fi
+ _describe 'available packages' _apk_available_packs
+ }
+
+ function _apk_installed_pkgs {
+ local -a _apk_installed_packs
+ zstyle ":completion:${curcontext}:" cache-policy _ccache_apk_world
+ local IFS=$'\n'
+ if _cache_invalid apk_index_packages_installed || ! _retrieve_cache apk_index_packages_installed; then
+ _apk_installed_packs=(${$(/sbin/apk list -I 2>/dev/null)%-[[:digit:][:lower:]._]##-r[[:digit:]]## * \{*\} (*)})
+ _store_cache apk_index_packages_installed _apk_installed_packs
+ fi
+ _describe 'installed packages' _apk_installed_packs
+ }
+
+ function _apk_packages {
+ _alternative 'repo:available packages:_apk_available_pkgs' 'localpkgs:local packages:_files -g "*.apk"'
+ }
+
+ function _apk_cache {
+ local -a cache_subcmds=(
+ "clean:Remove package files which are no longer necessary"
+ "download:Fetch package files from the repositories and store them in the cache"
+ "sync:Clean and Download"
+ )
+ _describe 'subcommand' cache_subcmds
+ }
+
+ function _apk_subcmds {
+ local -a cmds=(
+ "add:Add packages to world and commit changes"
+ "del:Remove packages from world and commit changes"
+ "fix:Fix, reinstall or upgrade packages without modifying world"
+ "update:Update repository indexes"
+ "upgrade:Install upgrades available from repositories"
+ "cache:Manage the local package cache"
+ "info:Give detailed information about packages or repositories"
+ "list:List packages matching a pattern or other criteria"
+ "dot:Render dependencies as graphviz graphs"
+ "policy:Show repository policy for packages"
+ "index:Create repository index file from packages"
+ "fetch:Download packages from global repositories to a local directory"
+ "manifest:Show checksums of package contents"
+ "verify:Verify package integrity and signature"
+ "audit:Audit system for changes"
+ "stats:Show statistics about repositories and installations"
+ "version:Compare package versions or perform tests on version strings"
+ )
+ _describe 'subcommand' cmds
+ }
+
+ local -a completion_spec=($global_opts ':subcommand:_apk_subcmds')
+
+ case ${${words:#-*}[2]} in
+ (add)
+ completion_spec+=(
+ $commit_opts \
+ $latest_opt \
+ $upgrade_opt \
+ "--initdb[Initialize a new package database]" \
+ "(-t --virtual)"{-t,--virtual}"[Create virtual package with given dependencies]" \
+ "*:package:_apk_packages"
+ )
+ ;;
+ (del)
+ completion_spec+=(
+ $commit_opts \
+ "--rdepeds[Recursively delete all top-level reverse dependencies]" \
+ "*:installed package:_apk_installed_pkgs"
+ )
+ ;;
+ (fix)
+ completion_spec+=(
+ $commit_opts \
+ "(-d --depends)"{-d,--depends}"[Fix dependencies of specified packages]" \
+ "(-r --reinstall)"{-r,--reinstall}"[Reinstall packages]" \
+ "(-u --upgrade)"{-u,--upgrade}"[Upgrade if an upgrade is available and does not break dependencies]" \
+ "(-x --xattr)"{-x,--xattr}"[Fix packages with broken xattrs]" \
+ "--directory-permissions[Reset all directory permissions]" \
+ "*:package:_apk_packages"
+ )
+ ;;
+ (update) completion_spec+=($commit_opts);;
+ (upgrade)
+ completion_spec+=(
+ $commit_opts \
+ $latest_opt \
+ "(-a --available)"{-a,--available}"[Reset all packages to versions available from current repositories]" \
+ "--ignore[Upgrade all other packages than the ones listed]" \
+ "--no-self-upgrade[Do not do an early upgrade of the 'apk-tools' package]" \
+ "--prune[Remove packages which are no longer available from any configured repository]" \
+ "--self-upgrade-only[Only perform a self-upgrade of the 'apk-tools' package]" \
+ "*:package:_apk_packages"
+ )
+ ;;
+ (cache)
+ completion_spec+=(
+ $latest_opt \
+ $upgrade_opt \
+ '2:subcommand:_apk_cache'
+ )
+ ;;
+ (info)
+ completion_spec+=(
+ "(-a --all)"{-a,--all}"[List all information known about the package]" \
+ "(-d --description)"{-d,--descripton}"[Print the package description]" \
+ "(-e --installed)"{-e,--installed}"[Check package installed status]" \
+ "(-L --contents)"{-L,--contents}"[List files included in the package]" \
+ "(-i --install-if)"{-i,--install-if}"[List the package's install_if rule]" \
+ "(-I --rinstall-if)"{-I,--rinstall-if}"[List other packages whose install_if rules refer to this package]" \
+ "(-r --rdepends)"{-r,--rdepends}"[List reverse dependencies of the package]" \
+ "(-R --depends)"{-R,--depends}"[List the dependencies of the package]" \
+ "(-s --size)"{-s,--size}"[Print the package's installed size]" \
+ "(-w --webpage)"{-w,--webpage}"[Print the URL for the package's upstream webpage]" \
+ "(-W --who-owns)"{-W,--who-owns}"[Print the package which owns the specified file]:file:_files" \
+ "--license[Print the package SPDX license identifier]" \
+ "--replaces[List the other packages for which this package is marked as a replacement]" \
+ "--triggers[Print active triggers for the package]" \
+ "*:package:_apk_packages"
+ )
+ ;;
+ (list)
+ completion_spec+=(
+ "(-I --installed)"{-I,--installed}"[Consider only installed packages]" \
+ "(-O --orphaned)"{-O,--orphaned}"[Consider only orphaned packages]" \
+ "(-a --available)"{-a,--available}"[Consider only available packages]" \
+ "(-u --upgradeable)"{-u,--upgradeable}"[Consider only upgradable packages]" \
+ "(-o --origin)"{-o,--origin}"[List packages by origin]" \
+ "(-d --depends)"{-d,--depends}"[List packages by dependency]" \
+ "(-P --providers)"{-P,--providers}"[List packages by provider]" \
+ "*:pattern"
+ )
+ ;;
+ (dot)
+ completion_spec+=(
+ "--errors[Consider only packages with errors]" \
+ "--installed[Consider only installed packages]"
+ )
+ ;;
+ (index)
+ completion_spec+=(
+ "(-d --description)"{-d,--description}"[Add a description to the index]:description" \
+ "(-o --output)"{-o,--output}"[Output generated index to file]:output:_files" \
+ "(-x --index)"{-x,--index}"[Read an existing index to speed up the creation of the new index]" \
+ "--no-warnings[Disable warnings about missing dependencies]" \
+ "*:package:_apk_packages"
+ )
+ ;;
+ (fetch)
+ completion_spec+=(
+ "(-l --link)"{-l,--link}"[Create hard links if possible]" \
+ "(-o --output)"{-o,--output}"[Where to write the downloaded files]:directory:_dir_list" \
+ "(-r --recursive)"{-r,--recursive}"[Fetch packages and all of their dependencies]" \
+ "(-s --stdout)"{-s,--stdout}"[Dump the .apk file(s) to stdout]" \
+ "--simulate[Simulate the requested operation without making any changes]" \
+ "*:package:_apk_packages"
+ )
+ ;;
+ (manifest) completion_spec+=("*:package:_apk_packages");;
+ (verify) completion_spec+=("*:package:_apk_packages");;
+ (audit) completion_spec+=("*:files:_files");;
+ (version)
+ completion_spec+=(
+ "-a[Consider packages from all repository tags]" \
+ "-l[Limit to packages with output matching given operand]:operand" \
+ "*:package:_apk_packages"
+ )
+ ;;
+ (policy) completion_spec+=("*:package:_apk_packages");;
+ esac
+
+ _arguments -C -s $completion_spec && ret=0
+ return ret
+}
diff --git a/system/apk-tools/dash.patch b/system/apk-tools/dash.patch
deleted file mode 100644
index 5847d87df..000000000
--- a/system/apk-tools/dash.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- apk-tools-2.10.4/test/solver.sh
-+++ apk-tools-2.10.4/test/solver.sh
-@@ -10,9 +10,9 @@ TEST_TO_RUN="$@"
- fail=0
- pass=0
- for test in ${TEST_TO_RUN:-*.test}; do
-- get_block ARGS < $test | xargs $APK_TEST &> .$test.got
-+ get_block ARGS < $test | xargs $APK_TEST > .$test.got 2>&1
-
-- if ! get_block EXPECT < $test | cmp .$test.got &> /dev/null; then
-+ if ! get_block EXPECT < $test | cmp .$test.got > /dev/null 2>&1; then
- fail=$((fail+1))
- echo "FAIL: $test"
- get_block EXPECT < $test | diff -ru - .$test.got
diff --git a/system/apk-tools/pmmx.patch b/system/apk-tools/pmmx.patch
deleted file mode 100644
index 4891e5ddd..000000000
--- a/system/apk-tools/pmmx.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- apk-tools-2.10.1/src/apk_defines.h.old 2018-09-10 08:04:03.000000000 +0000
-+++ apk-tools-2.10.1/src/apk_defines.h 2019-01-04 03:31:41.900000000 +0000
-@@ -93,7 +93,7 @@
- #if defined(__x86_64__)
- #define APK_DEFAULT_ARCH "x86_64"
- #elif defined(__i386__)
--#define APK_DEFAULT_ARCH "x86"
-+#define APK_DEFAULT_ARCH "pmmx"
- #elif defined(__powerpc__) && !defined(__powerpc64__)
- #define APK_DEFAULT_ARCH "ppc"
- #elif defined(__powerpc64__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__