diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-01-24 14:33:37 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-01-25 14:30:56 +0000 |
commit | 7c8899662be5623bedaa9a848fafebeafb348cf0 (patch) | |
tree | 4445082106fe0ea595ba03616beba45f595be6a1 /meta/recipes-extended/shadow/shadow_4.1.4.3.bb | |
parent | 6b2cb8280211d2e28ce75d6a107f99a3fa7868ae (diff) | |
download | poky-7c8899662be5623bedaa9a848fafebeafb348cf0.tar.gz |
shadow: Split securetty into a separate recipe
The securetty file is machine specific whilst the rest of the shadow recipe
is not. Unfortunately making the recipce machine specific is both inefficient
and also causes dependency problems since parts of the system such as the useradd
code depend upon it and this introduces a machine specific element to sstate
checksums which should not be machine specific.
To resolve this, this patch separates out the file into a separate recipe
meaning the machine specific components are isolated.
(From OE-Core rev: 318133b5202632c6957c2aade22b1ef7af929f23)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/shadow/shadow_4.1.4.3.bb')
-rw-r--r-- | meta/recipes-extended/shadow/shadow_4.1.4.3.bb | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/meta/recipes-extended/shadow/shadow_4.1.4.3.bb b/meta/recipes-extended/shadow/shadow_4.1.4.3.bb index dddac2ca62..a69eb7c2e1 100644 --- a/meta/recipes-extended/shadow/shadow_4.1.4.3.bb +++ b/meta/recipes-extended/shadow/shadow_4.1.4.3.bb | |||
@@ -8,13 +8,12 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=08c553a87d4e51bbed50b20e0adcaede \ | |||
8 | file://src/passwd.c;firstline=8;endline=30;md5=2899a045e90511d0e043b85a7db7e2fe" | 8 | file://src/passwd.c;firstline=8;endline=30;md5=2899a045e90511d0e043b85a7db7e2fe" |
9 | 9 | ||
10 | DEPENDS = "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" | 10 | DEPENDS = "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" |
11 | RDEPENDS_${PN} = "${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_PLUGINS}', '', d)}" | 11 | RDEPENDS_${PN} = "shadow-securetty ${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_PLUGINS}', '', d)}" |
12 | PR = "r6" | 12 | PR = "r7" |
13 | 13 | ||
14 | SRC_URI = "http://pkg-shadow.alioth.debian.org/releases/${BPN}-${PV}.tar.bz2 \ | 14 | SRC_URI = "http://pkg-shadow.alioth.debian.org/releases/${BPN}-${PV}.tar.bz2 \ |
15 | file://login_defs_pam.sed \ | 15 | file://login_defs_pam.sed \ |
16 | ${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \ | 16 | ${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \ |
17 | file://securetty \ | ||
18 | file://shadow.automake-1.11.patch \ | 17 | file://shadow.automake-1.11.patch \ |
19 | file://shadow-4.1.3-dots-in-usernames.patch \ | 18 | file://shadow-4.1.3-dots-in-usernames.patch \ |
20 | file://shadow-4.1.4.2-env-reset-keep-locale.patch \ | 19 | file://shadow-4.1.4.2-env-reset-keep-locale.patch \ |
@@ -27,9 +26,6 @@ SRC_URI[sha256sum] = "633f5bb4ea0c88c55f3642c97f9d25cbef74f82e0b4cf8d54e7ad6f9f9 | |||
27 | 26 | ||
28 | inherit autotools gettext | 27 | inherit autotools gettext |
29 | 28 | ||
30 | # Since we deduce our arch from ${SERIAL_CONSOLE} | ||
31 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
32 | |||
33 | EXTRA_OECONF += "--without-audit \ | 29 | EXTRA_OECONF += "--without-audit \ |
34 | --without-libcrack \ | 30 | --without-libcrack \ |
35 | ${@base_contains('DISTRO_FEATURES', 'pam', '--with-libpam', '--without-libpam', d)} \ | 31 | ${@base_contains('DISTRO_FEATURES', 'pam', '--with-libpam', '--without-libpam', d)} \ |
@@ -101,20 +97,6 @@ do_install_append() { | |||
101 | # lead rpm failed dependencies. | 97 | # lead rpm failed dependencies. |
102 | ln -sf vipw.${PN} ${D}${base_sbindir}/vigr.${PN} | 98 | ln -sf vipw.${PN} ${D}${base_sbindir}/vigr.${PN} |
103 | ln -sf newgrp.${PN} ${D}${bindir}/sg | 99 | ln -sf newgrp.${PN} ${D}${bindir}/sg |
104 | |||
105 | # Ensure we add a suitable securetty file to the package that has | ||
106 | # most common embedded TTYs defined. | ||
107 | if [ ! -z "${SERIAL_CONSOLE}" ]; then | ||
108 | # Our SERIAL_CONSOLE contains a baud rate and sometimes a -L | ||
109 | # option as well. The following pearl :) takes that and converts | ||
110 | # it into newline-separated tty's and appends them into | ||
111 | # securetty. So if a machine has a weird looking console device | ||
112 | # node (e.g. ttyAMA0) that securetty does not know, it will get | ||
113 | # appended to securetty and root logins will be allowed on that | ||
114 | # console. | ||
115 | echo "${SERIAL_CONSOLE}" | sed -e 's/[0-9][0-9]\|\-L//g'|tr "[ ]" "[\n]" >> ${WORKDIR}/securetty | ||
116 | fi | ||
117 | install -m 0400 ${WORKDIR}/securetty ${D}${sysconfdir}/securetty | ||
118 | } | 100 | } |
119 | 101 | ||
120 | pkg_postinst_${PN} () { | 102 | pkg_postinst_${PN} () { |