Commit 12067633 authored by Sergei Golubchik's avatar Sergei Golubchik

Build 10.1 compat rpm

Repack 10.1.x-shared rpm to 10.2.x-compat.rpm
Also remove old references to ourdelta rpms.
parent 10e1ff83
...@@ -122,15 +122,13 @@ ENDMACRO(SETA) ...@@ -122,15 +122,13 @@ ENDMACRO(SETA)
SETA(CPACK_RPM_client_PACKAGE_OBSOLETES SETA(CPACK_RPM_client_PACKAGE_OBSOLETES
"mysql-client" "mysql-client"
"MySQL-client" "MySQL-client")
"MySQL-OurDelta-client")
SETA(CPACK_RPM_client_PACKAGE_PROVIDES SETA(CPACK_RPM_client_PACKAGE_PROVIDES
"MySQL-client" "MySQL-client"
"mysql-client") "mysql-client")
SETA(CPACK_RPM_devel_PACKAGE_OBSOLETES SETA(CPACK_RPM_devel_PACKAGE_OBSOLETES
"MySQL-devel" "MySQL-devel")
"MySQL-OurDelta-devel")
SETA(CPACK_RPM_devel_PACKAGE_PROVIDES SETA(CPACK_RPM_devel_PACKAGE_PROVIDES
"MySQL-devel") "MySQL-devel")
...@@ -139,8 +137,7 @@ SETA(CPACK_RPM_server_PACKAGE_OBSOLETES ...@@ -139,8 +137,7 @@ SETA(CPACK_RPM_server_PACKAGE_OBSOLETES
"MySQL" "MySQL"
"mysql-server" "mysql-server"
"MySQL-server" "MySQL-server"
"MariaDB-Galera-server" "MariaDB-Galera-server")
"MySQL-OurDelta-server")
SETA(CPACK_RPM_server_PACKAGE_PROVIDES SETA(CPACK_RPM_server_PACKAGE_PROVIDES
"MariaDB" "MariaDB"
"MySQL" "MySQL"
...@@ -148,22 +145,20 @@ SETA(CPACK_RPM_server_PACKAGE_PROVIDES ...@@ -148,22 +145,20 @@ SETA(CPACK_RPM_server_PACKAGE_PROVIDES
"msqlormysql" "msqlormysql"
"mysql-server") "mysql-server")
SETA(CPACK_RPM_shared_PACKAGE_OBSOLETES SETA(CPACK_RPM_compat_PACKAGE_OBSOLETES
"mysql-shared" "mysql-shared"
"MySQL-shared-standard" "MySQL-shared-standard"
"MySQL-shared-pro" "MySQL-shared-pro"
"MySQL-shared-pro-cert" "MySQL-shared-pro-cert"
"MySQL-shared-pro-gpl" "MySQL-shared-pro-gpl"
"MySQL-shared-pro-gpl-cert" "MySQL-shared-pro-gpl-cert"
"MySQL-shared" "MySQL-shared")
"MySQL-OurDelta-shared") SETA(CPACK_RPM_compat_PACKAGE_PROVIDES
SETA(CPACK_RPM_shared_PACKAGE_PROVIDES
"MySQL-shared" "MySQL-shared"
"mysql-shared") "mysql-shared")
SETA(CPACK_RPM_test_PACKAGE_OBSOLETES SETA(CPACK_RPM_test_PACKAGE_OBSOLETES
"MySQL-test" "MySQL-test")
"MySQL-OurDelta-test")
SETA(CPACK_RPM_test_PACKAGE_PROVIDES SETA(CPACK_RPM_test_PACKAGE_PROVIDES
"MySQL-test") "MySQL-test")
...@@ -183,6 +178,8 @@ SET(CPACK_RPM_server_POST_INSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/ ...@@ -183,6 +178,8 @@ SET(CPACK_RPM_server_POST_INSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/
SET(CPACK_RPM_server_POST_UNINSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/server-postun.sh) SET(CPACK_RPM_server_POST_UNINSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/server-postun.sh)
SET(CPACK_RPM_shared_POST_INSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/shared-post.sh) 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_shared_POST_UNINSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/shared-post.sh)
SET(CPACK_RPM_compat_POST_INSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/shared-post.sh)
SET(CPACK_RPM_compat_POST_UNINSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/shared-post.sh)
MACRO(ALTERNATIVE_NAME real alt) MACRO(ALTERNATIVE_NAME real alt)
SET(ver "%{version}-%{release}") SET(ver "%{version}-%{release}")
...@@ -250,18 +247,32 @@ SETA(CPACK_RPM_test_PACKAGE_PROVIDES ...@@ -250,18 +247,32 @@ SETA(CPACK_RPM_test_PACKAGE_PROVIDES
# If we want to build build MariaDB-shared-compat, # If we want to build build MariaDB-shared-compat,
# extract compat libraries from MariaDB-shared-5.3 rpm # extract compat libraries from MariaDB-shared-5.3 rpm
FILE(GLOB compat_rpm RELATIVE ${CMAKE_SOURCE_DIR} FILE(GLOB compat53 RELATIVE ${CMAKE_SOURCE_DIR}
"${CMAKE_SOURCE_DIR}/../MariaDB-shared-5.3.*.rpm") "${CMAKE_SOURCE_DIR}/../MariaDB-shared-5.3.*.rpm")
IF (compat_rpm) FILE(GLOB compat101 RELATIVE ${CMAKE_SOURCE_DIR}
"${CMAKE_SOURCE_DIR}/../MariaDB-shared-10.1.*.rpm")
IF(compat53 AND compat101)
FOREACH(compat_rpm "${compat53}" "${compat101}")
MESSAGE("Using ${compat_rpm} to build MariaDB-compat") MESSAGE("Using ${compat_rpm} to build MariaDB-compat")
INSTALL(CODE "EXECUTE_PROCESS( INSTALL(CODE "EXECUTE_PROCESS(
COMMAND rpm2cpio ${CMAKE_SOURCE_DIR}/${compat_rpm} COMMAND rpm2cpio ${CMAKE_SOURCE_DIR}/${compat_rpm}
COMMAND cpio --extract --make-directories */libmysqlclient*.so.* - COMMAND cpio --extract --make-directories */libmysqlclient*.so* -
WORKING_DIRECTORY \$ENV{DESTDIR}) WORKING_DIRECTORY \$ENV{DESTDIR})
EXECUTE_PROCESS( EXECUTE_PROCESS(
COMMAND chmod -R a+rX . COMMAND chmod -R a+rX .
WORKING_DIRECTORY \$ENV{DESTDIR})" WORKING_DIRECTORY \$ENV{DESTDIR})"
COMPONENT Compat) COMPONENT Compat)
ENDFOREACH()
EXECUTE_PROCESS(
COMMAND rpm -q --provides -p "${CMAKE_SOURCE_DIR}/${compat101}"
COMMAND grep "=.*10\\.1"
ERROR_QUIET
OUTPUT_VARIABLE compat_provides)
STRING(REPLACE "\n" " " compat_provides "${compat_provides}")
SETA(CPACK_RPM_compat_PACKAGE_PROVIDES "${compat_provides}")
SET(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} Compat) SET(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} Compat)
# RHEL6/CentOS6 install Postfix by default, and it requires # RHEL6/CentOS6 install Postfix by default, and it requires
...@@ -272,10 +283,7 @@ IF (compat_rpm) ...@@ -272,10 +283,7 @@ IF (compat_rpm)
IF(RPM MATCHES "(rhel|centos)6") IF(RPM MATCHES "(rhel|centos)6")
SET(CPACK_RPM_common_PACKAGE_REQUIRES "MariaDB-compat") SET(CPACK_RPM_common_PACKAGE_REQUIRES "MariaDB-compat")
ENDIF() ENDIF()
ENDIF(compat_rpm) ENDIF()
SET(CPACK_RPM_compat_PACKAGE_PROVIDES "mysql-libs = 5.3.5") # exact version doesn't matter as long as it greater than 5.1
SET(CPACK_RPM_compat_PACKAGE_OBSOLETES "mysql-libs < 5.3.5")
ENDIF(RPM) ENDIF(RPM)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment