diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /sys-auth/polkit |
reinit the tree, so we can have metadata
Diffstat (limited to 'sys-auth/polkit')
-rw-r--r-- | sys-auth/polkit/Manifest | 7 | ||||
-rw-r--r-- | sys-auth/polkit/files/polkit-0.113-elogind.patch | 178 | ||||
-rw-r--r-- | sys-auth/polkit/metadata.xml | 11 | ||||
-rw-r--r-- | sys-auth/polkit/polkit-0.113-r4.ebuild | 136 | ||||
-rw-r--r-- | sys-auth/polkit/polkit-0.113.ebuild | 114 |
5 files changed, 446 insertions, 0 deletions
diff --git a/sys-auth/polkit/Manifest b/sys-auth/polkit/Manifest new file mode 100644 index 000000000000..cbd8c3948abc --- /dev/null +++ b/sys-auth/polkit/Manifest @@ -0,0 +1,7 @@ +AUX polkit-0.113-elogind.patch 6149 SHA256 a90d18c58aa8f1a034cf84a209e6648b1d19bbf7b1d72fc5e0e0f24a5a0f6a7e SHA512 9a3e928d77c023c3f895f7fec7893f0355729808c4ee3bcd5419a7e408b613faefcff6d43f87cdab94b3fa15b7eaddc9ce40cf9b7b0954624360489c4d2c3b52 WHIRLPOOL 4bc03f43344955ab5c0ef540e51eb257ab6cf936e8bb93f98d288877bd1de6d100b429d79017a85f6b57c9c87bea0339b0deaf310e24f59d577e358fa0b05456 +DIST polkit-0.113.tar.gz 1448865 SHA256 e1c095093c654951f78f8618d427faf91cf62abdefed98de40ff65eca6413c81 SHA512 ab177c89a20eeb2978ddbe28afb205d3619f9c5defe833eb68a85e71a0f2c905367f1295cbbfb85da5eafdd661bce474d5d84aca9195cd425a18c9b4170eb5f9 WHIRLPOOL 106db7e6085a4ce49da44929138671eff2fd6007c80533518abe2d91ede9242b1e3cd0a1801190eeac5d4d5c1e978a30a18e47a6b604497b38853fa60c935a81 +EBUILD polkit-0.113-r4.ebuild 3459 SHA256 d9d7175a51dc984fed94a56a3bf8d9454c09e0d3ff6a8e5672d36d76f582376e SHA512 523a1e8114ff118b9fc7765d7dea921e29ea076652136cb830dd0ea0276413f68e41806a2d70adb5dd3fd4145d013576b26ba1451ee2a9c0e00436089e75bd6a WHIRLPOOL 5d206a2febd679432fcac23ee04dd50a9921fd439753740b190dd89de9befc12f019fe420d16ba156469cf3208b95ca50b712eb2802e23f29faecee998c42ea2 +EBUILD polkit-0.113.ebuild 2716 SHA256 ad69a9173248ffed504fb2b5936b8c6b3f14f20fe64d1c6e794c7f17ec76a948 SHA512 06cee807ee6cae565146fd1f8d4676cad78c8bdecae80ddc9f9a4c7d928c6dad31bef1361c3c2a9dece8490a37989e5ae8e9fb2e3df4936919a7235521633cff WHIRLPOOL da833ab00f0bb7c71879befd6d05ef4fd488dabedcac4f0b2abdc447fc83f24830412e99cdd1f8283602bbc83cd26dd9ec60b091f9d5d85580962501b47dbbca +MISC ChangeLog 6131 SHA256 94b5afe5b42ad89d098b0b4f3a2a30186fd92a4677323a7d6f956167e1013266 SHA512 6fefd5506d593b9605377f91bceea62b15bce96d37bb9b7b1b5d94c68eb5f6420adaacfa8e561d05a750d77e0930ef0cf99577604edd7f3c420a80cb51f6397b WHIRLPOOL fe7d55ce7e8c7e10ff08bb71cfa032e766f5af95d6a63f9bcafe8420ffd9d5840ba95d41f500995a8dd476eb3493ded9b274f4de4f99c0c1a231d0bc23f3794e +MISC ChangeLog-2015 27408 SHA256 b7a63f718f2dbfcc3d17c9146eea2cd830df2d329d1c4406fd7a4b4dabfff236 SHA512 6d6e2b71ef194f07f61c4da2587b22c0b55ee60cf5f8c6e0042bd75d59ca7cf9222b7a4d5018cf8fb789719d6ba3eae3a4a5d6e620e324cd6789bc2ff2fe5cf4 WHIRLPOOL 4a01bbc08ee0ecb7a3502be6c857caa750d111437e4b91cce0ca36b708f7cda0ab293b32fc96fa7d5c35fd46adda75dff44c58d96ccf7103c66705e21bd655bf +MISC metadata.xml 493 SHA256 868f4f8f3c8593e0f1441e5e36944b3386cda4eac8d0986ab3b390d53106b71f SHA512 9c7b199d1a3b1193beb4d01e52d5e90d81821aa6df6785482da7ee37c0ca777c12095f160bc997c77d0089429c2e338cf75d0a46836416736178cd661ffa80f5 WHIRLPOOL 8ef937efdf5e1c41e16cd908fe3c13b05f33751c5c5a1d4eeab833641db31fc0808ec7bfd6b364a5db55812108b78346da03bd75baf50adaba24ec7f1920d60f diff --git a/sys-auth/polkit/files/polkit-0.113-elogind.patch b/sys-auth/polkit/files/polkit-0.113-elogind.patch new file mode 100644 index 000000000000..c822e00d24a7 --- /dev/null +++ b/sys-auth/polkit/files/polkit-0.113-elogind.patch @@ -0,0 +1,178 @@ +--- a/configure.ac 2016-11-03 20:16:02.842071344 +0100 ++++ b/configure.ac 2016-11-03 20:15:34.612071850 +0100 +@@ -183,11 +183,12 @@ + + AM_CONDITIONAL(BUILD_TEST, [test "x$enable_test" = "xyes"]) + +-dnl --------------------------------------------------------------------------- +-dnl - Select wether to use libsystemd-login or ConsoleKit for session tracking +-dnl --------------------------------------------------------------------------- ++dnl ----------------------------------------------------------------------------------- ++dnl - Select wether to use libsystemd-login, elogind or ConsoleKit for session tracking ++dnl ----------------------------------------------------------------------------------- + + have_libsystemd=no ++have_elogind=no + SESSION_TRACKING=ConsoleKit + + AC_ARG_ENABLE([libsystemd-login], +@@ -220,6 +221,29 @@ + fi + fi + fi ++ ++AC_ARG_ENABLE([libelogind], ++ [AS_HELP_STRING([--enable-libelogind[=@<:@auto/yes/no@:>@]], [Use libelogind (auto/yes/no)])], ++ [enable_libelogind=$enableval], ++ [enable_libelogind=auto]) ++if test "$enable_libelogind" != "no"; then ++ PKG_CHECK_MODULES([LIBELOGIND], ++ [libelogind], ++ [have_libelogind=yes], ++ [have_libelogind=no]) ++ if test "$have_libelogind" = "yes"; then ++ SESSION_TRACKING=libelogind ++ AC_DEFINE([HAVE_LIBELOGIND], 1, [Define to 1 if libelogind is available]) ++ save_LIBS=$LIBS ++ LIBS=$LIBELOGIND_LIBS ++ AC_CHECK_FUNCS(sd_uid_get_display) ++ LIBS=$save_LIBS ++ else ++ if test "$enable_libelogind" = "yes"; then ++ AC_MSG_ERROR([libelogind support requested but libelogind not found]) ++ fi ++ fi ++fi + + AS_IF([test "x$cross_compiling" != "xyes" ], [ + AS_IF([test "$have_libsystemd" = "yes"], [ +@@ -245,6 +245,10 @@ + AC_SUBST(LIBSYSTEMD_LIBS) + AM_CONDITIONAL(HAVE_LIBSYSTEMD, [test "$have_libsystemd" = "yes"], [Using libsystemd]) + ++AC_SUBST(LIBELOGIND_CFLAGS) ++AC_SUBST(LIBELOGIND_LIBS) ++AM_CONDITIONAL(HAVE_LIBELOGIND, [test "$have_libelogind" = "yes"], [Using libelogind]) ++ + dnl --------------------------------------------------------------------------- + dnl - systemd unit / service files + dnl --------------------------------------------------------------------------- +--- a/src/polkitbackend/Makefile.am 2016-11-04 04:40:46.930116006 +0100 ++++ b/src/polkitbackend/Makefile.am 2016-11-04 04:42:14.586114436 +0100 +@@ -42,21 +42,28 @@ + libpolkit_backend_1_la_SOURCES += \ + polkitbackendsessionmonitor.h polkitbackendsessionmonitor-systemd.c + else ++if HAVE_LIBELOGIND ++libpolkit_backend_1_la_SOURCES += \ ++ polkitbackendsessionmonitor.h polkitbackendsessionmonitor-systemd.c ++else + libpolkit_backend_1_la_SOURCES += \ + polkitbackendsessionmonitor.h polkitbackendsessionmonitor.c + endif ++endif + + libpolkit_backend_1_la_CFLAGS = \ + -D_POLKIT_COMPILATION \ + -D_POLKIT_BACKEND_COMPILATION \ + $(GLIB_CFLAGS) \ + $(LIBSYSTEMD_CFLAGS) \ ++ $(LIBELOGIND_CFLAGS) \ + $(LIBJS_CFLAGS) \ + $(NULL) + + libpolkit_backend_1_la_LIBADD = \ + $(GLIB_LIBS) \ + $(LIBSYSTEMD_LIBS) \ ++ $(LIBELOGIND_LIBS) \ + $(top_builddir)/src/polkit/libpolkit-gobject-1.la \ + $(EXPAT_LIBS) \ + $(LIBJS_LIBS) \ +--- a/src/polkit/Makefile.am 2016-11-04 04:41:02.756115723 +0100 ++++ b/src/polkit/Makefile.am 2016-11-04 04:42:49.428113812 +0100 +@@ -85,19 +85,26 @@ + libpolkit_gobject_1_la_SOURCES += \ + polkitunixsession-systemd.c polkitunixsession.h + else ++if HAVE_LIBELOGIND ++libpolkit_gobject_1_la_SOURCES += \ ++ polkitunixsession-systemd.c polkitunixsession.h ++else + libpolkit_gobject_1_la_SOURCES += \ + polkitunixsession.c polkitunixsession.h + endif ++endif + + libpolkit_gobject_1_la_CFLAGS = \ + -D_POLKIT_COMPILATION \ + $(GLIB_CFLAGS) \ + $(LIBSYSTEMD_CFLAGS) \ ++ $(LIBELOGIND_CFLAGS) \ + $(NULL) + + libpolkit_gobject_1_la_LIBADD = \ + $(GLIB_LIBS) \ + $(LIBSYSTEMD_LIBS) \ ++ $(LIBELOGIND_LIBS) \ + $(NULL) + + libpolkit_gobject_1_la_LDFLAGS = -export-symbols-regex '(^polkit_.*)' +--- a/src/polkitbackend/polkitbackendjsauthority.c 2017-06-27 09:22:03.375841040 +0200 ++++ b/src/polkitbackend/polkitbackendjsauthority.c 2017-06-27 09:25:33.815845141 +0200 +@@ -39,6 +39,10 @@ + #include <systemd/sd-login.h> + #endif /* HAVE_LIBSYSTEMD */ + ++#ifdef HAVE_LIBELOGIND ++#include <elogind/sd-login.h> ++#endif /* HAVE_LIBELOGIND */ ++ + #include <jsapi.h> + + #include "initjs.h" /* init.js */ +@@ -793,7 +797,7 @@ + g_assert_not_reached (); + } + +-#ifdef HAVE_LIBSYSTEMD ++#if defined(HAVE_LIBSYSTEMD) || defined(HAVE_LIBELOGIND) + if (sd_pid_get_session (pid, &session_str) == 0) + { + if (sd_session_get_seat (session_str, &seat_str) == 0) +@@ -801,7 +805,7 @@ + /* do nothing */ + } + } +-#endif /* HAVE_LIBSYSTEMD */ ++#endif /* HAVE_LIBSYSTEMD or HAVE_LIBELOGIND */ + + g_assert (POLKIT_IS_UNIX_USER (user_for_subject)); + uid = polkit_unix_user_get_uid (POLKIT_UNIX_USER (user_for_subject)); +--- a/src/polkitbackend/polkitbackendsessionmonitor-systemd.c 2016-11-04 04:44:29.650112018 +0100 ++++ b/src/polkitbackend/polkitbackendsessionmonitor-systemd.c 2016-11-04 04:46:52.718109455 +0100 +@@ -25,7 +25,11 @@ + #include <grp.h> + #include <string.h> + #include <glib/gstdio.h> ++#ifdef HAVE_LIBSYSTEMD + #include <systemd/sd-login.h> ++#else ++#include <elogind/sd-login.h> ++#endif /* HAVE_LIBSYSTEMD versus HAVE_LIBELOGIND */ + #include <stdlib.h> + + #include <polkit/polkit.h> +--- a/src/polkit/polkitunixsession-systemd.c 2016-11-04 04:44:29.651112017 +0100 ++++ b/src/polkit/polkitunixsession-systemd.c 2016-11-04 04:47:07.160109197 +0100 +@@ -30,7 +30,11 @@ + #include "polkiterror.h" + #include "polkitprivate.h" + ++#ifdef HAVE_LIBSYSTEMD + #include <systemd/sd-login.h> ++#else ++#include <elogind/sd-login.h> ++#endif /* HAVE_LIBSYSTEMD versus HAVE_ELOGIND */ + + /** + * SECTION:polkitunixsession diff --git a/sys-auth/polkit/metadata.xml b/sys-auth/polkit/metadata.xml new file mode 100644 index 000000000000..348a3151d8b6 --- /dev/null +++ b/sys-auth/polkit/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>freedesktop-bugs@gentoo.org</email> + </maintainer> + <use> + <flag name="elogind">Use <pkg>sys-auth/elogind</pkg> instead of <pkg>sys-auth/consolekit</pkg> for session tracking</flag> + <flag name="systemd">Use <pkg>sys-apps/systemd</pkg> instead of <pkg>sys-auth/consolekit</pkg> for session tracking</flag> + </use> +</pkgmetadata> diff --git a/sys-auth/polkit/polkit-0.113-r4.ebuild b/sys-auth/polkit/polkit-0.113-r4.ebuild new file mode 100644 index 000000000000..ec8a409d3431 --- /dev/null +++ b/sys-auth/polkit/polkit-0.113-r4.ebuild @@ -0,0 +1,136 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit autotools pam pax-utils systemd user xdg-utils + +DESCRIPTION="Policy framework for controlling privileges for system-wide services" +HOMEPAGE="https://www.freedesktop.org/wiki/Software/polkit" +SRC_URI="https://www.freedesktop.org/software/${PN}/releases/${P}.tar.gz" + +LICENSE="LGPL-2" +SLOT="0" +KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc ~x86" +IUSE="elogind examples gtk +introspection jit kde nls pam selinux systemd test" + +REQUIRED_USE="?? ( elogind systemd )" + +CDEPEND=" + dev-lang/spidermonkey:0/mozjs185[-debug] + dev-libs/glib:2 + dev-libs/expat + elogind? ( sys-auth/elogind ) + introspection? ( dev-libs/gobject-introspection ) + pam? ( + sys-auth/pambase + virtual/pam + ) + systemd? ( sys-apps/systemd:0= ) +" +DEPEND="${CDEPEND} + app-text/docbook-xml-dtd:4.1.2 + app-text/docbook-xsl-stylesheets + dev-libs/gobject-introspection-common + dev-libs/libxslt + dev-util/gtk-doc-am + dev-util/intltool + sys-devel/gettext + virtual/pkgconfig +" +RDEPEND="${CDEPEND} + selinux? ( sec-policy/selinux-policykit ) +" +PDEPEND=" + gtk? ( || ( + >=gnome-extra/polkit-gnome-0.105 + >=lxde-base/lxsession-0.5.2 + ) ) + kde? ( kde-plasma/polkit-kde-agent ) + !systemd? ( !elogind? ( sys-auth/consolekit[policykit] ) ) +" + +DOCS=( docs/TODO HACKING NEWS README ) + +PATCHES=( "${FILESDIR}"/${P}-elogind.patch ) + +QA_MULTILIB_PATHS=" + usr/lib/polkit-1/polkit-agent-helper-1 + usr/lib/polkit-1/polkitd" + +pkg_setup() { + local u=polkitd + local g=polkitd + local h=/var/lib/polkit-1 + + enewgroup ${g} + enewuser ${u} -1 -1 ${h} ${g} + esethome ${u} ${h} +} + +src_prepare() { + default + + sed -i -e 's|unix-group:wheel|unix-user:0|' src/polkitbackend/*-default.rules || die #401513 + + # Workaround upstream hack around standard gtk-doc behavior, bug #552170 + sed -i -e 's/@ENABLE_GTK_DOC_TRUE@\(TARGET_DIR\)/\1/' \ + -e '/install-data-local:/,/uninstall-local:/ s/@ENABLE_GTK_DOC_TRUE@//' \ + -e 's/@ENABLE_GTK_DOC_FALSE@install-data-local://' \ + docs/polkit/Makefile.in || die + + # disable broken test - bug #624022 + sed -i -e "/^SUBDIRS/s/polkitbackend//" test/Makefile.am || die + + # Fix cross-building, bug #590764, elogind patch, bug #598615 + eautoreconf +} + +src_configure() { + xdg_environment_reset + + econf \ + --localstatedir="${EPREFIX}"/var \ + --disable-static \ + --enable-man-pages \ + --disable-gtk-doc \ + --disable-examples \ + --with-mozjs=mozjs185 \ + $(use_enable elogind libelogind) \ + $(use_enable introspection) \ + $(use_enable nls) \ + $(use pam && echo --with-pam-module-dir="$(getpam_mod_dir)") \ + --with-authfw=$(usex pam pam shadow) \ + $(use_enable systemd libsystemd-login) \ + --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \ + $(use_enable test) \ + --with-os-type=gentoo +} + +src_compile() { + default + + # Required for polkitd on hardened/PaX due to spidermonkey's JIT + pax-mark mr src/polkitbackend/.libs/polkitd test/polkitbackend/.libs/polkitbackendjsauthoritytest +} + +src_install() { + default + + fowners -R polkitd:root /{etc,usr/share}/polkit-1/rules.d + + diropts -m0700 -o polkitd -g polkitd + keepdir /var/lib/polkit-1 + + if use examples; then + insinto /usr/share/doc/${PF}/examples + doins src/examples/{*.c,*.policy*} + fi + + find "${D}" -name '*.la' -delete || die +} + +pkg_postinst() { + chown -R polkitd:root "${EROOT}"/{etc,usr/share}/polkit-1/rules.d + chown -R polkitd:polkitd "${EROOT}"/var/lib/polkit-1 +} diff --git a/sys-auth/polkit/polkit-0.113.ebuild b/sys-auth/polkit/polkit-0.113.ebuild new file mode 100644 index 000000000000..694d84a2712b --- /dev/null +++ b/sys-auth/polkit/polkit-0.113.ebuild @@ -0,0 +1,114 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +inherit eutils multilib pam pax-utils systemd user + +DESCRIPTION="Policy framework for controlling privileges for system-wide services" +HOMEPAGE="https://www.freedesktop.org/wiki/Software/polkit" +SRC_URI="https://www.freedesktop.org/software/${PN}/releases/${P}.tar.gz" + +LICENSE="LGPL-2" +SLOT="0" +KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86" +IUSE="examples gtk +introspection jit kde nls pam selinux systemd test" + +CDEPEND=" + dev-lang/spidermonkey:0/mozjs185[-debug] + >=dev-libs/glib-2.32:2 + >=dev-libs/expat-2:= + introspection? ( >=dev-libs/gobject-introspection-1:= ) + pam? ( + sys-auth/pambase + virtual/pam + ) + systemd? ( sys-apps/systemd:0= ) +" +DEPEND="${CDEPEND} + app-text/docbook-xml-dtd:4.1.2 + app-text/docbook-xsl-stylesheets + dev-libs/libxslt + dev-util/gtk-doc-am + dev-util/intltool + virtual/pkgconfig +" +RDEPEND="${CDEPEND} + selinux? ( sec-policy/selinux-policykit ) +" +PDEPEND=" + gtk? ( || ( + >=gnome-extra/polkit-gnome-0.105 + lxde-base/lxpolkit + ) ) + kde? ( || ( + kde-plasma/polkit-kde-agent + sys-auth/polkit-kde-agent + ) ) + !systemd? ( sys-auth/consolekit[policykit] ) +" + +QA_MULTILIB_PATHS=" + usr/lib/polkit-1/polkit-agent-helper-1 + usr/lib/polkit-1/polkitd" + +pkg_setup() { + local u=polkitd + local g=polkitd + local h=/var/lib/polkit-1 + + enewgroup ${g} + enewuser ${u} -1 -1 ${h} ${g} + esethome ${u} ${h} +} + +src_prepare() { + sed -i -e 's|unix-group:wheel|unix-user:0|' src/polkitbackend/*-default.rules || die #401513 +} + +src_configure() { + econf \ + --localstatedir="${EPREFIX}"/var \ + --disable-static \ + --enable-man-pages \ + --disable-gtk-doc \ + $(use_enable systemd libsystemd-login) \ + $(use_enable introspection) \ + --disable-examples \ + $(use_enable nls) \ + --with-mozjs=mozjs185 \ + "$(systemd_with_unitdir)" \ + --with-authfw=$(usex pam pam shadow) \ + $(use pam && echo --with-pam-module-dir="$(getpam_mod_dir)") \ + $(use_enable test) \ + --with-os-type=gentoo +} + +src_compile() { + default + + # Required for polkitd on hardened/PaX due to spidermonkey's JIT + pax-mark mr src/polkitbackend/.libs/polkitd test/polkitbackend/.libs/polkitbackendjsauthoritytest +} + +src_install() { + emake DESTDIR="${D}" install + + dodoc docs/TODO HACKING NEWS README + + fowners -R polkitd:root /{etc,usr/share}/polkit-1/rules.d + + diropts -m0700 -o polkitd -g polkitd + keepdir /var/lib/polkit-1 + + if use examples; then + insinto /usr/share/doc/${PF}/examples + doins src/examples/{*.c,*.policy*} + fi + + prune_libtool_files +} + +pkg_postinst() { + chown -R polkitd:root "${EROOT}"/{etc,usr/share}/polkit-1/rules.d + chown -R polkitd:polkitd "${EROOT}"/var/lib/polkit-1 +} |