From: Rongqing Li <rongqing.li@windriver.com>
To: <openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH][v2] glibc: package nscd related files
Date: Tue, 1 Sep 2015 15:41:21 +0800 [thread overview]
Message-ID: <55E556A1.8010904@windriver.com> (raw)
In-Reply-To: <1439976330-20413-1-git-send-email-rongqing.li@windriver.com>
ping
-Roy
On 2015年08月19日 17:25, 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
>
> Signed-off-by: Roy Li <rongqing.li@windriver.com>
> ---
> meta/recipes-core/glibc/glibc-package.inc | 40 ++++++++++++++++++++++++++++++-
> meta/recipes-core/glibc/glibc.inc | 2 +-
> 2 files changed, 40 insertions(+), 2 deletions(-)
>
> diff --git a/meta/recipes-core/glibc/glibc-package.inc b/meta/recipes-core/glibc/glibc-package.inc
> index def0e0c..9bded67 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,17 @@ 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"
> +
> +SYSTEMD_PACKAGES = "nscd"
> +SYSTEMD_SERVICE_nscd = "nscd.service"
> 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
>
--
Best Reagrds,
Roy | RongQing Li
prev parent reply other threads:[~2015-09-01 7:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-19 9:25 [PATCH][v2] glibc: package nscd related files rongqing.li
2015-09-01 7:41 ` Rongqing Li [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55E556A1.8010904@windriver.com \
--to=rongqing.li@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox