apk: update to Git HEAD (2025-02-08)
authorChristian Marangi <ansuelsmth@gmail.com>
Sun, 9 Feb 2025 15:04:56 +0000 (16:04 +0100)
committerChristian Marangi <ansuelsmth@gmail.com>
Tue, 18 Feb 2025 14:10:58 +0000 (15:10 +0100)
5f127fcc415c convdb: preserve newlines at the end of scripts
e94a2212a0d2 convdb: import package names starting with leading dot
9c0d353c7905 adbdump: use literal block if yaml quoting is needed
93c6a09a8ea8 improve compatibility of shellscripts
6c454d13de9b doc: fix pre/post commit hook documentation
3eb0b70b6d0f solver: rework solver name ordering to fix install_if handling
78c3bdc03cbd solver: make dependencies only packages selectable
373b364ef2a8 build: use the VERSION directly as the soname
6f627d93f5a0 update .gitignore
908f1ee7e87b index, add, pkg: check arch in 'add' only to allow 'index' to work
7c164c471251 index: Fix total always 0
0042b035df53 pkg, db: check arch on apk_db_pkg_add
ffc706689603 applet: always show help for global options
f6a66ebc5876 help: use uppercase usage prefix
7ebb23720483 doc: fix manpage sections
5e5e1f088986 genhelp: reorganize and add --debug output mode
9b371e452fb2 genhelp: do man page link wrangling for COMMANDS text only
2a87e46a354b context: introduce and use apknew_suffix
a6180e4cfa1a meson: add tests option
eb100676c5f0 test: move subdir unit to be the first
a12eae1780e8 test/user/hardlink: be portable to bsd-style stat(1)
f0c096bc034b db: attempt new mount user namespace for chroot in usermode
994e5e4e0006 db: fix "fetch --recurisve" to work
24d8f9677d77 Revert "database: move lock file from /lib/apk to /run/apk"
470432aafe77 applets: simplify option group handling
e1275e2f5010 apk: load global options from /etc/apk/config
8c39b525cd0c add support for repository package name specification
5856cf100241 doc, db: fix repository url_base to be allocated and fetch man page
a0411e87187e cache: fix not to remove indexes
cddca5769e98 apk, commit: support --cache-predownload to first download packages
915e9841ed1c ci: always test all features available
4f94807104e3 commit: print version numbers with --verbose --interactive summary
5bd6d49ac447 fetch: call progress early to avoid flicker
fc66fdfc49cd test: portability fixes
3f73ba343cbd test: shellcheck test suite for bash, dash and busybox
d94671bb1235 test: fixup sourcing testlib.sh to work better with shellcheck
6007db9cdde6 print: refactor progress printing API
a1d7042a2d3b print: further refactor progress API
bed4628c9317 print: reorganize progress to be renderred after apk_out
8cd7362a986c add process main loop to pipe stdout/stderr and logs it
ccfd7ac5e518 db: log script output using apk_process api
3c4594962fb4 db: log uvol output using apk_process api and add tests
fc7768c09497 io_url_wget: log wget output using apk_process api
90a62541751f build: only use VERSION up until first space for soname
378d6360ab17 db: rename apk_db_add_repository to add_repository
5d978c2a5924 db: split open_repository out of add_repository
af812cd28c6d print: simplify code a little bit
4c776eb74997 db: make index refresh notices a progress note
64e053071a89 db: fix non-repository reverese dependency indexing
3cf039322ce1 apk-tools-3.0.0_rc1
90220e710c61 commit: fixup progress during package removal
d11521ec6309 apk-tools-3.0.0_rc2
dc191820b1c4 solver: fix name resolving order of pure virtual names
7da628bc455f libfetch: remove remaining ftp references
10b467c0992a libfetch: remove error generation script
b5b130e1d628 print: flush after progress notice if needed
d71722b9a637 libfetch: rework error codes API
7b0b69a3023f commit: advise on using upgrade --prune and/or --available
1fd82ea2d7dc test: fix spelling s/shuld/should
8eb22149138f process: move apk_exit_status_str as static function
752ee96a25b1 db: refactor repository parsing and url printing
bfa763904fe4 doc: update apk-keys(5) and apk-repositories(5)
165333af1a35 db: introduce and use apk_db_foreach_repository
8e98d6889c92 libfetch: remove unused file scheme and manual pages
30b1c0348d6b remove usage of TRUE/FALSE
fa19887d741c crypto: use explicit algorithm fetching for openssl >=3.0
a706cbdfd5b1 crypto: remove support for obsolete md5
35a57547a7d7 db: remove APK_REPOSITORY_CACHED and use cache_repository
7f616711636c db: const correctness for apk_db_pkg_available
2cda62cd3a4c io: adjust scheme detection in apk_url_local_file()
50a2c12a32b8 db: make repo.url_index a pure blob
a186267a8822 db: make repo.url_base_printable prefix of url_index_printable
9fb473c6a269 add .editorconfig
088c584bf515 mkndx: introduce --filter-spec to filter existing index
0c3188793243 atom: remove apk_atomize_dup0
866374c7cda0 python: add initial python binding
bdf492471328 python: add unittests
9afe8dae79a0 ci: install python3-dev
df3424e5c8cd python: move version to a submodule
3e65a63aa4f1 apk-tools-3.0.0_rc3
946027f6abde test: extend blob_split tests
e73b5e313998 db: do not add empty arch
a6c84f8f62f7 atom: use null atom also for zero length blobs
fb8eef15dc52 db: handle not found names in __apk_db_foreach_sorted_package
0ef8a2223cca commit: don't trigger question with --prune/--available warning
fe484a5c06b9 atom: remove apk_atomize
70fc828cf06b update: make --update-cache and and 'update' behave the same
04e83acfb9b9 upgrade: fix previous commit
cdeebc01283d test: add mkpkg/add symlink test
c2f21ce06a67 mkpkg: do not include filename on error message
de0a4886a91c fs_fsys: do not leave temporary files after failed commit
e5e362c1a65c doc: update --cache-max-age documentation
8d41ff40b59a fetch: fix fetch_err_make() for 32-bit arches
2526fd73bc66 walk_gentext: make state per-module, use apk_ostream for output
bb65553e6423 walk_genadb: make state per-module
a920e5976127 adb_walk: rename scheme to start_scheme and always call end for it
92c573fac280 adb_walk: separate string and numeric values
fe4876bd3a4e adbdump: add support for json output
66cc8da577f0 walk_adb: always call the string scalar function
40bfa97ce3e3 adb: reset dynamic on freeing adb_obj
7519b70d42d1 convert adb_walk_gen* to apk_serializer_*
64c484730c9f add missing serialize.c
83e85aaee220 add missing apk_serialize.h
f70638e12ccc serializer: simplify schema and array handling
9bfc259d9fdb serializer: merge start_schema and start_object to one op
a23368b38ff6 serialize_yaml: improve quoting detection
3a33e75b92aa serialize_adb: move from libapk to apk executable
f5c3fd843824 info: fix -W with symlinks
d54fdb753135 update, version: do not print unavailable repositories
8223c10d4c33 doc: extract arguments are files
a3b4ebcefa3b serialize_yaml/adb: support single quoting, and fixes
77aff1daa967 db: fix --no-cache
f0e3aa4c139d mkpkg: do not call openat() with null pathname
28770f552f4e adb: fix adb_block_init check when extended block is needed
1ca73b6ae892 blob: apk_blob_push_int use uint64_t as value
0b159e23432e print: use uint64_t for progress api progress type
5da830ba51d0 db, commit, print: use uint64_t for file size types
a7b5d8d8eeb9 mkndx, extract: use uint64_t for file size types
639f8ab8d9cd io: use uint64_t for file size as needed
49905d47ee90 io: introduce and use apk_istream_skip
8d83f18647d4 defines: drop muldiv and mulmod helpers
d373a9a6971e db: drop now unused apk_repo_format_cache_index
5700b195d67d pkg: update script execution logging style
00c51e267162 pkg: cap sizes that are allowed for scripts and some v2 fields
5157c540d732 io: fix segment_close to read the inner stream
ad741fe98b72 db: implement system repository list configuration path
6ca1831ed563 use #pragma once instead of ifdef guards
64254d190b32 db, ctx: add and use allocator in apk_ctx
581825bb0811 fix handling of etc/apk/config options with an argument
508b312df637 apk: add APK_CONFIG to overwite path to config file
0e8e7e5a8264 test: fix busybox realpath compat
0186a6aa9d5c apk: support loading configuration options from /lib/apk/config
0c52242990f4 db: fix package name orphan check
a7766c933853 add: don't print misleading error after failed non-repository check
4254863de6ac introduce and use apk_array_foreach and apk_array_foreach_item
b276b3c50618 serialize: separate apk_ser_string and its multiline variant
91dc10b1cddf blob: introduce and use apk_blob_foreach_token
d345a9aa6d25 adbgen: split adbgen specific code to separate file
00522cd60e18 apk: introduce and use APK_OPTVAL_* macros
7f8a1ca12465 list, search: fix origin existence checks
b0bb4a99378b adb: allow copying larger arrays
3fe4258d4c1b mkndx: fix matching packages from old index
b263d961ba12 libfetch/http: reuse fetch_netrc_auth for http(s)
1d4ed5525f54 ctype: fix apk_blob_{spn,cspn} for non-ascii characters
1fa9f3c221c7 genhelp.lua: don't match underscores in the middle of words
48980518436f ctx, trust: load public keys also from lib/apk/keys
ba38d6584599 mkndx: remove --rewrite-arch
a9ea20e37029 context: fix --keys-dir
8abae4785c78 various: fix compilation error for missing inttypes.h
fdb10df21486 various: fix compilation error for missing limits.h
89ef2b546087 database: fix compilation error for missing sched.h
8afd4ab47200 process: correctly handle error from pipe2 and open
1cbbf7457721 crypto_openssl: make sha global variables constant for OpenSSL < 3
025710552ac8 io: fix compilation error for missing stdarg.h
908efa92701c libfetch: allow obsolete date format in http timestamps
70494b5bcdf9 apk: add support for boolean flag arguments
16ab8c549a06 apk: add --cache-packages to enable package caching always
460d62ee743c db: extend repositories file format with commands
34771ccb7964 apk-tools-3.0.0_rc4

Link: https://github.com/openwrt/openwrt/pull/17925
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
package/system/apk/Makefile
package/system/apk/patches/0001-openwrt-move-layer-db-to-temp-folder.patch
package/system/apk/patches/0002-meson-add-tests-option.patch [deleted file]
package/system/apk/patches/0010-app_list-add-full-print.patch

index 6ed07384c2f9dca727cc3f61932d38707c15534e..c57edb9a87eec8f2e0f36f91c5df40945dbe6d64 100644 (file)
@@ -1,13 +1,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=apk
-PKG_RELEASE:=2
+PKG_RELEASE:=1
 
 PKG_SOURCE_URL=https://gitlab.alpinelinux.org/alpine/apk-tools.git
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_DATE:=2024-11-30
-PKG_SOURCE_VERSION:=8d93a79fb8958607f097be2c4ac97f4596faf91d
-PKG_MIRROR_HASH:=565c87fac26e696c362c2fe85159cc3ed2fd27153f244c2e9dc0fd7fa67a4173
+PKG_SOURCE_DATE:=2025-02-08
+PKG_SOURCE_VERSION:=34771ccb7964b0e7cb5d1fc64bd1b83fe73296ba
+PKG_MIRROR_HASH:=fddd0334fa2ce7cc7fedb2cc95ee800caf9cbe43d617c2e612e2f58fc30b14c2
 
 PKG_VERSION=3.0.0_pre$(subst -,,$(PKG_SOURCE_DATE))
 
index aaf36310a0328318a8dd6b8897cf7eddfdea843d..eaeb36d10a2d2b377d451548668e25e014c5315d 100644 (file)
@@ -10,7 +10,7 @@ Signed-off-by: Paul Spooren <mail@aparcar.org>
 
 --- a/src/database.c
 +++ b/src/database.c
-@@ -1624,7 +1624,7 @@ const char *apk_db_layer_name(int layer)
+@@ -1832,7 +1832,7 @@ const char *apk_db_layer_name(int layer)
  {
        switch (layer) {
        case APK_DB_LAYER_ROOT: return "lib/apk/db";
diff --git a/package/system/apk/patches/0002-meson-add-tests-option.patch b/package/system/apk/patches/0002-meson-add-tests-option.patch
deleted file mode 100644 (file)
index 075d3a9..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-From a6180e4cfa1a98d361ffdce9e48857504997fbe9 Mon Sep 17 00:00:00 2001
-From: Rosen Penev <rosenp@gmail.com>
-Date: Tue, 3 Dec 2024 18:12:58 -0800
-Subject: [PATCH] meson: add tests option
-
-Allows disabling tests when not desired.
-
-Signed-off-by: Rosen Penev <rosenp@gmail.com>
----
- meson_options.txt     |  1 +
- test/meson.build      | 10 +++++++---
- test/unit/meson.build |  2 +-
- 3 files changed, 9 insertions(+), 4 deletions(-)
-
---- a/meson_options.txt
-+++ b/meson_options.txt
-@@ -6,6 +6,7 @@ option('docs', description: 'Build manpa
- option('help', description: 'Build help into apk binaries, needs lua', type: 'feature', value: 'auto')
- option('lua', description: 'Build luaapk (lua bindings)', type: 'feature', value: 'auto')
- option('lua_version', description: 'Lua version to build against', type: 'string', value: '5.3')
-+option('tests', description: 'Build tests', type: 'feature', value: 'auto')
- option('url_backend', description: 'URL backend', type: 'combo', choices: ['libfetch', 'wget'], value: 'libfetch')
- option('uvol_db_target', description: 'Default target for uvol database layer', type: 'string')
- option('zstd', description: 'Build with zstd support', type: 'boolean', value: true)
---- a/test/meson.build
-+++ b/test/meson.build
-@@ -1,10 +1,14 @@
-+enum_sh = find_program('enum.sh', required: get_option('tests'))
-+solver_sh = find_program('solver.sh', required: get_option('tests'))
-+
-+if not enum_sh.found() or not solver_sh.found()
-+      subdir_done()
-+endif
-+
- cur_dir = meson.current_source_dir()
- env = environment()
- env.set('APK', apk_exe.full_path())
--enum_sh = files('enum.sh')
--solver_sh = files('solver.sh')
--
- subdir('unit')
- foreach t : run_command(enum_sh, 'shell', check: true).stdout().strip().split(' ')
---- a/test/unit/meson.build
-+++ b/test/unit/meson.build
-@@ -1,4 +1,4 @@
--cmocka_dep = dependency('cmocka', required: false)
-+cmocka_dep = dependency('cmocka', required: get_option('tests'))
- if cmocka_dep.found()
index d0b2b7243d62dec03c852b70fae93d710dd8fad3..dd3343031098c19e7325986556667b1d9d640b61 100644 (file)
@@ -20,7 +20,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
  
        struct apk_string_array *filters;
  };
-@@ -118,6 +119,40 @@ static void print_manifest(const struct
+@@ -105,6 +106,40 @@ static void print_manifest(const struct
        printf("%s " BLOB_FMT "\n", pkg->name->name, BLOB_PRINTF(*pkg->version));
  }
  
@@ -60,11 +60,11 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
 +
  static void filter_package(const struct apk_database *db, const struct apk_package *pkg, const struct list_ctx *ctx, const struct apk_name *name)
  {
-       if (ctx->match_origin && !origin_matches(ctx, pkg))
-@@ -138,7 +173,9 @@ static void filter_package(const struct
-       if (ctx->match_providers)
-               printf("<%s> ", name->name);
+       if (ctx->match_origin && !origin_matches(ctx, pkg)) return;
+@@ -114,7 +149,9 @@ static void filter_package(const struct
+       if (ctx->upgradable && !is_upgradable(db, pkg)) return;
  
+       if (ctx->match_providers) printf("<%s> ", name->name);
 -      if (ctx->manifest)
 +      if (ctx->full)
 +              print_full(pkg, ctx);
@@ -72,7 +72,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
                print_manifest(pkg, ctx);
        else
                print_package(db, pkg, ctx);
-@@ -178,6 +215,7 @@ static int print_result(struct apk_datab
+@@ -154,6 +191,7 @@ static int print_result(struct apk_datab
        OPT(OPT_LIST_depends,           APK_OPT_SH("d") "depends") \
        OPT(OPT_LIST_installed,         APK_OPT_SH("I") "installed") \
        OPT(OPT_LIST_manifest,          "manifest") \
@@ -80,12 +80,13 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
        OPT(OPT_LIST_origin,            APK_OPT_SH("o") "origin") \
        OPT(OPT_LIST_orphaned,          APK_OPT_SH("O") "orphaned") \
        OPT(OPT_LIST_providers,         APK_OPT_SH("P") "providers") \
-@@ -191,6 +229,8 @@ static int option_parse_applet(void *pct
+@@ -167,6 +205,9 @@ static int list_parse_option(void *pctx,
        struct list_ctx *ctx = pctx;
  
        switch (opt) {
 +      case OPT_LIST_full:
 +              ctx->full = 1;
++              break;
        case OPT_LIST_available:
                ctx->available = 1;
                ctx->orphaned = 0;