summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/base-passwd/base-passwd_3.5.22.bb
diff options
context:
space:
mode:
authorScott Garman <scott.a.garman@intel.com>2012-03-14 17:14:43 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-03-19 14:37:45 +0000
commit2a7afb661a45ea4f557059eaaad3f91682970477 (patch)
tree94c1a32f15d2d736a3b2a38e6ea9853a3feb83f1 /meta/recipes-core/base-passwd/base-passwd_3.5.22.bb
parent35c4c79fa423715c8aaf9a6db0f18bee700af457 (diff)
downloadpoky-2a7afb661a45ea4f557059eaaad3f91682970477.tar.gz
base-passwd: upgrade to 3.5.24
Includes minor formatting cleanups. (From OE-Core rev: 5c0be0af8090839588c04ffdba8fd5d75321126c) Signed-off-by: Scott Garman <scott.a.garman@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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.bb94
1 files changed, 0 insertions, 94 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
deleted file mode 100644
index ae3864c0a6..0000000000
--- a/meta/recipes-core/base-passwd/base-passwd_3.5.22.bb
+++ /dev/null
@@ -1,94 +0,0 @@
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."
3SECTION = "base"
4PR = "r9"
5LICENSE = "GPLv2+"
6LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a"
7
8SRC_URI = "${DEBIAN_MIRROR}/main/b/base-passwd/base-passwd_${PV}.tar.gz \
9 file://nobash.patch \
10 file://root-home.patch"
11
12SRC_URI[md5sum] = "47f22ab6b572d0133409ff6ad1fab402"
13SRC_URI[sha256sum] = "d34acb35a9f9f221e7e4f642b9ef4b22083dd77bb2fc7216756f445316d842fc"
14
15S = "${WORKDIR}/base-passwd"
16
17inherit autotools
18
19PACKAGES =+ "${PN}-update"
20FILES_${PN}-update = "${sbindir}/* ${datadir}/${PN}"
21
22ALLOW_EMPTY_${PN} = "1"
23
24SSTATEPOSTINSTFUNCS += "base_passwd_sstate_postinst"
25
26do_install () {
27 install -d -m 755 ${D}${sbindir}
28 install -o root -g root -p -m 755 update-passwd ${D}${sbindir}/
29 install -d -m 755 ${D}${mandir}/man8 ${D}${mandir}/pl/man8
30 install -p -m 644 man/update-passwd.8 ${D}${mandir}/man8/
31 install -p -m 644 man/update-passwd.pl.8 \
32 ${D}${mandir}/pl/man8/update-passwd.8
33 gzip -9 ${D}${mandir}/man8/* ${D}${mandir}/pl/man8/*
34 install -d -m 755 ${D}${datadir}/base-passwd
35 install -o root -g root -p -m 644 passwd.master ${D}${datadir}/base-passwd/
36 install -o root -g root -p -m 644 group.master ${D}${datadir}/base-passwd/
37
38 install -d -m 755 ${D}${docdir}/${BPN}
39 install -p -m 644 debian/changelog ${D}${docdir}/${BPN}/
40 gzip -9 ${D}${docdir}/${BPN}/*
41 install -p -m 644 README ${D}${docdir}/${BPN}/
42 install -p -m 644 debian/copyright ${D}${docdir}/${BPN}/
43}
44
45base_passwd_sstate_postinst() {
46 if [ "${BB_CURRENTTASK}" = "populate_sysroot" -o "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ]
47 then
48 # Staging does not copy ${sysconfdir} files into the
49 # target sysroot, so we need to do so manually. We
50 # put these files in the target sysroot so they can
51 # be used by recipes which use custom user/group
52 # permissions.
53 install -d -m 755 ${STAGING_DIR_TARGET}${sysconfdir}
54 install -p -m 644 ${STAGING_DIR_TARGET}${datadir}/base-passwd/passwd.master ${STAGING_DIR_TARGET}${sysconfdir}/passwd
55 install -p -m 644 ${STAGING_DIR_TARGET}${datadir}/base-passwd/group.master ${STAGING_DIR_TARGET}${sysconfdir}/group
56 fi
57}
58
59python populate_packages_prepend() {
60 # Add in the preinst function for ${PN}
61 # We have to do this here as prior to this, passwd/group.master
62 # would be unavailable. We need to create these files at preinst
63 # time before the files from the package may be available, hence
64 # storing the data from the files in the preinst directly.
65
66 f = open(d.expand("${STAGING_DATADIR}/base-passwd/passwd.master"), 'r')
67 passwd = "".join(f.readlines())
68 f.close()
69 f = open(d.expand("${STAGING_DATADIR}/base-passwd/group.master"), 'r')
70 group = "".join(f.readlines())
71 f.close()
72
73 preinst = """#!/bin/sh
74if [ ! -e $D${sysconfdir}/passwd ]; then
75 cat << EOF > $D${sysconfdir}/passwd
76""" + passwd + """EOF
77fi
78if [ ! -e $D${sysconfdir}/group ]; then
79 cat << EOF > $D${sysconfdir}/group
80""" + group + """EOF
81fi
82"""
83 d.setVar('pkg_preinst_${PN}', preinst)
84}
85
86addtask do_package after do_populate_sysroot
87
88pkg_postinst_${PN}-update () {
89#!/bin/sh
90if [ -n "$D" ]; then
91 exit 0
92fi
93${sbindir}/update-passwd
94}