[pve-devel] [PATCH librados2-perl] Convert to dpkg-buildpackage
Fabian Grünbichler
f.gruenbichler at proxmox.com
Thu Apr 19 11:39:43 CEST 2018
On Thu, Apr 19, 2018 at 11:31:08AM +0200, Rene Jochum wrote:
> 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.
I meant whether we really need to auto-generate it via a variable.
modifying debian/control once per major release is probably not an
issue, and we can skip generating debian/control then (it also serves as
a reminder to change for ani API-related breakage ;)).
More information about the pve-devel
mailing list