* [PATCH] rootfs-postcommands.bbclass: add support for /etc/ld.so.conf.d/*.conf
@ 2017-08-31 5:54 jackie.huang
2017-09-28 11:27 ` Burton, Ross
0 siblings, 1 reply; 7+ messages in thread
From: jackie.huang @ 2017-08-31 5:54 UTC (permalink / raw)
To: openembedded-core
From: Jackie Huang <jackie.huang@windriver.com>
There are advantages in changing the contents of ld.so.conf to
"include /etc/ld.so.conf.d/*.conf" instead of directly listing
directories in it, just like most distributions are doing the same.
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
---
meta/classes/rootfs-postcommands.bbclass | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/meta/classes/rootfs-postcommands.bbclass b/meta/classes/rootfs-postcommands.bbclass
index dc5a76baba..af01eb550a 100644
--- a/meta/classes/rootfs-postcommands.bbclass
+++ b/meta/classes/rootfs-postcommands.bbclass
@@ -20,6 +20,9 @@ ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("IMAGE_FEATURES", "read-only
# Generates test data file with data store variables expanded in json format
ROOTFS_POSTPROCESS_COMMAND += "write_image_test_data ; "
+# Add support for /etc/ld.so.conf.d/*.conf if ldconfig is enabled
+ROOTFS_POSTINSTALL_COMMAND += "${@bb.utils.contains('DISTRO_FEATURES', 'ldconfig', 'add_ld_so_conf_d ;', '', d)}"
+
# Write manifest
IMAGE_MANIFEST = "${IMGDEPLOYDIR}/${IMAGE_NAME}.rootfs.manifest"
ROOTFS_POSTUNINSTALL_COMMAND =+ "write_image_manifest ; "
@@ -244,6 +247,16 @@ make_zimage_symlink_relative () {
fi
}
+# Add support for /etc/ld.so.conf.d/*.conf
+add_ld_so_conf_d() {
+ if [ -f ${IMAGE_ROOTFS}${sysconfdir}/ld.so.conf ]; then
+ if ! `grep -q 'include ld.so.conf.d\/\*.conf' /etc/ld.so.conf`; then
+ echo 'include ld.so.conf.d/*.conf' >> ${IMAGE_ROOTFS}${sysconfdir}/ld.so.conf
+ fi
+ mkdir -p ${IMAGE_ROOTFS}${sysconfdir}/ld.so.conf.d
+ fi
+}
+
python write_image_manifest () {
from oe.rootfs import image_list_installed_packages
from oe.utils import format_pkg_list
--
2.11.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] rootfs-postcommands.bbclass: add support for /etc/ld.so.conf.d/*.conf
2017-08-31 5:54 [PATCH] rootfs-postcommands.bbclass: add support for /etc/ld.so.conf.d/*.conf jackie.huang
@ 2017-09-28 11:27 ` Burton, Ross
2017-09-28 12:15 ` Otavio Salvador
2017-09-29 2:58 ` Huang, Jie (Jackie)
0 siblings, 2 replies; 7+ messages in thread
From: Burton, Ross @ 2017-09-28 11:27 UTC (permalink / raw)
To: jackie.huang; +Cc: OE-core
[-- Attachment #1: Type: text/plain, Size: 2343 bytes --]
Why implement this as a rootfs postinstall command? glibc writes this
file, so we can alter it when that recipe is written.
Ross
On 31 August 2017 at 06:54, <jackie.huang@windriver.com> wrote:
> From: Jackie Huang <jackie.huang@windriver.com>
>
> There are advantages in changing the contents of ld.so.conf to
> "include /etc/ld.so.conf.d/*.conf" instead of directly listing
> directories in it, just like most distributions are doing the same.
>
> Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
> ---
> meta/classes/rootfs-postcommands.bbclass | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> diff --git a/meta/classes/rootfs-postcommands.bbclass
> b/meta/classes/rootfs-postcommands.bbclass
> index dc5a76baba..af01eb550a 100644
> --- a/meta/classes/rootfs-postcommands.bbclass
> +++ b/meta/classes/rootfs-postcommands.bbclass
> @@ -20,6 +20,9 @@ ROOTFS_POSTPROCESS_COMMAND +=
> '${@bb.utils.contains("IMAGE_FEATURES", "read-only
> # Generates test data file with data store variables expanded in json
> format
> ROOTFS_POSTPROCESS_COMMAND += "write_image_test_data ; "
>
> +# Add support for /etc/ld.so.conf.d/*.conf if ldconfig is enabled
> +ROOTFS_POSTINSTALL_COMMAND += "${@bb.utils.contains('DISTRO_FEATURES',
> 'ldconfig', 'add_ld_so_conf_d ;', '', d)}"
> +
> # Write manifest
> IMAGE_MANIFEST = "${IMGDEPLOYDIR}/${IMAGE_NAME}.rootfs.manifest"
> ROOTFS_POSTUNINSTALL_COMMAND =+ "write_image_manifest ; "
> @@ -244,6 +247,16 @@ make_zimage_symlink_relative () {
> fi
> }
>
> +# Add support for /etc/ld.so.conf.d/*.conf
> +add_ld_so_conf_d() {
> + if [ -f ${IMAGE_ROOTFS}${sysconfdir}/ld.so.conf ]; then
> + if ! `grep -q 'include ld.so.conf.d\/\*.conf' /etc/ld.so.conf`;
> then
> + echo 'include ld.so.conf.d/*.conf' >>
> ${IMAGE_ROOTFS}${sysconfdir}/ld.so.conf
> + fi
> + mkdir -p ${IMAGE_ROOTFS}${sysconfdir}/ld.so.conf.d
> + fi
> +}
> +
> python write_image_manifest () {
> from oe.rootfs import image_list_installed_packages
> from oe.utils import format_pkg_list
> --
> 2.11.0
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
[-- Attachment #2: Type: text/html, Size: 3326 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] rootfs-postcommands.bbclass: add support for /etc/ld.so.conf.d/*.conf
2017-09-28 11:27 ` Burton, Ross
@ 2017-09-28 12:15 ` Otavio Salvador
2017-09-29 2:58 ` Huang, Jie (Jackie)
1 sibling, 0 replies; 7+ messages in thread
From: Otavio Salvador @ 2017-09-28 12:15 UTC (permalink / raw)
To: Burton, Ross; +Cc: OE-core
On Thu, Sep 28, 2017 at 8:27 AM, Burton, Ross <ross.burton@intel.com> wrote:
> Why implement this as a rootfs postinstall command? glibc writes this file,
> so we can alter it when that recipe is written.
Also this is a problem for reproducible builds.
--
Otavio Salvador O.S. Systems
http://www.ossystems.com.br http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] rootfs-postcommands.bbclass: add support for /etc/ld.so.conf.d/*.conf
2017-09-28 11:27 ` Burton, Ross
2017-09-28 12:15 ` Otavio Salvador
@ 2017-09-29 2:58 ` Huang, Jie (Jackie)
2017-09-29 3:02 ` Huang, Jie (Jackie)
2017-09-29 13:37 ` Burton, Ross
1 sibling, 2 replies; 7+ messages in thread
From: Huang, Jie (Jackie) @ 2017-09-29 2:58 UTC (permalink / raw)
To: BURTON, ROSS; +Cc: OE-core
[-- Attachment #1: Type: text/plain, Size: 4368 bytes --]
That’s what we did in the original patch, but rejected long time ago
then we have been keeping it in our local branch:
commit 1e43ff11f841247453f1d4106b22d33aa3a150f9
Author: Ming Liu <ming.liu@windriver.com>
Date: Wed Aug 21 16:06:29 2013 +0800
eglibc: add support for /etc/ld.so.conf.d/*.conf
There are advantages in changing the contents of ld.so.conf to
"include /etc/ld.so.conf.d/*.conf" instead of directly listing directories
in it, just like most distributions are doing the same.
Signed-off-by: Ming Liu <ming.liu@windriver.com>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
(LOCAL REV: NOT UPSTREAM) -- Sent to oe-core on 20131127
Rejected by oe-core since:
- This will cause the existing contents of ld.so.conf to be obliterated
if the file wasn't empty to begin with. (I know that it is empty in
oe-core, but a distro layer might be overlaying this file with its
own.)
- Also, it seems as though the choice of whether to use an "ld.so.conf.d"
arrangement or not is one that the distro should be making. Is there
a strong reason why this needs to be done in oe-core?
- I would like to different components to add their own conf files to
${D}${sysconfdir}/ld.so.conf.d and let ldconfig executed in do_rootfs
to find them, but they won't be there when eglibc.do_install is executed.
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Then we re-implement it as a rootfs postinstall command to avoid the concern
and it could be controlled in distro settings.
Thanks,
Jackie
From: Burton, Ross [mailto:ross.burton@intel.com]
Sent: Thursday, September 28, 2017 19:28
To: Huang, Jie (Jackie)
Cc: OE-core
Subject: Re: [OE-core] [PATCH] rootfs-postcommands.bbclass: add support for /etc/ld.so.conf.d/*.conf
Why implement this as a rootfs postinstall command? glibc writes this file, so we can alter it when that recipe is written.
Ross
On 31 August 2017 at 06:54, <jackie.huang@windriver.com<mailto:jackie.huang@windriver.com>> wrote:
From: Jackie Huang <jackie.huang@windriver.com<mailto:jackie.huang@windriver.com>>
There are advantages in changing the contents of ld.so.conf to
"include /etc/ld.so.conf.d/*.conf" instead of directly listing
directories in it, just like most distributions are doing the same.
Signed-off-by: Jackie Huang <jackie.huang@windriver.com<mailto:jackie.huang@windriver.com>>
---
meta/classes/rootfs-postcommands.bbclass | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/meta/classes/rootfs-postcommands.bbclass b/meta/classes/rootfs-postcommands.bbclass
index dc5a76baba..af01eb550a 100644
--- a/meta/classes/rootfs-postcommands.bbclass
+++ b/meta/classes/rootfs-postcommands.bbclass
@@ -20,6 +20,9 @@ ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("IMAGE_FEATURES", "read-only
# Generates test data file with data store variables expanded in json format
ROOTFS_POSTPROCESS_COMMAND += "write_image_test_data ; "
+# Add support for /etc/ld.so.conf.d/*.conf if ldconfig is enabled
+ROOTFS_POSTINSTALL_COMMAND += "${@bb.utils.contains('DISTRO_FEATURES', 'ldconfig', 'add_ld_so_conf_d ;', '', d)}<mailto:$%7b@bb.utils.contains('DISTRO_FEATURES',%20'ldconfig',%20'add_ld_so_conf_d%20;',%20'',%20d)%7d>"
+
# Write manifest
IMAGE_MANIFEST = "${IMGDEPLOYDIR}/${IMAGE_NAME}.rootfs.manifest"
ROOTFS_POSTUNINSTALL_COMMAND =+ "write_image_manifest ; "
@@ -244,6 +247,16 @@ make_zimage_symlink_relative () {
fi
}
+# Add support for /etc/ld.so.conf.d/*.conf
+add_ld_so_conf_d() {
+ if [ -f ${IMAGE_ROOTFS}${sysconfdir}/ld.so.conf ]; then
+ if ! `grep -q 'include ld.so.conf.d\/\*.conf' /etc/ld.so.conf`; then
+ echo 'include ld.so.conf.d/*.conf' >> ${IMAGE_ROOTFS}${sysconfdir}/ld.so.conf
+ fi
+ mkdir -p ${IMAGE_ROOTFS}${sysconfdir}/ld.so.conf.d
+ fi
+}
+
python write_image_manifest () {
from oe.rootfs import image_list_installed_packages
from oe.utils import format_pkg_list
--
2.11.0
--
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org<mailto:Openembedded-core@lists.openembedded.org>
http://lists.openembedded.org/mailman/listinfo/openembedded-core
[-- Attachment #2: Type: text/html, Size: 14912 bytes --]
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] rootfs-postcommands.bbclass: add support for /etc/ld.so.conf.d/*.conf
2017-09-29 2:58 ` Huang, Jie (Jackie)
@ 2017-09-29 3:02 ` Huang, Jie (Jackie)
2017-09-29 13:37 ` Burton, Ross
1 sibling, 0 replies; 7+ messages in thread
From: Huang, Jie (Jackie) @ 2017-09-29 3:02 UTC (permalink / raw)
To: Huang, Jie (Jackie), BURTON, ROSS; +Cc: OE-core
[-- Attachment #1: Type: text/plain, Size: 4920 bytes --]
I found the original patch:
https://patchwork.openembedded.org/patch/62453/
Thanks,
Jackie
From: openembedded-core-bounces@lists.openembedded.org [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf Of Huang, Jie (Jackie)
Sent: Friday, September 29, 2017 10:58
To: BURTON, ROSS
Cc: OE-core
Subject: Re: [OE-core] [PATCH] rootfs-postcommands.bbclass: add support for /etc/ld.so.conf.d/*.conf
That’s what we did in the original patch, but rejected long time ago
then we have been keeping it in our local branch:
commit 1e43ff11f841247453f1d4106b22d33aa3a150f9
Author: Ming Liu <ming.liu@windriver.com<mailto:ming.liu@windriver.com>>
Date: Wed Aug 21 16:06:29 2013 +0800
eglibc: add support for /etc/ld.so.conf.d/*.conf
There are advantages in changing the contents of ld.so.conf to
"include /etc/ld.so.conf.d/*.conf" instead of directly listing directories
in it, just like most distributions are doing the same.
Signed-off-by: Ming Liu <ming.liu@windriver.com<mailto:ming.liu@windriver.com>>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com<mailto:liezhi.yang@windriver.com>>
(LOCAL REV: NOT UPSTREAM) -- Sent to oe-core on 20131127
Rejected by oe-core since:
- This will cause the existing contents of ld.so.conf to be obliterated
if the file wasn't empty to begin with. (I know that it is empty in
oe-core, but a distro layer might be overlaying this file with its
own.)
- Also, it seems as though the choice of whether to use an "ld.so.conf.d"
arrangement or not is one that the distro should be making. Is there
a strong reason why this needs to be done in oe-core?
- I would like to different components to add their own conf files to
${D}${sysconfdir}/ld.so.conf.d and let ldconfig executed in do_rootfs
to find them, but they won't be there when eglibc.do_install is executed.
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com<mailto:hongxu.jia@windriver.com>>
Then we re-implement it as a rootfs postinstall command to avoid the concern
and it could be controlled in distro settings.
Thanks,
Jackie
From: Burton, Ross [mailto:ross.burton@intel.com]
Sent: Thursday, September 28, 2017 19:28
To: Huang, Jie (Jackie)
Cc: OE-core
Subject: Re: [OE-core] [PATCH] rootfs-postcommands.bbclass: add support for /etc/ld.so.conf.d/*.conf
Why implement this as a rootfs postinstall command? glibc writes this file, so we can alter it when that recipe is written.
Ross
On 31 August 2017 at 06:54, <jackie.huang@windriver.com<mailto:jackie.huang@windriver.com>> wrote:
From: Jackie Huang <jackie.huang@windriver.com<mailto:jackie.huang@windriver.com>>
There are advantages in changing the contents of ld.so.conf to
"include /etc/ld.so.conf.d/*.conf" instead of directly listing
directories in it, just like most distributions are doing the same.
Signed-off-by: Jackie Huang <jackie.huang@windriver.com<mailto:jackie.huang@windriver.com>>
---
meta/classes/rootfs-postcommands.bbclass | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/meta/classes/rootfs-postcommands.bbclass b/meta/classes/rootfs-postcommands.bbclass
index dc5a76baba..af01eb550a 100644
--- a/meta/classes/rootfs-postcommands.bbclass
+++ b/meta/classes/rootfs-postcommands.bbclass
@@ -20,6 +20,9 @@ ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("IMAGE_FEATURES", "read-only
# Generates test data file with data store variables expanded in json format
ROOTFS_POSTPROCESS_COMMAND += "write_image_test_data ; "
+# Add support for /etc/ld.so.conf.d/*.conf if ldconfig is enabled
+ROOTFS_POSTINSTALL_COMMAND += "${@bb.utils.contains('DISTRO_FEATURES', 'ldconfig', 'add_ld_so_conf_d ;', '', d)}<mailto:$%7b@bb.utils.contains('DISTRO_FEATURES',%20'ldconfig',%20'add_ld_so_conf_d%20;',%20'',%20d)%7d>"
+
# Write manifest
IMAGE_MANIFEST = "${IMGDEPLOYDIR}/${IMAGE_NAME}.rootfs.manifest"
ROOTFS_POSTUNINSTALL_COMMAND =+ "write_image_manifest ; "
@@ -244,6 +247,16 @@ make_zimage_symlink_relative () {
fi
}
+# Add support for /etc/ld.so.conf.d/*.conf
+add_ld_so_conf_d() {
+ if [ -f ${IMAGE_ROOTFS}${sysconfdir}/ld.so.conf ]; then
+ if ! `grep -q 'include ld.so.conf.d\/\*.conf' /etc/ld.so.conf`; then
+ echo 'include ld.so.conf.d/*.conf' >> ${IMAGE_ROOTFS}${sysconfdir}/ld.so.conf
+ fi
+ mkdir -p ${IMAGE_ROOTFS}${sysconfdir}/ld.so.conf.d
+ fi
+}
+
python write_image_manifest () {
from oe.rootfs import image_list_installed_packages
from oe.utils import format_pkg_list
--
2.11.0
--
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org<mailto:Openembedded-core@lists.openembedded.org>
http://lists.openembedded.org/mailman/listinfo/openembedded-core
[-- Attachment #2: Type: text/html, Size: 17243 bytes --]
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] rootfs-postcommands.bbclass: add support for /etc/ld.so.conf.d/*.conf
2017-09-29 2:58 ` Huang, Jie (Jackie)
2017-09-29 3:02 ` Huang, Jie (Jackie)
@ 2017-09-29 13:37 ` Burton, Ross
2017-09-30 1:23 ` Huang, Jie (Jackie)
1 sibling, 1 reply; 7+ messages in thread
From: Burton, Ross @ 2017-09-29 13:37 UTC (permalink / raw)
To: Huang, Jackie (Wind River); +Cc: OE-core
[-- Attachment #1: Type: text/plain, Size: 890 bytes --]
On 29 September 2017 at 03:58, Huang, Jackie (Wind River) <
jackie.huang@windriver.com> wrote:
> - This will cause the existing contents of ld.so.conf to be
> obliterated
>
> if the file wasn't empty to begin with. (I know that it is empty in
>
> oe-core, but a distro layer might be overlaying this file with its
>
> own.)
>
>
> - Also, it seems as though the choice of whether to use an
> "ld.so.conf.d"
>
> arrangement or not is one that the distro should be making. Is there
>
> a strong reason why this needs to be done in oe-core?
>
This is easily handled in many ways. Check the include doesn't already
exist and concatenate the file instead of overwriting it, for example. Or
add the include to the default oe-core ld.so.conf, and distros that want to
change ld.so.conf can by changing that file.
Ross
[-- Attachment #2: Type: text/html, Size: 2653 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] rootfs-postcommands.bbclass: add support for /etc/ld.so.conf.d/*.conf
2017-09-29 13:37 ` Burton, Ross
@ 2017-09-30 1:23 ` Huang, Jie (Jackie)
0 siblings, 0 replies; 7+ messages in thread
From: Huang, Jie (Jackie) @ 2017-09-30 1:23 UTC (permalink / raw)
To: BURTON, ROSS; +Cc: OE-core
[-- Attachment #1: Type: text/plain, Size: 1203 bytes --]
Ok, I will do this in the glibc recipe instead if it’s preferred.
Thanks,
Jackie
From: Burton, Ross [mailto:ross.burton@intel.com]
Sent: Friday, September 29, 2017 21:38
To: Huang, Jie (Jackie)
Cc: OE-core
Subject: Re: [OE-core] [PATCH] rootfs-postcommands.bbclass: add support for /etc/ld.so.conf.d/*.conf
On 29 September 2017 at 03:58, Huang, Jackie (Wind River) <jackie.huang@windriver.com<mailto:jackie.huang@windriver.com>> wrote:
- This will cause the existing contents of ld.so.conf to be obliterated
if the file wasn't empty to begin with. (I know that it is empty in
oe-core, but a distro layer might be overlaying this file with its
own.)
- Also, it seems as though the choice of whether to use an "ld.so.conf.d"
arrangement or not is one that the distro should be making. Is there
a strong reason why this needs to be done in oe-core?
This is easily handled in many ways. Check the include doesn't already exist and concatenate the file instead of overwriting it, for example. Or add the include to the default oe-core ld.so.conf, and distros that want to change ld.so.conf can by changing that file.
Ross
[-- Attachment #2: Type: text/html, Size: 7062 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-09-30 1:23 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-31 5:54 [PATCH] rootfs-postcommands.bbclass: add support for /etc/ld.so.conf.d/*.conf jackie.huang
2017-09-28 11:27 ` Burton, Ross
2017-09-28 12:15 ` Otavio Salvador
2017-09-29 2:58 ` Huang, Jie (Jackie)
2017-09-29 3:02 ` Huang, Jie (Jackie)
2017-09-29 13:37 ` Burton, Ross
2017-09-30 1:23 ` Huang, Jie (Jackie)
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.