Skip to content

Commit 0fe910d

Browse files
author
Tor Didriksen
committed
Bug#26022865 BUILD FOR WINDOWS-S12-64BIT,ADVANCED IS FAILING ON PB2 MYSQL-5.6
Remove cmake code for signing executables. Automatic signing has always failed anyways. It should be done manually as part of the release process.
1 parent 834e27e commit 0fe910d

File tree

2 files changed

+2
-67
lines changed

2 files changed

+2
-67
lines changed

cmake/build_configurations/mysql_release.cmake

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
1+
# Copyright (c) 2010, 2017, Oracle and/or its affiliates. All rights reserved.
22
#
33
# This program is free software; you can redistribute it and/or modify
44
# it under the terms of the GNU General Public License as published by
@@ -25,13 +25,6 @@ IF(NOT COMPILATION_COMMENT)
2525
SET(COMPILATION_COMMENT "MySQL Community Server (GPL)")
2626
ENDIF()
2727

28-
IF(WIN32)
29-
IF(NOT CMAKE_USING_VC_FREE_TOOLS)
30-
# Sign executables with authenticode certificate
31-
SET(SIGNCODE 1 CACHE BOOL "")
32-
ENDIF()
33-
ENDIF()
34-
3528
IF(UNIX)
3629
SET(WITH_EXTRA_CHARSETS all CACHE STRING "")
3730

cmake/install_macros.cmake

Lines changed: 1 addition & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved.
1+
# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved.
22
#
33
# This program is free software; you can redistribute it and/or modify
44
# it under the terms of the GNU General Public License as published by
@@ -151,60 +151,6 @@ IF(UNIX)
151151
ENDIF()
152152
ENDMACRO()
153153

154-
IF(WIN32)
155-
OPTION(SIGNCODE "Sign executables and dlls with digital certificate" OFF)
156-
MARK_AS_ADVANCED(SIGNCODE)
157-
IF(SIGNCODE)
158-
SET(SIGNTOOL_PARAMETERS
159-
/a /t http://timestamp.verisign.com/scripts/timstamp.dll
160-
CACHE STRING "parameters for signtool (list)")
161-
FIND_PROGRAM(SIGNTOOL_EXECUTABLE signtool)
162-
IF(NOT SIGNTOOL_EXECUTABLE)
163-
MESSAGE(FATAL_ERROR
164-
"signtool is not found. Signing executables not possible")
165-
ENDIF()
166-
IF(NOT DEFINED SIGNCODE_ENABLED)
167-
FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/testsign.c "int main(){return 0;}")
168-
MAKE_DIRECTORY(${CMAKE_CURRENT_BINARY_DIR}/testsign)
169-
TRY_COMPILE(RESULT ${CMAKE_CURRENT_BINARY_DIR}/testsign ${CMAKE_CURRENT_BINARY_DIR}/testsign.c
170-
COPY_FILE ${CMAKE_CURRENT_BINARY_DIR}/testsign.exe
171-
)
172-
173-
EXECUTE_PROCESS(COMMAND
174-
${SIGNTOOL_EXECUTABLE} sign ${SIGNTOOL_PARAMETERS} ${CMAKE_CURRENT_BINARY_DIR}/testsign.exe
175-
RESULT_VARIABLE ERR ERROR_QUIET OUTPUT_QUIET
176-
)
177-
IF(ERR EQUAL 0)
178-
SET(SIGNCODE_ENABLED 1 CACHE INTERNAL "Can sign executables")
179-
ELSE()
180-
MESSAGE(STATUS "Disable authenticode signing for executables")
181-
SET(SIGNCODE_ENABLED 0 CACHE INTERNAL "Invalid or missing certificate")
182-
ENDIF()
183-
ENDIF()
184-
MARK_AS_ADVANCED(SIGNTOOL_EXECUTABLE SIGNTOOL_PARAMETERS)
185-
ENDIF()
186-
ENDIF()
187-
188-
MACRO(SIGN_TARGET target)
189-
GET_TARGET_PROPERTY(target_type ${target} TYPE)
190-
IF(target_type AND NOT target_type MATCHES "STATIC")
191-
GET_TARGET_PROPERTY(target_location ${target} LOCATION)
192-
IF(CMAKE_GENERATOR MATCHES "Visual Studio")
193-
STRING(REPLACE "${CMAKE_CFG_INTDIR}" "\${CMAKE_INSTALL_CONFIG_NAME}"
194-
target_location ${target_location})
195-
ENDIF()
196-
INSTALL(CODE
197-
"EXECUTE_PROCESS(COMMAND
198-
${SIGNTOOL_EXECUTABLE} sign ${SIGNTOOL_PARAMETERS} ${target_location}
199-
RESULT_VARIABLE ERR)
200-
IF(NOT \${ERR} EQUAL 0)
201-
MESSAGE(FATAL_ERROR \"Error signing ${target_location}\")
202-
ENDIF()
203-
")
204-
ENDIF()
205-
ENDMACRO()
206-
207-
208154
# Installs targets, also installs pdbs on Windows.
209155
#
210156
#
@@ -225,10 +171,6 @@ FUNCTION(MYSQL_INSTALL_TARGETS)
225171

226172

227173
FOREACH(target ${TARGETS})
228-
# If signing is required, sign executables before installing
229-
IF(SIGNCODE AND SIGNCODE_ENABLED)
230-
SIGN_TARGET(${target})
231-
ENDIF()
232174
# Install man pages on Unix
233175
IF(UNIX)
234176
GET_TARGET_PROPERTY(target_location ${target} LOCATION)

0 commit comments

Comments
 (0)