* [PATCH 0/1] add USE_LDCONFIG_CONF_D
@ 2014-07-28 18:39 Peter Seebach
2014-07-28 18:39 ` [PATCH 1/1] Add support for ld.so.conf.d Peter Seebach
0 siblings, 1 reply; 6+ messages in thread
From: Peter Seebach @ 2014-07-28 18:39 UTC (permalink / raw)
To: openembedded-core
It'd be nice to support ld.so.conf.d, but it'd also be nice
if it were optional. I made the default be zero because I don't want
to change behavior on people without warning. Lightly tested, but
since I don't actually have a use case for this lying around I
can't promise it solves all the things.
The main intended benefit is that packages can install files
in ld.so.conf without stepping on each other.
The following changes since commit 91ca6b1b2e009381d8e813906654c0958eee7efc:
lib/oe/rootfs: Improve error message whitespace (2014-07-28 12:20:56 +0100)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib seebs/ldsoconfd
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=seebs/ldsoconfd
Peter Seebach (1):
Add support for ld.so.conf.d
meta/recipes-core/eglibc/eglibc-package.inc | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/1] Add support for ld.so.conf.d
2014-07-28 18:39 [PATCH 0/1] add USE_LDCONFIG_CONF_D Peter Seebach
@ 2014-07-28 18:39 ` Peter Seebach
2014-07-28 18:47 ` Khem Raj
0 siblings, 1 reply; 6+ messages in thread
From: Peter Seebach @ 2014-07-28 18:39 UTC (permalink / raw)
To: openembedded-core
The default behavior for USE_LDCONFIG is to use an empty ld.so.conf.
In some cases, it might be desireable to have an ld.so.conf.d directory,
and inherit files from there. This is a common enough use case to
justify support in the recipe, but not common enough to make it the
default. So, eglibc gets a new USE_LDCONFIG_CONF_D value, default 0.
If it's set to 1, we create the directory and add an "include" line
for it to ld.so.conf.
Signed-off-by: Peter Seebach <peter.seebach@windriver.com>
---
meta/recipes-core/eglibc/eglibc-package.inc | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/meta/recipes-core/eglibc/eglibc-package.inc b/meta/recipes-core/eglibc/eglibc-package.inc
index c357a13..8026199 100644
--- a/meta/recipes-core/eglibc/eglibc-package.inc
+++ b/meta/recipes-core/eglibc/eglibc-package.inc
@@ -16,6 +16,9 @@ python __anonymous () {
# Set this to zero if you don't want ldconfig in the output package
USE_LDCONFIG ?= "1"
+# Set this to one if you want ld.so.conf to include ld.so.conf.d/*
+# by default.
+USE_LDCONFIG_CONF_D ?= "0"
PACKAGES = "${PN}-dbg catchsegv sln nscd ldd tzcode ${PN}-utils eglibc-thread-db ${PN}-pic libcidn libmemusage libsegfault ${PN}-pcprofile libsotruss ${PN} eglibc-extra-nss ${PN}-dev ${PN}-staticdev ${PN}-doc"
@@ -33,7 +36,7 @@ RPROVIDES_${PN}-pcprofile = "glibc-pcprofile"
RPROVIDES_${PN}-dbg = "glibc-dbg"
libc_baselibs = "${base_libdir}/libcrypt*.so.* ${base_libdir}/libcrypt-*.so ${base_libdir}/libc.so.* ${base_libdir}/libc-*.so ${base_libdir}/libm*.so.* ${base_libdir}/libm-*.so ${base_libdir}/ld*.so.* ${base_libdir}/ld-*.so ${base_libdir}/libpthread*.so.* ${base_libdir}/libpthread-*.so ${base_libdir}/libresolv*.so.* ${base_libdir}/libresolv-*.so ${base_libdir}/librt*.so.* ${base_libdir}/librt-*.so ${base_libdir}/libutil*.so.* ${base_libdir}/libutil-*.so ${base_libdir}/libnsl*.so.* ${base_libdir}/libnsl-*.so ${base_libdir}/libnss_files*.so.* ${base_libdir}/libnss_files-*.so ${base_libdir}/libnss_compat*.so.* ${base_libdir}/libnss_compat-*.so ${base_libdir}/libnss_dns*.so.* ${base_libdir}/libnss_dns-*.so ${base_libdir}/libdl*.so.* ${base_libdir}/libdl-*.so ${base_libdir}/libanl*.so.* ${base_libdir}/libanl-*.so ${base_libdir}/libBrokenLocale*.so.* ${base_libdir}/libBrokenLocale-*.so"
-FILES_${PN} = "${libc_baselibs} ${libexecdir}/* ${@base_conditional('USE_LDCONFIG', '1', '${base_sbindir}/ldconfig ${sysconfdir}/ld.so.conf', '', d)}"
+FILES_${PN} = "${libc_baselibs} ${libexecdir}/* ${@base_conditional('USE_LDCONFIG', '1', '${base_sbindir}/ldconfig ${sysconfdir}/ld.so.conf ${sysconfdir}/ld.so.conf.d', '', d)}"
FILES_ldd = "${bindir}/ldd"
FILES_libsegfault = "${base_libdir}/libSegFault*"
FILES_libcidn = "${base_libdir}/libcidn-*.so ${base_libdir}/libcidn.so.*"
@@ -99,6 +102,11 @@ do_install_append () {
if [ -d ${D}${sysconfdir} ]; then
rmdir ${D}${sysconfdir}
fi
+ else
+ if [ "${USE_LDCONFIG_CONF_D}" = "1" ]; then
+ mkdir -p ${D}${sysconfdir}/ld.so.conf.d
+ echo "include ld.so.conf.d/*.conf" >> ${D}${sysconfdir}/ld.so.conf
+ fi
fi
}
--
1.7.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] Add support for ld.so.conf.d
2014-07-28 18:39 ` [PATCH 1/1] Add support for ld.so.conf.d Peter Seebach
@ 2014-07-28 18:47 ` Khem Raj
2014-07-28 18:59 ` Mark Hatle
2014-07-28 19:03 ` Peter Seebach
0 siblings, 2 replies; 6+ messages in thread
From: Khem Raj @ 2014-07-28 18:47 UTC (permalink / raw)
To: Peter Seebach; +Cc: Patches and discussions about the oe-core layer
On Mon, Jul 28, 2014 at 11:39 AM, Peter Seebach
<peter.seebach@windriver.com> wrote:
> The default behavior for USE_LDCONFIG is to use an empty ld.so.conf.
> In some cases, it might be desireable to have an ld.so.conf.d directory,
> and inherit files from there. This is a common enough use case to
> justify support in the recipe, but not common enough to make it the
> default. So, eglibc gets a new USE_LDCONFIG_CONF_D value, default 0.
> If it's set to 1, we create the directory and add an "include" line
> for it to ld.so.conf.
the patch is good but introducing another variable is not needed you
can cover it under US_LDCONFIG itself, ldconfig with empty ld.so.conf
will still parse standard lib search paths anyway
Secondly when we use ldconfig it generates ld.so.cache under /etc
so I hope we take care of this when we have ro-rootfs
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] Add support for ld.so.conf.d
2014-07-28 18:47 ` Khem Raj
@ 2014-07-28 18:59 ` Mark Hatle
2014-07-28 20:55 ` Peter Seebach
2014-07-28 19:03 ` Peter Seebach
1 sibling, 1 reply; 6+ messages in thread
From: Mark Hatle @ 2014-07-28 18:59 UTC (permalink / raw)
To: openembedded-core
On 7/28/14, 1:47 PM, Khem Raj wrote:
> On Mon, Jul 28, 2014 at 11:39 AM, Peter Seebach
> <peter.seebach@windriver.com> wrote:
>> The default behavior for USE_LDCONFIG is to use an empty ld.so.conf.
>> In some cases, it might be desireable to have an ld.so.conf.d directory,
>> and inherit files from there. This is a common enough use case to
>> justify support in the recipe, but not common enough to make it the
>> default. So, eglibc gets a new USE_LDCONFIG_CONF_D value, default 0.
>> If it's set to 1, we create the directory and add an "include" line
>> for it to ld.so.conf.
>
> the patch is good but introducing another variable is not needed you
> can cover it under US_LDCONFIG itself, ldconfig with empty ld.so.conf
> will still parse standard lib search paths anyway
>
> Secondly when we use ldconfig it generates ld.so.cache under /etc
> so I hope we take care of this when we have ro-rootfs
>
In a read-only root case, the ld.so.cache is generated in the cross environment.
I don't know if the cross ldconfig knows about the includes though. Someone
will have to check that.
--Mark
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] Add support for ld.so.conf.d
2014-07-28 18:47 ` Khem Raj
2014-07-28 18:59 ` Mark Hatle
@ 2014-07-28 19:03 ` Peter Seebach
1 sibling, 0 replies; 6+ messages in thread
From: Peter Seebach @ 2014-07-28 19:03 UTC (permalink / raw)
To: Khem Raj; +Cc: Patches and discussions about the oe-core layer
On Mon, 28 Jul 2014 11:47:30 -0700
Khem Raj <raj.khem@gmail.com> wrote:
> the patch is good but introducing another variable is not needed you
> can cover it under US_LDCONFIG itself, ldconfig with empty ld.so.conf
> will still parse standard lib search paths anyway
The reason I wanted another variable is to control the creation of a
*non-empty* ld.so.conf that would pick up other config files. The idea
is that if you wanted to add a non-standard library search path, you
could create a file in ld.so.conf.d. I didn't want to make the file
have contents unconditionally.
> Secondly when we use ldconfig it generates ld.so.cache under /etc
> so I hope we take care of this when we have ro-rootfs
I assume that's already working for the existing empty ld.so.conf you get
with USE_LDCONFIG=1.
It does occur to me that I don't know whether our cross-ldconfig knows
this syntax. I'll double-check that.
-s
--
Listen, get this. Nobody with a good compiler needs to be justified.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] Add support for ld.so.conf.d
2014-07-28 18:59 ` Mark Hatle
@ 2014-07-28 20:55 ` Peter Seebach
0 siblings, 0 replies; 6+ messages in thread
From: Peter Seebach @ 2014-07-28 20:55 UTC (permalink / raw)
To: Mark Hatle; +Cc: openembedded-core
On Mon, 28 Jul 2014 13:59:20 -0500
Mark Hatle <mark.hatle@windriver.com> wrote:
> In a read-only root case, the ld.so.cache is generated in the cross environment.
> I don't know if the cross ldconfig knows about the includes though. Someone
> will have to check that.
It appears to be the same source, so it has the functionality at least in the
code.
-s
--
Listen, get this. Nobody with a good compiler needs to be justified.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-07-28 20:55 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-28 18:39 [PATCH 0/1] add USE_LDCONFIG_CONF_D Peter Seebach
2014-07-28 18:39 ` [PATCH 1/1] Add support for ld.so.conf.d Peter Seebach
2014-07-28 18:47 ` Khem Raj
2014-07-28 18:59 ` Mark Hatle
2014-07-28 20:55 ` Peter Seebach
2014-07-28 19:03 ` Peter Seebach
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox