summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/base-passwd
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/base-passwd')
-rw-r--r--meta/recipes-core/base-passwd/base-passwd/0001-Add-a-shutdown-group.patch26
-rw-r--r--meta/recipes-core/base-passwd/base-passwd/0001-base-passwd-Add-the-sgx-group.patch30
-rw-r--r--meta/recipes-core/base-passwd/base-passwd/0002-Use-bin-sh-instead-of-bin-bash-for-the-root-user.patch23
-rw-r--r--meta/recipes-core/base-passwd/base-passwd/0003-Remove-for-root-since-we-do-not-have-an-etc-shadow.patch21
-rw-r--r--meta/recipes-core/base-passwd/base-passwd/0004-Add-an-input-group-for-the-dev-input-devices.patch23
-rw-r--r--meta/recipes-core/base-passwd/base-passwd/0005-Add-kvm-group.patch (renamed from meta/recipes-core/base-passwd/base-passwd/kvm.patch)2
-rw-r--r--meta/recipes-core/base-passwd/base-passwd/0007-Add-wheel-group.patch20
-rw-r--r--meta/recipes-core/base-passwd/base-passwd/add_shutdown.patch19
-rw-r--r--meta/recipes-core/base-passwd/base-passwd/disable-docs.patch24
-rw-r--r--meta/recipes-core/base-passwd/base-passwd/input.patch22
-rw-r--r--meta/recipes-core/base-passwd/base-passwd/nobash.patch15
-rw-r--r--meta/recipes-core/base-passwd/base-passwd/noshadow.patch14
-rw-r--r--meta/recipes-core/base-passwd/base-passwd_3.6.3.bb (renamed from meta/recipes-core/base-passwd/base-passwd_3.5.29.bb)44
13 files changed, 170 insertions, 113 deletions
diff --git a/meta/recipes-core/base-passwd/base-passwd/0001-Add-a-shutdown-group.patch b/meta/recipes-core/base-passwd/base-passwd/0001-Add-a-shutdown-group.patch
new file mode 100644
index 0000000000..e50efc9623
--- /dev/null
+++ b/meta/recipes-core/base-passwd/base-passwd/0001-Add-a-shutdown-group.patch
@@ -0,0 +1,26 @@
1From 8f3ace87df3aaad85946c22cae240532ea3e73b8 Mon Sep 17 00:00:00 2001
2From: Saul Wold <sgw@linux.intel.com>
3Date: Fri, 29 Apr 2022 13:32:27 +0000
4Subject: [PATCH] Add a shutdown group
5
6We need to have a shutdown group to allow the shutdown icon to work
7correctly. Any users that want to use shutdown like the xuser should
8be added to this group.
9
10Upstream-Status: Inappropriate [Embedded]
11Signed-off-by: Saul Wold <sgw@linux.intel.com>
12---
13 group.master | 1 +
14 1 file changed, 1 insertion(+)
15
16diff --git a/group.master b/group.master
17index ad1dd2d..1b5e2fb 100644
18--- a/group.master
19+++ b/group.master
20@@ -35,5 +35,6 @@ sasl:*:45:
21 plugdev:*:46:
22 staff:*:50:
23 games:*:60:
24+shutdown:*:70:
25 users:*:100:
26 nogroup:*:65534:
diff --git a/meta/recipes-core/base-passwd/base-passwd/0001-base-passwd-Add-the-sgx-group.patch b/meta/recipes-core/base-passwd/base-passwd/0001-base-passwd-Add-the-sgx-group.patch
new file mode 100644
index 0000000000..e1340e1b70
--- /dev/null
+++ b/meta/recipes-core/base-passwd/base-passwd/0001-base-passwd-Add-the-sgx-group.patch
@@ -0,0 +1,30 @@
1From 9e57771d138ac423d5139b984b8c869122ce4976 Mon Sep 17 00:00:00 2001
2From: Alex Kiernan <alexk@zuma.ai>
3Date: Fri, 28 Jul 2023 10:28:57 +0100
4Subject: [PATCH] base-passwd: Add the sgx group
5
6To avoid errors from eudev/udev we need an sgx group, but if we add it
7via groupadd that causes shadow login to be brought into an image, which
8causes images which have CONFIG_MULTIUSER unset to fail with `setgid:
9Function not implemented` as shadow's login doesn't implement the
10heuristics which busybox has to handle this kernel configuration.
11
12Upstream-Status: Inappropriate [oe-specific]
13
14Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
15---
16 group.master | 1 +
17 1 file changed, 1 insertion(+)
18
19diff --git a/group.master b/group.master
20index d34d2b832d43..e54fd1d2c6dc 100644
21--- a/group.master
22+++ b/group.master
23@@ -34,6 +34,7 @@ video:*:44:
24 sasl:*:45:
25 plugdev:*:46:
26 kvm:*:47:
27+sgx:*:48:
28 staff:*:50:
29 games:*:60:
30 shutdown:*:70:
diff --git a/meta/recipes-core/base-passwd/base-passwd/0002-Use-bin-sh-instead-of-bin-bash-for-the-root-user.patch b/meta/recipes-core/base-passwd/base-passwd/0002-Use-bin-sh-instead-of-bin-bash-for-the-root-user.patch
new file mode 100644
index 0000000000..09f8cfea9c
--- /dev/null
+++ b/meta/recipes-core/base-passwd/base-passwd/0002-Use-bin-sh-instead-of-bin-bash-for-the-root-user.patch
@@ -0,0 +1,23 @@
1From 4411fc0df77566d52bee11ec0bad4be30a96e99e Mon Sep 17 00:00:00 2001
2From: Scott Garman <scott.a.garman@intel.com>
3Date: Fri, 29 Apr 2022 13:32:27 +0000
4Subject: [PATCH] Use /bin/sh instead of /bin/bash for the root user
5
6/bin/bash may not be included in some images such as minimal.
7
8Upstream-Status: Inappropriate [configuration]
9Signed-off-by: Scott Garman <scott.a.garman@intel.com>
10---
11 passwd.master | 2 +-
12 1 file changed, 1 insertion(+), 1 deletion(-)
13
14diff --git a/passwd.master b/passwd.master
15index 7cd4e24..041685a 100644
16--- a/passwd.master
17+++ b/passwd.master
18@@ -1,4 +1,4 @@
19-root:*:0:0:root:/root:/bin/bash
20+root:*:0:0:root:/root:/bin/sh
21 daemon:*:1:1:daemon:/usr/sbin:/usr/sbin/nologin
22 bin:*:2:2:bin:/bin:/usr/sbin/nologin
23 sys:*:3:3:sys:/dev:/usr/sbin/nologin
diff --git a/meta/recipes-core/base-passwd/base-passwd/0003-Remove-for-root-since-we-do-not-have-an-etc-shadow.patch b/meta/recipes-core/base-passwd/base-passwd/0003-Remove-for-root-since-we-do-not-have-an-etc-shadow.patch
new file mode 100644
index 0000000000..06222ab04c
--- /dev/null
+++ b/meta/recipes-core/base-passwd/base-passwd/0003-Remove-for-root-since-we-do-not-have-an-etc-shadow.patch
@@ -0,0 +1,21 @@
1From 13a1a284a134d18a454625a5b4485c0d99079ae9 Mon Sep 17 00:00:00 2001
2From: Scott Garman <scott.a.garman@intel.com>
3Date: Fri, 29 Apr 2022 13:32:28 +0000
4Subject: [PATCH] Remove "*" for root since we do not have an /etc/shadow
5
6Upstream-Status: Inappropriate [configuration]
7Signed-off-by: Scott Garman <scott.a.garman@intel.com>
8---
9 passwd.master | 2 +-
10 1 file changed, 1 insertion(+), 1 deletion(-)
11
12diff --git a/passwd.master b/passwd.master
13index 041685a..31a84d4 100644
14--- a/passwd.master
15+++ b/passwd.master
16@@ -1,4 +1,4 @@
17-root:*:0:0:root:/root:/bin/sh
18+root::0:0:root:/root:/bin/sh
19 daemon:*:1:1:daemon:/usr/sbin:/usr/sbin/nologin
20 bin:*:2:2:bin:/bin:/usr/sbin/nologin
21 sys:*:3:3:sys:/dev:/usr/sbin/nologin
diff --git a/meta/recipes-core/base-passwd/base-passwd/0004-Add-an-input-group-for-the-dev-input-devices.patch b/meta/recipes-core/base-passwd/base-passwd/0004-Add-an-input-group-for-the-dev-input-devices.patch
new file mode 100644
index 0000000000..394a0f01d3
--- /dev/null
+++ b/meta/recipes-core/base-passwd/base-passwd/0004-Add-an-input-group-for-the-dev-input-devices.patch
@@ -0,0 +1,23 @@
1From c5f012750f8102ff54af73ccc2d2b7bfa1f26db4 Mon Sep 17 00:00:00 2001
2From: Darren Hart <dvhart@linux.intel.com>
3Date: Fri, 29 Apr 2022 13:32:28 +0000
4Subject: [PATCH] Add an input group for the /dev/input/* devices
5
6Upstream-Status: Inappropriate [configuration]
7Signed-off-by: Darren Hart <dvhart@linux.intel.com>
8---
9 group.master | 1 +
10 1 file changed, 1 insertion(+)
11
12diff --git a/group.master b/group.master
13index 1b5e2fb..cea9d60 100644
14--- a/group.master
15+++ b/group.master
16@@ -12,6 +12,7 @@ uucp:*:10:
17 man:*:12:
18 proxy:*:13:
19 kmem:*:15:
20+input:*:19:
21 dialout:*:20:
22 fax:*:21:
23 voice:*:22:
diff --git a/meta/recipes-core/base-passwd/base-passwd/kvm.patch b/meta/recipes-core/base-passwd/base-passwd/0005-Add-kvm-group.patch
index 113d5151e7..72e6ee333c 100644
--- a/meta/recipes-core/base-passwd/base-passwd/kvm.patch
+++ b/meta/recipes-core/base-passwd/base-passwd/0005-Add-kvm-group.patch
@@ -1,4 +1,4 @@
1From 6355278b9f744291864c373a32a8da8f84aaaf37 Mon Sep 17 00:00:00 2001 1From 6cf19461fb31d7a7a3010629aae9aab49c26a01b Mon Sep 17 00:00:00 2001
2From: Jacob Kroon <jacob.kroon@gmail.com> 2From: Jacob Kroon <jacob.kroon@gmail.com>
3Date: Wed, 30 Jan 2019 04:53:48 +0000 3Date: Wed, 30 Jan 2019 04:53:48 +0000
4Subject: [PATCH] Add kvm group 4Subject: [PATCH] Add kvm group
diff --git a/meta/recipes-core/base-passwd/base-passwd/0007-Add-wheel-group.patch b/meta/recipes-core/base-passwd/base-passwd/0007-Add-wheel-group.patch
new file mode 100644
index 0000000000..d77122789d
--- /dev/null
+++ b/meta/recipes-core/base-passwd/base-passwd/0007-Add-wheel-group.patch
@@ -0,0 +1,20 @@
1
2We need to have a wheel group which has some system privileges to consult the
3systemd journal or manage printers with cups.
4
5Upstream says the group does not exist by default.
6
7Upstream-Status: Inappropriate [enable feature]
8
9Signed-off-by: Louis Rannou <lrannou@baylibre.com>
10Index: base-passwd-3.5.26/group.master
11===================================================================
12--- base-passwd-3.5.29.orig/group.master
13+++ base-passwd-3.5.29/group.master
14@@ -38,5 +38,6 @@
15 staff:*:50:
16 games:*:60:
17 shutdown:*:70:
18+wheel:*:80:
19 users:*:100:
20 nogroup:*:65534:
diff --git a/meta/recipes-core/base-passwd/base-passwd/add_shutdown.patch b/meta/recipes-core/base-passwd/base-passwd/add_shutdown.patch
deleted file mode 100644
index 5f357d8895..0000000000
--- a/meta/recipes-core/base-passwd/base-passwd/add_shutdown.patch
+++ /dev/null
@@ -1,19 +0,0 @@
1
2We need to have a shutdown group to allow the shutdown icon
3to work correctly. Any users that want to use shutdown like
4the xuser should be added to this group.
5
6Upstream-Status: Inappropriate [Embedded]
7
8Signed-off-by: Saul Wold <sgw@linux.intel.com>
9Index: base-passwd-3.5.26/group.master
10===================================================================
11--- base-passwd-3.5.26.orig/group.master
12+++ base-passwd-3.5.26/group.master
13@@ -36,5 +36,6 @@ sasl:*:45:
14 plugdev:*:46:
15 staff:*:50:
16 games:*:60:
17+shutdown:*:70:
18 users:*:100:
19 nogroup:*:65534:
diff --git a/meta/recipes-core/base-passwd/base-passwd/disable-docs.patch b/meta/recipes-core/base-passwd/base-passwd/disable-docs.patch
deleted file mode 100644
index 14c08b7484..0000000000
--- a/meta/recipes-core/base-passwd/base-passwd/disable-docs.patch
+++ /dev/null
@@ -1,24 +0,0 @@
1Disable documentation for now as it uses tools currently not supported
2by OE-Core. It uses sgmltools and po4a.
3
4Upstream-Status: Inappropriate [OE-Core specific]
5Signed-off-by: Saul Wold <sgw@linux.intel.com>
6
7Index: base-passwd-3.5.28/Makefile.in
8===================================================================
9--- base-passwd-3.5.28.orig/Makefile.in
10+++ base-passwd-3.5.28/Makefile.in
11@@ -25,13 +25,10 @@ gen_configure = config.cache config.stat
12 confdefhs.h config.h Makefile
13
14 all: update-passwd
15- $(MAKE) -C doc all
16- $(MAKE) -C man all
17
18 install: all
19 mkdir -p $(DESTDIR)$(sbindir)
20 $(INSTALL) update-passwd $(DESTDIR)$(sbindir)/
21- $(MAKE) -C man install
22
23 update-passwd.o: version.h
24
diff --git a/meta/recipes-core/base-passwd/base-passwd/input.patch b/meta/recipes-core/base-passwd/base-passwd/input.patch
deleted file mode 100644
index 3abbcad5d5..0000000000
--- a/meta/recipes-core/base-passwd/base-passwd/input.patch
+++ /dev/null
@@ -1,22 +0,0 @@
1Add an input group for the /dev/input/* devices.
2
3Upstream-Status: Inappropriate [configuration]
4
5Signed-off-by: Darren Hart <dvhart@linux.intel.com>
6
7---
8 group.master | 1 +
9 1 file changed, 1 insertion(+)
10
11Index: base-passwd-3.5.26/group.master
12===================================================================
13--- base-passwd-3.5.26.orig/group.master
14+++ base-passwd-3.5.26/group.master
15@@ -12,6 +12,7 @@ uucp:*:10:
16 man:*:12:
17 proxy:*:13:
18 kmem:*:15:
19+input:*:19:
20 dialout:*:20:
21 fax:*:21:
22 voice:*:22:
diff --git a/meta/recipes-core/base-passwd/base-passwd/nobash.patch b/meta/recipes-core/base-passwd/base-passwd/nobash.patch
deleted file mode 100644
index b5a692295b..0000000000
--- a/meta/recipes-core/base-passwd/base-passwd/nobash.patch
+++ /dev/null
@@ -1,15 +0,0 @@
1use /bin/sh instead of /bin/bash, since the latter may not be included in
2some images such as minimal
3
4Upstream-Status: Inappropriate [configuration]
5
6Signed-off-by: Scott Garman <scott.a.garman@intel.com>
7
8--- base-passwd/passwd.master~nobash
9+++ base-passwd/passwd.master
10@@ -1,4 +1,4 @@
11-root:*:0:0:root:/root:/bin/bash
12+root:*:0:0:root:/root:/bin/sh
13 daemon:*:1:1:daemon:/usr/sbin:/bin/sh
14 bin:*:2:2:bin:/bin:/bin/sh
15 sys:*:3:3:sys:/dev:/bin/sh
diff --git a/meta/recipes-core/base-passwd/base-passwd/noshadow.patch b/meta/recipes-core/base-passwd/base-passwd/noshadow.patch
deleted file mode 100644
index e27bf7d9be..0000000000
--- a/meta/recipes-core/base-passwd/base-passwd/noshadow.patch
+++ /dev/null
@@ -1,14 +0,0 @@
1remove "*" for root since we don't have a /etc/shadow so far.
2
3Upstream-Status: Inappropriate [configuration]
4
5Signed-off-by: Scott Garman <scott.a.garman@intel.com>
6
7--- base-passwd/passwd.master~nobash
8+++ base-passwd/passwd.master
9@@ -1,4 +1,4 @@
10-root:*:0:0:root:/root:/bin/sh
11+root::0:0:root:/root:/bin/sh
12 daemon:*:1:1:daemon:/usr/sbin:/bin/sh
13 bin:*:2:2:bin:/bin:/bin/sh
14 sys:*:3:3:sys:/dev:/bin/sh
diff --git a/meta/recipes-core/base-passwd/base-passwd_3.5.29.bb b/meta/recipes-core/base-passwd/base-passwd_3.6.3.bb
index 65b3cd778d..bf50b01fd5 100644
--- a/meta/recipes-core/base-passwd/base-passwd_3.5.29.bb
+++ b/meta/recipes-core/base-passwd/base-passwd_3.6.3.bb
@@ -2,29 +2,36 @@ SUMMARY = "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." 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."
3HOMEPAGE = "https://launchpad.net/base-passwd" 3HOMEPAGE = "https://launchpad.net/base-passwd"
4SECTION = "base" 4SECTION = "base"
5LICENSE = "GPLv2" 5LICENSE = "GPL-2.0-only"
6LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a" 6LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a"
7 7
8RECIPE_NO_UPDATE_REASON = "Version 3.5.38 requires cdebconf for update-passwd utility" 8SRC_URI = "https://launchpad.net/debian/+archive/primary/+files/${BPN}_${PV}.tar.xz \
9 9 file://0001-Add-a-shutdown-group.patch \
10SRC_URI = "https://launchpad.net/debian/+archive/primary/+files/${BPN}_${PV}.tar.gz \ 10 file://0002-Use-bin-sh-instead-of-bin-bash-for-the-root-user.patch \
11 file://add_shutdown.patch \ 11 file://0003-Remove-for-root-since-we-do-not-have-an-etc-shadow.patch \
12 file://nobash.patch \ 12 file://0004-Add-an-input-group-for-the-dev-input-devices.patch \
13 file://noshadow.patch \ 13 file://0005-Add-kvm-group.patch \
14 file://input.patch \ 14 file://0007-Add-wheel-group.patch \
15 file://disable-docs.patch \ 15 file://0001-base-passwd-Add-the-sgx-group.patch \
16 file://kvm.patch \
17 " 16 "
18 17
19SRC_URI[md5sum] = "6beccac48083fe8ae5048acd062e5421" 18SRC_URI[sha256sum] = "83575327d8318a419caf2d543341215c046044073d1afec2acc0ac4d8095ff39"
20SRC_URI[sha256sum] = "f0b66388b2c8e49c15692439d2bee63bcdd4bbbf7a782c7f64accc55986b6a36"
21 19
22# the package is taken from launchpad; that source is static and goes stale 20# the package is taken from launchpad; that source is static and goes stale
23# so we check the latest upstream from a directory that does get updated 21# so we check the latest upstream from a directory that does get updated
24UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/b/base-passwd/" 22UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/b/base-passwd/"
25 23
24S = "${WORKDIR}/work"
25
26PACKAGECONFIG = "${@bb.utils.filter('DISTRO_FEATURES', 'selinux', d)}"
27PACKAGECONFIG[selinux] = "--enable-selinux, --disable-selinux, libselinux"
28
26inherit autotools 29inherit autotools
27 30
31EXTRA_OECONF += "--disable-debconf --disable-docs"
32
33NOLOGIN ?= "${base_sbindir}/nologin"
34
28do_install () { 35do_install () {
29 install -d -m 755 ${D}${sbindir} 36 install -d -m 755 ${D}${sbindir}
30 install -o root -g root -p -m 755 ${B}/update-passwd ${D}${sbindir}/ 37 install -o root -g root -p -m 755 ${B}/update-passwd ${D}${sbindir}/
@@ -36,6 +43,7 @@ do_install () {
36 install -d -m 755 ${D}${datadir}/base-passwd 43 install -d -m 755 ${D}${datadir}/base-passwd
37 install -o root -g root -p -m 644 ${S}/passwd.master ${D}${datadir}/base-passwd/ 44 install -o root -g root -p -m 644 ${S}/passwd.master ${D}${datadir}/base-passwd/
38 sed -i 's#:/root:#:${ROOT_HOME}:#' ${D}${datadir}/base-passwd/passwd.master 45 sed -i 's#:/root:#:${ROOT_HOME}:#' ${D}${datadir}/base-passwd/passwd.master
46 sed -i 's#/usr/sbin/nologin#${NOLOGIN}#' ${D}${datadir}/base-passwd/passwd.master
39 install -o root -g root -p -m 644 ${S}/group.master ${D}${datadir}/base-passwd/ 47 install -o root -g root -p -m 644 ${S}/group.master ${D}${datadir}/base-passwd/
40 48
41 install -d -m 755 ${D}${docdir}/${BPN} 49 install -d -m 755 ${D}${docdir}/${BPN}
@@ -46,7 +54,7 @@ do_install () {
46} 54}
47 55
48basepasswd_sysroot_postinst() { 56basepasswd_sysroot_postinst() {
49#!/bin/sh 57#!/bin/sh -e
50 58
51# Install passwd.master and group.master to sysconfdir 59# Install passwd.master and group.master to sysconfdir
52install -d -m 755 ${STAGING_DIR_TARGET}${sysconfdir} 60install -d -m 755 ${STAGING_DIR_TARGET}${sysconfdir}
@@ -73,7 +81,7 @@ base_passwd_tweaksysroot () {
73 chmod 0755 $dest 81 chmod 0755 $dest
74} 82}
75 83
76python populate_packages_prepend() { 84python populate_packages:prepend() {
77 # Add in the preinst function for ${PN} 85 # Add in the preinst function for ${PN}
78 # We have to do this here as prior to this, passwd/group.master 86 # We have to do this here as prior to this, passwd/group.master
79 # would be unavailable. We need to create these files at preinst 87 # would be unavailable. We need to create these files at preinst
@@ -98,17 +106,17 @@ if [ ! -e $D${sysconfdir}/group ]; then
98""" + group + """EOF 106""" + group + """EOF
99fi 107fi
100""" 108"""
101 d.setVar(d.expand('pkg_preinst_${PN}'), preinst) 109 d.setVar(d.expand('pkg_preinst:${PN}'), preinst)
102} 110}
103 111
104addtask do_package after do_populate_sysroot 112addtask do_package after do_populate_sysroot
105 113
106ALLOW_EMPTY_${PN} = "1" 114ALLOW_EMPTY:${PN} = "1"
107 115
108PACKAGES =+ "${PN}-update" 116PACKAGES =+ "${PN}-update"
109FILES_${PN}-update = "${sbindir}/* ${datadir}/${PN}" 117FILES:${PN}-update = "${sbindir}/* ${datadir}/${PN}"
110 118
111pkg_postinst_${PN}-update () { 119pkg_postinst:${PN}-update () {
112#!/bin/sh 120#!/bin/sh
113if [ -n "$D" ]; then 121if [ -n "$D" ]; then
114 exit 0 122 exit 0