From bac2b6338ff1226b55c3c2db7f17c9b5d1547c15898f30822cc02a3aae7024fc Mon Sep 17 00:00:00 2001 From: Michal Srb Date: Tue, 20 May 2014 14:05:40 +0000 Subject: [PATCH 1/3] Accepting request 234861 from home:michalsrb:branches:X11:XOrg - u_tigervnc-ignore-epipe-on-write.patch * Do not display error message because of EPIPE on write. (bnc#864676) OBS-URL: https://build.opensuse.org/request/show/234861 OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/tigervnc?expand=0&rev=28 --- tigervnc.changes | 7 +++++++ tigervnc.spec | 2 ++ u_tigervnc-ignore-epipe-on-write.patch | 25 +++++++++++++++++++++++++ 3 files changed, 34 insertions(+) create mode 100644 u_tigervnc-ignore-epipe-on-write.patch diff --git a/tigervnc.changes b/tigervnc.changes index 42963da..e34676f 100644 --- a/tigervnc.changes +++ b/tigervnc.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue May 20 13:55:30 UTC 2014 - msrb@suse.com + +- u_tigervnc-ignore-epipe-on-write.patch + * Do not display error message because of EPIPE on write. + (bnc#864676) + ------------------------------------------------------------------- Fri May 16 13:52:19 UTC 2014 - msrb@suse.com diff --git a/tigervnc.spec b/tigervnc.spec index feb129e..ef03ea4 100644 --- a/tigervnc.spec +++ b/tigervnc.spec @@ -102,6 +102,7 @@ Patch3: tigervnc-clean-pressed-key-on-exit.patch Patch4: tigervnc-sf3492352.diff Patch5: tigervnc-sf3495623.patch Patch6: u_tigervnc-dont-send-ascii-control-characters.patch +Patch7: u_tigervnc-ignore-epipe-on-write.patch # Xserver patches Patch10: tigervnc-1.2.80-fix-int-to-pointer.patch @@ -141,6 +142,7 @@ fi %patch4 -p1 %patch5 -p1 %patch6 -p0 +%patch7 -p0 pushd unix/xserver patch -p1 < ../xserver114.patch diff --git a/u_tigervnc-ignore-epipe-on-write.patch b/u_tigervnc-ignore-epipe-on-write.patch new file mode 100644 index 0000000..29cdd26 --- /dev/null +++ b/u_tigervnc-ignore-epipe-on-write.patch @@ -0,0 +1,25 @@ +Author: Michal Srb +Subject: Ignore EPIPE on write. +Patch-Mainline: To be upstreamed +References: bnc#864676 + +If the VNC server closes connection after our last read and before this write, we will report error message about EPIPE. +This situation is no error, however, we should quit normally same as when we find out that connection was closed during read. +Index: common/rdr/FdOutStream.cxx +=================================================================== +--- common/rdr/FdOutStream.cxx (revision 5178) ++++ common/rdr/FdOutStream.cxx (working copy) +@@ -225,7 +225,12 @@ + // network connections. Should in fact never ever happen... + } while (n < 0 && (errno == EWOULDBLOCK)); + +- if (n < 0) throw SystemException("write",errno); ++ if (n < 0) { ++ if(errno == EPIPE) ++ n = length; // Ignore EPIPE and fake successfull write, it doesn't matter that we are writing to closed socket, we will find out once we try to read from it. ++ else ++ throw SystemException("write", errno); ++ } + + gettimeofday(&lastWrite, NULL); + From a6b08fbc40ee14d3787d4cf09a4180ae8ee8d07d17c1ab4007e213aa1f69df93 Mon Sep 17 00:00:00 2001 From: Michal Srb Date: Wed, 28 May 2014 15:05:40 +0000 Subject: [PATCH 2/3] Accepting request 235694 from home:michalsrb:branches:X11:XOrg - Use update-alternatives. OBS-URL: https://build.opensuse.org/request/show/235694 OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/tigervnc?expand=0&rev=29 --- tigervnc.changes | 5 +++++ tigervnc.spec | 22 +++++++++++++++++++--- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/tigervnc.changes b/tigervnc.changes index e34676f..97b8c4b 100644 --- a/tigervnc.changes +++ b/tigervnc.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed May 28 14:54:02 UTC 2014 - msrb@suse.com + +- Use update-alternatives. + ------------------------------------------------------------------- Tue May 20 13:55:30 UTC 2014 - msrb@suse.com diff --git a/tigervnc.spec b/tigervnc.spec index ef03ea4..a53fefd 100644 --- a/tigervnc.spec +++ b/tigervnc.spec @@ -19,7 +19,9 @@ Name: tigervnc Version: 1.3.1 Release: 0 -Conflicts: tightvnc +Provides: tightvnc = 1.3.9 +Obsoletes: tightvnc < 1.3.10 +Provides: vnc BuildRequires: Mesa-devel BuildRequires: autoconf BuildRequires: automake @@ -79,6 +81,8 @@ BuildRequires: pkgconfig(xkbfile) BuildRequires: pkgconfig(xorg-macros) >= 1.14 BuildRequires: pkgconfig(xproto) >= 7.0.17 BuildRequires: pkgconfig(xtrans) >= 1.2.2 +Requires(post): update-alternatives +Requires(postun): update-alternatives Url: http://sourceforge.net/apps/mediawiki/tigervnc/ BuildRoot: %{_tmppath}/%{name}-%{version}-build Summary: A high-performance, platform-neutral implementation of VNC @@ -189,6 +193,9 @@ popd %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 @@ -211,13 +218,22 @@ install -D -m 644 %{SOURCE10} $RPM_BUILD_ROOT%{_datadir}/vnc/classes %find_lang '%{name}' +%post +"%_sbindir/update-alternatives" --install /usr/bin/vncviewer vncviewer /usr/bin/vncviewer-tigervnc 20 + +%postun +if [ "$1" = 0 ] ; then + "%_sbindir/update-alternatives" --remove vncviewer /usr/bin/vncviewer-tigervnc +fi + %files -f %{name}.lang %defattr(-,root,root,-) -%{_bindir}/vncviewer +%{_bindir}/vncviewer-tigervnc %exclude /usr/share/doc/tigervnc-1.3.1 %doc LICENCE.TXT %doc README.txt -%{_mandir}/man1/vncviewer.1* +%{_mandir}/man1/vncviewer-tigervnc.1* +%ghost %_sysconfdir/alternatives/vncviewer %files -n xorg-x11-Xvnc %defattr(-,root,root) From 215d1da823da530b8b1bd58e94b6a1b9d8383ce57dec0b744e53a7a581f23548 Mon Sep 17 00:00:00 2001 From: Michal Srb Date: Fri, 30 May 2014 12:45:02 +0000 Subject: [PATCH 3/3] Accepting request 235723 from home:elvigia:branches:X11:XOrg - n_tigervnc-date-time.patch package republishes everyday and gets on my nerves, this is because the binaries contain hardcoded timestamps, avoid that. - export CXXFLAGS and CFLAGS before building ttigervnc otherwise it gets built without optimization. - Make build verbose so it rpmlint catches errors like the above ones. OBS-URL: https://build.opensuse.org/request/show/235723 OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/tigervnc?expand=0&rev=30 --- n_tigervnc-date-time.patch | 40 ++++++++++++++++++++++++++++++++++++++ tigervnc.changes | 11 +++++++++++ tigervnc.spec | 10 ++++++---- 3 files changed, 57 insertions(+), 4 deletions(-) create mode 100644 n_tigervnc-date-time.patch diff --git a/n_tigervnc-date-time.patch b/n_tigervnc-date-time.patch new file mode 100644 index 0000000..088420a --- /dev/null +++ b/n_tigervnc-date-time.patch @@ -0,0 +1,40 @@ +--- tigervnc-1.3.1.orig/unix/xserver/hw/vnc/buildtime.c ++++ tigervnc-1.3.1/unix/xserver/hw/vnc/buildtime.c +@@ -15,4 +15,4 @@ + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, + * USA. + */ +-char buildtime[] = __DATE__ " " __TIME__; ++char buildtime[] = "??? ?? ???? ??:??:??"; +--- tigervnc-1.3.1.orig/unix/vncconfig/buildtime.c ++++ tigervnc-1.3.1/unix/vncconfig/buildtime.c +@@ -15,4 +15,4 @@ + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, + * USA. + */ +-char buildtime[] = __DATE__ " " __TIME__; ++char buildtime[] = "??? ?? ???? ??:??:??"; +--- tigervnc-1.3.1.orig/unix/x0vncserver/buildtime.c ++++ tigervnc-1.3.1/unix/x0vncserver/buildtime.c +@@ -15,4 +15,4 @@ + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, + * USA. + */ +-char buildtime[] = __DATE__ " " __TIME__; ++char buildtime[] = "??? ?? ???? ??:??:??"; +--- tigervnc-1.3.1.orig/vncviewer/buildTime.cxx ++++ tigervnc-1.3.1/vncviewer/buildTime.cxx +@@ -15,4 +15,4 @@ + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, + * USA. + */ +-const char* buildTime = "Built on " __DATE__ " at " __TIME__; ++const char* buildTime = "Built on ??? ?? ???? at ??:??:??"; +--- tigervnc-1.3.1.orig/win/winvnc/buildTime.cxx ++++ tigervnc-1.3.1/win/winvnc/buildTime.cxx +@@ -15,4 +15,4 @@ + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, + * USA. + */ +-const char* buildTime = "Built on " __DATE__ " at " __TIME__; ++const char* buildTime = "Built on ??? ?? ???? at ??:??:??"; diff --git a/tigervnc.changes b/tigervnc.changes index 97b8c4b..5a185bd 100644 --- a/tigervnc.changes +++ b/tigervnc.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Thu May 29 03:37:30 UTC 2014 - crrodriguez@opensuse.org + +- n_tigervnc-date-time.patch package republishes everyday + and gets on my nerves, this is because the binaries contain + hardcoded timestamps, avoid that. +- export CXXFLAGS and CFLAGS before building ttigervnc otherwise + it gets built without optimization. +- Make build verbose so it rpmlint catches errors like the above ones. + + ------------------------------------------------------------------- Wed May 28 14:54:02 UTC 2014 - msrb@suse.com diff --git a/tigervnc.spec b/tigervnc.spec index a53fefd..b793230 100644 --- a/tigervnc.spec +++ b/tigervnc.spec @@ -107,7 +107,7 @@ Patch4: tigervnc-sf3492352.diff Patch5: tigervnc-sf3495623.patch Patch6: u_tigervnc-dont-send-ascii-control-characters.patch Patch7: u_tigervnc-ignore-epipe-on-write.patch - +Patch8: n_tigervnc-date-time.patch # Xserver patches Patch10: tigervnc-1.2.80-fix-int-to-pointer.patch Patch11: u_aarch64-support.patch @@ -147,7 +147,7 @@ fi %patch5 -p1 %patch6 -p0 %patch7 -p0 - +%patch8 -p1 pushd unix/xserver patch -p1 < ../xserver114.patch %patch10 -p1 @@ -158,8 +158,10 @@ patch -p1 < ../xserver114.patch popd %build +export CXXFLAGS="%optflags" +export CFLAGS="%optflags" # Build all tigervnc -cmake -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} -DCMAKE_BUILD_TYPE=RelWithDebInfo +cmake -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} -DCMAKE_BUILD_TYPE=RelWithDebInfo make %{?_smp_mflags} # Build Xvnc server @@ -180,7 +182,7 @@ autoreconf -fi --disable-devel-docs \ --with-fontrootdir=/usr/share/fonts \ --disable-selective-werror -make %{?_smp_mflags} +make %{?_smp_mflags} V=1 popd # Build java client