Bug 28797 - glibc: %transfiletriggerin ldconfig isn't run when installing libraries into /usr/lib or /usr/lib64
Summary: glibc: %transfiletriggerin ldconfig isn't run when installing libraries into ...
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 8
Hardware: All Linux
Priority: Normal major
Target Milestone: Mageia 8
Assignee: Base system maintainers
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-17 20:27 CEST by Jani Välimaa
Modified: 2021-07-01 05:29 CEST (History)
1 user (show)

See Also:
Source RPM: glibc-2.32-15.mga8.src.rpm
CVE:
Status comment:


Attachments

Description Jani Välimaa 2021-04-17 20:27:28 CEST
Since porting ldconfig from file trigger to %transfiletriggerin scriptlet ldconfig isn't run for libraries installed into /usr/lib or /usr/lib64. It's run only for files in /lib and /lib64.

The change was made 5 years ago and this has been broken ever since.
https://svnweb.mageia.org/packages?view=revision&revision=873133

It's easy to test by installing any lib pkg we have with --debug-librpm urpmi switch. There's no mention about %transfiletriggerin in debug output and installed lib isn't found from ldconfig cache when querying it with 'ldconfig -p | grep libfoo.so.1'

Executing 'ldconfig -X' by hand as root makes new lib available in 'ldconfig -p' output.
Comment 1 Jani Välimaa 2021-04-17 20:30:25 CEST
Simple test case below. If lua 5.1 lib isn't installed one can skip urpme.

[wally@localhost ~]$ sudo urpme lib64lua5.1
removing lib64lua5.1-5.1.5-15.mga8.x86_64
removing package lib64lua5.1-5.1.5-15.mga8.x86_64
      1/1: removing lib64lua5.1-5.1.5-15.mga8.x86_64
                                 #############################################
[wally@localhost ~]$ sudo ldconfig -X
[wally@localhost ~]$ ldconfig -p|grep lua.so.5.1
[wally@localhost ~]$ sudo urpmi lib64lua5.1

installing lib64lua5.1-5.1.5-15.mga8.x86_64.rpm from /var/cache/urpmi/rpms     
Preparing...                     #############################################
      1/1: lib64lua5.1           #############################################
[wally@localhost ~]$ ldconfig -p|grep lua.so.5.1
[wally@localhost ~]$ sudo ldconfig -X
[wally@localhost ~]$ ldconfig -p|grep lua.so.5.1
	liblua.so.5.1 (libc6,x86-64) => /lib64/liblua.so.5.1
[wally@localhost ~]$
Jani Välimaa 2021-04-17 20:32:35 CEST

Whiteboard: (none) => MGA7TOO

Comment 2 Jani Välimaa 2021-04-17 20:37:04 CEST
After doing a fast search at least bug 24410 is caused by this.
Comment 3 Aurelien Oudelet 2021-04-17 20:37:59 CEST
I think Cauldron is affected.

Assigning to Basesystem maintainers group.

Source RPM: glibc-2.32-15.mga8.src.rpm => glibc-2.33-7.mga9.src.rpm glibc-2.32-15.mga8.src.rpm
Target Milestone: --- => Mageia 8
Assignee: bugsquad => basesystem
Version: 8 => Cauldron
CC: (none) => ouaurelien
Whiteboard: MGA7TOO => MGA7TOO MGA8TOO

Comment 4 Aurelien Oudelet 2021-04-17 20:39:42 CEST
(In reply to Jani Välimaa from comment #2)
> After doing a fast search at least bug 24410 is caused by this.

Nice catch Jani. This perhaps will explain other bugs...
Comment 5 Jani Välimaa 2021-04-17 20:42:58 CEST
Python scripts using ctypes.util.find_library() might be broken until ldconfig is run by hand.

For example python-enchant. Unneeded devel requires was added:
https://svnweb.mageia.org/packages?view=revision&revision=1645919
Comment 6 Jani Välimaa 2021-04-17 20:44:20 CEST
(In reply to Aurelien Oudelet from comment #3)
> I think Cauldron is affected.
> 
> Assigning to Basesystem maintainers group.

Cauldron is fixed already with glibc-2.33-8.mga9.

Version: Cauldron => 8
Source RPM: glibc-2.33-7.mga9.src.rpm glibc-2.32-15.mga8.src.rpm => glibc-2.32-15.mga8.src.rpm
Whiteboard: MGA7TOO MGA8TOO => MGA7TOO

Comment 7 Aurelien Oudelet 2021-04-17 20:53:16 CEST
(In reply to Jani Välimaa from comment #6)
> (In reply to Aurelien Oudelet from comment #3)
> > I think Cauldron is affected.
> > 
> > Assigning to Basesystem maintainers group.
> 
> Cauldron is fixed already with glibc-2.33-8.mga9.

Thanks, I did not know.
Comment 8 Thomas Backlund 2021-04-18 11:33:36 CEST
Nice find.

I wnoder why no-one has caught it before...
Maybe we have been lucky that some packages do forced run of ldconfig
 
and that some packages still use /lib/ and /lib64/ as install point...

I wonder it it would be best to do a versioned trigger to run ldconfig on upgrade to "auto-fix" the stuff like comment 5
Comment 9 Thomas Backlund 2021-07-01 05:29:19 CEST
An update for this issue has been pushed to the Mageia Updates repository.

https://advisories.mageia.org/MGASA-2021-0308.html

Resolution: (none) => FIXED
Status: NEW => RESOLVED
Whiteboard: MGA7TOO => (none)


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