1 |
commit: 3f83c5cb2a9fda577ed3d43ddff0eb673a15a05c |
2 |
Author: Michael Palimaka <kensington <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Mar 16 06:25:51 2019 +0000 |
4 |
Commit: Michael Palimaka <kensington <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Mar 16 06:26:07 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3f83c5cb |
7 |
|
8 |
sys-auth/polkit: ensure systemd is built with policykit |
9 |
|
10 |
Closes: https://bugs.gentoo.org/680226 |
11 |
Package-Manager: Portage-2.3.62, Repoman-2.3.12 |
12 |
Signed-off-by: Michael Palimaka <kensington <AT> gentoo.org> |
13 |
|
14 |
sys-auth/polkit/polkit-0.115-r3.ebuild | 142 +++++++++++++++++++++++++++++++++ |
15 |
1 file changed, 142 insertions(+) |
16 |
|
17 |
diff --git a/sys-auth/polkit/polkit-0.115-r3.ebuild b/sys-auth/polkit/polkit-0.115-r3.ebuild |
18 |
new file mode 100644 |
19 |
index 00000000000..ab8043864f7 |
20 |
--- /dev/null |
21 |
+++ b/sys-auth/polkit/polkit-0.115-r3.ebuild |
22 |
@@ -0,0 +1,142 @@ |
23 |
+# Copyright 1999-2019 Gentoo Authors |
24 |
+# Distributed under the terms of the GNU General Public License v2 |
25 |
+ |
26 |
+EAPI=6 |
27 |
+ |
28 |
+inherit autotools pam pax-utils systemd user xdg-utils |
29 |
+ |
30 |
+DESCRIPTION="Policy framework for controlling privileges for system-wide services" |
31 |
+HOMEPAGE="https://www.freedesktop.org/wiki/Software/polkit" |
32 |
+SRC_URI="https://www.freedesktop.org/software/${PN}/releases/${P}.tar.gz" |
33 |
+ |
34 |
+LICENSE="LGPL-2" |
35 |
+SLOT="0" |
36 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" |
37 |
+IUSE="elogind examples gtk +introspection jit kde nls pam selinux systemd test" |
38 |
+ |
39 |
+REQUIRED_USE="?? ( elogind systemd )" |
40 |
+ |
41 |
+CDEPEND=" |
42 |
+ dev-lang/spidermonkey:52[-debug] |
43 |
+ dev-libs/glib:2 |
44 |
+ dev-libs/expat |
45 |
+ elogind? ( sys-auth/elogind ) |
46 |
+ introspection? ( dev-libs/gobject-introspection ) |
47 |
+ pam? ( |
48 |
+ sys-auth/pambase |
49 |
+ virtual/pam |
50 |
+ ) |
51 |
+ systemd? ( sys-apps/systemd:0=[policykit] ) |
52 |
+" |
53 |
+DEPEND="${CDEPEND} |
54 |
+ app-text/docbook-xml-dtd:4.1.2 |
55 |
+ app-text/docbook-xsl-stylesheets |
56 |
+ dev-libs/gobject-introspection-common |
57 |
+ dev-libs/libxslt |
58 |
+ dev-util/glib-utils |
59 |
+ dev-util/gtk-doc-am |
60 |
+ dev-util/intltool |
61 |
+ sys-devel/gettext |
62 |
+ virtual/pkgconfig |
63 |
+" |
64 |
+RDEPEND="${CDEPEND} |
65 |
+ selinux? ( sec-policy/selinux-policykit ) |
66 |
+" |
67 |
+PDEPEND=" |
68 |
+ gtk? ( || ( |
69 |
+ >=gnome-extra/polkit-gnome-0.105 |
70 |
+ >=lxde-base/lxsession-0.5.2 |
71 |
+ ) ) |
72 |
+ kde? ( kde-plasma/polkit-kde-agent ) |
73 |
+ !systemd? ( !elogind? ( sys-auth/consolekit[policykit] ) ) |
74 |
+" |
75 |
+ |
76 |
+DOCS=( docs/TODO HACKING NEWS README ) |
77 |
+ |
78 |
+PATCHES=( |
79 |
+ # bug 660880 |
80 |
+ "${FILESDIR}"/polkit-0.115-elogind.patch |
81 |
+ "${FILESDIR}"/CVE-2018-19788.patch |
82 |
+) |
83 |
+ |
84 |
+QA_MULTILIB_PATHS=" |
85 |
+ usr/lib/polkit-1/polkit-agent-helper-1 |
86 |
+ usr/lib/polkit-1/polkitd" |
87 |
+ |
88 |
+pkg_setup() { |
89 |
+ local u=polkitd |
90 |
+ local g=polkitd |
91 |
+ local h=/var/lib/polkit-1 |
92 |
+ |
93 |
+ enewgroup ${g} |
94 |
+ enewuser ${u} -1 -1 ${h} ${g} |
95 |
+ esethome ${u} ${h} |
96 |
+} |
97 |
+ |
98 |
+src_prepare() { |
99 |
+ default |
100 |
+ |
101 |
+ sed -i -e 's|unix-group:wheel|unix-user:0|' src/polkitbackend/*-default.rules || die #401513 |
102 |
+ |
103 |
+ # Workaround upstream hack around standard gtk-doc behavior, bug #552170 |
104 |
+ sed -i -e 's/@ENABLE_GTK_DOC_TRUE@\(TARGET_DIR\)/\1/' \ |
105 |
+ -e '/install-data-local:/,/uninstall-local:/ s/@ENABLE_GTK_DOC_TRUE@//' \ |
106 |
+ -e 's/@ENABLE_GTK_DOC_FALSE@install-data-local://' \ |
107 |
+ docs/polkit/Makefile.in || die |
108 |
+ |
109 |
+ # disable broken test - bug #624022 |
110 |
+ sed -i -e "/^SUBDIRS/s/polkitbackend//" test/Makefile.am || die |
111 |
+ |
112 |
+ # Fix cross-building, bug #590764, elogind patch, bug #598615 |
113 |
+ eautoreconf |
114 |
+} |
115 |
+ |
116 |
+src_configure() { |
117 |
+ xdg_environment_reset |
118 |
+ |
119 |
+ local myeconfargs=( |
120 |
+ --localstatedir="${EPREFIX}"/var |
121 |
+ --disable-static |
122 |
+ --enable-man-pages |
123 |
+ --disable-gtk-doc |
124 |
+ --disable-examples |
125 |
+ $(use_enable elogind libelogind) |
126 |
+ $(use_enable introspection) |
127 |
+ $(use_enable nls) |
128 |
+ $(usex pam "--with-pam-module-dir=$(getpam_mod_dir)" '') |
129 |
+ --with-authfw=$(usex pam pam shadow) |
130 |
+ $(use_enable systemd libsystemd-login) |
131 |
+ --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" |
132 |
+ $(use_enable test) |
133 |
+ --with-os-type=gentoo |
134 |
+ ) |
135 |
+ econf "${myeconfargs[@]}" |
136 |
+} |
137 |
+ |
138 |
+src_compile() { |
139 |
+ default |
140 |
+ |
141 |
+ # Required for polkitd on hardened/PaX due to spidermonkey's JIT |
142 |
+ pax-mark mr src/polkitbackend/.libs/polkitd test/polkitbackend/.libs/polkitbackendjsauthoritytest |
143 |
+} |
144 |
+ |
145 |
+src_install() { |
146 |
+ default |
147 |
+ |
148 |
+ fowners -R polkitd:root /{etc,usr/share}/polkit-1/rules.d |
149 |
+ |
150 |
+ diropts -m0700 -o polkitd -g polkitd |
151 |
+ keepdir /var/lib/polkit-1 |
152 |
+ |
153 |
+ if use examples; then |
154 |
+ insinto /usr/share/doc/${PF}/examples |
155 |
+ doins src/examples/{*.c,*.policy*} |
156 |
+ fi |
157 |
+ |
158 |
+ find "${ED}" -name '*.la' -delete || die |
159 |
+} |
160 |
+ |
161 |
+pkg_postinst() { |
162 |
+ chown -R polkitd:root "${EROOT}"/{etc,usr/share}/polkit-1/rules.d |
163 |
+ chown -R polkitd:polkitd "${EROOT}"/var/lib/polkit-1 |
164 |
+} |