summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-protocols/frr/frr_10.3.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta-networking/recipes-protocols/frr/frr_10.3.bb')
-rw-r--r--meta-networking/recipes-protocols/frr/frr_10.3.bb137
1 files changed, 137 insertions, 0 deletions
diff --git a/meta-networking/recipes-protocols/frr/frr_10.3.bb b/meta-networking/recipes-protocols/frr/frr_10.3.bb
new file mode 100644
index 0000000000..f0f3f34ab3
--- /dev/null
+++ b/meta-networking/recipes-protocols/frr/frr_10.3.bb
@@ -0,0 +1,137 @@
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://doc/licenses/GPL-2.0;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
10 file://doc/licenses/LGPL-2.1;md5=4fbd65380cdd255951079008b364516c"
11
12
13SRC_URI = "git://github.com/FRRouting/frr.git;protocol=https;branch=stable/10.3 \
14 file://frr.pam \
15 "
16
17SRCREV = "85cf1ed576deed121751e16a64970f8a652a9e1e"
18
19UPSTREAM_CHECK_GITTAGREGEX = "frr-(?P<pver>\d+(\.\d+)+)$"
20
21CVE_PRODUCT = "frrouting"
22
23
24inherit autotools-brokensep python3native pkgconfig useradd systemd
25
26DEPENDS:class-native = "bison-native elfutils-native"
27DEPENDS:class-target = "bison-native json-c readline c-ares libyang frr-native protobuf-c-native protobuf-c"
28
29RDEPENDS:${PN}:class-target = "iproute2 python3-core bash"
30
31PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}"
32PACKAGECONFIG:class-native = ""
33
34PACKAGECONFIG[fpm] = "--enable-fpm,--disable-fpm"
35PACKAGECONFIG[pam] = "--with-libpam,--without-libpam,libpam"
36PACKAGECONFIG[grpc] = "--enable-grpc,--disable-grpc,grpc-native grpc"
37PACKAGECONFIG[snmp] = "--enable-snmp,--disable-snmp,net-snmp"
38PACKAGECONFIG[zeromq] = "--enable-zeromq,--disable-zeromq,zeromq"
39PACKAGECONFIG[protobuf] = "--enable-protobuf,--disable-protobuf,protobuf-c-native protobuf-c"
40PACKAGECONFIG[capabilities] = "--enable-capabilities,--disable-capabilities,libcap"
41PACKAGECONFIG[cumulus] = "--enable-cumulus,--disable-cumulus"
42PACKAGECONFIG[datacenter] = "--enable-datacenter,--disable-datacenter"
43PACKAGECONFIG[ospfclient] = "--enable-ospfapi --enable-ospfclient,--disable-ospfapi --disable-ospfclient"
44
45EXTRA_OECONF:class-native = "--enable-clippy-only"
46
47EXTRA_OECONF:class-target = "--sbindir=${libexecdir}/frr \
48 --sysconfdir=${sysconfdir}/frr \
49 --localstatedir=${localstatedir}/run/frr \
50 --enable-vtysh \
51 --enable-multipath=64 \
52 --enable-user=frr \
53 --enable-group=frr \
54 --enable-vty-group=frrvty \
55 --enable-configfile-mask=0640 \
56 --enable-logfile-mask=0640 \
57 --disable-doc \
58 --with-clippy=${RECIPE_SYSROOT_NATIVE}/usr/lib/clippy \
59 "
60
61CACHED_CONFIGUREVARS += "ac_cv_path_PERL='/usr/bin/env perl'"
62
63# https://github.com/FRRouting/frr/issues/14469
64DEBUG_PREFIX_MAP:remove = "-fcanon-prefix-map"
65
66LDFLAGS:append:mips = " -latomic"
67LDFLAGS:append:mipsel = " -latomic"
68LDFLAGS:append:powerpc = " -latomic"
69LDFLAGS:append:riscv32 = " -latomic"
70
71SYSTEMD_PACKAGES = "${PN}"
72SYSTEMD_SERVICE:${PN} = "frr.service"
73SYSTEMD_AUTO_ENABLE = "disable"
74
75inherit update-alternatives multilib_script multilib_header
76
77ALTERNATIVE_PRIORITY = "100"
78ALTERNATIVE:${PN} = " ietf-interfaces ietf-netconf-acm ietf-netconf-with-defaults ietf-netconf"
79ALTERNATIVE_LINK_NAME[ietf-interfaces] = "${datadir}/yang/ietf-interfaces.yang"
80ALTERNATIVE_LINK_NAME[ietf-netconf-acm] = "${datadir}/yang/ietf-netconf-acm.yang"
81ALTERNATIVE_LINK_NAME[ietf-netconf-with-defaults] = "${datadir}/yang/ietf-netconf-with-defaults.yang"
82ALTERNATIVE_LINK_NAME[ietf-netconf] = "${datadir}/yang/ietf-netconf.yang"
83do_compile:prepend () {
84 sed -i -e 's#${RECIPE_SYSROOT_NATIVE}##g' \
85 -e 's#${RECIPE_SYSROOT}##g' ${S}/lib/version.h
86}
87
88do_compile:class-native () {
89 oe_runmake clippy-only
90}
91
92do_install:class-native () {
93 install -d ${D}${libdir}
94 install -m 755 ${S}/lib/clippy ${D}${libdir}/clippy
95}
96
97do_install:append:class-target () {
98 install -m 0755 -d ${D}${sysconfdir}/frr
99 install -m 0755 -d ${D}${libexecdir}/frr
100 install -m 0640 ${S}/tools/etc/frr/* ${D}${sysconfdir}/frr/
101 chown frr:frrvty ${D}${sysconfdir}/frr
102 chown frr:frr ${D}${sysconfdir}/frr/*
103 chown frr:frrvty ${D}${sysconfdir}/frr/vtysh.conf
104 chmod 640 ${D}${sysconfdir}/frr/*
105
106 if ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'true', 'false', d)}; then
107 install -d ${D}/${sysconfdir}/pam.d
108 install -m 644 ${UNPACKDIR}/frr.pam ${D}/${sysconfdir}/pam.d/frr
109 fi
110
111 if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
112 install -d ${D}${sysconfdir}/init.d
113 install -m 0755 ${B}/tools/frrinit.sh ${D}${sysconfdir}/init.d/frr
114
115 install -d ${D}${sysconfdir}/default/volatiles
116 echo "d frr frr 0755 ${localstatedir}/run/frr none" \
117 > ${D}${sysconfdir}/default/volatiles/99_frr
118 fi
119
120 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
121 install -d ${D}${systemd_system_unitdir}
122 install -m 0644 ${B}/tools/frr*.service ${D}${systemd_system_unitdir}
123
124 install -d ${D}${sysconfdir}/tmpfiles.d
125 echo "d /run/frr 0755 frr frr -" \
126 > ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf
127 fi
128 oe_multilib_header frr/version.h
129}
130
131USERADD_PACKAGES = "${PN}"
132GROUPADD_PARAM:${PN} = "--system frr ; --system frrvty"
133USERADD_PARAM:${PN} = "--system --home ${localstatedir}/run/frr/ -M -g frr -G frrvty --shell /bin/false frr"
134
135FILES:${PN} += "${datadir}/yang"
136
137BBCLASSEXTEND = "native"