diff options
-rw-r--r-- | cmake/cpack_rpm.cmake | 28 | ||||
-rw-r--r-- | sql/share/CMakeLists.txt | 4 | ||||
-rw-r--r-- | support-files/CMakeLists.txt | 10 | ||||
-rw-r--r-- | support-files/rpm/client.cnf | 13 | ||||
-rw-r--r-- | support-files/rpm/my.cnf | 11 | ||||
-rw-r--r-- | support-files/rpm/mysql-clients.cnf | 23 | ||||
-rw-r--r-- | support-files/rpm/server-postin.sh (renamed from support-files/rpm-postin.sh) | 0 | ||||
-rw-r--r-- | support-files/rpm/server-prein.sh (renamed from support-files/rpm-prein.sh) | 0 | ||||
-rw-r--r-- | support-files/rpm/server-preun.sh (renamed from support-files/rpm-preun.sh) | 0 | ||||
-rw-r--r-- | support-files/rpm/server.cnf | 25 | ||||
-rw-r--r-- | support-files/rpm/shared-post.sh (renamed from support-files/rpm-ldconfig.sh) | 0 |
11 files changed, 103 insertions, 11 deletions
diff --git a/cmake/cpack_rpm.cmake b/cmake/cpack_rpm.cmake index e8d3bacb82f..e30a93625f5 100644 --- a/cmake/cpack_rpm.cmake +++ b/cmake/cpack_rpm.cmake @@ -20,10 +20,11 @@ SET(CPACK_COMPONENT_CLIENT_GROUP "client") SET(CPACK_COMPONENT_MANPAGESCLIENT_GROUP "client") SET(CPACK_COMPONENT_README_GROUP "server") SET(CPACK_COMPONENT_SHAREDLIBRARIES_GROUP "shared") +SET(CPACK_COMPONENT_COMMON_GROUP "common") SET(CPACK_COMPONENTS_ALL Server ManPagesServer IniFiles Server_Scripts SupportFiles Development ManPagesDevelopment - Test ManPagesTest Readme ManPagesClient - Client SharedLibraries) + ManPagesTest Readme ManPagesClient Test + Common Client SharedLibraries) SET(CPACK_RPM_PACKAGE_NAME "MariaDB") SET(CPACK_PACKAGE_FILE_NAME "${CPACK_RPM_PACKAGE_NAME}-${VERSION}-${RPM}-${CMAKE_SYSTEM_PROCESSOR}") @@ -59,24 +60,33 @@ SET(CPACK_RPM_SPEC_MORE_DEFINE " SET(CPACK_RPM_SPEC_MORE_DEFINE "${CPACK_RPM_SPEC_MORE_DEFINE} %define ignore \# ") -set(CPACK_RPM_server_USER_FILELIST "%ignore /etc" "%ignore /etc/init.d") + +SET(CPACK_RPM_PACKAGE_REQUIRES "MariaDB-common") + +SET(CPACK_RPM_server_USER_FILELIST "%ignore /etc" "%ignore /etc/init.d") SET(CPACK_RPM_client_PACKAGE_OBSOLETES "mysql-client MariaDB-client MySQL-client MySQL-OurDelta-client") SET(CPACK_RPM_client_PACKAGE_PROVIDES "MariaDB-client MySQL-client mysql-client") +# this is a workaround for CPackRPM.cmake (as of 2.8.8) bug. +# If a package group does not specify OBSOLETES/REQUIRES the values of the +# previous (alphabetically) group will apply. +SET(CPACK_RPM_common_PACKAGE_OBSOLETES "MySQL-common") +SET(CPACK_RPM_common_PACKAGE_PROVIDES "MariaDB-common") + SET(CPACK_RPM_devel_PACKAGE_OBSOLETES "mysql-devel MariaDB-devel MySQL-devel MySQL-OurDelta-devel") SET(CPACK_RPM_devel_PACKAGE_PROVIDES "MariaDB-devel MySQL-devel mysql-devel") SET(CPACK_RPM_server_PACKAGE_OBSOLETES "MariaDB mysql mysql-server MariaDB-server MySQL-server MySQL-OurDelta-server") SET(CPACK_RPM_server_PACKAGE_PROVIDES "MariaDB MariaDB-server MySQL-server config(MariaDB-server) msqlormysql mysql mysql-server") -SET(CPACK_RPM_server_PRE_INSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm-prein.sh) -SET(CPACK_RPM_server_PRE_UNINSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm-preun.sh) -SET(CPACK_RPM_server_POST_INSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm-postin.sh) +SET(CPACK_RPM_server_PRE_INSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/server-prein.sh) +SET(CPACK_RPM_server_PRE_UNINSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/server-preun.sh) +SET(CPACK_RPM_server_POST_INSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/server-postin.sh) SET(CPACK_RPM_shared_PACKAGE_OBSOLETES "mysql-shared MySQL-shared-standard MySQL-shared-pro MySQL-shared-pro-cert MySQL-shared-pro-gpl MySQL-shared-pro-gpl-cert MariaDB-shared MySQL-shared MySQL-OurDelta-shared") -SET(CPACK_RPM_shared_PACKAGE_PROVIDES "MariaDB-shared MySQL-shared mysql-shared mysql-libs libmysqlclient.so.${SHARED_LIB_MAJOR_VERSION} libmysqlclient.so.${SHARED_LIB_MAJOR_VERSION}(libmysqlclient_${SHARED_LIB_MAJOR_VERSION}) libmysqlclient_r.so.${SHARED_LIB_MAJOR_VERSION} libmysqlclient_r.so.${SHARED_LIB_MAJOR_VERSION}(libmysqlclient_${SHARED_LIB_MAJOR_VERSION})") -SET(CPACK_RPM_shared_POST_INSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm-ldconfig.sh) -SET(CPACK_RPM_shared_POST_UNINSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm-ldconfig.sh) +SET(CPACK_RPM_shared_PACKAGE_PROVIDES "MariaDB-shared MySQL-shared mysql-shared libmysqlclient.so.${SHARED_LIB_MAJOR_VERSION} libmysqlclient.so.${SHARED_LIB_MAJOR_VERSION}(libmysqlclient_${SHARED_LIB_MAJOR_VERSION}) libmysqlclient_r.so.${SHARED_LIB_MAJOR_VERSION} libmysqlclient_r.so.${SHARED_LIB_MAJOR_VERSION}(libmysqlclient_${SHARED_LIB_MAJOR_VERSION})") +SET(CPACK_RPM_shared_POST_INSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/shared-post.sh) +SET(CPACK_RPM_shared_POST_UNINSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/shared-post.sh) SET(CPACK_RPM_test_PACKAGE_OBSOLETES "mysql-test MariaDB-test MySQL-test MySQL-OurDelta-test") SET(CPACK_RPM_test_PACKAGE_PROVIDES "MariaDB-test MySQL-test mysql-test") diff --git a/sql/share/CMakeLists.txt b/sql/share/CMakeLists.txt index e0521bdd328..e0d5fb6c1a7 100644 --- a/sql/share/CMakeLists.txt +++ b/sql/share/CMakeLists.txt @@ -48,8 +48,8 @@ FOREACH (dir ${dirs}) INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${dir} DESTINATION ${INSTALL_MYSQLSHAREDIR} COMPONENT Server) ENDFOREACH() -INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/charsets DESTINATION ${INSTALL_MYSQLSHAREDIR} COMPONENT Server - PATTERN "languages.html" EXCLUDE +INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/charsets DESTINATION ${INSTALL_MYSQLSHAREDIR} + COMPONENT Common PATTERN "languages.html" EXCLUDE ) INSTALL(FILES ${files} DESTINATION ${INSTALL_MYSQLSHAREDIR} COMPONENT Server) diff --git a/support-files/CMakeLists.txt b/support-files/CMakeLists.txt index 177980414ca..fde4746df16 100644 --- a/support-files/CMakeLists.txt +++ b/support-files/CMakeLists.txt @@ -102,6 +102,16 @@ IF(UNIX) RENAME mysql COMPONENT SupportFiles PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) + + INSTALL(FILES rpm/my.cnf DESTINATION ${INSTALL_SYSCONFDIR} + COMPONENT Common) + INSTALL(FILES rpm/client.cnf DESTINATION ${INSTALL_SYSCONFDIR}/my.cnf.d + COMPONENT SharedLibraries) + INSTALL(FILES rpm/mysql-clients.cnf DESTINATION ${INSTALL_SYSCONFDIR}/my.cnf.d + COMPONENT Client) + INSTALL(FILES rpm/server.cnf DESTINATION ${INSTALL_SYSCONFDIR}/my.cnf.d + COMPONENT IniFiles) + # This is for SuSE: INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E create_symlink ${INSTALL_SYSCONFDIR}/init.d/mysql diff --git a/support-files/rpm/client.cnf b/support-files/rpm/client.cnf new file mode 100644 index 00000000000..9028505a98a --- /dev/null +++ b/support-files/rpm/client.cnf @@ -0,0 +1,13 @@ +# +# These two groups are read by the client library +# Use it for options that affect all clients, but not the server +# + + +[client] + +# This group is not read by mysql client library, +# If you use the same .cnf file for MySQL and MariaDB, +# use it for MariaDB-only client options +[client-mariadb] + diff --git a/support-files/rpm/my.cnf b/support-files/rpm/my.cnf new file mode 100644 index 00000000000..913b88f8328 --- /dev/null +++ b/support-files/rpm/my.cnf @@ -0,0 +1,11 @@ +# +# This group is read both both by the client and the server +# use it for options that affect everything +# +[client-server] + +# +# include all files from the config directory +# +!includedir /etc/my.cnf.d + diff --git a/support-files/rpm/mysql-clients.cnf b/support-files/rpm/mysql-clients.cnf new file mode 100644 index 00000000000..3df9b7b955f --- /dev/null +++ b/support-files/rpm/mysql-clients.cnf @@ -0,0 +1,23 @@ +# +# These groups are read by MariaDB command-line tools +# Use it for options that affect only one utility +# + +[mysql] + +[mysql_upgrade] + +[mysqladmin] + +[mysqlbinlog] + +[mysqlcheck] + +[mysqldump] + +[mysqlimport] + +[mysqlshow] + +[mysqlslap] + diff --git a/support-files/rpm-postin.sh b/support-files/rpm/server-postin.sh index 49a8253ceef..49a8253ceef 100644 --- a/support-files/rpm-postin.sh +++ b/support-files/rpm/server-postin.sh diff --git a/support-files/rpm-prein.sh b/support-files/rpm/server-prein.sh index 0a8ac0c5f97..0a8ac0c5f97 100644 --- a/support-files/rpm-prein.sh +++ b/support-files/rpm/server-prein.sh diff --git a/support-files/rpm-preun.sh b/support-files/rpm/server-preun.sh index 182be27f1ec..182be27f1ec 100644 --- a/support-files/rpm-preun.sh +++ b/support-files/rpm/server-preun.sh diff --git a/support-files/rpm/server.cnf b/support-files/rpm/server.cnf new file mode 100644 index 00000000000..8cf2c74dbe4 --- /dev/null +++ b/support-files/rpm/server.cnf @@ -0,0 +1,25 @@ +# +# These groups are read by MariaDB server +# Use it for options that only the server (but not clients) should see +# +# See the examples of server my.cnf files in /usr/share/mysql/ +# + +[mysqld] + +[server] + +[embedded] + +# This group is only read by MariaDB-5.5 servers. +# If you use the same .cnf file for MariaDB of different versions, +# use this group for options that older servers don't understand +[mysqld-5.5] + +# These two groups are only read by MariaDB servers, not by MySQL. +# If you use the same .cnf file for MySQL and MariaDB, +# you can put MariaDB-only options here +[mariadb] + +[mariadb-5.5] + diff --git a/support-files/rpm-ldconfig.sh b/support-files/rpm/shared-post.sh index 8b0c822426a..8b0c822426a 100644 --- a/support-files/rpm-ldconfig.sh +++ b/support-files/rpm/shared-post.sh |