Gentoo Archives: gentoo-commits

From: "Mike Frysinger (vapier)" <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-apps/shadow: shadow-4.1.5-r2.ebuild ChangeLog
Date: Sat, 21 Apr 2012 17:20:21
Message-Id: 20120421172011.761B12004B@flycatcher.gentoo.org
1 vapier 12/04/21 17:20:11
2
3 Modified: ChangeLog
4 Added: shadow-4.1.5-r2.ebuild
5 Log:
6 Fix crash when calling userdel #405409 by Yuri Mamaev. Add patch for groupadd on selinux #406819 by Amadeusz Sławiński. Depend on libsemanage when USE=selinux #408173 by Markus Knetschke.
7
8 (Portage version: 2.2.0_alpha100/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.269 sys-apps/shadow/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/shadow/ChangeLog?rev=1.269&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/shadow/ChangeLog?rev=1.269&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/shadow/ChangeLog?r1=1.268&r2=1.269
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/sys-apps/shadow/ChangeLog,v
20 retrieving revision 1.268
21 retrieving revision 1.269
22 diff -u -r1.268 -r1.269
23 --- ChangeLog 17 Apr 2012 08:38:50 -0000 1.268
24 +++ ChangeLog 21 Apr 2012 17:20:11 -0000 1.269
25 @@ -1,6 +1,15 @@
26 # ChangeLog for sys-apps/shadow
27 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/shadow/ChangeLog,v 1.268 2012/04/17 08:38:50 phajdan.jr Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/shadow/ChangeLog,v 1.269 2012/04/21 17:20:11 vapier Exp $
30 +
31 +*shadow-4.1.5-r2 (21 Apr 2012)
32 +
33 + 21 Apr 2012; Mike Frysinger <vapier@g.o> +shadow-4.1.5-r2.ebuild,
34 + +files/shadow-4.1.5-grremove.patch,
35 + +files/shadow-4.1.5-selinux-groupadd.patch:
36 + Fix crash when calling userdel #405409 by Yuri Mamaev. Add patch for groupadd
37 + on selinux #406819 by Amadeusz Sławiński. Depend on libsemanage when
38 + USE=selinux #408173 by Markus Knetschke.
39
40 *shadow-4.1.5-r1 (17 Apr 2012)
41
42
43
44
45 1.1 sys-apps/shadow/shadow-4.1.5-r2.ebuild
46
47 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/shadow/shadow-4.1.5-r2.ebuild?rev=1.1&view=markup
48 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/shadow/shadow-4.1.5-r2.ebuild?rev=1.1&content-type=text/plain
49
50 Index: shadow-4.1.5-r2.ebuild
51 ===================================================================
52 # Copyright 1999-2012 Gentoo Foundation
53 # Distributed under the terms of the GNU General Public License v2
54 # $Header: /var/cvsroot/gentoo-x86/sys-apps/shadow/shadow-4.1.5-r2.ebuild,v 1.1 2012/04/21 17:20:11 vapier Exp $
55
56 inherit eutils libtool toolchain-funcs pam multilib
57
58 DESCRIPTION="Utilities to deal with user accounts"
59 HOMEPAGE="http://shadow.pld.org.pl/ http://pkg-shadow.alioth.debian.org/"
60 SRC_URI="http://pkg-shadow.alioth.debian.org/releases/${P}.tar.bz2"
61
62 LICENSE="BSD GPL-2"
63 SLOT="0"
64 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
65 IUSE="acl audit cracklib nls pam selinux skey tcb xattr"
66
67 RDEPEND="acl? ( sys-apps/acl )
68 audit? ( sys-process/audit )
69 cracklib? ( >=sys-libs/cracklib-2.7-r3 )
70 pam? ( virtual/pam )
71 skey? ( sys-auth/skey )
72 selinux? (
73 >=sys-libs/libselinux-1.28
74 sys-libs/libsemanage
75 )
76 nls? ( virtual/libintl )
77 tcb? ( sys-auth/tcb )
78 xattr? ( sys-apps/attr )"
79 DEPEND="${RDEPEND}
80 nls? ( sys-devel/gettext )"
81 RDEPEND="${RDEPEND}
82 pam? ( >=sys-auth/pambase-20120417 )"
83
84 src_unpack() {
85 unpack ${A}
86 cd "${S}"
87 epatch "${FILESDIR}"/${PN}-4.1.3-dots-in-usernames.patch #22920
88 epatch "${FILESDIR}"/${PN}-4.1.5-stdarg.patch
89 epatch "${FILESDIR}"/${PN}-4.1.5-nscd-newline-msg.patch
90 epatch "${FILESDIR}"/${PN}-4.1.5-nscd-ignore-exit-1.patch
91 epatch "${FILESDIR}"/${PN}-4.1.5-grremove.patch #405409
92 epatch "${FILESDIR}"/${PN}-4.1.5-selinux-groupadd.patch #406819
93 elibtoolize
94 epunt_cxx
95 }
96
97 src_compile() {
98 tc-is-cross-compiler && export ac_cv_func_setpgrp_void=yes
99 econf \
100 --without-group-name-max-length \
101 --enable-shared=no \
102 --enable-static=yes \
103 $(use_with acl) \
104 $(use_with audit) \
105 $(use_with cracklib libcrack) \
106 $(use_with pam libpam) \
107 $(use_with skey) \
108 $(use_with selinux) \
109 $(use_enable nls) \
110 $(use_with elibc_glibc nscd) \
111 $(use_with tcb) \
112 $(use_with xattr attr)
113 emake || die
114 }
115
116 set_login_opt() {
117 local comment="" opt=$1 val=$2
118 [[ -z ${val} ]] && comment="#"
119 sed -i -r \
120 -e "/^#?${opt}/s:.*:${comment}${opt} ${val}:" \
121 "${D}"/etc/login.defs
122 local res=$(grep "^${comment}${opt}" "${D}"/etc/login.defs)
123 einfo ${res:-Unable to find ${opt} in /etc/login.defs}
124 }
125
126 src_install() {
127 emake DESTDIR="${D}" suidperms=4711 install || die
128
129 # Remove libshadow and libmisc; see bug 37725 and the following
130 # comment from shadow's README.linux:
131 # Currently, libshadow.a is for internal use only, so if you see
132 # -lshadow in a Makefile of some other package, it is safe to
133 # remove it.
134 rm -f "${D}"/{,usr/}$(get_libdir)/lib{misc,shadow}.{a,la}
135
136 insinto /etc
137 # Using a securetty with devfs device names added
138 # (compat names kept for non-devfs compatibility)
139 insopts -m0600 ; doins "${FILESDIR}"/securetty
140 if ! use pam ; then
141 insopts -m0600
142 doins etc/login.access etc/limits
143 fi
144 # Output arch-specific cruft
145 local devs
146 case $(tc-arch) in
147 ppc*) devs="hvc0 hvsi0 ttyPSC0";;
148 hppa) devs="ttyB0";;
149 arm) devs="ttyFB0 ttySAC0 ttySAC1 ttySAC2 ttySAC3 ttymxc0 ttymxc1 ttyO0 ttyO1 ttyO2";;
150 sh) devs="ttySC0 ttySC1";;
151 esac
152 [[ -n ${devs} ]] && printf '%s\n' ${devs} >> "${D}"/etc/securetty
153
154 # needed for 'useradd -D'
155 insinto /etc/default
156 insopts -m0600
157 doins "${FILESDIR}"/default/useradd
158
159 # move passwd to / to help recover broke systems #64441
160 mv "${D}"/usr/bin/passwd "${D}"/bin/
161 dosym /bin/passwd /usr/bin/passwd
162
163 cd "${S}"
164 insinto /etc
165 insopts -m0644
166 newins etc/login.defs login.defs
167
168 if ! use pam ; then
169 set_login_opt MAIL_CHECK_ENAB no
170 set_login_opt SU_WHEEL_ONLY yes
171 set_login_opt CRACKLIB_DICTPATH /usr/$(get_libdir)/cracklib_dict
172 set_login_opt LOGIN_RETRIES 3
173 set_login_opt ENCRYPT_METHOD SHA512
174 else
175 dopamd "${FILESDIR}"/pam.d-include/shadow || die
176
177 for x in chpasswd chgpasswd; do
178 newpamd "${FILESDIR}"/pam.d-include/passwd ${x} || die
179 done
180
181 for x in chage chsh chfn newusers \
182 user{add,del,mod} group{add,del,mod} ; do
183 newpamd "${FILESDIR}"/pam.d-include/shadow ${x} || die
184 done
185
186 # comment out login.defs options that pam hates
187 local opt
188 for opt in \
189 CHFN_AUTH \
190 CRACKLIB_DICTPATH \
191 ENV_HZ \
192 ENVIRON_FILE \
193 FAILLOG_ENAB \
194 FTMP_FILE \
195 LASTLOG_ENAB \
196 MAIL_CHECK_ENAB \
197 MOTD_FILE \
198 NOLOGINS_FILE \
199 OBSCURE_CHECKS_ENAB \
200 PASS_ALWAYS_WARN \
201 PASS_CHANGE_TRIES \
202 PASS_MIN_LEN \
203 PORTTIME_CHECKS_ENAB \
204 QUOTAS_ENAB \
205 SU_WHEEL_ONLY
206 do
207 set_login_opt ${opt}
208 done
209
210 sed -i -f "${FILESDIR}"/login_defs_pam.sed \
211 "${D}"/etc/login.defs
212
213 # remove manpages that pam will install for us
214 # and/or don't apply when using pam
215 find "${D}"/usr/share/man \
216 '(' -name 'limits.5*' -o -name 'suauth.5*' ')' \
217 -exec rm {} +
218
219 # Remove pam.d files provided by pambase.
220 rm "${D}"/etc/pam.d/{login,passwd,su} || die
221 fi
222
223 # Remove manpages that are handled by other packages
224 find "${D}"/usr/share/man \
225 '(' -name id.1 -o -name passwd.5 -o -name getspnam.3 ')' \
226 -exec rm {} +
227
228 cd "${S}"
229 dodoc ChangeLog NEWS TODO
230 newdoc README README.download
231 cd doc
232 dodoc HOWTO README* WISHLIST *.txt
233 }
234
235 pkg_preinst() {
236 rm -f "${ROOT}"/etc/pam.d/system-auth.new \
237 "${ROOT}/etc/login.defs.new"
238
239 use pam && pam_epam_expand "${D}"/etc/pam.d/login
240 }
241
242 pkg_postinst() {
243 # Enable shadow groups.
244 if [ ! -f "${ROOT}"/etc/gshadow ] ; then
245 if grpck -r -R "${ROOT}" 2>/dev/null ; then
246 grpconv -R "${ROOT}"
247 else
248 ewarn "Running 'grpck' returned errors. Please run it by hand, and then"
249 ewarn "run 'grpconv' afterwards!"
250 fi
251 fi
252
253 einfo "The 'adduser' symlink to 'useradd' has been dropped."
254 }