Mail archive
alpine-aports

[alpine-aports] [PATCH 16/34] community/mate-session-manager: upgrade to 1.22.0

From: Paul Bredbury <brebs_at_sent.com>
Date: Sun, 24 Mar 2019 21:46:24 +0000

---
 community/mate-session-manager/APKBUILD       |  8 ++-
 .../systemd-dependency.patch                  | 67 +++++++++++++++++++
 2 files changed, 72 insertions(+), 3 deletions(-)
 create mode 100644 community/mate-session-manager/systemd-dependency.patch
diff --git a/community/mate-session-manager/APKBUILD b/community/mate-session-manager/APKBUILD
index 0b426755fb..8e35dc2a98 100644
--- a/community/mate-session-manager/APKBUILD
+++ b/community/mate-session-manager/APKBUILD
_at_@ -1,7 +1,7 @@
 # Contributor: Alan Lacerda <alacerda_at_alpinelinux.org>
 # Maintainer: Alan Lacerda <alacerda_at_alpinelinux.org>
 pkgname=mate-session-manager
-pkgver=1.21.0
+pkgver=1.22.0
 pkgrel=0
 pkgdesc="The MATE session manager"
 url="https://github.com/mate-desktop/mate-session-manager"
_at_@ -11,7 +11,8 @@ depends="mate-common mate-desktop"
 makedepends="intltool libtool dconf-dev dbus-glib-dev gtk+3.0-dev
 	libsm-dev mate-desktop-dev"
 subpackages="$pkgname-doc $pkgname-lang"
-source="https://pub.mate-desktop.org/releases/${pkgver%.*}/$pkgname-$pkgver.tar.xz"
+source="https://pub.mate-desktop.org/releases/${pkgver%.*}/$pkgname-$pkgver.tar.xz
+	systemd-dependency.patch"
 builddir="$srcdir/$pkgname-$pkgver"
 
 build() {
_at_@ -34,4 +35,5 @@ package() {
 	make DESTDIR="${pkgdir}" install
 }
 
-sha512sums="fefe9566b0bcc682c093101f892e546dfc01c5ce0ea492a5fb6654bdc8178675e746c6b1c6b2ae519b5767615f32a7e58c9b296f86da7b26c789df3b1c6a794f  mate-session-manager-1.21.0.tar.xz"
+sha512sums="7e5e21e37c7ac55ca7d71302edef9aabeccf39233aec9edfe93a2fdcd4150d039e8121adecebb3d0a4a707eccef0c7afa1b54c5b52b57853242964c7506eeb9a  mate-session-manager-1.22.0.tar.xz
+0291b0c9f1bc07043ab8ec6f209d46b85e5cfea6bc057f87da9e0db15f61374cb063d57e809ea2c236489e2eb2bca0b0ef289507d4ace9eee47d77e1c0359385  systemd-dependency.patch"
diff --git a/community/mate-session-manager/systemd-dependency.patch b/community/mate-session-manager/systemd-dependency.patch
new file mode 100644
index 0000000000..912a5e1b50
--- /dev/null
+++ b/community/mate-session-manager/systemd-dependency.patch
_at_@ -0,0 +1,67 @@
+From https://github.com/mate-desktop/mate-session-manager/commit/254a091b31517a25bc037b31daff27fbb74ac90d
+
+From 254a091b31517a25bc037b31daff27fbb74ac90d Mon Sep 17 00:00:00 2001
+From: Victor Kareh <vkareh_at_redhat.com>
+Date: Wed, 6 Mar 2019 09:20:36 -0500
+Subject: [PATCH] Guard against missing systemd
+
+---
+ mate-session/gsm-systemd.c | 19 +++++++++++++++++++
+ 1 file changed, 19 insertions(+)
+
+diff --git a/mate-session/gsm-systemd.c b/mate-session/gsm-systemd.c
+index da3f23b..d03cafd 100644
+--- a/mate-session/gsm-systemd.c
++++ b/mate-session/gsm-systemd.c
+_at_@ -429,16 +429,31 @@ gsm_systemd_is_last_session_for_user (GsmSystemd *manager)
+         gboolean is_last_session;
+         int ret, i;
+ 
++#ifdef HAVE_SYSTEMD
+         ret = sd_pid_get_session (getpid (), &session);
++#endif
++
++        if (session == NULL) {
++                return FALSE;
++        }
+ 
+         if (ret != 0) {
++                free (session);
+                 return FALSE;
+         }
+ 
++#ifdef HAVE_SYSTEMD
+         ret = sd_uid_get_sessions (getuid (), FALSE, &sessions);
++#endif
++
++        if (sessions == NULL) {
++                free (session);
++                return FALSE;
++        }
+ 
+         if (ret <= 0) {
+                 free (session);
++                free (sessions);
+                 return FALSE;
+         }
+ 
+_at_@ -450,7 +465,9 @@ gsm_systemd_is_last_session_for_user (GsmSystemd *manager)
+                 if (g_strcmp0 (sessions[i], session) == 0)
+                         continue;
+ 
++#ifdef HAVE_SYSTEMD
+                 ret = sd_session_get_state (sessions[i], &state);
++#endif
+ 
+                 if (ret != 0)
+                         continue;
+_at_@ -461,7 +478,9 @@ gsm_systemd_is_last_session_for_user (GsmSystemd *manager)
+                 }
+                 free (state);
+ 
++#ifdef HAVE_SYSTEMD
+                 ret = sd_session_get_type (sessions[i], &type);
++#endif
+ 
+                 if (ret != 0)
+                         continue;
-- 
2.21.0
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Sun Mar 24 2019 - 21:46:24 UTC