diff options
author | Yi Zhao <yi.zhao@windriver.com> | 2022-04-12 15:42:43 +0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2022-04-12 09:28:25 -0700 |
commit | b420d9f2213c0c4aaf698fef5a4aa65f88c9d159 (patch) | |
tree | ad441cae8cf4f6f9d20b947ee207ed11a93a5c13 /meta-networking/recipes-protocols | |
parent | 1888971b1fcff1e86be175c2aac724c28d2840ca (diff) | |
download | meta-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.pam | 13 | ||||
-rw-r--r-- | meta-networking/recipes-protocols/frr/frr_8.2.2.bb | 121 |
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 | ||
7 | auth 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. | ||
12 | auth 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 @@ | |||
1 | SUMMARY = "BGP/OSPF/RIP routing daemon" | ||
2 | DESCRIPTION = "FRRouting is a free and open source Internet routing protocol suite for Linux \ | ||
3 | and Unix platforms. It implements BGP, OSPF, RIP, IS-IS, PIM, LDP, BFD, Babel, PBR, OpenFabric \ | ||
4 | and VRRP, with alpha support for EIGRP and NHRP." | ||
5 | HOMEPAGE = "https://frrouting.org/" | ||
6 | SECTION = "net" | ||
7 | |||
8 | LICENSE = "GPL-2.0-only & LGPL-2.1-only" | ||
9 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | ||
10 | file://COPYING-LGPLv2.1;md5=4fbd65380cdd255951079008b364516c" | ||
11 | |||
12 | SRC_URI = "git://github.com/FRRouting/frr.git;protocol=https;branch=stable/8.2 \ | ||
13 | file://frr.pam \ | ||
14 | " | ||
15 | |||
16 | SRCREV = "79188bf710e92acf42fb5b9b0a2e9593a5ee9b05" | ||
17 | |||
18 | S = "${WORKDIR}/git" | ||
19 | |||
20 | # Due to libyang not supported on these arches: | ||
21 | COMPATIBLE_HOST:riscv32 = "null" | ||
22 | COMPATIBLE_HOST:riscv64 = "null" | ||
23 | COMPATIBLE_HOST:armv5 = "null" | ||
24 | |||
25 | # Fail to build on mips64 with error: | ||
26 | # Error: PC-relative reference to a different section | ||
27 | COMPATIBLE_HOST:mips64 = "null" | ||
28 | |||
29 | inherit autotools python3native pkgconfig useradd systemd | ||
30 | |||
31 | DEPENDS:class-native = "bison-native elfutils-native" | ||
32 | DEPENDS:class-target = "bison-native json-c readline c-ares libyang frr-native" | ||
33 | |||
34 | RDEPENDS:${PN}:class-target = "iproute2 python3-core bash" | ||
35 | |||
36 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" | ||
37 | PACKAGECONFIG:class-native = "" | ||
38 | |||
39 | PACKAGECONFIG[pam] = "--with-libpam,--without-libpam,libpam" | ||
40 | PACKAGECONFIG[grpc] = "--enable-grpc,--disable-grpc,grpc-native grpc" | ||
41 | PACKAGECONFIG[snmp] = "--enable-snmp,--disable-snmp,net-snmp" | ||
42 | PACKAGECONFIG[zeromq] = "--enable-zeromq,--disable-zeromq,zeromq" | ||
43 | PACKAGECONFIG[protobuf] = "--enable-protobuf,--disable-protobuf,protobuf-c-native protobuf-c" | ||
44 | PACKAGECONFIG[capabilities] = "--enable-capabilities,--disable-capabilities,libcap" | ||
45 | PACKAGECONFIG[cumulus] = "--enable-cumulus,--disable-cumulus" | ||
46 | PACKAGECONFIG[datacenter] = "--enable-datacenter,--disable-datacenter" | ||
47 | PACKAGECONFIG[ospfclient] = "--enable-ospfapi --enable-ospfclient,--disable-ospfapi --disable-ospfclient" | ||
48 | |||
49 | EXTRA_OECONF:class-native = "--enable-clippy-only" | ||
50 | |||
51 | EXTRA_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 | |||
66 | LDFLAGS:append:mips = " -latomic" | ||
67 | LDFLAGS:append:mipsel = " -latomic" | ||
68 | LDFLAGS:append:powerpc = " -latomic" | ||
69 | |||
70 | SYSTEMD_PACKAGES = "${PN}" | ||
71 | SYSTEMD_SERVICE:${PN} = "frr.service" | ||
72 | SYSTEMD_AUTO_ENABLE = "disable" | ||
73 | |||
74 | do_compile:class-native () { | ||
75 | oe_runmake clippy-only | ||
76 | } | ||
77 | |||
78 | do_install:class-native () { | ||
79 | install -d ${D}${libdir} | ||
80 | install -m 755 ${WORKDIR}/build/lib/clippy ${D}${libdir}/clippy | ||
81 | } | ||
82 | |||
83 | do_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 | |||
115 | USERADD_PACKAGES = "${PN}" | ||
116 | GROUPADD_PARAM:${PN} = "--system frr ; --system frrvty" | ||
117 | USERADD_PARAM:${PN} = "--system --home ${localstatedir}/run/frr/ -M -g frr -G frrvty --shell /bin/false frr" | ||
118 | |||
119 | FILES:${PN} += "${datadir}/yang" | ||
120 | |||
121 | BBCLASSEXTEND = "native" | ||