use upstream-able patch (upstream merge request 37)

This commit is contained in:
Rex Dieter 2021-07-16 11:33:37 -05:00
parent 08cb85868a
commit 2b34515941
3 changed files with 70 additions and 9 deletions

View File

@ -0,0 +1,63 @@
From 2574422c8459daa063e8b3768bffe0da8fe347b5 Mon Sep 17 00:00:00 2001
From: Rex Dieter <rdieter@gmail.com>
Date: Fri, 16 Jul 2021 11:03:54 -0500
Subject: [PATCH 4/4] Provide systemd user spice-vdagent.service
---
Makefile.am | 5 +++++
configure.ac | 2 ++
data/spice-vdagent.service | 5 +++++
3 files changed, 12 insertions(+)
create mode 100644 data/spice-vdagent.service
diff --git a/Makefile.am b/Makefile.am
index e8fa4a6..9c30bae 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -167,6 +167,10 @@ systemdunit_DATA = \
$(top_srcdir)/data/spice-vdagentd.service \
$(top_srcdir)/data/spice-vdagentd.socket
+userunitdir = $(SYSTEMDUSERUNITDIR)
+userunit_DATA = \
+ $(top_srcdir)/data/spice-vdagent.service
+
udevrulesdir = $(udevdir)/rules.d
udevrules_DATA = $(top_srcdir)/data/70-spice-vdagentd.rules
@@ -185,6 +189,7 @@ EXTRA_DIST = \
CHANGELOG.md \
data/70-spice-vdagentd.rules \
data/spice-vdagent.desktop \
+ data/spice-vdagent.service \
data/spice-vdagentd \
data/spice-vdagentd.service \
data/spice-vdagentd.socket \
diff --git a/configure.ac b/configure.ac
index 3de9b9b..f6abf3d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -64,7 +64,9 @@ AC_MSG_RESULT($with_init_script)
if test "x$init_systemd" = "xyes"; then
SYSTEMDSYSTEMUNITDIR=`${PKG_CONFIG} systemd --variable=systemdsystemunitdir`
+ SYSTEMDUSERUNITDIR=`${PKG_CONFIG} systemd --variable=systemduserunitdir`
AC_SUBST(SYSTEMDSYSTEMUNITDIR)
+ AC_SUBST(SYSTEMDUSERUNITDIR)
# earlier versions of systemd require a separate libsystemd-daemon library
PKG_CHECK_MODULES([LIBSYSTEMD_DAEMON],
[libsystemd >= 209],
diff --git a/data/spice-vdagent.service b/data/spice-vdagent.service
new file mode 100644
index 0000000..09590b9
--- /dev/null
+++ b/data/spice-vdagent.service
@@ -0,0 +1,5 @@
+[Unit]
+Description=Spice guest session agent
+
+[Service]
+ExecStart=/usr/bin/spice-vdagent -x
--
2.31.1

View File

@ -1,5 +0,0 @@
[Unit]
Description=Spice guest session agent
[Service]
ExecStart=/usr/bin/spice-vdagent -x

View File

@ -1,13 +1,12 @@
Name: spice-vdagent
Version: 0.21.0
Release: 3%{?dist}
Release: 4%{?dist}
Summary: Agent for Spice guests
License: GPLv3+
URL: https://spice-space.org/
Source0: https://spice-space.org/download/releases/%{name}-%{version}.tar.bz2
Source1: https://spice-space.org/download/releases/%{name}-%{version}.tar.bz2.sig
Source2: jrope-7FDAB9AF.keyring
Source3: spice-vdagent.service
BuildRequires: make
BuildRequires: systemd-devel
BuildRequires: glib2-devel >= 2.50
@ -20,6 +19,9 @@ BuildRequires: automake autoconf
BuildRequires: gnupg2
%{?systemd_requires}
# https://gitlab.freedesktop.org/spice/linux/vd_agent/-/merge_requests/37/
Patch1: 0004-Provide-systemd-user-spice-vdagent.service.patch
%description
Spice agent for Linux guests offering the following features:
@ -47,8 +49,6 @@ autoreconf -fi
%install
%make_install V=2
install -D -p -m644 %{SOURCE3} %{buildroot}%{_userunitdir}/spice-vdagent.service
%post
%systemd_post spice-vdagentd.service spice-vdagentd.socket
@ -78,6 +78,9 @@ install -D -p -m644 %{SOURCE3} %{buildroot}%{_userunitdir}/spice-vdagent.service
%changelog
* Fri Jul 16 2021 Rex Dieter <rdieter@fedoraproject.org> - 0.21.0-4
- use upstream-able patch (upstream merge request 37)
* Wed Jul 14 2021 Rex Dieter <rdieter@fedoraproject.org> - 0.21.0-3
- add user spice-vdgant.service (#1951580)
- use %%make_build/%%make_install