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 688CE139694 for ; Sat, 17 Jun 2017 15:10:12 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9783E22400F; Sat, 17 Jun 2017 15:10:11 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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 6248022400F for ; Sat, 17 Jun 2017 15:10:11 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 6503534177E for ; Sat, 17 Jun 2017 15:10:04 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id D67977486 for ; Sat, 17 Jun 2017 15:10:02 +0000 (UTC) From: "Ettore Di Giacinto" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ettore Di Giacinto" Message-ID: <1497712191.0ff341ef3feb313a8b512966e0972b2de9c3b88f.mudler@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-admin/packagekit-base/files/, app-admin/packagekit-base/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-admin/packagekit-base/files/packagekit-base-elogind-support.patch app-admin/packagekit-base/metadata.xml app-admin/packagekit-base/packagekit-base-1.1.5-r1.ebuild app-admin/packagekit-base/packagekit-base-1.1.5.ebuild X-VCS-Directories: app-admin/packagekit-base/files/ app-admin/packagekit-base/ X-VCS-Committer: mudler X-VCS-Committer-Name: Ettore Di Giacinto X-VCS-Revision: 0ff341ef3feb313a8b512966e0972b2de9c3b88f X-VCS-Branch: master Date: Sat, 17 Jun 2017 15:10:02 +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: 76f0c9a1-d5f4-4ce0-8b22-6c20ac21d96b X-Archives-Hash: 9f73602084032161204ba9c8c30ba690 commit: 0ff341ef3feb313a8b512966e0972b2de9c3b88f Author: Ettore Di Giacinto gentoo org> AuthorDate: Sat Jun 17 14:47:20 2017 +0000 Commit: Ettore Di Giacinto gentoo org> CommitDate: Sat Jun 17 15:09:51 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0ff341ef app-admin/packagekit-base: Revision bump (bug #620948) Add elogind support. Thanks to Sven Eden gmx.net> Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=620948 Package-Manager: Portage-2.3.5, Repoman-2.3.2 .../files/packagekit-base-elogind-support.patch | 182 +++++++++++++++++++++ app-admin/packagekit-base/metadata.xml | 1 + ....1.5.ebuild => packagekit-base-1.1.5-r1.ebuild} | 28 +++- 3 files changed, 203 insertions(+), 8 deletions(-) diff --git a/app-admin/packagekit-base/files/packagekit-base-elogind-support.patch b/app-admin/packagekit-base/files/packagekit-base-elogind-support.patch new file mode 100644 index 00000000000..bed2a0de449 --- /dev/null +++ b/app-admin/packagekit-base/files/packagekit-base-elogind-support.patch @@ -0,0 +1,182 @@ +--- a/config.h.in 2017-06-07 16:38:45.046910693 +0200 ++++ b/config.h.in 2017-06-07 16:39:06.973911120 +0200 +@@ -78,8 +78,8 @@ + /* Define to 1 if you have the header file. */ + #undef HAVE_STRING_H + +-/* Build systemd code */ +-#undef HAVE_SYSTEMD ++/* Build systemd-login code */ ++#undef HAVE_SYSTEMD_SD_LOGIN_H + + /* Define to 1 if you have the header file. */ + #undef HAVE_SYS_STAT_H +--- a/configure.ac 2017-06-06 09:03:57.171355965 +0200 ++++ b/configure.ac 2017-06-06 09:55:11.242384458 +0200 +@@ -254,7 +254,6 @@ + AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]), + [has_systemdsystemunitdir=$with_systemdsystemunitdir], + [has_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)]) +- AC_DEFINE(HAVE_SYSTEMD,1,[Build systemd code]) + AC_SUBST([systemdsystemunitdir], [$has_systemdsystemunitdir]) + fi + AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$has_systemdsystemunitdir"]) +@@ -267,6 +266,22 @@ + AM_CONDITIONAL(ENABLE_OFFLINE_UPDATE, [test x$enable_systemd = xyes -a x$enable_offline_update = xyes]) + + dnl --------------------------------------------------------------------------- ++dnl - Use elogind instead of systemd-login ++dnl --------------------------------------------------------------------------- ++AC_ARG_ENABLE(elogind, AS_HELP_STRING([--enable-elogind],[enable elogind session tracker]), ++ enable_elogind=$enableval,enable_elogind=no) ++if test x$enable_elogind = xyes; then ++ PKG_CHECK_MODULES(ELOGIND, [libelogind >= 229.4], [have_elogind=yes], [have_elogind=no]) ++fi ++ ++dnl --------------------------------------------------------------------------- ++dnl --- Is systemd/sd-login.h, either from systemd or elogind, available? ++dnl --------------------------------------------------------------------------- ++if test "x$have_systemd" != "xno" -o "x$have_elogind" != "xno" ; then ++ AC_DEFINE(HAVE_SYSTEMD_SD_LOGIN_H,1,[Build systemd-login code]) ++fi ++ ++dnl --------------------------------------------------------------------------- + dnl - Generate man pages ? (default enabled) + dnl --------------------------------------------------------------------------- + AC_ARG_ENABLE(man_pages, AS_HELP_STRING([--disable-man-pages],[Disable man pages generation]), enable_man_pages=$enableval) +@@ -629,6 +644,7 @@ + cflags: ${CFLAGS} + cppflags: ${CPPFLAGS} + Able to run locally: ${enable_local} ++ Use elogind: ${enable_elogind} + Use systemd: ${enable_systemd} + Enable offline update: ${enable_offline_update} + Networking stacks: ${networking_apis} +--- a/src/Makefile.am 2017-06-06 10:02:19.902397328 +0200 ++++ b/src/Makefile.am 2017-06-06 10:04:05.013400483 +0200 +@@ -11,6 +11,7 @@ + $(PYTHON_CFLAGS) \ + $(NETWORK_MANAGER_CFLAGS) \ + $(CONNMAN_CFLAGS) \ ++ $(ELOGIND_CFLAGS) \ + $(SYSTEMD_CFLAGS) \ + -DPACKAGE_LOCALE_DIR=\"$(localedir)\" \ + -DBINDIR=\"$(bindir)\" \ +@@ -104,6 +105,7 @@ + $(POLKIT_LIBS) \ + $(GIO_LIBS) \ + $(ARCHIVE_LIBS) \ ++ $(ELOGIND_LIBS) \ + $(SYSTEMD_LIBS) + + packagekit_direct_LDFLAGS = \ +@@ -134,6 +136,7 @@ + $(POLKIT_LIBS) \ + $(GIO_LIBS) \ + $(ARCHIVE_LIBS) \ ++ $(ELOGIND_LIBS) \ + $(SYSTEMD_LIBS) + + packagekitd_LDFLAGS = \ +@@ -161,6 +164,7 @@ + $(POLKIT_LIBS) \ + $(GIO_LIBS) \ + $(ARCHIVE_LIBS) \ ++ $(ELOGIND_LIBS) \ + $(SYSTEMD_LIBS) + + pk_self_test_CPPFLAGS = \ +--- a/src/pk-engine.c 2017-06-06 09:12:23.828371176 +0200 ++++ b/src/pk-engine.c 2017-06-06 09:55:47.426385545 +0200 +@@ -98,7 +98,7 @@ + guint owner_id; + GDBusNodeInfo *introspection; + GDBusConnection *connection; +-#ifdef HAVE_SYSTEMD ++#ifdef HAVE_SYSTEMD_SD_LOGIN_H + GDBusProxy *logind_proxy; + gint logind_fd; + #endif +@@ -281,7 +281,7 @@ + static void + pk_engine_inhibit (PkEngine *engine) + { +-#ifdef HAVE_SYSTEMD ++#ifdef HAVE_SYSTEMD_SD_LOGIN_H + g_autoptr(GError) error = NULL; + g_autoptr(GUnixFDList) out_fd_list = NULL; + g_autoptr(GVariant) res = NULL; +@@ -331,7 +331,7 @@ + static void + pk_engine_uninhibit (PkEngine *engine) + { +-#ifdef HAVE_SYSTEMD ++#ifdef HAVE_SYSTEMD_SD_LOGIN_H + if (engine->priv->logind_fd == 0) + return; + g_debug ("closed logind fd %i", engine->priv->logind_fd); +@@ -1830,7 +1830,7 @@ + } + } + +-#ifdef HAVE_SYSTEMD ++#ifdef HAVE_SYSTEMD_SD_LOGIN_H + /** + * pk_engine_proxy_logind_cb: + **/ +@@ -1872,7 +1872,7 @@ + /* save copy for emitting signals */ + engine->priv->connection = g_object_ref (connection); + +-#ifdef HAVE_SYSTEMD ++#ifdef HAVE_SYSTEMD_SD_LOGIN_H + /* connect to logind */ + g_dbus_proxy_new (connection, + G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES, +@@ -2031,7 +2031,7 @@ + if (engine->priv->connection != NULL) + g_object_unref (engine->priv->connection); + +-#ifdef HAVE_SYSTEMD ++#ifdef HAVE_SYSTEMD_SD_LOGIN_H + /* uninhibit */ + if (engine->priv->logind_fd != 0) + close (engine->priv->logind_fd); +--- a/src/pk-dbus.c 2017-06-06 09:12:13.254370858 +0200 ++++ b/src/pk-dbus.c 2017-06-06 10:09:17.249409857 +0200 +@@ -27,7 +27,7 @@ + #include + #include + +-#ifdef HAVE_SYSTEMD ++#ifdef HAVE_SYSTEMD_SD_LOGIN_H + #include + #endif + +@@ -177,7 +177,7 @@ + return cmdline; + } + +-#ifdef HAVE_SYSTEMD ++#ifdef HAVE_SYSTEMD_SD_LOGIN_H + /** + * pk_dbus_get_session_systemd: + **/ +@@ -220,7 +220,7 @@ + pk_dbus_get_session (PkDbus *dbus, const gchar *sender) + { + gchar *session = NULL; +-#ifndef HAVE_SYSTEMD ++#ifndef HAVE_SYSTEMD_SD_LOGIN_H + g_autoptr(GError) error = NULL; + #endif + guint pid; +@@ -250,7 +250,7 @@ + } + + /* get session from systemd or ConsoleKit */ +-#ifdef HAVE_SYSTEMD ++#ifdef HAVE_SYSTEMD_SD_LOGIN_H + session = pk_dbus_get_session_systemd (pid); + #else + /* get session from ConsoleKit */ diff --git a/app-admin/packagekit-base/metadata.xml b/app-admin/packagekit-base/metadata.xml index c412437bba5..37a216b6c7c 100644 --- a/app-admin/packagekit-base/metadata.xml +++ b/app-admin/packagekit-base/metadata.xml @@ -18,6 +18,7 @@ Enable packagekit support on shell "command not found" Install cron script for auto-update + Enable elogind support to get user session Enable Entropy backend diff --git a/app-admin/packagekit-base/packagekit-base-1.1.5.ebuild b/app-admin/packagekit-base/packagekit-base-1.1.5-r1.ebuild similarity index 84% rename from app-admin/packagekit-base/packagekit-base-1.1.5.ebuild rename to app-admin/packagekit-base/packagekit-base-1.1.5-r1.ebuild index 6ef6d42eaa7..9d6f36571e9 100644 --- a/app-admin/packagekit-base/packagekit-base-1.1.5.ebuild +++ b/app-admin/packagekit-base/packagekit-base-1.1.5-r1.ebuild @@ -8,7 +8,7 @@ EAPI="6" PYTHON_COMPAT=( python2_7 ) VALA_USE_DEPEND="vapigen" -inherit bash-completion-r1 multilib python-single-r1 systemd vala xdg +inherit autotools bash-completion-r1 multilib python-single-r1 systemd vala xdg MY_PN="PackageKit" MY_P=${MY_PN}-${PV} @@ -20,14 +20,15 @@ SRC_URI="https://www.freedesktop.org/software/${MY_PN}/releases/${MY_P}.tar.xz" LICENSE="GPL-2" SLOT="0/18" KEYWORDS="~alpha ~amd64 ~arm ~mips ~ppc ~ppc64 ~x86" -IUSE="connman cron command-not-found +introspection networkmanager entropy systemd test vala" +IUSE="connman cron command-not-found elogind +introspection networkmanager entropy systemd test vala" REQUIRED_USE=" ${PYTHON_REQUIRED_USE} + ?? ( elogind systemd ) vala? ( introspection ) " # While not strictly needed, consolekit is the alternative to systemd-login -# to get current session's user. +# or elogind to get current session's user. COMMON_DEPEND=" >=app-shells/bash-completion-2 dev-db/sqlite:3 @@ -37,6 +38,7 @@ COMMON_DEPEND=" >=sys-apps/dbus-1.3.0 ${PYTHON_DEPS} connman? ( net-misc/connman ) + elogind? ( >=sys-auth/elogind-229.4 ) introspection? ( >=dev-libs/gobject-introspection-0.9.9:= ) networkmanager? ( >=net-misc/networkmanager-0.6.4:= ) systemd? ( >=sys-apps/systemd-204 ) @@ -54,17 +56,23 @@ RDEPEND="${COMMON_DEPEND} >=app-portage/layman-2[${PYTHON_USEDEP}] >=sys-apps/portage-2.2[${PYTHON_USEDEP}] entropy? ( >=sys-apps/entropy-234[${PYTHON_USEDEP}] ) - !systemd? ( sys-auth/consolekit ) + !systemd? ( !elogind? ( sys-auth/consolekit ) ) " -S="${WORKDIR}/${MY_P}" - -src_prepare() { +PATCHES=( # Fixes QA Notices: # - https://github.com/gentoo/gentoo/pull/1760 # - https://github.com/hughsie/PackageKit/issues/143 - eapply "${FILESDIR}"/${PN}-1.1.1-cache-qafix.patch + "${FILESDIR}"/${PN}-1.1.1-cache-qafix.patch + + # Adds elogind support: + # - https://bugs.gentoo.org/show_bug.cgi?id=620948 + "${FILESDIR}"/${PN}-elogind-support.patch +) +S="${WORKDIR}/${MY_P}" + +src_prepare() { # Disable unittests not working with portage backend # console: requires terminal input sed -e 's:^\(.*/packagekit-glib2/control\)://\1:' \ @@ -82,6 +90,9 @@ src_prepare() { eapply_user use vala && vala_src_prepare xdg_src_prepare + + # Needed by elogind patch: + eautoreconf } src_configure() { @@ -99,6 +110,7 @@ src_configure() { $(use_enable command-not-found) \ $(use_enable connman) \ $(use_enable cron) \ + $(use_enable elogind) \ $(use_enable entropy) \ $(use_enable introspection) \ $(use_enable networkmanager) \