]> code.ossystems Code Review - openembedded-core.git/commit
glibc: re-package for libnss-db
authorChen Qi <Qi.Chen@windriver.com>
Thu, 16 Aug 2018 10:37:58 +0000 (18:37 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 19 Aug 2018 15:33:41 +0000 (16:33 +0100)
commit13cf502fce8956f95fdc8ac0c7a37d741223bcc9
tree06b913ea90519d07ca61917e27eb0bd19d177fc0
parent176e50fb177dc40e439700d5f3f838dd7eaaa427
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.

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-core/glibc/glibc-package.inc
meta/recipes-core/glibc/glibc/makedbs.sh [new file with mode: 0755]
meta/recipes-core/glibc/glibc_2.28.bb