summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/shadow/shadow-sysroot_4.1.4.3.bb
diff options
context:
space:
mode:
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.bb41
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 @@
1SUMMARY = "Shadow utils requirements for useradd.bbclass"
2DESCRIPTION = "Shadow utils requirements for useradd.bbclass"
3HOMEPAGE = "http://pkg-shadow.alioth.debian.org"
4BUGTRACKER = "https://alioth.debian.org/tracker/?group_id=30580"
5SECTION = "base utils"
6PRIORITY = "optional"
7LICENSE = "BSD | Artistic"
8LIC_FILES_CHKSUM = "file://login.defs_shadow-sysroot;md5=25e2f2de4dfc8f966ac5cdfce45cd7d5"
9
10DEPENDS = "base-passwd"
11
12PR = "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.
17SRC_URI = "file://login.defs_shadow-sysroot"
18
19SRC_URI[md5sum] = "b8608d8294ac88974f27b20f991c0e79"
20SRC_URI[sha256sum] = "633f5bb4ea0c88c55f3642c97f9d25cbef74f82e0b4cf8d54e7ad6f9f9caa778"
21
22S = "${WORKDIR}"
23SSTATEPOSTINSTFUNCS += "shadow_sysroot_sstate_postinst"
24
25do_install() {
26 install -d ${D}${sysconfdir}
27 install -p -m 755 ${S}/login.defs_shadow-sysroot ${D}${sysconfdir}/login.defs
28}
29
30shadow_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}