]> git.proxmox.com Git - mirror_frr.git/commitdiff
snapcraft: Add FabricD to Snap package
authorMartin Winter <mwinter@opensourcerouting.org>
Thu, 7 Feb 2019 23:12:14 +0000 (15:12 -0800)
committerMartin Winter <mwinter@opensourcerouting.org>
Tue, 28 May 2019 23:23:27 +0000 (01:23 +0200)
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
snapcraft/README.snap_build.md
snapcraft/README.usage.md
snapcraft/defaults/fabricd.conf.default [new file with mode: 0644]
snapcraft/scripts/Makefile
snapcraft/scripts/fabricd-service [new file with mode: 0644]
snapcraft/snapcraft.yaml.in

index 7c4284845183256709ed42dad2cea83ee422ab8a..e43f63f2d9042253a235d191374b46f5616c5405 100644 (file)
@@ -92,6 +92,14 @@ All the commands are prefixed with frr.
     frr.ripngd-debug
     frr.ldp-debug
     frr.zebra-debug
+    frr.pimd-debug
+    frr.nhrpd-debug
+    frr.babeld-debug
+    frr.eigrpd-debug
+    frr.pbrd-debug
+    frr.staticd-debug
+    frr.bfdd-debug
+    frr.fabricd-debug
 
 vtysh can be accessed as frr.vtysh (Make sure you have /snap/bin in your
 path). If access as `vtysh` instead of `frr.vtysh` is needed, you can enable it
index a7b51a5656f8603e906f0e2e8f01ad493dd4aa8d..6a0864c8c5f2ac15f62bb380aae40ad85477d06d 100644 (file)
@@ -66,6 +66,8 @@ depend on them). These are mainly intended to debug the Snap
         Starts staticd daemon in foreground
 - `frr.bfdd-debug`:
         Starts bfdd daemon in foreground
+- `frr.fabricd-debug`:
+        Starts fabricd daemon in foreground
 
 MPLS (LDP)
 ----------
diff --git a/snapcraft/defaults/fabricd.conf.default b/snapcraft/defaults/fabricd.conf.default
new file mode 100644 (file)
index 0000000..e69de29
index e3a7708f23043d59454fc3862375f84ed9f3ddb7..7ddb7f0769fe12c70bc70582dfa7d1534d550129 100644 (file)
@@ -17,6 +17,7 @@ install:
        install -D -m 0755 pbrd-service $(DESTDIR)/bin/
        install -D -m 0755 staticd-service $(DESTDIR)/bin/
        install -D -m 0755 bfdd-service $(DESTDIR)/bin/
+       install -D -m 0755 fabricd-service $(DESTDIR)/bin/
        install -D -m 0755 set-options $(DESTDIR)/bin/
        install -D -m 0755 show_version $(DESTDIR)/bin/
 
diff --git a/snapcraft/scripts/fabricd-service b/snapcraft/scripts/fabricd-service
new file mode 100644 (file)
index 0000000..586f061
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e -x
+
+if ! [ -e $SNAP_DATA/fabricd.conf ]; then
+    cp $SNAP/etc/frr/fabricd.conf.default $SNAP_DATA/fabricd.conf
+fi
+exec $SNAP/sbin/fabricd \
+    -f $SNAP_DATA/fabricd.conf \
+    --pid_file $SNAP_DATA/fabricd.pid \
+    --socket $SNAP_DATA/zsock \
+    --vty_socket $SNAP_DATA
+
index a0222a86a4726a8c1bb66fd00e81096c8ab96928..54865b9c80194de80d6b930bcd303990865de1c2 100644 (file)
@@ -4,8 +4,8 @@ summary: FRRouting BGP/OSPFv2/OSPFv3/ISIS/RIP/RIPng/PIM/LDP/EIGRP/BFD routing da
 description: BGP/OSPFv2/OSPFv3/ISIS/RIP/RIPng/PIM/LDP/EIGRP/BFD routing daemon
  FRRouting (FRR) is free software which manages TCP/IP based routing 
  protocols. It supports BGP4, BGP4+, OSPFv2, OSPFv3, IS-IS, RIPv1, RIPv2, 
- RIPng, PIM, LDP, Babel, EIGRP, PBR (Policy-based routing) and BFD as well as
- the IPv6 versions of these.
+ RIPng, PIM, LDP, Babel, EIGRP, PBR (Policy-based routing), BFD and OpenFabric
as well as the IPv6 versions of these.
  FRRouting (frr) is a fork of Quagga.
 confinement: strict
 grade: devel
@@ -127,6 +127,13 @@ apps:
             - network
             - network-bind
             - network-control
+    fabricd:
+        command: bin/fabricd-service
+        daemon: simple
+        plugs:
+            - network
+            - network-bind
+            - network-control
     set:
         command: bin/set-options
     zebra-debug:
@@ -219,6 +226,12 @@ apps:
             - network
             - network-bind
             - network-control
+    fabricd-debug:
+        command: sbin/fabricd -f $SNAP_DATA/fabricd.conf --pid_file $SNAP_DATA/fabricd.pid --socket $SNAP_DATA/zsock --vty_socket $SNAP_DATA
+        plugs:
+            - network
+            - network-bind
+            - network-control
 
 parts:
     rtrlib:
@@ -337,6 +350,7 @@ parts:
             eigrpd.conf.default: etc/frr/eigrpd.conf.default
             pbrd.conf.default: etc/frr/pbrd.conf.default
             bfdd.conf.default: etc/frr/bfdd.conf.default
+            fabricd.conf.default: etc/frr/fabricd.conf.default
             vtysh.conf.default: etc/frr/vtysh.conf.default
             staticd.conf.default: etc/frr/staticd.conf.default
     frr-scripts: