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