diff --git a/ceph/ceph/debian/dl_hook b/ceph/ceph/debian/dl_hook index c4a3a91f5..958a10121 100755 --- a/ceph/ceph/debian/dl_hook +++ b/ceph/ceph/debian/dl_hook @@ -2,10 +2,12 @@ set -x +VERSION="14.2.22" + STX_BASE=$(realpath ${MY_REPO}/stx) PKG_BASE=$(realpath ${STX_BASE}/integ/ceph/ceph) -PKG_SRC_DIR=/ceph +CEPH_GIT_SRC_DIR=${STX_GIT_SRC_DIR}/ceph PKG_BUILD_NAME=$1 PKG_BUILD_DIR=$(realpath `pwd`/${PKG_BUILD_NAME}) @@ -14,6 +16,9 @@ PKG_BUILD_DIR=$(realpath `pwd`/${PKG_BUILD_NAME}) mkdir ${PKG_BUILD_NAME} tar -acvvzf - -C ${STX_GIT_SRC_DIR} ceph | tar -xvvzf - --directory ${PKG_BUILD_DIR} --strip-components 1 +# Set ceph version +(git -C ${CEPH_GIT_SRC_DIR} rev-parse HEAD ; echo "v${VERSION}") 2> /dev/null > ${PKG_BUILD_DIR}/src/.git_version + # Remove upstream's debian folder rm -rf ${PKG_BUILD_DIR}/debian @@ -94,8 +99,8 @@ unpack_submodule "${SOURCE24}" "$(dirname ${SOURCE24})" unpack_submodule "${SOURCE25}" "$(dirname ${SOURCE25})" # Alpine configs -sed -e "s/@VERSION@/14.2.22/g" \ +sed -e "s/@VERSION@/${VERSION}/g" \ -e "s/@RPM_RELEASE@/1.stx.1/g" \ - -e "s/@TARBALL_BASENAME@/ceph-14.2.22/g" \ + -e "s/@TARBALL_BASENAME@/${PKG_BUILD_NAME}/g" \ -i ${PKG_BUILD_DIR}/alpine/APKBUILD.in mv ${PKG_BUILD_DIR}/alpine/APKBUILD.in ${PKG_BUILD_DIR}/alpine/APKBUILD diff --git a/ceph/ceph/debian/patches/0001-Fix-error-related-to-src-.git_version.patch b/ceph/ceph/debian/patches/0001-Fix-error-related-to-src-.git_version.patch deleted file mode 100644 index ef13923be..000000000 --- a/ceph/ceph/debian/patches/0001-Fix-error-related-to-src-.git_version.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 234a62418c56cea749e8b86618ea06cbf5cfc2c9 Mon Sep 17 00:00:00 2001 -From: Leonardo Fagundes Luz Serrano - -Date: Tue, 25 Jan 2022 19:55:28 -0300 -Subject: [PATCH] Fix error related to /src/.git_version - -Error message: -"force parsing /<>/src/.git_version -for CEPH_GIT_VER and CEPH_GIT_NICE_VER -CMake Error at src/CMakeLists.txt:183 (file): -file STRINGS file "/<>/src/.git_version" -cannot be read." - -Signed-off-by: Leonardo Fagundes Luz Serrano ---- - src/CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index be06fe5016..3c26d1d7f7 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -177,7 +177,7 @@ set(GCOV_PREFIX_STRIP 4) - - # the src/.git_version file may be written out by make-dist; otherwise - # we pull the git version from .git --option(ENABLE_GIT_VERSION "build Ceph with git version string" ON) -+option(ENABLE_GIT_VERSION "build Ceph with git version string" OFF) - if(${ENABLE_GIT_VERSION}) - message(STATUS "force parsing ${CMAKE_CURRENT_SOURCE_DIR}/.git_version for CEPH_GIT_VER and CEPH_GIT_NICE_VER") - file(STRINGS ${CMAKE_CURRENT_SOURCE_DIR}/.git_version CEPH_GIT_SHA_AND_TAG) --- -2.17.1 - diff --git a/ceph/ceph/debian/patches/series b/ceph/ceph/debian/patches/series index e4d6aec6f..8b22df529 100644 --- a/ceph/ceph/debian/patches/series +++ b/ceph/ceph/debian/patches/series @@ -20,5 +20,4 @@ cmake_add_1.74_to_known_versions.patch another-cmakelists-fix.patch fix-ceph-osd-systemd-target.patch # allow-bgp-to-host.patch ## Not applicable to stx/14.2.22 version -0001-Fix-error-related-to-src-.git_version.patch 0002-Fix-src-CMakeLists.txts-DESTINATION-error.patch