]> git.proxmox.com Git - ceph.git/blobdiff - Makefile
buildsys: use download.ceph.com to download source tar ball
[ceph.git] / Makefile
index 6a15306fa27eec37a13795121c566e9855f49aac..df04ddbd73335223c5c733ded25d53461bfedb75 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,8 @@
-RELEASE=5.1
+RELEASE=6.0
 
 PACKAGE=ceph
-VER=12.2.4
-DEBREL=pve1
+VER=14.2.1
+DEBREL=pve2
 
 SRCDIR=ceph
 BUILDSRC=${SRCDIR}-${VER}
@@ -49,7 +49,7 @@ librbd1_${VER}-${DEBREL}_${ARCH}.deb \
 librbd-dev_${VER}-${DEBREL}_${ARCH}.deb \
 librgw2_${VER}-${DEBREL}_${ARCH}.deb \
 librgw-dev_${VER}-${DEBREL}_${ARCH}.deb \
-python3-ceph-argparse_${VER}-${DEBREL}_${ARCH}.deb \
+python3-ceph-argparse_${VER}-${DEBREL}_all.deb \
 python3-cephfs_${VER}-${DEBREL}_${ARCH}.deb \
 python3-rados_${VER}-${DEBREL}_${ARCH}.deb \
 python3-rbd_${VER}-${DEBREL}_${ARCH}.deb \
@@ -66,37 +66,50 @@ rbd-mirror_${VER}-${DEBREL}_${ARCH}.deb \
 rbd-nbd_${VER}-${DEBREL}_${ARCH}.deb
 DEBS=$(MAIN_DEB) $(DEBS_REST)
 
+DSC=ceph_${VER}-${DEBREL}.dsc
+
 all: ${DEBS} ${DBG_DEBS}
        @echo ${DEBS}
        @echo ${DBG_DEBS}
 
+${BUILDSRC}: ${SRCDIR} patches
+       rm -rf $@
+       mkdir $@.tmp
+       rsync -ra ${SRCDIR}/ $@.tmp
+       cd $@.tmp; ln -s ../patches patches
+       cd $@.tmp; quilt push -a
+       cd $@.tmp; rm -rf .pc ./patches
+       echo "git clone git://git.proxmox.com/git/ceph.git\\ngit checkout ${GITVERSION}" >  $@.tmp/debian/SOURCE
+       echo "debian/SOURCE" >> $@.tmp/debian/docs
+       echo "${GITVERSION}\\nv${VER}" > $@.tmp/src/.git_version
+       cp changelog.Debian $@.tmp/debian/changelog
+       mv $@.tmp $@
+
 .PHONY: deb
 deb: ${DEBS} ${DBG_DEBS}
 ${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
+$(MAIN_DEB): ${BUILDSRC}
        cd ${BUILDSRC}; dpkg-buildpackage -b -uc -us
+       lintian ${DEBS}
        @echo ${DEBS}
 
+.PHONY: dsc
+dsc: ${DSC}
+${DSC}: ${BUILDSRC}
+       cd ${BUILDSRC}; dpkg-buildpackage -S -uc -us -d -nc
+       @echo ${DSC}
+
 .PHONY: download
 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
+       # FIXME: better verification (download dsc and use dscverify with ceph.com release key?)
+       dget --allow-unauthenticated --download-only 'https://download.ceph.com/debian-nautilus/pool/main/c/ceph/ceph_${VER}.orig.tar.gz'
+       rm -rf ${SRCDIR}.tmp ${SRCDIR}
+       mkdir ${SRCDIR}.tmp
+       tar -C ${SRCDIR}.tmp --strip-components=1 -xf ceph_${VER}.orig.tar.gz
        # needed because boost and zstd builds fail otherwise
-       find ${SRCDIR} -type f -name ".gitignore" -delete
-       rm -rf ${SRCDIR}.tmp
+       find ${SRCDIR}.tmp -type f -name ".gitignore" -delete
+       mv ${SRCDIR}.tmp/debian/changelog ${SRCDIR}.tmp/changelog.upstream
+       mv ${SRCDIR}.tmp ${SRCDIR}
 
 .PHONY: upload
 upload: ${DEBS}
@@ -106,7 +119,7 @@ distclean: clean
 
 .PHONY: clean
 clean:
-       rm -rf ${BUILDSRC} *_all.deb *_${ARCH}.deb *.changes *.dsc *.buildinfo *.tar.gz
+       rm -rf ${BUILDSRC} ${BUILDSRC}.tmp *_all.deb *_${ARCH}.deb *.changes *.dsc *.buildinfo *.tar.gz
 
 .PHONY: dinstall
 dinstall: ${DEB}