summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2018-03-17 15:29:34 -0400
committerGitHub <noreply@github.com>2018-03-17 15:29:34 -0400
commitf932e9ffb23218dc212b173a3cb27db8be5d03d3 (patch)
treedf698806c5634d47f3c02070d4cf326b0bccf1d4
parent34a0beaa6c414859a7efb296df06774dc5445d54 (diff)
parent89073ff1afb0cdd79ae0aa7bad1af3542ebe84f8 (diff)
Merge pull request #1918 from opensourcerouting/rpki-pkg-master
Rpki pkg master
-rw-r--r--debianpkg/README.deb_build.md13
-rwxr-xr-xdebianpkg/backports/ubuntu12.04/debian/rules4
-rwxr-xr-xdebianpkg/backports/ubuntu14.04/debian/rules27
-rwxr-xr-xdebianpkg/rules27
-rw-r--r--redhat/README.rpm_build.md5
-rw-r--r--redhat/frr.spec.in13
6 files changed, 81 insertions, 8 deletions
diff --git a/debianpkg/README.deb_build.md b/debianpkg/README.deb_build.md
index 889e831744..8ccce93f55 100644
--- a/debianpkg/README.deb_build.md
+++ b/debianpkg/README.deb_build.md
@@ -71,10 +71,15 @@ adding a new backport.
Or change some options:
(see `rules` file for available options)
- export WANT_BGP_VNC=1
- export WANT_CUMULUS_MODE=1
- debuild -b -uc -us
-
+ debuild --set-envvar=WANT_BGP_VNC=1 --set-envvar=WANT_CUMULUS_MODE=1 -b -uc -us
+
+ To build with RPKI, download the librtr packages from
+ https://ci1.netdef.org/browse/RPKI-RTRLIB/latestSuccessful/artifact
+ install librtr-dev on the build server and build the packages as
+ debuild --set-envvar=WANT_RPKI=1 -b -uc -us
+ RPKI packages have an additonal dependency of librtr0 which can be
+ found at the same URL
+
DONE.
If all works correctly, then you should end up with the Debian packages under
diff --git a/debianpkg/backports/ubuntu12.04/debian/rules b/debianpkg/backports/ubuntu12.04/debian/rules
index 9a3ea1ffbd..01ad81d371 100755
--- a/debianpkg/backports/ubuntu12.04/debian/rules
+++ b/debianpkg/backports/ubuntu12.04/debian/rules
@@ -16,8 +16,10 @@ WANT_CUMULUS_MODE ?= 0
WANT_MULTIPATH ?= 1
WANT_SNMP ?= 0
+# NOTES:
+#
# If multipath is enabled (WANT_MULTIPATH=1), then set number of multipaths here
-# Please be aware that 0 is NOT disabled, but treated as unlimited
+# Please be aware that 0 is NOT disabled, but treated as unlimited
MULTIPATH ?= 256
diff --git a/debianpkg/backports/ubuntu14.04/debian/rules b/debianpkg/backports/ubuntu14.04/debian/rules
index 20b821ead7..f7b9428658 100755
--- a/debianpkg/backports/ubuntu14.04/debian/rules
+++ b/debianpkg/backports/ubuntu14.04/debian/rules
@@ -15,9 +15,20 @@ WANT_BGP_VNC ?= 1
WANT_CUMULUS_MODE ?= 0
WANT_MULTIPATH ?= 1
WANT_SNMP ?= 0
+WANT_RPKI ?= 0
+# NOTES:
+#
+# If you use WANT_RPKI, then there is a new dependency for librtr0 package
+# and a build dependency of the librtr-dev package.
+# While the librtr0 is added to the depenencies automatically, the build
+# dependency can't be changed dynamically and building will fail if the
+# librtr-dev isn't installed during package build
+# Tested versions of both packages can be found at
+# https://ci1.netdef.org/browse/RPKI-RTRLIB/latestSuccessful/artifact
+#
# If multipath is enabled (WANT_MULTIPATH=1), then set number of multipaths here
-# Please be aware that 0 is NOT disabled, but treated as unlimited
+# Please be aware that 0 is NOT disabled, but treated as unlimited
MULTIPATH ?= 256
@@ -91,6 +102,12 @@ else
USE_CUMULUS=--enable-cumulus=no
endif
+ifeq ($(WANT_RPKI), 1)
+ USE_RPKI=--enable-rpki
+else
+ USE_RPKI=--disable-rpki
+endif
+
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
DEBIAN_JOBS := $(subst parallel=,,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
endif
@@ -102,6 +119,13 @@ endif
%:
dh $@ --with=autoreconf --parallel --dbg-package=frr-dbg --list-missing
+override_dh_gencontrol:
+ifeq ($(WANT_RPKI), 1)
+ dh_gencontrol -- -Vdist:Depends="librtr0 (>= 0.5)"
+else
+ dh_gencontrol
+endif
+
override_dh_auto_configure:
# Frr needs /proc to check some BSD vs Linux specific stuff.
# Else it fails with an obscure error message pointing out that
@@ -134,6 +158,7 @@ override_dh_auto_configure:
$(USE_PIM) \
--enable-dependency-tracking \
$(USE_BGP_VNC) \
+ $(USE_RPKI) \
$(shell dpkg-buildflags --export=configure); \
fi
diff --git a/debianpkg/rules b/debianpkg/rules
index 82a5148039..0f2f4ebe16 100755
--- a/debianpkg/rules
+++ b/debianpkg/rules
@@ -15,9 +15,20 @@ WANT_BGP_VNC ?= 1
WANT_CUMULUS_MODE ?= 0
WANT_MULTIPATH ?= 1
WANT_SNMP ?= 0
+WANT_RPKI ?= 0
+# NOTES:
+#
+# If you use WANT_RPKI, then there is a new dependency for librtr0 package
+# and a build dependency of the librtr-dev package.
+# While the librtr0 is added to the depenencies automatically, the build
+# dependency can't be changed dynamically and building will fail if the
+# librtr-dev isn't installed during package build
+# Tested versions of both packages can be found at
+# https://ci1.netdef.org/browse/RPKI-RTRLIB/latestSuccessful/artifact
+#
# If multipath is enabled (WANT_MULTIPATH=1), then set number of multipaths here
-# Please be aware that 0 is NOT disabled, but treated as unlimited
+# Please be aware that 0 is NOT disabled, but treated as unlimited
MULTIPATH ?= 256
@@ -91,6 +102,12 @@ else
USE_CUMULUS=--enable-cumulus=no
endif
+ifeq ($(WANT_RPKI), 1)
+ USE_RPKI=--enable-rpki
+else
+ USE_RPKI=--disable-rpki
+endif
+
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
DEBIAN_JOBS := $(subst parallel=,,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
endif
@@ -102,6 +119,13 @@ endif
%:
dh $@ --with=systemd,autoreconf --parallel --dbg-package=frr-dbg --list-missing
+override_dh_gencontrol:
+ifeq ($(WANT_RPKI), 1)
+ dh_gencontrol -- -Vdist:Depends="librtr0 (>= 0.5)"
+else
+ dh_gencontrol
+endif
+
override_dh_auto_configure:
# Frr needs /proc to check some BSD vs Linux specific stuff.
# Else it fails with an obscure error message pointing out that
@@ -135,6 +159,7 @@ override_dh_auto_configure:
$(USE_PIM) \
--enable-dependency-tracking \
$(USE_BGP_VNC) \
+ $(USE_RPKI) \
$(shell dpkg-buildflags --export=configure); \
fi
diff --git a/redhat/README.rpm_build.md b/redhat/README.rpm_build.md
index 7deea54de4..c461e543d2 100644
--- a/redhat/README.rpm_build.md
+++ b/redhat/README.rpm_build.md
@@ -63,11 +63,16 @@ Building your own FRRouting RPM
%{!?with_watchfrr: %global with_watchfrr 1 }
%{!?with_bgp_vnc: %global with_bgp_vnc 0 }
%{!?with_pimd: %global with_pimd 1 }
+ %{!?with_rpki: %global with_rpki 0 }
7. Build the RPM
rpmbuild --define "_topdir `pwd`/rpmbuild" -ba rpmbuild/SPECS/frr.spec
+ If building with RPKI, then download and install the additional RPKI
+ packages from
+ https://ci1.netdef.org/browse/RPKI-RTRLIB/latestSuccessful/artifact
+
DONE.
If all works correctly, then you should end up with the RPMs under
diff --git a/redhat/frr.spec.in b/redhat/frr.spec.in
index ba46206695..8e0cc86a9c 100644
--- a/redhat/frr.spec.in
+++ b/redhat/frr.spec.in
@@ -26,6 +26,7 @@
%{!?with_watchfrr: %global with_watchfrr 1 }
%{!?with_bgp_vnc: %global with_bgp_vnc 0 }
%{!?with_pimd: %global with_pimd 1 }
+%{!?with_rpki: %global with_rpki 0 }
# path defines
%define _sysconfdir /etc/frr
@@ -156,6 +157,10 @@ Requires: ncurses json-c initscripts
BuildRequires: pam-devel
Requires: pam
%endif
+%if %{with_rpki}
+BuildRequires: librtr-devel >= 0.5
+Requires: librtr >= 0.5
+%endif
%if "%{initsystem}" == "systemd"
BuildRequires: systemd systemd-devel
Requires(post): systemd
@@ -305,6 +310,9 @@ developing OSPF-API and frr applications.
--enable-systemd=yes \
%endif
--enable-poll=yes
+%if %{with_rpki}
+ --enable-rpki
+%endif
make %{?_smp_mflags} MAKEINFO="makeinfo --no-split" SPHINXBUILD=%{sphinx}
@@ -605,7 +613,10 @@ rm -rf %{buildroot}
%endif
%changelog
-* Tue Feb 20 2018 Martin Winter <mwinter@opensourcerouting.org> - %{version}
+* Sun Mar 4 2018 Martin Winter <mwinter@opensourcerouting.org> - %{version}
+- Add option to build with RPKI (default: disabled)
+
+* Tue Feb 20 2018 Martin Winter <mwinter@opensourcerouting.org>
- Adapt to new documentation structure based on Sphinx
* Fri Oct 20 2017 Martin Winter <mwinter@opensourcerouting.org>