diff --git a/tigervnc.changes b/tigervnc.changes index 4c7b60d..5fa73ec 100644 --- a/tigervnc.changes +++ b/tigervnc.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Mon May 3 09:19:17 UTC 2021 - Dominique Leuenberger + +- Do not carry two variants of the same servcice file, but rather + bring a template which we dynamically adjust during installation + to cater for the correct libexecdir value. + + Replace xvnc-novnc-libexec.service and xvnc-novnc-lib.service + with xvnc-novnc.service.in. + ------------------------------------------------------------------- Mon May 3 08:54:23 UTC 2021 - Stefan Dirsch diff --git a/tigervnc.spec b/tigervnc.spec index 0486f9d..c72ba21 100644 --- a/tigervnc.spec +++ b/tigervnc.spec @@ -132,10 +132,7 @@ Source16: xvnc-novnc.socket Source17: tigervnc.firewalld Source18: tigervnc-https.firewalld Source19: xvnc.target -# Tumbleweed uses /usr/libexec/ -Source21: xvnc-novnc-libexec.service -# Leap uses /usr/lib/ -Source22: xvnc-novnc-lib.service +Source21: xvnc-novnc.service.in Patch1: tigervnc-newfbsize.patch Patch2: tigervnc-clean-pressed-key-on-exit.patch Patch3: u_tigervnc-ignore-epipe-on-write.patch @@ -282,6 +279,7 @@ popd %build export CXXFLAGS="%optflags" export CFLAGS="%optflags" +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 . make %{?_smp_mflags} @@ -369,11 +367,7 @@ install -D %{SOURCE13} -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 -%if 0%{?suse_version} >= 1550 -install -D %{SOURCE21} -m 0444 %{buildroot}%{_unitdir}/xvnc-novnc.service -%else -install -D %{SOURCE22} -m 0444 %{buildroot}%{_unitdir}/xvnc-novnc.service -%endif +install -D xvnc-novnc.service -m 0444 %{buildroot}%{_unitdir}/xvnc-novnc.service rm -rf %{buildroot}%{_datadir}/doc/tigervnc-* diff --git a/xvnc-novnc-lib.service b/xvnc-novnc-lib.service deleted file mode 100644 index f16fc55..0000000 --- a/xvnc-novnc-lib.service +++ /dev/null @@ -1,10 +0,0 @@ -[Unit] -Description=noVNC Web Server -Requires=xvnc.target -After=xvnc.target - -[Service] -ExecStart=/usr/lib/vnc/with-vnc-key.sh /usr/bin/websockify --key /etc/vnc/tls.key --cert /etc/vnc/tls.cert --web /usr/share/novnc --inetd localhost:5901 -User=vnc -StandardInput=socket -StandardError=syslog diff --git a/xvnc-novnc-libexec.service b/xvnc-novnc.service.in similarity index 78% rename from xvnc-novnc-libexec.service rename to xvnc-novnc.service.in index 1d56adc..26ee7fb 100644 --- a/xvnc-novnc-libexec.service +++ b/xvnc-novnc.service.in @@ -4,7 +4,7 @@ Requires=xvnc.target After=xvnc.target [Service] -ExecStart=/usr/libexec/vnc/with-vnc-key.sh /usr/bin/websockify --key /etc/vnc/tls.key --cert /etc/vnc/tls.cert --web /usr/share/novnc --inetd localhost:5901 +ExecStart=@LIBEXECDIR@/vnc/with-vnc-key.sh /usr/bin/websockify --key /etc/vnc/tls.key --cert /etc/vnc/tls.cert --web /usr/share/novnc --inetd localhost:5901 User=vnc StandardInput=socket StandardError=syslog