diff options
Diffstat (limited to 'meta/recipes-core/base-passwd')
6 files changed, 196 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 | |||
2 | We need to have a shutdown group to allow the shutdown icon | ||
3 | to work correctly. Any users that want to use shutdown like | ||
4 | the xuser should be added to this group. | ||
5 | |||
6 | Upstream-Status: Inapporpriate [Embedded] | ||
7 | |||
8 | Signed-off-by: Saul Wold <sgw@linux.intel.com> | ||
9 | Index: 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 @@ | |||
1 | Disable documentation for now as it uses tools currently not supported | ||
2 | by OE-Core. It uses sgmltools and po4a. | ||
3 | |||
4 | Upstream-Status: Inappropriate [OE-Core specific] | ||
5 | Signed-off-by: Saul Wold <sgw@linux.intel.com> | ||
6 | |||
7 | Index: 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 @@ | |||
1 | Add an input group for the /dev/input/* devices. | ||
2 | |||
3 | Upstream-Status: Invalid [configuration] | ||
4 | |||
5 | Signed-off-by: Darren Hart <dvhart@linux.intel.com> | ||
6 | |||
7 | --- | ||
8 | group.master | 1 + | ||
9 | 1 file changed, 1 insertion(+) | ||
10 | |||
11 | Index: 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 @@ | |||
1 | use /bin/sh instead of /bin/bash, since the latter may not be included in | ||
2 | some images such as minimal | ||
3 | |||
4 | Upstream-Status: Invalid [configuration] | ||
5 | |||
6 | Signed-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 @@ | |||
1 | remove "*" for root since we don't have a /etc/shadow so far. | ||
2 | |||
3 | Upstream-Status: Invalid [configuration] | ||
4 | |||
5 | Signed-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..ec8f2afb22 --- /dev/null +++ b/meta/recipes-core/base-passwd/base-passwd_3.5.29.bb | |||
@@ -0,0 +1,102 @@ | |||
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 | SRC_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 | |||
15 | SRC_URI[md5sum] = "6beccac48083fe8ae5048acd062e5421" | ||
16 | SRC_URI[sha256sum] = "f0b66388b2c8e49c15692439d2bee63bcdd4bbbf7a782c7f64accc55986b6a36" | ||
17 | |||
18 | inherit autotools | ||
19 | |||
20 | SSTATEPOSTINSTFUNCS += "base_passwd_sstate_postinst" | ||
21 | |||
22 | do_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 | |||
42 | base_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 passwd.master and group.master to sysconfdir and mv | ||
51 | # them to make sure they are atomically install. | ||
52 | install -d -m 755 ${STAGING_DIR_TARGET}${sysconfdir} | ||
53 | for i in passwd group; do | ||
54 | install -p -m 644 ${STAGING_DIR_TARGET}${datadir}/base-passwd/$i.master \ | ||
55 | ${STAGING_DIR_TARGET}${sysconfdir}/ | ||
56 | mv ${STAGING_DIR_TARGET}${sysconfdir}/$i.master ${STAGING_DIR_TARGET}${sysconfdir}/$i | ||
57 | done | ||
58 | fi | ||
59 | } | ||
60 | |||
61 | python populate_packages_prepend() { | ||
62 | # Add in the preinst function for ${PN} | ||
63 | # We have to do this here as prior to this, passwd/group.master | ||
64 | # would be unavailable. We need to create these files at preinst | ||
65 | # time before the files from the package may be available, hence | ||
66 | # storing the data from the files in the preinst directly. | ||
67 | |||
68 | f = open(d.expand("${STAGING_DATADIR}/base-passwd/passwd.master"), 'r') | ||
69 | passwd = "".join(f.readlines()) | ||
70 | f.close() | ||
71 | f = open(d.expand("${STAGING_DATADIR}/base-passwd/group.master"), 'r') | ||
72 | group = "".join(f.readlines()) | ||
73 | f.close() | ||
74 | |||
75 | preinst = """#!/bin/sh | ||
76 | mkdir -p $D${sysconfdir} | ||
77 | if [ ! -e $D${sysconfdir}/passwd ]; then | ||
78 | \tcat << EOF > $D${sysconfdir}/passwd | ||
79 | """ + passwd + """EOF | ||
80 | fi | ||
81 | if [ ! -e $D${sysconfdir}/group ]; then | ||
82 | \tcat << EOF > $D${sysconfdir}/group | ||
83 | """ + group + """EOF | ||
84 | fi | ||
85 | """ | ||
86 | d.setVar('pkg_preinst_${PN}', preinst) | ||
87 | } | ||
88 | |||
89 | addtask do_package after do_populate_sysroot | ||
90 | |||
91 | ALLOW_EMPTY_${PN} = "1" | ||
92 | |||
93 | PACKAGES =+ "${PN}-update" | ||
94 | FILES_${PN}-update = "${sbindir}/* ${datadir}/${PN}" | ||
95 | |||
96 | pkg_postinst_${PN}-update () { | ||
97 | #!/bin/sh | ||
98 | if [ -n "$D" ]; then | ||
99 | exit 0 | ||
100 | fi | ||
101 | ${sbindir}/update-passwd | ||
102 | } | ||