]> git.proxmox.com Git - mirror_frr.git/commitdiff
snapcraft: Add snapcraft build and definition files
authorMartin Winter <mwinter@opensourcerouting.org>
Wed, 25 Jan 2017 21:23:43 +0000 (04:23 +0700)
committerMartin Winter <mwinter@opensourcerouting.org>
Wed, 25 Jan 2017 21:23:43 +0000 (04:23 +0700)
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
29 files changed:
Makefile.am
configure.ac
snapcraft/.gitignore [new file with mode: 0644]
snapcraft/Makefile.am [new file with mode: 0644]
snapcraft/README.snap_build.md [new file with mode: 0644]
snapcraft/README.usage.md [new file with mode: 0644]
snapcraft/defaults/bgpd.conf.default [new file with mode: 0644]
snapcraft/defaults/isisd.conf.default [new file with mode: 0644]
snapcraft/defaults/ldpd.conf.default [new file with mode: 0644]
snapcraft/defaults/ospf6d.conf.default [new file with mode: 0644]
snapcraft/defaults/ospfd.conf.default [new file with mode: 0644]
snapcraft/defaults/pimd.conf.default [new file with mode: 0644]
snapcraft/defaults/ripd.conf.default [new file with mode: 0644]
snapcraft/defaults/ripngd.conf.default [new file with mode: 0644]
snapcraft/defaults/vtysh.conf.default [new file with mode: 0644]
snapcraft/defaults/zebra.conf.default [new file with mode: 0644]
snapcraft/helpers/Makefile [new file with mode: 0644]
snapcraft/scripts/Makefile [new file with mode: 0644]
snapcraft/scripts/bgpd-service [new file with mode: 0644]
snapcraft/scripts/isisd-service [new file with mode: 0644]
snapcraft/scripts/ldpd-service [new file with mode: 0644]
snapcraft/scripts/ospf6d-service [new file with mode: 0644]
snapcraft/scripts/ospfd-service [new file with mode: 0644]
snapcraft/scripts/pimd-service [new file with mode: 0644]
snapcraft/scripts/ripd-service [new file with mode: 0644]
snapcraft/scripts/ripngd-service [new file with mode: 0644]
snapcraft/scripts/zebra-service [new file with mode: 0644]
snapcraft/setup/gui/icon.png [new file with mode: 0644]
snapcraft/snapcraft.yaml.in [new file with mode: 0644]

index d9b57a5eae9251fa36dc4b302c05868c487d3d4d..63dedeac06f9c7dbf0215ab55f4b3ee347e27d75 100644 (file)
@@ -3,11 +3,11 @@
 SUBDIRS = lib qpb fpm @ZEBRA@ @LIBRFP@ @RFPTEST@ \
         @BGPD@ @RIPD@ @RIPNGD@ @OSPFD@ @OSPF6D@ @LDPD@ \
          @ISISD@ @PIMD@ @WATCHFRR@ @VTYSH@ @OSPFCLIENT@ @DOC@ m4 @pkgsrcdir@ \
-         redhat @SOLARIS@ tests tools cumulus
+         redhat @SOLARIS@ tests tools cumulus snapcraft
 
 DIST_SUBDIRS = lib qpb fpm zebra bgpd ripd ripngd ospfd ospf6d ldpd \
          isisd watchfrr vtysh ospfclient doc m4 pkgsrc redhat tests \
-         solaris pimd @LIBRFP@ @RFPTEST@ tools cumulus
+         solaris pimd @LIBRFP@ @RFPTEST@ tools cumulus snapcraft
 
 EXTRA_DIST = aclocal.m4 SERVICES REPORTING-BUGS \
        update-autotools \
index 14f6292da599d6dc98eb997f9003c1462680a501..da22962577f5598872293c0604e8d14aa6aaa07f 100755 (executable)
@@ -483,6 +483,7 @@ dnl -----------------------------------
 if test "x${EXTRAVERSION}" != "x" ; then
   VERSION="${VERSION}${EXTRAVERSION}"
   PACKAGE_VERSION="${PACKAGE_VERSION}${EXTRAVERSION}"
+  AC_SUBST(PACKAGE_EXTRAVERSION, ["${EXTRAVERSION}"])
   PACKAGE_STRING="${PACKAGE_STRING}${EXTRAVERSION}"
 fi
 
@@ -1617,6 +1618,8 @@ AC_CONFIG_FILES([Makefile lib/Makefile qpb/Makefile zebra/Makefile ripd/Makefile
          pkgsrc/Makefile
          fpm/Makefile
          redhat/frr.spec 
+         snapcraft/Makefile
+         snapcraft/snapcraft.yaml
          lib/version.h
          doc/defines.texi
          doc/bgpd.8
diff --git a/snapcraft/.gitignore b/snapcraft/.gitignore
new file mode 100644 (file)
index 0000000..e050ff0
--- /dev/null
@@ -0,0 +1,6 @@
+snapcraft.yaml
+parts
+prime
+stage
+quagga*.snap
+!*/Makefile
diff --git a/snapcraft/Makefile.am b/snapcraft/Makefile.am
new file mode 100644 (file)
index 0000000..15813be
--- /dev/null
@@ -0,0 +1,11 @@
+EXTRA_DIST = snapcraft.yaml \
+   scripts/Makefile scripts/zebra-service scripts/bgpd-service \
+   scripts/isisd-service scripts/ripd-service scripts/ripngd-service \
+   scripts/ospf6d-service scripts/ospfd-service \
+   scripts/isisd-service scripts/pimd-service \
+   scripts/ldpd-service \
+   defaults/bgpd.conf.default defaults/isisd.conf.default \
+   defaults/ospf6d.conf.default defaults/ospfd.conf.default \
+   defaults/pimd.conf.default defaults/zebra.conf.default \
+   defaults/ripd.conf.default defaults/ripngd.conf.default \
+   defaults/ldpd.conf.default defaults/vtysh.conf.default
diff --git a/snapcraft/README.snap_build.md b/snapcraft/README.snap_build.md
new file mode 100644 (file)
index 0000000..341b210
--- /dev/null
@@ -0,0 +1,93 @@
+Building your own FreeRangeRouting Snap
+========================================
+(Tested on Ubuntu 16.04 with Snap Version 2, does not work on Ubuntu 15.x
+which uses earlier versions of snaps)
+
+1. Install snapcraft:
+
+        sudo apt-get install snapcraft
+       
+2. Checkout FreeRangeRouting under a **unpriviledged** user account
+
+        git clone https://github.com/freerangerouting/frr.git
+        cd frr
+
+3. Run Bootstrap and make distribution tar.gz
+
+        ./bootstrap.sh
+        ./configure --with-pkg-extra-version=-MySnapVersion
+        make dist
+                       
+    Note: configure parameters are not important for the Snap building,
+    except the `with-pkg-extra-version` if you want to give the Snap
+    a specific name to mark your own unoffical build
+
+    This will build `frr-something.tar.gz` - the distribution tar and 
+    the snapcraft/snapcraft.yaml with the matching version number
+
+4. Create snap
+
+        cd snapcraft
+        snapcraft
+
+    You should now end up with `frr_something.snap`
+
+Installing the snap 
+===================
+(This can be done on a different system)
+
+1. Install snapd
+
+        sudo apt-get install snapd
+
+2. Install self-built frr snap. (`--force-dangerous` is required to
+   install a unsigned self-built snap)
+
+        snap install --force-dangerous ./frr*.snap
+
+    Connect the priviledged `network-control` plug to the snap:
+
+        snap connect frr:network-control ubuntu-core:network-control
+
+DONE.
+
+The Snap will be auto-started and running. 
+
+Operations
+==========
+
+### FreeRangeRouting Daemons
+At this time, all FreeRangeRouting daemons are auto-started.
+
+A daemon can be stopped/started with (ie ospf6d)
+
+    systemctl stop snap.frr.ospf6d.service
+    systemctl start snap.frr.ospf6d.service
+
+or disabled/enabled with
+
+    systemctl disable snap.frr.ospf6d.service
+    systemctl enable snap.frr.ospf6d.service
+
+### FreeRangeRouting Commands
+All the commands are prefixed with frr.
+
+    frr.vtysh       -> vtysh
+    frr.version     -> Just gives version output (zebra --version)
+    frr.readme      -> Returns simple README with hints on using FRR
+
+    frr.bgpd-debug  -> Directly start each daemon (without service)
+    frr.isisd-debug
+    frr.ospf6d-debug
+    frr.ospfd-debug
+    frr.pimd-debug
+    frr.ripd-debug
+    frr.ripngd-debug
+    frr.ldp-debug
+    frr.zebra-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, a symlink 
+can be created:
+
+    sudo ln -s /snap/bin/frr.vtysh /usr/local/bin/vtysh
diff --git a/snapcraft/README.usage.md b/snapcraft/README.usage.md
new file mode 100644 (file)
index 0000000..2d2b32b
--- /dev/null
@@ -0,0 +1,77 @@
+Using the FreeRangeRouting Snap
+===============================
+
+After installing the Snap, the priviledged plug need to be connected:
+
+    snap connect frr:network-control ubuntu-core:network-control
+
+Enabling/Disabling FreeRangeRouting Daemons
+-------------------------------------------
+
+By default (at this time), all FreeRangeRouting daemons will be enabled
+on installation. If you want to disable a specific daemon, then use 
+the systemctl commands
+
+ie for `ospf6d` (OSPFv3):
+
+    systemctl disable snap.frr.ospf6d.service
+    systemctl enable snap.frr.ospf6d.service
+
+The daemons are: `ripd`, `ripngd`, `ospfd`, `ospf6d`, `isisd`, `bgpd`, 
+`pimd`, `zebra`
+
+Commands defined by this snap
+-----------------------------
+
+- `frr.vtysh`:
+       FreeRangeRouting VTY Shell (configuration tool)
+- `frr.version`:
+       Returns output of `zebra --version` to display version and configured 
+       options
+- `frr.readme`:
+       Returns this document `cat README_usage.md`
+
+and for debugging defined at this time (May get removed later - do not 
+depend on them). These are mainly intended to debug the Snap
+
+- `frr.zebra-debug`:
+       Starts zebra daemon in foreground
+- `frr.ripd-debug`:
+       Starts ripd daemon in foreground
+- `frr.ripngd-debug`:
+       Starts ripng daemon in foreground
+- `frr.ospfd-debug`:
+       Starts ospfd daemon in foreground
+- `frr.ospf6d-debug`:
+       Starts ospf6d daemon in foreground
+- `frr.isisd-debug`:
+       Starts isisd daemon in foreground
+- `frr.bgpd-debug`:
+       Starts bgpd daemon in foreground
+- `frr.pimd-debug`:
+       Starts pimd daemon in foreground
+- `frr.ldpd-debug`:
+    Starts ldpd daemon in foreground
+
+FAQ
+---
+- frr.vtysh displays `--MORE--` on long output. How to suppress this?
+    - Define `VTYSH_PAGER` to `cat` (default is `more`). (Ie add 
+      `export VTYSH_PAGER=cat` to the end of your `.profile`)
+
+Sourcecode available
+====================
+
+The source for this SNAP is available as part of the FreeRangeRouting
+Source Code Distribution. 
+
+    https://github.com/freerangerouting/frr.git
+
+Instructions for rebuilding the snap are in `README.snap_build.md`
+
+Feedback welcome
+================
+
+Please send Feedback about this snap to Martin Winter at 
+`mwinter@opensourcerouting.org`
+
diff --git a/snapcraft/defaults/bgpd.conf.default b/snapcraft/defaults/bgpd.conf.default
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/snapcraft/defaults/isisd.conf.default b/snapcraft/defaults/isisd.conf.default
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/snapcraft/defaults/ldpd.conf.default b/snapcraft/defaults/ldpd.conf.default
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/snapcraft/defaults/ospf6d.conf.default b/snapcraft/defaults/ospf6d.conf.default
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/snapcraft/defaults/ospfd.conf.default b/snapcraft/defaults/ospfd.conf.default
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/snapcraft/defaults/pimd.conf.default b/snapcraft/defaults/pimd.conf.default
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/snapcraft/defaults/ripd.conf.default b/snapcraft/defaults/ripd.conf.default
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/snapcraft/defaults/ripngd.conf.default b/snapcraft/defaults/ripngd.conf.default
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/snapcraft/defaults/vtysh.conf.default b/snapcraft/defaults/vtysh.conf.default
new file mode 100644 (file)
index 0000000..5c15e6b
--- /dev/null
@@ -0,0 +1 @@
+no service integrated-vtysh-config
diff --git a/snapcraft/defaults/zebra.conf.default b/snapcraft/defaults/zebra.conf.default
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/snapcraft/helpers/Makefile b/snapcraft/helpers/Makefile
new file mode 100644 (file)
index 0000000..c44bee7
--- /dev/null
@@ -0,0 +1,7 @@
+all:
+
+install:
+       install -D -m 0755 $(DESTDIR)/usr/bin/telnet.netkit $(DESTDIR)/bin/telnet
+       install -D -m 0755 $(DESTDIR)/usr/bin/traceroute.db $(DESTDIR)/bin/traceroute
+       install -D -m 0755 $(DESTDIR)/usr/bin/traceroute6.db $(DESTDIR)/bin/traceroute6
+
diff --git a/snapcraft/scripts/Makefile b/snapcraft/scripts/Makefile
new file mode 100644 (file)
index 0000000..00984c2
--- /dev/null
@@ -0,0 +1,14 @@
+all:
+
+install:
+       mkdir -p $(DESTDIR)/bin
+       install -D -m 0755 zebra-service $(DESTDIR)/bin/
+       install -D -m 0755 bgpd-service $(DESTDIR)/bin/
+       install -D -m 0755 ospfd-service $(DESTDIR)/bin/
+       install -D -m 0755 ospf6d-service $(DESTDIR)/bin/
+       install -D -m 0755 ripd-service $(DESTDIR)/bin/
+       install -D -m 0755 ripngd-service $(DESTDIR)/bin/
+       install -D -m 0755 isisd-service $(DESTDIR)/bin/
+       install -D -m 0755 pimd-service $(DESTDIR)/bin/
+       install -D -m 0755 ldpd-service $(DESTDIR)/bin/
+
diff --git a/snapcraft/scripts/bgpd-service b/snapcraft/scripts/bgpd-service
new file mode 100644 (file)
index 0000000..4072031
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e -x
+
+if ! [ -e $SNAP_DATA/bgpd.conf ]; then
+    cp $SNAP/etc/frr/bgpd.conf.default $SNAP_DATA/bgpd.conf
+fi
+exec $SNAP/sbin/bgpd \
+    -f $SNAP_DATA/bgpd.conf \
+    --pid_file $SNAP_DATA/bgpd.pid \
+    --socket $SNAP_DATA/zsock \
+    --vty_socket $SNAP_DATA
+
diff --git a/snapcraft/scripts/isisd-service b/snapcraft/scripts/isisd-service
new file mode 100644 (file)
index 0000000..aef92e9
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e -x
+
+if ! [ -e $SNAP_DATA/isisd.conf ]; then
+    cp $SNAP/etc/frr/isisd.conf.default $SNAP_DATA/isisd.conf
+fi
+exec $SNAP/sbin/isisd \
+    -f $SNAP_DATA/isisd.conf \
+    --pid_file $SNAP_DATA/isisd.pid \
+    --socket $SNAP_DATA/zsock \
+    --vty_socket $SNAP_DATA
+
diff --git a/snapcraft/scripts/ldpd-service b/snapcraft/scripts/ldpd-service
new file mode 100644 (file)
index 0000000..4c4a8eb
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+set -e -x
+
+if ! [ -e $SNAP_DATA/ldpd.conf ]; then
+    cp $SNAP/etc/frr/ldpd.conf.default $SNAP_DATA/ldpd.conf
+fi
+exec $SNAP/sbin/ldpd \
+    -f $SNAP_DATA/ldpd.conf \
+    --pid_file $SNAP_DATA/ldpd.pid \
+    --socket $SNAP_DATA/zsock \
+    --ctl_socket $SNAP_DATA \
+    --vty_socket $SNAP_DATA
+
diff --git a/snapcraft/scripts/ospf6d-service b/snapcraft/scripts/ospf6d-service
new file mode 100644 (file)
index 0000000..4dc3cb0
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e -x
+
+if ! [ -e $SNAP_DATA/ospf6d.conf ]; then
+    cp $SNAP/etc/frr/ospf6d.conf.default $SNAP_DATA/ospf6d.conf
+fi
+exec $SNAP/sbin/ospf6d \
+    -f $SNAP_DATA/ospf6d.conf \
+    --pid_file $SNAP_DATA/ospf6d.pid \
+    --socket $SNAP_DATA/zsock \
+    --vty_socket $SNAP_DATA
+
diff --git a/snapcraft/scripts/ospfd-service b/snapcraft/scripts/ospfd-service
new file mode 100644 (file)
index 0000000..7cac34b
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e -x
+
+if ! [ -e $SNAP_DATA/ospfd.conf ]; then
+    cp $SNAP/etc/frr/ospfd.conf.default $SNAP_DATA/ospfd.conf
+fi
+exec $SNAP/sbin/ospfd \
+    -f $SNAP_DATA/ospfd.conf \
+    --pid_file $SNAP_DATA/ospfd.pid \
+    --socket $SNAP_DATA/zsock \
+    --vty_socket $SNAP_DATA
+
diff --git a/snapcraft/scripts/pimd-service b/snapcraft/scripts/pimd-service
new file mode 100644 (file)
index 0000000..3ddd394
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e -x
+
+if ! [ -e $SNAP_DATA/pimd.conf ]; then
+    cp $SNAP/etc/frr/pimd.conf.default $SNAP_DATA/pimd.conf
+fi
+exec $SNAP/sbin/pimd \
+    -f $SNAP_DATA/pimd.conf \
+    --pid_file $SNAP_DATA/pimd.pid \
+    --socket $SNAP_DATA/zsock \
+    --vty_socket $SNAP_DATA
+
diff --git a/snapcraft/scripts/ripd-service b/snapcraft/scripts/ripd-service
new file mode 100644 (file)
index 0000000..f9959be
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e -x
+
+if ! [ -e $SNAP_DATA/ripd.conf ]; then
+    cp $SNAP/etc/frr/ripd.conf.default $SNAP_DATA/ripd.conf
+fi
+exec $SNAP/sbin/ripd \
+    -f $SNAP_DATA/ripd.conf \
+    --pid_file $SNAP_DATA/ripd.pid \
+    --socket $SNAP_DATA/zsock \
+    --vty_socket $SNAP_DATA
+
diff --git a/snapcraft/scripts/ripngd-service b/snapcraft/scripts/ripngd-service
new file mode 100644 (file)
index 0000000..bd06e6b
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e -x
+
+if ! [ -e $SNAP_DATA/ripngd.conf ]; then
+    cp $SNAP/etc/frr/ripngd.conf.default $SNAP_DATA/ripngd.conf
+fi
+exec $SNAP/sbin/ripngd \
+    -f $SNAP_DATA/ripngd.conf \
+    --pid_file $SNAP_DATA/ripngd.pid \
+    --socket $SNAP_DATA/zsock \
+    --vty_socket $SNAP_DATA
+
diff --git a/snapcraft/scripts/zebra-service b/snapcraft/scripts/zebra-service
new file mode 100644 (file)
index 0000000..9119a40
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+set -e -x
+
+if ! [ -e $SNAP_DATA/zebra.conf ]; then
+    cp $SNAP/etc/frr/zebra.conf.default $SNAP_DATA/zebra.conf
+fi
+if ! [ -e $SNAP_DATA/vtysh.conf ]; then
+    cp $SNAP/etc/frr/vtysh.conf.default $SNAP_DATA/vtysh.conf
+fi
+exec $SNAP/sbin/zebra \
+    -f $SNAP_DATA/zebra.conf \
+    --pid_file $SNAP_DATA/zebra.pid \
+    --socket $SNAP_DATA/zsock \
+    --vty_socket $SNAP_DATA
+
diff --git a/snapcraft/setup/gui/icon.png b/snapcraft/setup/gui/icon.png
new file mode 100644 (file)
index 0000000..e8f68e6
Binary files /dev/null and b/snapcraft/setup/gui/icon.png differ
diff --git a/snapcraft/snapcraft.yaml.in b/snapcraft/snapcraft.yaml.in
new file mode 100644 (file)
index 0000000..a703766
--- /dev/null
@@ -0,0 +1,235 @@
+name: frr
+version: @VERSION@
+summary: FreeRangeRouting BGP/OSPFv2/OSPFv3/ISIS/RIP/RIPng/PIM/LDP routing daemon
+description: BGP/OSPFv2/OSPFv3/ISIS/RIP/RIPng/PIM routing daemon
+ FreeRangeRouting (FRR) is free software which manages TCP/IP based routing 
+ protocols. It supports BGP4, BGP4+, OSPFv2, OSPFv3, IS-IS, RIPv1, RIPv2, 
+ RIPng, PIM and LDP as well as the IPv6 versions of these.
+ FreeRangeRouting (frr) is a fork of Quagga.
+confinement: strict
+grade: devel
+
+apps:
+    vtysh:
+        command: bin/vtysh --vty_socket $SNAP_DATA --config_dir $SNAP_DATA
+        plugs:
+            - network
+            - network-bind
+            - network-control
+    version:
+        command: sbin/zebra --version
+    readme:
+        command: bin/cat $SNAP/doc/README.usage.md
+    zebra:
+        command: bin/zebra-service
+        daemon: simple
+        plugs:
+            - network
+            - network-bind
+            - network-control
+    bgpd:
+        command: bin/bgpd-service
+        daemon: simple
+        plugs:
+            - network
+            - network-bind
+            - network-control
+    ospfd:
+        command: bin/ospfd-service
+        daemon: simple
+        plugs:
+            - network
+            - network-bind
+            - network-control
+    ospf6d:
+        command: bin/ospf6d-service
+        daemon: simple
+        plugs:
+            - network
+            - network-bind
+            - network-control
+    isisd:
+        command: bin/isisd-service
+        daemon: simple
+        plugs:
+            - network
+            - network-bind
+            - network-control
+    ripd:
+        command: bin/ripd-service
+        daemon: simple
+        plugs:
+            - network
+            - network-bind
+            - network-control
+    ripngd:
+        command: bin/ripngd-service
+        daemon: simple
+        plugs:
+            - network
+            - network-bind
+            - network-control
+    pimd:
+        command: bin/pimd-service
+        daemon: simple
+        plugs:
+            - network
+            - network-bind
+            - network-control
+    ldpd:
+        command: bin/ldpd-service
+        daemon: simple
+        plugs:
+            - network
+            - network-bind
+            - network-control
+    zebra-debug:
+        command: sbin/zebra -f $SNAP_DATA/zebra.conf --pid_file $SNAP_DATA/zebra.pid --socket $SNAP_DATA/zsock --vty_socket $SNAP_DATA
+        plugs:
+            - network
+            - network-bind
+            - network-control
+    bgpd-debug:
+        command: sbin/bgpd -f $SNAP_DATA/bgpd.conf --pid_file $SNAP_DATA/bgpd.pid --socket $SNAP_DATA/zsock --vty_socket $SNAP_DATA
+        plugs:
+            - network
+            - network-bind
+            - network-control
+    ospfd-debug:
+        command: sbin/ospfd -f $SNAP_DATA/ospfd.conf --pid_file $SNAP_DATA/ospfd.pid --socket $SNAP_DATA/zsock --vty_socket $SNAP_DATA
+        plugs:
+            - network
+            - network-bind
+            - network-control
+    ospf6d-debug:
+        command: sbin/ospf6d -f $SNAP_DATA/ospf6d.conf --pid_file $SNAP_DATA/ospf6d.pid --socket $SNAP_DATA/zsock --vty_socket $SNAP_DATA
+        plugs:
+            - network
+            - network-bind
+            - network-control
+    isisd-debug:
+        command: sbin/isisd -f $SNAP_DATA/isisd.conf --pid_file $SNAP_DATA/isisd.pid --socket $SNAP_DATA/zsock --vty_socket $SNAP_DATA
+        plugs:
+            - network
+            - network-bind
+            - network-control
+    ripd-debug:
+        command: sbin/ripd -f $SNAP_DATA/ripd.conf --pid_file $SNAP_DATA/ripd.pid --socket $SNAP_DATA/zsock --vty_socket $SNAP_DATA
+        plugs:
+            - network
+            - network-bind
+            - network-control
+    ripngd-debug:
+        command: sbin/ripngd -f $SNAP_DATA/ripngd.conf --pid_file $SNAP_DATA/ripngd.pid --socket $SNAP_DATA/zsock --vty_socket $SNAP_DATA
+        plugs:
+            - network
+            - network-bind
+            - network-control
+    pimd-debug:
+        command: sbin/pimd -f $SNAP_DATA/pimd.conf --pid_file $SNAP_DATA/pimd.pid --socket $SNAP_DATA/zsock --vty_socket $SNAP_DATA
+        plugs:
+            - network
+            - network-bind
+            - network-control
+    ldpd-debug:
+        command: sbin/ldpd -f $SNAP_DATA/pimd.conf --pid_file $SNAP_DATA/pimd.pid --socket $SNAP_DATA/zsock --ctl_socket $SNAP_DATA --vty_socket $SNAP_DATA
+        plugs:
+            - network
+            - network-bind
+            - network-control
+
+parts:
+    frr: 
+        build-packages: 
+           - autoconf
+           - automake
+           - libtool
+           - make
+           - gawk
+           - libreadline-dev
+           - texinfo
+           - dejagnu
+           - libncurses5-dev
+           - texlive-latex-base
+           - texlive-generic-recommended
+           - libcap-dev
+           - imagemagick
+           - ghostscript
+           - groff
+           - hardening-wrapper
+           - libpcre3-dev
+           - chrpath
+           - pkg-config
+           - libjson-c-dev
+        stage-packages:
+           - coreutils
+           - iproute2
+           - logrotate
+           - libcap2
+           - libc6
+           - libtinfo5
+           - libreadline6
+           - libjson-c2
+        plugin: autotools
+        source: ../frr-@PACKAGE_VERSION@.tar.gz
+        configflags:
+            - --with-cflags=-g
+            - --with-cflags=-O0
+            - --with-cflags=-std=gnu99
+            - --with-cflags=-fpie
+            - --with-cflags=-fno-omit-frame-pointer
+            - --with-cflags=-Wall
+            - --enable-vtysh
+            - --enable-isisd
+            - --enable-watchfrr
+            - --enable-ospfclient=yes
+            - --enable-ospfapi=yes
+            - --enable-multipath=64
+            - --enable-rtadv
+            - --enable-irdp
+            - --enable-gcc-rdynamic
+            - --enable-user=root
+            - --enable-group=root
+            - --enable-pimd
+            - --enable-ldpd
+            - --enable-configfile-mask=0640
+            - --enable-logfile-mask=0640 
+            - --localstatedir=/var/run
+            - --sbindir=/sbin
+            - --bindir=/bin
+            - --sysconfdir=/etc/frr
+            - --with-pkg-extra-version=@PACKAGE_EXTRAVERSION@
+    frr-defaults:
+        plugin: dump
+        source: defaults
+        organize:
+            zebra.conf.default: etc/frr/zebra.conf.default
+            bgpd.conf.default: etc/frr/bgpd.conf.default
+            isisd.conf.default: etc/frr/isisd.conf.default
+            ospf6d.conf.default: etc/frr/ospf6d.conf.default
+            ospfd.conf.default: etc/frr/ospfd.conf.default
+            pimd.conf.default: etc/frr/pimd.conf.default
+            ripd.conf.default: etc/frr/ripd.conf.default
+            ripngd.conf.default: etc/frr/ripngd.conf.default
+            ldpd.conf.default: etc/frr/ldpd.conf.default
+            vtysh.conf.default: etc/frr/vtysh.conf.default
+    frr-scripts:
+        plugin: make
+        source: scripts
+    helpers:
+        stage-packages:
+           - telnet
+           - traceroute
+        plugin: make
+        source: helpers
+        prime:
+           - bin/telnet
+           - bin/traceroute
+           - bin/traceroute6
+    docs:
+        plugin: dump
+        source: .
+        organize:
+            README.usage.md: doc/README.usage.md
+            README.snap_build.md: doc/README.snap_build.md
+