mirror of
https://github.com/thead-yocto-mirror/meta-openembedded
synced 2026-09-17 20:51:57 +02:00
There is a parallel build error in separate build directory:
| /home/pokybuild/yocto-worker/meta-oe/build/build/tmp/work/core2-64-poky-linux/frr/8.2.2-r0/recipe-sysroot-native/usr/lib/clippy ../git/python/clidef.py -o isisd/isis_cli_clippy.c ../git/isisd/isis_cli.c
| Traceback (most recent call last):
| File "../git/python/clidef.py", line 466, in <module>
| clippy.wrdiff(
| File "/home/pokybuild/yocto-worker/meta-oe/build/build/tmp/work/core2-64-poky-linux/frr/8.2.2-r0/git/python/clippy/__init__.py", line 78, in wrdiff
| with open(newname, "w") as out:
| FileNotFoundError: [Errno 2] No such file or directory: 'isisd/isis_cli_clippy.c.new-372541'
| make[1]: Leaving directory '/home/pokybuild/yocto-worker/meta-oe/build/build/tmp/work/core2-64-poky-linux/frr/8.2.2-r0/build'
| make[1]: *** [Makefile:17386: isisd/isis_cli_clippy.c] Error 1
This is beacuse clidef.py only creates new file but doesn't check if
parent directory exists. Inherit autotools-brokensep can fix this issue
as these parent directories always exist in source directory.
Also set ac_cv_path_PERL to '/usr/bin/env perl' to avoid path too long.
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit 09a97158f8)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
124 lines
4.7 KiB
BlitzBasic
124 lines
4.7 KiB
BlitzBasic
SUMMARY = "BGP/OSPF/RIP routing daemon"
|
|
DESCRIPTION = "FRRouting 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."
|
|
HOMEPAGE = "https://frrouting.org/"
|
|
SECTION = "net"
|
|
|
|
LICENSE = "GPL-2.0-only & LGPL-2.1-only"
|
|
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
|
|
file://COPYING-LGPLv2.1;md5=4fbd65380cdd255951079008b364516c"
|
|
|
|
SRC_URI = "git://github.com/FRRouting/frr.git;protocol=https;branch=stable/8.2 \
|
|
file://frr.pam \
|
|
"
|
|
|
|
SRCREV = "79188bf710e92acf42fb5b9b0a2e9593a5ee9b05"
|
|
|
|
S = "${WORKDIR}/git"
|
|
|
|
# Due to libyang not supported on these arches:
|
|
COMPATIBLE_HOST:riscv32 = "null"
|
|
COMPATIBLE_HOST:riscv64 = "null"
|
|
COMPATIBLE_HOST:armv5 = "null"
|
|
|
|
# Fail to build on mips64 with error:
|
|
# Error: PC-relative reference to a different section
|
|
COMPATIBLE_HOST:mips64 = "null"
|
|
|
|
inherit autotools-brokensep python3native pkgconfig useradd systemd
|
|
|
|
DEPENDS:class-native = "bison-native elfutils-native"
|
|
DEPENDS:class-target = "bison-native json-c readline c-ares libyang frr-native"
|
|
|
|
RDEPENDS:${PN}:class-target = "iproute2 python3-core bash"
|
|
|
|
PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}"
|
|
PACKAGECONFIG:class-native = ""
|
|
|
|
PACKAGECONFIG[pam] = "--with-libpam,--without-libpam,libpam"
|
|
PACKAGECONFIG[grpc] = "--enable-grpc,--disable-grpc,grpc-native grpc"
|
|
PACKAGECONFIG[snmp] = "--enable-snmp,--disable-snmp,net-snmp"
|
|
PACKAGECONFIG[zeromq] = "--enable-zeromq,--disable-zeromq,zeromq"
|
|
PACKAGECONFIG[protobuf] = "--enable-protobuf,--disable-protobuf,protobuf-c-native protobuf-c"
|
|
PACKAGECONFIG[capabilities] = "--enable-capabilities,--disable-capabilities,libcap"
|
|
PACKAGECONFIG[cumulus] = "--enable-cumulus,--disable-cumulus"
|
|
PACKAGECONFIG[datacenter] = "--enable-datacenter,--disable-datacenter"
|
|
PACKAGECONFIG[ospfclient] = "--enable-ospfapi --enable-ospfclient,--disable-ospfapi --disable-ospfclient"
|
|
|
|
EXTRA_OECONF:class-native = "--enable-clippy-only"
|
|
|
|
EXTRA_OECONF:class-target = "--sbindir=${libdir}/frr \
|
|
--sysconfdir=${sysconfdir}/frr \
|
|
--localstatedir=${localstatedir}/run/frr \
|
|
--enable-vtysh \
|
|
--enable-fpm \
|
|
--enable-multipath=64 \
|
|
--enable-user=frr \
|
|
--enable-group=frr \
|
|
--enable-vty-group=frrvty \
|
|
--enable-configfile-mask=0640 \
|
|
--enable-logfile-mask=0640 \
|
|
--disable-doc \
|
|
--with-clippy=${RECIPE_SYSROOT_NATIVE}/usr/lib/clippy \
|
|
"
|
|
|
|
CACHED_CONFIGUREVARS += "ac_cv_path_PERL='/usr/bin/env perl'"
|
|
|
|
LDFLAGS:append:mips = " -latomic"
|
|
LDFLAGS:append:mipsel = " -latomic"
|
|
LDFLAGS:append:powerpc = " -latomic"
|
|
|
|
SYSTEMD_PACKAGES = "${PN}"
|
|
SYSTEMD_SERVICE:${PN} = "frr.service"
|
|
SYSTEMD_AUTO_ENABLE = "disable"
|
|
|
|
do_compile:class-native () {
|
|
oe_runmake clippy-only
|
|
}
|
|
|
|
do_install:class-native () {
|
|
install -d ${D}${libdir}
|
|
install -m 755 ${S}/lib/clippy ${D}${libdir}/clippy
|
|
}
|
|
|
|
do_install:append:class-target () {
|
|
install -m 0755 -d ${D}${sysconfdir}/frr
|
|
install -m 0640 ${S}/tools/etc/frr/* ${D}${sysconfdir}/frr/
|
|
chown frr:frrvty ${D}${sysconfdir}/frr
|
|
chown frr:frr ${D}${sysconfdir}/frr/*
|
|
chown frr:frrvty ${D}${sysconfdir}/frr/vtysh.conf
|
|
chmod 640 ${D}${sysconfdir}/frr/*
|
|
|
|
if ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'true', 'false', d)}; then
|
|
install -d ${D}/${sysconfdir}/pam.d
|
|
install -m 644 ${WORKDIR}/frr.pam ${D}/${sysconfdir}/pam.d/frr
|
|
fi
|
|
|
|
if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
|
|
install -d ${D}${sysconfdir}/init.d
|
|
install -m 0755 ${B}/tools/frrinit.sh ${D}${sysconfdir}/init.d/frr
|
|
|
|
install -d ${D}${sysconfdir}/default/volatiles
|
|
echo "d frr frr 0755 ${localstatedir}/run/frr none" \
|
|
> ${D}${sysconfdir}/default/volatiles/99_frr
|
|
fi
|
|
|
|
if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
|
|
install -d ${D}${systemd_system_unitdir}
|
|
install -m 0644 ${B}/tools/frr*.service ${D}${systemd_system_unitdir}
|
|
|
|
install -d ${D}${sysconfdir}/tmpfiles.d
|
|
echo "d /run/frr 0755 frr frr -" \
|
|
> ${D}${sysconfdir}/tmpfiles.d/${BPN}.conf
|
|
fi
|
|
}
|
|
|
|
USERADD_PACKAGES = "${PN}"
|
|
GROUPADD_PARAM:${PN} = "--system frr ; --system frrvty"
|
|
USERADD_PARAM:${PN} = "--system --home ${localstatedir}/run/frr/ -M -g frr -G frrvty --shell /bin/false frr"
|
|
|
|
FILES:${PN} += "${datadir}/yang"
|
|
|
|
BBCLASSEXTEND = "native"
|