All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1 v3] glibc: re-package for libnss-db
@ 2018-01-16  6:51 jackie.huang
  2018-01-16  6:51 ` [PATCH 1/1] " jackie.huang
  0 siblings, 1 reply; 2+ messages in thread
From: jackie.huang @ 2018-01-16  6:51 UTC (permalink / raw)
  To: openembedded-core

From: Jackie Huang <jackie.huang@windriver.com>

v3 comments:
Change the dependency on make to RSUGGESTS.

--
The following changes since commit b9dcab772fd37ed8376a87d3194195e13ff52d10:

  qemu: CVE-2017-17381 (2018-01-14 09:11:58 +0000)

are available in the git repository at:

  git://git.pokylinux.org/poky-contrib.git jhuang0/d_nscd_v3_180116_0
  http://git.pokylinux.org/cgit.cgi//log/?h=jhuang0/d_nscd_v3_180116_0

Jackie Huang (1):
  glibc: re-package for libnss-db

 meta/recipes-core/glibc/glibc-package.inc | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

-- 
2.11.0



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

* [PATCH 1/1] glibc: re-package for libnss-db
  2018-01-16  6:51 [PATCH 0/1 v3] glibc: re-package for libnss-db jackie.huang
@ 2018-01-16  6:51 ` jackie.huang
  0 siblings, 0 replies; 2+ messages in thread
From: jackie.huang @ 2018-01-16  6:51 UTC (permalink / raw)
  To: openembedded-core

From: Jackie Huang <jackie.huang@windriver.com>

On other distros like ubuntu/centos, libnss-db usually provides:
- The libraries
- The Makefile to create database
  (in /var/db for centos, /var/lib/misc/ for ubuntu)
- The makedb command (it's in glibc-common for centos7)

What we had is:
- The libraries are in glibc-extra-nss
- The Makefile is removed
- The makedb command is in glibc-utils (lack of dependency)

So when glibc-extra-nss is installed but glibc-utils is not,
we see error like:
nscd[165]: 165 checking for monitored file `/var/db/group.db': No such file or directory
nscd[165]: 165 checking for monitored file `/var/db/passwd.db': No such file or directory

And there is not an easy way to create these databases.

To fix the issue:
- Re-package the libraries into libnss-db
- Don't remove the Makefile and add it in libnss-db
- Add RDEPENDS on glibc-utils for libnss-db, and add RSUGGESTS on make
  since it's optional to generate the db with make.

Notes:
For external toolchain, an extra package 'libnss-db' need to be provided
If replacing glibc from core.

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
---
 meta/recipes-core/glibc/glibc-package.inc | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-core/glibc/glibc-package.inc b/meta/recipes-core/glibc/glibc-package.inc
index 817d850358..6ee33e61e6 100644
--- a/meta/recipes-core/glibc/glibc-package.inc
+++ b/meta/recipes-core/glibc/glibc-package.inc
@@ -1,6 +1,6 @@
 INHIBIT_SYSROOT_STRIP = "1"
 
-PACKAGES = "${PN}-dbg catchsegv sln nscd ldd tzcode glibc-thread-db ${PN}-pic libcidn libmemusage libsegfault ${PN}-pcprofile libsotruss ${PN} ${PN}-utils glibc-extra-nss ${PN}-dev ${PN}-staticdev ${PN}-doc"
+PACKAGES = "${PN}-dbg catchsegv sln nscd ldd tzcode glibc-thread-db ${PN}-pic libcidn libmemusage libnss-db libsegfault ${PN}-pcprofile libsotruss ${PN} ${PN}-utils glibc-extra-nss ${PN}-dev ${PN}-staticdev ${PN}-doc"
 
 # The ld.so in this glibc supports the GNU_HASH
 RPROVIDES_${PN} = "eglibc rtld(GNU_HASH)"
@@ -23,6 +23,9 @@ FILES_ldd = "${bindir}/ldd"
 FILES_libsegfault = "${base_libdir}/libSegFault*"
 FILES_libcidn = "${base_libdir}/libcidn-*.so ${base_libdir}/libcidn.so.*"
 FILES_libmemusage = "${base_libdir}/libmemusage.so"
+FILES_libnss-db = "${base_libdir}/libnss_db.so.* ${base_libdir}/libnss_db-*.so ${localstatedir}/db/Makefile"
+RDEPENDS_libnss-db = "${PN}-utils"
+RSUGGESTS_libnss-db = "make"
 FILES_glibc-extra-nss = "${base_libdir}/libnss_*-*.so ${base_libdir}/libnss_*.so.*"
 FILES_sln = "${base_sbindir}/sln"
 FILES_${PN}-pic = "${libdir}/*_pic.a ${libdir}/*_pic.map ${libdir}/libc_pic/*.o"
@@ -59,7 +62,6 @@ inherit libc-common multilib_header
 
 do_install_append () {
 	rm -f ${D}${sysconfdir}/localtime
-	rm -rf ${D}${localstatedir}
 
 	# remove empty glibc dir
 	if [ -d ${D}${libexecdir} ]; then
-- 
2.11.0



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

end of thread, other threads:[~2018-01-16  6:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-16  6:51 [PATCH 0/1 v3] glibc: re-package for libnss-db jackie.huang
2018-01-16  6:51 ` [PATCH 1/1] " jackie.huang

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.