~alpine/users

2 2

Some packages not restored after diskless mode reboot

Details
Message ID
<50365794bfc91478636a640a438f9d65@imc.sh>
DKIM signature
missing
Download raw message
I set up a diskless system following the instructions on the wiki. After rebooting the system, some packages are not being reinstalled. The missing packages come back after running `apk fix` manually. There are no errors displayed in the boot output (with quiet disabled) while the other packages are being installed.

```
# cat /etc/apk/world
alpine-base
busybox-mdev-openrc
cfdisk
chrony
file
htop
iftop
iotop
lsblk
openssh
samba
vim
```

One package that's not installing is `samba`. I've confirmed that samba packages are in the cache:
```
# ls /etc/apk/cache/ | grep samba
libauth-samba-4.20.6-r1.3c28fdae.apk
samba-client-4.20.6-r1.c1461f5a.apk
samba-client-libs-4.20.6-r1.c5095c38.apk
samba-common-4.20.6-r1.fe1d4120.apk
samba-common-server-libs-4.20.6-r1.8ec624e9.apk
samba-common-tools-4.20.6-r1.06ae6656.apk
samba-libs-4.20.6-r1.fa3bccb2.apk
samba-server-4.20.6-r1.a8602cf5.apk
samba-server-openrc-4.20.6-r1.a3abe0ae.apk
samba-util-libs-4.20.6-r1.68790877.apk
```

Inspecting the APKINDEX file in the cache, there's an entry for samba including its dependencies:
```
# tar -xvf /etc/apk/cache/APKINDEX.33b75773.tar.gz -O APKINDEX | grep -B
1 -A12 'P:samba$'
C:Q1FyDtEli/WhTz5qGizq/rDkJaLzk=
P:samba
V:4.20.6-r1
A:aarch64
S:1266
I:0
T:Tools to access a server's filespace and printers via SMB
U:https://www.samba.org/
L:GPL-3.0-or-later AND LGPL-3.0-or-later
o:samba
m:Natanael Copa <ncopa@alpinelinux.org>
t:1733128458
c:ca678c267486553e3a9046371475ded651977772
D:samba-server=4.20.6-r1 samba-client=4.20.6-r1 samba-common-tools=4.20.6-r1
```

Interestingly, manually attempting to install `samba` from the cache without the network also fails:
```
# apk add samba --no-network
ERROR: unable to select packages:
  samba-4.20.6-r1:
    masked in: --no-network
    satisfies: world[samba]
```

It appears that samba is somewhat special, in that it's a meta-package that has no apk file, but has dependencies on `samba-common-tools`, `samba-server`, and `samba-client`.  I've confirmed that if I explicitly add those three dependencies to my world, the packages do get installed after a reboot.

This feels to me like a bug with how apk handles populating at boot from its offline cache. It took me a long time to figure out that the meta-package was the issue, since apk silently continues during the boot process, never mentioning that it can't select the package.

-ian
Paul Zinselmeyer <paul@zmeyer.de>
Details
Message ID
<7bba7255-3953-4b25-a270-bc273311ec6e@zmeyer.de>
In-Reply-To
<50365794bfc91478636a640a438f9d65@imc.sh> (view parent)
DKIM signature
missing
Download raw message
Hello,
I've had a similar issue for 'grub-xenhost' on a diskless install.
I sadly cannot find where I've found the solution to this issue, but
I've fixed the issue by removing the reference to the installation media 
from '/etc/apk/repositories' (e.g. '/media/cdrom/cache') and updating 
the package cache with 'apk fix && apk cache download' (after setting up 
apkcache with 'setup-apkcache').

Kind Regards
Paul / pfzetto
Details
Message ID
<9acb998a68931ce3df971cf51f9fed14@imc.sh>
In-Reply-To
<7bba7255-3953-4b25-a270-bc273311ec6e@zmeyer.de> (view parent)
DKIM signature
missing
Download raw message
I ended up filing a bug report over to apk, and Timo Teräs has already authored a commit with a fix!

https://gitlab.alpinelinux.org/alpine/apk-tools/-/issues/11056

https://gitlab.alpinelinux.org/alpine/apk-tools/-/commit/78c3bdc03cbd8cd62d2f13526d86291b0585b71c
Reply to thread Export thread (mbox)