Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] glibc: package nscd related files
@ 2015-08-13  8:09 rongqing.li
  2015-08-13 16:31 ` Khem Raj
  2015-08-18 11:48 ` Burton, Ross
  0 siblings, 2 replies; 6+ messages in thread
From: rongqing.li @ 2015-08-13  8:09 UTC (permalink / raw)
  To: openembedded-core

From: Roy Li <rongqing.li@windriver.com>

install nscd related configuration file, startup files, and package them,
make nscd easy to startup

Signed-off-by: Roy Li <rongqing.li@windriver.com>
---
 meta/recipes-core/glibc/glibc-package.inc | 37 ++++++++++++++++++++++++++++++-
 meta/recipes-core/glibc/glibc.inc         |  2 +-
 2 files changed, 37 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-core/glibc/glibc-package.inc b/meta/recipes-core/glibc/glibc-package.inc
index 8ea5915..5f7c8a9 100644
--- a/meta/recipes-core/glibc/glibc-package.inc
+++ b/meta/recipes-core/glibc/glibc-package.inc
@@ -49,7 +49,8 @@ FILES_libsotruss = "${libdir}/audit/sotruss-lib.so"
 FILES_SOLIBSDEV = "${libdir}/lib*${SOLIBSDEV}"
 FILES_${PN}-dev += "${bindir}/rpcgen ${libdir}/*_nonshared.a ${base_libdir}/*_nonshared.a ${base_libdir}/*.o ${datadir}/aclocal"
 FILES_${PN}-staticdev += "${libdir}/*.a ${base_libdir}/*.a"
-FILES_nscd = "${sbindir}/nscd*"
+FILES_nscd = "${sbindir}/nscd* ${sysconfdir}/init.d/nscd ${systemd_unitdir}/system/nscd* ${sysconfdir}/tmpfiles.d/nscd.conf \
+              ${sysconfdir}/nscd.conf ${sysconfdir}/default/volatiles/98_nscd ${localstatedir}/db/nscd"
 FILES_${PN}-mtrace = "${bindir}/mtrace"
 FILES_tzcode = "${bindir}/tzselect ${sbindir}/zic ${sbindir}/zdump"
 FILES_${PN}-utils = "${bindir}/* ${sbindir}/*"
@@ -105,6 +106,29 @@ do_install_append () {
 			rmdir ${D}${sysconfdir}
 		fi
 	fi
+
+	if echo ${PN}|grep -q "glibc-initial"; then
+		return
+	fi
+
+	install -d ${D}${sysconfdir}/init.d
+	install -d ${D}${localstatedir}/db/nscd
+	install -m 0755 ${S}/nscd/nscd.init ${D}${sysconfdir}/init.d/nscd
+	install -m 0755 ${S}/nscd/nscd.conf ${D}${sysconfdir}/nscd.conf
+	sed -i "s%daemon%start-stop-daemon --start --exec%g" ${D}${sysconfdir}/init.d/nscd
+
+	install -d ${D}${systemd_unitdir}/system
+	install -m 0644 ${S}/nscd/nscd.service ${D}${systemd_unitdir}/system/
+
+	if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+		install -d ${D}${sysconfdir}/tmpfiles.d
+		echo "d /run/nscd 755 root root -" \
+			> ${D}${sysconfdir}/tmpfiles.d/nscd.conf
+	else
+		install -d ${D}${sysconfdir}/default/volatiles
+		echo "d root root 0755 /var/run/nscd none" \
+			> ${D}${sysconfdir}/default/volatiles/98_nscd
+	fi
 }
 
 do_install_append_aarch64 () {
@@ -174,3 +198,14 @@ glibc_package_preprocess () {
 		rm -rf ${PKGD}${exec_prefix}/lib
 	fi
 }
+
+pkg_postinst_nscd () {
+	if [ -z "$D" ]; then
+		if command -v systemd-tmpfiles >/dev/null; then
+			systemd-tmpfiles --create ${sysconfdir}/tmpfiles.d/nscd.conf
+		elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then
+			${sysconfdir}/init.d/populate-volatile.sh update
+		fi
+	fi
+}
+CONFFILES_nscd="${sysconfdir}/nscd.conf"
diff --git a/meta/recipes-core/glibc/glibc.inc b/meta/recipes-core/glibc/glibc.inc
index 74ad0b5..03ffb2f 100644
--- a/meta/recipes-core/glibc/glibc.inc
+++ b/meta/recipes-core/glibc/glibc.inc
@@ -41,7 +41,7 @@ DEPENDS = "virtual/${TARGET_PREFIX}gcc-initial libgcc-initial linux-libc-headers
 #RDEPENDS_${PN} += "${@['','libgcc']['nptl' in '${GLIBC_ADDONS}']}"
 PROVIDES = "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc"
 PROVIDES += "virtual/libintl virtual/libiconv"
-inherit autotools texinfo distro_features_check
+inherit autotools texinfo distro_features_check systemd
 require glibc-options.inc
 
 # The main purpose of setting this variable is to prevent users from accidently
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] glibc: package nscd related files
  2015-08-13  8:09 [PATCH] glibc: package nscd related files rongqing.li
@ 2015-08-13 16:31 ` Khem Raj
  2015-08-14  1:28   ` Rongqing Li
  2015-08-18 11:48 ` Burton, Ross
  1 sibling, 1 reply; 6+ messages in thread
From: Khem Raj @ 2015-08-13 16:31 UTC (permalink / raw)
  To: rongqing.li; +Cc: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 4055 bytes --]


> On Aug 13, 2015, at 1:09 AM, rongqing.li@windriver.com wrote:
> 
> From: Roy Li <rongqing.li@windriver.com>
> 
> install nscd related configuration file, startup files, and package them,
> make nscd easy to startup
> 

please test this change on top of glibc 2.22 recipe upgrade patches which are in flight right now

> Signed-off-by: Roy Li <rongqing.li@windriver.com>
> ---
> meta/recipes-core/glibc/glibc-package.inc | 37 ++++++++++++++++++++++++++++++-
> meta/recipes-core/glibc/glibc.inc         |  2 +-
> 2 files changed, 37 insertions(+), 2 deletions(-)
> 
> diff --git a/meta/recipes-core/glibc/glibc-package.inc b/meta/recipes-core/glibc/glibc-package.inc
> index 8ea5915..5f7c8a9 100644
> --- a/meta/recipes-core/glibc/glibc-package.inc
> +++ b/meta/recipes-core/glibc/glibc-package.inc
> @@ -49,7 +49,8 @@ FILES_libsotruss = "${libdir}/audit/sotruss-lib.so"
> FILES_SOLIBSDEV = "${libdir}/lib*${SOLIBSDEV}"
> FILES_${PN}-dev += "${bindir}/rpcgen ${libdir}/*_nonshared.a ${base_libdir}/*_nonshared.a ${base_libdir}/*.o ${datadir}/aclocal"
> FILES_${PN}-staticdev += "${libdir}/*.a ${base_libdir}/*.a"
> -FILES_nscd = "${sbindir}/nscd*"
> +FILES_nscd = "${sbindir}/nscd* ${sysconfdir}/init.d/nscd ${systemd_unitdir}/system/nscd* ${sysconfdir}/tmpfiles.d/nscd.conf \
> +              ${sysconfdir}/nscd.conf ${sysconfdir}/default/volatiles/98_nscd ${localstatedir}/db/nscd"
> FILES_${PN}-mtrace = "${bindir}/mtrace"
> FILES_tzcode = "${bindir}/tzselect ${sbindir}/zic ${sbindir}/zdump"
> FILES_${PN}-utils = "${bindir}/* ${sbindir}/*"
> @@ -105,6 +106,29 @@ do_install_append () {
> 			rmdir ${D}${sysconfdir}
> 		fi
> 	fi
> +
> +	if echo ${PN}|grep -q "glibc-initial"; then
> +		return
> +	fi
> +
> +	install -d ${D}${sysconfdir}/init.d
> +	install -d ${D}${localstatedir}/db/nscd
> +	install -m 0755 ${S}/nscd/nscd.init ${D}${sysconfdir}/init.d/nscd
> +	install -m 0755 ${S}/nscd/nscd.conf ${D}${sysconfdir}/nscd.conf
> +	sed -i "s%daemon%start-stop-daemon --start --exec%g" ${D}${sysconfdir}/init.d/nscd
> +
> +	install -d ${D}${systemd_unitdir}/system
> +	install -m 0644 ${S}/nscd/nscd.service ${D}${systemd_unitdir}/system/
> +
> +	if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
> +		install -d ${D}${sysconfdir}/tmpfiles.d
> +		echo "d /run/nscd 755 root root -" \
> +			> ${D}${sysconfdir}/tmpfiles.d/nscd.conf
> +	else
> +		install -d ${D}${sysconfdir}/default/volatiles
> +		echo "d root root 0755 /var/run/nscd none" \
> +			> ${D}${sysconfdir}/default/volatiles/98_nscd
> +	fi
> }
> 
> do_install_append_aarch64 () {
> @@ -174,3 +198,14 @@ glibc_package_preprocess () {
> 		rm -rf ${PKGD}${exec_prefix}/lib
> 	fi
> }
> +
> +pkg_postinst_nscd () {
> +	if [ -z "$D" ]; then
> +		if command -v systemd-tmpfiles >/dev/null; then
> +			systemd-tmpfiles --create ${sysconfdir}/tmpfiles.d/nscd.conf
> +		elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then
> +			${sysconfdir}/init.d/populate-volatile.sh update
> +		fi
> +	fi
> +}
> +CONFFILES_nscd="${sysconfdir}/nscd.conf"
> diff --git a/meta/recipes-core/glibc/glibc.inc b/meta/recipes-core/glibc/glibc.inc
> index 74ad0b5..03ffb2f 100644
> --- a/meta/recipes-core/glibc/glibc.inc
> +++ b/meta/recipes-core/glibc/glibc.inc
> @@ -41,7 +41,7 @@ DEPENDS = "virtual/${TARGET_PREFIX}gcc-initial libgcc-initial linux-libc-headers
> #RDEPENDS_${PN} += "${@['','libgcc']['nptl' in '${GLIBC_ADDONS}']}"
> PROVIDES = "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc"
> PROVIDES += "virtual/libintl virtual/libiconv"
> -inherit autotools texinfo distro_features_check
> +inherit autotools texinfo distro_features_check systemd
> require glibc-options.inc
> 
> # The main purpose of setting this variable is to prevent users from accidently
> --
> 1.9.1
> 
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 211 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] glibc: package nscd related files
  2015-08-13 16:31 ` Khem Raj
@ 2015-08-14  1:28   ` Rongqing Li
  2015-08-18  8:14     ` Rongqing Li
  0 siblings, 1 reply; 6+ messages in thread
From: Rongqing Li @ 2015-08-14  1:28 UTC (permalink / raw)
  To: Khem Raj; +Cc: openembedded-core



On 2015年08月14日 00:31, Khem Raj wrote:
>
>> On Aug 13, 2015, at 1:09 AM, rongqing.li@windriver.com wrote:
>>
>> From: Roy Li <rongqing.li@windriver.com>
>>
>> install nscd related configuration file, startup files, and package them,
>> make nscd easy to startup
>>
>
> please test this change on top of glibc 2.22 recipe upgrade patches which are in flight right now
>

if glibc 2.22 is merged, I will test it

thanks

-Roy

>> Signed-off-by: Roy Li <rongqing.li@windriver.com>
>> ---
>> meta/recipes-core/glibc/glibc-package.inc | 37 ++++++++++++++++++++++++++++++-
>> meta/recipes-core/glibc/glibc.inc         |  2 +-
>> 2 files changed, 37 insertions(+), 2 deletions(-)
>>
>> diff --git a/meta/recipes-core/glibc/glibc-package.inc b/meta/recipes-core/glibc/glibc-package.inc
>> index 8ea5915..5f7c8a9 100644
>> --- a/meta/recipes-core/glibc/glibc-package.inc
>> +++ b/meta/recipes-core/glibc/glibc-package.inc
>> @@ -49,7 +49,8 @@ FILES_libsotruss = "${libdir}/audit/sotruss-lib.so"
>> FILES_SOLIBSDEV = "${libdir}/lib*${SOLIBSDEV}"
>> FILES_${PN}-dev += "${bindir}/rpcgen ${libdir}/*_nonshared.a ${base_libdir}/*_nonshared.a ${base_libdir}/*.o ${datadir}/aclocal"
>> FILES_${PN}-staticdev += "${libdir}/*.a ${base_libdir}/*.a"
>> -FILES_nscd = "${sbindir}/nscd*"
>> +FILES_nscd = "${sbindir}/nscd* ${sysconfdir}/init.d/nscd ${systemd_unitdir}/system/nscd* ${sysconfdir}/tmpfiles.d/nscd.conf \
>> +              ${sysconfdir}/nscd.conf ${sysconfdir}/default/volatiles/98_nscd ${localstatedir}/db/nscd"
>> FILES_${PN}-mtrace = "${bindir}/mtrace"
>> FILES_tzcode = "${bindir}/tzselect ${sbindir}/zic ${sbindir}/zdump"
>> FILES_${PN}-utils = "${bindir}/* ${sbindir}/*"
>> @@ -105,6 +106,29 @@ do_install_append () {
>> 			rmdir ${D}${sysconfdir}
>> 		fi
>> 	fi
>> +
>> +	if echo ${PN}|grep -q "glibc-initial"; then
>> +		return
>> +	fi
>> +
>> +	install -d ${D}${sysconfdir}/init.d
>> +	install -d ${D}${localstatedir}/db/nscd
>> +	install -m 0755 ${S}/nscd/nscd.init ${D}${sysconfdir}/init.d/nscd
>> +	install -m 0755 ${S}/nscd/nscd.conf ${D}${sysconfdir}/nscd.conf
>> +	sed -i "s%daemon%start-stop-daemon --start --exec%g" ${D}${sysconfdir}/init.d/nscd
>> +
>> +	install -d ${D}${systemd_unitdir}/system
>> +	install -m 0644 ${S}/nscd/nscd.service ${D}${systemd_unitdir}/system/
>> +
>> +	if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
>> +		install -d ${D}${sysconfdir}/tmpfiles.d
>> +		echo "d /run/nscd 755 root root -" \
>> +			> ${D}${sysconfdir}/tmpfiles.d/nscd.conf
>> +	else
>> +		install -d ${D}${sysconfdir}/default/volatiles
>> +		echo "d root root 0755 /var/run/nscd none" \
>> +			> ${D}${sysconfdir}/default/volatiles/98_nscd
>> +	fi
>> }
>>
>> do_install_append_aarch64 () {
>> @@ -174,3 +198,14 @@ glibc_package_preprocess () {
>> 		rm -rf ${PKGD}${exec_prefix}/lib
>> 	fi
>> }
>> +
>> +pkg_postinst_nscd () {
>> +	if [ -z "$D" ]; then
>> +		if command -v systemd-tmpfiles >/dev/null; then
>> +			systemd-tmpfiles --create ${sysconfdir}/tmpfiles.d/nscd.conf
>> +		elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then
>> +			${sysconfdir}/init.d/populate-volatile.sh update
>> +		fi
>> +	fi
>> +}
>> +CONFFILES_nscd="${sysconfdir}/nscd.conf"
>> diff --git a/meta/recipes-core/glibc/glibc.inc b/meta/recipes-core/glibc/glibc.inc
>> index 74ad0b5..03ffb2f 100644
>> --- a/meta/recipes-core/glibc/glibc.inc
>> +++ b/meta/recipes-core/glibc/glibc.inc
>> @@ -41,7 +41,7 @@ DEPENDS = "virtual/${TARGET_PREFIX}gcc-initial libgcc-initial linux-libc-headers
>> #RDEPENDS_${PN} += "${@['','libgcc']['nptl' in '${GLIBC_ADDONS}']}"
>> PROVIDES = "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc"
>> PROVIDES += "virtual/libintl virtual/libiconv"
>> -inherit autotools texinfo distro_features_check
>> +inherit autotools texinfo distro_features_check systemd
>> require glibc-options.inc
>>
>> # The main purpose of setting this variable is to prevent users from accidently
>> --
>> 1.9.1
>>
>> --
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>

-- 
Best Reagrds,
Roy | RongQing Li


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] glibc: package nscd related files
  2015-08-14  1:28   ` Rongqing Li
@ 2015-08-18  8:14     ` Rongqing Li
  0 siblings, 0 replies; 6+ messages in thread
From: Rongqing Li @ 2015-08-18  8:14 UTC (permalink / raw)
  To: Khem Raj; +Cc: openembedded-core



On 2015年08月14日 09:28, Rongqing Li wrote:
> On 2015年08月14日 00:31, Khem Raj wrote:
>>
>>> On Aug 13, 2015, at 1:09 AM, rongqing.li@windriver.com wrote:
>>>
>>> From: Roy Li <rongqing.li@windriver.com>
>>>
>>> install nscd related configuration file, startup files, and package
>>> them,
>>> make nscd easy to startup
>>>
>>
>> please test this change on top of glibc 2.22 recipe upgrade patches
>> which are in flight right now
>>
>
> if glibc 2.22 is merged, I will test it
>
> thanks
>
> -Roy

This patch works with glibc 2.22, please consider to accept it;

thanks


-- 
Best Reagrds,
Roy | RongQing Li


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] glibc: package nscd related files
  2015-08-13  8:09 [PATCH] glibc: package nscd related files rongqing.li
  2015-08-13 16:31 ` Khem Raj
@ 2015-08-18 11:48 ` Burton, Ross
  2015-08-19  1:22   ` Rongqing Li
  1 sibling, 1 reply; 6+ messages in thread
From: Burton, Ross @ 2015-08-18 11:48 UTC (permalink / raw)
  To: rongqing.li@windriver.com; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 305 bytes --]

On 13 August 2015 at 09:09, <rongqing.li@windriver.com> wrote:

> install nscd related configuration file, startup files, and package them,
> make nscd easy to startup
>

systemd.bbclass is inherited but SYSTEMD_PACKAGES isn't set, so the systemd
postinst/prerm fragments won't get added.

Ross

[-- Attachment #2: Type: text/html, Size: 727 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] glibc: package nscd related files
  2015-08-18 11:48 ` Burton, Ross
@ 2015-08-19  1:22   ` Rongqing Li
  0 siblings, 0 replies; 6+ messages in thread
From: Rongqing Li @ 2015-08-19  1:22 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core



On 2015年08月18日 19:48, Burton, Ross wrote:
>
> On 13 August 2015 at 09:09, <rongqing.li@windriver.com
> <mailto:rongqing.li@windriver.com>> wrote:
>
>     install nscd related configuration file, startup files, and package
>     them,
>     make nscd easy to startup
>
>
> systemd.bbclass is inherited but SYSTEMD_PACKAGES isn't set, so the
> systemd postinst/prerm fragments won't get added.
>
> Ross

Thanks, I will fix it

-- 
Best Reagrds,
Roy | RongQing Li


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-08-19  1:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-13  8:09 [PATCH] glibc: package nscd related files rongqing.li
2015-08-13 16:31 ` Khem Raj
2015-08-14  1:28   ` Rongqing Li
2015-08-18  8:14     ` Rongqing Li
2015-08-18 11:48 ` Burton, Ross
2015-08-19  1:22   ` Rongqing Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox