30 Commits
Author SHA1 Message Date
osy 9070c8ba4d darwin: add script to create installer 2024-11-18 01:48:31 -08:00
osy c729770965 darwin: fix launch scripts 2024-11-17 22:34:41 -08:00
osy b788a2456c darwin: static link GLib, add LaunchDaemon 2024-11-17 13:41:51 -08:00
Daniel Kahn Gillmor 553cb85f10 systemd services: add Documentation key (point to manpage) 2024-07-12 07:00:28 +00:00
Fabian Vogt aa08162f03 Switch to spice-vdagent.service by default
Add an [Install] section to the user unit and tell systemd to ignore the
.desktop file explicitly.

Also add missing ordering dependencies. Without this, the service fails if
it is started before e.g. $DISPLAY is set.
2023-02-09 10:22:01 +01:00
Rex Dieter 3cd58713c9 Provide systemd user spice-vdagent.service 2021-07-16 11:07:39 -05:00
Christian Hesse 26e2eab5d2 Update all paths /var/run -> /run
Commit 098268a33c (systemd: Update path
in unit file) was a really incomplete change. Let's change every
occurrence of /var/run to /run.

Signed-off-by: Christian Hesse <[email protected]>
Acked-by: Frediano Ziglio <[email protected]>
2019-01-17 12:29:30 +00:00
Christian Hesse 098268a33c systemd: Update path in unit file
When loading the unit file, systemd 240 logs:

systemd[1]: /usr/lib/systemd/system/spice-vdagentd.service:9: PIDFile=
references path below legacy directory /var/run/, updating
/var/run/spice-vdagentd/spice-vdagentd.pid →
/run/spice-vdagentd/spice-vdagentd.pid; please update the unit file
accordingly.

So update the path.

Signed-off-by: Christian Hesse <[email protected]>
Acked-by: Frediano Ziglio <[email protected]>
2019-01-15 15:32:50 +00:00
Christophe Fergeau 56d50d2122 systemd: Remove WantedBy=sockets.service in [Install]
.socket systemd units already automatically get a
Before=sockets.service, and the udev rule we have will ensure that when
the appropriate virtio device is there, the socket unit will be started,
so this WantedBy dependency is not needed, and is in part responsible
for these warnings:

[ INFO ] dev-virtio\x2dports-com.redhat.spice.0.device is not active.
[DEPEND] Dependency failed for Activation socket for spice guest agent daemon.

https://bugzilla.redhat.com/show_bug.cgi?id=1545212

Signed-off-by: Christophe Fergeau <[email protected]>
2019-01-08 16:19:58 +01:00
Christophe Fergeau b07420eea0 systemd: Remove unneded virtio-port dependencies
The udev rule already adds SYSTEMD_WANTS=spice-vdagentd.socket
to the relevant virtio devices, which automatically adds Wants=${device}
to spice-vdagentd.socket (see 'systemctl show spice-vdagentd.socket').
Adding a Requisite/After for these ports is at best redundant, and most
likely wrong as this is causing boot time warnings:

[ INFO ] dev-virtio\x2dports-com.redhat.spice.0.device is not active.
[DEPEND] Dependency failed for Activation socket for spice guest agent daemon.

https://bugzilla.redhat.com/show_bug.cgi?id=1545212

Signed-off-by: Christophe Fergeau <[email protected]>
2019-01-08 16:19:58 +01:00
Jonathon Jongsma 102b2e753e systemd: use "After" with "Requisite"
The "Requisite" directive is intended to require that the virtio port
device exists before starting the vdagent socket unit. If the device
does not exist, the socket should fail to start. However, without using
"After", the socket will still start even when the device is not
present.

The man page for systemd.unit (v239+) says the following about
'Requisite=':

"Similar to Requires=. However, if the units listed here are not
started already, they will not be started and the starting of this unit
will fail immediately. Requisite= does not imply an ordering
dependency, even if both units are started in the same transaction.
Hence this setting should usually be combined with After=, to ensure
this unit is not started before the other unit."

See also https://github.com/systemd/systemd/issues/4756 for further
details (particularly the following comment:
https://github.com/systemd/systemd/issues/4756#issuecomment-267005324)

Signed-off-by: Jonathon Jongsma <[email protected]>
Acked-by: Lukáš Hrázký <[email protected]>
2018-11-02 11:07:40 -05:00
Victor Toso 16e3dc1035 spice-vdagent.desktop: Change autostart to WindowManager stage
It is possible that g_get_user_special_dir() return NULL for
G_USER_DIRECTORY_DESKTOP or G_USER_DIRECTORY_DOWNLOAD; This is a sure
thing to happen in case xdg-user-dirs hasn't been run yet.

Keeping spice-vdagent to run on Initialization stage of
X-GNOME-Autostart-Phase could trigger a race with xdg-user-dirs that
also runs on Initialization, which is the earliest stage possible.

Moving to spice-vdagent to run WindowManager stage avoids the race
with xdg-user-dirs and still runs before any graphical application.

Tested also moving to Desktop stage, which is 4th stage (out of 5) and
worked without apparent drawbacks.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1623947
Signed-off-by: Victor Toso <[email protected]>
Acked-by: Uri Lublin <[email protected]>
2018-09-13 11:26:41 +02:00
Jonathon Jongsma 183e2fec35 Add systemd socket activation
If we are configured to use the systemd init script, also add support
for systemd socket activation. systemd will listen on the socket that is
used to communicate between the session agent and the system daemon.
When the session agent connects, the system daemon will automatically be
started. The socket will be enabled only if the required virtio-port
device exists. The socket is disabled when the device is removed.

This has a couple minor advantages to the previous approach:
  - For VMS that are not running a graphical desktop (and thus no
    session agents are running), the system vdagent daemon won't get
    started at all even if the spice virtio port is configured. Only the
    socket will be enabled. In the previous approach, the system daemon
    was started when the virtio device was added regardless of whether
    it was needed or not.
  - Solves issues related to switching between systemd targets. With the
    previous approach, when a user switches to a different target
    ("systemctl isolate multi-user.target"), spice-vdagentd.target was
    stopped by systemd (since "isolate" by definition stops all targets
    except the one specified). This meant that if the user subsequently
    switched back to graphical.target, the spice-vdagentd.target would
    still be disabled and vdagent functionality would not work. With
    this change, the socket will still be listening after switching to a
    different target, so as soon as a session agent tries to connect to
    the socket, the system daemon will get restarted.

Fixes: rhbz#1340160

Signed-off-by: Jonathon Jongsma <[email protected]>
Acked-by: Victor Toso <[email protected]>
2017-07-24 11:32:21 -05:00
Francois Gouget 80d9d1f2f8 vdagent: Spelling fixes for the man page and traces
Signed-off-by: Francois Gouget <[email protected]>
Acked-by: Christophe Fergeau <[email protected]>
2017-04-07 10:51:35 +02:00
Francois Gouget 05706b6e8f vdagentd: Spelling fixes for the man page and traces
Signed-off-by: Francois Gouget <[email protected]>
Acked-by: Christophe Fergeau <[email protected]>
2017-04-07 10:51:33 +02:00
Jeremy Bicha b7e6c56a78 spice-vdagent.desktop: Set NoDisplay=true
Ubuntu's Unity still ships the Startup Applications app
(gnome-session-properties).

Setting NoDisplay=true means this autostart file won't show up in there
since this isn't something we really want users to unknowingly disable
that easily.

Resolves: https://bugs.freedesktop.org/show_bug.cgi?id=98465
2016-10-31 17:27:35 +01:00
Uri Lublin e7f7876190 man: vdagentd: document -f (fake) and -o (once) command line options
Added by commits: 251637aa23 and 1c25f882a
2015-06-01 17:59:37 +03:00
Marc-André Lureau 072fb03fa4 data: remove rsyslog config files
Many systems don't use rsyslog, others don't need seperate syslog files
for vdagent.

With systemd journal, It's possible to filter
spice-vdagent/spice-vdagentd log messages out of /var/log/messages:
journalctl SYSLOG_IDENTIFIER=spice-vdagent SLOG_IDENTIFIER=spice-vdagentd

This simplify spice-vdagent packaging and updates, since there are no
config files to deal with.

Related:
https://bugzilla.redhat.com/show_bug.cgi?id=1136881
2014-09-08 11:34:51 +02:00
Hans de Goede 16911aa300 Drop the no longer needed modules-load.d/spice-vdagentd.conf
Now a days udev will create a /dev/uinput node without the module being loaded
based on devname:uinput from the modinfo, allowing the module to be correctly
auto-loaded when needed.

https://bugzilla.redhat.com/show_bug.cgi?id=963201

Signed-off-by: Hans de Goede <[email protected]>
2013-05-20 10:57:28 +02:00
Hans de Goede f55ecd9647 Add manpages for spice-vdagent and spice-vdagentd (rhbz#948511)
Signed-off-by: Hans de Goede <[email protected]>
2013-04-12 15:37:53 +02:00
Hans de Goede 4d2fef916b spice-vdagent.desktop: Drop X-GNOME-AutoRestart
When not running under a spice-vdagent vm we automatically exit, and we should
not be auto-restarted then -> Drop X-GNOME-AutoRestart from our .desktop file.

Signed-off-by: Hans de Goede <[email protected]>
2013-04-05 14:49:54 +02:00
Hans de Goede ff8a316166 Set systemd service file type to forking
Signed-off-by: Hans de Goede <[email protected]>
2012-08-27 10:50:24 +02:00
Hans de Goede 9574a9102a Use hardware activation for systemd service
Make the systemd service trigger on the addition of
/dev/virtio-ports/com.redhat.spice.0

Signed-off-by: Hans de Goede <[email protected]>
2012-08-26 13:37:43 +02:00
Hans de Goede bd6ecd7652 Add rsyslog config file to put spice-vdagent logs into their own file
Signed-off-by: Hans de Goede <[email protected]>
2012-08-24 20:55:07 +02:00
Marc-André Lureau 15870635f4 Add systemd scripts 2012-08-24 20:26:58 +02:00
Marc-André Lureau 74dbfd11ea repo: move to tmpfiles.d/spice-vdagentd.conf
There are other spice-vdagentd.conf files coming.
2012-08-24 20:22:29 +02:00
Hans de Goede 7ff55ae020 Add a RHEL-5 README and xorg.conf example file
Signed-off-by: Hans de Goede <[email protected]>
2012-01-10 13:26:58 +01:00
Hans de Goede 9bd22a5c99 Add tmpfiles.d entry for /var/run/spice-vdagentd
So that this dir exists when the spice-vdagentd starts.
2011-04-19 16:16:00 +02:00
Christophe Fergeau 9145b7b29d spice-vdagentd initscript should have +x
It was mistakenly marked as non-executable, resulting in a
non-functional script after installation.
2011-04-19 16:12:33 +02:00
Christophe Fergeau dba9746d52 autotools: move data files to a data/ subdir 2011-04-04 14:02:21 +02:00