From 9e5f310b0fa1550e5381e21ddd3ae78a8df6a479a414cf239f835ebffac0f845 Mon Sep 17 00:00:00 2001 From: Stefan Dirsch Date: Sun, 2 May 2021 20:41:14 +0000 Subject: [PATCH 1/3] Accepting request 888839 from home:sbradnick:branches:X11:XOrg - Adjusting suse_version check from '> 1500' to '>= 1550' per request. - Adding if statement to control libexec (Tumbleweed +) vs lib based 'Source#' file for 'xvnc-novnc.service'. - 'xvnc-novnc.service' requires '/usr/libexec/vnc/with-vnc-key.sh' vs '/usr/lib/vnc/with-vnc-key.sh' for ExecStart to work correctly. OBS-URL: https://build.opensuse.org/request/show/888839 OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/tigervnc?expand=0&rev=203 --- tigervnc.changes | 17 +++++++++++++++++ tigervnc.spec | 13 ++++++++++--- xvnc-novnc.service => xvnc-novnc-lib.service | 0 xvnc-novnc-libexec.service | 10 ++++++++++ 4 files changed, 37 insertions(+), 3 deletions(-) rename xvnc-novnc.service => xvnc-novnc-lib.service (100%) create mode 100644 xvnc-novnc-libexec.service diff --git a/tigervnc.changes b/tigervnc.changes index afdd367..0ed65fa 100644 --- a/tigervnc.changes +++ b/tigervnc.changes @@ -1,3 +1,20 @@ +------------------------------------------------------------------- +Tue Apr 27 13:41:26 UTC 2021 - Scott Bradnick + +- Adjusting suse_version check from '> 1500' to '>= 1550' per request. + +------------------------------------------------------------------- +Fri Apr 23 14:26:45 UTC 2021 - Scott Bradnick + +- Adding if statement to control libexec (Tumbleweed +) vs lib based + 'Source#' file for 'xvnc-novnc.service'. + +------------------------------------------------------------------- +Thu Apr 22 18:30:29 UTC 2021 - Scott Bradnick + +- 'xvnc-novnc.service' requires '/usr/libexec/vnc/with-vnc-key.sh' + vs '/usr/lib/vnc/with-vnc-key.sh' for ExecStart to work correctly. + ------------------------------------------------------------------- Fri Mar 5 14:46:02 UTC 2021 - Pedro Monreal diff --git a/tigervnc.spec b/tigervnc.spec index 37abffd..349bee6 100644 --- a/tigervnc.spec +++ b/tigervnc.spec @@ -108,8 +108,8 @@ BuildRequires: pkgconfig(xorg-macros) >= 1.14 BuildRequires: pkgconfig(xproto) >= 7.0.17 BuildRequires: pkgconfig(xtrans) >= 1.2.2 %if 0%{?suse_version} >= 1315 -Requires(post): update-alternatives -Requires(postun): update-alternatives +Requires(post): update-alternatives +Requires(postun):update-alternatives %endif URL: http://tigervnc.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -128,7 +128,14 @@ Source11: index.vnc Source12: x11vnc Source13: xvnc@.service Source14: xvnc.socket -Source15: xvnc-novnc.service +# Tumbleweed uses /usr/libexec/ +# Leap uses /usr/lib/ +# %if 0%{?suse_version} > 1500 +%if 0%{?suse_version} >= 1550 +Source15: xvnc-novnc-libexec.service +%else +Source15: xvnc-novnc-lib.service +%endif Source16: xvnc-novnc.socket Source17: tigervnc.firewalld Source18: tigervnc-https.firewalld diff --git a/xvnc-novnc.service b/xvnc-novnc-lib.service similarity index 100% rename from xvnc-novnc.service rename to xvnc-novnc-lib.service diff --git a/xvnc-novnc-libexec.service b/xvnc-novnc-libexec.service new file mode 100644 index 0000000..1d56adc --- /dev/null +++ b/xvnc-novnc-libexec.service @@ -0,0 +1,10 @@ +[Unit] +Description=noVNC Web Server +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 +User=vnc +StandardInput=socket +StandardError=syslog From 638efe18ecec54e2b665a35e5e62cba2e07ec2cb068e95b1e3add6c657fca3ae Mon Sep 17 00:00:00 2001 From: Stefan Dirsch Date: Mon, 3 May 2021 08:55:33 +0000 Subject: [PATCH 2/3] - package both xvnc-novnc-libexec.service and xvnc-novnc-lib.service source files OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/tigervnc?expand=0&rev=204 --- tigervnc.changes | 6 ++++++ tigervnc.spec | 19 +++++++++---------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/tigervnc.changes b/tigervnc.changes index 0ed65fa..4c7b60d 100644 --- a/tigervnc.changes +++ b/tigervnc.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon May 3 08:54:23 UTC 2021 - Stefan Dirsch + +- package both xvnc-novnc-libexec.service and xvnc-novnc-lib.service + source files + ------------------------------------------------------------------- Tue Apr 27 13:41:26 UTC 2021 - Scott Bradnick diff --git a/tigervnc.spec b/tigervnc.spec index 349bee6..0486f9d 100644 --- a/tigervnc.spec +++ b/tigervnc.spec @@ -128,19 +128,14 @@ Source11: index.vnc Source12: x11vnc Source13: xvnc@.service Source14: xvnc.socket -# Tumbleweed uses /usr/libexec/ -# Leap uses /usr/lib/ -# %if 0%{?suse_version} > 1500 -%if 0%{?suse_version} >= 1550 -Source15: xvnc-novnc-libexec.service -%else -Source15: xvnc-novnc-lib.service -%endif 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 Patch1: tigervnc-newfbsize.patch Patch2: tigervnc-clean-pressed-key-on-exit.patch Patch3: u_tigervnc-ignore-epipe-on-write.patch @@ -372,9 +367,13 @@ install -D -m 755 %{SOURCE12} %{buildroot}%{_bindir}/x11vnc install -D %{SOURCE13} -m 0444 %{buildroot}%{_unitdir}/xvnc@.service install -D %{SOURCE14} -m 0444 %{buildroot}%{_unitdir}/xvnc.socket -install -D %{SOURCE15} -m 0444 %{buildroot}%{_unitdir}/xvnc-novnc.service 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 rm -rf %{buildroot}%{_datadir}/doc/tigervnc-* From e5429da1f8f79123005f3a9efba64dae5579641a9ec7f120a7bdfdc73021c50d Mon Sep 17 00:00:00 2001 From: Stefan Dirsch Date: Mon, 3 May 2021 09:41:55 +0000 Subject: [PATCH 3/3] Accepting request 889945 from home:dimstar:Factory - 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. OBS-URL: https://build.opensuse.org/request/show/889945 OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/tigervnc?expand=0&rev=205 --- tigervnc.changes | 9 +++++++++ tigervnc.spec | 12 +++--------- xvnc-novnc-lib.service | 10 ---------- xvnc-novnc-libexec.service => xvnc-novnc.service.in | 2 +- 4 files changed, 13 insertions(+), 20 deletions(-) delete mode 100644 xvnc-novnc-lib.service rename xvnc-novnc-libexec.service => xvnc-novnc.service.in (78%) 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