From e841ecd40a0ab94f82a46fb7f9c295d3fe7c5c88 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fabian=20Gr=C3=BCnbichler?= Date: Thu, 1 Jun 2017 11:24:17 +0200 Subject: [PATCH] use correct git version --- Makefile | 1 + .../0002-cmake-disable-version-from-git.patch | 39 +++++++++++++++++++ ...-detect-init-support-Debian-Stretch.patch} | 4 +- ...4-enable-systemd-targets-by-default.patch} | 4 +- patches/series | 4 +- 5 files changed, 45 insertions(+), 7 deletions(-) create mode 100644 patches/0002-cmake-disable-version-from-git.patch rename patches/{0002-ceph-detect-init-support-Debian-Stretch.patch => 0003-ceph-detect-init-support-Debian-Stretch.patch} (88%) rename patches/{0003-enable-systemd-targets-by-default.patch => 0004-enable-systemd-targets-by-default.patch} (87%) diff --git a/Makefile b/Makefile index d6c040267..b9b7065d4 100644 --- a/Makefile +++ b/Makefile @@ -79,6 +79,7 @@ ${DEBS} ${DBG_DEBS}: patches cd ${BUILDSRC}; rm -rf .pc ./patches echo "git clone git://git.proxmox.com/git/ceph.git\\ngit checkout ${GITVERSION}" > ${BUILDSRC}/debian/SOURCE echo "debian/SOURCE" >> ${BUILDSRC}/debian/docs + echo "${GITVERSION}\\nv${VER}" > ${BUILDSRC}/src/.git_version cd ${BUILDSRC}; dpkg-buildpackage -b -uc -us @echo ${DEBS} diff --git a/patches/0002-cmake-disable-version-from-git.patch b/patches/0002-cmake-disable-version-from-git.patch new file mode 100644 index 000000000..5e50feda8 --- /dev/null +++ b/patches/0002-cmake-disable-version-from-git.patch @@ -0,0 +1,39 @@ +From cd591c10ab6f746d6dde0da3842efb4877581428 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= +Date: Wed, 31 May 2017 14:33:09 +0200 +Subject: [PATCH 2/6] cmake: disable version from git +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +as this recurses up the directory tree and gets wrong +information from the parent repository. + +Signed-off-by: Fabian Grünbichler +--- + src/CMakeLists.txt | 5 ----- + 1 file changed, 5 deletions(-) + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index c68c5fe..26c9a69 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -202,15 +202,10 @@ set(GCOV_PREFIX_STRIP 4) + + option(ENABLE_GIT_VERSION "build Ceph with git version string" ON) + if(${ENABLE_GIT_VERSION}) +- get_git_head_revision(GIT_REFSPEC CEPH_GIT_VER) +- git_describe(CEPH_GIT_NICE_VER --always) +- #if building from a source tarball via make-dist +- if(${CEPH_GIT_VER} STREQUAL "GITDIR-NOTFOUND") + message(STATUS "Ceph/.git directory not found, 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) + list(GET CEPH_GIT_SHA_AND_TAG 0 CEPH_GIT_VER) + list(GET CEPH_GIT_SHA_AND_TAG 1 CEPH_GIT_NICE_VER) +- endif(${CEPH_GIT_VER} STREQUAL "GITDIR-NOTFOUND") + # remove 'v' prefix from raw git version + string(SUBSTRING ${CEPH_GIT_NICE_VER} 1 -1 CEPH_GIT_NICE_VER) + else(${ENABLE_GIT_VERSION}) +-- +2.1.4 + diff --git a/patches/0002-ceph-detect-init-support-Debian-Stretch.patch b/patches/0003-ceph-detect-init-support-Debian-Stretch.patch similarity index 88% rename from patches/0002-ceph-detect-init-support-Debian-Stretch.patch rename to patches/0003-ceph-detect-init-support-Debian-Stretch.patch index 2454cb2b9..8018b3344 100644 --- a/patches/0002-ceph-detect-init-support-Debian-Stretch.patch +++ b/patches/0003-ceph-detect-init-support-Debian-Stretch.patch @@ -1,7 +1,7 @@ -From 73818f98fd6c2c7d3719bf59ecad9979c0d6b009 Mon Sep 17 00:00:00 2001 +From 3b9799d44ec7d67284e2446563c85bf5411add81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= Date: Tue, 21 Mar 2017 07:47:08 +0100 -Subject: [PATCH 2/5] ceph-detect-init: support Debian Stretch +Subject: [PATCH 3/6] ceph-detect-init: support Debian Stretch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit diff --git a/patches/0003-enable-systemd-targets-by-default.patch b/patches/0004-enable-systemd-targets-by-default.patch similarity index 87% rename from patches/0003-enable-systemd-targets-by-default.patch rename to patches/0004-enable-systemd-targets-by-default.patch index 8ffb4e0a0..fb1c973da 100644 --- a/patches/0003-enable-systemd-targets-by-default.patch +++ b/patches/0004-enable-systemd-targets-by-default.patch @@ -1,7 +1,7 @@ -From b30a92874ff7829cfec9f52ee4b907811122f82c Mon Sep 17 00:00:00 2001 +From 49241b48abf146098b335071671aab7dc41358a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= Date: Wed, 22 Mar 2017 09:00:34 +0100 -Subject: [PATCH 3/5] enable systemd targets by default +Subject: [PATCH 4/6] enable systemd targets by default MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit diff --git a/patches/series b/patches/series index b60fe599d..e52972679 100644 --- a/patches/series +++ b/patches/series @@ -1,6 +1,4 @@ 0001-update-changelog.patch -0002-build-with-system-boost.patch +0002-cmake-disable-version-from-git.patch 0003-ceph-detect-init-support-Debian-Stretch.patch 0004-enable-systemd-targets-by-default.patch -0005-Revert-debian-drop-boost-build-dependencies.patch -0006-mon-OSDMonitor-tolerate-upgrade-from-post-kraken-dev.patch -- 2.39.2