[pve-devel] [PATCHV2 4/4] Use git archive instead of rsync to build tarball.

Wolfgang Bumiller w.bumiller at proxmox.com
Wed Jul 6 14:39:15 CEST 2016


On Wed, Jul 06, 2016 at 10:21:19AM +0200, Wolfgang Link wrote:
> ---
>  Makefile | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index f4eae05..edf2cc2 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -16,7 +16,8 @@ all: ${DEB}
>  
>  ${DEB} deb: ${SDSRC}
>  	rm -rf ${SDDIR}
> -	tar xf ${SDSRC}
> +	mkdir ${SDDIR}
> +	cd ${SDDIR}; tar xf ../${SDSRC}

Drop this change and... (see below)

>  	mv ${SDDIR}/debian ${SDDIR}/debian.org
>  	cp -av debian ${SDDIR}/debian
>  	echo "git clone git://git.proxmox.com/git/pve-sheepdog.git\\ngit checkout ${GITVERSION}" > ${SDDIR}/debian/SOURCE
> @@ -27,10 +28,7 @@ ${DEB} deb: ${SDSRC}
>  ${SDSRC} download:
>  	rm -rf ${SDDIR} sheepdog.git
>  	git clone git://github.com/sheepdog/sheepdog.git -b v1.0 sheepdog.git --depth 1
> -	cd sheepdog.git; git checkout -b local v1.0
> -	rsync -a --exclude .git --exclude .gitignore sheepdog.git/ ${SDDIR}
> -	tar czf ${SDSRC}.tmp  ${SDDIR}
> -	rm -rf ${SDDIR}
> +	cd sheepdog.git; git archive --format=tar.gz -o ../${SDSRC}.tmp v1.0

add: --prefix=${SDDIR}/

Because tar files without a main subdirectory are the devil.

>  	mv ${SDSRC}.tmp ${SDSRC}
>  
>  .PHONY: upload
> -- 
> 2.1.4



More information about the pve-devel mailing list