#At file:///MySQL/REPO/V55/itch-5.5/ based on revid:joerg@stripped
3099 Joerg Bruehe 2011-01-24 [merge]
Merge next attempt of bug 42969 into "itch".
modified:
CMakeLists.txt
cmake/make_dist.cmake.in
cmake/version_files.cmake.in
support-files/mysql.spec.sh
=== modified file 'CMakeLists.txt'
--- a/CMakeLists.txt 2011-01-21 20:40:21 +0000
+++ b/CMakeLists.txt 2011-01-24 12:34:07 +0000
@@ -320,13 +320,13 @@ CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/sql/s
CONFIGURE_FILE(
${CMAKE_SOURCE_DIR}/cmake/version_files.cmake.in ${CMAKE_BINARY_DIR}/version_files.cmake @ONLY)
-# Handle the "VERSION_*" files.
+# Handle the "INFO_*" files.
INCLUDE(${CMAKE_BINARY_DIR}/version_files.cmake)
# Source: This can be done during the cmake phase, all information is
# available.
-CREATE_VERSION_SRC(${CMAKE_BINARY_DIR})
+CREATE_INFO_SRC(${CMAKE_BINARY_DIR})
# Build flags: This must be postponed to the make phase.
-ADD_CUSTOM_TARGET(VERSION_BIN ALL
+ADD_CUSTOM_TARGET(INFO_BIN ALL
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_BINARY_DIR}/version_files.cmake
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
)
@@ -344,7 +344,7 @@ ADD_SUBDIRECTORY(packaging/WiX)
SET(CPACK_MONOLITHIC_INSTALL 1 CACHE INTERNAL "")
INCLUDE(CPack)
-INSTALL(FILES VERSION_src VERSION_bin DESTINATION . )
+INSTALL(FILES INFO_SRC INFO_BIN DESTINATION ${INSTALL_INFODIR})
IF(UNIX)
INSTALL(FILES Docs/mysql.info DESTINATION ${INSTALL_INFODIR} OPTIONAL COMPONENT Info)
ENDIF()
=== modified file 'cmake/make_dist.cmake.in'
--- a/cmake/make_dist.cmake.in 2011-01-21 20:40:21 +0000
+++ b/cmake/make_dist.cmake.in 2011-01-24 12:34:07 +0000
@@ -106,10 +106,10 @@ IF(MYSQL_DOCS_LOCATION)
EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E copy_directory "${MYSQL_DOCS_LOCATION}" "${PACKAGE_DIR}")
ENDIF()
-# Ensure there is a "VERSION_src" file.
+# Ensure there is a "INFO_SRC" file.
INCLUDE(${CMAKE_BINARY_DIR}/version_files.cmake)
-IF(NOT EXISTS ${PACKAGE_DIR}/VERSION_src)
- CREATE_VERSION_SRC(${PACKAGE_DIR})
+IF(NOT EXISTS ${PACKAGE_DIR}/INFO_SRC)
+ CREATE_INFO_SRC(${PACKAGE_DIR})
ENDIF()
# In case we used CPack, it could have copied some
=== modified file 'cmake/version_files.cmake.in'
--- a/cmake/version_files.cmake.in 2011-01-21 20:40:21 +0000
+++ b/cmake/version_files.cmake.in 2011-01-24 12:34:07 +0000
@@ -14,7 +14,7 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-# Handle/create the "VERSION_*" files describing a MySQL (server) binary.
+# Handle/create the "INFO_*" files describing a MySQL (server) binary.
# This is part of the fix for bug#42969.
SET(VERSION "@VERSION@")
@@ -26,37 +26,37 @@ SET(PACKAGE_DIR ${CMAKE_BINARY_DIR}/${C
# This may be used during "make dist".
-# So this is the moment to start a "VERSION_src" file with information about the source (only).
+# So this is the moment to start a "INFO_SRC" file with information about the source (only).
# We use the "VERSION" contents and try to add "bzr version-info".
#
# It will also be used during build, if that is done without a preceding "make dist"
# (typically, by developers directly in their tree).
-MACRO(CREATE_VERSION_SRC target_dir)
+MACRO(CREATE_INFO_SRC target_dir)
IF(EXISTS ${CMAKE_SOURCE_DIR}/.bzr)
# We have a working "bzr" and sources are in a BZR repository: Always update.
EXECUTE_PROCESS(
COMMAND ${BZR_EXECUTABLE} version-info ${CMAKE_SOURCE_DIR}
WORKING_DIRECTORY ${target_dir}
- OUTPUT_FILE "VERSION_src"
+ OUTPUT_FILE "INFO_SRC"
RESULT_VARIABLE RESULT
)
# For better readability ...
- FILE(APPEND "${target_dir}/VERSION_src" "\nMySQL source ${VERSION}\n")
- ELSEIF(NOT EXISTS ${target_dir}/VERSION_src)
+ FILE(APPEND "${target_dir}/INFO_SRC" "\nMySQL source ${VERSION}\n")
+ ELSEIF(NOT EXISTS ${target_dir}/INFO_SRC)
# The following is a fall-back if there should be no BZR available.
- FILE(WRITE "${target_dir}/VERSION_src" "\nMySQL source ${VERSION}\n")
+ FILE(WRITE "${target_dir}/INFO_SRC" "\nMySQL source ${VERSION}\n")
ENDIF()
-ENDMACRO(CREATE_VERSION_SRC)
+ENDMACRO(CREATE_INFO_SRC)
# This is for the "real" build, must be run again with each cmake run
# to make sure we report the current flags (not those of some previous run).
-MACRO(CREATE_VERSION_BIN)
- SET(VERSION_BIN "VERSION_bin")
+MACRO(CREATE_INFO_BIN)
+ SET(INFO_BIN "INFO_BIN")
- FILE(WRITE ${VERSION_BIN} "===== Information about the build process: =====\n")
+ FILE(WRITE ${INFO_BIN} "===== Information about the build process: =====\n")
IF (WIN32)
EXECUTE_PROCESS(COMMAND "date" "/T" OUTPUT_VARIABLE TMP_DATE)
ELSEIF(UNIX)
@@ -65,19 +65,19 @@ MACRO(CREATE_VERSION_BIN)
SET(TMP_DATE "No date command known")
ENDIF()
SITE_NAME(HOSTNAME)
- FILE(APPEND ${VERSION_BIN} "Build was run at: ${TMP_DATE} on host '${HOSTNAME}'\n\n")
+ FILE(APPEND ${INFO_BIN} "Build was run at: ${TMP_DATE} on host '${HOSTNAME}'\n\n")
# According to the cmake docs, this variable should always be set.
# However, it is empty in my local tests, cmake 2.6.0 on Linux (Debian stable, Jan 2011).
# Include this code, so we will profit if a build environment does provide that info.
IF(${CMAKE_HOST_SYSTEM})
IF(${CMAKE_CROSSCOMPILING})
- FILE(APPEND ${VERSION_BIN} "Build was done for ${CMAKE_SYSTEM} using ${CMAKE_SYSTEM_PROCESSOR}\n")
+ FILE(APPEND ${INFO_BIN} "Build was done for ${CMAKE_SYSTEM} using ${CMAKE_SYSTEM_PROCESSOR}\n")
ENDIF()
- FILE(APPEND ${VERSION_BIN} "Build was done on ${CMAKE_HOST_SYSTEM} using ${CMAKE_HOST_SYSTEM_PROCESSOR}\n\n")
+ FILE(APPEND ${INFO_BIN} "Build was done on ${CMAKE_HOST_SYSTEM} using ${CMAKE_HOST_SYSTEM_PROCESSOR}\n\n")
ENDIF()
- FILE(APPEND ${VERSION_BIN} "===== Compiler flags used (from the 'sql/' subdirectory): =====\n")
+ FILE(APPEND ${INFO_BIN} "===== Compiler flags used (from the 'sql/' subdirectory): =====\n")
IF(EXISTS sql/CMakeFiles/sql.dir/flags.make)
# current dir == ${CMAKE_BINARY_DIR}, see the call in top "CMakeLists.txt"
FILE(STRINGS sql/CMakeFiles/sql.dir/flags.make COMPILE_FLAGS REGEX "^# compile|^C_|^CXX_")
@@ -86,12 +86,12 @@ MACRO(CREATE_VERSION_BIN)
STRING(REPLACE "CXX_" "\nCXX_" COMPILE_FLAGS_LINES ${COMPILE_FLAGS_2})
# The below line did not work in tests using cmake 2.6.0, the matter should be checked again with newer versions.
# STRING(REGEX REPLACE "(^# compile|^C_|^CXX_)" "\n\\1" COMPILE_FLAGS_LINES ${COMPILE_FLAGS})
- FILE(APPEND ${VERSION_BIN} ${COMPILE_FLAGS_LINES} "\n\n")
+ FILE(APPEND ${INFO_BIN} ${COMPILE_FLAGS_LINES} "\n\n")
ELSE()
- FILE(APPEND ${VERSION_BIN} "File 'sql/CMakeFiles/sql.dir/flags.make' is not yet found.\n\n")
+ FILE(APPEND ${INFO_BIN} "File 'sql/CMakeFiles/sql.dir/flags.make' is not yet found.\n\n")
ENDIF()
- FILE(APPEND ${VERSION_BIN} "===== Feature flags used: =====\n")
+ FILE(APPEND ${INFO_BIN} "===== Feature flags used: =====\n")
IF(EXISTS ${CMAKE_BINARY_DIR}/CMakeCache.txt)
# The intention is to do the equivalent of "grep '^WITH' CMakeCache.txt".
# Note that "FILE(STRINGS ...)" will simply ignore carriage return (CR) characters,
@@ -99,13 +99,13 @@ MACRO(CREATE_VERSION_BIN)
# To get readable output, "STRING(REPLACE ...)" is used, making it multi-line again.
FILE(STRINGS ${CMAKE_BINARY_DIR}/CMakeCache.txt FEATURE_FLAGS REGEX "^WITH")
STRING(REPLACE "WITH" "\nWITH" FEATURE_FLAGS_LINES ${FEATURE_FLAGS})
- FILE(APPEND ${VERSION_BIN} ${FEATURE_FLAGS_LINES} "\n\n")
+ FILE(APPEND ${INFO_BIN} ${FEATURE_FLAGS_LINES} "\n\n")
ELSE()
- FILE(APPEND ${VERSION_BIN} "File 'CMakeCache.txt' is not yet found.\n\n")
+ FILE(APPEND ${INFO_BIN} "File 'CMakeCache.txt' is not yet found.\n\n")
ENDIF()
- FILE(APPEND ${VERSION_BIN} "===== EOF =====\n")
+ FILE(APPEND ${INFO_BIN} "===== EOF =====\n")
-ENDMACRO(CREATE_VERSION_BIN)
+ENDMACRO(CREATE_INFO_BIN)
-CREATE_VERSION_BIN()
+CREATE_INFO_BIN()
=== modified file 'support-files/mysql.spec.sh'
--- a/support-files/mysql.spec.sh 2011-01-21 20:40:21 +0000
+++ b/support-files/mysql.spec.sh 2011-01-24 12:34:07 +0000
@@ -506,6 +506,10 @@ touch $RBR%{_sysconfdir}/my.cnf
install -m 600 $MBD/%{src_dir}/support-files/RHEL4-SElinux/mysql.{fc,te} \
$RBR%{_datadir}/mysql/SELinux/RHEL4
+# Install INFO_* (info about source and binaries) files in datadir
+install -m 644 $MBD/%{src_dir}/INFO_SRC $RBR%{_datadir}/mysql
+install -m 644 $MBD/release/INFO_BIN $RBR%{_datadir}/mysql
+
%if %{WITH_TCMALLOC}
# Even though this is a shared library, put it under /usr/lib*/mysql, so it
# doesn't conflict with possible shared lib by the same name in /usr/lib*. See
@@ -907,8 +911,6 @@ echo "====="
%if %{defined license_files_server}
%doc %{license_files_server}
%endif
-%doc %{src_dir}/VERSION_src
-%doc release/VERSION_bin
%doc %{src_dir}/Docs/ChangeLog
%doc release/support-files/my-*.cnf
@@ -1087,9 +1089,10 @@ echo "====="
# merging BK trees)
##############################################################################
%changelog
-* Fri Jan 21 2011 Joerg Bruehe <joerg.bruehe@stripped>
+* Mon Jan 24 2011 Joerg Bruehe <joerg.bruehe@stripped>
-- Add the new "manifest" files: "VERSION_src" and "VERSION_bin".
+- Install the new "manifest" files: "INFO_SRC" and "INFO_BIN"
+ in the data directory, "/usr/share/mysql/".
* Tue Nov 23 2010 Jonathan Perkin <jonathan.perkin@stripped>
No bundle (reason: revision is a merge (you can force generation of a bundle with env var BZR_FORCE_BUNDLE=1)).
| Thread |
|---|
| • bzr commit into mysql-5.5-bugteam branch (joerg:3099) | Joerg Bruehe | 24 Jan |