diff options
Diffstat (limited to 'meta-networking/recipes-protocols/frr/frr_8.4.2.bb')
| -rw-r--r-- | meta-networking/recipes-protocols/frr/frr_8.4.2.bb | 129 |
1 files changed, 129 insertions, 0 deletions
diff --git a/meta-networking/recipes-protocols/frr/frr_8.4.2.bb b/meta-networking/recipes-protocols/frr/frr_8.4.2.bb new file mode 100644 index 0000000000..2cbcbb3ce6 --- /dev/null +++ b/meta-networking/recipes-protocols/frr/frr_8.4.2.bb | |||
| @@ -0,0 +1,129 @@ | |||
| 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.4 \ | ||
| 13 | file://frr.pam \ | ||
| 14 | file://0001-m4-ax_python.m4-check-for-python-x.y-emded.pc-not-py.patch \ | ||
| 15 | " | ||
| 16 | |||
| 17 | SRCREV = "62ac43de9f3bc470586cf4f51fadf013bf542b32" | ||
| 18 | |||
| 19 | S = "${WORKDIR}/git" | ||
| 20 | |||
| 21 | # Due to libyang not supported on these arches: | ||
| 22 | COMPATIBLE_HOST:riscv32 = "null" | ||
| 23 | COMPATIBLE_HOST:riscv64 = "null" | ||
| 24 | COMPATIBLE_HOST:armv5 = "null" | ||
| 25 | |||
| 26 | # Fail to build on mips64 with error: | ||
| 27 | # Error: PC-relative reference to a different section | ||
| 28 | COMPATIBLE_HOST:mips64 = "null" | ||
| 29 | |||
| 30 | inherit autotools-brokensep python3native pkgconfig useradd systemd | ||
| 31 | |||
| 32 | DEPENDS:class-native = "bison-native elfutils-native" | ||
| 33 | DEPENDS:class-target = "bison-native json-c readline c-ares libyang frr-native" | ||
| 34 | |||
| 35 | RDEPENDS:${PN}:class-target = "iproute2 python3-core bash" | ||
| 36 | |||
| 37 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" | ||
| 38 | PACKAGECONFIG:class-native = "" | ||
| 39 | |||
| 40 | PACKAGECONFIG[fpm] = "--enable-fpm,--disable-fpm" | ||
| 41 | PACKAGECONFIG[pam] = "--with-libpam,--without-libpam,libpam" | ||
| 42 | PACKAGECONFIG[grpc] = "--enable-grpc,--disable-grpc,grpc-native grpc" | ||
| 43 | PACKAGECONFIG[snmp] = "--enable-snmp,--disable-snmp,net-snmp" | ||
| 44 | PACKAGECONFIG[zeromq] = "--enable-zeromq,--disable-zeromq,zeromq" | ||
| 45 | PACKAGECONFIG[protobuf] = "--enable-protobuf,--disable-protobuf,protobuf-c-native protobuf-c" | ||
| 46 | PACKAGECONFIG[capabilities] = "--enable-capabilities,--disable-capabilities,libcap" | ||
| 47 | PACKAGECONFIG[cumulus] = "--enable-cumulus,--disable-cumulus" | ||
| 48 | PACKAGECONFIG[datacenter] = "--enable-datacenter,--disable-datacenter" | ||
| 49 | PACKAGECONFIG[ospfclient] = "--enable-ospfapi --enable-ospfclient,--disable-ospfapi --disable-ospfclient" | ||
| 50 | |||
| 51 | EXTRA_OECONF:class-native = "--enable-clippy-only" | ||
| 52 | |||
| 53 | EXTRA_OECONF:class-target = "--sbindir=${libdir}/frr \ | ||
| 54 | --sysconfdir=${sysconfdir}/frr \ | ||
| 55 | --localstatedir=${localstatedir}/run/frr \ | ||
| 56 | --enable-vtysh \ | ||
| 57 | --enable-multipath=64 \ | ||
| 58 | --enable-user=frr \ | ||
| 59 | --enable-group=frr \ | ||
| 60 | --enable-vty-group=frrvty \ | ||
| 61 | --enable-configfile-mask=0640 \ | ||
| 62 | --enable-logfile-mask=0640 \ | ||
| 63 | --disable-doc \ | ||
| 64 | --with-clippy=${RECIPE_SYSROOT_NATIVE}/usr/lib/clippy \ | ||
| 65 | " | ||
| 66 | |||
| 67 | CACHED_CONFIGUREVARS += "ac_cv_path_PERL='/usr/bin/env perl'" | ||
| 68 | |||
| 69 | LDFLAGS:append:mips = " -latomic" | ||
| 70 | LDFLAGS:append:mipsel = " -latomic" | ||
| 71 | LDFLAGS:append:powerpc = " -latomic" | ||
| 72 | |||
| 73 | SYSTEMD_PACKAGES = "${PN}" | ||
| 74 | SYSTEMD_SERVICE:${PN} = "frr.service" | ||
| 75 | SYSTEMD_AUTO_ENABLE = "disable" | ||
| 76 | |||
| 77 | do_compile:prepend () { | ||
| 78 | sed -i -e 's#${RECIPE_SYSROOT_NATIVE}##g' \ | ||
| 79 | -e 's#${RECIPE_SYSROOT}##g' ${S}/lib/version.h | ||
| 80 | } | ||
| 81 | |||
| 82 | do_compile:class-native () { | ||
| 83 | oe_runmake clippy-only | ||
| 84 | } | ||
| 85 | |||
| 86 | do_install:class-native () { | ||
| 87 | install -d ${D}${libdir} | ||
| 88 | install -m 755 ${S}/lib/clippy ${D}${libdir}/clippy | ||
| 89 | } | ||
| 90 | |||
| 91 | do_install:append:class-target () { | ||
| 92 | install -m 0755 -d ${D}${sysconfdir}/frr | ||
| 93 | install -m 0640 ${S}/tools/etc/frr/* ${D}${sysconfdir}/frr/ | ||
| 94 | chown frr:frrvty ${D}${sysconfdir}/frr | ||
| 95 | chown frr:frr ${D}${sysconfdir}/frr/* | ||
| 96 | chown frr:frrvty ${D}${sysconfdir}/frr/vtysh.conf | ||
| 97 | chmod 640 ${D}${sysconfdir}/frr/* | ||
| 98 | |||
| 99 | if ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'true', 'false', d)}; then | ||
| 100 | install -d ${D}/${sysconfdir}/pam.d | ||
| 101 | install -m 644 ${WORKDIR}/frr.pam ${D}/${sysconfdir}/pam.d/frr | ||
| 102 | fi | ||
| 103 | |||
| 104 | if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then | ||
| 105 | install -d ${D}${sysconfdir}/init.d | ||
| 106 | install -m 0755 ${B}/tools/frrinit.sh ${D}${sysconfdir}/init.d/frr | ||
| 107 | |||
| 108 | install -d ${D}${sysconfdir}/default/volatiles | ||
| 109 | echo "d frr frr 0755 ${localstatedir}/run/frr none" \ | ||
| 110 | > ${D}${sysconfdir}/default/volatiles/99_frr | ||
| 111 | fi | ||
| 112 | |||
| 113 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then | ||
| 114 | install -d ${D}${systemd_system_unitdir} | ||
| 115 | install -m 0644 ${B}/tools/frr*.service ${D}${systemd_system_unitdir} | ||
| 116 | |||
| 117 | install -d ${D}${sysconfdir}/tmpfiles.d | ||
| 118 | echo "d /run/frr 0755 frr frr -" \ | ||
| 119 | > ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf | ||
| 120 | fi | ||
| 121 | } | ||
| 122 | |||
| 123 | USERADD_PACKAGES = "${PN}" | ||
| 124 | GROUPADD_PARAM:${PN} = "--system frr ; --system frrvty" | ||
| 125 | USERADD_PARAM:${PN} = "--system --home ${localstatedir}/run/frr/ -M -g frr -G frrvty --shell /bin/false frr" | ||
| 126 | |||
| 127 | FILES:${PN} += "${datadir}/yang" | ||
| 128 | |||
| 129 | BBCLASSEXTEND = "native" | ||
