[pve-devel] [PATCH librados2-perl] Convert to dpkg-buildpackage

Rene Jochum rene at jochums.at
Thu Apr 19 11:31:08 CEST 2018


Thanks again, comments inline.

On 2018-04-19 10:16, Fabian Grünbichler wrote:
>> @@ -52,23 +54,27 @@ install: PVE/RADOS.pm RADOS.so
>>  .PHONY: deb ${DEB}
>>  deb: ${DEB}
>>  ${DEB}:
>> -	rm -rf debian
>> -	mkdir debian
>> -	make DESTDIR=${CURDIR}/debian install
>> -	install -d -m 0755 debian/DEBIAN
>> -	sed -e s/@@VERSION@@/${VERSION}/ -e s/@@PKGRELEASE@@/${PKGREL}/ -e s/@@ARCH@@/${ARCH}/ -e "s|@PERLAPI@|perlapi-$(PERL_APIVER)|g" <control.in >debian/DEBIAN/control
>> -	install -D -m 0644 copyright debian/${DOCDIR}/copyright
>> -	install -m 0644 changelog.Debian debian/${DOCDIR}/
>> -	gzip -9 -n debian/${DOCDIR}/changelog.Debian
>> -	echo "git clone git://git.proxmox.com/git/librados2-perl.git\\ngit checkout ${GITVERSION}" > debian/${DOCDIR}/SOURCE
>> -	fakeroot dpkg-deb --build debian
>> -	mv debian.deb ${DEB}
>> -	rm -rf debian
>> +	rm -rf ${BUILDDIR}
>> +	rsync -a * ${BUILDDIR}
>> +
>> +	cp -fpr debian ${BUILDDIR}
> why rsync + cp? one should be enough ;)

Hihi, ofc.

> 
>> +	cp changelog.Debian ${BUILDDIR}/debian/changelog
>> +	cp copyright ${BUILDDIR}/debian/copyright
> see above, those two could go into the checked-in debian/
> 
>> +	sed -e s/@@VERSION@@/${VERSION}/ -e s/@@PKGRELEASE@@/${PKGREL}/ -e s/@@ARCH@@/${ARCH}/ -e "s|@PERLAPI@|perlapi-$(PERL_APIVER)|g" <debian/control.in >${BUILDDIR}/debian/control
> except for the PERLAPI one, all of these should be dropped / replaced:
> VERSION and PKGRELEASE come from debian/changelog
> ARCH comes via control and dpkg-architecture
> 
> whether the PERLAPI is really needed should probably be investigated.

It is needed, as "RADOS.so" only works with that perl Version - on of
the main reasons I have to recompile on Buster.

> 
>> +	make DESTDIR=${BUILDDIR} install
>> +	install -D -m 0644 copyright ${BUILDDIR}/${DOCDIR}/copyright
>> +	install -m 0644 changelog.Debian ${BUILDDIR}/${DOCDIR}/
>> +	gzip -9 -n ${BUILDDIR}/${DOCDIR}/changelog.Debian
> these four should not be needed (dpkg-buildpackage will call the
> Makefile to compile/build anyway, and sets DESTDIR correctly)
> 
> copyright and changelog are handled by the appropriate debhelpers
> 
>> +	echo "git clone git://git.proxmox.com/git/librados2-perl.git\\ngit checkout ${GITVERSION}" > ${BUILDDIR}/${DOCDIR}/SOURCE
> this does not work as intended (debdiff says the SOURCE file is not
> contained after applying the patch)

Fixed, in V2




-- 
René Jochum
Mail: rene at jochums.at
Tel: +43 664 750 77 653
Web: https://rene.jochums.at



More information about the pve-devel mailing list