summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2007-07-04 19:43:37 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2007-07-04 19:43:37 +0000
commitb4ffd100640d833030c340f3a90118aa4608a009 (patch)
tree500c0c1c2eef3e7ae94f36d5b1339ee254193168 /sys-libs
parentRemoved setuptools sed. bug# 184039 (diff)
downloadhistorical-b4ffd100640d833030c340f3a90118aa4608a009.tar.gz
historical-b4ffd100640d833030c340f3a90118aa4608a009.tar.bz2
historical-b4ffd100640d833030c340f3a90118aa4608a009.zip
Add some more explicit warnings and errors when using deprecated modules, and die if the system is configured to use pam_stack or other modules that are no more built and installed, to avoid breaking login on the box.
Package-Manager: portage-2.1.3_rc6
Diffstat (limited to 'sys-libs')
-rw-r--r--sys-libs/pam/ChangeLog7
-rw-r--r--sys-libs/pam/Manifest22
-rw-r--r--sys-libs/pam/pam-0.99.7.1.ebuild71
3 files changed, 82 insertions, 18 deletions
diff --git a/sys-libs/pam/ChangeLog b/sys-libs/pam/ChangeLog
index aad8e408e0ea..73812ee3988f 100644
--- a/sys-libs/pam/ChangeLog
+++ b/sys-libs/pam/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for sys-libs/pam
# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/pam/ChangeLog,v 1.153 2007/07/02 15:35:24 peper Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/pam/ChangeLog,v 1.154 2007/07/04 19:43:37 flameeyes Exp $
+
+ 04 Jul 2007; Diego Pettenò <flameeyes@gentoo.org> pam-0.99.7.1.ebuild:
+ Add some more explicit warnings and errors when using deprecated modules,
+ and die if the system is configured to use pam_stack or other modules that
+ are no more built and installed, to avoid breaking login on the box.
02 Jul 2007; Piotr Jaroszyński <peper@gentoo.org> pam-0.99.7.1.ebuild:
(QA) RESTRICT clean up.
diff --git a/sys-libs/pam/Manifest b/sys-libs/pam/Manifest
index 98c5e1d80940..17962db614e8 100644
--- a/sys-libs/pam/Manifest
+++ b/sys-libs/pam/Manifest
@@ -56,14 +56,14 @@ EBUILD pam-0.78-r5.ebuild 11399 RMD160 e383bbea115e25cd1dd53cc06bbb838d42e29aec
MD5 b03d3115f011f9e0360987b0271fcce0 pam-0.78-r5.ebuild 11399
RMD160 e383bbea115e25cd1dd53cc06bbb838d42e29aec pam-0.78-r5.ebuild 11399
SHA256 b74325e8eb373cf62b8edef7569d86ef412ea051606feeed53fc2f8138ab9cb6 pam-0.78-r5.ebuild 11399
-EBUILD pam-0.99.7.1.ebuild 3005 RMD160 fa1a7e8e69fa3ae3e1a32d8efe78ea422934a812 SHA1 9585a2017a1445361b49d91713f3522fddb9569d SHA256 0c29978c23f90ae95891245f931e6e72ab6a2c2c93c8b72a4d230cf3419ffe86
-MD5 46d36d8b69a2ed1a4ccecce5971be1ce pam-0.99.7.1.ebuild 3005
-RMD160 fa1a7e8e69fa3ae3e1a32d8efe78ea422934a812 pam-0.99.7.1.ebuild 3005
-SHA256 0c29978c23f90ae95891245f931e6e72ab6a2c2c93c8b72a4d230cf3419ffe86 pam-0.99.7.1.ebuild 3005
-MISC ChangeLog 24221 RMD160 ae2d28e7f05c22922451ea40e840bc12d8477adf SHA1 c07dc9ad3d18535511c74b78d6959b5b70d682af SHA256 b75a83ca46eff36587effd96cb98047ab95cae40ca3f50ad90fbd57253fde7e3
-MD5 7c910a0bf1e0a89af68070e19c15e092 ChangeLog 24221
-RMD160 ae2d28e7f05c22922451ea40e840bc12d8477adf ChangeLog 24221
-SHA256 b75a83ca46eff36587effd96cb98047ab95cae40ca3f50ad90fbd57253fde7e3 ChangeLog 24221
+EBUILD pam-0.99.7.1.ebuild 4857 RMD160 12f56984833f3fe8f8d5ef66ffcc182e482e2ee4 SHA1 c63eff6ee31d63a888e85b727194e071b8d4eb87 SHA256 fb2bcc459714a351659df481c1bded3e3a3b4a769c5f57afc4afb722fb56340a
+MD5 fe4f87cde6b58f7dd8ad31280db28c46 pam-0.99.7.1.ebuild 4857
+RMD160 12f56984833f3fe8f8d5ef66ffcc182e482e2ee4 pam-0.99.7.1.ebuild 4857
+SHA256 fb2bcc459714a351659df481c1bded3e3a3b4a769c5f57afc4afb722fb56340a pam-0.99.7.1.ebuild 4857
+MISC ChangeLog 24524 RMD160 ccb665b7b28c0b5028963d64de50d356ecf3837c SHA1 c40d1b0de0759ad39afe2ef9121d1461f03cd27c SHA256 a78bea213813599b9c4e94c9f3675318c4e8461aecb87a1611e78c186a9f0895
+MD5 0b81596bf97243d914c2bff0786dbaae ChangeLog 24524
+RMD160 ccb665b7b28c0b5028963d64de50d356ecf3837c ChangeLog 24524
+SHA256 a78bea213813599b9c4e94c9f3675318c4e8461aecb87a1611e78c186a9f0895 ChangeLog 24524
MISC metadata.xml 218 RMD160 1955c7446d4ceb77506ba7b58ee35913c576a72c SHA1 02dacc356a39905402083cb54ae4f6dd0ac59fad SHA256 e0bb49cab71cc84d8bdad26876197164073722b378d27a5bf55bbfd2afdbd19c
MD5 393d06cf4b76671f8e6ce72ac71bdad8 metadata.xml 218
RMD160 1955c7446d4ceb77506ba7b58ee35913c576a72c metadata.xml 218
@@ -80,7 +80,7 @@ SHA256 fd48ed29e798f9d699a8c0ecb394b65890da0993209b4ee9d7d1a036f7b8943f files/di
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4 (GNU/Linux)
-iD8DBQFGiRtBppoStNGKGywRAsNAAJ904uVFK1v9Adms7p+9GYeuoMNI6wCfQvhW
-aQEOdk6Vd94WnW1y6IpCSD0=
-=vb2B
+iD8DBQFGi/iWAiZjviIA2XgRAtaRAJoCdWZ26bSRNPI7TtqtjKwMgXJ1qgCg3IzF
+/X/l5/+cS3y3ld+Txq1477U=
+=xjEX
-----END PGP SIGNATURE-----
diff --git a/sys-libs/pam/pam-0.99.7.1.ebuild b/sys-libs/pam/pam-0.99.7.1.ebuild
index 96b3a93f530f..e38a7a8b8848 100644
--- a/sys-libs/pam/pam-0.99.7.1.ebuild
+++ b/sys-libs/pam/pam-0.99.7.1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/pam/pam-0.99.7.1.ebuild,v 1.4 2007/07/02 15:35:24 peper Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/pam/pam-0.99.7.1.ebuild,v 1.5 2007/07/04 19:43:37 flameeyes Exp $
WANT_AUTOCONF="latest"
WANT_AUTOMAKE="latest"
@@ -34,6 +34,68 @@ S="${WORKDIR}/${MY_P}"
PROVIDE="virtual/pam"
+check_old_modules() {
+ local retval="0"
+
+ if sed -e 's:#.*::' /etc/pam.d/* | fgrep -q pam_stack.so; then
+ eerror ""
+ eerror "Your current setup is using the pam_stack module."
+ eerror "This module is deprecated and no more supported, and since version"
+ eerror "0.99 is no more installed, nor provided by any other package."
+ eerror "The package will be built (to allow binary package builds), but will"
+ eerror "not be installed."
+ eerror "Please replace pam_stack usage with proper include directive usage,"
+ eerror "following the PAM Upgrade guide at the following URL"
+ eerror " http://www.gentoo.org/proj/en/base/pam/upgrade-0.99.xml"
+ eerror ""
+ ebeep 15
+
+ retval=1
+ fi
+
+ if sed -e 's:#.*::' /etc/pam.d/* | egrep -q 'pam_(pwdb|radius|timestamp|chroot)'; then
+ eerror ""
+ eerror "Your current setup is using one or more of the following modules,"
+ eerror "that are not built or supported anymore:"
+ eerror "pam_pwdb, pam_radius, pam_timestamp, pam_chroot"
+ eerror "If you are in real need for these modules, please contact the maintainers"
+ eerror "of PAM through http://bugs.gentoo.org/ providing information about its"
+ eerror "use cases."
+ ebeel 10
+
+ retval=1
+ fi
+
+ # Produce the warnings only during upgrade, for the following two
+ has_version '=sys-libs/pam-0.78' || return $retval
+
+ if sed -e 's:#.*::' /etc/pam.d/* | fgrep -q pam_console.so; then
+ ewarn ""
+ ewarn "Your current setup is using the pam_console module."
+ ewarn "Since version 0.99, ${CATEGORY}/${PN} does not provide this module"
+ ewarn "anymore; if you want to continue using this module, you should install"
+ ewarn "sys-auth/pam_console."
+ ewarn ""
+ ebeep 5
+ fi
+
+ if sed -e 's:#.*::' /etc/pam.d/* | fgrep -q pam_userdb.so; then
+ ewarn ""
+ ewarn "Your current setup is using the pam_userdb module."
+ ewarn "Since version 0.99, ${CATEGORY}/${PN} does not provide this module"
+ ewarn "anymore; if you want to continue using this module, you should install"
+ ewarn "sys-auth/pam_userdb."
+ ewarn ""
+ ebeep 5
+ fi
+
+ return $retval
+}
+
+pkg_setup() {
+ check_old_modules
+}
+
src_unpack() {
unpack ${A}
cd "${S}"
@@ -101,9 +163,6 @@ src_install() {
rm -f "${D}"/usr/share/man/man8/pam_userdb.8*
}
-pkg_postinst() {
- elog "Since version 0.99 we don't apply RedHat patches anymore, thus stuff"
- elog "like pam_stack is not present (replaced by the 'include' directive)."
- elog "The pam_userdb module is now moved in sys-auth/pam_userdb."
- elog "The pam_console module is now moved in sys-auth/pam_console."
+pkg_preinst() {
+ check_old_modules || die "deprecated PAM modules still used"
}