summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/base-passwd/base-passwd_3.5.22.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/base-passwd/base-passwd_3.5.22.bb')
-rw-r--r--meta/recipes-core/base-passwd/base-passwd_3.5.22.bb27
1 files changed, 25 insertions, 2 deletions
diff --git a/meta/recipes-core/base-passwd/base-passwd_3.5.22.bb b/meta/recipes-core/base-passwd/base-passwd_3.5.22.bb
index 6f768ca972..3315c68196 100644
--- a/meta/recipes-core/base-passwd/base-passwd_3.5.22.bb
+++ b/meta/recipes-core/base-passwd/base-passwd_3.5.22.bb
@@ -1,13 +1,14 @@
1SUMMARY = "Base system master password/group files." 1SUMMARY = "Base system master password/group files."
2DESCRIPTION = "The master copies of the user database files (/etc/passwd and /etc/group). The update-passwd tool is also provided to keep the system databases synchronized with these master files." 2DESCRIPTION = "The master copies of the user database files (/etc/passwd and /etc/group). The update-passwd tool is also provided to keep the system databases synchronized with these master files."
3SECTION = "base" 3SECTION = "base"
4PR = "r1" 4PR = "r2"
5LICENSE = "GPLv2+" 5LICENSE = "GPLv2+"
6LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a" 6LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a"
7 7
8SRC_URI = "${DEBIAN_MIRROR}/main/b/base-passwd/base-passwd_${PV}.tar.gz \ 8SRC_URI = "${DEBIAN_MIRROR}/main/b/base-passwd/base-passwd_${PV}.tar.gz \
9 file://nobash.patch \ 9 file://nobash.patch \
10 file://root-home.patch" 10 file://root-home.patch \
11 file://login.defs"
11 12
12SRC_URI[md5sum] = "47f22ab6b572d0133409ff6ad1fab402" 13SRC_URI[md5sum] = "47f22ab6b572d0133409ff6ad1fab402"
13SRC_URI[sha256sum] = "d34acb35a9f9f221e7e4f642b9ef4b22083dd77bb2fc7216756f445316d842fc" 14SRC_URI[sha256sum] = "d34acb35a9f9f221e7e4f642b9ef4b22083dd77bb2fc7216756f445316d842fc"
@@ -16,6 +17,8 @@ S = "${WORKDIR}/base-passwd"
16 17
17inherit autotools 18inherit autotools
18 19
20SSTATEPOSTINSTFUNCS += "base_passwd_sstate_postinst"
21
19do_install () { 22do_install () {
20 install -d -m 755 ${D}${sbindir} 23 install -d -m 755 ${D}${sbindir}
21 install -p -m 755 update-passwd ${D}${sbindir}/ 24 install -p -m 755 update-passwd ${D}${sbindir}/
@@ -27,6 +30,7 @@ do_install () {
27 install -d -m 755 ${D}${datadir}/base-passwd 30 install -d -m 755 ${D}${datadir}/base-passwd
28 install -p -m 644 passwd.master ${D}${datadir}/base-passwd/ 31 install -p -m 644 passwd.master ${D}${datadir}/base-passwd/
29 install -p -m 644 group.master ${D}${datadir}/base-passwd/ 32 install -p -m 644 group.master ${D}${datadir}/base-passwd/
33 install -p -m 644 ${S}/../login.defs ${D}${datadir}/base-passwd/login.defs
30 34
31 install -d -m 755 ${D}${docdir}/${PN} 35 install -d -m 755 ${D}${docdir}/${PN}
32 install -p -m 644 debian/changelog ${D}${docdir}/${PN}/ 36 install -p -m 644 debian/changelog ${D}${docdir}/${PN}/
@@ -45,5 +49,24 @@ pkg_postinst_${PN} () {
45 if [ ! -e $D${sysconfdir}/group ] ; then 49 if [ ! -e $D${sysconfdir}/group ] ; then
46 cp $D${datadir}/base-passwd/group.master $D${sysconfdir}/group 50 cp $D${datadir}/base-passwd/group.master $D${sysconfdir}/group
47 fi 51 fi
52
53 if [ ! -e $D{sysconfdir}/login.defs ] ; then
54 cp $D${datadir}/base-passwd/login.defs $D${sysconfdir}/login.defs
55 fi
48 exit 0 56 exit 0
49} 57}
58
59base_passwd_sstate_postinst() {
60 if [ "${BB_CURRENTTASK}" = "populate_sysroot" -o "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ]
61 then
62 # Staging does not copy ${sysconfdir} files into the
63 # target sysroot, so we need to do so manually. We
64 # put these files in the target sysroot so they can
65 # be used by recipes which use custom user/group
66 # permissions.
67 install -d -m 755 ${STAGING_DIR_TARGET}${sysconfdir}
68 install -p -m 644 ${STAGING_DIR_TARGET}${datadir}/base-passwd/passwd.master ${STAGING_DIR_TARGET}${sysconfdir}/passwd
69 install -p -m 644 ${STAGING_DIR_TARGET}${datadir}/base-passwd/group.master ${STAGING_DIR_TARGET}${sysconfdir}/group
70 install -p -m 644 ${STAGING_DIR_TARGET}${datadir}/base-passwd/login.defs ${STAGING_DIR_TARGET}/${sysconfdir}/login.defs
71 fi
72}