diff options
author | Peter Kjellerstedt <peter.kjellerstedt@axis.com> | 2022-05-14 23:14:50 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-05-16 23:19:18 +0100 |
commit | 0dc16dcfff14ac5cbe672c5539ce1c0ac5b9d5c9 (patch) | |
tree | b0384e94d5fd0d815f3bfde20d605158dfc2eca5 /meta/recipes-core/base-passwd/base-passwd_3.5.29.bb | |
parent | 126e039eef6a9d3211206b6e44254260c3899cca (diff) | |
download | poky-0dc16dcfff14ac5cbe672c5539ce1c0ac5b9d5c9.tar.gz |
base-passwd: Update to 3.5.52
* Add a patch to allow the use of debconf to be disabled.
* Replace 0007-Disable-generation-of-the-documentation.patch with a new
patch to disable the generation of the documentation using a
configuration option.
* Replace 0006-Disable-shell-for-default-users.patch with a sed
expression that uses a variable, NOLOGIN, to specify what command to
use for users that are not expected to login. This allows to use some
other command than "nologin", e.g., "false". Also, by using
${base_sbindir}, it adheres to usrmerge being configured.
(From OE-Core rev: e7abf63cc8bdc61c8d978b3c21a38e17716fc292)
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.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 | 118 |
1 files changed, 0 insertions, 118 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 deleted file mode 100644 index e561599136..0000000000 --- a/meta/recipes-core/base-passwd/base-passwd_3.5.29.bb +++ /dev/null | |||
@@ -1,118 +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 | HOMEPAGE = "https://launchpad.net/base-passwd" | ||
4 | SECTION = "base" | ||
5 | LICENSE = "GPL-2.0-only" | ||
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a" | ||
7 | |||
8 | RECIPE_NO_UPDATE_REASON = "Version 3.5.38 requires cdebconf for update-passwd utility" | ||
9 | |||
10 | SRC_URI = "https://launchpad.net/debian/+archive/primary/+files/${BPN}_${PV}.tar.gz \ | ||
11 | file://0001-Add-a-shutdown-group.patch \ | ||
12 | file://0002-Use-bin-sh-instead-of-bin-bash-for-the-root-user.patch \ | ||
13 | file://0003-Remove-for-root-since-we-do-not-have-an-etc-shadow.patch \ | ||
14 | file://0004-Add-an-input-group-for-the-dev-input-devices.patch \ | ||
15 | file://0005-Add-kvm-group.patch \ | ||
16 | file://0006-Disable-shell-for-default-users.patch \ | ||
17 | file://0007-Disable-generation-of-the-documentation.patch \ | ||
18 | " | ||
19 | |||
20 | SRC_URI[md5sum] = "6beccac48083fe8ae5048acd062e5421" | ||
21 | SRC_URI[sha256sum] = "f0b66388b2c8e49c15692439d2bee63bcdd4bbbf7a782c7f64accc55986b6a36" | ||
22 | |||
23 | # the package is taken from launchpad; that source is static and goes stale | ||
24 | # so we check the latest upstream from a directory that does get updated | ||
25 | UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/b/base-passwd/" | ||
26 | |||
27 | inherit autotools | ||
28 | |||
29 | do_install () { | ||
30 | install -d -m 755 ${D}${sbindir} | ||
31 | install -o root -g root -p -m 755 ${B}/update-passwd ${D}${sbindir}/ | ||
32 | install -d -m 755 ${D}${mandir}/man8 ${D}${mandir}/pl/man8 | ||
33 | install -p -m 644 ${S}/man/update-passwd.8 ${D}${mandir}/man8/ | ||
34 | install -p -m 644 ${S}/man/update-passwd.pl.8 \ | ||
35 | ${D}${mandir}/pl/man8/update-passwd.8 | ||
36 | gzip -9 ${D}${mandir}/man8/* ${D}${mandir}/pl/man8/* | ||
37 | install -d -m 755 ${D}${datadir}/base-passwd | ||
38 | install -o root -g root -p -m 644 ${S}/passwd.master ${D}${datadir}/base-passwd/ | ||
39 | sed -i 's#:/root:#:${ROOT_HOME}:#' ${D}${datadir}/base-passwd/passwd.master | ||
40 | install -o root -g root -p -m 644 ${S}/group.master ${D}${datadir}/base-passwd/ | ||
41 | |||
42 | install -d -m 755 ${D}${docdir}/${BPN} | ||
43 | install -p -m 644 ${S}/debian/changelog ${D}${docdir}/${BPN}/ | ||
44 | gzip -9 ${D}${docdir}/${BPN}/* | ||
45 | install -p -m 644 ${S}/README ${D}${docdir}/${BPN}/ | ||
46 | install -p -m 644 ${S}/debian/copyright ${D}${docdir}/${BPN}/ | ||
47 | } | ||
48 | |||
49 | basepasswd_sysroot_postinst() { | ||
50 | #!/bin/sh | ||
51 | |||
52 | # Install passwd.master and group.master to sysconfdir | ||
53 | install -d -m 755 ${STAGING_DIR_TARGET}${sysconfdir} | ||
54 | for i in passwd group; do | ||
55 | install -p -m 644 ${STAGING_DIR_TARGET}${datadir}/base-passwd/\$i.master \ | ||
56 | ${STAGING_DIR_TARGET}${sysconfdir}/\$i | ||
57 | done | ||
58 | |||
59 | # Run any useradd postinsts | ||
60 | for script in ${STAGING_DIR_TARGET}${bindir}/postinst-useradd-*; do | ||
61 | if [ -f \$script ]; then | ||
62 | \$script | ||
63 | fi | ||
64 | done | ||
65 | } | ||
66 | |||
67 | SYSROOT_DIRS += "${sysconfdir}" | ||
68 | SYSROOT_PREPROCESS_FUNCS += "base_passwd_tweaksysroot" | ||
69 | |||
70 | base_passwd_tweaksysroot () { | ||
71 | mkdir -p ${SYSROOT_DESTDIR}${bindir} | ||
72 | dest=${SYSROOT_DESTDIR}${bindir}/postinst-${PN} | ||
73 | echo "${basepasswd_sysroot_postinst}" > $dest | ||
74 | chmod 0755 $dest | ||
75 | } | ||
76 | |||
77 | python populate_packages:prepend() { | ||
78 | # Add in the preinst function for ${PN} | ||
79 | # We have to do this here as prior to this, passwd/group.master | ||
80 | # would be unavailable. We need to create these files at preinst | ||
81 | # time before the files from the package may be available, hence | ||
82 | # storing the data from the files in the preinst directly. | ||
83 | |||
84 | f = open(d.expand("${STAGING_DATADIR}/base-passwd/passwd.master"), 'r') | ||
85 | passwd = "".join(f.readlines()) | ||
86 | f.close() | ||
87 | f = open(d.expand("${STAGING_DATADIR}/base-passwd/group.master"), 'r') | ||
88 | group = "".join(f.readlines()) | ||
89 | f.close() | ||
90 | |||
91 | preinst = """#!/bin/sh | ||
92 | mkdir -p $D${sysconfdir} | ||
93 | if [ ! -e $D${sysconfdir}/passwd ]; then | ||
94 | \tcat << 'EOF' > $D${sysconfdir}/passwd | ||
95 | """ + passwd + """EOF | ||
96 | fi | ||
97 | if [ ! -e $D${sysconfdir}/group ]; then | ||
98 | \tcat << 'EOF' > $D${sysconfdir}/group | ||
99 | """ + group + """EOF | ||
100 | fi | ||
101 | """ | ||
102 | d.setVar(d.expand('pkg_preinst:${PN}'), preinst) | ||
103 | } | ||
104 | |||
105 | addtask do_package after do_populate_sysroot | ||
106 | |||
107 | ALLOW_EMPTY:${PN} = "1" | ||
108 | |||
109 | PACKAGES =+ "${PN}-update" | ||
110 | FILES:${PN}-update = "${sbindir}/* ${datadir}/${PN}" | ||
111 | |||
112 | pkg_postinst:${PN}-update () { | ||
113 | #!/bin/sh | ||
114 | if [ -n "$D" ]; then | ||
115 | exit 0 | ||
116 | fi | ||
117 | ${sbindir}/update-passwd | ||
118 | } | ||