diff options
Diffstat (limited to 'meta/recipes-extended/shadow/shadow-native_4.1.4.3.bb')
-rw-r--r-- | meta/recipes-extended/shadow/shadow-native_4.1.4.3.bb | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/meta/recipes-extended/shadow/shadow-native_4.1.4.3.bb b/meta/recipes-extended/shadow/shadow-native_4.1.4.3.bb new file mode 100644 index 0000000000..2f93e051ba --- /dev/null +++ b/meta/recipes-extended/shadow/shadow-native_4.1.4.3.bb | |||
@@ -0,0 +1,66 @@ | |||
1 | SUMMARY = "Tools to change and administer password and group data" | ||
2 | DESCRIPTION = "Tools to change and administer password and group data" | ||
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://COPYING;md5=08c553a87d4e51bbed50b20e0adcaede \ | ||
9 | file://src/passwd.c;firstline=8;endline=30;md5=2899a045e90511d0e043b85a7db7e2fe" | ||
10 | |||
11 | PR = "r0" | ||
12 | |||
13 | SRC_URI = "ftp://pkg-shadow.alioth.debian.org/pub/pkg-shadow/shadow-${PV}.tar.bz2 \ | ||
14 | file://shadow.automake-1.11.patch \ | ||
15 | file://shadow-4.1.3-dots-in-usernames.patch \ | ||
16 | file://shadow-4.1.4.2-env-reset-keep-locale.patch \ | ||
17 | file://add_root_cmd_options.patch" | ||
18 | |||
19 | SRC_URI[md5sum] = "b8608d8294ac88974f27b20f991c0e79" | ||
20 | SRC_URI[sha256sum] = "633f5bb4ea0c88c55f3642c97f9d25cbef74f82e0b4cf8d54e7ad6f9f9caa778" | ||
21 | |||
22 | inherit autotools gettext native | ||
23 | |||
24 | EXTRA_OECONF += "--without-audit \ | ||
25 | --without-libcrack \ | ||
26 | --without-libpam \ | ||
27 | --without-selinux" | ||
28 | |||
29 | do_install_append() { | ||
30 | # Enable CREATE_HOME by default. | ||
31 | sed -i 's/#CREATE_HOME/CREATE_HOME/g' ${D}${sysconfdir}/login.defs | ||
32 | |||
33 | # As we are on an embedded system, ensure the users mailbox is in | ||
34 | # ~/ not /var/spool/mail by default, as who knows where or how big | ||
35 | # /var is. The system MDA will set this later anyway. | ||
36 | sed -i 's/MAIL_DIR/#MAIL_DIR/g' ${D}${sysconfdir}/login.defs | ||
37 | sed -i 's/#MAIL_FILE/MAIL_FILE/g' ${D}${sysconfdir}/login.defs | ||
38 | |||
39 | # Disable checking emails. | ||
40 | sed -i 's/MAIL_CHECK_ENAB/#MAIL_CHECK_ENAB/g' ${D}${sysconfdir}/login.defs | ||
41 | |||
42 | # Now we don't have a mail system. Disable mail creation for now. | ||
43 | sed -i 's:/bin/bash:/bin/sh:g' ${D}${sysconfdir}/default/useradd | ||
44 | sed -i '/^CREATE_MAIL_SPOOL/ s:^:#:' ${D}${sysconfdir}/default/useradd | ||
45 | |||
46 | install -d ${D}${sbindir} ${D}${base_sbindir} ${D}${base_bindir} | ||
47 | for i in passwd chfn newgrp chsh ; do | ||
48 | mv ${D}${bindir}/$i ${D}${bindir}/$i.${PN} | ||
49 | done | ||
50 | |||
51 | mv ${D}${sbindir}/chpasswd ${D}${sbindir}/chpasswd.${PN} | ||
52 | } | ||
53 | |||
54 | pkg_postinst_${PN} () { | ||
55 | update-alternatives --install ${bindir}/passwd passwd passwd.${PN} 200 | ||
56 | update-alternatives --install ${sbindir}/chpasswd chpasswd chpasswd.${PN} 200 | ||
57 | update-alternatives --install ${bindir}/chfn chfn chfn.${PN} 200 | ||
58 | update-alternatives --install ${bindir}/newgrp newgrp newgrp.${PN} 200 | ||
59 | update-alternatives --install ${bindir}/chsh chsh chsh.${PN} 200 | ||
60 | } | ||
61 | |||
62 | pkg_prerm_${PN} () { | ||
63 | for i in passwd chpasswd chfn newgrp chsh ; do | ||
64 | update-alternatives --remove $i $i.${PN} | ||
65 | done | ||
66 | } | ||