This is an automated email from the ASF dual-hosted git repository.

djwang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudberry.git


The following commit(s) were added to refs/heads/main by this push:
     new e7b45e2e701 Stop installing diskquota build-info file
e7b45e2e701 is described below

commit e7b45e2e7016b170baad4f297d3810c629cd8982
Author: Dianjin Wang <[email protected]>
AuthorDate: Mon Mar 16 16:42:26 2026 +0800

    Stop installing diskquota build-info file
    
    Remove generation and installation of diskquota-build-info from
    diskquota to avoid writing extra files into the install prefix root
    (e.g. $GPHOME or /usr/local/cloudberry-db).
    
    Drop the unused CMake helper cmake/BuildInfo.cmake and remove
    cmake/Git.cmake and its invocation now that no build-info is
    produced.
---
 gpcontrib/diskquota/CMakeLists.txt        | 18 -----------------
 gpcontrib/diskquota/cmake/BuildInfo.cmake | 32 -------------------------------
 gpcontrib/diskquota/cmake/Git.cmake       |  9 ---------
 3 files changed, 59 deletions(-)

diff --git a/gpcontrib/diskquota/CMakeLists.txt 
b/gpcontrib/diskquota/CMakeLists.txt
index fad393cb101..face48578a6 100644
--- a/gpcontrib/diskquota/CMakeLists.txt
+++ b/gpcontrib/diskquota/CMakeLists.txt
@@ -12,10 +12,6 @@ endif()
 # generate 'compile_commands.json'
 set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
 
-# Retrieve repository information
-include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/Git.cmake)
-GitHash_Get(DISKQUOTA_GIT_HASH)
-
 include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/Gpdb.cmake)
 
 
@@ -154,19 +150,6 @@ add_custom_target(create_artifact
   ${CMAKE_COMMAND} -E tar czvf ${artifact_NAME} "${tgz_NAME}.tar.gz")
 # packing end
 
-# Create build-info
-# The diskquota-build-info shouldn't be copied to GPDB release by 
install_gpdb_component
-include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/BuildInfo.cmake)
-set(build_info_PATH ${CMAKE_CURRENT_BINARY_DIR}/diskquota-build-info)
-BuildInfo_Create(${build_info_PATH}
-  VARS
-  DISKQUOTA_GIT_HASH
-  DISKQUOTA_VERSION
-  GP_MAJOR_VERSION
-  GP_VERSION
-  CMAKE_BUILD_TYPE)
-# Create build-info end
-
 # Add installcheck targets
 add_subdirectory(tests)
 add_subdirectory(upgrade_test)
@@ -175,4 +158,3 @@ add_subdirectory(upgrade_test)
 install(PROGRAMS "cmake/install_gpdb_component" DESTINATION ".")
 install(FILES ${diskquota_DDL} DESTINATION "share/postgresql/extension/")
 install(TARGETS diskquota DESTINATION "lib/postgresql/")
-install(FILES ${build_info_PATH} DESTINATION ".")
diff --git a/gpcontrib/diskquota/cmake/BuildInfo.cmake 
b/gpcontrib/diskquota/cmake/BuildInfo.cmake
deleted file mode 100644
index 6e256f34502..00000000000
--- a/gpcontrib/diskquota/cmake/BuildInfo.cmake
+++ /dev/null
@@ -1,32 +0,0 @@
-# Create a build info file based on the given cmake variables
-# For example:
-# BuildInfo_Create(
-# ${CMAKE_CURRENT_BINARY_DIR}/build-info
-# VARS
-# DISKQUOTA_GIT_HASH
-# GP_MAJOR_VERSION)
-# )
-# will create a build info file:
-# ❯ cat build-info
-# DISKQUOTA_GIT_HASH = 151ed92
-# GP_MAJOR_VERSION = 6
-
-function(BuildInfo_Create path)
-  cmake_parse_arguments(
-    arg
-    ""
-    ""
-    "VARS"
-    ${ARGN})
-
-  # Set REGRESS test cases
-  foreach(key IN LISTS arg_VARS)
-    get_property(val VARIABLE PROPERTY ${key})
-    list(APPEND info_list "${key} = ${val}")
-  endforeach()
-  file(WRITE ${path} "")
-  foreach(content IN LISTS info_list)
-    file(APPEND ${path} "${content}\n")
-  endforeach()
-endfunction()
-
diff --git a/gpcontrib/diskquota/cmake/Git.cmake 
b/gpcontrib/diskquota/cmake/Git.cmake
deleted file mode 100644
index 81a68b1f1f4..00000000000
--- a/gpcontrib/diskquota/cmake/Git.cmake
+++ /dev/null
@@ -1,9 +0,0 @@
-# get git hash
-macro(GitHash_Get _git_hash)
-  find_package(Git)
-  execute_process(
-    COMMAND ${GIT_EXECUTABLE} log -1 --pretty=format:%h
-    OUTPUT_VARIABLE ${_git_hash}
-    OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET
-    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
-endmacro()


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to