diff options
author | Scott Garman <scott.a.garman@intel.com> | 2011-06-20 17:11:34 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-06-28 13:55:40 +0100 |
commit | c82a1b111dfb988a2a64a263ddd7fb482f67c80f (patch) | |
tree | 5fe8c513867e8b12569fe00af6ac8cc49fe39de9 /meta/recipes-extended/shadow/shadow-sysroot_4.1.4.3.bb | |
parent | 1d640c9436ecc65d8864e8a742926fbeb5d7826e (diff) | |
download | poky-c82a1b111dfb988a2a64a263ddd7fb482f67c80f.tar.gz |
shadow-sysroot: new recipe for useradd.bbclass support
Packaging login.defs with base-passwd causes problems due to the
file being included in target package installs. Instead, this
shadow-sysroot recipe can be used by useradd.bbclass to put
login.defs into the target sysroot without disturbing packages
intended for target devices.
(From OE-Core rev: 6cbf741d73070759ecb9a284e6511c63d945f7c1)
Signed-off-by: Scott Garman <scott.a.garman@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/shadow/shadow-sysroot_4.1.4.3.bb')
-rw-r--r-- | meta/recipes-extended/shadow/shadow-sysroot_4.1.4.3.bb | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/meta/recipes-extended/shadow/shadow-sysroot_4.1.4.3.bb b/meta/recipes-extended/shadow/shadow-sysroot_4.1.4.3.bb new file mode 100644 index 0000000000..3fd5da99c5 --- /dev/null +++ b/meta/recipes-extended/shadow/shadow-sysroot_4.1.4.3.bb | |||
@@ -0,0 +1,41 @@ | |||
1 | SUMMARY = "Shadow utils requirements for useradd.bbclass" | ||
2 | DESCRIPTION = "Shadow utils requirements for useradd.bbclass" | ||
3 | HOMEPAGE = "http://pkg-shadow.alioth.debian.org" | ||
4 | BUGTRACKER = "https://alioth.debian.org/tracker/?group_id=30580" | ||
5 | SECTION = "base utils" | ||
6 | PRIORITY = "optional" | ||
7 | LICENSE = "BSD | Artistic" | ||
8 | LIC_FILES_CHKSUM = "file://login.defs_shadow-sysroot;md5=25e2f2de4dfc8f966ac5cdfce45cd7d5" | ||
9 | |||
10 | DEPENDS = "base-passwd" | ||
11 | |||
12 | PR = "r0" | ||
13 | |||
14 | # The sole purpose of this recipe is to provide the /etc/login.defs | ||
15 | # file for the target sysroot - needed so the shadow-native utilities | ||
16 | # can add custom users/groups for recipes that use inherit useradd. | ||
17 | SRC_URI = "file://login.defs_shadow-sysroot" | ||
18 | |||
19 | SRC_URI[md5sum] = "b8608d8294ac88974f27b20f991c0e79" | ||
20 | SRC_URI[sha256sum] = "633f5bb4ea0c88c55f3642c97f9d25cbef74f82e0b4cf8d54e7ad6f9f9caa778" | ||
21 | |||
22 | S = "${WORKDIR}" | ||
23 | SSTATEPOSTINSTFUNCS += "shadow_sysroot_sstate_postinst" | ||
24 | |||
25 | do_install() { | ||
26 | install -d ${D}${sysconfdir} | ||
27 | install -p -m 755 ${S}/login.defs_shadow-sysroot ${D}${sysconfdir}/login.defs | ||
28 | } | ||
29 | |||
30 | shadow_sysroot_sstate_postinst() { | ||
31 | if [ "${BB_CURRENTTASK}" = "populate_sysroot" -o "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ] | ||
32 | then | ||
33 | # Staging does not copy ${sysconfdir} files into the | ||
34 | # target sysroot, so we need to do so manually. We | ||
35 | # put this file in the target sysroot so it can be | ||
36 | # used by recipes which use custom user/group | ||
37 | # permissions. | ||
38 | install -d -m 755 ${STAGING_DIR_TARGET}${sysconfdir} | ||
39 | install -p -m 644 ${D}${sysconfdir}/login.defs ${STAGING_DIR_TARGET}/${sysconfdir}/login.defs | ||
40 | fi | ||
41 | } | ||