mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
create a new MariaDB-common.rpm that contains files needed both by the client and the server.
use my.cnf includes to split one big my.cnf file in server and client parts. remove "Provides: mysql-libs" (doesn't help on CentOS 6)
This commit is contained in:
@@ -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")
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
13
support-files/rpm/client.cnf
Normal file
13
support-files/rpm/client.cnf
Normal file
@@ -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]
|
||||
|
||||
11
support-files/rpm/my.cnf
Normal file
11
support-files/rpm/my.cnf
Normal file
@@ -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
|
||||
|
||||
23
support-files/rpm/mysql-clients.cnf
Normal file
23
support-files/rpm/mysql-clients.cnf
Normal file
@@ -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]
|
||||
|
||||
25
support-files/rpm/server.cnf
Normal file
25
support-files/rpm/server.cnf
Normal file
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user