Bug 2223783 - after upgrading to libwbclient-4.18.3-100.el9.x86_64 there is a dangling symbolic link
Summary: after upgrading to libwbclient-4.18.3-100.el9.x86_64 there is a dangling symb...
Keywords:
Status: CLOSED DUPLICATE of bug 2216712
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: samba
Version: CentOS Stream
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Andreas Schneider
QA Contact: sssd-qe
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-07-18 22:13 UTC by Andrew Schorr
Modified: 2023-07-25 11:56 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-07-25 11:56:04 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-162666 0 None None None 2023-07-18 22:13:49 UTC

Description Andrew Schorr 2023-07-18 22:13:09 UTC
Description of problem:
After upgrading to libwbclient-4.18.3-100.el9.x86_64, I have this invalid symlink:
bash-5.1$ ls -l /etc/alternatives/libwbclient.so.0.15-64 
lrwxrwxrwx 1 root root 45 Jun 22  2022 /etc/alternatives/libwbclient.so.0.15-64 -> /usr/lib64/samba/wbclient/libwbclient.so.0.15
bash-5.1$ wc /etc/alternatives/libwbclient.so.0.15-64 
wc: /etc/alternatives/libwbclient.so.0.15-64: No such file or directory


Version-Release number of selected component (if applicable):
libwbclient-4.18.3-100.el9.x86_64


How reproducible:
Always

Steps to Reproduce:
1. rpm -Uvh libwbclient-4.18.3-100.el9.x86_64.rpm
2. wc /etc/alternatives/libwbclient.so.0.15-64
3.

Actual results:
wc: /etc/alternatives/libwbclient.so.0.15-64: No such file or directory


Expected results:
File does not exist


Additional info:
I think the preuninstall scriptlet is broken. It says:

bash-5.1$ rpm --scripts -q libwbclient
preuninstall scriptlet (using /bin/sh):
if [ $1 -eq 0 ]; then
    /usr/sbin/update-alternatives \
            --remove \
            libwbclient.so.0.16-64 \
            /usr/lib64/samba/wbclient/libwbclient.so.0.16
fi
/sbin/ldconfig
posttrans scriptlet (using /bin/sh):
# It has to be posttrans here to make sure all files of a previous version
# without alternatives support are removed
/usr/sbin/update-alternatives \
        --install \
        /usr/lib64/libwbclient.so.0.16 \
        libwbclient.so.0.16-64 \
        /usr/lib64/samba/wbclient/libwbclient.so.0.16 \
        10

I believe the [ $1 -eq 0 ] test means that the alternative is removed
only on uninstall, so an upgrade to a new version leaves the dangling
symlink behind.

Regards,
Andy

Comment 1 Andreas Schneider 2023-07-25 11:56:04 UTC

*** This bug has been marked as a duplicate of bug 2216712 ***


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