diff options
-rw-r--r-- | meta/recipes-extended/shadow/shadow_4.1.4.3.bb | 47 |
1 files changed, 22 insertions, 25 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 f892eb93a0..60fb78b37c 100644 --- a/meta/recipes-extended/shadow/shadow_4.1.4.3.bb +++ b/meta/recipes-extended/shadow/shadow_4.1.4.3.bb | |||
@@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=08c553a87d4e51bbed50b20e0adcaede \ | |||
9 | 9 | ||
10 | DEPENDS = "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" | 10 | DEPENDS = "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" |
11 | RDEPENDS_${PN} = "shadow-securetty ${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_PLUGINS}', '', d)}" | 11 | RDEPENDS_${PN} = "shadow-securetty ${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_PLUGINS}', '', d)}" |
12 | PR = "r8" | 12 | PR = "r9" |
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 \ |
@@ -84,32 +84,35 @@ do_install_append() { | |||
84 | sed -i '/^CREATE_MAIL_SPOOL/ s:^:#:' ${D}${sysconfdir}/default/useradd | 84 | sed -i '/^CREATE_MAIL_SPOOL/ s:^:#:' ${D}${sysconfdir}/default/useradd |
85 | 85 | ||
86 | install -d ${D}${sbindir} ${D}${base_sbindir} ${D}${base_bindir} | 86 | install -d ${D}${sbindir} ${D}${base_sbindir} ${D}${base_bindir} |
87 | for i in passwd chfn newgrp chsh groups ; do | ||
88 | mv ${D}${bindir}/$i ${D}${bindir}/$i.${PN} | ||
89 | done | ||
90 | 87 | ||
91 | mv ${D}${sbindir}/chpasswd ${D}${sbindir}/chpasswd.${PN} | 88 | # Move binaries to the locations we want |
92 | mv ${D}${sbindir}/vigr ${D}${base_sbindir}/vigr.${PN} | 89 | rm ${D}${sbindir}/vigr |
93 | mv ${D}${sbindir}/vipw ${D}${base_sbindir}/vipw.${PN} | 90 | ln -sf vipw.${PN} ${D}${base_sbindir}/vigr |
94 | mv ${D}${bindir}/login ${D}${base_bindir}/login.${PN} | 91 | mv ${D}${sbindir}/vipw ${D}${base_sbindir}/vipw |
92 | mv ${D}${bindir}/login ${D}${base_bindir}/login | ||
95 | 93 | ||
96 | # Handle link properly after rename, otherwise missing files would | 94 | # Handle link properly after rename, otherwise missing files would |
97 | # lead rpm failed dependencies. | 95 | # lead rpm failed dependencies. |
98 | ln -sf vipw.${PN} ${D}${base_sbindir}/vigr.${PN} | ||
99 | ln -sf newgrp.${PN} ${D}${bindir}/sg | 96 | ln -sf newgrp.${PN} ${D}${bindir}/sg |
100 | } | 97 | } |
101 | 98 | ||
102 | pkg_postinst_${PN} () { | 99 | inherit update-alternatives |
103 | update-alternatives --install ${bindir}/passwd passwd passwd.${PN} 200 | 100 | |
104 | update-alternatives --install ${sbindir}/chpasswd chpasswd chpasswd.${PN} 200 | 101 | ALTERNATIVE_PRIORITY = "200" |
105 | update-alternatives --install ${bindir}/chfn chfn chfn.${PN} 200 | 102 | |
106 | update-alternatives --install ${bindir}/newgrp newgrp newgrp.${PN} 200 | 103 | bindir_progs = "passwd chfn newgrp chsh groups" |
107 | update-alternatives --install ${bindir}/chsh chsh chsh.${PN} 200 | 104 | ALTERNATIVE_LINKS += "${bindir}/${@' ${bindir}/'.join((d.getVar('bindir_progs', True)).split())}" |
108 | update-alternatives --install ${bindir}/groups groups groups.${PN} 200 | 105 | |
109 | update-alternatives --install ${base_bindir}/login login login.${PN} 200 | 106 | sbindir_progs = "chpasswd" |
110 | update-alternatives --install ${base_sbindir}/vipw vipw vipw.${PN} 200 | 107 | ALTERNATIVE_LINKS += "${sbindir}/${@' ${sbindir}/'.join((d.getVar('sbindir_progs', True)).split())}" |
111 | update-alternatives --install ${base_sbindir}/vigr vigr vigr.${PN} 200 | 108 | |
109 | base_bindir_progs = "login" | ||
110 | ALTERNATIVE_LINKS += "${base_bindir}/${@' ${base_bindir}/'.join((d.getVar('base_bindir_progs', True)).split())}" | ||
112 | 111 | ||
112 | base_sbindir_progs = "vipw vigr" | ||
113 | ALTERNATIVE_LINKS += "${base_sbindir}/${@' ${base_sbindir}/'.join((d.getVar('base_sbindir_progs', True)).split())}" | ||
114 | |||
115 | pkg_postinst_${PN} () { | ||
113 | if [ "x$D" != "x" ]; then | 116 | if [ "x$D" != "x" ]; then |
114 | rootarg="--root=$D" | 117 | rootarg="--root=$D" |
115 | else | 118 | else |
@@ -119,9 +122,3 @@ pkg_postinst_${PN} () { | |||
119 | pwconv $rootarg | 122 | pwconv $rootarg |
120 | grpconv $rootarg | 123 | grpconv $rootarg |
121 | } | 124 | } |
122 | |||
123 | pkg_prerm_${PN} () { | ||
124 | for i in passwd chpasswd chfn newgrp chsh login vipw vigr ; do | ||
125 | update-alternatives --remove $i $i.${PN} | ||
126 | done | ||
127 | } | ||