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/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.5.29.bb97
6 files changed, 191 insertions, 0 deletions
diff --git a/meta/recipes-core/base-passwd/base-passwd/add_shutdown.patch b/meta/recipes-core/base-passwd/base-passwd/add_shutdown.patch
new file mode 100644
index 0000000000..eb75559c49
--- /dev/null
+++ b/meta/recipes-core/base-passwd/base-passwd/add_shutdown.patch
@@ -0,0 +1,19 @@
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: Inapporpriate [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
new file mode 100644
index 0000000000..14c08b7484
--- /dev/null
+++ b/meta/recipes-core/base-passwd/base-passwd/disable-docs.patch
@@ -0,0 +1,24 @@
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
new file mode 100644
index 0000000000..f1bfc2f604
--- /dev/null
+++ b/meta/recipes-core/base-passwd/base-passwd/input.patch
@@ -0,0 +1,22 @@
1Add an input group for the /dev/input/* devices.
2
3Upstream-Status: Invalid [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
new file mode 100644
index 0000000000..eed87db6cb
--- /dev/null
+++ b/meta/recipes-core/base-passwd/base-passwd/nobash.patch
@@ -0,0 +1,15 @@
1use /bin/sh instead of /bin/bash, since the latter may not be included in
2some images such as minimal
3
4Upstream-Status: Invalid [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
new file mode 100644
index 0000000000..e1cded61d6
--- /dev/null
+++ b/meta/recipes-core/base-passwd/base-passwd/noshadow.patch
@@ -0,0 +1,14 @@
1remove "*" for root since we don't have a /etc/shadow so far.
2
3Upstream-Status: Invalid [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.5.29.bb
new file mode 100644
index 0000000000..59bd413b49
--- /dev/null
+++ b/meta/recipes-core/base-passwd/base-passwd_3.5.29.bb
@@ -0,0 +1,97 @@
1SUMMARY = "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."
3SECTION = "base"
4LICENSE = "GPLv2+"
5LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a"
6
7SRC_URI = "${DEBIAN_MIRROR}/main/b/base-passwd/base-passwd_${PV}.tar.gz \
8 file://add_shutdown.patch \
9 file://nobash.patch \
10 file://noshadow.patch \
11 file://input.patch \
12 file://disable-docs.patch \
13 "
14
15SRC_URI[md5sum] = "6beccac48083fe8ae5048acd062e5421"
16SRC_URI[sha256sum] = "f0b66388b2c8e49c15692439d2bee63bcdd4bbbf7a782c7f64accc55986b6a36"
17
18inherit autotools
19
20SSTATEPOSTINSTFUNCS += "base_passwd_sstate_postinst"
21
22do_install () {
23 install -d -m 755 ${D}${sbindir}
24 install -o root -g root -p -m 755 ${B}/update-passwd ${D}${sbindir}/
25 install -d -m 755 ${D}${mandir}/man8 ${D}${mandir}/pl/man8
26 install -p -m 644 ${S}/man/update-passwd.8 ${D}${mandir}/man8/
27 install -p -m 644 ${S}/man/update-passwd.pl.8 \
28 ${D}${mandir}/pl/man8/update-passwd.8
29 gzip -9 ${D}${mandir}/man8/* ${D}${mandir}/pl/man8/*
30 install -d -m 755 ${D}${datadir}/base-passwd
31 install -o root -g root -p -m 644 ${S}/passwd.master ${D}${datadir}/base-passwd/
32 sed -i 's#:/root:#:${ROOT_HOME}:#' ${D}${datadir}/base-passwd/passwd.master
33 install -o root -g root -p -m 644 ${S}/group.master ${D}${datadir}/base-passwd/
34
35 install -d -m 755 ${D}${docdir}/${BPN}
36 install -p -m 644 ${S}/debian/changelog ${D}${docdir}/${BPN}/
37 gzip -9 ${D}${docdir}/${BPN}/*
38 install -p -m 644 ${S}/README ${D}${docdir}/${BPN}/
39 install -p -m 644 ${S}/debian/copyright ${D}${docdir}/${BPN}/
40}
41
42base_passwd_sstate_postinst() {
43 if [ "${BB_CURRENTTASK}" = "populate_sysroot" -o "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ]
44 then
45 # Staging does not copy ${sysconfdir} files into the
46 # target sysroot, so we need to do so manually. We
47 # put these files in the target sysroot so they can
48 # be used by recipes which use custom user/group
49 # permissions.
50 install -d -m 755 ${STAGING_DIR_TARGET}${sysconfdir}
51 install -p -m 644 ${STAGING_DIR_TARGET}${datadir}/base-passwd/passwd.master ${STAGING_DIR_TARGET}${sysconfdir}/passwd
52 install -p -m 644 ${STAGING_DIR_TARGET}${datadir}/base-passwd/group.master ${STAGING_DIR_TARGET}${sysconfdir}/group
53 fi
54}
55
56python populate_packages_prepend() {
57 # Add in the preinst function for ${PN}
58 # We have to do this here as prior to this, passwd/group.master
59 # would be unavailable. We need to create these files at preinst
60 # time before the files from the package may be available, hence
61 # storing the data from the files in the preinst directly.
62
63 f = open(d.expand("${STAGING_DATADIR}/base-passwd/passwd.master"), 'r')
64 passwd = "".join(f.readlines())
65 f.close()
66 f = open(d.expand("${STAGING_DATADIR}/base-passwd/group.master"), 'r')
67 group = "".join(f.readlines())
68 f.close()
69
70 preinst = """#!/bin/sh
71mkdir -p $D${sysconfdir}
72if [ ! -e $D${sysconfdir}/passwd ]; then
73\tcat << EOF > $D${sysconfdir}/passwd
74""" + passwd + """EOF
75fi
76if [ ! -e $D${sysconfdir}/group ]; then
77\tcat << EOF > $D${sysconfdir}/group
78""" + group + """EOF
79fi
80"""
81 d.setVar('pkg_preinst_${PN}', preinst)
82}
83
84addtask do_package after do_populate_sysroot
85
86ALLOW_EMPTY_${PN} = "1"
87
88PACKAGES =+ "${PN}-update"
89FILES_${PN}-update = "${sbindir}/* ${datadir}/${PN}"
90
91pkg_postinst_${PN}-update () {
92#!/bin/sh
93if [ -n "$D" ]; then
94 exit 0
95fi
96${sbindir}/update-passwd
97}