SHA256
1
0
forked from pool/tigervnc

Accepting request 1129040 from home:jtorres:branches:X11:XOrg

- Allow the build to be reproducible (bsc#1208478):
  * Dont sign the Java client so the jar file won't contain a
    signed file with a variable timestamp.
  * The signing was necessary for accessing the system clipboard 
    when the Java client runs as an applet.
    (This shouldn't harm due to the deprecation of Java applets 
     was done in version 9).

OBS-URL: https://build.opensuse.org/request/show/1129040
OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/tigervnc?expand=0&rev=250
This commit is contained in:
Stefan Dirsch 2023-11-27 09:26:43 +00:00 committed by Git OBS Bridge
parent 4210b0db43
commit 535bc9778d
4 changed files with 78 additions and 18 deletions

View File

@ -0,0 +1,30 @@
References: bsc#1208478
Author: Joan Torres <joan.torres@suse.com>
Subject: Don't sign the Java client
This avoids the addition of a signed file in the jar with a timestamp.
The signing was necessary for accessing the system clipboard
when the Java client runs as an applet.
(This shouldn't harm due to the deprecation of Java applets
was done in version 9).
Index: java/CMakeLists.txt
===================================================================
--- java/CMakeLists.txt.orig
+++ java/CMakeLists.txt
@@ -154,15 +154,6 @@ add_custom_command(OUTPUT VncViewer.jar
com/jcraft/jsch/jce/*.class
com/jcraft/jsch/*.class
com/tigervnc/vncviewer/*.png
- com/tigervnc/vncviewer/tigervnc.ico
- COMMAND ${CMAKE_COMMAND}
- ARGS -DJava_PATH=${Java_PATH} -DJAR_FILE=${BINDIR}/VncViewer.jar
- -DJAVA_KEYSTORE=${JAVA_KEYSTORE}
- -DJAVA_KEYSTORE_TYPE=${JAVA_KEYSTORE_TYPE}
- -DJAVA_STOREPASS=${JAVA_STOREPASS}
- -DJAVA_KEYPASS=${JAVA_KEYPASS}
- -DJAVA_KEY_ALIAS=${JAVA_KEY_ALIAS}
- -DJAVA_TSA_URL=${JAVA_TSA_URL}
- -P ${SRCDIR}/cmake/SignJar.cmake)
+ com/tigervnc/vncviewer/tigervnc.ico)
add_custom_target(java ALL DEPENDS VncViewer.jar)

View File

@ -1,47 +1,47 @@
Index: tigervnc-1.13.0/unix/xserver/hw/vnc/buildtime.c
Index: tigervnc-1.13.1/unix/xserver/hw/vnc/buildtime.c
===================================================================
--- tigervnc-1.13.0.orig/unix/xserver/hw/vnc/buildtime.c
+++ tigervnc-1.13.0/unix/xserver/hw/vnc/buildtime.c
--- tigervnc-1.13.1.orig/unix/xserver/hw/vnc/buildtime.c
+++ tigervnc-1.13.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[] = "??? ?? ???? ??:??:??";
Index: tigervnc-1.13.0/unix/vncconfig/buildtime.c
Index: tigervnc-1.13.1/unix/vncconfig/buildtime.c
===================================================================
--- tigervnc-1.13.0.orig/unix/vncconfig/buildtime.c
+++ tigervnc-1.13.0/unix/vncconfig/buildtime.c
--- tigervnc-1.13.1.orig/unix/vncconfig/buildtime.c
+++ tigervnc-1.13.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[] = "??? ?? ???? ??:??:??";
Index: tigervnc-1.13.0/unix/x0vncserver/buildtime.c
Index: tigervnc-1.13.1/unix/x0vncserver/buildtime.c
===================================================================
--- tigervnc-1.13.0.orig/unix/x0vncserver/buildtime.c
+++ tigervnc-1.13.0/unix/x0vncserver/buildtime.c
--- tigervnc-1.13.1.orig/unix/x0vncserver/buildtime.c
+++ tigervnc-1.13.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[] = "??? ?? ???? ??:??:??";
Index: tigervnc-1.13.0/win/winvnc/buildTime.cxx
Index: tigervnc-1.13.1/win/winvnc/buildTime.cxx
===================================================================
--- tigervnc-1.13.0.orig/win/winvnc/buildTime.cxx
+++ tigervnc-1.13.0/win/winvnc/buildTime.cxx
--- tigervnc-1.13.1.orig/win/winvnc/buildTime.cxx
+++ tigervnc-1.13.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 ??:??:??";
Index: tigervnc-1.13.0/CMakeLists.txt
Index: tigervnc-1.13.1/CMakeLists.txt
===================================================================
--- tigervnc-1.13.0.orig/CMakeLists.txt
+++ tigervnc-1.13.0/CMakeLists.txt
--- tigervnc-1.13.1.orig/CMakeLists.txt
+++ tigervnc-1.13.1/CMakeLists.txt
@@ -40,10 +40,6 @@ if(MSVC)
message(FATAL_ERROR "TigerVNC cannot be built with Visual Studio. Please use MinGW")
endif()
@ -53,10 +53,10 @@ Index: tigervnc-1.13.0/CMakeLists.txt
# Default to optimised builds instead of debug ones. Our code has no bugs ;)
# (CMake makes it fairly easy to toggle this back to Debug if needed)
if(NOT CMAKE_BUILD_TYPE)
Index: tigervnc-1.13.0/vncviewer/vncviewer.cxx
Index: tigervnc-1.13.1/vncviewer/vncviewer.cxx
===================================================================
--- tigervnc-1.13.0.orig/vncviewer/vncviewer.cxx
+++ tigervnc-1.13.0/vncviewer/vncviewer.cxx
--- tigervnc-1.13.1.orig/vncviewer/vncviewer.cxx
+++ tigervnc-1.13.1/vncviewer/vncviewer.cxx
@@ -105,10 +105,9 @@ static const char *about_text()
// time.
snprintf(buffer, sizeof(buffer),
@ -69,3 +69,20 @@ Index: tigervnc-1.13.0/vncviewer/vncviewer.cxx
return buffer;
}
Index: tigervnc-1.13.1/java/CMakeLists.txt
===================================================================
--- tigervnc-1.13.1.orig/java/CMakeLists.txt
+++ tigervnc-1.13.1/java/CMakeLists.txt
@@ -22,12 +22,6 @@ set(JAVA_STOREPASS NOTFOUND CACHE STRING
set(JAVA_KEYPASS NOTFOUND CACHE STRING "Password used to protect the private key of the specified keystore entry")
set(JAVA_TSA_URL NOTFOUND CACHE STRING "URL of Time Stamping Authority (TSA)")
-if(NOT BUILD)
- STRING(TIMESTAMP BUILD "%Y%m%d" UTC)
-endif()
-STRING(TIMESTAMP JAVA_DATE "%Y-%m-%d" UTC)
-STRING(TIMESTAMP JAVA_TIME "%H:%M:%S" UTC)
-
set(JAVA_SOURCES "")
set(JAVA_CLASSES "")

View File

@ -1,3 +1,14 @@
-------------------------------------------------------------------
Tue Nov 21 15:10:39 UTC 2023 - Joan Torres <joan.torres@suse.com>
- Allow the build to be reproducible (bsc#1208478):
* Dont sign the Java client so the jar file won't contain a
signed file with a variable timestamp.
* The signing was necessary for accessing the system clipboard
when the Java client runs as an applet.
(This shouldn't harm due to the deprecation of Java applets
was done in version 9).
-------------------------------------------------------------------
Fri Apr 14 07:30:42 UTC 2023 - Joan Torres <joan.torres@suse.com>

View File

@ -60,6 +60,7 @@ Patch4: u_change-button-layout-in-ServerDialog.patch
Patch5: n_tigervnc-date-time.patch
Patch6: n_correct_path_in_desktop_file.patch
Patch7: n_vncserver.patch
Patch8: n_dont_sign_java_client.patch
Provides: tightvnc = 1.5.0
Obsoletes: tightvnc < 1.5.0
Provides: vnc
@ -242,6 +243,7 @@ It maps common x11vnc arguments to x0vncserver arguments.
%patch5 -p1
%patch6 -p1
%patch7 -p0
%patch8 -p0
cp -r %{_prefix}/src/xserver/* unix/xserver/
pushd unix/xserver