Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: x11-misc/lightdm/files/, x11-misc/lightdm/
Date: Thu, 27 Sep 2018 08:11:55
Message-Id: 1538034073.39b530b86790bb5d4a909118be9457be22cf7ad3.polynomial-c@gentoo
1 commit: 39b530b86790bb5d4a909118be9457be22cf7ad3
2 Author: Alexander Tsoy <alexander <AT> tsoy <DOT> me>
3 AuthorDate: Tue Sep 25 16:09:46 2018 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Thu Sep 27 07:41:13 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=39b530b8
7
8 x11-misc/lightdm: use upstream lightdm-greeter pam config
9
10 This pam configuration file is only used by the greeter process.
11 Therefore is should't include system-local-login.
12
13 Closes: https://bugs.gentoo.org/600216
14 Package-Manager: Portage-2.3.49, Repoman-2.3.10
15 Signed-off-by: Alexander Tsoy <alexander <AT> tsoy.me>
16 Closes: https://github.com/gentoo/gentoo/pull/9973
17
18 .../lightdm/files/lightdm-1.28.0-pam-greeter.patch | 10 ++
19 x11-misc/lightdm/lightdm-1.28.0-r1.ebuild | 144 +++++++++++++++++++++
20 2 files changed, 154 insertions(+)
21
22 diff --git a/x11-misc/lightdm/files/lightdm-1.28.0-pam-greeter.patch b/x11-misc/lightdm/files/lightdm-1.28.0-pam-greeter.patch
23 new file mode 100644
24 index 00000000000..89b47798a79
25 --- /dev/null
26 +++ b/x11-misc/lightdm/files/lightdm-1.28.0-pam-greeter.patch
27 @@ -0,0 +1,10 @@
28 +--- a/data/pam/lightdm-greeter
29 ++++ b/data/pam/lightdm-greeter
30 +@@ -14,4 +14,6 @@ password required pam_deny.so
31 +
32 + # Setup session
33 + session required pam_unix.so
34 +-session optional pam_systemd.so
35 ++-session optional pam_systemd.so
36 ++-session optional pam_elogind.so
37 ++-session optional pam_ck_connector.so nox11
38
39 diff --git a/x11-misc/lightdm/lightdm-1.28.0-r1.ebuild b/x11-misc/lightdm/lightdm-1.28.0-r1.ebuild
40 new file mode 100644
41 index 00000000000..748ee4f83bb
42 --- /dev/null
43 +++ b/x11-misc/lightdm/lightdm-1.28.0-r1.ebuild
44 @@ -0,0 +1,144 @@
45 +# Copyright 1999-2018 Gentoo Foundation
46 +# Distributed under the terms of the GNU General Public License v2
47 +
48 +EAPI=6
49 +
50 +inherit autotools flag-o-matic pam qmake-utils readme.gentoo-r1 systemd vala xdg-utils
51 +
52 +DESCRIPTION="A lightweight display manager"
53 +HOMEPAGE="https://www.freedesktop.org/wiki/Software/LightDM"
54 +SRC_URI="https://github.com/CanonicalLtd/lightdm/releases/download/${PV}/${P}.tar.xz
55 + mirror://gentoo/introspection-20110205.m4.tar.bz2"
56 +
57 +LICENSE="GPL-3 LGPL-3"
58 +SLOT="0"
59 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
60 +IUSE="audit +gnome +gtk +introspection qt5 vala"
61 +
62 +COMMON_DEPEND="
63 + >=dev-libs/glib-2.44.0:2
64 + dev-libs/libxml2
65 + virtual/pam
66 + x11-libs/libX11
67 + >=x11-libs/libxklavier-5
68 + audit? ( sys-process/audit )
69 + gnome? ( sys-apps/accountsservice )
70 + introspection? ( >=dev-libs/gobject-introspection-1 )
71 + qt5? (
72 + dev-qt/qtcore:5
73 + dev-qt/qtdbus:5
74 + dev-qt/qtgui:5
75 + )
76 +"
77 +RDEPEND="${COMMON_DEPEND}
78 + >=sys-auth/pambase-20101024-r2"
79 +DEPEND="${COMMON_DEPEND}
80 + dev-util/gtk-doc-am
81 + dev-util/intltool
82 + sys-devel/gettext
83 + virtual/pkgconfig
84 + gnome? ( gnome-base/gnome-common )
85 + vala? ( $(vala_depend) )
86 +"
87 +PDEPEND="gtk? ( x11-misc/lightdm-gtk-greeter )"
88 +
89 +DOCS=( NEWS )
90 +RESTRICT="test"
91 +
92 +PATCHES=( "${FILESDIR}"/${PN}-1.28.0-pam-greeter.patch )
93 +
94 +src_prepare() {
95 + xdg_environment_reset
96 +
97 + sed -i -e 's:getgroups:lightdm_&:' tests/src/libsystem.c || die #412369
98 + sed -i -e '/minimum-uid/s:500:1000:' data/users.conf || die
99 +
100 + einfo "Fixing the session-wrapper variable in lightdm.conf"
101 + sed -i -e \
102 + "/^#session-wrapper/s@^.*@session-wrapper=/etc/${PN}/Xsession@" \
103 + data/lightdm.conf || die "Failed to fix lightdm.conf"
104 +
105 + # use correct version of qmake. bug #566950
106 + sed \
107 + -e "/AC_CHECK_TOOLS(MOC5/a AC_SUBST(MOC5,$(qt5_get_bindir)/moc)" \
108 + -i configure.ac || die
109 +
110 + default
111 +
112 + # Remove bogus Makefile statement. This needs to go upstream
113 + sed -i /"@YELP_HELP_RULES@"/d help/Makefile.am || die
114 + if has_version dev-libs/gobject-introspection; then
115 + eautoreconf
116 + else
117 + AT_M4DIR=${WORKDIR} eautoreconf
118 + fi
119 +
120 + use vala && vala_src_prepare
121 +}
122 +
123 +src_configure() {
124 + # Set default values if global vars unset
125 + local _greeter _session _user
126 + _greeter=${LIGHTDM_GREETER:=lightdm-gtk-greeter}
127 + _session=${LIGHTDM_SESSION:=gnome}
128 + _user=${LIGHTDM_USER:=root}
129 + # Let user know how lightdm is configured
130 + einfo "Gentoo configuration"
131 + einfo "Default greeter: ${_greeter}"
132 + einfo "Default session: ${_session}"
133 + einfo "Greeter user: ${_user}"
134 +
135 + use qt5 && append-cxxflags -std=c++11
136 +
137 + # also disable tests because libsystem.c does not build. Tests are
138 + # restricted so it does not matter anyway.
139 + local myeconfargs=(
140 + --localstatedir=/var
141 + --disable-static
142 + --disable-tests
143 + $(use_enable audit libaudit)
144 + $(use_enable introspection)
145 + --disable-liblightdm-qt
146 + $(use_enable qt5 liblightdm-qt5)
147 + $(use_enable vala)
148 + --with-user-session=${_session}
149 + --with-greeter-session=${_greeter}
150 + --with-greeter-user=${_user}
151 + )
152 + econf "${myeconfargs[@]}"
153 +}
154 +
155 +src_install() {
156 + default
157 +
158 + # Delete apparmor profiles because they only work with Ubuntu's
159 + # apparmor package. Bug #494426
160 + if [[ -d ${ED%/}/etc/apparmor.d ]]; then
161 + rm -r "${ED%/}/etc/apparmor.d" || die \
162 + "Failed to remove apparmor profiles"
163 + fi
164 +
165 + insinto /etc/${PN}
166 + doins data/{${PN},keys}.conf
167 + doins "${FILESDIR}"/Xsession
168 + fperms +x /etc/${PN}/Xsession
169 + # /var/lib/lightdm-data could be useful. Bug #522228
170 + dodir /var/lib/lightdm-data
171 +
172 + find "${ED}" \( -name '*.a' -o -name "*.la" \) -delete || die
173 + rm -rf "${ED%/}"/etc/init
174 +
175 + # Remove existing pam file. We will build a new one. Bug #524792
176 + rm -rf "${ED%/}"/etc/pam.d/${PN}
177 + pamd_mimic system-local-login ${PN} auth account password session #372229
178 + dopamd "${FILESDIR}"/${PN}-autologin #390863, #423163
179 +
180 + readme.gentoo_create_doc
181 +
182 + systemd_dounit "${FILESDIR}/${PN}.service"
183 + keepdir /var/lib/${PN}-data
184 +}
185 +
186 +pkg_postinst() {
187 + systemd_reenable "${PN}.service"
188 +}