apk-tools issueshttps://gitlab.alpinelinux.org/alpine/apk-tools/-/issues2019-07-14T07:29:02Zhttps://gitlab.alpinelinux.org/alpine/apk-tools/-/issues/1069apk info -e should exit with err when package is not installed2019-07-14T07:29:02ZNatanael Copaapk info -e should exit with err when package is not installedapk info -e says libiconv-dev is installed when it is not.
ncdev:~/aports/main/cryptsetup$ apk --version
apk-tools 2.3.0, compiled for x86.
ncdev:~/aports/main/cryptsetup$ abuild -r
>>> cryptsetup: Checking sanity of /ho...apk info -e says libiconv-dev is installed when it is not.
ncdev:~/aports/main/cryptsetup$ apk --version
apk-tools 2.3.0, compiled for x86.
ncdev:~/aports/main/cryptsetup$ abuild -r
>>> cryptsetup: Checking sanity of /home/ncopa/aports/main/cryptsetup/APKBUILD...
>>> cryptsetup: Analyzing dependencies...
>>> ERROR: cryptsetup: Conflicting package(s) installed: libiconv-dev
>>> ERROR: cryptsetup: all failed
ncdev:~/aports/main/cryptsetup$ sudo apk del libiconv-dev
OK: 428 MiB in 172 packages
ncdev:~/aports/main/cryptsetup$ apk info -e libiconv-dev; echo $?
0
ncdev:~/aports/main/cryptsetup$ grep libiconv-dev /lib/apk/db/installed
ncdev:~/aports/main/cryptsetup$
*(from redmine: issue id 1069, created on 2012-03-29, closed on 2012-04-26)*
* Changesets:
* Revision ebaf8305b5c9cc5bdc5d640f4cb25e058f7a2c26 by Timo Teräs on 2012-03-30T06:20:21Z:
```
info: fix exit code for -e
fixes #1069
```Timo TeräsTimo Teräs2012-04-30https://gitlab.alpinelinux.org/alpine/apk-tools/-/issues/10986xattrs are not correctly treated by audit2024-03-26T13:09:53ZDaniel Kolesaxattrs are not correctly treated by auditWhen you have binaries with xattrs, they will always show as `x` in audit:
```
x usr/bin/clockdiff
x usr/bin/ping
```
the binaries otherwise have correct permissions/xattrsWhen you have binaries with xattrs, they will always show as `x` in audit:
```
x usr/bin/clockdiff
x usr/bin/ping
```
the binaries otherwise have correct permissions/xattrshttps://gitlab.alpinelinux.org/alpine/apk-tools/-/issues/10984meson: openssl_static dependency in libfetch results in double linking2024-03-21T12:07:36ZDaniel Kolesameson: openssl_static dependency in libfetch results in double linkingThe recent changes brought in a libfetch dependency on openssl, however this results in openssl for now harmlessly being linked twice. Worse would be if it tried to link the second openssl statically, which it does not for now. Either wa...The recent changes brought in a libfetch dependency on openssl, however this results in openssl for now harmlessly being linked twice. Worse would be if it tried to link the second openssl statically, which it does not for now. Either way, it should only link once.
potential patch:
```
From 58feb1d66f8ec5e1f607dabd8c83ae725c3dc1ac Mon Sep 17 00:00:00 2001
From: q66 <q66@chimera-linux.org>
Date: Thu, 21 Mar 2024 12:04:58 +0100
Subject: [PATCH] libfetch: fix openssl dependency specification
We shouldn't include the full static linkage as it may accidentally
bring static openssl into the apk link path. We only care about the
includes here, so do that.
---
libfetch/meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libfetch/meson.build b/libfetch/meson.build
index 7406fbb..59ea789 100644
--- a/libfetch/meson.build
+++ b/libfetch/meson.build
@@ -38,7 +38,7 @@ libfetch = static_library(
'fetch',
libfetch_src,
c_args: libfetch_cargs,
- dependencies: openssl_static_dep,
+ dependencies: openssl_dep.partial_dependency(compile_args: true, includes: true),
)
libfetch_dep = declare_dependency(
--
2.44.0
```https://gitlab.alpinelinux.org/alpine/apk-tools/-/issues/10983can no longer extract packages as user since --usermode changes2024-03-21T12:36:12ZDaniel Kolesacan no longer extract packages as user since --usermode changesThe usermode changes were made for apk add, but do not account for manual package extraction.The usermode changes were made for apk add, but do not account for manual package extraction.https://gitlab.alpinelinux.org/alpine/apk-tools/-/issues/10982apk3: conflicts are broken since recently2024-03-20T18:37:56ZDaniel Kolesaapk3: conflicts are broken since recentlySome of the recent changes broke package conflicts. Instead, the `!` is stripped and it's considered a dependency. The actual package metadata in adb is still correct.Some of the recent changes broke package conflicts. Instead, the `!` is stripped and it's considered a dependency. The actual package metadata in adb is still correct.https://gitlab.alpinelinux.org/alpine/apk-tools/-/issues/10981apk3: running triggers now always leaves apk in error state2024-03-20T13:40:45ZDaniel Kolesaapk3: running triggers now always leaves apk in error state```
root@cbuild: ~$ apk fix base-shells
The following packages will be reinstalled:
base-shells
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? y
(1/1) Reinstalling base-shells (0.1-r0)
E...```
root@cbuild: ~$ apk fix base-shells
The following packages will be reinstalled:
base-shells
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? y
(1/1) Reinstalling base-shells (0.1-r0)
Executing base-shells-0.1-r0.trigger
Regenerating /etc/shells...
1 error; 1286 MiB in 145 packages
root@cbuild: ~$ apk fix
After this operation, 0 B of additional disk space will be used.
OK: 1286 MiB in 145 packages
root@cbuild: ~$ apk fix base-shells
The following packages will be reinstalled:
base-shells
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? y
(1/1) Reinstalling base-shells (0.1-r0)
Executing base-shells-0.1-r0.trigger
Regenerating /etc/shells...
1 error; 1286 MiB in 145 packages
```
Relevant commit is probably 60fec0bd3de1c3f8f6747fbc170765c69e0de438https://gitlab.alpinelinux.org/alpine/apk-tools/-/issues/10980apk3: segfaults since recent updates2024-03-20T15:06:42ZDaniel Kolesaapk3: segfaults since recent updatesTried to update in Chimera from c8c9df1825760e558f44397500af2a2f4bca18d4 to latest master.
Immediately encountered a segfault:
```
root@cbuild: ~$ apk add perl
The following NEW packages will be installed:
less perl
After this operat...Tried to update in Chimera from c8c9df1825760e558f44397500af2a2f4bca18d4 to latest master.
Immediately encountered a segfault:
```
root@cbuild: ~$ apk add perl
The following NEW packages will be installed:
less perl
After this operation, 51 MiB of additional disk space will be used.
Do you want to continue [Y/n]? y
(1/2) Installing less (643-r0)
(2/2) Installing perl (5.38.2-r0)
8% ███████████████ Segmentation fault (core dumped)
root@cbuild: ~$ lldb -c core.12
(lldb) target create --core "core.12"
Core file '/tmp/core.12' (x86_64) was loaded.sl-x86_64.so.1...
(lldb) bt
* thread #1, name = 'apk', stop reason = signal SIGSEGV: address not mapped to object
* frame #0: 0x00007c4e64fcbce1 libapk.so.2`apk_db_dir_prepare(db=0x000059597e8d3830, dir=0x00007c4e644c5c70) at database.c:276:20
frame #1: 0x00007c4e64fd949f libapk.so.2`apk_db_install_file(ectx=0x00007ffec51c63a0, ae=0x00007ffec51c3de8, is=0x0000000000000000) at database.c:2757:3
frame #2: 0x00007c4e64fdb5b4 libapk.so.2`apk_extract_v3_next_file [inlined] apk_extract_v3_directory(ectx=0x00007ffec51c63a0) at extract_v3.c:128:6
frame #3: 0x00007c4e64fdb3dc libapk.so.2`apk_extract_v3_next_file(ectx=0x00007ffec51c63a0) at extract_v3.c:164:8
frame #4: 0x00007c4e64fdb196 libapk.so.2`apk_extract_v3_data_block(db=0x00007ffec51c4088, b=<unavailable>, is=0x00007ffec51c3f60) at extract_v3.c:192:6
frame #5: 0x00007c4e64fbd630 libapk.so.2`adb_m_process at adb.c:244:7
frame #6: 0x00007c4e64fbd22c libapk.so.2`adb_m_process(db=0x00007ffec51c4088, is=0x00007c4e64832f30, expected_schema=<unavailable>, t=0x000059597e8d35b8, cb=<unavailable>) at adb.c:280:9
frame #7: 0x00007c4e64fdaf1d libapk.so.2`apk_extract_v3(ectx=0x00007ffec51c63a0, is=0x00007c4e64f04fc0) at extract_v3.c:253:6
frame #8: 0x00007c4e64fd4fe2 libapk.so.2`apk_db_install_pkg [inlined] apk_extract(ectx=<unavailable>, is=0x00007c4e64f04fc0) at extract_v3.c:292:41
frame #9: 0x00007c4e64fd4fdd libapk.so.2`apk_db_install_pkg [inlined] apk_db_unpack_pkg(db=0x000059597e8d3830, ipkg=0x00007c4e62fd2010, upgrade=<unavailable>, cb=(libapk.so.2`progress_cb at commit.c:129:37), cb_ctx=0x00007ffec51c64c0, script_args=0x00007ffec51c5240) at database.c:2996:6
frame #10: 0x00007c4e64fd4e21 libapk.so.2`apk_db_install_pkg(db=0x000059597e8d3830, oldpkg=0x0000000000000000, newpkg=0x00007c4e6399e610, cb=(libapk.so.2`progress_cb at commit.c:129:37), cb_ctx=0x00007ffec51c64c0) at database.c:3047:7
frame #11: 0x00007c4e64fc880a libapk.so.2`apk_solver_commit_changeset(db=0x000059597e8d3830, changeset=0x00007ffec51c65a0, world=0x00007c4e62a77a40) at commit.c:377:9
frame #12: 0x00007c4e64fca62e libapk.so.2`apk_solver_commit(db=0x000059597e8d3830, solver_flags=0, world=0x00007c4e62a77a40) at commit.c:813:7
frame #13: 0x000059597e861359 apk`add_main(ctx=0x00007c4e651039f0, ac=<unavailable>, args=0x00007c4e65163e50) at app_add.c:209:6
frame #14: 0x000059597e86073a apk`main(argc=1, argv=0x00007ffec51c7348) at apk.c:616:6
frame #15: 0x00007c4e65457bca ld-musl-x86_64.so.1`libc_start_main_stage2(main=(apk`main at apk.c:493), argc=<unavailable>, argv=0x00007ffec51c7338) at __libc_start_main.c:95:7
frame #16: 0x000059597e85fa76 apk`_start + 22
(lldb) p dir->owner
(apk_db_dir_instance *) NULL
```https://gitlab.alpinelinux.org/alpine/apk-tools/-/issues/10979make zstd dependency optional2024-03-16T13:15:07ZPaul Spoorenmake zstd dependency optionalWould be nice to have zstd support as a meson option, Ideally we don't force OpenWrt to include libzstd by default.Would be nice to have zstd support as a meson option, Ideally we don't force OpenWrt to include libzstd by default.https://gitlab.alpinelinux.org/alpine/apk-tools/-/issues/10978wrong progress bar after critical system upgrade2024-03-21T18:09:41ZSertonixwrong progress bar after critical system upgradeI noticed that the progress bar after a critical system upgrade used `#` even though apk should have used the unicode characters.
My guess is that when apk calls itself without passing variables that haven't been exported.I noticed that the progress bar after a critical system upgrade used `#` even though apk should have used the unicode characters.
My guess is that when apk calls itself without passing variables that haven't been exported.https://gitlab.alpinelinux.org/alpine/apk-tools/-/issues/10977`apk add` tries to set directory permissions when running as non-root user2024-03-11T13:54:53Zleso-kn`apk add` tries to set directory permissions when running as non-root userFrom the apk-tools documentation:
> ```
> --no-chown
> Do not change file owner or group. By default apk will manage the file
> ownership when running as root. However, this option is turned on when
> running as non-root user, a...From the apk-tools documentation:
> ```
> --no-chown
> Do not change file owner or group. By default apk will manage the file
> ownership when running as root. However, this option is turned on when
> running as non-root user, as changing file ownership is not permitted
> by the system then.
> ```
#### Reproducing the error
```bash
# as a non-root user
$ mkdir -p test-sysroot/etc/apk/keys
$ uname -m > test-sysroot/etc/apk/arch
$ cp /etc/apk/repositories test-sysroot/etc/apk
# let's try to install vim
$ apk --root=$PWD/test-sysroot add --initdb --allow-untrusted vim
(1/6) Installing vim-common (9.1.0-r1)
(2/6) Installing musl (1.2.5-r0)
(3/6) Installing xxd (9.1.0-r1)
(4/6) Installing ncurses-terminfo-base (6.4_p20231125-r0)
(5/6) Installing libncursesw (6.4_p20231125-r0)
(6/6) Installing vim (9.1.0-r1)
ERROR: 71 errors updating directory permissions
OK: 32 MiB in 6 packages
```
#### Expected behaviour
After vim is installed `apk` should not try to set any permissions, as `--no-chown` is implicitly passed by running as a non-root user.
**Note:** Passing `--no-chown` explicitly results in the same behaviour.
#### Actual behaviour
`apk` tries to set to set directory permissions despite the `--no-chown` flag in [database.c:2101](https://gitlab.alpinelinux.org/alpine/apk-tools/-/blob/6cd7f31d9bde79bb6361f2d2cbe37bfbafa342ea/src/database.c#L2101).https://gitlab.alpinelinux.org/alpine/apk-tools/-/issues/10975Remove .keep_* special case2024-02-19T13:53:29ZSertonixRemove .keep_* special caseapk includes a special case when installed directories have a name starting with `.keep_`.
[`src/database.c#L2623-L2624`](https://gitlab.alpinelinux.org/alpine/apk-tools/-/blob/c15eb020ffcbdac6a0c658100ec2e41da2d6e15f/src/database.c#L26...apk includes a special case when installed directories have a name starting with `.keep_`.
[`src/database.c#L2623-L2624`](https://gitlab.alpinelinux.org/alpine/apk-tools/-/blob/c15eb020ffcbdac6a0c658100ec2e41da2d6e15f/src/database.c#L2623-L2624)
```c
if (bfile.len > 6 && memcmp(bfile.ptr, ".keep_", 6) == 0)
return 0;
```
The code was there since the initial commit. I don't think it provides any purpose.
I would suggest removing that code or documenting it.
CC @fabled since you committed that codehttps://gitlab.alpinelinux.org/alpine/apk-tools/-/issues/10974apk3: --no-chown should skip over failed xattrs2024-03-11T15:10:37ZDaniel Kolesaapk3: --no-chown should skip over failed xattrsCurrently when a package has xattrs and the xattr setting fails (e.g. for security attributes), this prevents installation of the package with --no-chown when running apk as not root. It should probably ignore failed xattrs in that case.Currently when a package has xattrs and the xattr setting fails (e.g. for security attributes), this prevents installation of the package with --no-chown when running apk as not root. It should probably ignore failed xattrs in that case.v3.0https://gitlab.alpinelinux.org/alpine/apk-tools/-/issues/10973apk3: unversioned virtual providers are broken2024-03-20T19:28:11ZDaniel Kolesaapk3: unversioned virtual providers are brokenI created 3 packages, `testp`, `testq`, and `testr`. The first two provide an unversioned name `foopkg` while the latter depends on it.
Trying to install `testr` behaves correctly at first:
```
root@cbuild: ~$ apk add testr
ERROR: unab...I created 3 packages, `testp`, `testq`, and `testr`. The first two provide an unversioned name `foopkg` while the latter depends on it.
Trying to install `testr` behaves correctly at first:
```
root@cbuild: ~$ apk add testr
ERROR: unable to select packages:
foopkg (virtual):
note: please select one of the 'provided by' packages explicitly
provided by: testp testq
required by: testr-0.1-r0[foopkg]
```
I get asked to select one of the providers. I install one:
```
root@cbuild: ~$ apk add testp
The following NEW packages will be installed:
testp
After this operation, 4096 B of additional disk space will be used.
Do you want to continue [Y/n]? y
(1/1) Installing testp (0.1-r0)
OK: 606 MiB in 57 packages
```
However, when I try to install `testr` again after that, I get the following:
```
root@cbuild: ~$ apk add testr
ERROR: unable to select packages:
testp-0.1-r0:
breaks: testr-0.1-r0[foopkg]
satisfies: world[testp]
```
Installing the other provider as well breaks in the same way:
```
root@cbuild: ~$ apk add testq
The following NEW packages will be installed:
testq
After this operation, 4096 B of additional disk space will be used.
Do you want to continue [Y/n]? y
(1/1) Installing testq (0.1-r0)
OK: 606 MiB in 58 packages
root@cbuild: ~$ apk add testr
ERROR: unable to select packages:
testp-0.1-r0:
breaks: testr-0.1-r0[foopkg]
satisfies: world[testp]
testq-0.1-r0:
breaks: testr-0.1-r0[foopkg]
satisfies: world[testq]
```
The dependency specifications are fine:
```
root@cbuild: ~$ apk info --provides testp
testp-0.1-r0 provides:
foopkg
root@cbuild: ~$ apk info --provides testq
testq-0.1-r0 provides:
foopkg
root@cbuild: ~$ apk info --depends testr
testr-0.1-r0 depends on:
foopkg
```
Specifying the provider at add time does not help either:
```
root@cbuild: ~$ apk add testr testp
ERROR: unable to select packages:
testp-0.1-r0:
breaks: testr-0.1-r0[foopkg]
satisfies: world[testp]
testq-0.1-r0:
breaks: testr-0.1-r0[foopkg]
satisfies: world[testq]
```v3.0https://gitlab.alpinelinux.org/alpine/apk-tools/-/issues/10971mkpkg -f flag conflicts with global -f, --force flag2024-02-14T12:10:29ZWesley Mooremkpkg -f flag conflicts with global -f, --force flagSimilar to #10822 `mkpkg` has a short flag for `--files` of `-f` but this conflicts with the global `-f, --force` flag. If `-f` is passed then `mkpkg` does not include any files in the package.Similar to #10822 `mkpkg` has a short flag for `--files` of `-f` but this conflicts with the global `-f, --force` flag. If `-f` is passed then `mkpkg` does not include any files in the package.https://gitlab.alpinelinux.org/alpine/apk-tools/-/issues/10970Segfault when writing database on `apk fix`2024-01-14T07:32:13ZPatrycja Rosaalpine@ptrcnull.meSegfault when writing database on `apk fix`i'm not quite sure how to debug this...
version: 2.14.0-r5, running on Alpine edge
```
$ doas nano /etc/apk/world
$ doas apk fix
fetch https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
fetc...i'm not quite sure how to debug this...
version: 2.14.0-r5, running on Alpine edge
```
$ doas nano /etc/apk/world
$ doas apk fix
fetch https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz
fetch https://repo.ptrc.gay/ptrcports/x86_64/APKINDEX.tar.gz
fetch https://mirror.postmarketos.org/postmarketos/master/x86_64/APKINDEX.tar.gz
(1/36) Purging .makedepends-bcachefs-tools (20231128.033928)
(2/36) Purging clang17-dev (17.0.5-r0)
(3/36) Purging libaio-dev (0.3.113-r2)
(4/36) Purging libsodium-dev (1.0.19-r0)
(5/36) Purging keyutils-dev (1.6.3-r3)
(6/36) Purging lz4-dev (1.9.4-r5)
(7/36) Purging userspace-rcu-dev (0.14.0-r2)
(8/36) Purging .makedepends-firefox (20231210.205110)
(9/36) Purging hunspell-dev (1.7.2-r4)
(10/36) Purging libevent-dev (2.1.12-r7)
(11/36) Purging libtheora-dev (1.1.1-r18)
(12/36) Purging libvpx-dev (1.13.1-r0)
(13/36) Purging libxt-dev (1.3.0-r4)
(14/36) Purging lld-doc (17.0.5-r0)
(15/36) Purging lld (17.0.5-r0)
(16/36) Purging llvm17-dev (17.0.5-r0)
(17/36) Purging llvm17-test-utils-pyc (17.0.5-r0)
(18/36) Purging llvm17-test-utils (17.0.5-r0)
(19/36) Purging nasm-doc (2.16.01-r2)
(20/36) Purging nasm (2.16.01-r2)
(21/36) Purging nss-dev (3.94-r0)
(22/36) Purging pipewire-dev (1.0.0-r0)
(23/36) Purging wasi-sdk (20-r3)
(24/36) Purging wasi-libc (0.20231012-r0)
(25/36) Purging wasi-libcxx (17.0.5-r0)
(26/36) Purging wireless-tools-dev (30_pre9-r4)
(27/36) Purging .makedepends-hledger-stockquotes (20231119.055847)
(28/36) Purging .makedepends-pandoc-cli (20231107.221958)
(29/36) Purging cabal-doc (3.10.2.1-r0)
(30/36) Purging cabal (3.10.2.1-r0)
(31/36) Purging ghc-doc (9.4.8-r0)
(32/36) Purging ghc (9.4.8-r0)
(33/36) Purging llvm14 (14.0.6-r17)
(34/36) Purging lld-libs (17.0.5-r0)
(35/36) Purging llvm14-libs (14.0.6-r17)
(36/36) Purging nspr-dev (4.35-r4)
Executing busybox-1.36.1-r16.trigger
zsh: segmentation fault (core dumped) doas apk fix
```
<details>
<summary>gdb backtrace</summary>
```
$ gdb -q /sbin/apk core-apk-11-0-0-8265-1705133663
Reading symbols from /sbin/apk...
Reading symbols from /usr/lib/debug//sbin/apk.debug...
[New LWP 8265]
Core was generated by `apk fix'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 apk_db_write_fdb (db=db@entry=0x555f5abde880 <db>, os=os@entry=0x7f7774c2df30) at src/database.c:962
warning: 962 src/database.c: No such file or directory
(gdb) bt full
#0 apk_db_write_fdb (db=db@entry=0x555f5abde880 <db>, os=os@entry=0x7f7774c2df30) at src/database.c:962
ipkg = 0x0
pkg = <optimized out>
ppkg = 0x7f7776b132c8
pkgs = 0x7f7776b132c0
diri = <optimized out>
file = <optimized out>
c1 = <optimized out>
c2 = <optimized out>
buf = "r\230~zw\177\000\000\000\350\227m\375\177\000\000\a\000\000\0001/Teh\346\227m\375\177\000\000\a\000\000\000ict/\a\000\000\000\000\000\000\000\200\346\227m\375\177\000\000\000\347\227m\375\177\000\000\362\"\203zw\177\000\000\a\000\000\000w\177\000\000\000\000\000\000\a\000\000\000\037\000\000\000\000\000\000\000\272`7zw\177\000\000=\372vzw\177\000\000\231\2606zw\177\000\000\220\022\354tw\177\000\000\001\000\000\000\000\000\000\000\037\000\000\000\000\000\000\000]\245{zw\177\000\000H<\213[_U\000\000\\\303~zw\177\000\000\000\350\227m\375\177\000\000\000\000\000\000\000\000\000\000\356\347\227m\375\177\000\000h\346\227m\375\177\000\000"...
bbuf = {len = 5120, ptr = 0x7ffd6d97e578 "r\230~zw\177"}
r = 0
__mptr = <optimized out>
__mptr = <optimized out>
#1 0x00007f777a75cf63 in apk_db_write_config (db=db@entry=0x555f5abde880 <db>) at src/database.c:1763
os = 0x7f7774c2df30
r = <optimized out>
#2 0x00007f777a760b7a in apk_solver_commit_changeset (db=db@entry=0x555f5abde880 <db>, changeset=changeset@entry=0x7ffd6d97fb30, world=world@entry=0x7f777a05d4a0) at src/commit.c:374
prog = {done = {changes = 36, bytes = 0, packages = 36}, total = {changes = 36, bytes = 0, packages = 36}, pkg = 0x0}
change = <optimized out>
buf = "(37/36)", '\000' <repeats 13 times>, "\376\017\000\000\000\000\000\000\000\000\000"
size_unit = <optimized out>
humanized = 0
size_diff = <optimized out>
download_size = <optimized out>
r = <optimized out>
errors = 0
__func__ = "apk_solver_commit_changeset"
#3 0x00007f777a7610f6 in apk_solver_commit (db=0x555f5abde880 <db>, solver_flags=<optimized out>, world=0x7f777a05d4a0) at src/commit.c:785
changeset = {num_install = 0, num_remove = 36, num_adjust = 0, num_total_changes = 36, changes = 0x7f77744b9030}
r = 0
#4 0x0000555f5abd1db2 in main (argc=0, argv=<optimized out>) at src/apk.c:621
ctx = 0x7f777a74bcd0
dbopts = {lock_wait = 0, cache_max_age = 0, open_flags = 2, root = 0x0, arch = 0x0, keys_dir = 0x0, cache_dir = 0x7f777a76f627 "etc/apk/cache", repositories_file = 0x0,
protected_paths = {len = 0, ptr = 0x0}, repository_list = {next = 0x7ffd6d97fbd8, prev = 0x7ffd6d97fbd8}}
args = 0x7f777a77a7a0 <dummy_array>
applet = <optimized out>
r = 0
```
</details>https://gitlab.alpinelinux.org/alpine/apk-tools/-/issues/10969document files/dirs used by apk in man page2024-03-27T10:47:33ZSertonixdocument files/dirs used by apk in man pageapk uses files spread across the system. To find these it is needed to dig through the source code.
For example I wasn't able to find info about `/etc/apk/repositories.d/` and `/etc/apk/commit_hooks.d/` without looking at the source.
I...apk uses files spread across the system. To find these it is needed to dig through the source code.
For example I wasn't able to find info about `/etc/apk/repositories.d/` and `/etc/apk/commit_hooks.d/` without looking at the source.
I have seen other man pages listing the relevant files so it would be nice to have that for apk too.https://gitlab.alpinelinux.org/alpine/apk-tools/-/issues/10968Pass interactive flag to triggers2024-01-29T08:43:50ZSertonixPass interactive flag to triggersIt would be nice for triggers to know if apk is run interactively. That would allow triggers to provide some user choice if they want to do something or not. eg. grub trigger.
I think an environmental variable would be the best way. `AP...It would be nice for triggers to know if apk is run interactively. That would allow triggers to provide some user choice if they want to do something or not. eg. grub trigger.
I think an environmental variable would be the best way. `APK_IS_INTERACTIVE=1` maybe. I think that the name makes clear that this is not a variable to make apk interactive.
This doesn't work with parallel triggers (#10760). So if they are added that would need to be disabled in interactive mode.
Idea comes from aports#15653 since it would benefit from interactivity when possible.https://gitlab.alpinelinux.org/alpine/apk-tools/-/issues/10967add compilation option for --ignore-busybox-symlinks2024-03-22T13:36:14ZSertonixadd compilation option for --ignore-busybox-symlinksThe `--ignore-busybox-symlinks` only (needs to) exist cause of the way busybox is packaged on alpine. Since other distros using apk don't need the option it would be nice to disable it at compile time. Maybe disabled by default and enabl...The `--ignore-busybox-symlinks` only (needs to) exist cause of the way busybox is packaged on alpine. Since other distros using apk don't need the option it would be nice to disable it at compile time. Maybe disabled by default and enabled for alpine.https://gitlab.alpinelinux.org/alpine/apk-tools/-/issues/10966apk3: apk fix --no-chown2024-02-05T12:35:47ZSertonixapk3: apk fix --no-chown`apk add` has the `--no-chown` flag. Since `apk fix` (and maybe others) can also trigger file creation it would make sense to add the flag there too.
I think it would fit under the commit options.`apk add` has the `--no-chown` flag. Since `apk fix` (and maybe others) can also trigger file creation it would make sense to add the flag there too.
I think it would fit under the commit options.https://gitlab.alpinelinux.org/alpine/apk-tools/-/issues/10965APK --force-broken-world shouldn't default to a soluton where the package I'm...2024-03-26T14:04:03ZEllieAPK --force-broken-world shouldn't default to a soluton where the package I'm targeting is simply uninstalledThis concerns apk, packaged as apk-tools 2.14.0 on current stable postmarketOS 23.06 as of 2023-12-28.
Let me demonstrate, steps to reproduce **(this breaks your packages!!!** Reasoning however is explained below):
1. Install postmarke...This concerns apk, packaged as apk-tools 2.14.0 on current stable postmarketOS 23.06 as of 2023-12-28.
Let me demonstrate, steps to reproduce **(this breaks your packages!!!** Reasoning however is explained below):
1. Install postmarketOS 23.06 stable, **not** edge, as found today 2023-12-28 with no later service packs or updates.
2. In a terminal, run: `wget https://gitlab.gnome.org/GNOME/gnome-system-monitor/uploads/d3d43f1845d021eee2b1217cc7776607/gnome-system-monitor-45.0.2_p1-r1.apk` (for what it's worth, info about the package source: https://gitlab.gnome.org/GNOME/gnome-system-monitor/-/merge_requests/112#note_1955032 )
3. In a terminal run **(super unsafe, at your own risk):** `sudo apk add --allow-untrusted gnome-system-monitor-45.0.2_p1-r1.apk` which shouldn't work, but rather give you a dependency error: `ERROR: unable to select packages: so:libc.musl-x86_64.so.1 (no such package)`
4. In a terminal run **(extremely unsafe and breaks your system):** `sudo apk add --allow-broken-world --allow-untrusted gnome-system-monitor-45.0.2_p1-r1.apk`
Now what happens, why is that unexpected, and what did I expect instead:
As a result of the last command, apk simply removed gnome-system-monitor as a program entirely from the system. This doesn't seem like a useful or expected behavior to me for this command. To explain my reasoning, I made a risky guess that maybe despite the dependency on the newer musl libc, the given package would maybe manage to run fine with the older one. I was willing to accept crashes and issues due to this, so my intention here was "please proceed even if the dependencies can't be fully satisfied". That seems to be what `--force-broken-world` suggests it would do.
The current behavior however doesn't seem useful in any scenario I can think of since it seems to be the equivalent of `apk del --purge gnome-system-monitor` which I could have just run instead, and effectively it doesn't even seem to touch or use the apk file I pointed it to. That seems kind of nonsensical, since if I want to convince it to do something with the given package on disk, an operation that ends up not using it doesn't really seem to be what a user would be after.