Gentoo Archives: gentoo-commits

From: "Michal Gorny (mgorny)" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-libs/pam: pam-1.1.8-r2.ebuild ChangeLog
Date: Fri, 30 May 2014 14:26:35
Message-Id: 20140530142628.C491B2004E@flycatcher.gentoo.org
1 mgorny 14/05/30 14:26:28
2
3 Modified: ChangeLog
4 Added: pam-1.1.8-r2.ebuild
5 Log:
6 Enable multilib support.
7
8 (Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key EFB4464E!)
9
10 Revision Changes Path
11 1.336 sys-libs/pam/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/pam/ChangeLog?rev=1.336&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/pam/ChangeLog?rev=1.336&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/pam/ChangeLog?r1=1.335&r2=1.336
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/sys-libs/pam/ChangeLog,v
20 retrieving revision 1.335
21 retrieving revision 1.336
22 diff -u -r1.335 -r1.336
23 --- ChangeLog 8 May 2014 23:07:19 -0000 1.335
24 +++ ChangeLog 30 May 2014 14:26:28 -0000 1.336
25 @@ -1,6 +1,11 @@
26 # ChangeLog for sys-libs/pam
27 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/pam/ChangeLog,v 1.335 2014/05/08 23:07:19 vapier Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/sys-libs/pam/ChangeLog,v 1.336 2014/05/30 14:26:28 mgorny Exp $
30 +
31 +*pam-1.1.8-r2 (30 May 2014)
32 +
33 + 30 May 2014; Michał Górny <mgorny@g.o> +pam-1.1.8-r2.ebuild:
34 + Enable multilib support.
35
36 *pam-1.1.8-r1 (08 May 2014)
37
38
39
40
41 1.1 sys-libs/pam/pam-1.1.8-r2.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/pam/pam-1.1.8-r2.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/pam/pam-1.1.8-r2.ebuild?rev=1.1&content-type=text/plain
45
46 Index: pam-1.1.8-r2.ebuild
47 ===================================================================
48 # Copyright 1999-2014 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/sys-libs/pam/pam-1.1.8-r2.ebuild,v 1.1 2014/05/30 14:26:28 mgorny Exp $
51
52 EAPI=5
53
54 inherit libtool multilib multilib-minimal eutils pam toolchain-funcs flag-o-matic db-use
55
56 MY_PN="Linux-PAM"
57 MY_P="${MY_PN}-${PV}"
58
59 HOMEPAGE="https://fedorahosted.org/linux-pam/"
60 DESCRIPTION="Linux-PAM (Pluggable Authentication Modules)"
61
62 SRC_URI="http://www.linux-pam.org/library/${MY_P}.tar.bz2
63 http://www.linux-pam.org/documentation/${MY_P}-docs.tar.bz2"
64
65 LICENSE="|| ( BSD GPL-2 )"
66 SLOT="0"
67 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~ia64-linux ~x86-linux"
68 IUSE="cracklib nls elibc_FreeBSD selinux vim-syntax audit test elibc_glibc debug berkdb nis"
69
70 RDEPEND="nls? ( virtual/libintl[${MULTILIB_USEDEP}] )
71 cracklib? ( >=sys-libs/cracklib-2.8.3[${MULTILIB_USEDEP}] )
72 audit? ( sys-process/audit[${MULTILIB_USEDEP}] )
73 selinux? ( >=sys-libs/libselinux-1.28[${MULTILIB_USEDEP}] )
74 berkdb? ( sys-libs/db[${MULTILIB_USEDEP}] )
75 elibc_glibc? (
76 >=sys-libs/glibc-2.7
77 nis? ( || ( >=net-libs/libtirpc-0.2.2-r1[${MULTILIB_USEDEP}] <sys-libs/glibc-2.14 ) )
78 )"
79 DEPEND="${RDEPEND}
80 >=sys-devel/libtool-2
81 sys-devel/flex
82 nls? ( sys-devel/gettext )
83 virtual/pkgconfig[${MULTILIB_USEDEP}]"
84 PDEPEND="sys-auth/pambase
85 vim-syntax? ( app-vim/pam-syntax )"
86 RDEPEND="${RDEPEND}
87 !<sys-apps/openrc-0.11.8
88 !sys-auth/openpam
89 !sys-auth/pam_userdb
90 abi_x86_32? (
91 !<=app-emulation/emul-linux-x86-baselibs-20140508-r7
92 !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
93 )"
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}"/${PN}-1.1.8-doc-install.patch #473650
141
142 elibtoolize
143 }
144
145 multilib_src_configure() {
146 # Disable automatic detection of libxcrypt; we _don't_ want the
147 # user to link libxcrypt in by default, since we won't track the
148 # dependency and allow to break PAM this way.
149 export ac_cv_header_xcrypt_h=no
150
151 local myconf=(
152 --htmldir="${EPREFIX}"/usr/share/doc/${PF}/html
153 --libdir="${EPREFIX}"/usr/$(get_libdir) \
154 --enable-securedir="${EPREFIX}"/$(get_libdir)/security
155 --enable-isadir="${EPREFIX}"/$(get_libdir)/security
156 $(use_enable nls)
157 $(use_enable selinux)
158 $(use_enable cracklib)
159 $(use_enable audit)
160 $(use_enable debug)
161 $(use_enable berkdb db)
162 $(use_enable nis)
163 --with-db-uniquename=-$(db_findver sys-libs/db)
164 --disable-prelude
165 )
166
167 if use hppa || use elibc_FreeBSD; then
168 myconf+=( --disable-pie )
169 fi
170
171 ECONF_SOURCE=${S} \
172 econf "${myconf[@]}"
173 }
174
175 multilib_src_compile() {
176 emake sepermitlockdir="${EPREFIX}/run/sepermit"
177 }
178
179 multilib_src_install() {
180 emake DESTDIR="${D}" install \
181 sepermitlockdir="${EPREFIX}/run/sepermit"
182
183 local prefix
184 if multilib_is_native_abi; then
185 prefix=
186 gen_usr_ldscript -a pam pamc pam_misc
187 else
188 prefix=/usr
189 fi
190
191 # create extra symlinks just in case something depends on them...
192 local lib
193 for lib in pam pamc pam_misc; do
194 if ! [[ -f "${ED}"${prefix}/$(get_libdir)/lib${lib}$(get_libname) ]]; then
195 dosym lib${lib}$(get_libname 0) ${prefix}/$(get_libdir)/lib${lib}$(get_libname)
196 fi
197 done
198 }
199
200 DOCS=( CHANGELOG ChangeLog README AUTHORS Copyright NEWS )
201
202 multilib_src_install_all() {
203 einstalldocs
204 prune_libtool_files --all
205
206 # Need to be suid
207 fperms u+s /sbin/unix_chkpwd
208
209 docinto modules
210 for dir in modules/pam_*; do
211 newdoc "${dir}"/README README."$(basename "${dir}")"
212 done
213
214 if use selinux; then
215 dodir /usr/lib/tmpfiles.d
216 cat - > "${D}"/usr/lib/tmpfiles.d/${CATEGORY}:${PN}:${SLOT}.conf <<EOF
217 d /run/sepermit 0755 root root
218 EOF
219 fi
220 }
221
222 pkg_preinst() {
223 check_old_modules || die "deprecated PAM modules still used"
224 }
225
226 pkg_postinst() {
227 ewarn "Some software with pre-loaded PAM libraries might experience"
228 ewarn "warnings or failures related to missing symbols and/or versions"
229 ewarn "after any update. While unfortunate this is a limit of the"
230 ewarn "implementation of PAM and the software, and it requires you to"
231 ewarn "restart the software manually after the update."
232 ewarn ""
233 ewarn "You can get a list of such software running a command like"
234 ewarn " lsof / | egrep -i 'del.*libpam\\.so'"
235 ewarn ""
236 ewarn "Alternatively, simply reboot your system."
237 if [[ -x "${EROOT}"/var/log/tallylog ]] ; then
238 elog ""
239 elog "Because of a bug present up to version 1.1.1-r2, you have"
240 elog "an executable /var/log/tallylog file. You can safely"
241 elog "correct it by running the command"
242 elog " chmod -x /var/log/tallylog"
243 elog ""
244 fi
245 }