Bug 2338142 - alternatives is unhappy when a file is moved from /usr/sbin to /usr/bin
Summary: alternatives is unhappy when a file is moved from /usr/sbin to /usr/bin
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: chkconfig
Version: 42
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Lukáš Nykrýn
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 2267022
TreeView+ depends on / blocked
 
Reported: 2025-01-15 10:46 UTC by Zbigniew Jędrzejewski-Szmek
Modified: 2025-03-15 00:44 UTC (History)
4 users (show)

Fixed In Version: chkconfig-1.32-1.fc42
Clone Of:
Environment:
Last Closed: 2025-03-15 00:44:11 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Zbigniew Jędrzejewski-Szmek 2025-01-15 10:46:31 UTC
Caused by https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin.
When rpm payload migrates from /usr/sbin to /usr/bin, if we change
the scriptlets from 'update-alternatives /usr/sbin/foo …' to
'update-alternatives /usr/bin/foo …', alternatives complains and actually
seems to remove all symlinks. On upgrades we somehow end up with no
symlinks at all.

See the discussion in https://src.fedoraproject.org/rpms/iptables/pull-request/10.

For iptables, PR10 essentially reverts the sbin merge for the affected files. They are kept under /usr/sbin. As discussed in the patch, this will prevent upgraded systems from being fully merged, but otherwise should be mostly OK. But in the long run we need to figure out a better solution. One option is to duplicate the alternatives calls for /usr/bin and /usr/sbin and somehow make alternatives work on upgraded systems. The other option would be make alternatives aware of the merge and treat /usr/sbin and /usr/bin as equivalent. 

Reproducible: Always

Comment 2 Yanko Kaneti 2025-01-16 14:46:31 UTC
FWIW. Starting with todays https://src.fedoraproject.org/lookaside/rpm-specs-latest.tar.xz

$ grep alternatives *.spec -l  | xargs grep _sbindir  -l | wc -l
93

Comment 3 Aoife Moloney 2025-02-26 13:24:15 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 42 development cycle.
Changing version to 42.

Comment 4 Fedora Update System 2025-03-13 16:39:22 UTC
FEDORA-2025-611b8a3c68 (chkconfig-1.32-1.fc42) has been submitted as an update to Fedora 42.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-611b8a3c68

Comment 5 Fedora Update System 2025-03-14 04:32:13 UTC
FEDORA-2025-611b8a3c68 has been pushed to the Fedora 42 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2025-611b8a3c68`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-611b8a3c68

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 6 Fedora Update System 2025-03-15 00:44:11 UTC
FEDORA-2025-611b8a3c68 (chkconfig-1.32-1.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.