Hi, Quoting Aurelien Jarno (2022-10-11 21:41:05) > On 2022-10-11 07:57, Johannes Schauer Marin Rodrigues wrote: > > Package: glibc > > Version: 2.35-3 > > Severity: normal > > Tags: patch > > > > Hi, > > > > when running libc-bin.postinst with DPKG_ROOT non-empty, ldconfig from > > the outside is used to operate on the chroot and thus ldconfig will > > never create the empty /var/cache/ldconfig directory inside the chroot. > > I don't get why this is needed. The point of calling ldconfig -r is to > create that directory and create the aux-cache file in it. In my tests > ldconfig does create that directory properly when ran with -r. > > > Please consider creating that directory if DPKG_ROOT is non-empty. > > Even if it ends up that in some conditions yet to be found, the > directory is not created, this doesn't seems correct. This means that > aux-cache file is also not created, which is more problematic. I now have a much better understanding about what is happening and filed this patch: https://sourceware.org/pipermail/libc-alpha/2022-October/142592.html The problem occurs only if the opt_chroot variable is not NULL. This happens when you pass -r but the chroot() call fails, for example because you are running as an unprivileged user with fakeroot. In that case, chroot_canon() will return NULL because /var/cache/ldconfig doesn't exist in the chroot yet. This leads to aux_cache_file being set to NULL and that means that in the end save_aux_cache() doesn't get called. Thanks! cheers, josch
Attachment:
signature.asc
Description: signature