aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Franke <nobody@nowhere.ws>2019-03-28 14:42:10 +0100
committerLeo <thinkabit.ukim@gmail.com>2019-07-24 10:30:05 -0300
commit2c49ce286bac1d18bd5399a47b2ac42724797b2f (patch)
tree2d7c20b567630c4f0364f081a73d83a36cf65c28
parent09b1dfa594b70f671500b12efef60e76a44cb996 (diff)
downloadaports-2c49ce286bac1d18bd5399a47b2ac42724797b2f.tar.bz2
aports-2c49ce286bac1d18bd5399a47b2ac42724797b2f.tar.xz
testing/frr: Update to 7.1
Insert myself as a maintainer. I have not heard from Arthur Jones for quite some time. Given that there has been no update to the package since August 2018 although upstream released two new major versions in the meantime, this package seems abandoned to me, so I hope this is acceptable. FRR should build and run fine on all architectures, so the package `arch` should not be limited to x86_64. While a small part of FRR's source is provided under the terms of the LGPL license, the resulting binary can only be distributed under the terms of the GPL, version 2.0 or (at the users option) any later version. Update the `license` field to reflect this. Starting from version 6.0, FRR requires libyang, so add it as a build time dependency. FRR has modules for integrating SNMP and RPKI. Add their dependencies as build time dependencies and package them as subpackages. Add `noarch` to those subpackages which do not contain any architecture specific files. FRR changed its statup script to `/usr/lib/frr/frrinit.sh` - propagate this change to the OpenRC wrapper script. `inet_ntop` in musl has been fixed to be standards compliant, so the patch `make-check-bypass-isisd-tlv.patch` is no longer needed. According to upstream the headers and shared libraries are not for consumption by external programs, so they should not be packaged as a `-dev` package.
-rw-r--r--testing/frr/APKBUILD93
-rwxr-xr-xtesting/frr/frr.initd13
-rw-r--r--testing/frr/make-check-bypass-isisd-tlv.patch49
3 files changed, 76 insertions, 79 deletions
diff --git a/testing/frr/APKBUILD b/testing/frr/APKBUILD
index c0b21c2a8e..9fa810862a 100644
--- a/testing/frr/APKBUILD
+++ b/testing/frr/APKBUILD
@@ -1,37 +1,39 @@
-# Maintainer: Arthur Jones <arthur.jones@riverbed.com>
+# Maintainer: Christian Franke <nobody@nowhere.ws>
pkgname=frr
-pkgver=5.0.1
-pkgrel=3
-pkgdesc="FRRouting is a fork of quagga"
+pkgver=7.1
+pkgrel=0
+pkgdesc="Free Range Routing is a fork of Quagga"
pkgusers="frr"
-pkggroups="frr"
+pkggroups="frr frrvty"
url="https://frrouting.org/"
-arch="x86_64"
-license="GPL-2.0-only and LGPL-2.1-only"
+arch="all"
+license="GPL-2.0-or-later"
depends="iproute2 bash"
makedepends="autoconf automake libtool
bsd-compat-headers
c-ares-dev
flex bison
json-c-dev
+ libyang-dev
linux-headers
+ net-snmp-dev
py-sphinx
python3-dev
readline-dev
+ rtrlib-dev
texinfo
"
checkdepends="pytest py-setuptools"
install="$pkgname.pre-install"
-subpackages="$pkgname-dev
- $pkgname-doc
- $pkgname-dbg
- $pkgname-openrc
- $pkgname-pythontools
+subpackages="$pkgname-dbg
+ $pkgname-doc::noarch
+ $pkgname-openrc::noarch
+ $pkgname-pythontools::noarch
+ $pkgname-rpki
+ $pkgname-snmp
"
source="https://github.com/FRRouting/frr/archive/$pkgname-$pkgver.tar.gz
- make-check-bypass-isisd-tlv.patch
- frr.initd
- "
+ frr.initd"
builddir="$srcdir"/$pkgname-$pkgname-$pkgver
_sysconfdir=/etc/frr
@@ -41,16 +43,31 @@ build() {
./bootstrap.sh
./configure \
--prefix=/usr \
+ --enable-exampledir=/usr/share/doc/frr/examples/ \
+ --localstatedir=/run/frr \
--sbindir=/usr/lib/frr \
--sysconfdir=$_sysconfdir \
- --libdir=/usr/lib \
- --localstatedir=/run/frr \
+ --libdir=/usr/lib/frr \
+ --with-moduledir=/usr/lib/frr/modules \
+ LIBTOOLFLAGS="-rpath /usr/lib/frr" \
+ --disable-dependency-tracking \
--enable-systemd=no \
- --enable-vtysh \
- --enable-multipath=64 \
- --enable-vty-group=frrvty \
+ --enable-rpki \
+ --with-libpam \
+ --enable-doc \
+ --enable-doc-html \
+ --enable-snmp \
+ --enable-fpm \
+ --disable-protobuf \
+ --disable-zeromq \
+ --enable-ospfapi \
+ --enable-bgp-vnc \
+ --enable-multipath=256 \
--enable-user=${pkgusers%% *} \
- --enable-group=${pkggroups%% *}
+ --enable-group=${pkggroups%% *} \
+ --enable-vty-group=frrvty \
+ --enable-configfile-mask=0640 \
+ --enable-logfile-mask=0640
make
}
@@ -63,10 +80,22 @@ package() {
cd "$builddir"
make DESTDIR="$pkgdir" install
+ # Remove development files, static libraries and headers.
+ # They are internal and should not be shipped as a package.
+ # Compare https://github.com/FRRouting/frr/blob/frr-7.0/debian/rules#L89
+ find "$pkgdir" -name '*.la' -o -name '*.a' -o -name 'lib*.so' | xargs rm -f
+ rm -rf "$pkgdir"/usr/include
+ rm -f "$pkgdir"/usr/lib/frr/ssd
+
+ # FRR currently installs two flavours of scripts for starting and stopping it.
+ # Remove the deprecated one.
+ rm -f "$pkgdir"/usr/lib/frr/frr
+ rm -f "$pkgdir"/usr/lib/frr/frr-reload
+
+ install -d "$pkgdir"$_sysconfdir
install -Dm644 "$builddir"/tools/etc/frr/daemons "$pkgdir"$_sysconfdir
- install -Dm644 "$builddir"/tools/etc/frr/daemons.conf "$pkgdir"$_sysconfdir
chown -R ${pkgusers%% *}:${pkggroups%% *} "$pkgdir"$_sysconfdir
- install -Dm755 "$srcdir"/frr.initd "$pkgdir"/etc/init.d/frr.initd
+ install -Dm755 "$srcdir"/frr.initd "$pkgdir"/etc/init.d/frr
}
pythontools() {
@@ -76,6 +105,18 @@ pythontools() {
mv "$pkgdir"/usr/lib/frr/frr-reload.py "$subpkgdir/usr/lib/frr"
}
-sha512sums="e2a3a4e21998f8c85b59fc971190d0b5340bbcd88356a637740ad8e564275b0df14da78b72a24a99a58435725cded1b9089814fc926a7a4080bd3a8762973548 frr-5.0.1.tar.gz
-3c679b857018d82443abd34823e712a8657a597b4210730d260e9796516982a137234354422cb439989985367531d600e205d3fb791cdb7b212425bb704c2016 make-check-bypass-isisd-tlv.patch
-9d2cfa95c3a79fa0da321319dcd6f439a267b69071233d4ad4b56f770eb9852c3c8b3be24c1e396701509a09eabb6ba618af6fa4a0a643bd37eeee7b6496a787 frr.initd"
+rpki() {
+ pkgdesc="$pkgdesc (BGP RPKI support)"
+ install -d "$subpkgdir/usr/lib/frr/modules"
+ mv "$pkgdir"/usr/lib/frr/modules/bgpd_rpki.so "$subpkgdir/usr/lib/frr/modules"
+}
+
+snmp() {
+ pkgdesc="$pkgdesc (net-snmp bindings)"
+ install -d "$subpkgdir/usr/lib/frr/modules"
+ mv "$pkgdir"/usr/lib/frr/modules/*_snmp.so "$subpkgdir/usr/lib/frr/modules"
+ mv "$pkgdir"/usr/lib/frr/libfrrsnmp.* "$subpkgdir/usr/lib/frr"
+}
+
+sha512sums="d1020607c4c142cc2895c514dcee232a6711a01e63e35a4005249fba9a2b491ebede6dfcfc8d1e885d9d93aff34c99aaced987141040f437eba6779007d06817 frr-7.1.tar.gz
+b495b2be9f2cbb065104ccc0c3474471e870b53ac62ed4fba40020c8d50866e637a99ef3d7af5de1018ff659c4757baac4f40d7648a9de99ed14db33c8992b54 frr.initd"
diff --git a/testing/frr/frr.initd b/testing/frr/frr.initd
index a6759a3f6e..ed908bbbbb 100755
--- a/testing/frr/frr.initd
+++ b/testing/frr/frr.initd
@@ -1,19 +1,24 @@
#!/sbin/openrc-run
description="FRRouting"
+extra_started_commands="reload"
start() {
- /usr/lib/frr/frr start
+ /usr/lib/frr/frrinit.sh start
}
stop() {
- /usr/lib/frr/frr stop
+ /usr/lib/frr/frrinit.sh stop
}
restart() {
- /usr/lib/frr/frr restart
+ /usr/lib/frr/frrinit.sh restart
}
status() {
- /usr/lib/frr/frr status
+ /usr/lib/frr/frrinit.sh status
+}
+
+reload() {
+ /usr/lib/frr/frrinit.sh reload
}
diff --git a/testing/frr/make-check-bypass-isisd-tlv.patch b/testing/frr/make-check-bypass-isisd-tlv.patch
deleted file mode 100644
index b7a73b353f..0000000000
--- a/testing/frr/make-check-bypass-isisd-tlv.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-commit f404be7c728ca3433bb4aeaeac5e3c450941de35
-Author: Arthur Jones <arthur.jones@riverbed.com>
-Date: Wed Jun 6 07:47:17 2018 -0700
-
- tests/isisd: bypass test_fuzz_isis_tlv when inet_ntop is broken
-
- On Alpine Linux edge, musl does not seem to be RFC 5952 4.2.2
- compliant (how to print a single :0: in the IPv6 address). Let's
- skip that test, as we get false negatives when running against
- that version of musl.
-
- Credit for the idea for the fix and how to fix it is due to
- chris@opensourcerouting.org.
-
- Testing done:
-
- make check on alpine linux passes now
-
- Issue: https://github.com/FRRouting/frr/issues/2375
- Signed-off-by: Arthur Jones <arthur.jones@riverbed.com>
-
-diff --git a/tests/isisd/test_fuzz_isis_tlv.py b/tests/isisd/test_fuzz_isis_tlv.py
-index bf700bfee..d96e3c4fe 100644
---- a/tests/isisd/test_fuzz_isis_tlv.py
-+++ b/tests/isisd/test_fuzz_isis_tlv.py
-@@ -2,10 +2,21 @@ import frrtest
-
- import pytest
- import platform
-+import socket
-
--if platform.uname()[0] == 'SunOS':
-+
-+##
-+# on musl, ntop compresses a single :0: -> :: which is against RFC
-+##
-+def inet_ntop_broken():
-+ addr = '1:2:3:4:0:6:7:8'
-+ return socket.inet_ntop(socket.AF_INET6,
-+ socket.inet_pton(socket.AF_INET6, addr)) != addr
-+
-+
-+if platform.uname()[0] == 'SunOS' or inet_ntop_broken():
- class TestFuzzIsisTLV:
-- @pytest.mark.skipif(True, reason='Test unsupported on SunOS')
-+ @pytest.mark.skipif(True, reason='Test unsupported')
- def test_exit_cleanly(self):
- pass
- else: