Skip to content

Commit fea8778

Browse files
committed
#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.
1 parent 538ba33 commit fea8778

File tree

3 files changed

+42
-11
lines changed

3 files changed

+42
-11
lines changed

cmake/Makefile.am

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
EXTRA_DIST = \
22
cmake_parse_arguments.cmake \
3+
cpack_source_ignore_files.cmake \
34
package_name.cmake \
45
configurable_file_content.in \
56
check_minimal_version.cmake \

cmake/cpack_source_ignore_files.cmake

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
SET(CPACK_SOURCE_IGNORE_FILES
2+
\\\\.bzr/
3+
\\\\.bzr-mysql
4+
\\\\.bzrignore
5+
CMakeCache\\\\.txt
6+
cmake_dist\\\\.cmake
7+
CPackSourceConfig\\\\.cmake
8+
CPackConfig.cmake
9+
/cmake_install\\\\.cmake
10+
/CTestTestfile\\\\.cmake
11+
/CMakeFiles/
12+
/version_resources/
13+
/_CPack_Packages/
14+
$\\\\.gz
15+
$\\\\.zip
16+
/CMakeFiles/
17+
/version_resources/
18+
/_CPack_Packages/
19+
scripts/make_binary_distribution$
20+
scripts/msql2mysql$
21+
scripts/mysql_config$
22+
scripts/mysql_convert_table_format$
23+
scripts/mysql_find_rows$
24+
scripts/mysql_fix_extensions$
25+
scripts/mysql_install_db$
26+
scripts/mysql_secure_installation$
27+
scripts/mysql_setpermission$
28+
scripts/mysql_zap$
29+
scripts/mysqlaccess$
30+
scripts/mysqld_multi$
31+
scripts/mysqld_safe$
32+
scripts/mysqldumpslow$
33+
scripts/mysqlhotcopy$
34+
Makefile$
35+
include/config\\\\.h$
36+
include/my_config\\\\.h$
37+
/autom4te\\\\.cache/
38+
errmsg\\\\.sys$
39+
#
40+
)

cmake/mysql_version.cmake

+1-11
Original file line numberDiff line numberDiff line change
@@ -108,17 +108,7 @@ IF(NOT CPACK_SOURCE_PACKAGE_FILE_NAME)
108108
ENDIF()
109109
SET(CPACK_PACKAGE_VENDOR "Sun Microsystems, Inc")
110110
SET(CPACK_SOURCE_GENERATOR "TGZ")
111-
SET(CPACK_SOURCE_IGNORE_FILES
112-
\\\\.bzr/
113-
\\\\.bzr-mysql
114-
.bzrignore
115-
CMakeCache.txt
116-
/CMakeFiles/
117-
/version_resources/
118-
/_CPack_Packages/
119-
$.gz
120-
$.zip
121-
)
111+
INCLUDE(cpack_source_ignore_files)
122112

123113
# Defintions for windows version resources
124114
SET(PRODUCTNAME "MySQL Server")

0 commit comments

Comments
 (0)