summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/base-passwd/base-passwd_3.5.29.bb
diff options
context:
space:
mode:
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>2022-05-14 23:14:50 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-05-16 23:18:23 +0100
commite7abf63cc8bdc61c8d978b3c21a38e17716fc292 (patch)
treecba057ed001e4dfba4714c5ca44d34627789a04d /meta/recipes-core/base-passwd/base-passwd_3.5.29.bb
parent6515d96c12b080b9e7f344799e26dba3b98e17e2 (diff)
downloadopenembedded-core-e7abf63cc8bdc61c8d978b3c21a38e17716fc292.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. 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.bb118
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 @@
-SUMMARY = "Base system master password/group files"
-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."
-HOMEPAGE = "https://launchpad.net/base-passwd"
-SECTION = "base"
-LICENSE = "GPL-2.0-only"
-LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a"
-
-RECIPE_NO_UPDATE_REASON = "Version 3.5.38 requires cdebconf for update-passwd utility"
-
-SRC_URI = "https://launchpad.net/debian/+archive/primary/+files/${BPN}_${PV}.tar.gz \
- file://0001-Add-a-shutdown-group.patch \
- file://0002-Use-bin-sh-instead-of-bin-bash-for-the-root-user.patch \
- file://0003-Remove-for-root-since-we-do-not-have-an-etc-shadow.patch \
- file://0004-Add-an-input-group-for-the-dev-input-devices.patch \
- file://0005-Add-kvm-group.patch \
- file://0006-Disable-shell-for-default-users.patch \
- file://0007-Disable-generation-of-the-documentation.patch \
- "
-
-SRC_URI[md5sum] = "6beccac48083fe8ae5048acd062e5421"
-SRC_URI[sha256sum] = "f0b66388b2c8e49c15692439d2bee63bcdd4bbbf7a782c7f64accc55986b6a36"
-
-# the package is taken from launchpad; that source is static and goes stale
-# so we check the latest upstream from a directory that does get updated
-UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/b/base-passwd/"
-
-inherit autotools
-
-do_install () {
- install -d -m 755 ${D}${sbindir}
- install -o root -g root -p -m 755 ${B}/update-passwd ${D}${sbindir}/
- install -d -m 755 ${D}${mandir}/man8 ${D}${mandir}/pl/man8
- install -p -m 644 ${S}/man/update-passwd.8 ${D}${mandir}/man8/
- install -p -m 644 ${S}/man/update-passwd.pl.8 \
- ${D}${mandir}/pl/man8/update-passwd.8
- gzip -9 ${D}${mandir}/man8/* ${D}${mandir}/pl/man8/*
- install -d -m 755 ${D}${datadir}/base-passwd
- install -o root -g root -p -m 644 ${S}/passwd.master ${D}${datadir}/base-passwd/
- sed -i 's#:/root:#:${ROOT_HOME}:#' ${D}${datadir}/base-passwd/passwd.master
- install -o root -g root -p -m 644 ${S}/group.master ${D}${datadir}/base-passwd/
-
- install -d -m 755 ${D}${docdir}/${BPN}
- install -p -m 644 ${S}/debian/changelog ${D}${docdir}/${BPN}/
- gzip -9 ${D}${docdir}/${BPN}/*
- install -p -m 644 ${S}/README ${D}${docdir}/${BPN}/
- install -p -m 644 ${S}/debian/copyright ${D}${docdir}/${BPN}/
-}
-
-basepasswd_sysroot_postinst() {
-#!/bin/sh
-
-# Install passwd.master and group.master to sysconfdir
-install -d -m 755 ${STAGING_DIR_TARGET}${sysconfdir}
-for i in passwd group; do
- install -p -m 644 ${STAGING_DIR_TARGET}${datadir}/base-passwd/\$i.master \
- ${STAGING_DIR_TARGET}${sysconfdir}/\$i
-done
-
-# Run any useradd postinsts
-for script in ${STAGING_DIR_TARGET}${bindir}/postinst-useradd-*; do
- if [ -f \$script ]; then
- \$script
- fi
-done
-}
-
-SYSROOT_DIRS += "${sysconfdir}"
-SYSROOT_PREPROCESS_FUNCS += "base_passwd_tweaksysroot"
-
-base_passwd_tweaksysroot () {
- mkdir -p ${SYSROOT_DESTDIR}${bindir}
- dest=${SYSROOT_DESTDIR}${bindir}/postinst-${PN}
- echo "${basepasswd_sysroot_postinst}" > $dest
- chmod 0755 $dest
-}
-
-python populate_packages:prepend() {
- # Add in the preinst function for ${PN}
- # We have to do this here as prior to this, passwd/group.master
- # would be unavailable. We need to create these files at preinst
- # time before the files from the package may be available, hence
- # storing the data from the files in the preinst directly.
-
- f = open(d.expand("${STAGING_DATADIR}/base-passwd/passwd.master"), 'r')
- passwd = "".join(f.readlines())
- f.close()
- f = open(d.expand("${STAGING_DATADIR}/base-passwd/group.master"), 'r')
- group = "".join(f.readlines())
- f.close()
-
- preinst = """#!/bin/sh
-mkdir -p $D${sysconfdir}
-if [ ! -e $D${sysconfdir}/passwd ]; then
-\tcat << 'EOF' > $D${sysconfdir}/passwd
-""" + passwd + """EOF
-fi
-if [ ! -e $D${sysconfdir}/group ]; then
-\tcat << 'EOF' > $D${sysconfdir}/group
-""" + group + """EOF
-fi
-"""
- d.setVar(d.expand('pkg_preinst:${PN}'), preinst)
-}
-
-addtask do_package after do_populate_sysroot
-
-ALLOW_EMPTY:${PN} = "1"
-
-PACKAGES =+ "${PN}-update"
-FILES:${PN}-update = "${sbindir}/* ${datadir}/${PN}"
-
-pkg_postinst:${PN}-update () {
-#!/bin/sh
-if [ -n "$D" ]; then
- exit 0
-fi
-${sbindir}/update-passwd
-}