forked from pool/tigervnc
fd91e09530
* Fixes crash in x0vncserver after client disconnects. (bnc#1058587) OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/tigervnc?expand=0&rev=121
490 lines
15 KiB
RPMSpec
490 lines
15 KiB
RPMSpec
#
|
|
# spec file for package tigervnc
|
|
#
|
|
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%define vncgroup vnc
|
|
%define vncuser vnc
|
|
|
|
%define tlskey %{_sysconfdir}/vnc/tls.key
|
|
%define tlscert %{_sysconfdir}/vnc/tls.cert
|
|
|
|
%define _unitdir %{_prefix}/lib/systemd/system
|
|
|
|
Name: tigervnc
|
|
Version: 1.8.0
|
|
Release: 0
|
|
Provides: tightvnc = 1.3.9
|
|
Obsoletes: tightvnc < 1.3.9
|
|
Provides: vnc
|
|
BuildRequires: Mesa-devel
|
|
BuildRequires: autoconf
|
|
BuildRequires: automake
|
|
BuildRequires: cmake
|
|
BuildRequires: fltk-devel >= 1.3.3
|
|
BuildRequires: gcc-c++
|
|
BuildRequires: gcc-c++
|
|
BuildRequires: java-devel >= 1.6.0
|
|
BuildRequires: jpackage-utils
|
|
BuildRequires: libjpeg-devel
|
|
BuildRequires: libopenssl-devel
|
|
BuildRequires: libtool
|
|
BuildRequires: nasm
|
|
BuildRequires: xorg-x11-server-sdk
|
|
BuildRequires: xorg-x11-server-source
|
|
BuildRequires: pkgconfig(x11)
|
|
BuildRequires: pkgconfig(xext)
|
|
BuildRequires: pkgconfig(xproto)
|
|
BuildRequires: pkgconfig(xtst)
|
|
# Because of keytool to build java client
|
|
BuildRequires: libgcrypt-devel
|
|
BuildRequires: libgpg-error-devel
|
|
BuildRequires: mozilla-nss
|
|
BuildRequires: pam-devel
|
|
BuildRequires: pkg-config
|
|
BuildRequires: systemd-rpm-macros
|
|
BuildRequires: xmlto
|
|
BuildRequires: xorg-x11-libICE-devel
|
|
BuildRequires: xorg-x11-libSM-devel
|
|
BuildRequires: pkgconfig(bigreqsproto) >= 1.1.0
|
|
BuildRequires: pkgconfig(compositeproto) >= 0.4
|
|
BuildRequires: pkgconfig(damageproto) >= 1.1
|
|
BuildRequires: pkgconfig(dri)
|
|
BuildRequires: pkgconfig(fixesproto) >= 4.1
|
|
BuildRequires: pkgconfig(fontsproto)
|
|
BuildRequires: pkgconfig(fontutil)
|
|
BuildRequires: pkgconfig(gl)
|
|
BuildRequires: pkgconfig(glproto)
|
|
BuildRequires: pkgconfig(gnutls)
|
|
BuildRequires: pkgconfig(inputproto) >= 1.9.99.902
|
|
BuildRequires: pkgconfig(kbproto) >= 1.0.3
|
|
BuildRequires: pkgconfig(libtasn1)
|
|
BuildRequires: pkgconfig(openssl)
|
|
BuildRequires: pkgconfig(pciaccess) >= 0.8.0
|
|
BuildRequires: pkgconfig(pixman-1) >= 0.15.20
|
|
BuildRequires: pkgconfig(presentproto) >= 1.0
|
|
BuildRequires: pkgconfig(randrproto) >= 1.2.99.3
|
|
BuildRequires: pkgconfig(recordproto) >= 1.13.99.1
|
|
BuildRequires: pkgconfig(renderproto) >= 0.11
|
|
BuildRequires: pkgconfig(resourceproto)
|
|
BuildRequires: pkgconfig(scrnsaverproto) >= 1.1
|
|
BuildRequires: pkgconfig(videoproto)
|
|
BuildRequires: pkgconfig(xau)
|
|
BuildRequires: pkgconfig(xcmiscproto) >= 1.2.0
|
|
BuildRequires: pkgconfig(xdmcp)
|
|
BuildRequires: pkgconfig(xextproto) >= 7.0.99.3
|
|
BuildRequires: pkgconfig(xf86driproto) >= 2.1.1
|
|
BuildRequires: pkgconfig(xfont) >= 1.4.2
|
|
BuildRequires: pkgconfig(xfont2)
|
|
BuildRequires: pkgconfig(xineramaproto)
|
|
BuildRequires: pkgconfig(xkbfile)
|
|
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
|
|
%endif
|
|
Url: http://tigervnc.org/
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
Summary: A high-performance, platform-neutral implementation of VNC
|
|
License: GPL-2.0 and MIT
|
|
Group: System/X11/Servers/XF86_4
|
|
Source1: https://github.com/TigerVNC/tigervnc/archive/v%{version}.tar.gz
|
|
Source4: 10-libvnc.conf
|
|
Source5: vnc-server.firewall
|
|
Source6: vnc-httpd.firewall
|
|
Source7: vnc.reg
|
|
Source8: vncpasswd.arg
|
|
Source9: vnc.pam
|
|
Source10: with-vnc-key.sh
|
|
Source11: index.vnc
|
|
Source12: x11vnc
|
|
Source13: xvnc@.service
|
|
Source14: xvnc.socket
|
|
Source15: xvnc-novnc.service
|
|
Source16: xvnc-novnc.socket
|
|
|
|
Patch1: tigervnc-newfbsize.patch
|
|
Patch2: tigervnc-clean-pressed-key-on-exit.patch
|
|
Patch3: u_tigervnc-ignore-epipe-on-write.patch
|
|
Patch4: n_tigervnc-date-time.patch
|
|
Patch5: u_tigervnc-cve-2014-8240.patch
|
|
Patch6: u_tigervnc_update_default_vncxstartup.patch
|
|
Patch7: u_build_libXvnc_as_separate_library.patch
|
|
Patch8: u_tigervnc-show-unencrypted-warning.patch
|
|
Patch9: U_allow_multiple_certs_with_same_dn_in_saved_certs_file.patch
|
|
Patch10: U_handle_certificate_verification_for_saved_certs_correctly.patch
|
|
Patch11: u_tigervnc-add-autoaccept-parameter.patch
|
|
Patch12: u_Unset-pixel-buffer-when-x0vncserver-client-disconnect.patch
|
|
|
|
%description
|
|
TigerVNC is a high-performance, platform-neutral implementation of VNC (Virtual Network Computing),
|
|
a client/server application that allows users to launch and interact with graphical applications on remote machines.
|
|
TigerVNC provides the levels of performance necessary to run 3D and video applications;
|
|
it attempts to maintain a common look and feel and re-use components, where possible, across the various platforms that it supports.
|
|
TigerVNC also provides extensions for advanced authentication methods and TLS encryption.
|
|
|
|
%package -n xorg-x11-Xvnc
|
|
Requires(post): /usr/sbin/useradd
|
|
Requires(post): /usr/sbin/groupadd
|
|
# Needed to generate certificates
|
|
Requires: openssl
|
|
Requires: windowmanager
|
|
Requires: xauth
|
|
Requires: xinit
|
|
Requires: xkbcomp
|
|
Requires: xkeyboard-config
|
|
Requires: xorg-x11-fonts-core
|
|
# For the with-vnc-key.sh script
|
|
Requires: /bin/hostname
|
|
%{?systemd_requires}
|
|
Provides: xorg-x11-Xvnc:/usr/lib/vnc/with-vnc-key.sh
|
|
Summary: TigerVNC implementation of Xvnc
|
|
Group: System/X11/Servers/XF86_4
|
|
|
|
%description -n xorg-x11-Xvnc
|
|
This is the TigerVNC implementation of Xvnc.
|
|
|
|
%package -n xorg-x11-Xvnc-novnc
|
|
Requires: novnc
|
|
Requires: python-websockify
|
|
Requires: xorg-x11-Xvnc
|
|
%{?systemd_requires}
|
|
Summary: NoVNC service for Xvnc
|
|
Group: System/X11/Servers/XF86_4
|
|
BuildArch: noarch
|
|
|
|
%description -n xorg-x11-Xvnc-novnc
|
|
A service that starts noVNC linked to Xvnc server.
|
|
|
|
%package -n xorg-x11-Xvnc-java
|
|
# Needed to serve java applet
|
|
# Requires: python
|
|
# Requires: python-pyOpenSSL
|
|
|
|
# TODO: Requires?
|
|
BuildArch: noarch
|
|
|
|
%{?systemd_requires}
|
|
Summary: VNC viewer in java
|
|
Group: System/X11/Servers/XF86_4
|
|
|
|
%description -n xorg-x11-Xvnc-java
|
|
A VNC client written in java that can be used as standalone application or as
|
|
an applet inside web page.
|
|
|
|
%package -n libXvnc1
|
|
Summary: X extension to control VNC module
|
|
Group: System/Libraries
|
|
|
|
%description -n libXvnc1
|
|
Xvnc extension allows X clients to read and change VNC configuration.
|
|
|
|
%package -n libXvnc-devel
|
|
Summary: X extension to control VNC module
|
|
Group: Development/Libraries/C and C++
|
|
Requires: libXvnc1 = %version
|
|
|
|
%description -n libXvnc-devel
|
|
Xvnc extension allows X clients to read and change VNC configuration.
|
|
|
|
%package x11vnc
|
|
Summary: Wrapper that starts x0vncserver
|
|
Group: System/X11/Servers/XF86_4
|
|
Requires: python
|
|
Requires: xorg-x11-Xvnc
|
|
Provides: x11vnc
|
|
Conflicts: x11vnc
|
|
BuildArch: noarch
|
|
|
|
%description x11vnc
|
|
This is a wrapper that looks like x11vnc, but starts x0vncserver instead.
|
|
It maps common x11vnc arguments to x0vncserver arguments.
|
|
|
|
%prep
|
|
%setup -T -b1 -q
|
|
cp -r /usr/src/xserver/* unix/xserver/
|
|
|
|
%patch1 -p1
|
|
%patch2 -p1
|
|
%patch3 -p0
|
|
%patch4 -p1
|
|
%patch5 -p1
|
|
%patch6 -p1
|
|
%patch7 -p1
|
|
%patch8 -p1
|
|
%patch9 -p1
|
|
%patch10 -p1
|
|
%patch11 -p1
|
|
%patch12 -p1
|
|
|
|
pushd unix/xserver
|
|
patch -p1 < ../xserver119.patch
|
|
popd
|
|
|
|
%build
|
|
export CXXFLAGS="%optflags"
|
|
export CFLAGS="%optflags"
|
|
# Build all tigervnc
|
|
cmake -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TIMESTAMP="??-??-?? ??:??"
|
|
make %{?_smp_mflags}
|
|
|
|
# Build Xvnc server
|
|
pushd unix/xserver
|
|
autoreconf -fi
|
|
%configure \
|
|
--disable-xorg --disable-xnest --disable-xvfb --disable-dmx \
|
|
--disable-xwin --disable-xephyr --disable-kdrive --with-pic \
|
|
--disable-static --disable-xinerama \
|
|
--with-xkb-path="/usr/share/X11/xkb" \
|
|
--with-xkb-output="/var/lib/xkb/compiled" \
|
|
--enable-glx --enable-dri \
|
|
%ifnarch s390 s390x
|
|
--enable-dri2 \
|
|
%endif
|
|
--disable-config-dbus \
|
|
--disable-config-hal \
|
|
--disable-config-udev \
|
|
--without-dtrace \
|
|
--disable-unit-tests \
|
|
--disable-devel-docs \
|
|
--with-fontrootdir=/usr/share/fonts \
|
|
--disable-selective-werror
|
|
make %{?_smp_mflags} V=1
|
|
popd
|
|
|
|
# Build java client
|
|
pushd java
|
|
cmake -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} -DJAVACFLAGS="-encoding utf8 -source 1.6 -target 1.6"
|
|
make %{?_smp_mflags}
|
|
popd
|
|
|
|
%install
|
|
|
|
%make_install
|
|
|
|
mv $RPM_BUILD_ROOT/usr/bin/vncviewer $RPM_BUILD_ROOT/usr/bin/vncviewer-tigervnc
|
|
mv $RPM_BUILD_ROOT/usr/share/man/man1/vncviewer.1 $RPM_BUILD_ROOT/usr/share/man/man1/vncviewer-tigervnc.1
|
|
|
|
pushd unix/xserver
|
|
%make_install
|
|
popd
|
|
|
|
pushd java
|
|
mkdir -p $RPM_BUILD_ROOT%{_datadir}/vnc/classes
|
|
install -m755 VncViewer.jar $RPM_BUILD_ROOT%{_datadir}/vnc/classes
|
|
popd
|
|
|
|
%ifnarch s390x
|
|
install -D -m 644 %{SOURCE4} $RPM_BUILD_ROOT/etc/X11/xorg.conf.d/10-libvnc.conf
|
|
%endif
|
|
install -D -m 644 %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/SuSEfirewall2.d/services/vnc-server
|
|
install -D -m 644 %{SOURCE6} $RPM_BUILD_ROOT/etc/sysconfig/SuSEfirewall2.d/services/vnc-httpd
|
|
install -D -m 644 %{SOURCE7} $RPM_BUILD_ROOT/etc/slp.reg.d/vnc.reg
|
|
install -D -m 755 %{SOURCE8} $RPM_BUILD_ROOT%{_bindir}/vncpasswd.arg
|
|
install -D -m 644 %{SOURCE9} $RPM_BUILD_ROOT/etc/pam.d/vnc
|
|
install -D -m 644 %{SOURCE11} $RPM_BUILD_ROOT%{_datadir}/vnc/classes
|
|
%if 0%{?suse_version} >= 1315
|
|
ln -s -f %{_sysconfdir}/alternatives/vncviewer $RPM_BUILD_ROOT%{_bindir}/vncviewer
|
|
ln -s -f %{_sysconfdir}/alternatives/vncviewer.1.gz $RPM_BUILD_ROOT%{_mandir}/man1/vncviewer.1.gz
|
|
%endif
|
|
|
|
mkdir -p %{buildroot}%{_sbindir}
|
|
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcxvnc
|
|
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcxvnc-novnc
|
|
|
|
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/vnc
|
|
|
|
mkdir -p $RPM_BUILD_ROOT%{_libexecdir}/vnc
|
|
install -D -m 755 %{SOURCE10} $RPM_BUILD_ROOT%{_libexecdir}/vnc
|
|
|
|
install -D -m 755 %{SOURCE12} $RPM_BUILD_ROOT%{_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
|
|
|
|
rm -rf $RPM_BUILD_ROOT/usr/share/doc/tigervnc-*
|
|
|
|
%find_lang '%{name}'
|
|
|
|
%post
|
|
%if 0%{?suse_version} >= 1315
|
|
%_sbindir/update-alternatives \
|
|
--install %{_bindir}/vncviewer vncviewer %{_bindir}/vncviewer-tigervnc 20 \
|
|
--slave %{_mandir}/man1/vncviewer.1.gz vncviewer.1.gz %{_mandir}/man1/vncviewer-tigervnc.1.gz
|
|
%endif
|
|
|
|
%postun
|
|
%if 0%{?suse_version} >= 1315
|
|
if [ "$1" = 0 ] ; then
|
|
"%_sbindir/update-alternatives" --remove vncviewer /usr/bin/vncviewer-tigervnc
|
|
fi
|
|
%endif
|
|
|
|
%pre -n xorg-x11-Xvnc
|
|
# %service_add_pre xvnc@.service
|
|
%service_add_pre xvnc.socket
|
|
|
|
getent group %{vncgroup} > /dev/null || groupadd -r %{vncgroup} || :
|
|
getent passwd %{vncuser} > /dev/null || useradd -r -g %{vncgroup} -d /var/lib/empty -s /sbin/nologin -c "user for VNC" %{vncuser} || :
|
|
usermod -G shadow -a %{vncuser} || :
|
|
|
|
%post -n xorg-x11-Xvnc
|
|
# %service_add_post xvnc@.service
|
|
%service_add_post xvnc.socket
|
|
|
|
%preun -n xorg-x11-Xvnc
|
|
# %service_del_preun xvnc@.service
|
|
%service_del_preun xvnc.socket
|
|
|
|
%postun -n xorg-x11-Xvnc
|
|
# %service_del_postun xvnc@.service
|
|
%service_del_postun xvnc.socket
|
|
|
|
%pre -n xorg-x11-Xvnc-novnc
|
|
%service_add_pre xvnc-novnc.service
|
|
%service_add_pre xvnc-novnc.socket
|
|
|
|
%post -n xorg-x11-Xvnc-novnc
|
|
%service_add_post xvnc-novnc.service
|
|
%service_add_post xvnc-novnc.socket
|
|
|
|
%preun -n xorg-x11-Xvnc-novnc
|
|
%service_del_preun xvnc-novnc.service
|
|
%service_del_preun xvnc-novnc.socket
|
|
|
|
%postun -n xorg-x11-Xvnc-novnc
|
|
%service_del_postun xvnc-novnc.service
|
|
%service_del_postun xvnc-novnc.socket
|
|
|
|
%post -n libXvnc1 -p /sbin/ldconfig
|
|
|
|
%postun -n libXvnc1 -p /sbin/ldconfig
|
|
|
|
%files -f %{name}.lang
|
|
%defattr(-,root,root,-)
|
|
%ghost %{_bindir}/vncviewer
|
|
%{_bindir}/vncviewer-tigervnc
|
|
%doc LICENCE.TXT README.txt
|
|
%ghost %_mandir/man1/vncviewer.1.gz
|
|
%doc %_mandir/man1/vncviewer-tigervnc.1.gz
|
|
%if 0%{?suse_version} >= 1315
|
|
%ghost %_sysconfdir/alternatives/vncviewer
|
|
%ghost %_sysconfdir/alternatives/vncviewer.1.gz
|
|
%endif
|
|
|
|
%dir %_datadir/icons/hicolor/16x16
|
|
%dir %_datadir/icons/hicolor/16x16/apps
|
|
%dir %_datadir/icons/hicolor/22x22
|
|
%dir %_datadir/icons/hicolor/22x22/apps
|
|
%dir %_datadir/icons/hicolor/24x24
|
|
%dir %_datadir/icons/hicolor/24x24/apps
|
|
%dir %_datadir/icons/hicolor/32x32
|
|
%dir %_datadir/icons/hicolor/32x32/apps
|
|
%dir %_datadir/icons/hicolor/48x48
|
|
%dir %_datadir/icons/hicolor/48x48/apps
|
|
%dir %_datadir/icons/hicolor/scalable
|
|
%dir %_datadir/icons/hicolor/scalable/apps
|
|
|
|
%_datadir/icons/hicolor/*/apps/tigervnc.png
|
|
%_datadir/icons/hicolor/scalable/apps/tigervnc.svg
|
|
|
|
%_datadir/applications/vncviewer.desktop
|
|
|
|
%files -n xorg-x11-Xvnc
|
|
%doc LICENCE.TXT README.txt
|
|
%defattr(-,root,root)
|
|
|
|
%{_bindir}/Xvnc
|
|
%{_bindir}/vncconfig
|
|
%{_bindir}/vncpasswd
|
|
%{_bindir}/vncpasswd.arg
|
|
%{_bindir}/vncserver
|
|
%{_bindir}/x0vncserver
|
|
|
|
%exclude %{_mandir}/man1/Xserver.1*
|
|
%{_mandir}/man1/Xvnc.1*
|
|
%{_mandir}/man1/vncconfig.1*
|
|
%{_mandir}/man1/vncpasswd.1*
|
|
%{_mandir}/man1/vncserver.1*
|
|
%{_mandir}/man1/x0vncserver.1*
|
|
|
|
%{_unitdir}/xvnc@.service
|
|
%{_unitdir}/xvnc.socket
|
|
%{_sbindir}/rcxvnc
|
|
|
|
%exclude /usr/%{_lib}/xorg/protocol.txt
|
|
%exclude /usr/%{_lib}/xorg/modules/extensions/libvnc.la
|
|
%ifnarch s390 s390x
|
|
%{_libdir}/xorg/modules/extensions/libvnc.so
|
|
%else
|
|
%exclude %{_libdir}/xorg/modules
|
|
%exclude %{_libdir}/xorg/modules/extensions
|
|
%exclude %{_libdir}/xorg/modules/extensions/libvnc.so
|
|
%endif
|
|
|
|
%exclude /var/lib/xkb/compiled/README.compiled
|
|
|
|
%config %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/vnc-server
|
|
%config %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/vnc-httpd
|
|
|
|
%ifnarch s390 s390x
|
|
%config(noreplace) /etc/X11/xorg.conf.d/10-libvnc.conf
|
|
%else
|
|
%exclude /etc/X11/xorg.conf.d
|
|
%endif
|
|
%dir /etc/slp.reg.d
|
|
%config(noreplace) /etc/slp.reg.d/vnc.reg
|
|
|
|
%config %{_sysconfdir}/pam.d/vnc
|
|
|
|
%exclude /usr/lib/debug/*
|
|
%exclude /usr/lib/debug/.*
|
|
%exclude /usr/src/debug
|
|
|
|
%dir %attr(0755,%{vncuser},%{vncuser}) %{_sysconfdir}/vnc
|
|
%ghost %attr(0600,%{vncuser},%{vncuser}) %config(noreplace) %{tlskey}
|
|
%ghost %attr(0644,%{vncuser},%{vncuser}) %config(noreplace) %{tlscert}
|
|
|
|
%{_libexecdir}/vnc
|
|
|
|
%files -n xorg-x11-Xvnc-novnc
|
|
%{_unitdir}/xvnc-novnc.service
|
|
%{_unitdir}/xvnc-novnc.socket
|
|
%{_sbindir}/rcxvnc-novnc
|
|
|
|
%files -n xorg-x11-Xvnc-java
|
|
%doc java/com/tigervnc/vncviewer/README
|
|
%{_datadir}/vnc
|
|
|
|
%files -n libXvnc1
|
|
%defattr(-,root,root)
|
|
%{_libdir}/libXvnc.so.1*
|
|
|
|
%files -n libXvnc-devel
|
|
%defattr(-,root,root)
|
|
%{_libdir}/libXvnc.so
|
|
%{_includedir}/X11/extensions/Xvnc.h
|
|
|
|
%files x11vnc
|
|
%defattr(-,root,root)
|
|
%{_bindir}/x11vnc
|
|
|
|
%changelog
|