Fix of mariadb-ownsetup patch. Since we do CMake out-of-source builds, and the SOURCE and BUILD directiories differ, the bug that was present in the patch started to cause a issues.

In the CMake "CONFIGURE_FILE(<input> <output>)" command, the <input> path is treated relative to SOURCE dir, however the <output> patch is relative to BUILD dir.
Since the file has been copied to a wrong location, instead in-place updated as originally intended, the file that was later installed was the original unchanged file.

Resolves: #1873999, #1874446

Fix mariadb-pcdir.patch hunk
This commit is contained in:
Michal Schorm 2020-09-03 13:39:29 +02:00
parent 21e76c8255
commit 04c626f762
3 changed files with 20 additions and 18 deletions

View File

@ -1,17 +1,17 @@
diff -Naup mariadb-10.1.8/support-files/CMakeLists.txt mariadb-10.1.8/support-files/CMakeLists.txt_patched
--- mariadb-10.5.2/support-files/CMakeLists.txt 2020-03-25 11:13:19.000000000 +0100
+++ mariadb-10.5.2/support-files/CMakeLists.txt_patched 2020-04-01 01:29:52.140847301 +0200
@@ -91,6 +91,7 @@ IF(UNIX)
ENDIF()
--- mariadb-10.4.14/support-files/CMakeLists.txt 2020-08-06 17:28:28.000000000 +0200
+++ mariadb-10.4.14/support-files/CMakeLists.txt_patched 2020-09-03 13:21:07.826658279 +0200
@@ -187,6 +187,7 @@ IF(UNIX)
COMPONENT SharedLibraries)
INSTALL(FILES rpm/mysql-clients.cnf DESTINATION ${INSTALL_SYSCONF2DIR}
COMPONENT Client)
+ CONFIGURE_FILE(rpm/server.cnf ${CMAKE_CURRENT_SOURCE_DIR}/rpm/server.cnf @ONLY)
INSTALL(FILES rpm/server.cnf DESTINATION ${INSTALL_SYSCONF2DIR}
COMPONENT IniFiles)
INSTALL(FILES rpm/enable_encryption.preset DESTINATION ${INSTALL_SYSCONF2DIR}
CONFIGURE_FILE(mariadb.pc.in ${CMAKE_CURRENT_BINARY_DIR}/mariadb.pc @ONLY)
+ CONFIGURE_FILE(rpm/server.cnf ${CMAKE_CURRENT_BINARY_DIR}/rpm/server.cnf @ONLY)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/mariadb.pc DESTINATION ${INSTALL_LIBDIR}/pkgconfig COMPONENT Development)
INSTALL(FILES mysql.m4 DESTINATION ${INSTALL_SHAREDIR}/aclocal COMPONENT Development)
diff -up mariadb-10.1.8/support-files/rpm/server.cnf.p9 mariadb-10.1.8/support-files/rpm/server.cnf
--- mariadb-10.1.8/support-files/rpm/server.cnf.p9 2015-10-15 17:44:19.000000000 +0200
+++ mariadb-10.1.8/support-files/rpm/server.cnf 2015-11-03 11:38:25.228070808 +0100
diff -up mariadb-10.0.15/support-files/rpm/server.cnf.ownsetup mariadb-10.0.15/support-files/rpm/server.cnf
--- mariadb-10.0.15/support-files/rpm/server.cnf.ownsetup 2015-01-24 23:55:55.110063592 +0100
+++ mariadb-10.0.15/support-files/rpm/server.cnf 2015-01-24 23:57:42.308114387 +0100
@@ -9,7 +9,16 @@
[server]

View File

@ -3,12 +3,12 @@ Use PCDIR CMake option, if configured
Upstream install the server pkgconfig file into arch-independent directory
Reported to upstream as: https://jira.mariadb.org/browse/MDEV-14340
--- mariadb-10.5.2/support-files/CMakeLists.txt 2020-04-01 01:31:21.426832942 +0200
+++ mariadb-10.5.2/support-files/CMakeLists.txt_patched 2020-04-01 01:35:05.808309914 +0200
@@ -92,7 +92,11 @@ IF(UNIX)
--- mariadb-10.5.5/support-files/CMakeLists.txt.old 2020-09-30 10:36:08.582490318 +0200
+++ mariadb-10.5.5/support-files/CMakeLists.txt 2020-09-30 10:38:58.079710848 +0200
@@ -91,7 +91,11 @@
ENDIF()
CONFIGURE_FILE(mariadb.pc.in ${CMAKE_CURRENT_BINARY_DIR}/mariadb.pc @ONLY)
CONFIGURE_FILE(rpm/server.cnf ${CMAKE_CURRENT_BINARY_DIR}/rpm/server.cnf @ONLY)
+IF(INSTALL_PCDIR)
+ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/mariadb.pc DESTINATION ${INSTALL_PCDIR} COMPONENT Development)
+ELSE()

View File

@ -1603,6 +1603,8 @@ fi
%changelog
* Mon Sep 21 2020 Lukas Javorsky <ljavorsk@redhat.com> - 10.5.5-1
- Rebase to 10.5.5
- Fix mariadb-ownsetup
- Add manual for aria_s3_copy
* Wed Sep 16 2020 Lukas Javorsky <ljavorsk@redhat.com> - 10.5.4-1
- Rebase to 10.5.4