This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC/PATCH] do not run ldconfig with DESTDIR installs


On Sunday 12 August 2012 09:20:29 Carlos O'Donell wrote:
> On Sun, Aug 12, 2012 at 2:15 AM, Mike Frysinger wrote:
> > On Tuesday 07 August 2012 18:47:50 Mike Frysinger wrote:
> >> There is no point in trying to scan the non-DESTDIR tree when we are
> >> doing a DESTDIR install.  It just wastes time and attempts to write
> >> to a path we most likely cannot update in the first place.
> > 
> > looks like i misread the behavior here.  ldconfig does only access/write
> > to things inside of the -r ROOT.  what threw me off was that if you run
> > this as non-root, ldconfig uses full paths everywhere (ROOT/etc/...). 
> > but if you run it as root, it first does chroot(ROOT), then uses
> > absolute paths after that (/etc...).  so if you miss that initial
> > chroot(), it looks like ldconfig is crapping all over places it
> > shouldn't.  so i guess i'll drop this patch from consideration.
> 
> Given your confusion do you think we need better documentation?
> 
> I would accept any trivial patch to add more comments to any set of
> files that would have helped make this clearer to a future maintainer.

the issue is that warnings issued after the chroot() lack the full path:

$ ldconfig -r /tmp/ /foo
ldconfig: Warning: ignoring configuration file that cannot be opened: 
/etc/ld.so.conf: No such file or directory
ldconfig: Can't create temporary cache file /tmp/etc/ld.so.cache~: No such file 
or directory

$ sudo ldconfig -r /tmp/ /foo
ldconfig: Warning: ignoring configuration file that cannot be opened: 
/etc/ld.so.conf: No such file or directory
ldconfig: Can't create temporary cache file /etc/ld.so.cache~: No such file or 
directory

this is what led me down the route of looking at its behavior via strace.  so 
it might be possible to improve this.
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]