mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-10-22 08:28:21 +00:00
libfuse 3.18.3 replaced its pytest based tests with shell test cases driven by test/run-tests.py, so the pytest based run-ptest collected no tests at all. - Run test/run-tests.py from run-ptest and turn its result lines into ptest PASS/FAIL/SKIP lines. Use a run directory under the canonical /tmp, since some test filesystems mirror the real tree and cannot follow the /var/tmp symlink. - Install fuse_config.h, which the runner reads from the build tree. - Replace the pytest dependencies with the python3 modules the runner uses, and add coreutils and util-linux-losetup for dd status=none and losetup --show, which busybox does not support. - Do not print strerror(0) in test_syscalls, musl's "No error information" is flagged as suspicious output by the runner. All 87 tests now run on qemux86-64 musl: 80 pass, 7 skip. AI-Generated: Uses Claude Code Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
118 lines
3.7 KiB
BlitzBasic
118 lines
3.7 KiB
BlitzBasic
SUMMARY = "Implementation of a fully functional filesystem in a userspace program"
|
|
DESCRIPTION = "FUSE (Filesystem in Userspace) is a simple interface for userspace \
|
|
programs to export a virtual filesystem to the Linux kernel. FUSE \
|
|
also aims to provide a secure method for non privileged users to \
|
|
create and mount their own filesystem implementations. \
|
|
"
|
|
HOMEPAGE = "https://github.com/libfuse/libfuse"
|
|
SECTION = "libs"
|
|
LICENSE = "GPL-2.0-only AND LGPL-2.0-only"
|
|
LIC_FILES_CHKSUM = " \
|
|
file://GPL2.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
|
|
file://LGPL2.txt;md5=4fbd65380cdd255951079008b364516c \
|
|
file://LICENSE;md5=a55c12a2d7d742ecb41ca9ae0a6ddc66 \
|
|
"
|
|
|
|
SRC_URI = "https://github.com/libfuse/libfuse/releases/download/fuse-${PV}/fuse-${PV}.tar.gz"
|
|
SRC_URI[sha256sum] = "bcd19582c5e30f7fe45dd86a5540e998590aa01903afc7ebcbeea6c8ac5421ee"
|
|
|
|
S = "${UNPACKDIR}/fuse-${PV}"
|
|
|
|
UPSTREAM_CHECK_URI = "https://github.com/libfuse/libfuse/releases"
|
|
UPSTREAM_CHECK_REGEX = "releases/tag/fuse-(?P<pver>\d+(\.\d+)+)"
|
|
|
|
CVE_PRODUCT = "fuse_project:fuse"
|
|
|
|
inherit meson pkgconfig ptest
|
|
|
|
# fix riscv32-yoe-linux-musl-ld.lld: error: undefined symbol: __atomic_fetch_add_8
|
|
LDFLAGS:append:toolchain-clang:riscv32 = " -latomic"
|
|
|
|
SRC_URI += " \
|
|
file://run-ptest \
|
|
file://fuse3.conf \
|
|
file://0001-test_syscalls-Do-not-print-strerror-0.patch \
|
|
"
|
|
# test/run-tests.py needs python3-asyncio for concurrent.futures,
|
|
# python3-compile for filecmp, python3-io for socket/tempfile and
|
|
# python3-shell for shlex. The test cases use dd status=none and
|
|
# losetup --show, which busybox does not support.
|
|
RDEPENDS:${PN}-ptest += " \
|
|
python3-asyncio \
|
|
python3-compile \
|
|
python3-core \
|
|
python3-ctypes \
|
|
python3-io \
|
|
python3-json \
|
|
python3-resource \
|
|
python3-shell \
|
|
bash \
|
|
coreutils \
|
|
file \
|
|
util-linux-losetup \
|
|
"
|
|
RRECOMMENDS:${PN}-ptest += " kernel-module-cuse"
|
|
|
|
do_install_ptest() {
|
|
install -d ${D}${PTEST_PATH}/test
|
|
install -d ${D}${PTEST_PATH}/example
|
|
install -d ${D}${PTEST_PATH}/util
|
|
cp -rf ${S}/test/* ${D}${PTEST_PATH}/test/
|
|
|
|
example_excutables=`find ${B}/example -type f -executable`
|
|
util_excutables=`find ${B}/util -type f -executable`
|
|
test_excutables=`find ${B}/test -type f -executable`
|
|
|
|
for e in $example_excutables
|
|
do
|
|
cp -rf $e ${D}${PTEST_PATH}/example/
|
|
done
|
|
|
|
for e in $util_excutables
|
|
do
|
|
cp -rf $e ${D}${PTEST_PATH}/util/
|
|
done
|
|
|
|
for e in $test_excutables
|
|
do
|
|
cp -rf $e ${D}${PTEST_PATH}/test
|
|
done
|
|
|
|
# test/run-tests.py reads the build configuration from the build tree
|
|
install -m 0644 ${B}/fuse_config.h ${D}${PTEST_PATH}/
|
|
}
|
|
|
|
DEPENDS = "udev"
|
|
|
|
PACKAGES =+ "fuse3-utils"
|
|
|
|
RPROVIDES:${PN}-dbg += "fuse3-utils-dbg"
|
|
|
|
RRECOMMENDS:${PN}:class-target = "kernel-module-fuse fuse3-utils"
|
|
|
|
FILES:${PN} += "${libdir}/libfuse3.so.*"
|
|
FILES:${PN}-dev += "${libdir}/libfuse3*.la"
|
|
|
|
# Forbid auto-renaming to libfuse3-utils
|
|
FILES:fuse3-utils = "${bindir} ${base_sbindir}"
|
|
DEBIAN_NOAUTONAME:fuse3-utils = "1"
|
|
DEBIAN_NOAUTONAME:${PN}-dbg = "1"
|
|
|
|
SYSTEMD_SERVICE:${PN} = ""
|
|
|
|
do_install:append() {
|
|
rm -rf ${D}${base_prefix}/dev
|
|
|
|
# systemd class remove the sysv_initddir only if systemd_system_unitdir
|
|
# contains anything, but it's not needed if sysvinit is not in DISTRO_FEATURES
|
|
if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'false', 'true', d)}; then
|
|
rm -rf ${D}${sysconfdir}/init.d/
|
|
fi
|
|
|
|
# Install systemd related configuration file
|
|
if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
|
|
install -d ${D}${sysconfdir}/modules-load.d
|
|
install -m 0644 ${UNPACKDIR}/fuse3.conf ${D}${sysconfdir}/modules-load.d
|
|
fi
|
|
}
|