Bugzilla – Bug 1193996
alts indirection breaks "dracut --install" and "tar --dereference" file gathering
Last modified: 2022-01-03 18:40:14 UTC
If a program such as "vim" is added to initramfs via dracut --install, Tumbleweed's new alts mechanism for handling alternatives means that Dracut places the "alts" binary in the initramfs image along with a "vim" symlink to it. /usr/share/libalternatives, /var/lib/alternatives and the actual vim binary are missing. This is a regression from symlink based alternatives handling. Dracut resolved dependencies across these chains just fine. I realize I'm commenting late here, but I don't understand why symlink based alternatives handling needed to be replaced with extra alts binary indirection. Is there a way I can go back to symlink based alternatives on my system?
Looks like dracut should be adapted for this. Re-assigning to dracut maintainers.
Thanks for the response, Adam... (In reply to Adam Majer from comment #1) > Looks like dracut should be adapted for this. Re-assigning to dracut > maintainers. I don't think modifying multiple (many?) archiving utilities to handle alts indirection is a viable way forward. Common utilities such as tar are also impacted by this new behaviour: > l /usr/bin/vim lrwxrwxrwx 1 root root 4 Dec 31 13:48 /usr/bin/vim -> alts* > tar -cf vim.tar --dereference /usr/bin/vim tar: Removing leading `/' from member names tar: Removing leading `/' from hard link targets > tar --list -f vim.tar usr/bin/vim > tar -x -f vim.tar --to-stdout usr/bin/vim > vim_from_tar_archive > chmod +x vim_from_tar_archive > ./vim_from_tar_archive --version > echo $? 255 The above example works fine on non-alts systems, e.g. Leap 15.3: > l /usr/bin/vim lrwxrwxrwx 1 root root 21 Mar 30 2021 /usr/bin/vim -> /etc/alternatives/vim* > l /etc/alternatives/vim lrwxrwxrwx 1 root root 18 Dec 22 12:20 /etc/alternatives/vim -> /usr/bin/vim-nox11* > tar -cf vim.tar --dereference /usr/bin/vim tar: Removing leading `/' from member names tar: Removing leading `/' from hard link targets > tar --list -f vim.tar usr/bin/vim > tar -x -f vim.tar --to-stdout usr/bin/vim > vim_from_tar_archive > chmod +x vim_from_tar_archive > ./vim_from_tar_archive --version VIM - Vi IMproved 8.0 (2016 Sep 12) I admire your effort to make dealing with alternatives more user friendly and I think a helper tool for listing and modifying alternatives makes sense. My issue is with the way alts binary indirection is used for path resolution instead of symlinks. alts binary indirection appears to be mostly be used for handling separate system-wide and user-specific alternatives. Could this instead be satisfied via separate symlinks under e.g. /usr/bin and /home/$user/bin, with priority governed by $PATH ordering?