added my Recipes
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
From cc0cd6f71f6ef96fca2d7b730a3f0f6722fec696 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Sat, 7 May 2022 12:15:22 -0700
|
||||
Subject: [PATCH] Define strndupa if it does not exist
|
||||
|
||||
musl e.g. does not supply strndupa, unlike glibc
|
||||
|
||||
Upstream-Status: Pending
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
|
||||
---
|
||||
etc/systemd/system-generators/zfs-mount-generator.c | 9 +++++++++
|
||||
1 file changed, 9 insertions(+)
|
||||
|
||||
diff --git a/etc/systemd/system-generators/zfs-mount-generator.c b/etc/systemd/system-generators/zfs-mount-generator.c
|
||||
index f4c6c26..255bee4 100644
|
||||
--- a/etc/systemd/system-generators/zfs-mount-generator.c
|
||||
+++ b/etc/systemd/system-generators/zfs-mount-generator.c
|
||||
@@ -193,6 +193,15 @@ fopenat(int dirfd, const char *pathname, int flags,
|
||||
return (fdopen(fd, stream_mode));
|
||||
}
|
||||
|
||||
+#ifndef strndupa
|
||||
+#define strndupa(s, n) \
|
||||
+ (__extension__ ({const char *__in = (s); \
|
||||
+ size_t __len = strnlen (__in, (n)) + 1; \
|
||||
+ char *__out = (char *) alloca (__len); \
|
||||
+ __out[__len-1] = '\0'; \
|
||||
+ (char *) memcpy (__out, __in, __len-1);}))
|
||||
+#endif
|
||||
+
|
||||
static int
|
||||
line_worker(char *line, const char *cachefile)
|
||||
{
|
||||
@@ -0,0 +1,71 @@
|
||||
SUMMARY = "OpenZFS on Linux and FreeBSD"
|
||||
DESCRIPTION = "OpenZFS on Linux and FreeBSD"
|
||||
LICENSE = "CDDL-1.0"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE;md5=7087caaf1dc8a2856585619f4a787faa"
|
||||
HOMEPAGE ="https://github.com/openzfs/zfs"
|
||||
|
||||
SRC_URI = "https://github.com/openzfs/zfs/releases/download/${BPN}-${PV}/${BPN}-${PV}.tar.gz \
|
||||
file://0001-Define-strndupa-if-it-does-not-exist.patch \
|
||||
"
|
||||
SRC_URI[sha256sum] = "6b172cdf2eb54e17fcd68f900fab33c1430c5c59848fa46fab83614922fe50f6"
|
||||
|
||||
# Using both 'module' and 'autotools' classes seems a bit odd, they both
|
||||
# define a do_compile function.
|
||||
# That's why we opt for module-base, also this prevents module splitting.
|
||||
inherit module-base pkgconfig autotools
|
||||
|
||||
DEPENDS = "virtual/kernel zlib util-linux libtirpc openssl curl"
|
||||
|
||||
PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd sysvinit', d)}"
|
||||
|
||||
PACKAGECONFIG[pam] = "--enable-pam --with-pamconfigsdir=${datadir}/pam-configs --with-pammoduledir=${libdir}/security, --disable-pam"
|
||||
PACKAGECONFIG[systemd] = "--enable-systemd,--disable-systemd,"
|
||||
PACKAGECONFIG[sysvinit] = "--enable-sysvinit,--disable-sysvinit,"
|
||||
|
||||
EXTRA_OECONF:append = " \
|
||||
--disable-pyzfs \
|
||||
--with-linux=${STAGING_KERNEL_DIR} --with-linux-obj=${STAGING_KERNEL_BUILDDIR} \
|
||||
--with-mounthelperdir=${base_sbin} \
|
||||
--with-udevdir=${base_libdir}/udev \
|
||||
--with-systemdunitdir=${systemd_system_unitdir} \
|
||||
--with-systemdgeneratordir=${nonarch_base_libdir}/systemd/system-generators \
|
||||
--with-systemdpresetdir=${nonarch_base_libdir}/systemd/system-preset \
|
||||
--with-systemdmodulesloaddir=${sysconfdir}/module-load.d \
|
||||
--without-dracutdir \
|
||||
"
|
||||
|
||||
EXTRA_OEMAKE:append = " \
|
||||
INSTALL_MOD_PATH=${D}${root_prefix} \
|
||||
"
|
||||
|
||||
do_install:append() {
|
||||
# /usr/share/zfs contains the zfs-tests folder which we do not need:
|
||||
rm -rf ${D}${datadir}/zfs
|
||||
|
||||
rm -rf ${D}${datadir}/initramfs-tools
|
||||
}
|
||||
|
||||
FILES:${PN} += "\
|
||||
${nonarch_base_libdir}/modules \
|
||||
${systemd_system_unitdir} \
|
||||
${nonarch_base_libdir}/systemd/system-generators \
|
||||
${nonarch_base_libdir}/systemd/system-preset \
|
||||
${sysconfdir}/modules-load.d/${BPN}.conf \
|
||||
${sysconfdir}/default/${BPN} \
|
||||
${sysconfdir}/sudoers.d/${BPN} \
|
||||
${sysconfdir}/${BPN} \
|
||||
${base_libdir}/udev \
|
||||
${sbindir} \
|
||||
${bindir} \
|
||||
${libexecdir}/${BPN} \
|
||||
${libdir} \
|
||||
"
|
||||
|
||||
FILES:${PN}-dev += "\
|
||||
${prefix}/src/zfs-${PV} \
|
||||
${prefix}/src/spl-${PV} \
|
||||
"
|
||||
# Not yet ported to rv32
|
||||
COMPATIBLE_HOST:riscv32 = "null"
|
||||
# conflicting definition of ABS macro from asm/asm.h from kernel
|
||||
COMPATIBLE_HOST:mips = "null"
|
||||
Reference in New Issue
Block a user