summaryrefslogtreecommitdiff
path: root/scripts/build-submodules
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2019-01-14 21:22:07 +0100
committerChristian Poessinger <christian@poessinger.com>2019-01-14 21:22:07 +0100
commit420ef2830a168dda3f41bde4442488cfc68c6736 (patch)
tree40f1a562254e03fffd8f54b2b062b4568e9b1735 /scripts/build-submodules
parentb28865a5c239aca311769ddafc8df1865d278f7b (diff)
downloadvyos-build-420ef2830a168dda3f41bde4442488cfc68c6736.tar.gz
vyos-build-420ef2830a168dda3f41bde4442488cfc68c6736.zip
build-submodules support FRR build from 'master' branch
Diffstat (limited to 'scripts/build-submodules')
-rwxr-xr-xscripts/build-submodules43
1 files changed, 38 insertions, 5 deletions
diff --git a/scripts/build-submodules b/scripts/build-submodules
index 747b02d2..768294f5 100755
--- a/scripts/build-submodules
+++ b/scripts/build-submodules
@@ -116,18 +116,51 @@ if [ $INIT_PACKAGES ]; then
fi
build_frr() {
- # FRR upstream version is specified here
- FRR_VER="debian/frr-6.0.2-1"
PKG=frr
- status_start "Building package: $PKG (Git commit/tag: $FRR_VER)"
+
+ status_start "Building package: $PKG"
if [ ! -f "$PKGDIR/$PKG/README.md" ]; then
status_skip "No source for: $PKG"
return 1
fi
+
( set -e; set -x
cd $PKGDIR/$PKG
- git checkout $FRR_VER
- dpkg-buildpackage -uc -us -tc -b
+
+ # Run bootstrap.sh and make a dist tarball
+ # http://docs.frrouting.org/projects/dev-guide/en/latest/packaging-debian.html
+ ./bootstrap.sh
+ ./configure --with-pkg-extra-version=-vyos
+ make dist
+
+ # Create backports debian sources
+ mv debianpkg debian
+ make -f debian/rules backports
+
+ # Create a new directory to build the package and populate with package source.
+ mkdir frrpkg
+ cd frrpkg
+ tar xf ../frr_*.orig.tar.gz
+ cd frr*
+ source /etc/os-release
+ ls -al ../../frr_*${ID}${VERSION_ID}*
+ tar xf ../../frr_*${ID}${VERSION_ID}*.debian.tar.xz
+
+ # As libyang is not (yet) build and installed as native Debian package FRR
+ # build system reports the following error:
+ #
+ # "dpkg-shlibdeps: error: no dependency information found for
+ # /usr/lib/x86_64-linux-gnu/libyang.so.0.16"
+ #
+ # It is "overruled" by
+ sed '/dh_systemd_enable frr.service/ a override_dh_shlibdeps:\n\tdh_shlibdeps \
+ --dpkg-shlibdeps-params=--ignore-missing-info\n' -i debian/rules
+
+ # Build Debian Package
+ debuild --no-lintian --set-envvar=WANT_SNMP=1 --set-envvar=WANT_RPKI=1 \
+ --set-envvar=WANT_CUMULUS_MODE=0 -b -uc -us
+
+ mv ../frr_*.deb $PKGDIR
) >>$PKGDIR/$PKG.buildlog 2>&1
if [ $? -ne 0 ]; then
status_fail