[arch-commits] Commit in spice-vdagent/trunk (PKGBUILD)

2020-05-28 Thread Balló György via arch-commits
Date: Thursday, May 28, 2020 @ 09:36:30
  Author: bgyorgy
Revision: 636211

upgpkg: spice-vdagent 0.20.0+6+g8adf50d-1: Update to git master to fix shutdown 
problems (FS#65870)

Modified:
  spice-vdagent/trunk/PKGBUILD

--+
 PKGBUILD |   46 +-
 1 file changed, 29 insertions(+), 17 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2020-05-28 09:26:36 UTC (rev 636210)
+++ PKGBUILD2020-05-28 09:36:30 UTC (rev 636211)
@@ -2,7 +2,7 @@
 # Contributor: mutantmonkey 
 
 pkgname=spice-vdagent
-pkgver=0.20.0
+pkgver=0.20.0+6+g8adf50d
 pkgrel=1
 pkgdesc="Spice agent for Linux guests"
 arch=('x86_64')
@@ -9,29 +9,41 @@
 url="https://www.spice-space.org/;
 license=('GPL')
 depends=('alsa-lib' 'dbus' 'glib2' 'gtk3' 'libdrm' 'libpciaccess' 'libxfixes' 
'libxinerama' 'libxrandr' 'systemd')
-makedepends=('spice-protocol')
+makedepends=('spice-protocol' 'git')
+checkdepends=('procps-ng')
 backup=('etc/conf.d/spice-vdagentd')
-source=("https://www.spice-space.org/download/releases/$pkgname-$pkgver.tar.bz2;)
-sha256sums=('2e6b7222675ee19ea38c52165abe4d836c2ac5d5bf902d4dfca13da1ec143359')
+_commit=8adf50de9ae6714e7a994aba7f6efa9f9528471e  # master
+source=("git+https://gitlab.freedesktop.org/spice/linux/vd_agent.git#commit=$_commit;)
+sha256sums=('SKIP')
 
+pkgver() {
+  cd vd_agent
+  git describe --tags | sed 's/^spice-vdagent-//;s/-/+/g'
+}
+
 prepare() {
-   cd $pkgname-$pkgver
-   sed -i 's|/etc/sysconfig/spice-vdagentd|/etc/conf.d/spice-vdagentd|
-   s|/usr/sbin/spice-vdagentd|/usr/bin/spice-vdagentd|' 
data/spice-vdagentd.service
-   sed -i 's|/etc/sysconfig/spice-vdagentd|/etc/conf.d/spice-vdagentd|' 
data/spice-vdagentd.1.in
+  cd vd_agent
+  sed -i 's|/etc/sysconfig/spice-vdagentd|/etc/conf.d/spice-vdagentd|
+  s|/usr/sbin/spice-vdagentd|/usr/bin/spice-vdagentd|' 
data/spice-vdagentd.service
+  sed -i 's|/etc/sysconfig/spice-vdagentd|/etc/conf.d/spice-vdagentd|' 
data/spice-vdagentd.1.in
+  NOCONFIGURE=1 ./autogen.sh
 }
 
 build() {
-   cd $pkgname-$pkgver
-   ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var 
--sbindir=/usr/bin \
-   --with-session-info=systemd --with-init-script=systemd
-   make
+  cd vd_agent
+  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var 
--sbindir=/usr/bin \
+  --with-session-info=systemd --with-init-script=systemd
+  make
 }
 
+check() {
+  make -C vd_agent check
+}
+
 package() {
-   cd $pkgname-$pkgver
-   make DESTDIR="$pkgdir" install
-   rm -r "$pkgdir/var"
-   install -dm755 "$pkgdir/etc/conf.d/"
-   echo 'SPICE_VDAGENTD_EXTRA_ARGS=""' > 
"$pkgdir/etc/conf.d/spice-vdagentd"
+  cd vd_agent
+  make DESTDIR="$pkgdir" install
+  rm -r "$pkgdir/var"
+  install -dm755 "$pkgdir/etc/conf.d/"
+  echo 'SPICE_VDAGENTD_EXTRA_ARGS=""' > "$pkgdir/etc/conf.d/spice-vdagentd"
 }


[arch-commits] Commit in spice-vdagent/trunk (PKGBUILD gnome-3.34.patch)

2020-03-15 Thread Balló György via arch-commits
Date: Sunday, March 15, 2020 @ 20:20:48
  Author: bgyorgy
Revision: 598512

upgpkg: spice-vdagent 0.20.0-1: Update to new version

Modified:
  spice-vdagent/trunk/PKGBUILD
Deleted:
  spice-vdagent/trunk/gnome-3.34.patch

--+
 PKGBUILD |   14 ++-
 gnome-3.34.patch |   95 -
 2 files changed, 4 insertions(+), 105 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2020-03-15 20:20:42 UTC (rev 598511)
+++ PKGBUILD2020-03-15 20:20:48 UTC (rev 598512)
@@ -2,8 +2,8 @@
 # Contributor: mutantmonkey 
 
 pkgname=spice-vdagent
-pkgver=0.19.0
-pkgrel=2
+pkgver=0.20.0
+pkgrel=1
 pkgdesc="Spice agent for Linux guests"
 arch=('x86_64')
 url="https://www.spice-space.org/;
@@ -11,17 +11,11 @@
 depends=('alsa-lib' 'dbus' 'glib2' 'gtk3' 'libdrm' 'libpciaccess' 'libxfixes' 
'libxinerama' 'libxrandr' 'systemd')
 makedepends=('spice-protocol')
 backup=('etc/conf.d/spice-vdagentd')
-source=("https://www.spice-space.org/download/releases/$pkgname-$pkgver.tar.bz2;
-"gnome-3.34.patch")
-sha256sums=('63a77c611c84f8120519a78a30256e43e159085831ac82de71643db643972f65'
-'cde285aba68b2949bc2ae4b5351691a3fd0b6d5a618623ea6d1a420c7ec56c7d')
+source=("https://www.spice-space.org/download/releases/$pkgname-$pkgver.tar.bz2;)
+sha256sums=('2e6b7222675ee19ea38c52165abe4d836c2ac5d5bf902d4dfca13da1ec143359')
 
 prepare() {
cd $pkgname-$pkgver
-
-   # Fix session lookup for new GNOME versions
-   patch -Np1 -i ../gnome-3.34.patch
-
sed -i 's|/etc/sysconfig/spice-vdagentd|/etc/conf.d/spice-vdagentd|
s|/usr/sbin/spice-vdagentd|/usr/bin/spice-vdagentd|' 
data/spice-vdagentd.service
sed -i 's|/etc/sysconfig/spice-vdagentd|/etc/conf.d/spice-vdagentd|' 
data/spice-vdagentd.1.in

Deleted: gnome-3.34.patch
===
--- gnome-3.34.patch2020-03-15 20:20:42 UTC (rev 598511)
+++ gnome-3.34.patch2020-03-15 20:20:48 UTC (rev 598512)
@@ -1,95 +0,0 @@
-From a494b8e799715ddf934ff4bd92a358a66204eb83 Mon Sep 17 00:00:00 2001
-From: Benjamin Berg 
-Date: Fri, 13 Sep 2019 17:00:27 +0200
-Subject: [PATCH] vdagentd: Fix session lookup for new GNOME versions
-
-New GNOME versions have started to manage the session using the systemd
-user instance. The effect of this is that the spice-vdagent running in
-the user session is forked off (indirectly) from the systemd user
-instance and does technically not belong to any session.
-
-The correct way of handling this situation is to simply assume that the
-process belongs to the users graphical session. Add a heuristic to find
-the graphical session based on the UID, fixing spice-vdagent running on
-GNOME 3.34 with systemd integration.

- src/vdagentd/systemd-login.c | 58 +---
- 1 file changed, 54 insertions(+), 4 deletions(-)
-
-diff --git a/src/vdagentd/systemd-login.c b/src/vdagentd/systemd-login.c
-index a11b66d..2e237ae 100644
 a/src/vdagentd/systemd-login.c
-+++ b/src/vdagentd/systemd-login.c
-@@ -286,15 +286,65 @@ const char *session_info_get_active_session(struct 
session_info *si)
- 
- char *session_info_session_for_pid(struct session_info *si, uint32_t pid)
- {
-+int i;
- int r;
-+GStrv sessions = NULL;
- char *session = NULL;
-+uid_t uid;
- 
- r = sd_pid_get_session(pid, );
--if (r < 0)
--syslog(LOG_ERR, "Error getting session for pid %u: %s",
--pid, strerror(-r));
--else if (si->verbose)
-+if (r >= 0)
-+goto out;
-+
-+/* If we could not get a session for the pid then the agent is probably
-+ * running in a systemd managed session. In that case we simply assume
-+ * it is actually part of the newest graphical session we can find. */
-+r = sd_pid_get_owner_uid(pid, );
-+if (r < 0) {
-+syslog(LOG_ERR, "Error getting owner UID for pid %u: %s",
-+   pid, strerror(-r));
-+goto out;
-+}
-+
-+r = sd_uid_get_sessions(uid, 0, );
-+if (r < 0) {
-+syslog(LOG_ERR, "Error getting sessions for UID %d: %s",
-+   (int) uid, strerror(-r));
-+goto out;
-+}
-+
-+for (i = 0; sessions[i] != NULL; i++) {
-+char *session_type = NULL;
-+
-+r = sd_session_get_type(sessions[i], _type);
-+
-+if (r < 0) {
-+syslog(LOG_ERR, "Error getting session type for session %s: %s",
-+   sessions[i], strerror(-r));
-+continue;
-+}
-+
-+if (g_strcmp0(session_type, "wayland") == 0 ||
-+g_strcmp0(session_type, "x11") == 0 ||
-+g_strcmp0(session_type, "mir") == 0) {
-+
-+/* We prefer the newest session (i.e. last entry) from the
-+ * user, assuming that any old session that still exist has
-+ * just not yet died properly. */
-+if 

[arch-commits] Commit in spice-vdagent/trunk (PKGBUILD gnome-3.34.patch)

2019-10-03 Thread Balló György via arch-commits
Date: Thursday, October 3, 2019 @ 21:51:41
  Author: bgyorgy
Revision: 512576

upgpkg: spice-vdagent 0.19.0-2

Fix session lookup for new GNOME versions

Added:
  spice-vdagent/trunk/gnome-3.34.patch
Modified:
  spice-vdagent/trunk/PKGBUILD

--+
 PKGBUILD |   12 +-
 gnome-3.34.patch |   95 +
 2 files changed, 104 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2019-10-03 21:51:10 UTC (rev 512575)
+++ PKGBUILD2019-10-03 21:51:41 UTC (rev 512576)
@@ -3,7 +3,7 @@
 
 pkgname=spice-vdagent
 pkgver=0.19.0
-pkgrel=1
+pkgrel=2
 pkgdesc="Spice agent for Linux guests"
 arch=('x86_64')
 url="https://www.spice-space.org/;
@@ -11,11 +11,17 @@
 depends=('alsa-lib' 'dbus' 'glib2' 'gtk3' 'libdrm' 'libpciaccess' 'libxfixes' 
'libxinerama' 'libxrandr' 'systemd')
 makedepends=('spice-protocol')
 backup=('etc/conf.d/spice-vdagentd')
-source=("https://www.spice-space.org/download/releases/$pkgname-$pkgver.tar.bz2;)
-sha256sums=('63a77c611c84f8120519a78a30256e43e159085831ac82de71643db643972f65')
+source=("https://www.spice-space.org/download/releases/$pkgname-$pkgver.tar.bz2;
+"gnome-3.34.patch")
+sha256sums=('63a77c611c84f8120519a78a30256e43e159085831ac82de71643db643972f65'
+'cde285aba68b2949bc2ae4b5351691a3fd0b6d5a618623ea6d1a420c7ec56c7d')
 
 prepare() {
cd $pkgname-$pkgver
+
+   # Fix session lookup for new GNOME versions
+   patch -Np1 -i ../gnome-3.34.patch
+
sed -i 's|/etc/sysconfig/spice-vdagentd|/etc/conf.d/spice-vdagentd|
s|/usr/sbin/spice-vdagentd|/usr/bin/spice-vdagentd|' 
data/spice-vdagentd.service
sed -i 's|/etc/sysconfig/spice-vdagentd|/etc/conf.d/spice-vdagentd|' 
data/spice-vdagentd.1.in

Added: gnome-3.34.patch
===
--- gnome-3.34.patch(rev 0)
+++ gnome-3.34.patch2019-10-03 21:51:41 UTC (rev 512576)
@@ -0,0 +1,95 @@
+From a494b8e799715ddf934ff4bd92a358a66204eb83 Mon Sep 17 00:00:00 2001
+From: Benjamin Berg 
+Date: Fri, 13 Sep 2019 17:00:27 +0200
+Subject: [PATCH] vdagentd: Fix session lookup for new GNOME versions
+
+New GNOME versions have started to manage the session using the systemd
+user instance. The effect of this is that the spice-vdagent running in
+the user session is forked off (indirectly) from the systemd user
+instance and does technically not belong to any session.
+
+The correct way of handling this situation is to simply assume that the
+process belongs to the users graphical session. Add a heuristic to find
+the graphical session based on the UID, fixing spice-vdagent running on
+GNOME 3.34 with systemd integration.
+---
+ src/vdagentd/systemd-login.c | 58 +---
+ 1 file changed, 54 insertions(+), 4 deletions(-)
+
+diff --git a/src/vdagentd/systemd-login.c b/src/vdagentd/systemd-login.c
+index a11b66d..2e237ae 100644
+--- a/src/vdagentd/systemd-login.c
 b/src/vdagentd/systemd-login.c
+@@ -286,15 +286,65 @@ const char *session_info_get_active_session(struct 
session_info *si)
+ 
+ char *session_info_session_for_pid(struct session_info *si, uint32_t pid)
+ {
++int i;
+ int r;
++GStrv sessions = NULL;
+ char *session = NULL;
++uid_t uid;
+ 
+ r = sd_pid_get_session(pid, );
+-if (r < 0)
+-syslog(LOG_ERR, "Error getting session for pid %u: %s",
+-pid, strerror(-r));
+-else if (si->verbose)
++if (r >= 0)
++goto out;
++
++/* If we could not get a session for the pid then the agent is probably
++ * running in a systemd managed session. In that case we simply assume
++ * it is actually part of the newest graphical session we can find. */
++r = sd_pid_get_owner_uid(pid, );
++if (r < 0) {
++syslog(LOG_ERR, "Error getting owner UID for pid %u: %s",
++   pid, strerror(-r));
++goto out;
++}
++
++r = sd_uid_get_sessions(uid, 0, );
++if (r < 0) {
++syslog(LOG_ERR, "Error getting sessions for UID %d: %s",
++   (int) uid, strerror(-r));
++goto out;
++}
++
++for (i = 0; sessions[i] != NULL; i++) {
++char *session_type = NULL;
++
++r = sd_session_get_type(sessions[i], _type);
++
++if (r < 0) {
++syslog(LOG_ERR, "Error getting session type for session %s: %s",
++   sessions[i], strerror(-r));
++continue;
++}
++
++if (g_strcmp0(session_type, "wayland") == 0 ||
++g_strcmp0(session_type, "x11") == 0 ||
++g_strcmp0(session_type, "mir") == 0) {
++
++/* We prefer the newest session (i.e. last entry) from the
++ * user, assuming that any old session that still exist has
++ * just not yet died properly. */
++if (session != NULL)
++

[arch-commits] Commit in spice-vdagent/trunk (PKGBUILD)

2019-06-19 Thread Balló György via arch-commits
Date: Wednesday, June 19, 2019 @ 12:11:26
  Author: bgyorgy
Revision: 482343

upgpkg: spice-vdagent 0.19.0-1

Update to new version

Modified:
  spice-vdagent/trunk/PKGBUILD

--+
 PKGBUILD |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2019-06-19 11:39:52 UTC (rev 482342)
+++ PKGBUILD2019-06-19 12:11:26 UTC (rev 482343)
@@ -2,17 +2,17 @@
 # Contributor: mutantmonkey 
 
 pkgname=spice-vdagent
-pkgver=0.18.0
+pkgver=0.19.0
 pkgrel=1
 pkgdesc="Spice agent for Linux guests"
 arch=('x86_64')
 url="https://www.spice-space.org/;
 license=('GPL')
-depends=('alsa-lib' 'dbus' 'glib2' 'libpciaccess' 'libxfixes' 'libxinerama' 
'libxrandr' 'systemd')
+depends=('alsa-lib' 'dbus' 'glib2' 'gtk3' 'libdrm' 'libpciaccess' 'libxfixes' 
'libxinerama' 'libxrandr' 'systemd')
 makedepends=('spice-protocol')
 backup=('etc/conf.d/spice-vdagentd')
 
source=("https://www.spice-space.org/download/releases/$pkgname-$pkgver.tar.bz2;)
-sha256sums=('80ee7ee3c7c17dbb5cb6f64d4cc0b27a9f81856b21038cbca9a007c9afdabeae')
+sha256sums=('63a77c611c84f8120519a78a30256e43e159085831ac82de71643db643972f65')
 
 prepare() {
cd $pkgname-$pkgver


[arch-commits] Commit in spice-vdagent/trunk (PKGBUILD)

2018-07-04 Thread Balló György via arch-commits
Date: Wednesday, July 4, 2018 @ 23:36:31
  Author: bgyorgy
Revision: 352252

upgpkg: spice-vdagent 0.18.0-1

Update to new version

Modified:
  spice-vdagent/trunk/PKGBUILD

--+
 PKGBUILD |7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2018-07-04 23:29:53 UTC (rev 352251)
+++ PKGBUILD2018-07-04 23:36:31 UTC (rev 352252)
@@ -3,8 +3,8 @@
 # Contributor: mutantmonkey 
 
 pkgname=spice-vdagent
-pkgver=0.17.0
-pkgrel=3
+pkgver=0.18.0
+pkgrel=1
 pkgdesc="Spice agent for Linux guests"
 arch=('x86_64')
 url="https://www.spice-space.org/;
@@ -13,11 +13,10 @@
 makedepends=('spice-protocol')
 backup=('etc/conf.d/spice-vdagentd')
 
source=("https://www.spice-space.org/download/releases/$pkgname-$pkgver.tar.bz2;)
-sha256sums=('f14a8bd8cdee10641aabd9ba32461a5844eab0fddb2a10c1d31386e7a9f7b33d')
+sha256sums=('80ee7ee3c7c17dbb5cb6f64d4cc0b27a9f81856b21038cbca9a007c9afdabeae')
 
 prepare() {
cd $pkgname-$pkgver
-   sed -i 's|/lib/udev/rules.d|$(libdir)/udev/rules.d|' Makefile.{am,in}
sed -i 's|/etc/sysconfig/spice-vdagentd|/etc/conf.d/spice-vdagentd|
s|/usr/sbin/spice-vdagentd|/usr/bin/spice-vdagentd|' 
data/spice-vdagentd.service
sed -i 's|/etc/sysconfig/spice-vdagentd|/etc/conf.d/spice-vdagentd|' 
data/spice-vdagentd.1.in


[arch-commits] Commit in spice-vdagent/trunk (PKGBUILD spice-vdagent.install)

2017-01-21 Thread Balló György
Date: Saturday, January 21, 2017 @ 20:52:54
  Author: bgyorgy
Revision: 208328

upgpkg: spice-vdagent 0.17.0-3

Hooks rebuild

Modified:
  spice-vdagent/trunk/PKGBUILD
Deleted:
  spice-vdagent/trunk/spice-vdagent.install

---+
 PKGBUILD  |7 +++
 spice-vdagent.install |7 ---
 2 files changed, 3 insertions(+), 11 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2017-01-21 20:49:17 UTC (rev 208327)
+++ PKGBUILD2017-01-21 20:52:54 UTC (rev 208328)
@@ -4,15 +4,14 @@
 
 pkgname=spice-vdagent
 pkgver=0.17.0
-pkgrel=2
+pkgrel=3
 pkgdesc="Spice agent for Linux guests"
 arch=('i686' 'x86_64')
 url="https://www.spice-space.org/;
 license=('GPL')
-depends=('alsa-lib' 'dbus' 'glib2' 'libpciaccess' 'libxfixes' 'libxinerama' 
'libxrandr')
-makedepends=('spice-protocol' 'systemd')
+depends=('alsa-lib' 'dbus' 'glib2' 'libpciaccess' 'libxfixes' 'libxinerama' 
'libxrandr' 'systemd')
+makedepends=('spice-protocol')
 backup=('etc/conf.d/spice-vdagentd')
-install=$pkgname.install
 
source=("https://www.spice-space.org/download/releases/$pkgname-$pkgver.tar.bz2;)
 sha256sums=('f14a8bd8cdee10641aabd9ba32461a5844eab0fddb2a10c1d31386e7a9f7b33d')
 

Deleted: spice-vdagent.install
===
--- spice-vdagent.install   2017-01-21 20:49:17 UTC (rev 208327)
+++ spice-vdagent.install   2017-01-21 20:52:54 UTC (rev 208328)
@@ -1,7 +0,0 @@
-post_install() {
-   systemd-tmpfiles --create "/usr/lib/tmpfiles.d/spice-vdagentd.conf"
-}
-
-post_upgrade() {
-   post_install
-}


[arch-commits] Commit in spice-vdagent/trunk (PKGBUILD)

2016-12-07 Thread Balló György
Date: Wednesday, December 7, 2016 @ 19:51:20
  Author: bgyorgy
Revision: 198408

Use https source

Modified:
  spice-vdagent/trunk/PKGBUILD

--+
 PKGBUILD |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Modified: PKGBUILD
===
--- PKGBUILD2016-12-07 19:48:13 UTC (rev 198407)
+++ PKGBUILD2016-12-07 19:51:20 UTC (rev 198408)
@@ -7,13 +7,13 @@
 pkgrel=2
 pkgdesc="Spice agent for Linux guests"
 arch=('i686' 'x86_64')
-url="http://www.spice-space.org/;
+url="https://www.spice-space.org/;
 license=('GPL')
 depends=('alsa-lib' 'dbus' 'glib2' 'libpciaccess' 'libxfixes' 'libxinerama' 
'libxrandr')
 makedepends=('spice-protocol' 'systemd')
 backup=('etc/conf.d/spice-vdagentd')
 install=$pkgname.install
-source=("http://www.spice-space.org/download/releases/$pkgname-$pkgver.tar.bz2;)
+source=("https://www.spice-space.org/download/releases/$pkgname-$pkgver.tar.bz2;)
 sha256sums=('f14a8bd8cdee10641aabd9ba32461a5844eab0fddb2a10c1d31386e7a9f7b33d')
 
 prepare() {