summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuli Suominen <ssuominen@gentoo.org>2012-06-19 07:55:54 +0000
committerSamuli Suominen <ssuominen@gentoo.org>2012-06-19 07:55:54 +0000
commitb472f4d382828b887441244cbc4a09c9f30ee41d (patch)
tree91ddb83577f5dafb211d1e5e57b23d37ba9c7368 /sys-auth/pambase
parentmarked x86 per bug 421729 (diff)
downloadgentoo-2-b472f4d382828b887441244cbc4a09c9f30ee41d.tar.gz
gentoo-2-b472f4d382828b887441244cbc4a09c9f30ee41d.tar.bz2
gentoo-2-b472f4d382828b887441244cbc4a09c9f30ee41d.zip
Use "usex" from eutils.eclass for defining "varvalue". Support for pam_systemd.so wrt #372229 by Michał Górny.
(Portage version: 2.2.0_alpha110/cvs/Linux x86_64)
Diffstat (limited to 'sys-auth/pambase')
-rw-r--r--sys-auth/pambase/ChangeLog10
-rw-r--r--sys-auth/pambase/files/pambase-20120417-systemd.patch29
-rw-r--r--sys-auth/pambase/metadata.xml4
-rw-r--r--sys-auth/pambase/pambase-20120417-r1.ebuild105
4 files changed, 147 insertions, 1 deletions
diff --git a/sys-auth/pambase/ChangeLog b/sys-auth/pambase/ChangeLog
index cdbbc79132e4..b67720591c6d 100644
--- a/sys-auth/pambase/ChangeLog
+++ b/sys-auth/pambase/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for sys-auth/pambase
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-auth/pambase/ChangeLog,v 1.111 2012/05/19 21:34:59 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-auth/pambase/ChangeLog,v 1.112 2012/06/19 07:55:53 ssuominen Exp $
+
+*pambase-20120417-r1 (19 Jun 2012)
+
+ 19 Jun 2012; Samuli Suominen <ssuominen@gentoo.org>
+ +pambase-20120417-r1.ebuild, +files/pambase-20120417-systemd.patch,
+ metadata.xml:
+ Use `usex` from eutils.eclass for defining "varvalue". Support for
+ pam_systemd.so wrt #372229 by Michał Górny.
19 May 2012; Diego E. Pettenò <flameeyes@gentoo.org>
pambase-20101024-r2.ebuild, pambase-20120417.ebuild:
diff --git a/sys-auth/pambase/files/pambase-20120417-systemd.patch b/sys-auth/pambase/files/pambase-20120417-systemd.patch
new file mode 100644
index 000000000000..047fb41c8592
--- /dev/null
+++ b/sys-auth/pambase/files/pambase-20120417-systemd.patch
@@ -0,0 +1,29 @@
+http://bugs.gentoo.org/372229
+
+--- Makefile
++++ Makefile
+@@ -28,6 +28,10 @@
+ PAMFLAGS += -DHAVE_CONSOLEKIT=1
+ endif
+
++ifeq "$(SYSTEMD)" "yes"
++PAMFLAGS += -DHAVE_SYSTEMD=1
++endif
++
+ ifeq "$(GNOME_KEYRING)" "yes"
+ PAMFLAGS += -DHAVE_GNOME_KEYRING=1
+ endif
+--- system-login.in
++++ system-login.in
+@@ -45,7 +45,10 @@
+ #endif
+ session include system-auth
+ #if HAVE_CONSOLEKIT
+-session optional pam_ck_connector.so nox11
++-session optional pam_ck_connector.so nox11
++#endif
++#if HAVE_SYSTEMD
++-session optional pam_systemd.so
+ #endif
+ #if HAVE_GNOME_KEYRING
+ session optional pam_gnome_keyring.so auto_start
diff --git a/sys-auth/pambase/metadata.xml b/sys-auth/pambase/metadata.xml
index 533769a0a0cf..7a35775161d9 100644
--- a/sys-auth/pambase/metadata.xml
+++ b/sys-auth/pambase/metadata.xml
@@ -17,6 +17,10 @@
allows for console logins to make use of ConsoleKit
authorization.
</flag>
+ <flag name="systemd">
+ Use pam_systemd module to register user sessions in the systemd
+ control group hierarchy.
+ </flag>
<flag name="gnome-keyring">
Enable pam_gnome_keyring module on system login stack. This
enables proper Gnome Keyring access to logins, whether they are
diff --git a/sys-auth/pambase/pambase-20120417-r1.ebuild b/sys-auth/pambase/pambase-20120417-r1.ebuild
new file mode 100644
index 000000000000..d195f121e813
--- /dev/null
+++ b/sys-auth/pambase/pambase-20120417-r1.ebuild
@@ -0,0 +1,105 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-auth/pambase/pambase-20120417-r1.ebuild,v 1.1 2012/06/19 07:55:53 ssuominen Exp $
+
+EAPI=4
+inherit eutils
+
+DESCRIPTION="PAM base configuration files"
+HOMEPAGE="http://www.gentoo.org/proj/en/base/pam/"
+SRC_URI="http://dev.gentoo.org/~flameeyes/${PN}/${P}.tar.bz2
+ http://dev.gentoo.org/~phajdan.jr/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 -sparc-fbsd -x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux"
+IUSE="consolekit cracklib debug gnome-keyring minimal mktemp pam_krb5 pam_ssh passwdqc selinux +sha512 systemd"
+
+RESTRICT=binchecks
+
+MIN_PAM_REQ=1.1.3
+
+RDEPEND="
+ || (
+ >=sys-libs/pam-${MIN_PAM_REQ}
+ ( sys-auth/openpam || ( sys-freebsd/freebsd-pam-modules sys-netbsd/netbsd-pam-modules ) )
+ )
+ consolekit? ( >=sys-auth/consolekit-0.4.5_p2012[pam] )
+ cracklib? ( >=sys-libs/pam-${MIN_PAM_REQ}[cracklib] )
+ gnome-keyring? ( >=gnome-base/gnome-keyring-2.32[pam] )
+ mktemp? ( sys-auth/pam_mktemp )
+ pam_krb5? (
+ >=sys-libs/pam-${MIN_PAM_REQ}
+ >=sys-auth/pam_krb5-4.3
+ )
+ pam_ssh? ( sys-auth/pam_ssh )
+ passwdqc? ( >=sys-auth/pam_passwdqc-1.0.4 )
+ selinux? ( >=sys-libs/pam-${MIN_PAM_REQ}[selinux] )
+ sha512? ( >=sys-libs/pam-${MIN_PAM_REQ} )
+ systemd? ( >=sys-apps/systemd-44-r1[pam] )
+ !<sys-apps/shadow-4.1.5-r1
+ !<sys-freebsd/freebsd-pam-modules-6.2-r1
+ !<sys-libs/pam-0.99.9.0-r1"
+DEPEND="app-portage/portage-utils"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-systemd.patch
+}
+
+src_compile() {
+ local implementation=
+ local linux_pam_version=
+ if has_version sys-libs/pam; then
+ implementation=linux-pam
+ local ver_str=$(qatom `best_version sys-libs/pam` | cut -d ' ' -f 3)
+ linux_pam_version=$(printf "0x%02x%02x%02x" ${ver_str//\./ })
+ elif has_version sys-auth/openpam; then
+ implementation=openpam
+ else
+ die "PAM implementation not identified"
+ fi
+
+ use_var() {
+ local varname=$(echo $1 | tr [a-z] [A-Z])
+ local usename=${2-$(echo $1 | tr [A-Z] [a-z])}
+ local varvalue=$(usex $usename)
+ echo "${varname}=${varvalue}"
+ }
+
+ emake \
+ GIT=true \
+ $(use_var debug) \
+ $(use_var cracklib) \
+ $(use_var passwdqc) \
+ $(use_var consolekit) \
+ $(use_var systemd) \
+ $(use_var GNOME_KEYRING gnome-keyring) \
+ $(use_var selinux) \
+ $(use_var mktemp) \
+ $(use_var PAM_SSH pam_ssh) \
+ $(use_var sha512) \
+ $(use_var KRB5 pam_krb5) \
+ $(use_var minimal) \
+ IMPLEMENTATION=${implementation} \
+ LINUX_PAM_VERSION=${linux_pam_version}
+}
+
+src_test() { :; }
+
+src_install() {
+ emake GIT=true DESTDIR="${ED}" install
+}
+
+pkg_postinst() {
+ if use sha512; then
+ elog "Starting from version 20080801, pambase optionally enables"
+ elog "SHA512-hashed passwords. For this to work, you need sys-libs/pam-1.0.1"
+ elog "built against sys-libs/glibc-2.7 or later."
+ elog "If you don't have support for this, it will automatically fallback"
+ elog "to MD5-hashed passwords, just like before."
+ elog
+ elog "Please note that the change only affects the newly-changed passwords"
+ elog "and that SHA512-hashed passwords will not work on earlier versions"
+ elog "of glibc or Linux-PAM."
+ fi
+}