summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO50
-rw-r--r--.gitignore3
-rw-r--r--PKGBUILD97
-rw-r--r--babeld.service16
-rw-r--r--bgpd.service16
-rw-r--r--isisd.service16
-rw-r--r--ospf6d.service16
-rw-r--r--ospfd-instance@.service16
-rw-r--r--ospfd.service16
-rw-r--r--pimd.service15
-rw-r--r--quagga-CumulusNetworks-2.5.6_json-c.patch33
-rw-r--r--quagga.install13
-rw-r--r--quagga.sysusers1
-rw-r--r--quagga.tmpfiles3
-rw-r--r--ripd.service16
-rw-r--r--ripngd.service16
-rw-r--r--zebra.service16
17 files changed, 359 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..db3a5be28b8
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,50 @@
+# Generated by mksrcinfo v8
+# Tue Jun 14 04:43:52 UTC 2016
+pkgbase = quagga_cumulus
+ pkgdesc = Routing daemon suite with Cumulus Network patches. Support Multi-Instance OSPF.
+ pkgver = 0.99.23.1
+ pkgrel = 1
+ url = https://github.com/CumulusNetworks/quagga
+ install = quagga.install
+ arch = i686
+ arch = x86_64
+ license = GPL2
+ depends = libcap
+ depends = libnl
+ depends = readline
+ depends = ncurses
+ depends = perl
+ depends = json-c
+ provides = quagga
+ conflicts = quagga
+ source = https://github.com/CumulusNetworks/quagga/archive/CumulusNetworks/2.5.6.tar.gz
+ source = quagga.sysusers
+ source = quagga.tmpfiles
+ source = babeld.service
+ source = bgpd.service
+ source = isisd.service
+ source = ospf6d.service
+ source = ospfd-instance@.service
+ source = ospfd.service
+ source = pimd.service
+ source = ripd.service
+ source = ripngd.service
+ source = zebra.service
+ source = quagga-CumulusNetworks-2.5.6_json-c.patch
+ sha256sums = daa2b3bb9515dabc5ad5fdc159b3739f8aadf7b966cc61989617178fb3def000
+ sha256sums = b531818654f9656c6a07127707785e55f7b3bd14568849e2f63c8f8e761223d0
+ sha256sums = 4debff53306539b79d8e3e08844081a388f1897cee20bf2bc84e0efaff40fd9b
+ sha256sums = 105b8eac3c7d7dc2f1fffa382a2d9d6bf86182c9462708465a5d7216e2be41bd
+ sha256sums = bbb2dd1568f9711686e06aaff900eeda213e25cfb0e8fef7a8490cfdb3e88ee9
+ sha256sums = 94fb9b041cf38c3a48d208cf07d72a35f2fc0816fb6ca1c07df917d79f94445b
+ sha256sums = c860839456435531b552c4f34265a74cbadd0a4ce38002f2ef95eb30bd42e498
+ sha256sums = 75a8575fea45a275b9193d5dc4c2d6542e456591ae261d96b687740ff5990c3f
+ sha256sums = 5beb572614bdbf7df727f145c24b93e378d20ca85a7849e6e40a291849cec44f
+ sha256sums = 000e1d76067bebe0743bda670d2cbcd5b561e29985c8829366c77e0a5fe86d54
+ sha256sums = 802df30eb809cda5f491e90442d06e7f939c54131f22969011b93937feb4b523
+ sha256sums = 4ffca2fbde6a6beacd3860adc582bc0d63da6761eb8906ec4f7c15ce5096a78e
+ sha256sums = 95cee83175150f4c5e96a3561478428bae55ad4adc599352993de219e2084066
+ sha256sums = 8a41060483d3b3b8645ffb18519efc3799c7819d1cfedc12c33eeb72483bd312
+
+pkgname = quagga_cumulus
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..7c6927b4669
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+pkg/*
+src/*
+*.tar.*
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..186663aeef8
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,97 @@
+# Maintainer: Konstantin Shalygin <k0ste@k0ste.ru>
+# Contributor: Konstantin Shalygin <k0ste@k0ste.ru>
+
+_ver='2.5.6'
+_quagga='quagga'
+_cumulus='CumulusNetworks'
+pkgname="${_quagga}_cumulus"
+pkgver='0.99.23.1'
+pkgrel='1'
+pkgdesc="Routing daemon suite with Cumulus Network patches. Support Multi-Instance OSPF."
+arch=('i686' 'x86_64')
+url="https://github.com/${_cumulus}/${_quagga}"
+license=('GPL2')
+depends=('libcap' 'libnl' 'readline' 'ncurses' 'perl' 'json-c')
+conflicts=("${_quagga}")
+provides=("${_quagga}")
+install="${_quagga}.install"
+source=("${url}/archive/${_cumulus}/${_ver}.tar.gz"
+ "${_quagga}.sysusers"
+ "${_quagga}.tmpfiles"
+ "babeld.service"
+ "bgpd.service"
+ "isisd.service"
+ "ospf6d.service"
+ "ospfd-instance@.service"
+ "ospfd.service"
+ "pimd.service"
+ "ripd.service"
+ "ripngd.service"
+ "zebra.service"
+ "${_quagga}-${_cumulus}-${_ver}_json-c.patch")
+sha256sums=('daa2b3bb9515dabc5ad5fdc159b3739f8aadf7b966cc61989617178fb3def000'
+ 'b531818654f9656c6a07127707785e55f7b3bd14568849e2f63c8f8e761223d0'
+ '4debff53306539b79d8e3e08844081a388f1897cee20bf2bc84e0efaff40fd9b'
+ '105b8eac3c7d7dc2f1fffa382a2d9d6bf86182c9462708465a5d7216e2be41bd'
+ 'bbb2dd1568f9711686e06aaff900eeda213e25cfb0e8fef7a8490cfdb3e88ee9'
+ '94fb9b041cf38c3a48d208cf07d72a35f2fc0816fb6ca1c07df917d79f94445b'
+ 'c860839456435531b552c4f34265a74cbadd0a4ce38002f2ef95eb30bd42e498'
+ '75a8575fea45a275b9193d5dc4c2d6542e456591ae261d96b687740ff5990c3f'
+ '5beb572614bdbf7df727f145c24b93e378d20ca85a7849e6e40a291849cec44f'
+ '000e1d76067bebe0743bda670d2cbcd5b561e29985c8829366c77e0a5fe86d54'
+ '802df30eb809cda5f491e90442d06e7f939c54131f22969011b93937feb4b523'
+ '4ffca2fbde6a6beacd3860adc582bc0d63da6761eb8906ec4f7c15ce5096a78e'
+ '95cee83175150f4c5e96a3561478428bae55ad4adc599352993de219e2084066'
+ '8a41060483d3b3b8645ffb18519efc3799c7819d1cfedc12c33eeb72483bd312')
+
+prepare() {
+ cd "${_quagga}-${_cumulus}-${_ver}"
+
+ # json in Debian = json-c in Arch
+ patch -p1 -i "${srcdir}/${_quagga}-${_cumulus}-${_ver}_json-c.patch"
+}
+build() {
+ cd "${_quagga}-${_cumulus}-${_ver}"
+
+ autoreconf -i
+ ./configure \
+ --prefix=/usr \
+ --sbindir=/usr/bin \
+ --sysconfdir=/etc/quagga \
+ --localstatedir=/run/quagga \
+ --enable-exampledir=/usr/share/doc/quagga/examples \
+ --enable-vtysh \
+ --enable-isisd \
+ --enable-isis-topology \
+ --enable-netlink \
+ --enable-tcp-zebra \
+ --enable-irdp \
+ --enable-pcreposix \
+ --enable-multipath=64 \
+ --enable-user=quagga \
+ --enable-group=quagga \
+ --enable-configfile-mask=0640 \
+ --enable-logfile-mask=0640 \
+ --enable-ospf-te \
+ --enable-opaque-lsa \
+ --enable-systemd=yes \
+ --enable-poll=yes
+ make
+}
+
+package() {
+ pushd "${_quagga}-${_cumulus}-${_ver}"
+ make DESTDIR="${pkgdir}" install
+
+ install -Dm644 "redhat/${_quagga}.logrotate" "$pkgdir/etc/logrotate.d/${_quagga}"
+ sed -ri 's|/var/run/quagga|/run/quagga|g' "$pkgdir/etc/logrotate.d/${_quagga}"
+
+ pushd "${srcdir}"
+ install -d -m 755 "${pkgdir}"/usr/lib/{systemd/system,tmpfiles.d,sysusers.d}
+ for d in zebra ripd ripngd bgpd ospfd ospfd-instance@ ospf6d isisd babeld pimd; do
+ install -D -m 644 ${d}.service "${pkgdir}/usr/lib/systemd/system/${d}.service"
+ done
+ install -D -m 644 "${_quagga}.tmpfiles" "${pkgdir}/usr/lib/tmpfiles.d/${_quagga}.conf"
+ install -D -m 644 "${_quagga}.sysusers" "${pkgdir}/usr/lib/sysusers.d/${_quagga}.conf"
+ popd
+}
diff --git a/babeld.service b/babeld.service
new file mode 100644
index 00000000000..7279f0336a8
--- /dev/null
+++ b/babeld.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=Babel routing daemon
+Documentation=man:zebra(8)
+BindTo=zebra.service
+After=network.target zebra.service
+ConditionPathExists=/etc/quagga/babeld.conf
+
+[Service]
+Type=forking
+PIDFile=/run/quagga/babeld.pid
+ExecStart=/usr/bin/babeld -d
+ExecReload=/bin/kill -HUP $MAINPID
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target
diff --git a/bgpd.service b/bgpd.service
new file mode 100644
index 00000000000..b0bf1db0fef
--- /dev/null
+++ b/bgpd.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=BGP routing daemon
+Documentation=man:bgpd(8) man:zebra(8)
+BindTo=zebra.service
+After=network.target zebra.service
+ConditionPathExists=/etc/quagga/bgpd.conf
+
+[Service]
+Type=forking
+PIDFile=/run/quagga/bgpd.pid
+ExecStart=/usr/bin/bgpd -d
+ExecReload=/bin/kill -HUP $MAINPID
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target
diff --git a/isisd.service b/isisd.service
new file mode 100644
index 00000000000..5ad16c1a485
--- /dev/null
+++ b/isisd.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=IS-IS routing daemon
+Documentation=man:isis(8) man:zebra(8)
+BindTo=zebra.service
+After=network.target zebra.service
+ConditionPathExists=/etc/quagga/isisd.conf
+
+[Service]
+Type=forking
+PIDFile=/run/quagga/isisd.pid
+ExecStart=/usr/bin/isisd -d
+ExecReload=/bin/kill -HUP $MAINPID
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target
diff --git a/ospf6d.service b/ospf6d.service
new file mode 100644
index 00000000000..dae3dc322fa
--- /dev/null
+++ b/ospf6d.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=OSPF routing daemon for IPv6
+Documentation=man:ospfd(8) man:zebra(8)
+BindTo=zebra.service
+After=network.target zebra.service
+ConditionPathExists=/etc/quagga/ospf6d.conf
+
+[Service]
+Type=forking
+PIDFile=/run/quagga/ospf6d.pid
+ExecStart=/usr/bin/ospf6d -d
+ExecReload=/bin/kill -HUP $MAINPID
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target
diff --git a/ospfd-instance@.service b/ospfd-instance@.service
new file mode 100644
index 00000000000..d015d3a2e9c
--- /dev/null
+++ b/ospfd-instance@.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=OSPF routing daemon instance %i
+Documentation=man:ospfd(8) man:zebra(8)
+BindTo=zebra.service
+After=network.target zebra.service
+ConditionPathExists=/etc/quagga/ospfd-%i.conf
+
+[Service]
+Type=forking
+PIDFile=/run/quagga/ospfd-%i.pid
+ExecStart=/usr/bin/ospfd -n %i -d
+ExecReload=/bin/kill -HUP $MAINPID
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target
diff --git a/ospfd.service b/ospfd.service
new file mode 100644
index 00000000000..e43c474ccd3
--- /dev/null
+++ b/ospfd.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=OSPF routing daemon
+Documentation=man:ospfd(8) man:zebra(8)
+BindTo=zebra.service
+After=network.target zebra.service
+ConditionPathExists=/etc/quagga/ospfd.conf
+
+[Service]
+Type=forking
+PIDFile=/run/quagga/ospfd.pid
+ExecStart=/usr/bin/ospfd -d
+ExecReload=/bin/kill -HUP $MAINPID
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target
diff --git a/pimd.service b/pimd.service
new file mode 100644
index 00000000000..72769563e0c
--- /dev/null
+++ b/pimd.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=PIM multicast routing engine
+Documentation=man:pimd(8) man:zebra(8)
+BindTo=zebra.service
+After=network.target zebra.service
+ConditionPathExists=/etc/quagga/pimd.conf
+
+[Service]
+Type=forking
+PIDFile=/run/quagga/pimd.pid
+ExecStart=/usr/sbin/pimd -d
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target
diff --git a/quagga-CumulusNetworks-2.5.6_json-c.patch b/quagga-CumulusNetworks-2.5.6_json-c.patch
new file mode 100644
index 00000000000..cf807ec675e
--- /dev/null
+++ b/quagga-CumulusNetworks-2.5.6_json-c.patch
@@ -0,0 +1,33 @@
+diff -Naupr quagga-CumulusNetworks-2.5.6_orig/configure.ac quagga-CumulusNetworks-2.5.6/configure.ac
+--- quagga-CumulusNetworks-2.5.6_orig/configure.ac 2016-02-19 07:25:28.000000000 +0600
++++ quagga-CumulusNetworks-2.5.6/configure.ac 2016-06-13 21:07:50.219963323 +0600
+@@ -49,7 +49,7 @@ dnl XXX add --pkgsrcrcdir to autoconf st
+ AC_SUBST(pkgsrcdir)
+ AC_SUBST(pkgsrcrcdir)
+
+-LIBS="$LIBS -L/usr/include/json/ -ljson"
++LIBS="$LIBS -L/usr/include/json-c/ -ljson-c"
+
+ dnl ------------
+ dnl Check CFLAGS
+diff -Naupr quagga-CumulusNetworks-2.5.6_orig/lib/json.h quagga-CumulusNetworks-2.5.6/lib/json.h
+--- quagga-CumulusNetworks-2.5.6_orig/lib/json.h 2016-02-19 07:25:28.000000000 +0600
++++ quagga-CumulusNetworks-2.5.6/lib/json.h 2016-06-13 21:07:35.103245812 +0600
+@@ -22,7 +22,7 @@
+ #ifndef _QUAGGA_JSON_H
+ #define _QUAGGA_JSON_H
+
+-#include <json/json.h>
++#include <json-c/json.h>
+
+ extern void json_object_string_add(struct json_object* obj, const char *key,
+ const char *s);
+diff -Naupr quagga-CumulusNetworks-2.5.6_orig/Makefile.am quagga-CumulusNetworks-2.5.6/Makefile.am
+--- quagga-CumulusNetworks-2.5.6_orig/Makefile.am 2016-02-19 07:25:28.000000000 +0600
++++ quagga-CumulusNetworks-2.5.6/Makefile.am 2016-06-13 21:07:58.493324483 +0600
+@@ -26,4 +26,4 @@ clean-local:
+ endif
+
+ ACLOCAL_AMFLAGS = -I m4
+-ACLOCAL_LDFLAGS = -ljson
++ACLOCAL_LDFLAGS = -ljson-c
diff --git a/quagga.install b/quagga.install
new file mode 100644
index 00000000000..247454599da
--- /dev/null
+++ b/quagga.install
@@ -0,0 +1,13 @@
+post_install() {
+ systemd-sysusers quagga.conf
+ systemd-tmpfiles --create quagga.conf
+}
+
+post_upgrade() {
+ systemctl daemon-reload
+}
+
+post_remove() {
+ systemctl daemon-reload
+ userdel quagga > /dev/null
+}
diff --git a/quagga.sysusers b/quagga.sysusers
new file mode 100644
index 00000000000..d3ff95c8148
--- /dev/null
+++ b/quagga.sysusers
@@ -0,0 +1 @@
+u quagga - - /run/quagga
diff --git a/quagga.tmpfiles b/quagga.tmpfiles
new file mode 100644
index 00000000000..89157600fdf
--- /dev/null
+++ b/quagga.tmpfiles
@@ -0,0 +1,3 @@
+d /etc/quagga 0750 quagga quagga
+d /var/log/quagga 0750 quagga quagga
+d /run/quagga 0750 quagga quagga
diff --git a/ripd.service b/ripd.service
new file mode 100644
index 00000000000..a55498100e9
--- /dev/null
+++ b/ripd.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=RIP routing daemon
+Documentation=man:ripd(8) man:zebra(8)
+BindTo=zebra.service
+After=network.target zebra.service
+ConditionPathExists=/etc/quagga/ripd.conf
+
+[Service]
+Type=forking
+PIDFile=/run/quagga/ripd.pid
+ExecStart=/usr/bin/ripd -d
+ExecReload=/bin/kill -HUP $MAINPID
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target
diff --git a/ripngd.service b/ripngd.service
new file mode 100644
index 00000000000..4990669d2d2
--- /dev/null
+++ b/ripngd.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=RIP routing daemon for IPv6
+Documentation=man:ripngd(8) man:zebra(8)
+BindTo=zebra.service
+After=network.target zebra.service
+ConditionPathExists=/etc/quagga/ripngd.conf
+
+[Service]
+Type=forking
+PIDFile=/run/quagga/ripngd.pid
+ExecStart=/usr/bin/ripngd -d
+ExecReload=/bin/kill -HUP $MAINPID
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target
diff --git a/zebra.service b/zebra.service
new file mode 100644
index 00000000000..02813c37c3d
--- /dev/null
+++ b/zebra.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=GNU Zebra routing manager
+Documentation=man:zebra(8)
+After=network.target
+ConditionPathExists=/etc/quagga/zebra.conf
+
+[Service]
+Type=forking
+PIDFile=/run/quagga/zebra.pid
+ExecStartPre=/sbin/ip route flush proto zebra
+ExecStart=/usr/bin/zebra -d
+ExecReload=/bin/kill -HUP $MAINPID
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target