diff --git a/tigervnc.spec b/tigervnc.spec index 47d5c96765262acf25f833db119eaedb132cc2b7..175dc2c7084c706c0960935c2380540acf9aacf8 100644 --- a/tigervnc.spec +++ b/tigervnc.spec @@ -1,29 +1,32 @@ %global _hardened_build 1 +%global selinuxtype targeted +%global modulename vncsession Name: tigervnc -Version: 1.10.1 -Release: 7 +Version: 1.13.0 +Release: 3 Summary: A TigerVNC remote display system License: GPLv2+ -URL: http://www.tigervnc.com +URL: http://github.com/TigerVNC/tigervnc/ -Source0: https://github.com/TigerVNC/tigervnc/archive/%{name}-%{version}.tar.gz +Source0: https://github.com/TigerVNC/tigervnc/archive/v1.13.0.tar.gz Source1: vncserver.service -Source2: vncserver.sysconfig +Source2: vncserver Source3: 10-libvnc.conf Source4: xvnc.service Source5: xvnc.socket +Source6: HOWTO.md -Patch0: tigervnc-xserver120.patch -Patch1: fix-build-error-with-xorg-server-1.20.8.patch -Patch2: CVE-2020-26117.patch +Patch0001: tigervnc-xserver120.patch +Patch0002: 0001-Fix-some-translations-of-start-menu.patch +Patch0003: backport-tigervnc-sanity-check-when-cleaning-up-keymap-changes.patch BuildRequires: gcc-c++ systemd cmake automake autoconf gettext gettext-autopoint pixman-devel fltk-devel >= 1.3.3 BuildRequires: libX11-devel libtool libxkbfile-devel libpciaccess-devel libXinerama-devel libXfont2-devel BuildRequires: libXext-devel xorg-x11-server-source libXi-devel libXdmcp-devel libxshmfence-devel BuildRequires: xorg-x11-xtrans-devel xorg-x11-util-macros xorg-x11-server-devel libXtst-devel libdrm-devel libXt-devel -BuildRequires: openssl-devel mesa-libGL-devel freetype-devel desktop-file-utils java-devel jpackage-utils pam-devel gnutls-devel libjpeg-turbo-devel +BuildRequires: openssl-devel mesa-libGL-devel freetype-devel desktop-file-utils java-devel jpackage-utils pam-devel gnutls-devel libjpeg-turbo-devel selinux-policy-devel BuildRequires: xorg-x11-font-utils Requires(post): coreutils @@ -31,8 +34,8 @@ Requires(postun):coreutils Requires: hicolor-icon-theme -Provides: %{name}-license = %{name}-%{release} %{name}-icons = %{name}-%{release} -Obsoletes: %{name}-license < %{name}-%{release} %{name}-icons < %{name}-%{release} +Provides: %{name}-icons = %{version}-%{release} +Obsoletes: %{name}-icons < %{version}-%{release} %description This package provides client for Virtual Network Computing (VNC), with which @@ -41,6 +44,7 @@ you can access any other desktops running a VNC server. %package server Summary: A TigerVNC server Requires: perl-interpreter tigervnc-server-minimal xorg-x11-xauth xorg-x11-xinit +Requires: (tigervnc-selinux if selinux-policy-%{selinuxtype}) %description server This package provides full installaion of TigerCNC and utilities that @@ -50,7 +54,7 @@ X session. %package server-minimal Summary: A minimal installation of TigerVNC server -Requires: mesa-dri-drivers, xkeyboard-config, xorg-x11-xkb-utils %{name} +Requires: mesa-dri-drivers, xkeyboard-config, %{name}-license xkbcomp %description server-minimal This package provides minimal installation of TigerVNC, with which @@ -58,7 +62,7 @@ other people can access your desktop on your machine. %package server-module Summary: TigerVNC module to Xorg -Requires: xorg-x11-server-Xorg %(xserver-sdk-abi-requires ansic) %(xserver-sdk-abi-requires videodrv) %{name} +Requires: xorg-x11-server-Xorg %(xserver-sdk-abi-requires ansic) %(xserver-sdk-abi-requires videodrv) %{name}-license %description server-module This package contains libvnc.so module to X server, allowing others @@ -72,21 +76,37 @@ BuildArch: noarch %description server-applet If you want to use web browser in clients, please install this package. +%package selinux +Summary: SElinux module for TigerVNC +BuildRequires: selinux-policy-devel +Requires: selinux-policy-targeted +BuildArch: noarch + +%description selinux +This package provides the SElinux policy module to ensure Tigervnc runs properly under an environment with SElinux enabled + +%package license +Summary: License of Tigervnc suite +BuildArch: noarch + +%description license +This package contains license of the Tigervnc suite + %package_help %prep %setup -q cp -r /usr/share/xorg-x11-server-source/* unix/xserver -%patch0 -p1 -b .xserver120-rebased -%patch1 -p1 -%patch2 -p1 +%patch0001 -p1 -b .xserver120-rebased pushd unix/xserver for all in `find . -type f -perm -001`; do chmod -x "$all" done popd +%patch0002 -p1 +%patch0003 -p1 %build export CFLAGS="$RPM_OPT_FLAGS -fpic" @@ -112,6 +132,11 @@ pushd media make popd +# SElinux +pushd unix/vncserver/selinux +make +popd + # Build Java applet pushd java %{cmake} . @@ -123,19 +148,19 @@ popd rm -f %{buildroot}%{_docdir}/%{name}-%{version}/{README.rst,LICENCE.TXT} pushd unix/xserver/hw/vnc +%make_install +popd + +pushd unix/vncserver/selinux make install DESTDIR=%{buildroot} popd # Install systemd unit file mkdir -p %{buildroot}%{_unitdir} -install -m644 %{SOURCE1} %{buildroot}%{_unitdir}/vncserver@.service install -m644 %{SOURCE4} %{buildroot}%{_unitdir}/xvnc@.service install -m644 %{SOURCE5} %{buildroot}%{_unitdir}/xvnc.socket rm -rf %{buildroot}%{_initrddir} -mkdir -p %{buildroot}%{_sysconfdir}/sysconfig -install -m644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/vncservers - # Install desktop stuff mkdir -p %{buildroot}%{_datadir}/icons/hicolor/{16x16,24x24,48x48}/apps @@ -145,6 +170,7 @@ install -m644 tigervnc_$s.png %{buildroot}%{_datadir}/icons/hicolor/${s}x$s/apps done popd +install -m 755 %{SOURCE2} %{buildroot}%{_bindir}/vncserver # Install Java applet pushd java @@ -160,6 +186,8 @@ rm -f %{buildroot}%{_libdir}/xorg/modules/extensions/libvnc.la mkdir -p %{buildroot}%{_sysconfdir}/X11/xorg.conf.d/ install -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/X11/xorg.conf.d/10-libvnc.conf +install -m 644 %{SOURCE6} %{buildroot}%{_docdir}/tigervnc/HOWTO.md + %check pushd tests make %{?_smp_mflags} @@ -172,20 +200,25 @@ popd %files -f %{name}.lang %defattr(-,root,root) %doc README.rst -%license LICENCE.TXT %{_bindir}/vncviewer %{_datadir}/applications/* -%license LICENCE.TXT %{_datadir}/icons/hicolor/*/apps/* +%{_datadir}/metainfo/org.tigervnc.vncviewer.metainfo.xml %files server %defattr(-,root,root) -%config(noreplace) %{_sysconfdir}/sysconfig/vncservers -%{_bindir}/vncserver -%{_bindir}/x0vncserver +%config(noreplace) %{_sysconfdir}/pam.d/tigervnc +%config(noreplace) %{_sysconfdir}/tigervnc/vncserver-config-defaults +%config(noreplace) %{_sysconfdir}/tigervnc/vncserver-config-mandatory +%config(noreplace) %{_sysconfdir}/tigervnc/vncserver.users %{_unitdir}/vncserver@.service %{_unitdir}/xvnc@.service %{_unitdir}/xvnc.socket +%{_bindir}/vncserver +%{_bindir}/x0vncserver +%{_sbindir}/vncsession +%{_libexecdir}/vncserver +%{_libexecdir}/vncsession-start %files server-minimal %defattr(-,root,root) @@ -202,41 +235,104 @@ popd %defattr(-,root,root) %{_datadir}/vnc/classes/* +%files license +%{_docdir}/tigervnc/LICENCE.TXT + +%files selinux +%{_datadir}/selinux/packages/%{selinuxtype}/%{modulename}.pp.* +%ghost %verify(not md5 size mtime) %{_sharedstatedir}/selinux/%{selinuxtype}/active/modules/200/%{modulename} + %files help %defattr(-,root,root) %doc java/com/tigervnc/vncviewer/README +%{_docdir}/tigervnc/HOWTO.md %{_mandir}/man1/* +%{_mandir}/man8/* %changelog -* Mon Mar 13 2023 zhouyihang - 1.10.1-7 +* Tue May 23 2023 zhouyihang - 1.13.0-3 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:rebuild for CVE-2023-1393 + +* Mon Mar 13 2023 zhouyihang - 1.13.0-2 - Type:bugfix - ID:NA - SUG:NA - DESC:add buildrequire xorg-x11-font-utils -* Wed Mar 08 2023 zhouyihang - 1.10.1-6 +* Thu Feb 23 2023 zhouyihang - 1.13.0-1 +- Type:requirements +- ID:NA +- SUG:NA +- DESC:update tigervnc to 1.13.0 + +* Sat Jun 11 2022 gaihuiying - 1.12.0-7 +- Type:bugfix +- CVE:NA +- SUG:NA +- DESC: enable test + +* Thu Apr 14 2022 ouyangminxiang - 1.12.0-6 +- Type:translation +- ID:NA +- SUG:NA +- DESC:fix some translation of start menu + +* Tue Apr 12 2022 gaihuiying - 1.12.0-5 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:fix vncserver unrecognized option rfbwait + +* Tue Apr 12 2022 gaihuiying - 1.12.0-4 - Type:bugfix - ID:NA - SUG:NA -- DESC:enable test +- DESC:change vncserver permission from 644 to 755 -* Mon Nov 02 2020 quanhongfei - 1.10.1-5 -- Type:CVE -- ID:CVE-2020-26117 +* Fri Apr 01 2022 yanglu - 1.12.0-3 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:tigervnc dose not provide tigervnc-license + +* Wed Mar 30 2022 yanglu - 1.12.0-2 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:Modify the installation dependency of tigervnc-server-module + +* Wed Mar 23 2022 xinghe - 1.12.0-1 +- Type:requirements +- ID:NA +- SUG:NA +- DESC:update tigervnc to 1.12.0 + +* Wed Nov 3 2021 Li Jingwei - 1.10.1-6 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:correct provides version typo in spec file + +* Thu Oct 29 2020 yanan - 1.10.1-5 +- Type:cves +- ID:NA - SUG:NA - DESC:fix CVE-2020-26117 -* Mon Sep 21 2020 gaihuiying - 1.10.1-4 +* Thu Sep 10 2020 lunankun - 1.10.1-4 - Type:bugfix - ID:NA - SUG:NA -- DESC:fix build fail with xorg-server-1.20.8 +- DESC:fix source0 url -* Fri Aug 21 2020 gaihuiying - 1.10.1-3 -- Type:enhancement +* Thu Jul 30 2020 gaihuiying - 1.10.1-3 +- Type:bugfix - ID:NA - SUG:NA -- DESC:release +1 for rebuild +- DESC:fix build fail with xorg server new version * Wed Feb 26 2020 openEuler Buildteam - 1.10.1-2 - Type:bugfix