Gentoo Archives: gentoo-commits

From: Michael Palimaka <kensington@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/kde:master commit in: kde-plasma/kwallet-pam/
Date: Tue, 01 Mar 2016 11:52:18
Message-Id: 1456833121.db8ab7601a5f2dfbb20156cee12148bc79d75893.kensington@gentoo
1 commit: db8ab7601a5f2dfbb20156cee12148bc79d75893
2 Author: Andreas Sturmlechner <andreas.sturmlechner <AT> gmail <DOT> com>
3 AuthorDate: Sun Feb 28 02:00:50 2016 +0000
4 Commit: Michael Palimaka <kensington <AT> gentoo <DOT> org>
5 CommitDate: Tue Mar 1 11:52:01 2016 +0000
6 URL: https://gitweb.gentoo.org/proj/kde.git/commit/?id=db8ab760
7
8 kde-plasma/kwallet-pam: Add pkg_postinst instructions, ECM to DEPENDs
9
10 Package-Manager: portage-2.2.27
11
12 .../kwallet-pam/kwallet-pam-5.5.49.9999.ebuild | 25 +++++++++++++++++
13 kde-plasma/kwallet-pam/kwallet-pam-9999.ebuild | 32 ++++++++++++++++++++--
14 2 files changed, 55 insertions(+), 2 deletions(-)
15
16 diff --git a/kde-plasma/kwallet-pam/kwallet-pam-5.5.49.9999.ebuild b/kde-plasma/kwallet-pam/kwallet-pam-5.5.49.9999.ebuild
17 index 6b531b3..8925848 100644
18 --- a/kde-plasma/kwallet-pam/kwallet-pam-5.5.49.9999.ebuild
19 +++ b/kde-plasma/kwallet-pam/kwallet-pam-5.5.49.9999.ebuild
20 @@ -27,3 +27,28 @@ src_configure() {
21
22 kde5_src_configure
23 }
24 +
25 +pkg_postinst() {
26 + check_dm() {
27 + if [[ -e "${ROOT}${2}" ]] && \
28 + [[ -n $(egrep "auth\s+optional\s+pam_kwallet5.so" "${ROOT}${2}") ]] && \
29 + [[ -n $(egrep "session\s+optional\s+pam_kwallet5.so" "${ROOT}${2}") ]]; then
30 + elog " ${1} - ${2} ...GOOD"
31 + else
32 + ewarn " ${1} - ${2} ...BAD"
33 + fi
34 + }
35 + elog
36 + elog "This package enables auto-unlocking of kde-frameworks/kwallet:5."
37 + elog "List of things to make it work:"
38 + elog "1. Use same password for login and kwallet"
39 + elog "2. A display manager with support for PAM"
40 + elog "3.a Have the following lines in the display manager's pam.d file:"
41 + elog " -auth optional pam_kwallet5.so"
42 + elog " -session optional pam_kwallet5.so auto_start"
43 + elog "3.b Checking installed DMs..."
44 + has_version "x11-misc/sddm" && check_dm "SDDM" "/etc/pam.d/sddm"
45 + has_version "x11-misc/lightdm" && check_dm "LightDM" "/etc/pam.d/lightdm"
46 + has_version "kde-base/kdm" && check_dm "KDM" "/etc/pam.d/kde"
47 + elog
48 +}
49
50 diff --git a/kde-plasma/kwallet-pam/kwallet-pam-9999.ebuild b/kde-plasma/kwallet-pam/kwallet-pam-9999.ebuild
51 index 6b531b3..8b857d9 100644
52 --- a/kde-plasma/kwallet-pam/kwallet-pam-9999.ebuild
53 +++ b/kde-plasma/kwallet-pam/kwallet-pam-9999.ebuild
54 @@ -12,11 +12,14 @@ LICENSE="LGPL-2.1"
55 KEYWORDS=""
56 IUSE=""
57
58 -DEPEND="
59 +COMMON_DEPEND="
60 dev-libs/libgcrypt:0=
61 virtual/pam
62 "
63 -RDEPEND="${DEPEND}
64 +DEPEND="${COMMON_DEPEND}
65 + $(add_frameworks_dep extra-cmake-modules)
66 +"
67 +RDEPEND="${COMMON_DEPEND}
68 net-misc/socat
69 "
70
71 @@ -27,3 +30,28 @@ src_configure() {
72
73 kde5_src_configure
74 }
75 +
76 +pkg_postinst() {
77 + check_dm() {
78 + if [[ -e "${ROOT}${2}" ]] && \
79 + [[ -n $(egrep "auth\s+optional\s+pam_kwallet5.so" "${ROOT}${2}") ]] && \
80 + [[ -n $(egrep "session\s+optional\s+pam_kwallet5.so" "${ROOT}${2}") ]]; then
81 + elog " ${1} - ${2} ...GOOD"
82 + else
83 + ewarn " ${1} - ${2} ...BAD"
84 + fi
85 + }
86 + elog
87 + elog "This package enables auto-unlocking of kde-frameworks/kwallet:5."
88 + elog "List of things to make it work:"
89 + elog "1. Use same password for login and kwallet"
90 + elog "2. A display manager with support for PAM"
91 + elog "3.a Have the following lines in the display manager's pam.d file:"
92 + elog " -auth optional pam_kwallet5.so"
93 + elog " -session optional pam_kwallet5.so auto_start"
94 + elog "3.b Checking installed DMs..."
95 + has_version "x11-misc/sddm" && check_dm "SDDM" "/etc/pam.d/sddm"
96 + has_version "x11-misc/lightdm" && check_dm "LightDM" "/etc/pam.d/lightdm"
97 + has_version "kde-base/kdm" && check_dm "KDM" "/etc/pam.d/kde"
98 + elog
99 +}