From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 06CBD139086 for ; Sat, 14 Jan 2017 19:26:08 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 56711234061; Sat, 14 Jan 2017 19:26:07 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 1DFEE234061 for ; Sat, 14 Jan 2017 19:26:07 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C35F034106E for ; Sat, 14 Jan 2017 19:26:05 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 18F43271A for ; Sat, 14 Jan 2017 19:26:04 +0000 (UTC) From: "Andreas Sturmlechner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andreas Sturmlechner" Message-ID: <1484421903.7ffb5079b8c109223cfeb4519abb84a6c5516293.asturm@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-auth/polkit/, sys-auth/polkit/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-auth/polkit/files/polkit-0.113-elogind.patch sys-auth/polkit/metadata.xml sys-auth/polkit/polkit-0.113-r2.ebuild X-VCS-Directories: sys-auth/polkit/files/ sys-auth/polkit/ X-VCS-Committer: asturm X-VCS-Committer-Name: Andreas Sturmlechner X-VCS-Revision: 7ffb5079b8c109223cfeb4519abb84a6c5516293 X-VCS-Branch: master Date: Sat, 14 Jan 2017 19:26:04 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: cefeb964-7edd-41ec-99ed-839e064a7d08 X-Archives-Hash: 8718552f9ab3755b14cf875faae6d8f0 commit: 7ffb5079b8c109223cfeb4519abb84a6c5516293 Author: Andreas Sturmlechner gentoo org> AuthorDate: Sat Jan 14 12:24:15 2017 +0000 Commit: Andreas Sturmlechner gentoo org> CommitDate: Sat Jan 14 19:25:03 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7ffb5079 sys-auth/polkit: Add USE=elogind, bump to EAPI 6 Gentoo-bug: 598615 Drop non-existent lxde-base/lxpolkit from PDEPEND Package-Manager: portage-2.3.0 sys-auth/polkit/files/polkit-0.113-elogind.patch | 160 +++++++++++++++++++++++ sys-auth/polkit/metadata.xml | 1 + sys-auth/polkit/polkit-0.113-r2.ebuild | 133 +++++++++++++++++++ 3 files changed, 294 insertions(+) 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 00000000..fb142c6 --- /dev/null +++ b/sys-auth/polkit/files/polkit-0.113-elogind.patch @@ -0,0 +1,160 @@ +--- 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 2016-11-04 04:44:29.650112018 +0100 ++++ b/src/polkitbackend/polkitbackendjsauthority.c 2016-11-04 04:44:58.283111505 +0100 +@@ -39,6 +39,10 @@ + #include + #endif /* HAVE_LIBSYSTEMD */ + ++#ifdef HAVE_LIBELOGIND ++#include ++#endif /* HAVE_LIBELOGIND */ ++ + #include + + #include "initjs.h" /* init.js */ +--- 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 + #include + #include ++#ifdef HAVE_LIBSYSTEMD + #include ++#else ++#include ++#endif /* HAVE_LIBSYSTEMD versus HAVE_LIBELOGIND */ + #include + + #include +--- 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 ++#else ++#include ++#endif /* HAVE_LIBSYSTEMD versus HAVE_ELOGIND */ + + /** + * SECTION:polkitunixsession diff --git a/sys-auth/polkit/metadata.xml b/sys-auth/polkit/metadata.xml index cc3a0b4..348a315 100644 --- a/sys-auth/polkit/metadata.xml +++ b/sys-auth/polkit/metadata.xml @@ -5,6 +5,7 @@ freedesktop-bugs@gentoo.org + Use sys-auth/elogind instead of sys-auth/consolekit for session tracking Use sys-apps/systemd instead of sys-auth/consolekit for session tracking diff --git a/sys-auth/polkit/polkit-0.113-r2.ebuild b/sys-auth/polkit/polkit-0.113-r2.ebuild new file mode 100644 index 00000000..4ec829a --- /dev/null +++ b/sys-auth/polkit/polkit-0.113-r2.ebuild @@ -0,0 +1,133 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +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/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 ) + kde? ( || ( + kde-plasma/polkit-kde-agent + sys-auth/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 + + # 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 +}