blob: d3ea6797e75cc1ca1cd7e5e7e3b49b1d7689f529 [file] [log] [blame]
Andrew Geissler517393d2023-01-13 08:55:19 -06001SUMMARY = "OpenZFS on Linux and FreeBSD"
2DESCRIPTION = "OpenZFS on Linux and FreeBSD"
3LICENSE = "CDDL-1.0"
4LIC_FILES_CHKSUM = "file://LICENSE;md5=7087caaf1dc8a2856585619f4a787faa"
5HOMEPAGE ="https://github.com/openzfs/zfs"
6
Patrick Williams169d7bc2024-01-05 11:33:25 -06007SRCREV = "494aaaed89cb9fe9f2da3b6c6f465a4bc9f6a7e1"
Andrew Geissler8f840682023-07-21 09:09:43 -05008SRC_URI = "git://github.com/openzfs/zfs;protocol=https;branch=zfs-2.2-release \
Andrew Geissler517393d2023-01-13 08:55:19 -06009 file://0001-Define-strndupa-if-it-does-not-exist.patch \
Patrick Williamsb542dec2023-06-09 01:26:37 -050010 file://aaf28a4630af60496c9d33db1d06a7d7d8983422.patch \
11 file://0001-fs-tests-cmd-readmmap-Replace-uint_t-with-uint32_t.patch \
Andrew Geissler517393d2023-01-13 08:55:19 -060012"
Patrick Williamsb542dec2023-06-09 01:26:37 -050013
14S = "${WORKDIR}/git"
Andrew Geissler517393d2023-01-13 08:55:19 -060015
16# Using both 'module' and 'autotools' classes seems a bit odd, they both
17# define a do_compile function.
18# That's why we opt for module-base, also this prevents module splitting.
Patrick Williams169d7bc2024-01-05 11:33:25 -060019inherit module-base pkgconfig autotools bash-completion
Andrew Geissler517393d2023-01-13 08:55:19 -060020
21DEPENDS = "virtual/kernel zlib util-linux libtirpc openssl curl"
22
23PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd sysvinit', d)}"
24
25PACKAGECONFIG[pam] = "--enable-pam --with-pamconfigsdir=${datadir}/pam-configs --with-pammoduledir=${libdir}/security, --disable-pam"
26PACKAGECONFIG[systemd] = "--enable-systemd,--disable-systemd,"
27PACKAGECONFIG[sysvinit] = "--enable-sysvinit,--disable-sysvinit,"
28
29EXTRA_OECONF:append = " \
30 --disable-pyzfs \
31 --with-linux=${STAGING_KERNEL_DIR} --with-linux-obj=${STAGING_KERNEL_BUILDDIR} \
32 --with-mounthelperdir=${base_sbin} \
33 --with-udevdir=${base_libdir}/udev \
Andrew Geissler3eeda902023-05-19 10:14:02 -050034 --with-systemdunitdir=${systemd_system_unitdir} \
35 --with-systemdgeneratordir=${nonarch_base_libdir}/systemd/system-generators \
36 --with-systemdpresetdir=${nonarch_base_libdir}/systemd/system-preset \
37 --with-systemdmodulesloaddir=${sysconfdir}/module-load.d \
Andrew Geissler517393d2023-01-13 08:55:19 -060038 --without-dracutdir \
Andrew Geissler3eeda902023-05-19 10:14:02 -050039"
Andrew Geissler517393d2023-01-13 08:55:19 -060040
41EXTRA_OEMAKE:append = " \
42 INSTALL_MOD_PATH=${D}${root_prefix} \
Andrew Geissler3eeda902023-05-19 10:14:02 -050043"
Andrew Geissler517393d2023-01-13 08:55:19 -060044
45do_install:append() {
46 # /usr/share/zfs contains the zfs-tests folder which we do not need:
47 rm -rf ${D}${datadir}/zfs
48
49 rm -rf ${D}${datadir}/initramfs-tools
50}
51
52FILES:${PN} += "\
Andrew Geissler3eeda902023-05-19 10:14:02 -050053 ${nonarch_base_libdir}/modules \
54 ${systemd_system_unitdir} \
55 ${nonarch_base_libdir}/systemd/system-generators \
56 ${nonarch_base_libdir}/systemd/system-preset \
57 ${sysconfdir}/modules-load.d/${BPN}.conf \
58 ${sysconfdir}/default/${BPN} \
59 ${sysconfdir}/sudoers.d/${BPN} \
60 ${sysconfdir}/${BPN} \
61 ${base_libdir}/udev \
62 ${sbindir} \
63 ${bindir} \
64 ${libexecdir}/${BPN} \
65 ${libdir} \
66"
Andrew Geissler517393d2023-01-13 08:55:19 -060067
68FILES:${PN}-dev += "\
Andrew Geissler3eeda902023-05-19 10:14:02 -050069 ${prefix}/src/zfs-${PV} \
70 ${prefix}/src/spl-${PV} \
71"
Andrew Geissler517393d2023-01-13 08:55:19 -060072# Not yet ported to rv32
73COMPATIBLE_HOST:riscv32 = "null"
74# conflicting definition of ABS macro from asm/asm.h from kernel
75COMPATIBLE_HOST:mips = "null"
Andrew Geissler8f840682023-07-21 09:09:43 -050076# FTBFS on aarch64 with 6.2+ kernel see https://github.com/openzfs/zfs/issues/14555
77COMPATIBLE_HOST:aarch64 = "null"