Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package spice-vdagent for openSUSE:Factory checked in at 2022-02-15 23:57:05 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/spice-vdagent (Old) and /work/SRC/openSUSE:Factory/.spice-vdagent.new.1956 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "spice-vdagent" Tue Feb 15 23:57:05 2022 rev:22 rq:954381 version:0.22.1 Changes: -------- --- /work/SRC/openSUSE:Factory/spice-vdagent/spice-vdagent.changes 2021-01-18 11:31:39.752643698 +0100 +++ /work/SRC/openSUSE:Factory/.spice-vdagent.new.1956/spice-vdagent.changes 2022-02-15 23:57:18.664217618 +0100 @@ -1,0 +2,17 @@ +Fri Feb 11 11:25:16 MST 2022 - carn...@suse.com + +- Update to version 0.22.1. Features and Issues addressed: + * !40 - Handle side mouse buttons + * !39 - Set retry limit to connect to vdagentd and improve logging error + * !35 - Fix deprecation warning + * !37 - Provide systemd spice-vdagent.service + Do not process X11 events in vdagent_x11_create + Drop upstream signature file as having "No public key" + +------------------------------------------------------------------- +Thu Dec 16 16:05:34 UTC 2021 - Johannes Segitz <jseg...@suse.com> + +- Added hardening to systemd service(s) (bsc#1181400). Added patch(es): + * harden_spice-vdagentd.service.patch + +------------------------------------------------------------------- Old: ---- spice-vdagent-0.21.0.tar.bz2 spice-vdagent-0.21.0.tar.bz2.sig New: ---- harden_spice-vdagentd.service.patch spice-vdagent-0.22.1.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ spice-vdagent.spec ++++++ --- /var/tmp/diff_new_pack.cV44gV/_old 2022-02-15 23:57:19.120218877 +0100 +++ /var/tmp/diff_new_pack.cV44gV/_new 2022-02-15 23:57:19.124218888 +0100 @@ -1,7 +1,7 @@ # # spec file for package spice-vdagent # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # Copyright (c) 2014 B1 Systems GmbH, Vohburg, Germany. # # All modifications and additions to the file contributed by third parties @@ -21,15 +21,15 @@ %bcond_with session_info_test Name: spice-vdagent -Version: 0.21.0 +Version: 0.22.1 Release: 0 Summary: Agent for Spice guests License: GPL-3.0-or-later Group: System/Daemons URL: http://spice-space.org/ Source: http://spice-space.org/download/releases/%{name}-%{version}.tar.bz2 -Source1: http://spice-space.org/download/releases/%{name}-%{version}.tar.bz2.sig Source2: %{name}.keyring +Patch0: harden_spice-vdagentd.service.patch BuildRequires: alsa-devel >= 1.0.22 BuildRequires: desktop-file-utils @@ -65,6 +65,7 @@ %prep %setup -q +%patch0 -p1 %build autoreconf @@ -116,6 +117,7 @@ %{_udevrulesdir}/70-spice-vdagentd.rules %{_unitdir}/spice-vdagentd.service %{_unitdir}/spice-vdagentd.socket +%{_prefix}/lib/systemd/user/spice-vdagent.service %{_tmpfilesdir}/spice-vdagentd.conf %{_bindir}/spice-vdagent %{_sbindir}/spice-vdagentd ++++++ harden_spice-vdagentd.service.patch ++++++ Index: spice-vdagent-0.21.0/data/spice-vdagentd.service =================================================================== --- spice-vdagent-0.21.0.orig/data/spice-vdagentd.service +++ spice-vdagent-0.21.0/data/spice-vdagentd.service @@ -9,6 +9,17 @@ EnvironmentFile=-/etc/sysconfig/spice-vd ExecStart=/usr/sbin/spice-vdagentd $SPICE_VDAGENTD_EXTRA_ARGS PIDFile=/run/spice-vdagentd/spice-vdagentd.pid PrivateTmp=true +# added automatically, for details please see +# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort +ProtectSystem=full +ProtectHome=true +ProtectHostname=true +ProtectKernelTunables=true +ProtectKernelModules=true +ProtectKernelLogs=true +ProtectControlGroups=true +RestrictRealtime=true +# end of automatic additions Restart=on-failure [Install] ++++++ spice-vdagent-0.21.0.tar.bz2 -> spice-vdagent-0.22.1.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spice-vdagent-0.21.0/CHANGELOG.md new/spice-vdagent-0.22.1/CHANGELOG.md --- old/spice-vdagent-0.21.0/CHANGELOG.md 2021-01-13 09:52:43.000000000 +0100 +++ new/spice-vdagent-0.22.1/CHANGELOG.md 2022-02-14 11:26:13.000000000 +0100 @@ -2,6 +2,17 @@ https://gitlab.freedesktop.org/spice/linux/vd_agent/-/blob/master/CHANGELOG.md +News in spice-vdagent 0.22.1 +=========================== +* !42 - Fix crash on startup of session agent + +News in spice-vdagent 0.22.0 +=========================== +* !40 - Handle side mouse buttons +* !39 - Set retry limit to connect to vdagentd and improve logging error +* !35 - Fix deprecation warning +* !37 - Provide systemd spice-vdagent.service + News in spice-vdagent 0.21.0 ============================ * Security fixes: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spice-vdagent-0.21.0/Makefile.am new/spice-vdagent-0.22.1/Makefile.am --- old/spice-vdagent-0.21.0/Makefile.am 2020-11-19 15:52:42.000000000 +0100 +++ new/spice-vdagent-0.22.1/Makefile.am 2022-02-13 18:42:48.000000000 +0100 @@ -167,6 +167,10 @@ $(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 @@ 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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spice-vdagent-0.21.0/Makefile.in new/spice-vdagent-0.22.1/Makefile.in --- old/spice-vdagent-0.21.0/Makefile.in 2021-01-13 10:03:57.000000000 +0100 +++ new/spice-vdagent-0.22.1/Makefile.in 2022-02-14 11:29:26.000000000 +0100 @@ -119,7 +119,8 @@ "$(DESTDIR)$(initdir)" "$(DESTDIR)$(gdmautostartdir)" \ "$(DESTDIR)$(gdmautostart2dir)" "$(DESTDIR)$(manpagedir)" \ "$(DESTDIR)$(systemdunitdir)" "$(DESTDIR)$(tmpfilesdir)" \ - "$(DESTDIR)$(udevrulesdir)" "$(DESTDIR)$(xdgautostartdir)" + "$(DESTDIR)$(udevrulesdir)" "$(DESTDIR)$(userunitdir)" \ + "$(DESTDIR)$(xdgautostartdir)" @HAVE_CONSOLE_KIT_TRUE@am__EXEEXT_1 = \ @HAVE_CONSOLE_KIT_TRUE@ tests/test-session-info$(EXEEXT) @HAVE_CONSOLE_KIT_FALSE@@HAVE_LIBSYSTEMD_LOGIN_TRUE@am__EXEEXT_2 = tests/test-session-info$(EXEEXT) @@ -325,7 +326,7 @@ esac DATA = $(gdmautostart_DATA) $(gdmautostart2_DATA) $(manpage_DATA) \ $(systemdunit_DATA) $(tmpfiles_DATA) $(udevrules_DATA) \ - $(xdgautostart_DATA) + $(userunit_DATA) $(xdgautostart_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is @@ -573,6 +574,8 @@ EXEEXT = @EXEEXT@ GIO2_CFLAGS = @GIO2_CFLAGS@ GIO2_LIBS = @GIO2_LIBS@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_LIBS = @GTK_LIBS@ @@ -614,6 +617,7 @@ SPICE_LIBS = @SPICE_LIBS@ STRIP = @STRIP@ SYSTEMDSYSTEMUNITDIR = @SYSTEMDSYSTEMUNITDIR@ +SYSTEMDUSERUNITDIR = @SYSTEMDUSERUNITDIR@ VERSION = @VERSION@ X_CFLAGS = @X_CFLAGS@ X_LIBS = @X_LIBS@ @@ -651,6 +655,7 @@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ +runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ @@ -783,6 +788,10 @@ @INIT_SCRIPT_SYSTEMD_TRUE@ $(top_srcdir)/data/spice-vdagentd.service \ @INIT_SCRIPT_SYSTEMD_TRUE@ $(top_srcdir)/data/spice-vdagentd.socket +@INIT_SCRIPT_SYSTEMD_TRUE@userunitdir = $(SYSTEMDUSERUNITDIR) +@INIT_SCRIPT_SYSTEMD_TRUE@userunit_DATA = \ +@INIT_SCRIPT_SYSTEMD_TRUE@ $(top_srcdir)/data/spice-vdagent.service + @INIT_SCRIPT_SYSTEMD_TRUE@udevrulesdir = $(udevdir)/rules.d @INIT_SCRIPT_SYSTEMD_TRUE@udevrules_DATA = $(top_srcdir)/data/70-spice-vdagentd.rules @INIT_SCRIPT_SYSTEMD_TRUE@tmpfilesdir = $(prefix)/lib/tmpfiles.d @@ -798,6 +807,7 @@ 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 \ @@ -1711,6 +1721,27 @@ @list='$(udevrules_DATA)'; test -n "$(udevrulesdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(udevrulesdir)'; $(am__uninstall_files_from_dir) +install-userunitDATA: $(userunit_DATA) + @$(NORMAL_INSTALL) + @list='$(userunit_DATA)'; test -n "$(userunitdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(userunitdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(userunitdir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(userunitdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(userunitdir)" || exit $$?; \ + done + +uninstall-userunitDATA: + @$(NORMAL_UNINSTALL) + @list='$(userunit_DATA)'; test -n "$(userunitdir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(userunitdir)'; $(am__uninstall_files_from_dir) install-xdgautostartDATA: $(xdgautostart_DATA) @$(NORMAL_INSTALL) @list='$(xdgautostart_DATA)'; test -n "$(xdgautostartdir)" || list=; \ @@ -2153,7 +2184,7 @@ check: check-am all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(DATA) installdirs: - for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(initdir)" "$(DESTDIR)$(gdmautostartdir)" "$(DESTDIR)$(gdmautostart2dir)" "$(DESTDIR)$(manpagedir)" "$(DESTDIR)$(systemdunitdir)" "$(DESTDIR)$(tmpfilesdir)" "$(DESTDIR)$(udevrulesdir)" "$(DESTDIR)$(xdgautostartdir)"; do \ + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(initdir)" "$(DESTDIR)$(gdmautostartdir)" "$(DESTDIR)$(gdmautostart2dir)" "$(DESTDIR)$(manpagedir)" "$(DESTDIR)$(systemdunitdir)" "$(DESTDIR)$(tmpfilesdir)" "$(DESTDIR)$(udevrulesdir)" "$(DESTDIR)$(userunitdir)" "$(DESTDIR)$(xdgautostartdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am @@ -2254,7 +2285,7 @@ install-gdmautostartDATA install-initSCRIPTS \ install-manpageDATA install-systemdunitDATA \ install-tmpfilesDATA install-udevrulesDATA \ - install-xdgautostartDATA + install-userunitDATA install-xdgautostartDATA install-dvi: install-dvi-am @@ -2334,7 +2365,8 @@ uninstall-gdmautostartDATA uninstall-initSCRIPTS \ uninstall-manpageDATA uninstall-sbinPROGRAMS \ uninstall-systemdunitDATA uninstall-tmpfilesDATA \ - uninstall-udevrulesDATA uninstall-xdgautostartDATA + uninstall-udevrulesDATA uninstall-userunitDATA \ + uninstall-xdgautostartDATA .MAKE: check-am install-am install-strip @@ -2355,15 +2387,16 @@ install-manpageDATA install-pdf install-pdf-am install-ps \ install-ps-am install-sbinPROGRAMS install-strip \ install-systemdunitDATA install-tmpfilesDATA \ - install-udevrulesDATA install-xdgautostartDATA installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic pdf pdf-am ps ps-am recheck tags tags-am \ - uninstall uninstall-am uninstall-binPROGRAMS \ - uninstall-gdmautostart2DATA uninstall-gdmautostartDATA \ - uninstall-initSCRIPTS uninstall-manpageDATA \ - uninstall-sbinPROGRAMS uninstall-systemdunitDATA \ - uninstall-tmpfilesDATA uninstall-udevrulesDATA \ + install-udevrulesDATA install-userunitDATA \ + install-xdgautostartDATA installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ + ps ps-am recheck tags tags-am uninstall uninstall-am \ + uninstall-binPROGRAMS uninstall-gdmautostart2DATA \ + uninstall-gdmautostartDATA uninstall-initSCRIPTS \ + uninstall-manpageDATA uninstall-sbinPROGRAMS \ + uninstall-systemdunitDATA uninstall-tmpfilesDATA \ + uninstall-udevrulesDATA uninstall-userunitDATA \ uninstall-xdgautostartDATA .PRECIOUS: Makefile diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spice-vdagent-0.21.0/configure new/spice-vdagent-0.22.1/configure --- old/spice-vdagent-0.21.0/configure 2021-01-13 10:03:57.000000000 +0100 +++ new/spice-vdagent-0.22.1/configure 2022-02-14 11:29:26.000000000 +0100 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for spice-vdagent 0.21.0. +# Generated by GNU Autoconf 2.69 for spice-vdagent 0.22.1. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -577,8 +577,8 @@ # Identity of this package. PACKAGE_NAME='spice-vdagent' PACKAGE_TARNAME='spice-vdagent' -PACKAGE_VERSION='0.21.0' -PACKAGE_STRING='spice-vdagent 0.21.0' +PACKAGE_VERSION='0.22.1' +PACKAGE_STRING='spice-vdagent 0.22.1' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -600,6 +600,8 @@ HAVE_LIBSYSTEMD_LOGIN_TRUE LIBSYSTEMD_LOGIN_LIBS LIBSYSTEMD_LOGIN_CFLAGS +GLIB_LIBS +GLIB_CFLAGS DRM_LIBS DRM_CFLAGS DBUS_LIBS @@ -616,6 +618,7 @@ GTK_CFLAGS LIBSYSTEMD_DAEMON_LIBS LIBSYSTEMD_DAEMON_CFLAGS +SYSTEMDUSERUNITDIR SYSTEMDSYSTEMUNITDIR INIT_SCRIPT_SYSTEMD_FALSE INIT_SCRIPT_SYSTEMD_TRUE @@ -690,6 +693,7 @@ docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -752,6 +756,8 @@ DBUS_LIBS DRM_CFLAGS DRM_LIBS +GLIB_CFLAGS +GLIB_LIBS LIBSYSTEMD_LOGIN_CFLAGS LIBSYSTEMD_LOGIN_LIBS PCIACCESS_CFLAGS @@ -794,6 +800,7 @@ sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -1046,6 +1053,15 @@ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1183,7 +1199,7 @@ for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir + libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1296,7 +1312,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures spice-vdagent 0.21.0 to adapt to many kinds of systems. +\`configure' configures spice-vdagent 0.22.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1336,6 +1352,7 @@ --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -1362,7 +1379,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of spice-vdagent 0.21.0:";; + short | recursive ) echo "Configuration of spice-vdagent 0.22.1:";; esac cat <<\_ACEOF @@ -1429,6 +1446,8 @@ DBUS_LIBS linker flags for DBUS, overriding pkg-config DRM_CFLAGS C compiler flags for DRM, overriding pkg-config DRM_LIBS linker flags for DRM, overriding pkg-config + GLIB_CFLAGS C compiler flags for GLIB, overriding pkg-config + GLIB_LIBS linker flags for GLIB, overriding pkg-config LIBSYSTEMD_LOGIN_CFLAGS C compiler flags for LIBSYSTEMD_LOGIN, overriding pkg-config LIBSYSTEMD_LOGIN_LIBS @@ -1504,7 +1523,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -spice-vdagent configure 0.21.0 +spice-vdagent configure 0.22.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1684,7 +1703,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by spice-vdagent $as_me 0.21.0, which was +It was created by spice-vdagent $as_me 0.22.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2552,7 +2571,7 @@ # Define the identity of the package. PACKAGE='spice-vdagent' - VERSION='0.21.0' + VERSION='0.22.1' cat >>confdefs.h <<_ACEOF @@ -4511,6 +4530,8 @@ if test "x$init_systemd" = "xyes"; then SYSTEMDSYSTEMUNITDIR=`${PKG_CONFIG} systemd --variable=systemdsystemunitdir` + SYSTEMDUSERUNITDIR=`${PKG_CONFIG} systemd --variable=systemduserunitdir` + # earlier versions of systemd require a separate libsystemd-daemon library @@ -4607,7 +4628,7 @@ with_gtk4="no" fi -if test "x$with_gtk4" == "xyes"; then +if test "x$with_gtk4" = "xyes"; then pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTK" >&5 @@ -5346,6 +5367,86 @@ fi + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLIB" >&5 +$as_echo_n "checking for GLIB... " >&6; } + +if test -n "$GLIB_CFLAGS"; then + pkg_cv_GLIB_CFLAGS="$GLIB_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.68\""; } >&5 + ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.68") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_GLIB_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.68" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$GLIB_LIBS"; then + pkg_cv_GLIB_LIBS="$GLIB_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.68\""; } >&5 + ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.68") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_GLIB_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.68" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + GLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "glib-2.0 >= 2.68" 2>&1` + else + GLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "glib-2.0 >= 2.68" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$GLIB_PKG_ERRORS" >&5 + + + +$as_echo "#define g_memdup2 g_memdup" >>confdefs.h + + +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + + +$as_echo "#define g_memdup2 g_memdup" >>confdefs.h + + +else + GLIB_CFLAGS=$pkg_cv_GLIB_CFLAGS + GLIB_LIBS=$pkg_cv_GLIB_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi + if test "$with_session_info" = "auto" || test "$with_session_info" = "systemd"; then pkg_failed=no @@ -5647,7 +5748,7 @@ fi # If no CFLAGS are set, set some sane default CFLAGS -if test "$ac_test_CFLAGS" != set; then +if test -z "$ac_test_CFLAGS"; then DEFAULT_CFLAGS="-Wall -Werror -Wp,-D_FORTIFY_SOURCE=2 -fno-strict-aliasing -fstack-protector --param=ssp-buffer-size=4" for F in $DEFAULT_CFLAGS; do { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports $F" >&5 @@ -6266,7 +6367,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by spice-vdagent $as_me 0.21.0, which was +This file was extended by spice-vdagent $as_me 0.22.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -6332,7 +6433,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -spice-vdagent config.status 0.21.0 +spice-vdagent config.status 0.22.1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spice-vdagent-0.21.0/configure.ac new/spice-vdagent-0.22.1/configure.ac --- old/spice-vdagent-0.21.0/configure.ac 2021-01-13 09:52:43.000000000 +0100 +++ new/spice-vdagent-0.22.1/configure.ac 2022-02-14 11:26:30.000000000 +0100 @@ -1,5 +1,5 @@ AC_PREREQ(2.59) -AC_INIT([spice-vdagent], [0.21.0]) +AC_INIT([spice-vdagent], [0.22.1]) AC_CONFIG_SRCDIR([configure.ac]) AM_CONFIG_HEADER([src/config.h]) @@ -64,7 +64,9 @@ 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], @@ -87,7 +89,7 @@ [Use GTK4 instead of Xlib @<:@default=no@:>@])], [], [with_gtk4="no"]) -if test "x$with_gtk4" == "xyes"; then +if test "x$with_gtk4" = "xyes"; then PKG_CHECK_MODULES([GTK], [gtk4 >= 3.98], [ AC_DEFINE([WITH_GTK], [1], [If defined, load GTK+ libraries]) AC_DEFINE([USE_GTK_FOR_MONITORS], [1], [If defined, use GTK for monitor resolution instead of XRandr]) @@ -124,6 +126,10 @@ PKG_CHECK_MODULES([DBUS], [dbus-1]) PKG_CHECK_MODULES([DRM], [libdrm]) +PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.68], [], [ + AC_DEFINE(g_memdup2, g_memdup, [GLib2 < 2.68 compatibility]) +]) + if test "$with_session_info" = "auto" || test "$with_session_info" = "systemd"; then PKG_CHECK_MODULES([LIBSYSTEMD_LOGIN], [libsystemd >= 209], @@ -172,7 +178,7 @@ fi # If no CFLAGS are set, set some sane default CFLAGS -if test "$ac_test_CFLAGS" != set; then +if test -z "$ac_test_CFLAGS"; then DEFAULT_CFLAGS="-Wall -Werror -Wp,-D_FORTIFY_SOURCE=2 -fno-strict-aliasing -fstack-protector --param=ssp-buffer-size=4" for F in $DEFAULT_CFLAGS; do AC_MSG_CHECKING([whether $CC supports $F]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spice-vdagent-0.21.0/data/spice-vdagent.service new/spice-vdagent-0.22.1/data/spice-vdagent.service --- old/spice-vdagent-0.21.0/data/spice-vdagent.service 1970-01-01 01:00:00.000000000 +0100 +++ new/spice-vdagent-0.22.1/data/spice-vdagent.service 2022-02-13 18:42:48.000000000 +0100 @@ -0,0 +1,5 @@ +[Unit] +Description=Spice guest session agent + +[Service] +ExecStart=/usr/bin/spice-vdagent -x diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spice-vdagent-0.21.0/src/config.h.in new/spice-vdagent-0.22.1/src/config.h.in --- old/spice-vdagent-0.21.0/src/config.h.in 2021-01-13 10:03:57.000000000 +0100 +++ new/spice-vdagent-0.22.1/src/config.h.in 2022-02-14 11:29:26.000000000 +0100 @@ -64,3 +64,6 @@ /* Define for large files, on AIX-style hosts. */ #undef _LARGE_FILES + +/* GLib2 < 2.68 compatibility */ +#undef g_memdup2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spice-vdagent-0.21.0/src/udscs.c new/spice-vdagent-0.22.1/src/udscs.c --- old/spice-vdagent-0.21.0/src/udscs.c 2020-11-12 10:30:23.000000000 +0100 +++ new/spice-vdagent-0.22.1/src/udscs.c 2022-02-07 14:44:54.000000000 +0100 @@ -107,16 +107,14 @@ UdscsConnection *udscs_connect(const char *socketname, udscs_read_callback read_callback, VDAgentConnErrorCb error_cb, - int debug) + int debug, + GError **err) { GIOStream *io_stream; UdscsConnection *conn; - GError *err = NULL; - io_stream = vdagent_socket_connect(socketname, &err); - if (err) { - syslog(LOG_ERR, "%s: %s", __func__, err->message); - g_error_free(err); + io_stream = vdagent_socket_connect(socketname, err); + if (*err) { return NULL; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spice-vdagent-0.21.0/src/udscs.h new/spice-vdagent-0.22.1/src/udscs.h --- old/spice-vdagent-0.21.0/src/udscs.h 2020-07-10 11:42:21.000000000 +0200 +++ new/spice-vdagent-0.22.1/src/udscs.h 2022-02-07 14:44:54.000000000 +0100 @@ -53,11 +53,14 @@ * * If debug is true then the events on this connection will be traced. * This includes the incoming and outgoing message names. + * + * In case of failure, returns NULL and set @err with reason. */ UdscsConnection *udscs_connect(const char *socketname, udscs_read_callback read_callback, VDAgentConnErrorCb error_cb, - int debug); + int debug, + GError **err); /* Queue a message for delivery to the client connected through conn. */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spice-vdagent-0.21.0/src/vdagent/vdagent.c new/spice-vdagent-0.22.1/src/vdagent/vdagent.c --- old/spice-vdagent-0.21.0/src/vdagent/vdagent.c 2020-08-27 10:29:04.000000000 +0200 +++ new/spice-vdagent-0.22.1/src/vdagent/vdagent.c 2022-02-14 11:24:36.000000000 +0100 @@ -42,11 +42,14 @@ #include "clipboard.h" #include "display.h" +#define MAX_RETRY_CONNECT_SYSTEM_AGENT 60 + typedef struct VDAgent { VDAgentClipboards *clipboards; VDAgentDisplay *display; struct vdagent_file_xfers *xfers; UdscsConnection *conn; + gint udscs_num_retry; GMainLoop *loop; } VDAgent; @@ -228,7 +231,7 @@ break; case VDAGENTD_AUDIO_VOLUME_SYNC: { VDAgentAudioVolumeSync *avs = (VDAgentAudioVolumeSync *)data; - uint16_t *volume = g_memdup(avs->volume, sizeof(uint16_t) * avs->nchannels); + uint16_t *volume = g_memdup2(avs->volume, sizeof(uint16_t) * avs->nchannels); if (avs->is_playback) { vdagent_audio_playback_sync(avs->mute, avs->nchannels, volume); @@ -373,14 +376,38 @@ static gboolean vdagent_init_async_cb(gpointer user_data) { VDAgent *agent = user_data; + GError *err = NULL; agent->conn = udscs_connect(vdagentd_socket, - daemon_read_complete, daemon_error_cb, - debug); + daemon_read_complete, + daemon_error_cb, + debug, + &err); if (agent->conn == NULL) { + if (agent->udscs_num_retry == MAX_RETRY_CONNECT_SYSTEM_AGENT) { + syslog(LOG_WARNING, + "Failed to connect to spice-vdagentd at %s (tried %d times)", + vdagentd_socket, agent->udscs_num_retry); + g_error_free(err); + goto err_init; + } + if (agent->udscs_num_retry == 0) { + /* Log only when it fails and at the end */ + syslog(LOG_DEBUG, + "Failed to connect with spice-vdagentd due '%s'. Trying again in 1s", + err->message); + } + g_error_free(err); + agent->udscs_num_retry++; g_timeout_add_seconds(1, vdagent_init_async_cb, agent); return G_SOURCE_REMOVE; } + if (agent->udscs_num_retry != 0) { + syslog(LOG_DEBUG, + "Connected with spice-vdagentd after %d attempts", + agent->udscs_num_retry); + } + agent->udscs_num_retry = 0; g_object_set_data(G_OBJECT(agent->conn), "agent", agent); agent->display = vdagent_display_create(agent->conn, debug, x11_sync); @@ -414,7 +441,7 @@ GOptionContext *context; GError *error = NULL; VDAgent *agent; - char **orig_argv = g_memdup(argv, sizeof(char*) * (argc+1)); + char **orig_argv = g_memdup2(argv, sizeof(char*) * (argc+1)); orig_argv[argc] = NULL; /* To avoid clang analyzer false-positive */ context = g_option_context_new(NULL); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spice-vdagent-0.21.0/src/vdagent/x11-randr.c new/spice-vdagent-0.22.1/src/vdagent/x11-randr.c --- old/spice-vdagent-0.21.0/src/vdagent/x11-randr.c 2020-10-29 17:13:22.000000000 +0100 +++ new/spice-vdagent-0.22.1/src/vdagent/x11-randr.c 2022-02-07 14:44:48.000000000 +0100 @@ -982,7 +982,7 @@ fullscreen it will keep sending the failing config. */ g_free(x11->randr.failed_conf); x11->randr.failed_conf = - g_memdup(mon_config, config_size(mon_config->num_of_monitors)); + g_memdup2(mon_config, config_size(mon_config->num_of_monitors)); return; } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spice-vdagent-0.21.0/src/vdagent/x11.c new/spice-vdagent-0.22.1/src/vdagent/x11.c --- old/spice-vdagent-0.21.0/src/vdagent/x11.c 2020-10-29 17:13:22.000000000 +0100 +++ new/spice-vdagent-0.22.1/src/vdagent/x11.c 2022-02-14 11:24:38.000000000 +0100 @@ -302,9 +302,6 @@ x11->height[i] = attrib.height; } - /* Flush output buffers and consume any pending events */ - vdagent_x11_do_read(x11); - return x11; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spice-vdagent-0.21.0/src/vdagentd/uinput.c new/spice-vdagent-0.22.1/src/vdagentd/uinput.c --- old/spice-vdagent-0.21.0/src/vdagentd/uinput.c 2020-07-10 11:42:21.000000000 +0200 +++ new/spice-vdagent-0.22.1/src/vdagentd/uinput.c 2022-02-07 14:44:54.000000000 +0100 @@ -140,6 +140,8 @@ ioctl(uinput->fd, UI_SET_KEYBIT, BTN_LEFT); ioctl(uinput->fd, UI_SET_KEYBIT, BTN_MIDDLE); ioctl(uinput->fd, UI_SET_KEYBIT, BTN_RIGHT); + ioctl(uinput->fd, UI_SET_KEYBIT, BTN_SIDE); + ioctl(uinput->fd, UI_SET_KEYBIT, BTN_EXTRA); /* wheel */ ioctl(uinput->fd, UI_SET_EVBIT, EV_REL); @@ -200,6 +202,8 @@ { .name = "left", .mask = VD_AGENT_LBUTTON_MASK, .btn = BTN_LEFT }, { .name = "middle", .mask = VD_AGENT_MBUTTON_MASK, .btn = BTN_MIDDLE }, { .name = "right", .mask = VD_AGENT_RBUTTON_MASK, .btn = BTN_RIGHT }, + { .name = "side" , .mask = VD_AGENT_SBUTTON_MASK, .btn = BTN_SIDE }, + { .name = "extra" , .mask = VD_AGENT_EBUTTON_MASK, .btn = BTN_EXTRA }, }; static const struct button_s wheel[] = { { .name = "up", .mask = VD_AGENT_UBUTTON_MASK, .btn = 1 }, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spice-vdagent-0.21.0/src/vdagentd/vdagentd.c new/spice-vdagent-0.22.1/src/vdagentd/vdagentd.c --- old/spice-vdagent-0.21.0/src/vdagentd/vdagentd.c 2020-11-12 10:30:23.000000000 +0100 +++ new/spice-vdagent-0.22.1/src/vdagentd/vdagentd.c 2022-02-13 18:42:48.000000000 +0100 @@ -216,7 +216,7 @@ vdagentd_write_xorg_conf(new_monitors); g_free(mon_config); - mon_config = g_memdup(new_monitors, size); + mon_config = g_memdup2(new_monitors, size); /* Send monitor config to currently active agent */ if (active_session_conn) @@ -249,7 +249,7 @@ { capabilities_size = VD_AGENT_CAPS_SIZE_FROM_MSG_SIZE(message_header->size); g_free(capabilities); - capabilities = g_memdup(caps->caps, capabilities_size * sizeof(uint32_t)); + capabilities = g_memdup2(caps->caps, capabilities_size * sizeof(uint32_t)); if (caps->request) { /* Report the previous client has disconnected. */ @@ -647,7 +647,7 @@ case VD_AGENT_GRAPHICS_DEVICE_INFO: { // store device info for re-sending when a session agent reconnects g_free(device_info); - device_info = g_memdup(data, message_header->size); + device_info = g_memdup2(data, message_header->size); device_info_size = message_header->size; forward_data_to_session_agent(VDAGENTD_GRAPHICS_DEVICE_INFO, data, message_header->size); break; @@ -1090,7 +1090,7 @@ } g_free(agent_data->screen_info); - agent_data->screen_info = g_memdup(data, header->size); + agent_data->screen_info = g_memdup2(data, header->size); agent_data->width = header->arg1; agent_data->height = header->arg2; agent_data->screen_count = n; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spice-vdagent-0.21.0/tests/test-termination.c new/spice-vdagent-0.22.1/tests/test-termination.c --- old/spice-vdagent-0.21.0/tests/test-termination.c 2020-07-10 11:42:21.000000000 +0200 +++ new/spice-vdagent-0.22.1/tests/test-termination.c 2022-02-07 14:44:48.000000000 +0100 @@ -59,7 +59,7 @@ static pid_t get_daemon_pid(void) { pid_t res = 0; - FILE *f = popen("ps -ef", "r"); + FILE *f = popen("ps -efww", "r"); check(f != NULL); char line[1024]; while (fgets(line, sizeof(line), f)) {