From 0dde27a0f3fd11a8d3195faedf2dd08193b0d425 Mon Sep 17 00:00:00 2001 From: David P Date: Thu, 19 Apr 2018 22:11:23 -0300 Subject: upgpkg: pcr/polkit-elogind 0.114-1.parabola1 Signed-off-by: David P --- pcr/polkit-elogind/PKGBUILD | 88 ++++++------- pcr/polkit-elogind/elogind-configure-fix.patch | 28 +++++ pcr/polkit-elogind/polkit-0.114-elogind.patch | 165 ------------------------- 3 files changed, 68 insertions(+), 213 deletions(-) create mode 100644 pcr/polkit-elogind/elogind-configure-fix.patch delete mode 100644 pcr/polkit-elogind/polkit-0.114-elogind.patch diff --git a/pcr/polkit-elogind/PKGBUILD b/pcr/polkit-elogind/PKGBUILD index bb520fea4..e15f9a97e 100644 --- a/pcr/polkit-elogind/PKGBUILD +++ b/pcr/polkit-elogind/PKGBUILD @@ -1,77 +1,69 @@ -# Maintainer (Artix): artoo -# Contributor (Arch): kozec -# Contributor (Arch): Lukas Jirkovsky -# Contributor (Arch): Jan de Groot +# Maintainer: David P. # Maintainer: Omar Vega Ramos -_pkgname=polkit pkgname=polkit-elogind -pkgver=0.113+34+g29ba7af -pkgrel=1 -pkgdesc="PolyciKit with elogind support for non-systemd systems" -arch=('i686' 'x86_64' 'armv7h') -url="http://www.freedesktop.org/wiki/Software/polkit" -license=('LGPL') -provides=("polkit=$pkgver") -depends=('glib2' 'pam' 'expat' 'js' 'elogind') -makedepends=('intltool' 'gtk-doc' 'gobject-introspection' 'git' 'autoconf-archive' 'libelogind') +_pkgname=${pkgname/-elogind} +pkgver=0.114 +pkgrel=1.parabola1 +pkgdesc="Application development toolkit for controlling system-wide privileges, with libelogind support" +arch=(x86_64 i686 armv7h) +license=(LGPL) +provides=("$_pkgname=$pkgver") +url="https://www.freedesktop.org/wiki/Software/polkit/" +depends=(glib2 pam expat elogind js52) +makedepends=(intltool gtk-doc gobject-introspection git autoconf-archive) conflicts=('polkit' 'polkit-consolekit') -#replaces=('polkit-consolekit') -options=('!libtool') -_commit=29ba7afba1b79a325183a71966f35926dfdf506e # master -#source=("http://www.freedesktop.org/software/polkit/releases/$_pkgname-$pkgver.tar.gz") +replaces=('polkit-consolekit') +_commit=ed06baed179166389d536420a6fc532781d48178 # tags/0.114^0 source=("git+https://anongit.freedesktop.org/git/polkit#commit=$_commit" '99-parabola.rules' - 'polkit-0.114-elogind.patch') + 'elogind-configure-fix.patch') sha256sums=('SKIP' 'd28d6ecaf7682860e2b3768bb266bd94313546b7cd0ef3c2eace7b1576c47adb' - 'e5eb83a8922f1540309ce5884c4bd40b2972aa75778da945e2392501961a860b') + 'd90b2a95aa3e9e1ebf9369c038c144e04900e095c5405bc4ba4901c31bf3f59b') pkgver() { - cd $_pkgname - git describe --tags | sed 's/-/+/g' + cd $_pkgname + git describe --tags | sed 's/-/+/g' } prepare() { - cd $_pkgname #-$pkgver - patch -Np 1 -i "${srcdir}"/polkit-0.114-elogind.patch - NOCONFIGURE=1 ./autogen.sh + cd $_pkgname + git cherry-pick -n 373705b35e7f6c7dc83de5e0a3ce11ecd15d0409 + patch -Np 1 -i ${srcdir}/elogind-configure-fix.patch + NOCONFIGURE=1 ./autogen.sh } build() { - cd $_pkgname #-$pkgver + cd $_pkgname - ./configure \ - --prefix=/usr \ - --sysconfdir=/etc \ - --sbindir=/usr/bin \ - --localstatedir=/var \ - --libexecdir=/usr/lib \ - --enable-libsystemd-login=no \ - --enable-libelogind=yes \ - --disable-static \ - --enable-gtk-doc \ - --with-authfw=pam \ - --with-os-type=gentoo - sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool - make + ./configure --prefix=/usr --sysconfdir=/etc \ + --localstatedir=/var --libexecdir=/usr/lib \ + --enable-libsystemd-login=no --disable-static \ + --enable-gtk-doc --with-os-type=redhat \ + --enable-libelogind=yes --with-systemdsystemunitdir=no + + sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool + + make } check() { - cd $_pkgname #-$pkgver - make -k check || : + cd $_pkgname + make -k check || : } package() { - cd $_pkgname #-$pkgver - make DESTDIR="$pkgdir" install + cd $_pkgname + make DESTDIR="$pkgdir" install - chown root:102 "$pkgdir"/{etc,usr/share}/polkit-1/rules.d - chmod 750 "$pkgdir"/{etc,usr/share}/polkit-1/rules.d - install -m0644 "${srcdir}"/99-parabola.rules "${pkgdir}"/etc/polkit-1/rules.d + install -d -o root -g 102 -m 750 "$pkgdir"/{etc,usr/share}/polkit-1/rules.d - install -Dm644 /dev/stdin "$pkgdir/usr/lib/sysusers.d/$pkgname.conf" < +Date: Wed, 11 Apr 2018 13:14:14 +0200 +Subject: [PATCH] configure: fix elogind support + +HAVE_LIBSYSTEMD is used to determine which source files to use. +We have to check if either have_libsystemd or have_libelogind is +true, as both of these need the source files which are used when +HAVE_LIBSYSTEMD is true. +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 36df239..da47ecb 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -221,7 +221,7 @@ AS_IF([test "x$cross_compiling" != "xyes" ], [ + + AC_SUBST(LIBSYSTEMD_CFLAGS) + AC_SUBST(LIBSYSTEMD_LIBS) +-AM_CONDITIONAL(HAVE_LIBSYSTEMD, [test "$have_libsystemd" = "yes"], [Using libsystemd]) ++AM_CONDITIONAL(HAVE_LIBSYSTEMD, [test "$have_libsystemd" = "yes" || test "$have_libelogind" = "yes" ], [Using libsystemd]) + + dnl --------------------------------------------------------------------------- + dnl - systemd unit / service files +-- +2.17.0 diff --git a/pcr/polkit-elogind/polkit-0.114-elogind.patch b/pcr/polkit-elogind/polkit-0.114-elogind.patch deleted file mode 100644 index b08f412ed..000000000 --- a/pcr/polkit-elogind/polkit-0.114-elogind.patch +++ /dev/null @@ -1,165 +0,0 @@ ---- 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 --------------------------------------------------------------------------- -diff --git a/src/polkit/Makefile.am b/src/polkit/Makefile.am -index ca36355..b8090c4 100644 ---- a/src/polkit/Makefile.am -+++ b/src/polkit/Makefile.am -@@ -86,19 +86,26 @@ if HAVE_LIBSYSTEMD - 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_.*)' -diff --git a/src/polkitbackend/Makefile.am b/src/polkitbackend/Makefile.am -index e48b739..c2b1695 100644 ---- a/src/polkitbackend/Makefile.am -+++ b/src/polkitbackend/Makefile.am -@@ -42,15 +42,21 @@ if HAVE_LIBSYSTEMD - 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) - -@@ -59,6 +65,7 @@ libpolkit_backend_1_la_CXXFLAGS = $(libpolkit_backend_1_la_CFLAGS) - 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/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 ---- a/src/polkitbackend/polkitbackendjsauthority.cpp -+++ b/src/polkitbackend/polkitbackendjsauthority.cpp -@@ -43,6 +43,10 @@ - #include - #endif /* HAVE_LIBSYSTEMD */ - -+#ifdef HAVE_LIBELOGIND -+#include -+#endif /* HAVE_LIBELOGIND */ -+ - #include - - #include "initjs.h" /* init.js */ -- cgit v1.2.3