From fea877877cc289836b9700ee7990297b580d917c Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Wed, 24 Feb 2010 20:07:05 +0100 Subject: [PATCH] #51466 : Source packages are broken with cmake in a cmake-agnostic environment In the worst case possible scenario (no bzr, in-source build), make dist produced a package that compiled ok with autotools but failed to package because extra make_binary_distribution was found in source package and was not built. make_binary_distribution contained paths of the build machine. Fix: exclude some scripts that are produced in cmake build. Note that there is no good general fix for it in this specific scenario. it is advisable to build source packages out of source or in bzr repo. --- cmake/Makefile.am | 1 + cmake/cpack_source_ignore_files.cmake | 40 +++++++++++++++++++++++++++ cmake/mysql_version.cmake | 12 +------- 3 files changed, 42 insertions(+), 11 deletions(-) create mode 100644 cmake/cpack_source_ignore_files.cmake diff --git a/cmake/Makefile.am b/cmake/Makefile.am index 334c9fc7a0e..6fe1a9556be 100644 --- a/cmake/Makefile.am +++ b/cmake/Makefile.am @@ -1,5 +1,6 @@ EXTRA_DIST = \ cmake_parse_arguments.cmake \ + cpack_source_ignore_files.cmake \ package_name.cmake \ configurable_file_content.in \ check_minimal_version.cmake \ diff --git a/cmake/cpack_source_ignore_files.cmake b/cmake/cpack_source_ignore_files.cmake new file mode 100644 index 00000000000..5eef20dccc6 --- /dev/null +++ b/cmake/cpack_source_ignore_files.cmake @@ -0,0 +1,40 @@ +SET(CPACK_SOURCE_IGNORE_FILES +\\\\.bzr/ +\\\\.bzr-mysql +\\\\.bzrignore +CMakeCache\\\\.txt +cmake_dist\\\\.cmake +CPackSourceConfig\\\\.cmake +CPackConfig.cmake +/cmake_install\\\\.cmake +/CTestTestfile\\\\.cmake +/CMakeFiles/ +/version_resources/ +/_CPack_Packages/ +$\\\\.gz +$\\\\.zip +/CMakeFiles/ +/version_resources/ +/_CPack_Packages/ +scripts/make_binary_distribution$ +scripts/msql2mysql$ +scripts/mysql_config$ +scripts/mysql_convert_table_format$ +scripts/mysql_find_rows$ +scripts/mysql_fix_extensions$ +scripts/mysql_install_db$ +scripts/mysql_secure_installation$ +scripts/mysql_setpermission$ +scripts/mysql_zap$ +scripts/mysqlaccess$ +scripts/mysqld_multi$ +scripts/mysqld_safe$ +scripts/mysqldumpslow$ +scripts/mysqlhotcopy$ +Makefile$ +include/config\\\\.h$ +include/my_config\\\\.h$ +/autom4te\\\\.cache/ +errmsg\\\\.sys$ +# +) diff --git a/cmake/mysql_version.cmake b/cmake/mysql_version.cmake index d9f6b777536..3a61bcf40ab 100644 --- a/cmake/mysql_version.cmake +++ b/cmake/mysql_version.cmake @@ -108,17 +108,7 @@ IF(NOT CPACK_SOURCE_PACKAGE_FILE_NAME) ENDIF() SET(CPACK_PACKAGE_VENDOR "Sun Microsystems, Inc") SET(CPACK_SOURCE_GENERATOR "TGZ") -SET(CPACK_SOURCE_IGNORE_FILES - \\\\.bzr/ - \\\\.bzr-mysql - .bzrignore - CMakeCache.txt - /CMakeFiles/ - /version_resources/ - /_CPack_Packages/ - $.gz - $.zip -) +INCLUDE(cpack_source_ignore_files) # Defintions for windows version resources SET(PRODUCTNAME "MySQL Server")