]> git.proxmox.com Git - ceph.git/blobdiff - Makefile
update sources to 12.2.7
[ceph.git] / Makefile
index 5a162c9f1e913865b2c830a75994c904332e414b..9bc9fbe4684c7bf2a3d6cb6d8470e7740e4a5e14 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,30 +1,14 @@
-RELEASE=5.0
+RELEASE=5.2
 
 PACKAGE=ceph
-VER=12.0.1
+VER=12.2.7
 DEBREL=pve1
 
-SRC=ceph.tar.gz
 SRCDIR=ceph
-
-# everything except boost
-SUBMODULES=ceph-erasure-code-corpus \
- ceph-object-corpus \
- src/Beast \
- src/civetweb \
- src/dpdk \
- src/erasure-code/jerasure/gf-complete \
- src/erasure-code/jerasure/jerasure \
- src/googletest \
- src/isa-l \
- src/lua \
- src/rocksdb \
- src/spdk \
- src/xxHash \
- src/zstd
+BUILDSRC=${SRCDIR}-${VER}
 
 ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
-GITVERSION:=$(shell cat .git/refs/heads/master)
+GITVERSION:=$(shell git rev-parse HEAD)
 
 DBG_DEBS=ceph-common-dbg_${VER}-${DEBREL}_${ARCH}.deb \
 ceph-fuse-dbg_${VER}-${DEBREL}_${ARCH}.deb \
@@ -43,8 +27,8 @@ rbd-fuse-dbg_${VER}-${DEBREL}_${ARCH}.deb \
 rbd-mirror-dbg_${VER}-${DEBREL}_${ARCH}.deb \
 rbd-nbd-dbg_${VER}-${DEBREL}_${ARCH}.deb
 
-DEBS=ceph_${VER}-${DEBREL}_${ARCH}.deb \
-ceph-base_${VER}-${DEBREL}_${ARCH}.deb \
+MAIN_DEB=ceph_${VER}-${DEBREL}_${ARCH}.deb
+DEBS_REST=ceph-base_${VER}-${DEBREL}_${ARCH}.deb \
 ceph-common_${VER}-${DEBREL}_${ARCH}.deb \
 ceph-fuse_${VER}-${DEBREL}_${ARCH}.deb \
 ceph-mds_${VER}-${DEBREL}_${ARCH}.deb \
@@ -76,9 +60,11 @@ python-rados_${VER}-${DEBREL}_${ARCH}.deb \
 python-rbd_${VER}-${DEBREL}_${ARCH}.deb \
 python-rgw_${VER}-${DEBREL}_${ARCH}.deb \
 radosgw_${VER}-${DEBREL}_${ARCH}.deb \
+rados-objclass-dev_${VER}-${DEBREL}_${ARCH}.deb \
 rbd-fuse_${VER}-${DEBREL}_${ARCH}.deb \
 rbd-mirror_${VER}-${DEBREL}_${ARCH}.deb \
 rbd-nbd_${VER}-${DEBREL}_${ARCH}.deb
+DEBS=$(MAIN_DEB) $(DEBS_REST)
 
 all: ${DEBS} ${DBG_DEBS}
        @echo ${DEBS}
@@ -86,25 +72,31 @@ all: ${DEBS} ${DBG_DEBS}
 
 .PHONY: deb
 deb: ${DEBS} ${DBG_DEBS}
-${DEBS} ${DBG_DEBS}: ${SRC} patches
-       rm -rf ${SRCDIR}
-       tar xf ${SRC}
-       cd ${SRCDIR}; ln -s ../patches patches
-       cd ${SRCDIR}; quilt push -a
-       cd ${SRCDIR}; rm -rf .pc ./patches
-       echo "git clone git://git.proxmox.com/git/ceph.git\\ngit checkout ${GITVERSION}" >  ${SRCDIR}/debian/SOURCE
-       echo "debian/SOURCE" >> ${SRCDIR}/debian/docs
-       cd ${SRCDIR}; dpkg-buildpackage -b -uc -us
+${DEBS_REST} ${DBG_DEBS}: $(MAIN_DEB)
+$(MAIN_DEB): patches
+       rm -rf ${BUILDSRC}
+       mkdir ${BUILDSRC}
+       rsync -ra ${SRCDIR}/ ${BUILDSRC}
+       cd ${BUILDSRC}; ln -s ../patches patches
+       cd ${BUILDSRC}; quilt push -a
+       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}
 
 .PHONY: download
-download ${SRC}:
-       rm -rf ${SRC} ${SRCDIR}
-       git clone -b v${VER} --depth 1 https://github.com/ceph/ceph.git ${SRCDIR}
-       cd ${SRCDIR}; for module in ${SUBMODULES}; do git submodule update --init $${module}; done
-       # "ceph version" is derived from "git describe"
-       # only drop module history to save space
-       tar czf ${SRC} --exclude ".git/modules" ${SRCDIR}
+download:
+       rm -rf ${SRCDIR}.tmp
+       git clone --recursive -b v${VER} https://github.com/ceph/ceph ${SRCDIR}.tmp
+       cd ${SRCDIR}.tmp; ./make-dist
+       rm -rf ${SRCDIR}
+       mkdir ${SRCDIR}
+       tar -C ${SRCDIR} --strip-components=1 -xf ${SRCDIR}.tmp/ceph-*.tar.bz2
+       # needed because boost and zstd builds fail otherwise
+       find ${SRCDIR} -type f -name ".gitignore" -delete
+       rm -rf ${SRCDIR}.tmp
 
 .PHONY: upload
 upload: ${DEBS}
@@ -114,7 +106,7 @@ distclean: clean
 
 .PHONY: clean
 clean:
-       rm -rf ceph *_all.deb *_${ARCH}.deb *.changes *.dsc *.buildinfo
+       rm -rf ${BUILDSRC} *_all.deb *_${ARCH}.deb *.changes *.dsc *.buildinfo *.tar.gz
 
 .PHONY: dinstall
 dinstall: ${DEB}