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