summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-protocols
diff options
context:
space:
mode:
authorYi Zhao <yi.zhao@windriver.com>2022-04-12 15:42:43 +0800
committerKhem Raj <raj.khem@gmail.com>2022-04-12 09:28:25 -0700
commitb420d9f2213c0c4aaf698fef5a4aa65f88c9d159 (patch)
treead441cae8cf4f6f9d20b947ee207ed11a93a5c13 /meta-networking/recipes-protocols
parent1888971b1fcff1e86be175c2aac724c28d2840ca (diff)
downloadmeta-openembedded-b420d9f2213c0c4aaf698fef5a4aa65f88c9d159.tar.gz
frr: add recipe
FRRouting (FRR) is a free and open source Internet routing protocol suite for Linux and Unix platforms. It implements BGP, OSPF, RIP, IS-IS, PIM, LDP, BFD, Babel, PBR, OpenFabric and VRRP, with alpha support for EIGRP and NHRP. FRRouting is a fork of Quagga. The main git lives on https://github.com/frrouting/frr.git Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-networking/recipes-protocols')
-rw-r--r--meta-networking/recipes-protocols/frr/frr/frr.pam13
-rw-r--r--meta-networking/recipes-protocols/frr/frr_8.2.2.bb121
2 files changed, 134 insertions, 0 deletions
diff --git a/meta-networking/recipes-protocols/frr/frr/frr.pam b/meta-networking/recipes-protocols/frr/frr/frr.pam
new file mode 100644
index 0000000000..3541a975ae
--- /dev/null
+++ b/meta-networking/recipes-protocols/frr/frr/frr.pam
@@ -0,0 +1,13 @@
1#
2# The PAM configuration file for the quagga `vtysh' service
3#
4
5# This allows root to change user infomation without being
6# prompted for a password
7auth sufficient pam_rootok.so
8
9# The standard Unix authentication modules, used with
10# NIS (man nsswitch) as well as normal /etc/passwd and
11# /etc/shadow entries.
12auth include common-auth
13
diff --git a/meta-networking/recipes-protocols/frr/frr_8.2.2.bb b/meta-networking/recipes-protocols/frr/frr_8.2.2.bb
new file mode 100644
index 0000000000..b1e2e55b52
--- /dev/null
+++ b/meta-networking/recipes-protocols/frr/frr_8.2.2.bb
@@ -0,0 +1,121 @@
1SUMMARY = "BGP/OSPF/RIP routing daemon"
2DESCRIPTION = "FRRouting is a free and open source Internet routing protocol suite for Linux \
3and Unix platforms. It implements BGP, OSPF, RIP, IS-IS, PIM, LDP, BFD, Babel, PBR, OpenFabric \
4and VRRP, with alpha support for EIGRP and NHRP."
5HOMEPAGE = "https://frrouting.org/"
6SECTION = "net"
7
8LICENSE = "GPL-2.0-only & LGPL-2.1-only"
9LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
10 file://COPYING-LGPLv2.1;md5=4fbd65380cdd255951079008b364516c"
11
12SRC_URI = "git://github.com/FRRouting/frr.git;protocol=https;branch=stable/8.2 \
13 file://frr.pam \
14 "
15
16SRCREV = "79188bf710e92acf42fb5b9b0a2e9593a5ee9b05"
17
18S = "${WORKDIR}/git"
19
20# Due to libyang not supported on these arches:
21COMPATIBLE_HOST:riscv32 = "null"
22COMPATIBLE_HOST:riscv64 = "null"
23COMPATIBLE_HOST:armv5 = "null"
24
25# Fail to build on mips64 with error:
26# Error: PC-relative reference to a different section
27COMPATIBLE_HOST:mips64 = "null"
28
29inherit autotools python3native pkgconfig useradd systemd
30
31DEPENDS:class-native = "bison-native elfutils-native"
32DEPENDS:class-target = "bison-native json-c readline c-ares libyang frr-native"
33
34RDEPENDS:${PN}:class-target = "iproute2 python3-core bash"
35
36PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}"
37PACKAGECONFIG:class-native = ""
38
39PACKAGECONFIG[pam] = "--with-libpam,--without-libpam,libpam"
40PACKAGECONFIG[grpc] = "--enable-grpc,--disable-grpc,grpc-native grpc"
41PACKAGECONFIG[snmp] = "--enable-snmp,--disable-snmp,net-snmp"
42PACKAGECONFIG[zeromq] = "--enable-zeromq,--disable-zeromq,zeromq"
43PACKAGECONFIG[protobuf] = "--enable-protobuf,--disable-protobuf,protobuf-c-native protobuf-c"
44PACKAGECONFIG[capabilities] = "--enable-capabilities,--disable-capabilities,libcap"
45PACKAGECONFIG[cumulus] = "--enable-cumulus,--disable-cumulus"
46PACKAGECONFIG[datacenter] = "--enable-datacenter,--disable-datacenter"
47PACKAGECONFIG[ospfclient] = "--enable-ospfapi --enable-ospfclient,--disable-ospfapi --disable-ospfclient"
48
49EXTRA_OECONF:class-native = "--enable-clippy-only"
50
51EXTRA_OECONF:class-target = "--sbindir=${libdir}/frr \
52 --sysconfdir=${sysconfdir}/frr \
53 --localstatedir=${localstatedir}/run/frr \
54 --enable-vtysh \
55 --enable-fpm \
56 --enable-multipath=64 \
57 --enable-user=frr \
58 --enable-group=frr \
59 --enable-vty-group=frrvty \
60 --enable-configfile-mask=0640 \
61 --enable-logfile-mask=0640 \
62 --disable-doc \
63 --with-clippy=${RECIPE_SYSROOT_NATIVE}/usr/lib/clippy \
64 "
65
66LDFLAGS:append:mips = " -latomic"
67LDFLAGS:append:mipsel = " -latomic"
68LDFLAGS:append:powerpc = " -latomic"
69
70SYSTEMD_PACKAGES = "${PN}"
71SYSTEMD_SERVICE:${PN} = "frr.service"
72SYSTEMD_AUTO_ENABLE = "disable"
73
74do_compile:class-native () {
75 oe_runmake clippy-only
76}
77
78do_install:class-native () {
79 install -d ${D}${libdir}
80 install -m 755 ${WORKDIR}/build/lib/clippy ${D}${libdir}/clippy
81}
82
83do_install:append:class-target () {
84 install -m 0755 -d ${D}${sysconfdir}/frr
85 install -m 0640 ${S}/tools/etc/frr/* ${D}${sysconfdir}/frr/
86 chown frr:frrvty ${D}${sysconfdir}/frr
87 chown frr:frr ${D}${sysconfdir}/frr/*
88 chown frr:frrvty ${D}${sysconfdir}/frr/vtysh.conf
89 chmod 640 ${D}${sysconfdir}/frr/*
90
91 if ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'true', 'false', d)}; then
92 install -d ${D}/${sysconfdir}/pam.d
93 install -m 644 ${WORKDIR}/frr.pam ${D}/${sysconfdir}/pam.d/frr
94 fi
95
96 if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
97 install -d ${D}${sysconfdir}/init.d
98 install -m 0755 ${B}/tools/frr ${D}${sysconfdir}/init.d
99
100 install -d ${D}${sysconfdir}/default/volatiles
101 echo "d frr frr 0755 ${localstatedir}/run/frr none" \
102 > ${D}${sysconfdir}/default/volatiles/99_frr
103 fi
104
105 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
106 install -d ${D}${systemd_system_unitdir}
107 install -m 0644 ${B}/tools/frr*.service ${D}${systemd_system_unitdir}
108
109 install -d ${D}${sysconfdir}/tmpfiles.d
110 echo "d /run/frr 0755 frr frr -" \
111 > ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf
112 fi
113}
114
115USERADD_PACKAGES = "${PN}"
116GROUPADD_PARAM:${PN} = "--system frr ; --system frrvty"
117USERADD_PARAM:${PN} = "--system --home ${localstatedir}/run/frr/ -M -g frr -G frrvty --shell /bin/false frr"
118
119FILES:${PN} += "${datadir}/yang"
120
121BBCLASSEXTEND = "native"