commit: 3cfe589815027ded09d76070f76cae70123c122a Author: Adam Feldman <NP-Hardass <AT> gentoo <DOT> org> AuthorDate: Wed Sep 2 04:52:56 2020 +0000 Commit: Adam Feldman <np-hardass <AT> gentoo <DOT> org> CommitDate: Wed Sep 2 05:55:35 2020 +0000 URL: https://gitweb.gentoo.org/proj/gentoo-mate.git/commit/?id=3cfe5898
mate-extra/mate-power-manager: Sync with ::gentoo Re-add consolekit support Package-Manager: Portage-2.3.103, Repoman-2.3.23 RepoMan-Options: --force Signed-off-by: Adam Feldman <NP-Hardass <AT> gentoo.org> mate-extra/mate-power-manager/Manifest | 3 +- .../mate-power-manager-1.24.1-libsecret.patch | 287 +++++++++++++++++++++ ....ebuild => mate-power-manager-1.22.2-r1.ebuild} | 3 +- ....ebuild => mate-power-manager-1.24.1-r1.ebuild} | 5 +- ....ebuild => mate-power-manager-1.24.1-r2.ebuild} | 22 +- mate-extra/mate-power-manager/metadata.xml | 1 + 6 files changed, 308 insertions(+), 13 deletions(-) diff --git a/mate-extra/mate-power-manager/Manifest b/mate-extra/mate-power-manager/Manifest index 65a55e6..ab90b55 100644 --- a/mate-extra/mate-power-manager/Manifest +++ b/mate-extra/mate-power-manager/Manifest @@ -1,3 +1,2 @@ -DIST mate-power-manager-1.22.1.tar.xz 3188048 BLAKE2B af32a18e2561cc9689382ff9a94382180a5d2dc6ade34a6dc400a7b65730a6c26c6f32b72b6ec973210ac3baf4e8b6c54e489230e64b877cee4ffbbf1a195d28 SHA512 8eabd7f8171f0a6be610c849fad8346bb30ca2c69208e2e117f436daaa5ada3bf0fef479dc017f32f56ec6bd52a7ff7ff69d18baf01b402c5fa2747245261a81 DIST mate-power-manager-1.22.2.tar.xz 3188752 BLAKE2B 351c18436183679b2b0ecf549a8efe16a691876b7299f06d88d7f7c3434feab1f35ac26a015b5425260dc1a41a4734f0244825a69bb77211320d60f4328ff63b SHA512 99a273558c072ce1d23c8964d9292f45a29a2d5a5e89b504e79e3686a65ad8cc7b200441ba22147d3d828f574e2cebc260c47531338e286b2c47988263763af6 -DIST mate-power-manager-1.24.0.tar.xz 5776576 BLAKE2B 3846006bc86fda166e2220848648a8d0bf3f0b5952a6b32e8d24ec56adf670f04d4422b06aa3a09a769c01644ff3f3f71edc0f551de3f22631071a16f849d549 SHA512 6194d1156a004c1006b3b0b5d50a4def5e6d07df5229aafac487843e4e544e144b85e2a9b45ee0b932b8de9a6969aa844f8f61ac607f9f5e6234fd4ff5d8a4d5 +DIST mate-power-manager-1.24.1.tar.xz 6245524 BLAKE2B b9be1aab7e2f397edba9a681310a9903b11e11abf1af8557c613a1e6bf7b89d5aa495ddfcef4bc23f11aa6aca215b86e3a1c9adfdfd481f0e4353268ca5dd7cd SHA512 57bae519bfa2894bc6923bf0932f823bcabe2dc0de06dc6676597708482b369a24f39bb94558163f0fdcc2d764702b87f58abc1793679a1c7fb7f53be074bae5 diff --git a/mate-extra/mate-power-manager/files/mate-power-manager-1.24.1-libsecret.patch b/mate-extra/mate-power-manager/files/mate-power-manager-1.24.1-libsecret.patch new file mode 100644 index 0000000..11a9f94 --- /dev/null +++ b/mate-extra/mate-power-manager/files/mate-power-manager-1.24.1-libsecret.patch @@ -0,0 +1,287 @@ +From b2d876a16de9214270f248d7c445542120ae7800 Mon Sep 17 00:00:00 2001 +From: NP-Hardass <[email protected]> +Date: Mon, 3 Aug 2020 01:46:00 -0400 +Subject: [PATCH 1/5] Add autotools support for libsecret + +--- + README | 1 + + configure.ac | 22 ++++++++++++++++++++++ + src/Makefile.am | 3 +++ + 3 files changed, 26 insertions(+) + +diff --git a/README b/README +index 118da697..32a8a5cc 100644 +--- a/README ++++ b/README +@@ -15,6 +15,7 @@ To build, MATE Power Manager requires + + - Glib (2.36.0 or later) + - GTK+3 (3.14.0 or later) ++ - libsecret (0.11 or later) + - GNOME Keyring (3.0.0 or later) + - DBus (0.70 or later) + - libnotify (0.7.0 or later) +diff --git a/configure.ac b/configure.ac +index 1db39321..b4758dca 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -68,6 +68,7 @@ GLIB_REQUIRED=2.50.0 + GIO_REQUIRED=2.50.0 + GDK_REQUIRED=3.22.0 + GTK_REQUIRED=3.22.0 ++LIBSECRET_REQUIRED=0.11 + GNOME_KEYRING_REQUIRED=3.0.0 + DBUS_REQUIRED=1.0 + DBUS_GLIB_REQUIRED=0.70 +@@ -134,6 +135,22 @@ else + fi + AM_CONDITIONAL([HAVE_TESTS], [test $have_tests = yes]) + ++dnl --------------------------------------------------------------------------- ++dnl - Build libsecret support ++dnl --------------------------------------------------------------------------- ++AC_ARG_WITH(libsecret, ++ [AS_HELP_STRING([--with-libsecret], ++ [Enable the use of libsecret])], ++ [], ++ [with_libsecret=no]) ++ ++AM_CONDITIONAL([WITH_LIBSECRET],[test "$with_libsecret" = "yes"]) ++ ++if test "$with_libsecret" = "yes"; then ++ PKG_CHECK_MODULES(LIBSECRET, libsecret-1 >= $LIBSECRET_REQUIRED) ++ AC_DEFINE([WITH_LIBSECRET],[1],[Define if LIBSECRET support is enabled]) ++fi ++ + dnl --------------------------------------------------------------------------- + dnl - Build gnome-keyring support + dnl --------------------------------------------------------------------------- +@@ -150,6 +167,10 @@ if test "$with_keyring" = "yes"; then + AC_DEFINE([WITH_KEYRING],[1],[Define if KEYRING support is enabled]) + fi + ++if test "$with_libsecret" = "yes" -a "$with_keyring" = "yes"; then ++ AC_MSG_ERROR([Please select only 1, keyring or libsecret]) ++fi ++ + dnl --------------------------------------------------------------------------- + dnl - Build applets + dnl --------------------------------------------------------------------------- +@@ -222,6 +243,7 @@ echo " + compiler: ${CC} + cflags: ${CFLAGS} + cwarnings: ${WARN_CFLAGS} ++ libsecret support: ${with_libsecret} + gnome-keyring support: ${with_keyring} + Building extra applets: ${enable_applets} + Self test support: ${have_tests} +diff --git a/src/Makefile.am b/src/Makefile.am +index 1a966e8f..47815c5f 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -14,6 +14,7 @@ AM_CPPFLAGS = \ + $(GLIB_CFLAGS) \ + $(DBUS_CFLAGS) \ + $(CAIRO_CFLAGS) \ ++ $(LIBSECRET_CFLAGS) \ + $(KEYRING_CFLAGS) \ + $(X11_CFLAGS) \ + $(LIBNOTIFY_CFLAGS) \ +@@ -197,6 +198,7 @@ mate_power_manager_LDADD = \ + $(X11_LIBS) \ + $(GSTREAMER_LIBS) \ + $(CAIRO_LIBS) \ ++ $(LIBSECRET_LIBS) \ + $(KEYRING_LIBS) \ + $(DBUS_LIBS) \ + $(X11_LIBS) \ +@@ -259,6 +261,7 @@ mate_power_self_test_LDADD = \ + $(GLIB_LIBS) \ + $(X11_LIBS) \ + $(CAIRO_LIBS) \ ++ $(LIBSECRET_LIBS) \ + $(KEYRING_LIBS) \ + $(GSTREAMER_LIBS) \ + $(UPOWER_LIBS) \ + +From 7dbbf59fc5dc64cf512932993616a06903d5f22b Mon Sep 17 00:00:00 2001 +From: NP-Hardass <[email protected]> +Date: Mon, 3 Aug 2020 01:49:47 -0400 +Subject: [PATCH 2/5] gpm-control.c: Add libsecret implementation to + gpm_control_suspend() + +--- + src/gpm-control.c | 39 +++++++++++++++++++++++++++++++++++++++ + 1 file changed, 39 insertions(+) + +diff --git a/src/gpm-control.c b/src/gpm-control.c +index 4834a050..e64bfb12 100644 +--- a/src/gpm-control.c ++++ b/src/gpm-control.c +@@ -39,6 +39,9 @@ + #include <gio/gio.h> + #include <glib/gi18n.h> + ++#ifdef WITH_LIBSECRET ++#include <libsecret/secret.h> ++#endif /* WITH_LIBSECRET */ + #ifdef WITH_KEYRING + #include <gnome-keyring.h> + #endif /* WITH_KEYRING */ +@@ -210,6 +213,13 @@ gpm_control_suspend (GpmControl *control, GError **error) + EggConsoleKit *console; + GpmScreensaver *screensaver; + guint32 throttle_cookie = 0; ++#ifdef WITH_LIBSECRET ++ gboolean lock_libsecret; ++ GCancellable *libsecret_cancellable = NULL; ++ SecretService *secretservice_proxy = NULL; ++ gint num_secrets_locked; ++ GList *libsecret_collections = NULL; ++#endif /* WITH_LIBSECRET */ + #ifdef WITH_KEYRING + gboolean lock_gnome_keyring; + GnomeKeyringResult keyres; +@@ -233,6 +243,35 @@ gpm_control_suspend (GpmControl *control, GError **error) + } + } + ++#ifdef WITH_LIBSECRET ++ /* we should perhaps lock keyrings when sleeping #375681 */ ++ lock_libsecret = g_settings_get_boolean (control->priv->settings, GPM_SETTINGS_LOCK_KEYRING_SUSPEND); ++ if (lock_libsecret) { ++ libsecret_cancellable = g_cancellable_new(); ++ secretservice_proxy = secret_service_get_sync(SECRET_SERVICE_LOAD_COLLECTIONS, ++ libsecret_cancellable, ++ error); ++ if (secretservice_proxy == NULL) { ++ g_warning ("failed to connect to secret service"); ++ } else { ++ libsecret_collections = secret_service_get_collections(secretservice_proxy); ++ if ( libsecret_collections == NULL) { ++ g_warning ("failed to get secret collections"); ++ } else { ++ num_secrets_locked = secret_service_lock_sync(secretservice_proxy, ++ libsecret_collections, ++ libsecret_cancellable, ++ NULL, ++ error); ++ if (num_secrets_locked <= 0) ++ g_warning ("could not lock keyring"); ++ g_list_free(libsecret_collections); ++ } ++ g_object_unref(secretservice_proxy); ++ } ++ g_object_unref(libsecret_cancellable); ++ } ++#endif /* WITH_LIBSECRET */ + #ifdef WITH_KEYRING + /* we should perhaps lock keyrings when sleeping #375681 */ + lock_gnome_keyring = g_settings_get_boolean (control->priv->settings, GPM_SETTINGS_LOCK_KEYRING_SUSPEND); + +From 74acfabab04f10e95dc91fdc633a893a4564a820 Mon Sep 17 00:00:00 2001 +From: NP-Hardass <[email protected]> +Date: Mon, 3 Aug 2020 01:55:43 -0400 +Subject: [PATCH 3/5] gpm-control.c: Add libsecret implementation to + gpm_control_hibernate() + +--- + src/gpm-control.c | 36 ++++++++++++++++++++++++++++++++++++ + 1 file changed, 36 insertions(+) + +diff --git a/src/gpm-control.c b/src/gpm-control.c +index e64bfb12..98bb6f4e 100644 +--- a/src/gpm-control.c ++++ b/src/gpm-control.c +@@ -367,6 +367,13 @@ gpm_control_hibernate (GpmControl *control, GError **error) + EggConsoleKit *console; + GpmScreensaver *screensaver; + guint32 throttle_cookie = 0; ++#ifdef WITH_LIBSECRET ++ gboolean lock_libsecret; ++ GCancellable *libsecret_cancellable = NULL; ++ SecretService *secretservice_proxy = NULL; ++ gint num_secrets_locked; ++ GList *libsecret_collections = NULL; ++#endif /* WITH_LIBSECRET */ + #ifdef WITH_KEYRING + gboolean lock_gnome_keyring; + GnomeKeyringResult keyres; +@@ -390,6 +397,35 @@ gpm_control_hibernate (GpmControl *control, GError **error) + } + } + ++#ifdef WITH_LIBSECRET ++ /* we should perhaps lock keyrings when sleeping #375681 */ ++ lock_libsecret = g_settings_get_boolean (control->priv->settings, GPM_SETTINGS_LOCK_KEYRING_SUSPEND); ++ if (lock_libsecret) { ++ libsecret_cancellable = g_cancellable_new(); ++ secretservice_proxy = secret_service_get_sync(SECRET_SERVICE_LOAD_COLLECTIONS, ++ libsecret_cancellable, ++ error); ++ if (secretservice_proxy == NULL) { ++ g_warning ("failed to connect to secret service"); ++ } else { ++ libsecret_collections = secret_service_get_collections(secretservice_proxy); ++ if ( libsecret_collections == NULL) { ++ g_warning ("failed to get secret collections"); ++ } else { ++ num_secrets_locked = secret_service_lock_sync(secretservice_proxy, ++ libsecret_collections, ++ libsecret_cancellable, ++ NULL, ++ error); ++ if (num_secrets_locked <= 0) ++ g_warning ("could not lock keyring"); ++ g_list_free(libsecret_collections); ++ } ++ g_object_unref(secretservice_proxy); ++ } ++ g_object_unref(libsecret_cancellable); ++ } ++#endif /* WITH_LIBSECRET */ + #ifdef WITH_KEYRING + /* we should perhaps lock keyrings when sleeping #375681 */ + lock_gnome_keyring = g_settings_get_boolean (control->priv->settings, GPM_SETTINGS_LOCK_KEYRING_HIBERNATE); + +From a5b4e5b14510ea3aeb8824294876c152635503ae Mon Sep 17 00:00:00 2001 +From: NP-Hardass <[email protected]> +Date: Mon, 3 Aug 2020 02:01:10 -0400 +Subject: [PATCH 5/5] Switch default from libgnome-keyring to libsecret + +--- + configure.ac | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/configure.ac b/configure.ac +index b4758dca..7fbc8206 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -139,10 +139,10 @@ dnl --------------------------------------------------------------------------- + dnl - Build libsecret support + dnl --------------------------------------------------------------------------- + AC_ARG_WITH(libsecret, +- [AS_HELP_STRING([--with-libsecret], +- [Enable the use of libsecret])], ++ [AS_HELP_STRING([--without-libsecret], ++ [Disable the use of libsecret])], + [], +- [with_libsecret=no]) ++ [with_libsecret=yes]) + + AM_CONDITIONAL([WITH_LIBSECRET],[test "$with_libsecret" = "yes"]) + +@@ -155,10 +155,10 @@ dnl --------------------------------------------------------------------------- + dnl - Build gnome-keyring support + dnl --------------------------------------------------------------------------- + AC_ARG_WITH(keyring, +- [AS_HELP_STRING([--without-keyring], +- [Disable the use of gnome-keyring])], ++ [AS_HELP_STRING([--with-keyring], ++ [Enable the use of gnome-keyring])], + [], +- [with_keyring=yes]) ++ [with_keyring=no]) + + AM_CONDITIONAL([WITH_KEYRING],[test "$with_keyring" = "yes"]) + diff --git a/mate-extra/mate-power-manager/mate-power-manager-1.22.1.ebuild b/mate-extra/mate-power-manager/mate-power-manager-1.22.2-r1.ebuild similarity index 99% rename from mate-extra/mate-power-manager/mate-power-manager-1.22.1.ebuild rename to mate-extra/mate-power-manager/mate-power-manager-1.22.2-r1.ebuild index f37314b..c3d316b 100644 --- a/mate-extra/mate-power-manager/mate-power-manager-1.22.1.ebuild +++ b/mate-extra/mate-power-manager/mate-power-manager-1.22.2-r1.ebuild @@ -44,7 +44,8 @@ RDEPEND="${COMMON_DEPEND} !systemd? ( elogind? ( sys-auth/elogind ) !elogind? ( >=sys-auth/consolekit-0.9.2 ) - )" + ) +" DEPEND="${COMMON_DEPEND} app-text/docbook-xml-dtd:4.3 diff --git a/mate-extra/mate-power-manager/mate-power-manager-1.24.0.ebuild b/mate-extra/mate-power-manager/mate-power-manager-1.24.1-r1.ebuild similarity index 97% rename from mate-extra/mate-power-manager/mate-power-manager-1.24.0.ebuild rename to mate-extra/mate-power-manager/mate-power-manager-1.24.1-r1.ebuild index b188be8..db031cf 100644 --- a/mate-extra/mate-power-manager/mate-power-manager-1.24.0.ebuild +++ b/mate-extra/mate-power-manager/mate-power-manager-1.24.1-r1.ebuild @@ -6,7 +6,7 @@ EAPI=6 inherit mate if [[ ${PV} != 9999 ]]; then - KEYWORDS="~amd64 ~arm ~arm64 ~x86" + KEYWORDS="amd64 ~arm ~arm64 x86" fi DESCRIPTION="A session daemon for MATE that makes it easy to manage your laptop or desktop" @@ -45,7 +45,8 @@ RDEPEND="${COMMON_DEPEND} !systemd? ( elogind? ( sys-auth/elogind ) !elogind? ( >=sys-auth/consolekit-0.9.2 ) - )" + ) +" DEPEND="${COMMON_DEPEND} app-text/docbook-xml-dtd:4.3 diff --git a/mate-extra/mate-power-manager/mate-power-manager-1.22.2.ebuild b/mate-extra/mate-power-manager/mate-power-manager-1.24.1-r2.ebuild similarity index 82% rename from mate-extra/mate-power-manager/mate-power-manager-1.22.2.ebuild rename to mate-extra/mate-power-manager/mate-power-manager-1.24.1-r2.ebuild index ecc7912..343f1cf 100644 --- a/mate-extra/mate-power-manager/mate-power-manager-1.22.2.ebuild +++ b/mate-extra/mate-power-manager/mate-power-manager-1.24.1-r2.ebuild @@ -13,7 +13,7 @@ DESCRIPTION="A session daemon for MATE that makes it easy to manage your laptop LICENSE="FDL-1.1+ GPL-2+ LGPL-2+" SLOT="0" -IUSE="+applet elogind gnome-keyring policykit systemd test" +IUSE="+applet elogind libsecret policykit systemd test" REQUIRED_USE="?? ( elogind systemd )" @@ -25,6 +25,7 @@ COMMON_DEPEND=" >=dev-libs/glib-2.50:2 >=media-libs/libcanberra-0.10:0[gtk3] >=sys-apps/dbus-1 + >=sys-power/upower-0.99.8:= >=x11-apps/xrandr-1.3 >=x11-libs/cairo-1 >=x11-libs/gdk-pixbuf-2.11:2 @@ -35,32 +36,37 @@ COMMON_DEPEND=" >=x11-libs/libnotify-0.7:0 x11-libs/pango applet? ( >=mate-base/mate-panel-1.17.0 ) - gnome-keyring? ( >=gnome-base/libgnome-keyring-3 ) - >=sys-power/upower-0.9.23:=" + libsecret? ( >=app-crypt/libsecret-0.11 ) +" RDEPEND="${COMMON_DEPEND} + virtual/libintl policykit? ( >=mate-extra/mate-polkit-1.6 ) systemd? ( sys-apps/systemd ) !systemd? ( elogind? ( sys-auth/elogind ) !elogind? ( >=sys-auth/consolekit-0.9.2 ) - )" + ) +" DEPEND="${COMMON_DEPEND} app-text/docbook-xml-dtd:4.3 app-text/rarian >=app-text/scrollkeeper-dtd-1:1.0 app-text/yelp-tools + dev-libs/libxml2 dev-util/glib-utils - >=dev-util/intltool-0.50.1 - sys-devel/gettext + >=sys-devel/gettext-0.19.8:* virtual/pkgconfig - x11-base/xorg-proto" + x11-base/xorg-proto +" + +PATCHES=( "${FILESDIR}/${P}-libsecret.patch" ) src_configure() { mate_src_configure \ --enable-compile-warnings=minimum \ - $(use_with gnome-keyring keyring) \ + $(use_with libsecret) \ $(use_enable applet applets) \ $(use_enable test tests) } diff --git a/mate-extra/mate-power-manager/metadata.xml b/mate-extra/mate-power-manager/metadata.xml index ff952f0..2eb98c6 100644 --- a/mate-extra/mate-power-manager/metadata.xml +++ b/mate-extra/mate-power-manager/metadata.xml @@ -7,6 +7,7 @@ </maintainer> <use> <flag name="applet">Enable building of the MATE applet.</flag> + <flag name="libsecret">Support locking of keyring via <pkg>app-crypt/libsecret</pkg></flag> </use> <upstream> <remote-id type="github">mate-desktop/mate-power-manager</remote-id>
