]> git.puffer.fish Git - mirror/frr.git/commitdiff
debianpkg: Add option to build with RPKI
authorMartin Winter <mwinter@opensourcerouting.org>
Tue, 6 Mar 2018 15:14:03 +0000 (07:14 -0800)
committerMartin Winter <mwinter@opensourcerouting.org>
Tue, 6 Mar 2018 15:35:04 +0000 (07:35 -0800)
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
debianpkg/README.deb_build.md
debianpkg/backports/ubuntu12.04/debian/rules
debianpkg/backports/ubuntu14.04/debian/rules
debianpkg/rules

index 889e83174416fe3100f43742d91e64da8ac38b37..8ccce93f5530aeefe5310b833c836e7568a42f59 100644 (file)
@@ -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 
index 5c3e1363ce66f85c02e1ae7f80f53648cfac9bf6..e5941d8bd9bbddf439dfc89caefb5c76536fb765 100755 (executable)
 #   export WANT_BGP_VNC=0
 #   export WANT_CUMULUS_MODE=0
 #   export WANT_MULTIPATH=1
+#   export WANT_RPKI=0
+#
+# NOTE: 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
@@ -95,6 +104,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
@@ -106,6 +121,11 @@ 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)"
+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
@@ -138,6 +158,7 @@ override_dh_auto_configure:
                $(USE_PIM) \
                --enable-dependency-tracking \
                $(USE_BGP_VNC) \
+               $(USE_RPKI) \
                $(shell dpkg-buildflags --export=configure); \
        fi
 
index b1f539def69b611f749810032a718035cd342cfb..f2542ce6358da1327b27b0ca98bfe0b3bd025a5d 100755 (executable)
 #   export WANT_BGP_VNC=0
 #   export WANT_CUMULUS_MODE=0
 #   export WANT_MULTIPATH=1
+#   export WANT_RPKI=0
+#
+# NOTE: 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
@@ -95,6 +104,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
@@ -106,6 +121,11 @@ 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)"
+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
@@ -138,6 +158,7 @@ override_dh_auto_configure:
                $(USE_PIM) \
                --enable-dependency-tracking \
                $(USE_BGP_VNC) \
+               $(USE_RPKI) \
                $(shell dpkg-buildflags --export=configure); \
        fi
 
index a6a9077da181cafa2568b0c82beab6c725bb6650..bf6165c4d887d0928504ebce241f1e1eec10a6b7 100755 (executable)
 #   export WANT_BGP_VNC=0
 #   export WANT_CUMULUS_MODE=0
 #   export WANT_MULTIPATH=1
+#   export WANT_RPKI=0
+#
+# NOTE: 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
@@ -95,6 +104,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
@@ -106,6 +121,11 @@ 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)"
+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
@@ -139,6 +159,7 @@ override_dh_auto_configure:
                $(USE_PIM) \
                --enable-dependency-tracking \
                $(USE_BGP_VNC) \
+               $(USE_RPKI) \
                $(shell dpkg-buildflags --export=configure); \
        fi