[pve-devel] need help to package frr routing software in proxmox way
Thomas Lamprecht
t.lamprecht at proxmox.com
Mon Jun 11 09:05:12 CEST 2018
Hi,
On 6/11/18 8:15 AM, Alexandre DERUMIER wrote:
> Hi,
>
> I'm currently working to package frr
> https://github.com/FRRouting/frr
>
> in proxmox way (with git submodule)
>
>
> official debian build infos are here:
>
> https://github.com/FRRouting/frr/blob/8d659e9168063897f5a475f78162f0e63889c964/doc/developer/packaging-debian.rst
>
>
> But I'm not sure how to implement this for a clean proxmox package in the Makefile
>
Normally the stepos would be somewhat like:
* ensure submodule is initialised
* sync over submodule to build directory
* overwrite (parts of) debian packaging directory
* call dpkg-buildpackage
> They are some bootstraping to generate the /debian directory with build rules.
what needs to be done here, roughly?
Isn't it enough to make a softlink from debian -> debianpkg in the
build directory?
> Maybe should I implemented this in "download:" to generate a tar.gz, and simply use it in "deb:" section ?
>
Hmm, if you do it with submodules then no "download to archive" should be needed.
A makefile could look somewhat like:
(this is a modified version of our novnc-pve Makfile)
PACKAGE=frr-pve
VER=X.Y.Z
PKGREL=1
SRCDIR=frr
BUILDDIR=${SRCDIR}.tmp
ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
GITVERSION:=$(shell git rev-parse HEAD)
DEB=${PACKAGE}_${VER}-${PKGREL}_${ARCH}.deb
all: ${DEB}
.PHONY: deb
deb: ${DEB}
${DEB}: | submodule
rm -rf ${BUILDDIR}
cp -rpa ${SRCDIR} ${BUILDDIR}
ln -s ${BUILDDIR}/debian ${BUILDDIR}/debianpkg
# copy debian changelog here, and/or overwrite d/control
echo "git clone git://git.proxmox.com/git/frr-pve.git\\ngit checkout ${GITVERSION}" > ${BUILDDIR}/debian/SOURCE
cd ${BUILDDIR}; dpkg-buildpackage -b -uc -us
lintian ${DEB}
.PHONY: submodule
submodule:
# some test to check if the submodule was initialized once
#test -f "${SRCDIR}/vnc.html" || git submodule update --init
.PHONY: update_modules
update_modules ${SRCDIR}: submodule
git submodule foreach 'git pull --ff-only origin master'
.PHONY: clean
clean:
rm -rf *~ debian/*~ *.deb ${BUILDDIR} *.changes *.dsc *.buildinfo
.PHONY: dinstall
dinstall: deb
dpkg -i ${DEB}1
More information about the pve-devel
mailing list