]> git.proxmox.com Git - mirror_frr.git/commitdiff
snapcraft: Add pathd to FRR snap daemons
authorMartin Winter <mwinter@opensourcerouting.org>
Tue, 17 Aug 2021 19:24:47 +0000 (21:24 +0200)
committerMartin Winter <mwinter@opensourcerouting.org>
Tue, 17 Aug 2021 19:43:27 +0000 (21:43 +0200)
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
snapcraft/README.snap_build.md
snapcraft/README.usage.md
snapcraft/defaults/pathd.conf.default [new file with mode: 0644]
snapcraft/scripts/Makefile
snapcraft/scripts/pathd-service [new file with mode: 0644]
snapcraft/snapcraft.yaml.in

index b96612f53867b5eb3e8dda63c581d8de12f01f62..f4a38e7f7f0bc84b4f07f18a86cde7a6fe84fd35 100644 (file)
@@ -99,6 +99,7 @@ All the commands are prefixed with frr.
     frr.staticd-debug
     frr.bfdd-debug
     frr.fabricd-debug
+    frr.pathd-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 6a0864c8c5f2ac15f62bb380aae40ad85477d06d..7abc0f6ded50f51e9a87cf366d17fdc93259f9ab 100644 (file)
@@ -18,7 +18,8 @@ ie for `ospf6d` (OSPFv3):
     systemctl enable snap.frr.ospf6d.service
 
 The daemons are: `ripd`, `ripngd`, `ospfd`, `ospf6d`, `isisd`, `bgpd`, 
-`pimd`, `ldpd`, `eigrpd`, `babeld`, `nhrpd`, `bfdd`, `zebra`
+`pimd`, `ldpd`, `eigrpd`, `babeld`, `nhrpd`, `bfdd`, `vrrpd`, `pbrd`,
+`pathd`, `fabricd`, `staticd`, `zebra`
 
 Commands defined by this snap
 -----------------------------
diff --git a/snapcraft/defaults/pathd.conf.default b/snapcraft/defaults/pathd.conf.default
new file mode 100644 (file)
index 0000000..e69de29
index 0435b3bc52fafcb6379826bd3f5efce0d7cb3ff0..5aedddcf698df41c0d4f75fc92e44d7aec8e6ab7 100644 (file)
@@ -19,6 +19,7 @@ install:
        install -D -m 0755 bfdd-service $(DESTDIR)/bin/
        install -D -m 0755 fabricd-service $(DESTDIR)/bin/
        install -D -m 0755 vrrpd-service $(DESTDIR)/bin/
+       install -D -m 0755 pathd-service $(DESTDIR)/bin/
        install -D -m 0755 set-options $(DESTDIR)/bin/
        install -D -m 0755 show_version $(DESTDIR)/bin/
 
diff --git a/snapcraft/scripts/pathd-service b/snapcraft/scripts/pathd-service
new file mode 100644 (file)
index 0000000..6473c59
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e -x
+
+if ! [ -e $SNAP_DATA/pathd.conf ]; then
+    cp $SNAP/etc/frr/pathd.conf.default $SNAP_DATA/pathd.conf
+fi
+exec $SNAP/sbin/pathd \
+    -f $SNAP_DATA/pathd.conf \
+    --pid_file $SNAP_DATA/pathd.pid \
+    --socket $SNAP_DATA/zsock \
+    --vty_socket $SNAP_DATA
+
index 2c91546198ee1ee229caa7ba400c766c226dfddd..fca9652db17953fa3dea7abd0e4a5ee01489ec04 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), BFD and OpenFabric
- as well as the IPv6 versions of these.
+ RIPng, PIM, LDP, Babel, EIGRP, PBR (Policy-based routing), PATHD (Segment
routing), BFD and OpenFabric as well as the IPv6 versions of these.
  FRRouting (frr) is a fork of Quagga.
 confinement: strict
 grade: devel
@@ -142,6 +142,13 @@ apps:
             - network
             - network-bind
             - network-control
+    pathd:
+        command: bin/pathd-service
+        daemon: simple
+        plugs:
+            - network
+            - network-bind
+            - network-control
     set:
         command: bin/set-options
     zebra-debug:
@@ -246,6 +253,13 @@ apps:
             - network
             - network-bind
             - network-control
+    pathd-debug:
+        command: sbin/pathd -f $SNAP_DATA/pathd.conf --pid_file $SNAP_DATA/pathd.pid --socket $SNAP_DATA/zsock --vty_socket $SNAP_DATA
+        plugs:
+            - network
+            - network-bind
+            - network-control
+
 parts:
     rtrlib:
         build-packages:
@@ -376,6 +390,7 @@ parts:
             bfdd.conf.default: etc/frr/bfdd.conf.default
             fabricd.conf.default: etc/frr/fabricd.conf.default
             vrrpd.conf.default: etc/frr/vrrpd.conf.default
+            pathd.conf.default: etc/frr/pathd.conf.default
             vtysh.conf.default: etc/frr/vtysh.conf.default
             staticd.conf.default: etc/frr/staticd.conf.default
     frr-scripts: