diff options
author | Konstantin Shalygin | 2017-02-04 22:24:18 +0700 |
---|---|---|
committer | Konstantin Shalygin | 2017-02-04 22:24:18 +0700 |
commit | fac9024c43c952ef30addd0d2846350cfc66432a (patch) | |
tree | 88d82fba2d77f9d363cb793df5579289fbb45ec9 | |
download | aur-fac9024c43c952ef30addd0d2846350cfc66432a.tar.gz |
Initial commit
-rw-r--r-- | .SRCINFO | 37 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | PKGBUILD | 82 | ||||
-rw-r--r-- | frr.sysusers | 1 | ||||
-rw-r--r-- | frr.tmpfiles | 3 | ||||
-rw-r--r-- | frr_systemd_arch.patch | 189 |
6 files changed, 316 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..a5eaa71b37db --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,37 @@ +# Generated by mksrcinfo v8 +# Sat Feb 4 15:24:03 UTC 2017 +pkgbase = frr + pkgdesc = FreeRangeRouting (quagga fork) supports BGP4/OSPF/RIP/PIM-SM/MSDP and LDP as well as very early support for IS-IS. + pkgver = 2.0_rc1.5113.1b4ae82d + pkgrel = 1 + url = https://github.com/freerangerouting/frr + arch = any + license = GPL2 + makedepends = git + makedepends = patch + makedepends = gcc + makedepends = grep + makedepends = net-snmp + makedepends = json-c + depends = libcap + depends = libnl + depends = readline + depends = ncurses + depends = perl + depends = json-c + depends = net-snmp + provides = quagga + provides = quagga_cumulus + conflicts = quagga + conflicts = quagga_cumulus + source = frr::git+https://github.com/freerangerouting/frr + source = frr.sysusers + source = frr.tmpfiles + source = frr_systemd_arch.patch + sha256sums = SKIP + sha256sums = 3cea17f98f4091ec8b55a482ef094abaf5e254fd50ddbdad8d83fffd52e2fcd1 + sha256sums = 6f8dd86ef9c600763faead3052908531e8dc8ef67058e6f7f8da01bf0fe4eb89 + sha256sums = 85f3396b49e3a3c84c344ee548bb2d185152356ca8a7bdcb5a850dc2e477665d + +pkgname = frr + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..131022867403 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +pkg/* +src/* +*.tar.* +frr/* diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..6f0526cca575 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,82 @@ +# Maintainer: Shalygin Konstantin <k0ste@k0ste.ru> +# Contributor: Shalygin Konstantin <k0ste@k0ste.ru> + +pkgname='frr' +pkgver=2.0_rc1.5113.1b4ae82d +pkgrel=1 +pkgdesc='FreeRangeRouting (quagga fork) supports BGP4/OSPF/RIP/PIM-SM/MSDP and LDP as well as very early support for IS-IS.' +arch=('any') +url="https://github.com/freerangerouting/${pkgname}" +license=('GPL2') +depends=('libcap' 'libnl' 'readline' 'ncurses' 'perl' 'json-c' 'net-snmp') +makedepends=('git' 'patch' 'gcc' 'grep' 'net-snmp' 'json-c') +conflicts=("quagga" "quagga_cumulus") +provides=("quagga" "quagga_cumulus") +source=("${pkgname}::git+${url}" + "${pkgname}.sysusers" + "${pkgname}.tmpfiles" + "${pkgname}_systemd_arch.patch") +sha256sums=('SKIP' + '3cea17f98f4091ec8b55a482ef094abaf5e254fd50ddbdad8d83fffd52e2fcd1' + '6f8dd86ef9c600763faead3052908531e8dc8ef67058e6f7f8da01bf0fe4eb89' + '85f3396b49e3a3c84c344ee548bb2d185152356ca8a7bdcb5a850dc2e477665d') + +pkgver() { + cd "${srcdir}/${pkgname}" + git checkout stable/2.0 >/dev/null 2>&1 + package_version=`gawk 'match($0, /^(AC_INIT)\((frr)\,\s([a-z0-9\-.]+)(.*)$/, a) {print a[3]}' configure.ac` + git_num=`git log --pretty=oneline | wc -l | tr -d '[[:space:]]'` + git_tag=`git log -1 --format=%h` + echo -e "${package_version}.${git_num}.${git_tag}" | sed -e 's:v::' -e 's|-|_|g' +} + +prepare() { + cd "${srcdir}/${pkgname}" + git checkout stable/2.0 + patch -p1 -i "${srcdir}/${pkgname}_systemd_arch.patch" + + autoreconf -fvi + ./configure \ + --prefix="/usr" \ + --sbindir="/usr/bin" \ + --sysconfdir="/etc/${pkgname}" \ + --localstatedir="/run/${pkgname}" \ + --enable-exampledir="/usr/share/doc/${pkgname}/examples" \ + --enable-ldpd \ + --disable-watchfrr \ + --enable-snmp \ + --enable-tcp-zebra \ + --enable-multipath=256 \ + --enable-user="${pkgname}" \ + --enable-group="${pkgname}" \ + --enable-vty-group="${pkgname}vty" \ + --enable-configfile-mask="0640" \ + --enable-logfile-mask="0640" \ + --enable-shell-access \ + --enable-pcreposix \ + --enable-systemd \ + --enable-poll +} + +build() { + cd "${srcdir}/${pkgname}" + make +} + +package() { + cd "${srcdir}/${pkgname}" + make DESTDIR="${pkgdir}" install + + cd "redhat" + sed -ri 's|/var/run/frr|/run/frr|g' "${pkgname}.logrotate" + install -Dm0644 "${pkgname}.logrotate" "${pkgdir}/etc/logrotate.d/${pkgname}" + + for d in zebra ripd ripngd bgpd ospfd ospfd-instance@ ospf6d isisd pimd ldpd; do + install -Dm0644 ${d}.service "${pkgdir}/usr/lib/systemd/system/${d}.service" + done + + install -Dm0644 "${srcdir}/${pkgname}.tmpfiles" "${pkgdir}/usr/lib/tmpfiles.d/${pkgname}.conf" + install -Dm0644 "${srcdir}/${pkgname}.sysusers" "${pkgdir}/usr/lib/sysusers.d/${pkgname}.conf" + rm -rfv "${pkgdir}/usr/bin/${pkgname}" + rm -rfv "${pkgdir}/usr/bin/${pkgname}-reload.py" +} diff --git a/frr.sysusers b/frr.sysusers new file mode 100644 index 000000000000..72a04b48aa6f --- /dev/null +++ b/frr.sysusers @@ -0,0 +1 @@ +u frr - - /run/frr diff --git a/frr.tmpfiles b/frr.tmpfiles new file mode 100644 index 000000000000..8a0fdb57b978 --- /dev/null +++ b/frr.tmpfiles @@ -0,0 +1,3 @@ +d /etc/frr 0750 frr frr +d /var/log/frr 0750 frr frr +d /run/frr 0750 frr frr diff --git a/frr_systemd_arch.patch b/frr_systemd_arch.patch new file mode 100644 index 000000000000..20f2b58d82ad --- /dev/null +++ b/frr_systemd_arch.patch @@ -0,0 +1,189 @@ +diff -Naupr frr_orig/redhat/bgpd.service frr/redhat/bgpd.service +--- frr_orig/redhat/bgpd.service 1970-01-01 07:00:00.000000000 +0700 ++++ frr/redhat/bgpd.service 2017-02-04 21:44:22.399171740 +0700 +@@ -0,0 +1,15 @@ ++[Unit] ++Description=BGP routing daemon ++Documentation=man:bgpd(8) man:zebra(8) ++BindTo=zebra.service ++After=network.target zebra.service ++ ++[Service] ++Type=forking ++PIDFile=/run/frr/bgpd.pid ++ExecStart=/usr/bin/bgpd -d ++ExecReload=/bin/kill -HUP $MAINPID ++Restart=on-abort ++ ++[Install] ++WantedBy=multi-user.target +diff -Naupr frr_orig/redhat/isisd.service frr/redhat/isisd.service +--- frr_orig/redhat/isisd.service 1970-01-01 07:00:00.000000000 +0700 ++++ frr/redhat/isisd.service 2017-02-04 21:44:28.029195379 +0700 +@@ -0,0 +1,15 @@ ++[Unit] ++Description=IS-IS routing daemon ++Documentation=man:isis(8) man:zebra(8) ++BindTo=zebra.service ++After=network.target zebra.service ++ ++[Service] ++Type=forking ++PIDFile=/run/frr/isisd.pid ++ExecStart=/usr/bin/isisd -d ++ExecReload=/bin/kill -HUP $MAINPID ++Restart=on-abort ++ ++[Install] ++WantedBy=multi-user.target +diff -Naupr frr_orig/redhat/ldpd.service frr/redhat/ldpd.service +--- frr_orig/redhat/ldpd.service 1970-01-01 07:00:00.000000000 +0700 ++++ frr/redhat/ldpd.service 2017-02-04 21:44:14.649139198 +0700 +@@ -0,0 +1,15 @@ ++[Unit] ++Description=LDP engine ++Documentation=man:ldpd(8) man:zebra(8) ++BindTo=zebra.service ++After=network.target zebra.service ++ ++[Service] ++Type=forking ++PIDFile=/run/frr/ldpd.pid ++ExecStart=/usr/bin/ldpd -d ++ExecReload=/bin/kill -HUP $MAINPID ++Restart=on-abort ++ ++[Install] ++WantedBy=multi-user.target +diff -Naupr frr_orig/redhat/ospf6d.service frr/redhat/ospf6d.service +--- frr_orig/redhat/ospf6d.service 1970-01-01 07:00:00.000000000 +0700 ++++ frr/redhat/ospf6d.service 2017-02-04 21:44:34.375888694 +0700 +@@ -0,0 +1,15 @@ ++[Unit] ++Description=OSPF routing daemon for IPv6 ++Documentation=man:ospfd(8) man:zebra(8) ++BindTo=zebra.service ++After=network.target zebra.service ++ ++[Service] ++Type=forking ++PIDFile=/run/frr/ospf6d.pid ++ExecStart=/usr/bin/ospf6d -d ++ExecReload=/bin/kill -HUP $MAINPID ++Restart=on-abort ++ ++[Install] ++WantedBy=multi-user.target +diff -Naupr frr_orig/redhat/ospfd-instance@.service frr/redhat/ospfd-instance@.service +--- frr_orig/redhat/ospfd-instance@.service 1970-01-01 07:00:00.000000000 +0700 ++++ frr/redhat/ospfd-instance@.service 2017-02-04 21:44:38.465905867 +0700 +@@ -0,0 +1,15 @@ ++[Unit] ++Description=OSPF routing daemon instance %i ++Documentation=man:ospfd(8) man:zebra(8) ++BindTo=zebra.service ++After=network.target zebra.service ospfd.service ++ ++[Service] ++Type=forking ++PIDFile=/run/frr/ospfd-%i.pid ++ExecStart=/usr/bin/ospfd -n %i -d ++ExecReload=/bin/kill -HUP $MAINPID ++Restart=on-abort ++ ++[Install] ++WantedBy=multi-user.target +diff -Naupr frr_orig/redhat/ospfd.service frr/redhat/ospfd.service +--- frr_orig/redhat/ospfd.service 1970-01-01 07:00:00.000000000 +0700 ++++ frr/redhat/ospfd.service 2017-02-04 21:44:41.415918254 +0700 +@@ -0,0 +1,15 @@ ++[Unit] ++Description=OSPF routing daemon ++Documentation=man:ospfd(8) man:zebra(8) ++BindTo=zebra.service ++After=network.target zebra.service ++ ++[Service] ++Type=forking ++PIDFile=/run/frr/ospfd.pid ++ExecStart=/usr/bin/ospfd -d ++ExecReload=/bin/kill -HUP $MAINPID ++Restart=on-abort ++ ++[Install] ++WantedBy=multi-user.target +diff -Naupr frr_orig/redhat/pimd.service frr/redhat/pimd.service +--- frr_orig/redhat/pimd.service 1970-01-01 07:00:00.000000000 +0700 ++++ frr/redhat/pimd.service 2017-02-04 21:45:14.026054971 +0700 +@@ -0,0 +1,14 @@ ++[Unit] ++Description=PIM multicast routing engine ++Documentation=man:pimd(8) man:zebra(8) ++BindTo=zebra.service ++After=network.target zebra.service ++ ++[Service] ++Type=forking ++PIDFile=/run/frr/pimd.pid ++ExecStart=/usr/sbin/pimd -d ++Restart=on-abort ++ ++[Install] ++WantedBy=multi-user.target +diff -Naupr frr_orig/redhat/ripd.service frr/redhat/ripd.service +--- frr_orig/redhat/ripd.service 1970-01-01 07:00:00.000000000 +0700 ++++ frr/redhat/ripd.service 2017-02-04 21:45:16.656065993 +0700 +@@ -0,0 +1,15 @@ ++[Unit] ++Description=RIP routing daemon ++Documentation=man:ripd(8) man:zebra(8) ++BindTo=zebra.service ++After=network.target zebra.service ++ ++[Service] ++Type=forking ++PIDFile=/run/frr/ripd.pid ++ExecStart=/usr/bin/ripd -d ++ExecReload=/bin/kill -HUP $MAINPID ++Restart=on-abort ++ ++[Install] ++WantedBy=multi-user.target +diff -Naupr frr_orig/redhat/ripngd.service frr/redhat/ripngd.service +--- frr_orig/redhat/ripngd.service 1970-01-01 07:00:00.000000000 +0700 ++++ frr/redhat/ripngd.service 2017-02-04 21:47:08.866535951 +0700 +@@ -0,0 +1,15 @@ ++[Unit] ++Description=RIP routing daemon for IPv6 ++Documentation=man:ripngd(8) man:zebra(8) ++BindTo=zebra.service ++After=network.target zebra.service ++ ++[Service] ++Type=forking ++PIDFile=/run/frr/ripngd.pid ++ExecStart=/usr/bin/ripngd -d ++ExecReload=/bin/kill -HUP $MAINPID ++Restart=on-abort ++ ++[Install] ++WantedBy=multi-user.target +diff -Naupr frr_orig/redhat/zebra.service frr/redhat/zebra.service +--- frr_orig/redhat/zebra.service 1970-01-01 07:00:00.000000000 +0700 ++++ frr/redhat/zebra.service 2017-02-04 21:47:15.876565302 +0700 +@@ -0,0 +1,15 @@ ++[Unit] ++Description=GNU Zebra routing manager ++Documentation=man:zebra(8) ++After=network.target ++ ++[Service] ++Type=forking ++PIDFile=/run/frr/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 |