From 0ee067229c784df83c8e1d85b232b6252c323b82 Mon Sep 17 00:00:00 2001 From: Tor Didriksen Date: Thu, 9 Nov 2017 08:36:59 +0100 Subject: 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. --- cmake/build_configurations/mysql_release.cmake | 7 --- cmake/install_macros.cmake | 60 +------------------------- 2 files changed, 1 insertion(+), 66 deletions(-) (limited to 'cmake') diff --git a/cmake/build_configurations/mysql_release.cmake b/cmake/build_configurations/mysql_release.cmake index 7d54e2aec77..58808943124 100644 --- a/cmake/build_configurations/mysql_release.cmake +++ b/cmake/build_configurations/mysql_release.cmake @@ -100,13 +100,6 @@ IF(NOT COMPILATION_COMMENT) SET(COMPILATION_COMMENT "MySQL Community Server (GPL)") ENDIF() -IF(WIN32) - IF(NOT CMAKE_USING_VC_FREE_TOOLS) - # Sign executables with authenticode certificate - SET(SIGNCODE 1 CACHE BOOL "") - ENDIF() -ENDIF() - IF(UNIX) SET(WITH_EXTRA_CHARSETS all CACHE STRING "") IF(EXISTS "${CMAKE_SOURCE_DIR}/COPYING") diff --git a/cmake/install_macros.cmake b/cmake/install_macros.cmake index be243a42924..5475dbe2686 100644 --- a/cmake/install_macros.cmake +++ b/cmake/install_macros.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -151,60 +151,6 @@ IF(UNIX) ENDIF() ENDMACRO() -IF(WIN32) - OPTION(SIGNCODE "Sign executables and dlls with digital certificate" OFF) - MARK_AS_ADVANCED(SIGNCODE) - IF(SIGNCODE) - SET(SIGNTOOL_PARAMETERS - /a /t http://timestamp.verisign.com/scripts/timstamp.dll - CACHE STRING "parameters for signtool (list)") - FIND_PROGRAM(SIGNTOOL_EXECUTABLE signtool) - IF(NOT SIGNTOOL_EXECUTABLE) - MESSAGE(FATAL_ERROR - "signtool is not found. Signing executables not possible") - ENDIF() - IF(NOT DEFINED SIGNCODE_ENABLED) - FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/testsign.c "int main(){return 0;}") - MAKE_DIRECTORY(${CMAKE_CURRENT_BINARY_DIR}/testsign) - TRY_COMPILE(RESULT ${CMAKE_CURRENT_BINARY_DIR}/testsign ${CMAKE_CURRENT_BINARY_DIR}/testsign.c - COPY_FILE ${CMAKE_CURRENT_BINARY_DIR}/testsign.exe - ) - - EXECUTE_PROCESS(COMMAND - ${SIGNTOOL_EXECUTABLE} sign ${SIGNTOOL_PARAMETERS} ${CMAKE_CURRENT_BINARY_DIR}/testsign.exe - RESULT_VARIABLE ERR ERROR_QUIET OUTPUT_QUIET - ) - IF(ERR EQUAL 0) - SET(SIGNCODE_ENABLED 1 CACHE INTERNAL "Can sign executables") - ELSE() - MESSAGE(STATUS "Disable authenticode signing for executables") - SET(SIGNCODE_ENABLED 0 CACHE INTERNAL "Invalid or missing certificate") - ENDIF() - ENDIF() - MARK_AS_ADVANCED(SIGNTOOL_EXECUTABLE SIGNTOOL_PARAMETERS) - ENDIF() -ENDIF() - -MACRO(SIGN_TARGET target) - GET_TARGET_PROPERTY(target_type ${target} TYPE) - IF(target_type AND NOT target_type MATCHES "STATIC") - GET_TARGET_PROPERTY(target_location ${target} LOCATION) - IF(CMAKE_GENERATOR MATCHES "Visual Studio") - STRING(REPLACE "${CMAKE_CFG_INTDIR}" "\${CMAKE_INSTALL_CONFIG_NAME}" - target_location ${target_location}) - ENDIF() - INSTALL(CODE - "EXECUTE_PROCESS(COMMAND - ${SIGNTOOL_EXECUTABLE} sign ${SIGNTOOL_PARAMETERS} ${target_location} - RESULT_VARIABLE ERR) - IF(NOT \${ERR} EQUAL 0) - MESSAGE(FATAL_ERROR \"Error signing ${target_location}\") - ENDIF() - ") - ENDIF() -ENDMACRO() - - # Installs targets, also installs pdbs on Windows. # # @@ -225,10 +171,6 @@ FUNCTION(MYSQL_INSTALL_TARGETS) FOREACH(target ${TARGETS}) - # If signing is required, sign executables before installing - IF(SIGNCODE AND SIGNCODE_ENABLED) - SIGN_TARGET(${target}) - ENDIF() # Install man pages on Unix IF(UNIX) GET_TARGET_PROPERTY(target_location ${target} LOCATION) -- cgit v1.2.1 From 12333385c1f38ca5a5667ca708b3008980251d7e Mon Sep 17 00:00:00 2001 From: Tor Didriksen Date: Thu, 9 Nov 2017 08:45:45 +0100 Subject: dos2unix cmake/mysql_add_executable.cmake --- cmake/mysql_add_executable.cmake | 96 ++++++++++++++++++++-------------------- 1 file changed, 48 insertions(+), 48 deletions(-) (limited to 'cmake') diff --git a/cmake/mysql_add_executable.cmake b/cmake/mysql_add_executable.cmake index b1e1d3129e6..bcbbe7d4931 100644 --- a/cmake/mysql_add_executable.cmake +++ b/cmake/mysql_add_executable.cmake @@ -1,48 +1,48 @@ -# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -# Add executable plus some additional MySQL specific stuff -# Usage (same as for standard CMake's ADD_EXECUTABLE) -# -# MYSQL_ADD_EXECUTABLE(target source1...sourceN) -# -# MySQL specifics: -# - instruct CPack to install executable under ${CMAKE_INSTALL_PREFIX}/bin directory -# On Windows : -# - add version resource -# - instruct CPack to do autenticode signing if SIGNCODE is set - -INCLUDE(cmake_parse_arguments) - -FUNCTION (MYSQL_ADD_EXECUTABLE) - # Pass-through arguments for ADD_EXECUTABLE - MYSQL_PARSE_ARGUMENTS(ARG - "WIN32;MACOSX_BUNDLE;EXCLUDE_FROM_ALL;DESTINATION;COMPONENT" - "" - ${ARGN} - ) - LIST(GET ARG_DEFAULT_ARGS 0 target) - LIST(REMOVE_AT ARG_DEFAULT_ARGS 0) - - SET(sources ${ARG_DEFAULT_ARGS}) - ADD_VERSION_INFO(${target} EXECUTABLE sources) - ADD_EXECUTABLE(${target} ${ARG_WIN32} ${ARG_MACOSX_BUNDLE} ${ARG_EXCLUDE_FROM_ALL} ${sources}) - # tell CPack where to install - IF(NOT ARG_EXCLUDE_FROM_ALL) - IF(NOT ARG_DESTINATION) - SET(ARG_DESTINATION ${INSTALL_BINDIR}) +# Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# Add executable plus some additional MySQL specific stuff +# Usage (same as for standard CMake's ADD_EXECUTABLE) +# +# MYSQL_ADD_EXECUTABLE(target source1...sourceN) +# +# MySQL specifics: +# - instruct CPack to install executable under ${CMAKE_INSTALL_PREFIX}/bin directory +# On Windows : +# - add version resource +# - instruct CPack to do autenticode signing if SIGNCODE is set + +INCLUDE(cmake_parse_arguments) + +FUNCTION (MYSQL_ADD_EXECUTABLE) + # Pass-through arguments for ADD_EXECUTABLE + MYSQL_PARSE_ARGUMENTS(ARG + "WIN32;MACOSX_BUNDLE;EXCLUDE_FROM_ALL;DESTINATION;COMPONENT" + "" + ${ARGN} + ) + LIST(GET ARG_DEFAULT_ARGS 0 target) + LIST(REMOVE_AT ARG_DEFAULT_ARGS 0) + + SET(sources ${ARG_DEFAULT_ARGS}) + ADD_VERSION_INFO(${target} EXECUTABLE sources) + ADD_EXECUTABLE(${target} ${ARG_WIN32} ${ARG_MACOSX_BUNDLE} ${ARG_EXCLUDE_FROM_ALL} ${sources}) + # tell CPack where to install + IF(NOT ARG_EXCLUDE_FROM_ALL) + IF(NOT ARG_DESTINATION) + SET(ARG_DESTINATION ${INSTALL_BINDIR}) ENDIF() IF(ARG_COMPONENT) SET(COMP COMPONENT ${ARG_COMPONENT}) @@ -50,7 +50,7 @@ FUNCTION (MYSQL_ADD_EXECUTABLE) SET(COMP COMPONENT ${MYSQL_INSTALL_COMPONENT}) ELSE() SET(COMP COMPONENT Client) - ENDIF() - MYSQL_INSTALL_TARGETS(${target} DESTINATION ${ARG_DESTINATION} ${COMP}) - ENDIF() + ENDIF() + MYSQL_INSTALL_TARGETS(${target} DESTINATION ${ARG_DESTINATION} ${COMP}) + ENDIF() ENDFUNCTION() -- cgit v1.2.1