Gentoo Archives: gentoo-commits

From: "Diego Petteno (flameeyes)" <flameeyes@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-libs/pam: pam-1.1.6-r1.ebuild ChangeLog pam-1.1.6.ebuild
Date: Wed, 30 Jan 2013 15:36:48
Message-Id: 20130130153643.EB79E2171D@flycatcher.gentoo.org
1 flameeyes 13/01/30 15:36:43
2
3 Modified: ChangeLog
4 Added: pam-1.1.6-r1.ebuild
5 Removed: pam-1.1.6.ebuild
6 Log:
7 Finally close bug #451068 by using /run/sepermit directly, and installing a tmpfiles.d file for it to be re-created at boot time.
8
9 (Portage version: 2.2.0_alpha161/cvs/Linux x86_64, signed Manifest commit with key 1CD13C8AD4301342)
10
11 Revision Changes Path
12 1.315 sys-libs/pam/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/pam/ChangeLog?rev=1.315&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/pam/ChangeLog?rev=1.315&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/pam/ChangeLog?r1=1.314&r2=1.315
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/sys-libs/pam/ChangeLog,v
21 retrieving revision 1.314
22 retrieving revision 1.315
23 diff -u -r1.314 -r1.315
24 --- ChangeLog 7 Oct 2012 18:52:57 -0000 1.314
25 +++ ChangeLog 30 Jan 2013 15:36:43 -0000 1.315
26 @@ -1,6 +1,13 @@
27 # ChangeLog for sys-libs/pam
28 -# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/pam/ChangeLog,v 1.314 2012/10/07 18:52:57 flameeyes Exp $
30 +# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
31 +# $Header: /var/cvsroot/gentoo-x86/sys-libs/pam/ChangeLog,v 1.315 2013/01/30 15:36:43 flameeyes Exp $
32 +
33 +*pam-1.1.6-r1 (30 Jan 2013)
34 +
35 + 30 Jan 2013; Diego E. Pettenò <flameeyes@g.o> +pam-1.1.6-r1.ebuild,
36 + -pam-1.1.6.ebuild:
37 + Finally close bug #451068 by using /run/sepermit directly, and installing a
38 + tmpfiles.d file for it to be re-created at boot time.
39
40 07 Oct 2012; Diego E. Pettenò <flameeyes@g.o>
41 +files/Linux-PAM-1.1.6+glibc-2.16.patch, pam-1.1.6.ebuild:
42
43
44
45 1.1 sys-libs/pam/pam-1.1.6-r1.ebuild
46
47 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/pam/pam-1.1.6-r1.ebuild?rev=1.1&view=markup
48 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/pam/pam-1.1.6-r1.ebuild?rev=1.1&content-type=text/plain
49
50 Index: pam-1.1.6-r1.ebuild
51 ===================================================================
52 # Copyright 1999-2013 Gentoo Foundation
53 # Distributed under the terms of the GNU General Public License v2
54 # $Header: /var/cvsroot/gentoo-x86/sys-libs/pam/pam-1.1.6-r1.ebuild,v 1.1 2013/01/30 15:36:43 flameeyes Exp $
55
56 EAPI=5
57
58 inherit libtool multilib eutils pam toolchain-funcs flag-o-matic db-use autotools
59
60 MY_PN="Linux-PAM"
61 MY_P="${MY_PN}-${PV}"
62
63 HOMEPAGE="https://fedorahosted.org/linux-pam/"
64 DESCRIPTION="Linux-PAM (Pluggable Authentication Modules)"
65
66 SRC_URI="http://www.linux-pam.org/library/${MY_P}.tar.bz2
67 http://www.linux-pam.org/documentation/${MY_P}-docs.tar.bz2"
68
69 LICENSE="|| ( BSD GPL-2 )"
70 SLOT="0"
71 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~ia64-linux ~x86-linux"
72 IUSE="cracklib nls elibc_FreeBSD selinux vim-syntax audit test elibc_glibc debug berkdb nis"
73
74 RDEPEND="nls? ( virtual/libintl )
75 cracklib? ( >=sys-libs/cracklib-2.8.3 )
76 audit? ( sys-process/audit )
77 selinux? ( >=sys-libs/libselinux-1.28 )
78 berkdb? ( sys-libs/db )
79 elibc_glibc? (
80 >=sys-libs/glibc-2.7
81 nis? ( || ( >=net-libs/libtirpc-0.2.2-r1 <sys-libs/glibc-2.14 ) )
82 )"
83 DEPEND="${RDEPEND}
84 >=sys-devel/libtool-2
85 sys-devel/flex
86 nls? ( sys-devel/gettext )
87 virtual/pkgconfig"
88 PDEPEND="sys-auth/pambase
89 vim-syntax? ( app-vim/pam-syntax )"
90 RDEPEND="${RDEPEND}
91 !<sys-apps/openrc-0.11.8
92 !sys-auth/openpam
93 !sys-auth/pam_userdb"
94
95 S="${WORKDIR}/${MY_P}"
96
97 check_old_modules() {
98 local retval="0"
99
100 if sed -e 's:#.*::' "${EROOT}"/etc/pam.d/* 2>/dev/null | fgrep -q pam_stack.so; then
101 eerror ""
102 eerror "Your current setup is using the pam_stack module."
103 eerror "This module is deprecated and no longer supported, and since version"
104 eerror "0.99 is no longer installed, nor provided by any other package."
105 eerror "The package will be built (to allow binary package builds), but will"
106 eerror "not be installed."
107 eerror "Please replace pam_stack usage with proper include directive usage,"
108 eerror "following the PAM Upgrade guide at the following URL"
109 eerror " http://www.gentoo.org/proj/en/base/pam/upgrade-0.99.xml"
110 eerror ""
111
112 retval=1
113 fi
114
115 if sed -e 's:#.*::' "${EROOT}"/etc/pam.d/* 2>/dev/null | egrep -q 'pam_(pwdb|console)'; then
116 eerror ""
117 eerror "Your current setup is using one or more of the following modules,"
118 eerror "that are not built or supported anymore:"
119 eerror "pam_pwdb, pam_console"
120 eerror "If you are in real need for these modules, please contact the maintainers"
121 eerror "of PAM through http://bugs.gentoo.org/ providing information about its"
122 eerror "use cases."
123 eerror "Please also make sure to read the PAM Upgrade guide at the following URL:"
124 eerror " http://www.gentoo.org/proj/en/base/pam/upgrade-0.99.xml"
125 eerror ""
126
127 retval=1
128 fi
129
130 return $retval
131 }
132
133 pkg_pretend() {
134 # do not error out, this is just a warning, one could build a binpkg
135 # with old modules enabled.
136 check_old_modules
137 }
138
139 src_prepare() {
140 epatch "${FILESDIR}"/${MY_P}-destdir.patch
141 epatch "${FILESDIR}"/${MY_P}+glibc-2.16.patch
142
143 eautoreconf
144 elibtoolize
145 }
146
147 src_configure() {
148 local myconf
149
150 if use hppa || use elibc_FreeBSD; then
151 myconf="${myconf} --disable-pie"
152 fi
153
154 # Disable automatic detection of libxcrypt; we _don't_ want the
155 # user to link libxcrypt in by default, since we won't track the
156 # dependency and allow to break PAM this way.
157 export ac_cv_header_xcrypt_h=no
158
159 econf \
160 --disable-dependency-tracking \
161 --enable-fast-install \
162 --libdir="${EPREFIX}"/usr/$(get_libdir) \
163 --docdir="${EPREFIX}"/usr/share/doc/${PF} \
164 --htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
165 --enable-securedir="${EPREFIX}"/$(get_libdir)/security \
166 --enable-isadir="${EPREFIX}"/$(get_libdir)/security \
167 $(use_enable nls) \
168 $(use_enable selinux) \
169 $(use_enable cracklib) \
170 $(use_enable audit) \
171 $(use_enable debug) \
172 $(use_enable berkdb db) \
173 $(use_enable nis) \
174 --with-db-uniquename=-$(db_findver sys-libs/db) \
175 --disable-prelude \
176 ${myconf}
177 }
178
179 src_compile() {
180 emake sepermitlockdir="${EPREFIX}/run/sepermit"
181 }
182
183 src_test() {
184 # explicitly allow parallel-build during testing
185 emake sepermitlockdir="${EPREFIX}/run/sepermit" check
186 }
187
188 src_install() {
189 local lib
190
191 emake DESTDIR="${D}" install \
192 sepermitlockdir="${EPREFIX}/var//sepermit"
193
194 # Need to be suid
195 fperms u+s /sbin/unix_chkpwd
196
197 gen_usr_ldscript -a pam pamc pam_misc
198
199 # create extra symlinks just in case something depends on them...
200 for lib in pam pamc pam_misc; do
201 if ! [[ -f "${ED}"/$(get_libdir)/lib${lib}$(get_libname) ]]; then
202 dosym lib${lib}$(get_libname 0) /$(get_libdir)/lib${lib}$(get_libname)
203 fi
204 done
205
206 dodoc CHANGELOG ChangeLog README AUTHORS Copyright NEWS
207
208 docinto modules
209 for dir in modules/pam_*; do
210 newdoc "${dir}"/README README."$(basename "${dir}")"
211 done
212
213 # Get rid of the .la files. We certainly don't need them for PAM
214 # modules, and libpam is installed as a shared object only, so we
215 # don't need them for static linking either.
216 find "${D}" -name '*.la' -delete
217
218 dodir /usr/lib/tmpfiles.d
219 cat - > "${D}"/usr/lib/tmpfiles.d/${CATEGORY}:${PN}:${SLOT}.conf <<EOF
220 d /run/sepermit 0755 root root
221 EOF
222 }
223
224 pkg_preinst() {
225 check_old_modules || die "deprecated PAM modules still used"
226 }
227
228 pkg_postinst() {
229 ewarn "Some software with pre-loaded PAM libraries might experience"
230 ewarn "warnings or failures related to missing symbols and/or versions"
231 ewarn "after any update. While unfortunate this is a limit of the"
232 ewarn "implementation of PAM and the software, and it requires you to"
233 ewarn "restart the software manually after the update."
234 ewarn ""
235 ewarn "You can get a list of such software running a command like"
236 ewarn " lsof / | egrep -i 'del.*libpam\\.so'"
237 ewarn ""
238 ewarn "Alternatively, simply reboot your system."
239 if [ -x "${ROOT}"/var/log/tallylog ] ; then
240 elog ""
241 elog "Because of a bug present up to version 1.1.1-r2, you have"
242 elog "an executable /var/log/tallylog file. You can safely"
243 elog "correct it by running the command"
244 elog " chmod -x /var/log/tallylog"
245 elog ""
246 fi
247 }