[Spice-devel] [PATCH spice-streaming-agent v3 1/5] Install udev rule
Uri Lublin
uril at redhat.com
Thu May 31 20:42:15 UTC 2018
On 05/23/2018 12:03 PM, Frediano Ziglio wrote:
> The udev rule is used to do some action when the device is added to the
> system. Current rule change the permission of the special file to allow to
> open it by any user.
> Some systems use /lib/udev while others use /usr/lib/udev.
> Allow to specify the full path to support both type of systems.
>
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> ---
> Makefile.am | 4 ++++
> configure.ac | 10 ++++++++++
> spice-streaming-agent.spec.in | 4 +++-
> 3 files changed, 17 insertions(+), 1 deletion(-)
>
> Changes since v2:
> - use pkg-config to get default udev directory
Hi,
This fails make install and make distcheck (regular user can not
install files under /usr/lib/ ... ) .
I changed this patch as follows (v4):
- do not install the udev rule (remove this part from Makefile.am)
- do not change configure.ac (no need for UDEVRULESDIR anymore)
- spec-file: do not change configure
- spec-file: copy (install) the udev-rule directly
Uri.
=====
From e5b7287fb7908e2d3ced19b229d61ca4540134f5 Mon Sep 17 00:00:00 2001
From: Frediano Ziglio <fziglio at redhat.com>
Date: Thu, 31 May 2018 22:19:59 +0300
Subject: [PATCH spice-streaming-agent v3 1/5] spec-file: add udev rule
The udev rule is used to do some action when the device is added to the
system. Current rule changes the permission of the virtio serial port device
to allow opening it by any user.
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
Signed-off-by: Uri Lublin <uril at redhat.com>
---
Makefile.am | 1 +
spice-streaming-agent.spec.in | 5 +++++
2 files changed, 6 insertions(+)
diff --git a/Makefile.am b/Makefile.am
index 94ad7aa..291a883 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -18,5 +18,6 @@ pkgconfig_DATA = spice-streaming-agent.pc
EXTRA_DIST = \
spice-streaming-agent.spec \
spice-streaming-agent.pc \
+ data/90-spice-guest-streaming.rules \
data/spice-streaming.desktop \
$(NULL)
diff --git a/spice-streaming-agent.spec.in b/spice-streaming-agent.spec.in
index 132a851..ec144f6 100644
--- a/spice-streaming-agent.spec.in
+++ b/spice-streaming-agent.spec.in
@@ -10,6 +10,7 @@ BuildRequires: spice-protocol >= @SPICE_PROTOCOL_MIN_VER@
BuildRequires: libX11-devel libXfixes-devel
BuildRequires: libjpeg-turbo-devel
BuildRequires: catch-devel
+BuildRequires: pkgconfig(udev)
# we need /usr/sbin/semanage program which is available on different
# packages depending on distribution
Requires(post): /usr/sbin/semanage
@@ -43,6 +44,9 @@ if test -d "%{buildroot}/%{_libdir}/%{name}/plugins"; then
find %{buildroot}/%{_libdir}/%{name}/plugins -name '*.la' -delete
fi
+mkdir -p %{buildroot}/%{_udevrulesdir}
+install data/90-spice-guest-streaming.rules %{buildroot}/%{_udevrulesdir}
+
%post
semanage fcontext -a -t xserver_exec_t
%{_bindir}/spice-streaming-agent 2>/dev/null || :
restorecon %{_bindir}/spice-streaming-agent || :
@@ -55,6 +59,7 @@ fi
%files
%doc COPYING ChangeLog README
+%{_udevrulesdir}/90-spice-guest-streaming.rules
%{_bindir}/spice-streaming-agent
%{_sysconfdir}/xdg/autostart/spice-streaming.desktop
%{_datadir}/gdm/greeter/autostart/spice-streaming.desktop
--
2.17.0
More information about the Spice-devel
mailing list