Richard W.M. Jones
2016-May-12 15:57 UTC
[Libguestfs] [PATCH 1/2] Revert "appliance: init: run ldconfig"
Running ldconfig adds about 100ms to the boot time. I would prefer that we understood which libraries need ldconfig to be run, and fix that. We could also consider running ldconfig in parallel, but since it might be required by just about any binary that the init script runs it's not clear what benefit that gives. This reverts commit 66aa98265dd215dcd4c717e7ef6845fbac859e54. --- appliance/init | 4 ---- 1 file changed, 4 deletions(-) diff --git a/appliance/init b/appliance/init index 413a95f..419434a 100755 --- a/appliance/init +++ b/appliance/init @@ -17,10 +17,6 @@ if [ ! -d /tmp ] || [ ! -d /var/tmp ]; then chmod 1777 /tmp /var/tmp fi -# Make sure to find all the libraries, also those in non-standard place -# but with a proper ld.so configuration pointing at them -ldconfig - # Try to print a stack trace for segfaults inside the appliance. for d in /lib64 /lib; do f=$d/libSegFault.so -- 2.7.4
Richard W.M. Jones
2016-May-12 15:57 UTC
[Libguestfs] [PATCH 2/2] appliance: Copy /etc/ld.so.cache from the host into the appliance.
Previously we were running ldconfig to create /etc/ld.so.cache. This is required, at least on Fedora, if we need to run any binary that uses a library with a weird path. libiscsi (a dependency of qemu-img, used by virt-dib) is an example of such a weird library, since it puts its single library into /usr/lib64/iscsi for no readily understandable reason, and drops a configuration file into /etc/ld.so.conf.d/ so that this new directory gets picked up. By copying the /etc/ld.so.cache from the host we get an already configured cache which should contain every library on the host, so there is no need to run ldconfig. --- appliance/hostfiles.in | 1 + 1 file changed, 1 insertion(+) diff --git a/appliance/hostfiles.in b/appliance/hostfiles.in index 8ff53b5..268d712 100644 --- a/appliance/hostfiles.in +++ b/appliance/hostfiles.in @@ -13,5 +13,6 @@ dnl SUSE=1 For OpenSUSE. dnl FRUGALWARE=1 For Frugalware. dnl MAGEIA=1 For Mageia. +/etc/ld.so.cache /lib/lsb/* /usr/share/augeas/lenses/*.aug -- 2.7.4
Pino Toscano
2016-May-13 12:14 UTC
Re: [Libguestfs] [PATCH 1/2] Revert "appliance: init: run ldconfig"
On Thursday 12 May 2016 16:57:55 Richard W.M. Jones wrote:> Running ldconfig adds about 100ms to the boot time. I would prefer > that we understood which libraries need ldconfig to be run, and fix > that. We could also consider running ldconfig in parallel, but since > it might be required by just about any binary that the init script > runs it's not clear what benefit that gives. > > This reverts commit 66aa98265dd215dcd4c717e7ef6845fbac859e54. > --- > appliance/init | 4 ---- > 1 file changed, 4 deletions(-) > > diff --git a/appliance/init b/appliance/init > index 413a95f..419434a 100755 > --- a/appliance/init > +++ b/appliance/init > @@ -17,10 +17,6 @@ if [ ! -d /tmp ] || [ ! -d /var/tmp ]; then > chmod 1777 /tmp /var/tmp > fi > > -# Make sure to find all the libraries, also those in non-standard place > -# but with a proper ld.so configuration pointing at them > -ldconfig > - > # Try to print a stack trace for segfaults inside the appliance. > for d in /lib64 /lib; do > f=$d/libSegFault.soSeems to work fine, the series LGTM. Thanks, -- Pino Toscano
Reasonably Related Threads
- [PATCH] appliance: Copy /etc/machine-id from host system into the appliance.
- [PATCH] appliance: init: run ldconfig
- [PATCH v3] daemon: Remove custom Augeas lenses.
- [PATCH v2] daemon: Remove custom Augeas lenses.
- [PATCH] build: improve and simplify distro detection