summaryrefslogtreecommitdiffstats
path: root/snapcraft
diff options
context:
space:
mode:
authorMartin Winter <mwinter@opensourcerouting.org>2021-08-17 21:24:47 +0200
committerMartin Winter <mwinter@opensourcerouting.org>2021-08-17 21:43:27 +0200
commit4baa3aebdc0cf40c22c9eb7274c632bd871fa138 (patch)
tree57f5a31a21a4e8b234ebfd27d8269560d6fa423e /snapcraft
parentsnapcraft: Change base to Ubuntu 18.04 and libyang 2.0.7 (diff)
downloadfrr-4baa3aebdc0cf40c22c9eb7274c632bd871fa138.tar.xz
frr-4baa3aebdc0cf40c22c9eb7274c632bd871fa138.zip
snapcraft: Add pathd to FRR snap daemons
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
Diffstat (limited to 'snapcraft')
-rw-r--r--snapcraft/README.snap_build.md1
-rw-r--r--snapcraft/README.usage.md3
-rw-r--r--snapcraft/defaults/pathd.conf.default0
-rw-r--r--snapcraft/scripts/Makefile1
-rw-r--r--snapcraft/scripts/pathd-service13
-rw-r--r--snapcraft/snapcraft.yaml.in19
6 files changed, 34 insertions, 3 deletions
diff --git a/snapcraft/README.snap_build.md b/snapcraft/README.snap_build.md
index b96612f53..f4a38e7f7 100644
--- a/snapcraft/README.snap_build.md
+++ b/snapcraft/README.snap_build.md
@@ -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
diff --git a/snapcraft/README.usage.md b/snapcraft/README.usage.md
index 6a0864c8c..7abc0f6de 100644
--- a/snapcraft/README.usage.md
+++ b/snapcraft/README.usage.md
@@ -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
index 000000000..e69de29bb
--- /dev/null
+++ b/snapcraft/defaults/pathd.conf.default
diff --git a/snapcraft/scripts/Makefile b/snapcraft/scripts/Makefile
index 0435b3bc5..5aedddcf6 100644
--- a/snapcraft/scripts/Makefile
+++ b/snapcraft/scripts/Makefile
@@ -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
index 000000000..6473c59d9
--- /dev/null
+++ b/snapcraft/scripts/pathd-service
@@ -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
+
diff --git a/snapcraft/snapcraft.yaml.in b/snapcraft/snapcraft.yaml.in
index 2c9154619..fca9652db 100644
--- a/snapcraft/snapcraft.yaml.in
+++ b/snapcraft/snapcraft.yaml.in
@@ -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: