Gentoo Archives: gentoo-commits

From: Michael Palimaka <kensington@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-auth/pambase/, sys-auth/pambase/files/
Date: Sat, 03 Jun 2017 12:06:15
Message-Id: 1496491560.fb917030ea1e32b9e920cfa4b8d1003a5c90f183.kensington@gentoo
1 commit: fb917030ea1e32b9e920cfa4b8d1003a5c90f183
2 Author: Michael Palimaka <kensington <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jun 3 12:04:16 2017 +0000
4 Commit: Michael Palimaka <kensington <AT> gentoo <DOT> org>
5 CommitDate: Sat Jun 3 12:06:00 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fb917030
7
8 sys-auth/pambase: revision bump adds elogind support
9
10 Thanks-to: Sven Eden <yamakuzure <AT> gmx.net>
11 Thanks-to: Andreas Sturmlechner <asturm <AT> gentoo.org>
12 Gentoo-bug: 599498
13 Package-Manager: Portage-2.3.5, Repoman-2.3.2
14
15 .../pambase/files/pambase-20150213-elogind.patch | 23 +++++
16 .../files/pambase-20150213-selinux-note.patch | 4 +-
17 sys-auth/pambase/metadata.xml | 3 +
18 sys-auth/pambase/pambase-20150213-r1.ebuild | 107 +++++++++++++++++++++
19 4 files changed, 135 insertions(+), 2 deletions(-)
20
21 diff --git a/sys-auth/pambase/files/pambase-20150213-elogind.patch b/sys-auth/pambase/files/pambase-20150213-elogind.patch
22 new file mode 100644
23 index 00000000000..7ec92f787b8
24 --- /dev/null
25 +++ b/sys-auth/pambase/files/pambase-20150213-elogind.patch
26 @@ -0,0 +1,23 @@
27 +--- a/Makefile
28 ++++ b/Makefile
29 +@@ -32,6 +32,10 @@
30 + PAMFLAGS += -DHAVE_SYSTEMD=1
31 + endif
32 +
33 ++ifeq "$(ELOGIND)" "yes"
34 ++PAMFLAGS += -DHAVE_ELOGIND=1
35 ++endif
36 ++
37 + ifeq "$(GNOME_KEYRING)" "yes"
38 + PAMFLAGS += -DHAVE_GNOME_KEYRING=1
39 + endif
40 +--- a/system-auth.in
41 ++++ b/system-auth.in
42 +@@ -39,3 +39,7 @@
43 + #if HAVE_SYSTEMD
44 + -session optional pam_systemd.so
45 + #endif
46 ++
47 ++#if HAVE_ELOGIND
48 ++-session optional pam_elogind.so
49 ++#endif
50
51 diff --git a/sys-auth/pambase/files/pambase-20150213-selinux-note.patch b/sys-auth/pambase/files/pambase-20150213-selinux-note.patch
52 index 1cb018f3450..0c44d108090 100644
53 --- a/sys-auth/pambase/files/pambase-20150213-selinux-note.patch
54 +++ b/sys-auth/pambase/files/pambase-20150213-selinux-note.patch
55 @@ -1,5 +1,5 @@
56 ---- system-login.in.orig 2015-04-17 16:58:02.247000000 +0200
57 -+++ system-login.in 2015-04-17 16:58:07.684000000 +0200
58 +--- a/system-login.in.orig 2015-04-17 16:58:02.247000000 +0200
59 ++++ b/system-login.in 2015-04-17 16:58:07.684000000 +0200
60 @@ -48,7 +48,7 @@
61 session optional pam_ck_connector.so nox11
62 #endif
63
64 diff --git a/sys-auth/pambase/metadata.xml b/sys-auth/pambase/metadata.xml
65 index 2d8727dbfa3..7cd2dea5abe 100644
66 --- a/sys-auth/pambase/metadata.xml
67 +++ b/sys-auth/pambase/metadata.xml
68 @@ -16,6 +16,9 @@
69 allows for console logins to make use of ConsoleKit
70 authorization.
71 </flag>
72 + <flag name="elogind">
73 + Use pam_elogind module to register user sessions with elogind.
74 + </flag>
75 <flag name="systemd">
76 Use pam_systemd module to register user sessions in the systemd
77 control group hierarchy.
78
79 diff --git a/sys-auth/pambase/pambase-20150213-r1.ebuild b/sys-auth/pambase/pambase-20150213-r1.ebuild
80 new file mode 100644
81 index 00000000000..9be8d621dbe
82 --- /dev/null
83 +++ b/sys-auth/pambase/pambase-20150213-r1.ebuild
84 @@ -0,0 +1,107 @@
85 +# Copyright 1999-2017 Gentoo Foundation
86 +# Distributed under the terms of the GNU General Public License v2
87 +
88 +EAPI=6
89 +
90 +DESCRIPTION="PAM base configuration files"
91 +HOMEPAGE="https://www.gentoo.org/proj/en/base/pam/"
92 +SRC_URI="https://dev.gentoo.org/~vapier/dist/${P}.tar.xz"
93 +
94 +LICENSE="GPL-2"
95 +SLOT="0"
96 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 -sparc-fbsd -x86-fbsd ~amd64-linux ~x86-linux"
97 +IUSE="consolekit cracklib debug elogind gnome-keyring minimal mktemp +nullok pam_krb5 pam_ssh passwdqc securetty selinux +sha512 systemd"
98 +
99 +RESTRICT="binchecks"
100 +
101 +MIN_PAM_REQ=1.1.3
102 +
103 +RDEPEND="
104 + || (
105 + >=sys-libs/pam-${MIN_PAM_REQ}
106 + ( sys-auth/openpam || ( sys-freebsd/freebsd-pam-modules sys-netbsd/netbsd-pam-modules ) )
107 + )
108 + consolekit? ( sys-auth/consolekit[pam] )
109 + cracklib? ( sys-libs/pam[cracklib] )
110 + elogind? ( sys-auth/elogind[pam] )
111 + gnome-keyring? ( gnome-base/gnome-keyring[pam] )
112 + mktemp? ( sys-auth/pam_mktemp )
113 + pam_krb5? (
114 + || ( >=sys-libs/pam-${MIN_PAM_REQ} sys-auth/openpam )
115 + sys-auth/pam_krb5
116 + )
117 + pam_ssh? ( sys-auth/pam_ssh )
118 + passwdqc? ( sys-auth/pam_passwdqc )
119 + selinux? ( sys-libs/pam[selinux] )
120 + sha512? ( >=sys-libs/pam-${MIN_PAM_REQ} )
121 + systemd? ( sys-apps/systemd[pam] )
122 +"
123 +DEPEND="
124 + app-arch/xz-utils
125 + app-portage/portage-utils
126 +"
127 +
128 +PATCHES=(
129 + "${FILESDIR}"/${P}-selinux-note.patch #540096
130 + "${FILESDIR}"/${P}-elogind.patch #599498
131 +)
132 +
133 +pkg_setup() {
134 + local stcnt=0
135 +
136 + use consolekit && stcnt=$((stcnt+1))
137 + use elogind && stcnt=$((stcnt+1))
138 + use systemd && stcnt=$((stcnt+1))
139 +
140 + if [[ ${stcnt} -gt 1 ]] ; then
141 + ewarn "You are enabling ${stcnt} session trackers at the same time."
142 + ewarn "This is not a recommended setup to have. Please consider enabling"
143 + ewarn "only one of USE=\"consolekit\", USE=\"elogind\" or USE=\"systemd\"."
144 + fi
145 +}
146 +
147 +src_compile() {
148 + local implementation linux_pam_version
149 + if has_version sys-libs/pam; then
150 + implementation=linux-pam
151 + local ver_str=$(qatom $(best_version sys-libs/pam) | cut -d ' ' -f 3)
152 + linux_pam_version=$(printf "0x%02x%02x%02x" ${ver_str//\./ })
153 + elif has_version sys-auth/openpam; then
154 + implementation=openpam
155 + else
156 + die "PAM implementation not identified"
157 + fi
158 +
159 + use_var() {
160 + local varname=$(echo "$1" | tr '[:lower:]' '[:upper:]')
161 + local usename=${2-$(echo "$1" | tr '[:upper:]' '[:lower:]')}
162 + local varvalue=$(usex ${usename})
163 + echo "${varname}=${varvalue}"
164 + }
165 +
166 + emake \
167 + GIT=true \
168 + $(use_var debug) \
169 + $(use_var cracklib) \
170 + $(use_var passwdqc) \
171 + $(use_var consolekit) \
172 + $(use_var elogind) \
173 + $(use_var systemd) \
174 + $(use_var GNOME_KEYRING gnome-keyring) \
175 + $(use_var selinux) \
176 + $(use_var nullok) \
177 + $(use_var mktemp) \
178 + $(use_var pam_ssh) \
179 + $(use_var securetty) \
180 + $(use_var sha512) \
181 + $(use_var KRB5 pam_krb5) \
182 + $(use_var minimal) \
183 + IMPLEMENTATION=${implementation} \
184 + LINUX_PAM_VERSION=${linux_pam_version}
185 +}
186 +
187 +src_test() { :; }
188 +
189 +src_install() {
190 + emake GIT=true DESTDIR="${ED}" install
191 +}