dosfstools provides mkfs.vfat/mkdosfs without clearing busybox symlink
Hi,
I was surprised today after installing dosfstools that mkfs.vfat was still in fact busybox's (the busybox implementation does not set label correctly, at least according to dosfstools fsck...)
b4381b59ea57:~# apk list busybox dosfstools
busybox-1.34.1-r2 x86_64 {busybox} (GPL-2.0-only) [installed]
dosfstools-4.2-r0 x86_64 {dosfstools} (GPL-3.0-or-later) [installed]
b4381b59ea57:~# apk info -L dosfstools | sed -ne 's:usr/sbin/::p' | while read f; do ls -l $(which $f); done
lrwxrwxrwx 1 root root 8 Nov 15 01:18 /usr/sbin/dosfsck -> fsck.fat
lrwxrwxrwx 1 root root 8 Nov 15 01:18 /usr/sbin/dosfslabel -> fatlabel
-rwxr-xr-x 1 root root 46832 Feb 1 2021 /usr/sbin/fatlabel
-rwxr-xr-x 1 root root 71408 Feb 1 2021 /usr/sbin/fsck.fat
lrwxrwxrwx 1 root root 8 Nov 15 01:18 /usr/sbin/fsck.msdos -> fsck.fat
lrwxrwxrwx 1 root root 8 Nov 15 01:18 /usr/sbin/fsck.vfat -> fsck.fat
lrwxrwxrwx 1 root root 12 Aug 4 20:19 /sbin/mkdosfs -> /bin/busybox
-rwxr-xr-x 1 root root 55576 Feb 1 2021 /usr/sbin/mkfs.fat
lrwxrwxrwx 1 root root 8 Nov 15 01:18 /usr/sbin/mkfs.msdos -> mkfs.fat
lrwxrwxrwx 1 root root 12 Aug 4 20:19 /sbin/mkfs.vfat -> /bin/busybox
I'd submit a MR but I'm not sure how to fix that?
The simplest way would be to install in /sbin instead of /usr/sbin, so installing the package automatically overwrites busybox symlinks?
Or would it be better with a post script that removes the symlinks instead? that can mess up shell hash table a bit but hopefully it shouldn't be that much of a problem in practice.
EDIT: hm, clearing the symlink does not seem to be a viable solution: the next run of busybox trigger /bin/busybox --install -s
will recreate these symlinks. Moving the install destination is the only thing I can think of.
Thanks!