diff options
author | Upgrade Helper <uh@not.set> | 2014-01-04 11:44:14 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-01-10 15:16:47 +0000 |
commit | 0509a60ba5820bd94e107a244b8a01e6f4776741 (patch) | |
tree | e0d1e55b8245fe4681c96b9cc065c59c88f7e0ab /meta/recipes-core/base-passwd/base-passwd_3.5.29.bb | |
parent | 6ee5d95317de77c1cfb6db6f1ab2de77f5fa085e (diff) | |
download | poky-0509a60ba5820bd94e107a244b8a01e6f4776741.tar.gz |
base-passwd: upgrade to 3.5.29
(From OE-Core rev: 7c79e70d3a803f2ccb9b9c6ed2134019631672fd)
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/base-passwd/base-passwd_3.5.29.bb')
-rw-r--r-- | meta/recipes-core/base-passwd/base-passwd_3.5.29.bb | 98 |
1 files changed, 98 insertions, 0 deletions
diff --git a/meta/recipes-core/base-passwd/base-passwd_3.5.29.bb b/meta/recipes-core/base-passwd/base-passwd_3.5.29.bb new file mode 100644 index 0000000000..082037a2a3 --- /dev/null +++ b/meta/recipes-core/base-passwd/base-passwd_3.5.29.bb | |||
@@ -0,0 +1,98 @@ | |||
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 | LICENSE = "GPLv2+" | ||
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a" | ||
6 | |||
7 | DEPENDS = "docbook-utils-native linuxdoc-tools-native" | ||
8 | |||
9 | SRC_URI = "${DEBIAN_MIRROR}/main/b/base-passwd/base-passwd_${PV}.tar.gz \ | ||
10 | file://add_shutdown.patch \ | ||
11 | file://nobash.patch \ | ||
12 | file://input.patch \ | ||
13 | file://disable-docs.patch \ | ||
14 | " | ||
15 | |||
16 | SRC_URI[md5sum] = "6beccac48083fe8ae5048acd062e5421" | ||
17 | SRC_URI[sha256sum] = "f0b66388b2c8e49c15692439d2bee63bcdd4bbbf7a782c7f64accc55986b6a36" | ||
18 | |||
19 | inherit autotools | ||
20 | |||
21 | SSTATEPOSTINSTFUNCS += "base_passwd_sstate_postinst" | ||
22 | |||
23 | do_install () { | ||
24 | install -d -m 755 ${D}${sbindir} | ||
25 | install -o root -g root -p -m 755 ${B}/update-passwd ${D}${sbindir}/ | ||
26 | install -d -m 755 ${D}${mandir}/man8 ${D}${mandir}/pl/man8 | ||
27 | install -p -m 644 ${S}/man/update-passwd.8 ${D}${mandir}/man8/ | ||
28 | install -p -m 644 ${S}/man/update-passwd.pl.8 \ | ||
29 | ${D}${mandir}/pl/man8/update-passwd.8 | ||
30 | gzip -9 ${D}${mandir}/man8/* ${D}${mandir}/pl/man8/* | ||
31 | install -d -m 755 ${D}${datadir}/base-passwd | ||
32 | sed -i 's#:/root:#:${ROOT_HOME}:#' ${S}/passwd.master | ||
33 | install -o root -g root -p -m 644 ${S}/passwd.master ${D}${datadir}/base-passwd/ | ||
34 | install -o root -g root -p -m 644 ${S}/group.master ${D}${datadir}/base-passwd/ | ||
35 | |||
36 | install -d -m 755 ${D}${docdir}/${BPN} | ||
37 | install -p -m 644 ${S}/debian/changelog ${D}${docdir}/${BPN}/ | ||
38 | gzip -9 ${D}${docdir}/${BPN}/* | ||
39 | install -p -m 644 ${S}/README ${D}${docdir}/${BPN}/ | ||
40 | install -p -m 644 ${S}/debian/copyright ${D}${docdir}/${BPN}/ | ||
41 | } | ||
42 | |||
43 | base_passwd_sstate_postinst() { | ||
44 | if [ "${BB_CURRENTTASK}" = "populate_sysroot" -o "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ] | ||
45 | then | ||
46 | # Staging does not copy ${sysconfdir} files into the | ||
47 | # target sysroot, so we need to do so manually. We | ||
48 | # put these files in the target sysroot so they can | ||
49 | # be used by recipes which use custom user/group | ||
50 | # permissions. | ||
51 | install -d -m 755 ${STAGING_DIR_TARGET}${sysconfdir} | ||
52 | install -p -m 644 ${STAGING_DIR_TARGET}${datadir}/base-passwd/passwd.master ${STAGING_DIR_TARGET}${sysconfdir}/passwd | ||
53 | install -p -m 644 ${STAGING_DIR_TARGET}${datadir}/base-passwd/group.master ${STAGING_DIR_TARGET}${sysconfdir}/group | ||
54 | fi | ||
55 | } | ||
56 | |||
57 | python populate_packages_prepend() { | ||
58 | # Add in the preinst function for ${PN} | ||
59 | # We have to do this here as prior to this, passwd/group.master | ||
60 | # would be unavailable. We need to create these files at preinst | ||
61 | # time before the files from the package may be available, hence | ||
62 | # storing the data from the files in the preinst directly. | ||
63 | |||
64 | f = open(d.expand("${STAGING_DATADIR}/base-passwd/passwd.master"), 'r') | ||
65 | passwd = "".join(f.readlines()) | ||
66 | f.close() | ||
67 | f = open(d.expand("${STAGING_DATADIR}/base-passwd/group.master"), 'r') | ||
68 | group = "".join(f.readlines()) | ||
69 | f.close() | ||
70 | |||
71 | preinst = """#!/bin/sh | ||
72 | mkdir -p $D${sysconfdir} | ||
73 | if [ ! -e $D${sysconfdir}/passwd ]; then | ||
74 | \tcat << EOF > $D${sysconfdir}/passwd | ||
75 | """ + passwd + """EOF | ||
76 | fi | ||
77 | if [ ! -e $D${sysconfdir}/group ]; then | ||
78 | \tcat << EOF > $D${sysconfdir}/group | ||
79 | """ + group + """EOF | ||
80 | fi | ||
81 | """ | ||
82 | d.setVar('pkg_preinst_${PN}', preinst) | ||
83 | } | ||
84 | |||
85 | addtask do_package after do_populate_sysroot | ||
86 | |||
87 | ALLOW_EMPTY_${PN} = "1" | ||
88 | |||
89 | PACKAGES =+ "${PN}-update" | ||
90 | FILES_${PN}-update = "${sbindir}/* ${datadir}/${PN}" | ||
91 | |||
92 | pkg_postinst_${PN}-update () { | ||
93 | #!/bin/sh | ||
94 | if [ -n "$D" ]; then | ||
95 | exit 0 | ||
96 | fi | ||
97 | ${sbindir}/update-passwd | ||
98 | } | ||