Skip to content

Commit f244ff2

Browse files
efahlrobimarko
authored andcommitted
apk-tools: update to git HEAD (2025-06-06)
3efd75dc7e49 crypto: fix segfault when passing --hash 51306cf1424e test: export APK_CONFIG=/dev/null b91e9e17ceb6 build: mark scdoc dependency as native 123fa05b787a build: mark lua interpreter dependency as native 5fbb85426ea0 libfetch: fix fetch_err* for negative error codes 1458737d58c2 db, index: fix 'index' loading of old index cbd1e6b49add add: use solver error when arch is incompatible f66d84fcd42d doc: update apk-package(5) regarding arch validation f5df274d248c test: don't use temporary files for diffing output 42034f7961f0 apk: allow per-applet option to override group options b6ca99d44119 serializer: start_array(num=-1) indicates unknown amount 14881b9ffb2e query: a new api and applet to search and output information dd2255e10ee9 package: use apk_array_foreach ae17b61de83b info: use apk_array_foreach 6d4471f55ada solver: use apk_array_foreach 7951798121c1 db: use apk_array_foreach 5e3cac4ccb85 commit: use apk_array_foreach 86c725d97afd db: allocate protected paths with balloc 0fe23ce1a501 array: make apk_array_foreach* evaluate end only once a50f7ea2dd02 io_url_wget: correctly init wget_out on apk_io_url_init call 2cdfdd86e3d4 commit: Fix 'upgrade' typo on cache-pre-download 3fb50f645203 Add man page for protected_paths.d 652a1365aa30 fetch: account existing files to progress 0257acf6b120 doc: remove .d from apk-protected_paths(5) man page name aeb74de67818 db: include index file name for APK_REPOTYPE_NDX 6ec4fe6fa334 mkpkg: handle apk_blob_split failure c47b6e17fe6d extract: handle apk_blob_split failure b7c6b0b468d7 mkpkg: print error message when using forbidden fields b9483c46bdf9 fetch: fix APK_BLOB_STRLIT used with char argument d495be9e9f25 adbsign: fix recompressing when alg is NONE or level is 0 5348babed78e mkndx: fix memory leak when with large dependency list in v2 packages 11dd5923f6a1 mkndx: don't return ADB_ERROR from mkndx_parse_v2meta 8415dbf6df42 mkndx: reset pkginfo on error 684bef440cde mkndx: remove workaround for abuild license field a94fa1878df9 pkg: move same origin check after replaces check 3abcd400bdbf pkg: fix package repos after 16th missing 216ac57b7a1a arch: reserve wasi32 architecture name for WASI APKs 3761e38d1a00 add wasi32/wasi64 reservations to apk-package(5) 68c1fa58113e dot: only initialize qs->mode.empty_matches_all once 56019c5ed390 {blob,tar,adb}: avoid overflow when pulling numbers 5112b60c4440 index: only check file name for old index 345863787484 db: fix ${name} check in apk_db_get_pkg_by_name 5ce64d14ead8 manifest: replace memset 0 with apk_blob_pushed 7765f134215d info: include name and version when --all is used d2ca47f9f3b4 fix indentation 33c822e93267 build: install apk_repoparser.h header 0762b25eb2ad ctx: initialize progress_char in apk_ctx_init 0a3fa796a532 doc: fix typos 10a184f3f43d search: fix incorrect error when no match was found aa9502dc3720 ctx: fix closing of root_fd 2ac55a0f26bd io: fix id_cache when root_fd is 0 c39b22fe49c7 fetch: fix outdir_fd when openat returns 0 9d42be2316fc meson: Build Python module using standard Meson python build functions 48c6e526ee6f meson: Allow overriding the names of the Lua binary and pkgconfig file 249f0d937afb ci: Add build test on Fedora Linux 10dbdf7263eb pkg: replace files/dirs from packages that will be removed acae571db2b9 pkg: apk_pkg_replaces_{dir,file} access ipkgs consistently 8b0b567544b7 io: initialize 'r' in apk_dir_foreach_config_file 55ab583de9a3 io: fix undefined behaviour in apk_istream_get_delim deadab38aea9 db: flush progress notes after opening indexes 32b3a448c3e2 info: always show name/version for no-legacy-info dbba5797269b crypto: make crypto backend an implementation detail c0288de355e6 test: fix failing tests due to missing PATH_MAX definition 1863ccbf7abb make: remove -DCRYPTO_USE_* e2fb020c96ca apk: shared error message for invalid arguments 29040298f5de adb: fix handling of empty adb blocks 2aa08ec9da6a adb: fix exact comparison of objects containing arrays e475a2fab226 Update apk-v3.5.scd 76c629d79473 doc: combine --no-* and --* descriptions afc1ee46ca55 mkpkg: convert --rootnode to APK_OPT_BOOL 2c52e9415653 pkg: correctly check empty atoms in apk_package f384d7d11229 test: add tests for query 0c044cb8323d tests: fix permissions on replaces.sh 31bc2263a10f defines: make BIT() always return a 64-bit type dc86ad784eef solver: always resolve conflict names in install-if 8b6e9c9d6421 db, pkg: separate "virtual" repository for command line packages d7f77eb68aa5 adb: reduce alignment of ADB_TYPE_INT_64 to 32 bits 1ffd648aca45 array: generalize apk_deps_balloc to apk_array_balloc 2089f8a8225b adb, pkg, query: add support for 'recommends' 59c207b582cc array: generalize apk_deps_bclone to apk_array_bclone 617ba801f760 commit: fix size_diff on package removal 649859806c65 commit, upgrade: never suggest --force-broken-world 4f84ee8156e1 help: group option group help first 44a7498d6102 fetch: fix error reporting if package is not selected 7516cf61fe94 adb: return bool from adb_block_is_ext f47cb4bdac15 adb: validate signature header version specific size 1925de55beef adb, pkg: add support for custom tags f174f287b1b2 db, doc: update and document environment variables for scripts 603eeea614b5 upgrade: improve the mechanism to detect self-upgrade done 97c2d3318d8d upgrade: determine apk-tools package name from /proc/self/exe 088f88cdb6a5 build, test: fix limits.h including and testing selfupgrade 8acf4c0e95da pkg: export APK_PACKAGE for package scripts ab907a6b682e io: ignore dot files in apk_dir_foreach_file() f5e4cbc3900e info: make --legacy-info the default for the time being 7f1afedb7cae doc/apk-v3(5): document that multiple SIG blocks are allowed 2204c49b9d7e adb: validate block type before testing the allowed mask 9331888de6bd apk-tools-3.0.0_rc5 Signed-off-by: Eric Fahlgren <ericfahlgren@gmail.com> Link: openwrt#19043 Signed-off-by: Robert Marko <robimarko@gmail.com>
1 parent 8364808 commit f244ff2

4 files changed

Lines changed: 33 additions & 125 deletions

package/system/apk/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ PKG_RELEASE:=2
55

66
PKG_SOURCE_URL=https://gitlab.alpinelinux.org/alpine/apk-tools.git
77
PKG_SOURCE_PROTO:=git
8-
PKG_SOURCE_DATE:=2025-02-08
9-
PKG_SOURCE_VERSION:=34771ccb7964b0e7cb5d1fc64bd1b83fe73296ba
10-
PKG_MIRROR_HASH:=fddd0334fa2ce7cc7fedb2cc95ee800caf9cbe43d617c2e612e2f58fc30b14c2
8+
PKG_SOURCE_DATE:=2025-06-06
9+
PKG_SOURCE_VERSION:=9331888de6bd5b280d75112e5b2f7b55684db0ec
10+
PKG_MIRROR_HASH:=cf5b3429ce9ee5e2c4705b0b8160adec6f300dd2a42f8190fb0953754dd5eaa5
1111

1212
PKG_VERSION=3.0.0_pre$(subst -,,$(PKG_SOURCE_DATE))
1313

package/system/apk/patches/0002-io_url_wget-correctly-init-wget_out-on-apk_io_url_in.patch

Lines changed: 0 additions & 27 deletions
This file was deleted.

package/system/apk/patches/0003-io-fix-undefined-behaviour-in-apk_istream_get_delim.patch

Lines changed: 0 additions & 67 deletions
This file was deleted.

package/system/apk/patches/0010-app_list-add-full-print.patch

Lines changed: 30 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -12,29 +12,25 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
1212

1313
--- a/src/app_list.c
1414
+++ b/src/app_list.c
15-
@@ -27,6 +27,7 @@ struct list_ctx {
16-
unsigned int match_depends : 1;
15+
@@ -49,12 +49,53 @@ struct list_ctx {
1716
unsigned int match_providers : 1;
17+
unsigned int match_depends : 1;
1818
unsigned int manifest : 1;
19+
+ unsigned int installed : 1; /* Solely for print_full patch */
1920
+ unsigned int full : 1;
20-
21-
struct apk_string_array *filters;
2221
};
23-
@@ -105,6 +106,40 @@ static void print_manifest(const struct
24-
printf("%s " BLOB_FMT "\n", pkg->name->name, BLOB_PRINTF(*pkg->version));
25-
}
2622

2723
+static void print_full(const struct apk_package *pkg, const struct list_ctx *ctx)
2824
+{
29-
+ struct apk_dependency *d;
25+
+ struct apk_dependency d;
3026
+
3127
+ printf("Package: %s\n", pkg->name->name);
3228
+ printf("Version: " BLOB_FMT "\n", BLOB_PRINTF(*pkg->version));
3329
+ if (apk_array_len(pkg->depends)) {
3430
+ int i = 0;
3531
+
3632
+ printf("Depends: ");
37-
+ foreach_array_item(d, pkg->depends) {
33+
+ apk_array_foreach(d, pkg->depends) {
3834
+ i++;
3935
+ printf("%s%s", d->name->name, i < apk_array_len(pkg->depends) ? ", ": "\n");
4036
+ }
@@ -43,7 +39,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
4339
+ int i = 0;
4440
+
4541
+ printf("Provides: ");
46-
+ foreach_array_item(d, pkg->provides) {
42+
+ apk_array_foreach(d, pkg->provides) {
4743
+ i++;
4844
+ printf("%s%s", d->name->name, i < apk_array_len(pkg->provides) ? ", ": "\n");
4945
+ }
@@ -58,35 +54,41 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
5854
+ printf("\n");
5955
+}
6056
+
61-
static void filter_package(const struct apk_database *db, const struct apk_package *pkg, const struct list_ctx *ctx, const struct apk_name *name)
57+
static void print_package(const struct apk_database *db, const struct apk_name *name, const struct apk_package *pkg, const struct list_ctx *ctx)
6258
{
63-
if (ctx->match_origin && !origin_matches(ctx, pkg)) return;
64-
@@ -114,7 +149,9 @@ static void filter_package(const struct
65-
if (ctx->upgradable && !is_upgradable(db, pkg)) return;
66-
6759
if (ctx->match_providers) printf("<%s> ", name->name);
68-
- if (ctx->manifest)
69-
+ if (ctx->full)
60+
61+
+ if (ctx->full) {
7062
+ print_full(pkg, ctx);
71-
+ else if (ctx->manifest)
72-
print_manifest(pkg, ctx);
73-
else
74-
print_package(db, pkg, ctx);
75-
@@ -154,6 +191,7 @@ static int print_result(struct apk_datab
63+
+ return;
64+
+ }
65+
+
66+
if (ctx->manifest) {
67+
printf("%s " BLOB_FMT "\n", pkg->name->name, BLOB_PRINTF(*pkg->version));
68+
return;
69+
@@ -96,6 +137,7 @@ static void print_package(const struct apk_database *db, const struct apk_name *
7670
OPT(OPT_LIST_depends, APK_OPT_SH("d") "depends") \
77-
OPT(OPT_LIST_installed, APK_OPT_SH("I") "installed") \
71+
OPT(OPT_LIST_installed, APK_OPT_SH("I")) \
7872
OPT(OPT_LIST_manifest, "manifest") \
7973
+ OPT(OPT_LIST_full, "full") \
8074
OPT(OPT_LIST_origin, APK_OPT_SH("o") "origin") \
81-
OPT(OPT_LIST_orphaned, APK_OPT_SH("O") "orphaned") \
75+
OPT(OPT_LIST_orphaned, APK_OPT_SH("O")) \
8276
OPT(OPT_LIST_providers, APK_OPT_SH("P") "providers") \
83-
@@ -167,6 +205,9 @@ static int list_parse_option(void *pctx,
84-
struct list_ctx *ctx = pctx;
77+
@@ -109,6 +151,9 @@ static int list_parse_option(void *pctx, struct apk_ctx *ac, int opt, const char
78+
struct apk_query_spec *qs = &ac->query;
8579

8680
switch (opt) {
8781
+ case OPT_LIST_full:
8882
+ ctx->full = 1;
8983
+ break;
9084
case OPT_LIST_available:
91-
ctx->available = 1;
92-
ctx->orphaned = 0;
85+
qs->filter.available = 1;
86+
break;
87+
@@ -117,6 +162,7 @@ static int list_parse_option(void *pctx, struct apk_ctx *ac, int opt, const char
88+
break;
89+
case OPT_LIST_installed:
90+
installed:
91+
+ ctx->installed = 1;
92+
qs->filter.installed = 1;
93+
ac->open_flags |= APK_OPENF_NO_SYS_REPOS;
94+
break;

0 commit comments

Comments
 (0)