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