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