diff options
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-extended/shadow/shadow-native_4.1.4.3.bb | 15 | ||||
-rw-r--r-- | meta/recipes-extended/shadow/shadow.inc | 113 | ||||
-rw-r--r-- | meta/recipes-extended/shadow/shadow_4.1.4.3.bb | 93 |
3 files changed, 113 insertions, 108 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 deleted file mode 100644 index ba208f7888..0000000000 --- a/meta/recipes-extended/shadow/shadow-native_4.1.4.3.bb +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | require shadow.inc | ||
2 | |||
3 | PR = "r8" | ||
4 | |||
5 | SRC_URI += " \ | ||
6 | file://add_root_cmd_options.patch \ | ||
7 | file://disable-syslog.patch \ | ||
8 | file://useradd.patch \ | ||
9 | file://add_root_cmd_groupmems.patch \ | ||
10 | " | ||
11 | inherit native | ||
12 | |||
13 | EXTRA_OECONF += "--without-libpam \ | ||
14 | --without-nscd" | ||
15 | |||
diff --git a/meta/recipes-extended/shadow/shadow.inc b/meta/recipes-extended/shadow/shadow.inc index 4df5e5edb9..75b0afcab1 100644 --- a/meta/recipes-extended/shadow/shadow.inc +++ b/meta/recipes-extended/shadow/shadow.inc | |||
@@ -7,22 +7,79 @@ LICENSE = "BSD | Artistic-1.0" | |||
7 | LIC_FILES_CHKSUM = "file://COPYING;md5=08c553a87d4e51bbed50b20e0adcaede \ | 7 | LIC_FILES_CHKSUM = "file://COPYING;md5=08c553a87d4e51bbed50b20e0adcaede \ |
8 | file://src/passwd.c;beginline=8;endline=30;md5=d83888ea14ae61951982d77125947661" | 8 | file://src/passwd.c;beginline=8;endline=30;md5=d83888ea14ae61951982d77125947661" |
9 | 9 | ||
10 | DEPENDS = "shadow-native" | ||
11 | DEPENDS_class-native = "" | ||
12 | |||
10 | SRC_URI = "http://pkg-shadow.alioth.debian.org/releases/${BPN}-${PV}.tar.bz2 \ | 13 | SRC_URI = "http://pkg-shadow.alioth.debian.org/releases/${BPN}-${PV}.tar.bz2 \ |
11 | file://shadow.automake-1.11.patch \ | 14 | file://shadow.automake-1.11.patch \ |
12 | file://shadow_fix_for_automake-1.12.patch \ | 15 | file://shadow_fix_for_automake-1.12.patch \ |
13 | file://shadow-4.1.3-dots-in-usernames.patch \ | 16 | file://shadow-4.1.3-dots-in-usernames.patch \ |
14 | file://shadow-4.1.4.2-env-reset-keep-locale.patch \ | 17 | file://shadow-4.1.4.2-env-reset-keep-locale.patch \ |
18 | ${@base_contains('PACKAGECONFIG', 'pam', '${PAM_SRC_URI}', '', d)} \ | ||
19 | " | ||
20 | |||
21 | SRC_URI_append_class-target = " \ | ||
22 | file://login_defs_pam.sed \ | ||
23 | file://shadow-4.1.4.2-groupmod-pam-check.patch \ | ||
24 | file://shadow-4.1.4.2-su_no_sanitize_env.patch \ | ||
25 | file://shadow-update-pam-conf.patch \ | ||
26 | file://slackware_fix_for_glib-2.17_crypt.patch \ | ||
27 | file://fix-etc-gshadow-reading.patch \ | ||
28 | " | ||
29 | |||
30 | SRC_URI_append_class-native = " \ | ||
31 | file://add_root_cmd_options.patch \ | ||
32 | file://disable-syslog.patch \ | ||
33 | file://useradd.patch \ | ||
34 | file://add_root_cmd_groupmems.patch \ | ||
15 | " | 35 | " |
16 | 36 | ||
17 | SRC_URI[md5sum] = "b8608d8294ac88974f27b20f991c0e79" | 37 | SRC_URI[md5sum] = "b8608d8294ac88974f27b20f991c0e79" |
18 | SRC_URI[sha256sum] = "633f5bb4ea0c88c55f3642c97f9d25cbef74f82e0b4cf8d54e7ad6f9f9caa778" | 38 | SRC_URI[sha256sum] = "633f5bb4ea0c88c55f3642c97f9d25cbef74f82e0b4cf8d54e7ad6f9f9caa778" |
19 | 39 | ||
40 | PR = "r13" | ||
41 | |||
42 | # Additional Policy files for PAM | ||
43 | PAM_SRC_URI = "file://pam.d/chfn \ | ||
44 | file://pam.d/chpasswd \ | ||
45 | file://pam.d/chsh \ | ||
46 | file://pam.d/login \ | ||
47 | file://pam.d/newusers \ | ||
48 | file://pam.d/passwd \ | ||
49 | file://pam.d/su" | ||
50 | |||
20 | inherit autotools gettext | 51 | inherit autotools gettext |
21 | 52 | ||
22 | EXTRA_OECONF += "--without-audit \ | 53 | EXTRA_OECONF += "--without-audit \ |
23 | --without-libcrack \ | 54 | --without-libcrack \ |
24 | --without-selinux" | 55 | --without-selinux \ |
25 | 56 | ${NSCDOPT}" | |
57 | |||
58 | NSCDOPT = "" | ||
59 | NSCDOPT_class-native = "--without-nscd" | ||
60 | NSCDOPT_libc-uclibc = " --without-nscd" | ||
61 | |||
62 | PAM_PLUGINS = "libpam-runtime \ | ||
63 | pam-plugin-faildelay \ | ||
64 | pam-plugin-securetty \ | ||
65 | pam-plugin-nologin \ | ||
66 | pam-plugin-env \ | ||
67 | pam-plugin-group \ | ||
68 | pam-plugin-limits \ | ||
69 | pam-plugin-lastlog \ | ||
70 | pam-plugin-motd \ | ||
71 | pam-plugin-mail \ | ||
72 | pam-plugin-shells \ | ||
73 | pam-plugin-rootok" | ||
74 | |||
75 | PACKAGECONFIG = "${@base_contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" | ||
76 | PACKAGECONFIG_class-native = "" | ||
77 | PACKAGECONFIG[pam] = "--with-libpam,--without-libpam,libpam,${PAM_PLUGINS}" | ||
78 | |||
79 | RDEPENDS_${PN} = "shadow-securetty \ | ||
80 | base-passwd" | ||
81 | RDEPENDS_${PN}_class-native = "" | ||
82 | |||
26 | do_install() { | 83 | do_install() { |
27 | oe_runmake DESTDIR="${D}" sbindir="${base_sbindir}" usbindir="${sbindir}" install | 84 | oe_runmake DESTDIR="${D}" sbindir="${base_sbindir}" usbindir="${sbindir}" install |
28 | 85 | ||
@@ -51,3 +108,55 @@ do_install() { | |||
51 | sed -i 's,^GROUP=1000,GROUP=100,g' ${D}${sysconfdir}/default/useradd | 108 | sed -i 's,^GROUP=1000,GROUP=100,g' ${D}${sysconfdir}/default/useradd |
52 | } | 109 | } |
53 | 110 | ||
111 | do_install_append() { | ||
112 | # Ensure that the image has as a /var/spool/mail dir so shadow can | ||
113 | # put mailboxes there if the user reconfigures shadow to its | ||
114 | # defaults (see sed below). | ||
115 | install -d ${D}${localstatedir}/spool/mail | ||
116 | |||
117 | if [ -e ${WORKDIR}/pam.d ]; then | ||
118 | install -d ${D}${sysconfdir}/pam.d/ | ||
119 | install -m 0644 ${WORKDIR}/pam.d/* ${D}${sysconfdir}/pam.d/ | ||
120 | # Remove defaults that are not used when supporting PAM. | ||
121 | sed -i -f ${WORKDIR}/login_defs_pam.sed ${D}${sysconfdir}/login.defs | ||
122 | fi | ||
123 | |||
124 | install -d ${D}${sbindir} ${D}${base_sbindir} ${D}${base_bindir} | ||
125 | |||
126 | # Move binaries to the locations we want | ||
127 | rm ${D}${sbindir}/vigr | ||
128 | ln -sf vipw.${BPN} ${D}${base_sbindir}/vigr | ||
129 | if [ "${sbindir}" != "${base_sbindir}" ]; then | ||
130 | mv ${D}${sbindir}/vipw ${D}${base_sbindir}/vipw | ||
131 | fi | ||
132 | if [ "${bindir}" != "${base_bindir}" ]; then | ||
133 | mv ${D}${bindir}/login ${D}${base_bindir}/login | ||
134 | mv ${D}${bindir}/su ${D}${base_bindir}/su | ||
135 | fi | ||
136 | |||
137 | # Handle link properly after rename, otherwise missing files would | ||
138 | # lead rpm failed dependencies. | ||
139 | ln -sf newgrp.${BPN} ${D}${bindir}/sg | ||
140 | } | ||
141 | |||
142 | inherit update-alternatives | ||
143 | |||
144 | ALTERNATIVE_PRIORITY = "200" | ||
145 | |||
146 | ALTERNATIVE_${PN} = "passwd chfn newgrp chsh groups chpasswd login vipw vigr su" | ||
147 | ALTERNATIVE_LINK_NAME[chpasswd] = "${sbindir}/chpasswd" | ||
148 | ALTERNATIVE_LINK_NAME[login] = "${base_bindir}/login" | ||
149 | ALTERNATIVE_LINK_NAME[vipw] = "${base_sbindir}/vipw" | ||
150 | ALTERNATIVE_LINK_NAME[vigr] = "${base_sbindir}/vigr" | ||
151 | ALTERNATIVE_LINK_NAME[su] = "${base_bindir}/su" | ||
152 | |||
153 | pkg_postinst_${PN} () { | ||
154 | if [ "x$D" != "x" ]; then | ||
155 | rootarg="--root=$D" | ||
156 | else | ||
157 | rootarg="" | ||
158 | fi | ||
159 | |||
160 | pwconv $rootarg | ||
161 | grpconv $rootarg | ||
162 | } | ||
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 91ff24975d..6f1723ed6d 100644 --- a/meta/recipes-extended/shadow/shadow_4.1.4.3.bb +++ b/meta/recipes-extended/shadow/shadow_4.1.4.3.bb | |||
@@ -1,99 +1,10 @@ | |||
1 | require shadow.inc | 1 | require shadow.inc |
2 | 2 | ||
3 | DEPENDS = "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)} \ | ||
4 | shadow-native" | ||
5 | RDEPENDS_${PN} = "shadow-securetty ${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_PLUGINS}', '', d)} \ | ||
6 | base-passwd" | ||
7 | PR = "r13" | ||
8 | |||
9 | SRC_URI += " \ | ||
10 | file://login_defs_pam.sed \ | ||
11 | ${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \ | ||
12 | file://shadow-4.1.4.2-groupmod-pam-check.patch \ | ||
13 | file://shadow-4.1.4.2-su_no_sanitize_env.patch \ | ||
14 | file://shadow-update-pam-conf.patch \ | ||
15 | file://slackware_fix_for_glib-2.17_crypt.patch \ | ||
16 | file://fix-etc-gshadow-reading.patch \ | ||
17 | " | ||
18 | |||
19 | EXTRA_OECONF += "${@base_contains('DISTRO_FEATURES', 'pam', '--with-libpam', '--without-libpam', d)}" | ||
20 | EXTRA_OECONF_libc-uclibc += "--with-nscd=no" | ||
21 | |||
22 | # Build falsely assumes that if --enable-libpam is set, we don't need to link against | 3 | # Build falsely assumes that if --enable-libpam is set, we don't need to link against |
23 | # libcrypt. This breaks chsh. | 4 | # libcrypt. This breaks chsh. |
24 | BUILD_LDFLAGS += "${@base_contains('DISTRO_FEATURES', 'pam', base_contains('DISTRO_FEATURES', 'libc-crypt', '-lcrypt', '', d), '', d)}" | 5 | BUILD_LDFLAGS_append_class-target = " ${@base_contains('DISTRO_FEATURES', 'pam', base_contains('DISTRO_FEATURES', 'libc-crypt', '-lcrypt', '', d), '', d)}" |
25 | |||
26 | PAM_PLUGINS = "libpam-runtime \ | ||
27 | pam-plugin-faildelay \ | ||
28 | pam-plugin-securetty \ | ||
29 | pam-plugin-nologin \ | ||
30 | pam-plugin-env \ | ||
31 | pam-plugin-group \ | ||
32 | pam-plugin-limits \ | ||
33 | pam-plugin-lastlog \ | ||
34 | pam-plugin-motd \ | ||
35 | pam-plugin-mail \ | ||
36 | pam-plugin-shells \ | ||
37 | pam-plugin-rootok" | ||
38 | |||
39 | # Additional Policy files for PAM | ||
40 | PAM_SRC_URI = "file://pam.d/chfn \ | ||
41 | file://pam.d/chpasswd \ | ||
42 | file://pam.d/chsh \ | ||
43 | file://pam.d/login \ | ||
44 | file://pam.d/newusers \ | ||
45 | file://pam.d/passwd \ | ||
46 | file://pam.d/su" | ||
47 | |||
48 | do_install_append() { | ||
49 | # Ensure that the image has as a /var/spool/mail dir so shadow can | ||
50 | # put mailboxes there if the user reconfigures shadow to its | ||
51 | # defaults (see sed below). | ||
52 | install -d ${D}${localstatedir}/spool/mail | ||
53 | |||
54 | if [ -e ${WORKDIR}/pam.d ]; then | ||
55 | install -d ${D}${sysconfdir}/pam.d/ | ||
56 | install -m 0644 ${WORKDIR}/pam.d/* ${D}${sysconfdir}/pam.d/ | ||
57 | # Remove defaults that are not used when supporting PAM. | ||
58 | sed -i -f ${WORKDIR}/login_defs_pam.sed ${D}${sysconfdir}/login.defs | ||
59 | fi | ||
60 | |||
61 | install -d ${D}${sbindir} ${D}${base_sbindir} ${D}${base_bindir} | ||
62 | |||
63 | # Move binaries to the locations we want | ||
64 | rm ${D}${sbindir}/vigr | ||
65 | ln -sf vipw.${BPN} ${D}${base_sbindir}/vigr | ||
66 | if [ "${sbindir}" != "${base_sbindir}" ]; then | ||
67 | mv ${D}${sbindir}/vipw ${D}${base_sbindir}/vipw | ||
68 | fi | ||
69 | if [ "${bindir}" != "${base_bindir}" ]; then | ||
70 | mv ${D}${bindir}/login ${D}${base_bindir}/login | ||
71 | mv ${D}${bindir}/su ${D}${base_bindir}/su | ||
72 | fi | ||
73 | |||
74 | # Handle link properly after rename, otherwise missing files would | ||
75 | # lead rpm failed dependencies. | ||
76 | ln -sf newgrp.${BPN} ${D}${bindir}/sg | ||
77 | } | ||
78 | |||
79 | inherit update-alternatives | ||
80 | 6 | ||
81 | ALTERNATIVE_PRIORITY = "200" | 7 | BBCLASSEXTEND = "native" |
82 | 8 | ||
83 | ALTERNATIVE_${PN} = "passwd chfn newgrp chsh groups chpasswd login vipw vigr su" | ||
84 | ALTERNATIVE_LINK_NAME[chpasswd] = "${sbindir}/chpasswd" | ||
85 | ALTERNATIVE_LINK_NAME[login] = "${base_bindir}/login" | ||
86 | ALTERNATIVE_LINK_NAME[vipw] = "${base_sbindir}/vipw" | ||
87 | ALTERNATIVE_LINK_NAME[vigr] = "${base_sbindir}/vigr" | ||
88 | ALTERNATIVE_LINK_NAME[su] = "${base_bindir}/su" | ||
89 | 9 | ||
90 | pkg_postinst_${PN} () { | ||
91 | if [ "x$D" != "x" ]; then | ||
92 | rootarg="--root=$D" | ||
93 | else | ||
94 | rootarg="" | ||
95 | fi | ||
96 | 10 | ||
97 | pwconv $rootarg | ||
98 | grpconv $rootarg | ||
99 | } | ||