From 54dd3affe58006abb00d2b2bb542a0e80222ff5c10566a8273b37ed521adea06 Mon Sep 17 00:00:00 2001 From: Stefan Dirsch Date: Mon, 15 Nov 2021 17:40:56 +0000 Subject: [PATCH] - Use a template xvnc@.service.in to dynamically adjust xvnc@.service during installation to cater for the correct libexecdir value. This fixes wrong path for with-vnc-key.sh on sle15-sp4 (bsc#1192713) OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/tigervnc?expand=0&rev=219 --- tigervnc.changes | 7 +++++++ tigervnc.spec | 5 +++-- xvnc@.service => xvnc@.service.in | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) rename xvnc@.service => xvnc@.service.in (81%) diff --git a/tigervnc.changes b/tigervnc.changes index 17c2c46..4acf8e5 100644 --- a/tigervnc.changes +++ b/tigervnc.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Nov 15 17:22:13 UTC 2021 - Stefan Dirsch + +- Use a template xvnc@.service.in to dynamically adjust xvnc@.service + during installation to cater for the correct libexecdir value. This + fixes wrong path for with-vnc-key.sh on sle15-sp4 (bsc#1192713) + ------------------------------------------------------------------- Fri Oct 29 16:57:10 UTC 2021 - Stefan Dirsch diff --git a/tigervnc.spec b/tigervnc.spec index d4cbef7..5a81eed 100644 --- a/tigervnc.spec +++ b/tigervnc.spec @@ -51,7 +51,7 @@ Source9: vnc.pam Source10: with-vnc-key.sh Source11: index.vnc Source12: x11vnc -Source13: xvnc@.service +Source13: xvnc@.service.in Source14: xvnc.socket Source16: xvnc-novnc.socket Source17: tigervnc.firewalld @@ -285,6 +285,7 @@ popd %sysusers_generate_pre %{SOURCE22} xorg-x11-Xvnc vnc.conf export CXXFLAGS="%optflags" export CFLAGS="%optflags" +sed "s|@LIBEXECDIR@|%{_libexecdir}|g" %{SOURCE13} > xvnc@.service sed "s|@LIBEXECDIR@|%{_libexecdir}|g" %{SOURCE21} > xvnc-novnc.service # Build all tigervnc cmake -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} -DCMAKE_BUILD_TYPE=RelWithDebInfo . @@ -369,7 +370,7 @@ install -D -m 755 %{SOURCE10} %{buildroot}%{_libexecdir}/vnc install -D -m 755 %{SOURCE12} %{buildroot}%{_bindir}/x11vnc -install -D %{SOURCE13} -m 0444 %{buildroot}%{_unitdir}/xvnc@.service +install -D xvnc@.service -m 0444 %{buildroot}%{_unitdir}/xvnc@.service install -D %{SOURCE14} -m 0444 %{buildroot}%{_unitdir}/xvnc.socket install -D %{SOURCE16} -m 0444 %{buildroot}%{_unitdir}/xvnc-novnc.socket install -D %{SOURCE19} -m 0444 %{buildroot}%{_unitdir}/xvnc.target diff --git a/xvnc@.service b/xvnc@.service.in similarity index 81% rename from xvnc@.service rename to xvnc@.service.in index a994d63..077383f 100644 --- a/xvnc@.service +++ b/xvnc@.service.in @@ -2,7 +2,7 @@ Description=Xvnc Server [Service] -ExecStart=/usr/libexec/vnc/with-vnc-key.sh /usr/bin/Xvnc -noreset -inetd -once -query localhost -geometry 1024x768 -securitytypes X509None,None -X509Key /etc/vnc/tls.key -X509Cert /etc/vnc/tls.cert -log *:syslog:30 -extension MIT-SHM +ExecStart=@LIBEXECDIR@/vnc/with-vnc-key.sh /usr/bin/Xvnc -noreset -inetd -once -query localhost -geometry 1024x768 -securitytypes X509None,None -X509Key /etc/vnc/tls.key -X509Cert /etc/vnc/tls.cert -log *:syslog:30 -extension MIT-SHM User=vnc StandardInput=socket StandardOutput=socket