Re: [PATCH v7 1/1] ldconfig: add --install option

Florian Weimer <[email protected]>
Newsgroups gmane.comp.lib.glibc.alpha
Message-ID <[email protected]>
* Andreas K. Huettel:

> Am Mittwoch, 8. Juli 2026, 04:31:23 Japanische Normalzeit schrieb Adhemerval Zanella Netto:
>> 
>> On 07/07/26 16:05, DJ Delorie wrote:
>> > Adhemerval Zanella Netto <[email protected]> writes:
>> >> On 30/06/26 18:28, DJ Delorie wrote:
>> >>> Add --install option, which copies a pre-built ld.so.cache into place,
>> >>> honoring the cache and root options and defaults.  This gives the user
>> >>> a canonical "correct" way to install a pre-built cache without risk
>> >>> of a program trying to load a partially-written file.
>> >>>
>> >>> Co-authored-by: Adhemerval Zanella Netto <[email protected]>
>> >>
>> >> This version looks good to me, thanks.
>> >>
>> >> Reviewed-by: Adhemerval Zanella  <[email protected]>
>> > 
>> > Thanks!
>> > 
>> > I'm assuming this is a post-2.44 patch, yes?
>> > 
>> 
>> It should be doable for 2.44 if Andreas is OK with this.
>> 
>
> It's small, well-separated, and doesnt affect existing operation. So yeah, I
> dont see any problems.
>
> Mostly I don't fully understand the use case yet, but that may be a problem 
> behind *my* keyboard and is irrelevant for the release... 
> Is the source file supposed to come from the live system (since it needs to 
> know all installed libraries)? or from some other magic source?

I think this needs a NEWS entry.  The dynamic linker keeps
/etc/ld.so.cache mapped continuously, so if you use cp to copy the
cache, it's more likely that it will lead to crashes because the size of
the mapping does not match the file contents.

Using ldconfig --install avoids that because doesn't overwrite the file
in place.  Using rsync (without --inplace) or GNU install would be fine,
too.

Thanks,
Florian
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.