From 72844f54318c31a0f05c75d59283f1fe92a1b1b7 Mon Sep 17 00:00:00 2001 From: Chen Qi Date: Thu, 16 Aug 2018 18:37:58 +0800 Subject: glibc: re-package for libnss-db 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 for libnss-db on glibc-utils - Provide a shell script, makedbs.sh, to generate the db files. This is to avoid dependency on 'make'. Notes: 1. For external toolchain, an extra package 'libnss-db' need to be provided If replacing glibc from core. 2. I've check the git history of nss/db-Makefile, the last two functionality fix is as below. - fix non-portable `echo -n` usage -- Date: Thu Aug 6 04:14:20 2015 -0400 - Fix db makefile rule for group.db -- Date: Fri Nov 11 14:43:36 2011 +0100 So I think this file is stable enough. And using makedbs.sh which is crafted according to that file is not likely to cause maintanence problem. (From OE-Core rev: 13cf502fce8956f95fdc8ac0c7a37d741223bcc9) Signed-off-by: Jackie Huang Signed-off-by: Chen Qi Signed-off-by: Richard Purdie --- meta/recipes-core/glibc/glibc_2.28.bb | 1 + 1 file changed, 1 insertion(+) (limited to 'meta/recipes-core/glibc/glibc_2.28.bb') diff --git a/meta/recipes-core/glibc/glibc_2.28.bb b/meta/recipes-core/glibc/glibc_2.28.bb index 95e333dd5c..0ebbaf9610 100644 --- a/meta/recipes-core/glibc/glibc_2.28.bb +++ b/meta/recipes-core/glibc/glibc_2.28.bb @@ -17,6 +17,7 @@ UPSTREAM_CHECK_GITTAGREGEX = "(?P\d+\.\d+(\.(?!90)\d+)*)" SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \ file://etc/ld.so.conf \ file://generate-supported.mk \ + file://makedbs.sh \ \ ${NATIVESDKFIXES} \ file://0006-fsl-e500-e5500-e6500-603e-fsqrt-implementation.patch \ -- cgit v1.2.3-54-g00ecf