diff options
author | Scott Garman <scott.a.garman@intel.com> | 2012-03-14 17:14:43 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-03-19 14:37:45 +0000 |
commit | 2a7afb661a45ea4f557059eaaad3f91682970477 (patch) | |
tree | 94c1a32f15d2d736a3b2a38e6ea9853a3feb83f1 /meta/recipes-core/base-passwd/base-passwd_3.5.22.bb | |
parent | 35c4c79fa423715c8aaf9a6db0f18bee700af457 (diff) | |
download | poky-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.bb | 94 |
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 @@ | |||
1 | SUMMARY = "Base system master password/group files." | ||
2 | DESCRIPTION = "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." | ||
3 | SECTION = "base" | ||
4 | PR = "r9" | ||
5 | LICENSE = "GPLv2+" | ||
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a" | ||
7 | |||
8 | SRC_URI = "${DEBIAN_MIRROR}/main/b/base-passwd/base-passwd_${PV}.tar.gz \ | ||
9 | file://nobash.patch \ | ||
10 | file://root-home.patch" | ||
11 | |||
12 | SRC_URI[md5sum] = "47f22ab6b572d0133409ff6ad1fab402" | ||
13 | SRC_URI[sha256sum] = "d34acb35a9f9f221e7e4f642b9ef4b22083dd77bb2fc7216756f445316d842fc" | ||
14 | |||
15 | S = "${WORKDIR}/base-passwd" | ||
16 | |||
17 | inherit autotools | ||
18 | |||
19 | PACKAGES =+ "${PN}-update" | ||
20 | FILES_${PN}-update = "${sbindir}/* ${datadir}/${PN}" | ||
21 | |||
22 | ALLOW_EMPTY_${PN} = "1" | ||
23 | |||
24 | SSTATEPOSTINSTFUNCS += "base_passwd_sstate_postinst" | ||
25 | |||
26 | do_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 | |||
45 | base_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 | |||
59 | python 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 | ||
74 | if [ ! -e $D${sysconfdir}/passwd ]; then | ||
75 | cat << EOF > $D${sysconfdir}/passwd | ||
76 | """ + passwd + """EOF | ||
77 | fi | ||
78 | if [ ! -e $D${sysconfdir}/group ]; then | ||
79 | cat << EOF > $D${sysconfdir}/group | ||
80 | """ + group + """EOF | ||
81 | fi | ||
82 | """ | ||
83 | d.setVar('pkg_preinst_${PN}', preinst) | ||
84 | } | ||
85 | |||
86 | addtask do_package after do_populate_sysroot | ||
87 | |||
88 | pkg_postinst_${PN}-update () { | ||
89 | #!/bin/sh | ||
90 | if [ -n "$D" ]; then | ||
91 | exit 0 | ||
92 | fi | ||
93 | ${sbindir}/update-passwd | ||
94 | } | ||