From 88915a3090d34a02d71b79001addc2fea00016c6 Mon Sep 17 00:00:00 2001 From: Piotr Obrzut Date: Thu, 1 Jun 2017 15:25:04 +0200 Subject: [PATCH 1/3] Bug#26181622 MSI BUILD FAIL DUE TO DUPLICATED FILE ID Fixed generated mysql_server.wxs not to contain duplicates, or too long ids (cherry picked from commit bf47fb74dcc3e84057314817c56e6f8e05af094c) --- packaging/WiX/create_msi.cmake.in | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/packaging/WiX/create_msi.cmake.in b/packaging/WiX/create_msi.cmake.in index 95cbbb3d437..b306c0c70d3 100644 --- a/packaging/WiX/create_msi.cmake.in +++ b/packaging/WiX/create_msi.cmake.in @@ -218,22 +218,37 @@ MACRO(GENERATE_GUID VarName) OUTPUT_STRIP_TRAILING_WHITESPACE) ENDMACRO() -SET(INC_VAR 0) +# Make sure that WIX identifier created from a path matches all the rules: +# - it is shorter than 72 characters +# - doesn't contain reserver characters ('+', '-' and '/') +# ID_SET contains a global list of all identifiers which are too long. +# Every time we use an identifier which is too long we use its index in +# ID_SET to shorten the name. +SET_PROPERTY(GLOBAL PROPERTY ID_SET) MACRO(MAKE_WIX_IDENTIFIER str varname) STRING(REPLACE "/" "." ${varname} "${str}") + STRING(REPLACE "+" "p" ${varname} "${str}") + STRING(REPLACE "-" "m" ${varname} "${str}") STRING(REGEX REPLACE "[^a-zA-Z_0-9.]" "_" ${varname} "${${varname}}") STRING(LENGTH "${${varname}}" len) + # FIXME: the prefix length has to be controlled better # Identifier should be smaller than 72 character - # We have to cut down the length to 70 chars, since we add 2 char prefix + # We have to cut down the length to 40 chars, since we add prefixes # pretty often - IF(len GREATER 70) - STRING(SUBSTRING "${${varname}}" 0 67 shortstr) - MATH(EXPR INC_VAR ${INC_VAR}+1) - SET(${varname} "${shortstr}${INC_VAR}") + IF(len GREATER 40) + STRING(SUBSTRING "${${varname}}" 0 37 shortstr) + GET_PROPERTY(LOCAL_LIST GLOBAL PROPERTY ID_SET) + LIST(FIND LOCAL_LIST "${${varname}}" STRING_ID) + IF(${STRING_ID} EQUAL -1) + LIST(APPEND LOCAL_LIST "${${varname}}") + SET_PROPERTY(GLOBAL PROPERTY ID_SET "${LOCAL_LIST}") + LIST(LENGTH LOCAL_LIST STRING_ID) + MATH(EXPR STRING_ID "${STRING_ID}-1" ) + ENDIF() + SET(${varname} "${shortstr}${STRING_ID}") ENDIF() ENDMACRO() - FUNCTION(TRAVERSE_FILES dir topdir file file_comp dir_root) FILE(RELATIVE_PATH dir_rel ${topdir} ${dir}) IF(dir_rel) From c3e6a032c3acbfc56fb3cc7b38710a24c416ffd0 Mon Sep 17 00:00:00 2001 From: Piotr Obrzut Date: Fri, 2 Jun 2017 19:17:30 +0200 Subject: [PATCH 2/3] Bug#26171638 MYSQL 5.5.57 - MSI COMMUNITY PACKAGES NOT GETTING INSTALLED Temporary revert of the VS2008 redist check. (cherry picked from commit 36ec550fe5fa6b2a997cb39d3b9e33988f525c96) --- packaging/WiX/create_msi.cmake.in | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/packaging/WiX/create_msi.cmake.in b/packaging/WiX/create_msi.cmake.in index b306c0c70d3..ae6a5773dce 100644 --- a/packaging/WiX/create_msi.cmake.in +++ b/packaging/WiX/create_msi.cmake.in @@ -218,37 +218,6 @@ MACRO(GENERATE_GUID VarName) OUTPUT_STRIP_TRAILING_WHITESPACE) ENDMACRO() -# Make sure that WIX identifier created from a path matches all the rules: -# - it is shorter than 72 characters -# - doesn't contain reserver characters ('+', '-' and '/') -# ID_SET contains a global list of all identifiers which are too long. -# Every time we use an identifier which is too long we use its index in -# ID_SET to shorten the name. -SET_PROPERTY(GLOBAL PROPERTY ID_SET) -MACRO(MAKE_WIX_IDENTIFIER str varname) - STRING(REPLACE "/" "." ${varname} "${str}") - STRING(REPLACE "+" "p" ${varname} "${str}") - STRING(REPLACE "-" "m" ${varname} "${str}") - STRING(REGEX REPLACE "[^a-zA-Z_0-9.]" "_" ${varname} "${${varname}}") - STRING(LENGTH "${${varname}}" len) - # FIXME: the prefix length has to be controlled better - # Identifier should be smaller than 72 character - # We have to cut down the length to 40 chars, since we add prefixes - # pretty often - IF(len GREATER 40) - STRING(SUBSTRING "${${varname}}" 0 37 shortstr) - GET_PROPERTY(LOCAL_LIST GLOBAL PROPERTY ID_SET) - LIST(FIND LOCAL_LIST "${${varname}}" STRING_ID) - IF(${STRING_ID} EQUAL -1) - LIST(APPEND LOCAL_LIST "${${varname}}") - SET_PROPERTY(GLOBAL PROPERTY ID_SET "${LOCAL_LIST}") - LIST(LENGTH LOCAL_LIST STRING_ID) - MATH(EXPR STRING_ID "${STRING_ID}-1" ) - ENDIF() - SET(${varname} "${shortstr}${STRING_ID}") - ENDIF() -ENDMACRO() - FUNCTION(TRAVERSE_FILES dir topdir file file_comp dir_root) FILE(RELATIVE_PATH dir_rel ${topdir} ${dir}) IF(dir_rel) From 34cd74e52185de2ea3156e8295de3c638cde8c88 Mon Sep 17 00:00:00 2001 From: Piotr Obrzut Date: Mon, 5 Jun 2017 08:09:07 +0200 Subject: [PATCH 3/3] Bug#26171638 MYSQL 5.5.57 - MSI COMMUNITY PACKAGES NOT GETTING INSTALLED Corrected the revert. (cherry picked from commit f637e524bf9b692c3ed46d856e2beac193b42a3e) --- packaging/WiX/create_msi.cmake.in | 31 +++++++++++++++++++++++++++++++ packaging/WiX/mysql_server.wxs.in | 26 -------------------------- 2 files changed, 31 insertions(+), 26 deletions(-) diff --git a/packaging/WiX/create_msi.cmake.in b/packaging/WiX/create_msi.cmake.in index ae6a5773dce..b306c0c70d3 100644 --- a/packaging/WiX/create_msi.cmake.in +++ b/packaging/WiX/create_msi.cmake.in @@ -218,6 +218,37 @@ MACRO(GENERATE_GUID VarName) OUTPUT_STRIP_TRAILING_WHITESPACE) ENDMACRO() +# Make sure that WIX identifier created from a path matches all the rules: +# - it is shorter than 72 characters +# - doesn't contain reserver characters ('+', '-' and '/') +# ID_SET contains a global list of all identifiers which are too long. +# Every time we use an identifier which is too long we use its index in +# ID_SET to shorten the name. +SET_PROPERTY(GLOBAL PROPERTY ID_SET) +MACRO(MAKE_WIX_IDENTIFIER str varname) + STRING(REPLACE "/" "." ${varname} "${str}") + STRING(REPLACE "+" "p" ${varname} "${str}") + STRING(REPLACE "-" "m" ${varname} "${str}") + STRING(REGEX REPLACE "[^a-zA-Z_0-9.]" "_" ${varname} "${${varname}}") + STRING(LENGTH "${${varname}}" len) + # FIXME: the prefix length has to be controlled better + # Identifier should be smaller than 72 character + # We have to cut down the length to 40 chars, since we add prefixes + # pretty often + IF(len GREATER 40) + STRING(SUBSTRING "${${varname}}" 0 37 shortstr) + GET_PROPERTY(LOCAL_LIST GLOBAL PROPERTY ID_SET) + LIST(FIND LOCAL_LIST "${${varname}}" STRING_ID) + IF(${STRING_ID} EQUAL -1) + LIST(APPEND LOCAL_LIST "${${varname}}") + SET_PROPERTY(GLOBAL PROPERTY ID_SET "${LOCAL_LIST}") + LIST(LENGTH LOCAL_LIST STRING_ID) + MATH(EXPR STRING_ID "${STRING_ID}-1" ) + ENDIF() + SET(${varname} "${shortstr}${STRING_ID}") + ENDIF() +ENDMACRO() + FUNCTION(TRAVERSE_FILES dir topdir file file_comp dir_root) FILE(RELATIVE_PATH dir_rel ${topdir} ${dir}) IF(dir_rel) diff --git a/packaging/WiX/mysql_server.wxs.in b/packaging/WiX/mysql_server.wxs.in index 2092d0ebe3d..3eb81ec532c 100644 --- a/packaging/WiX/mysql_server.wxs.in +++ b/packaging/WiX/mysql_server.wxs.in @@ -61,32 +61,6 @@ - - - - - - - - Installed OR VS08REDISTX64 - - - - - - - Installed OR VS08REDISTX86 - - -