Initial Commit
- initial default booting image
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
From d363aafe0a773cd55890a385694cf05cb6225c5a Mon Sep 17 00:00:00 2001
|
||||
From: Julien Olivain <ju.o@free.fr>
|
||||
Date: Sun, 15 Mar 2026 13:18:07 +0100
|
||||
Subject: [PATCH] tests/zfs-tests/cmd/statx.c: avoid statx() conflicts
|
||||
|
||||
With some libc, such as uclibc >= 1.0.57, the libc defines the statx()
|
||||
function, while also internally including <sys/stat.h> (from <fcntl.h>
|
||||
from example), which results to a compilation error due to conflicting
|
||||
types.
|
||||
|
||||
This commit fixes the issue by only defining the statx() prototype only
|
||||
if the libc was detected not to have a working statx() wrapper, and
|
||||
explicitly include the <sys/stat.h> otherwise.
|
||||
|
||||
Upstream: Discussed in: https://github.com/openzfs/zfs/pull/18316#issuecomment-4062904581
|
||||
Signed-off-by: Julien Olivain <ju.o@free.fr>
|
||||
---
|
||||
tests/zfs-tests/cmd/statx.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/tests/zfs-tests/cmd/statx.c b/tests/zfs-tests/cmd/statx.c
|
||||
index 1acc7e58c..c292fdbdf 100644
|
||||
--- a/tests/zfs-tests/cmd/statx.c
|
||||
+++ b/tests/zfs-tests/cmd/statx.c
|
||||
@@ -34,6 +34,9 @@
|
||||
* statx() may be available in the kernel, but not in the libc, so we build
|
||||
* our own wrapper if we can't link one.
|
||||
*/
|
||||
+#ifdef HAVE_STATX
|
||||
+#include <sys/stat.h>
|
||||
+#endif
|
||||
|
||||
#ifndef __NR_statx
|
||||
#if defined(__x86_64__)
|
||||
@@ -54,9 +57,11 @@
|
||||
#endif /* __NR_statx */
|
||||
|
||||
|
||||
+#ifndef HAVE_STATX
|
||||
int
|
||||
statx(int, const char *, int, unsigned int, void *)
|
||||
__attribute__((weak));
|
||||
+#endif
|
||||
|
||||
static inline int
|
||||
_statx(int fd, const char *path, int flags, unsigned int mask, void *stx)
|
||||
--
|
||||
2.53.0
|
||||
|
||||
34
package/zfs/Config.in
Normal file
34
package/zfs/Config.in
Normal file
@@ -0,0 +1,34 @@
|
||||
comment "zfs needs a Linux kernel to be built"
|
||||
depends on !BR2_LINUX_KERNEL
|
||||
|
||||
comment "zfs needs udev /dev management"
|
||||
depends on BR2_LINUX_KERNEL
|
||||
depends on !BR2_PACKAGE_HAS_UDEV
|
||||
|
||||
config BR2_PACKAGE_ZFS
|
||||
bool "zfs"
|
||||
depends on BR2_LINUX_KERNEL
|
||||
depends on BR2_PACKAGE_HAS_UDEV
|
||||
depends on BR2_USE_MMU # util-linux (libblkid)
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS # libtirpc
|
||||
select BR2_LINUX_NEEDS_MODULES
|
||||
select BR2_PACKAGE_UTIL_LINUX
|
||||
select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
|
||||
select BR2_PACKAGE_UTIL_LINUX_LIBUUID
|
||||
select BR2_PACKAGE_LIBTIRPC if !BR2_TOOLCHAIN_HAS_NATIVE_RPC
|
||||
select BR2_PACKAGE_LIBAIO
|
||||
select BR2_PACKAGE_OPENSSL
|
||||
select BR2_PACKAGE_ZLIB
|
||||
select BR2_PACKAGE_LIBCURL
|
||||
help
|
||||
OpenZFS on Linux and FreeBSD
|
||||
|
||||
OpenZFS is an advanced file system and volume manager which
|
||||
was originally developed for Solaris and is now maintained by
|
||||
the OpenZFS community. This repository contains the code for
|
||||
running OpenZFS on Linux and FreeBSD.
|
||||
|
||||
This package builds the kernel modules and userland utils
|
||||
required to operates with ZFS volumes.
|
||||
|
||||
http://zfsonlinux.org/
|
||||
6
package/zfs/zfs.hash
Normal file
6
package/zfs/zfs.hash
Normal file
@@ -0,0 +1,6 @@
|
||||
# From https://github.com/openzfs/zfs/releases/download/zfs-2.4.3/zfs-2.4.3.sha256.asc
|
||||
sha256 1f08f2d154f5189b5f1382848a32667b3d34066145b474c49cd3d41a5fba59a7 zfs-2.4.3.tar.gz
|
||||
|
||||
# Hash for license files:
|
||||
sha256 1ffb70c33c4f79f04e947facc5c7851f289609256aacb47fc115f700427d9520 LICENSE
|
||||
sha256 f125a37c829705eff3e6f77a9f6c58fd71060f84ab54180b98fafdf94a2021eb COPYRIGHT
|
||||
90
package/zfs/zfs.mk
Normal file
90
package/zfs/zfs.mk
Normal file
@@ -0,0 +1,90 @@
|
||||
################################################################################
|
||||
#
|
||||
# zfs
|
||||
#
|
||||
################################################################################
|
||||
|
||||
ZFS_VERSION = 2.4.3
|
||||
ZFS_SITE = https://github.com/openzfs/zfs/releases/download/zfs-$(ZFS_VERSION)
|
||||
ZFS_SELINUX_MODULES = zfs
|
||||
ZFS_LICENSE = CDDL
|
||||
ZFS_LICENSE_FILES = LICENSE COPYRIGHT
|
||||
ZFS_CPE_ID_VENDOR = openzfs
|
||||
ZFS_CPE_ID_PRODUCT = openzfs
|
||||
|
||||
ZFS_DEPENDENCIES = libaio openssl udev util-linux zlib libcurl linux
|
||||
|
||||
# sysvinit installs only a commented-out modules-load.d/ config file
|
||||
ZFS_CONF_OPTS = \
|
||||
--with-linux=$(LINUX_DIR) \
|
||||
--with-linux-obj=$(LINUX_DIR) \
|
||||
--disable-rpath \
|
||||
--disable-sysvinit
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBTIRPC),y)
|
||||
ZFS_DEPENDENCIES += libtirpc
|
||||
ZFS_CONF_OPTS += --with-tirpc
|
||||
else
|
||||
ZFS_CONF_OPTS += --without-tirpc
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_INIT_SYSTEMD),y)
|
||||
# Installs the optional systemd generators, units, and presets files.
|
||||
ZFS_CONF_OPTS += --enable-systemd
|
||||
else
|
||||
ZFS_CONF_OPTS += --disable-systemd
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_PYTHON3),y)
|
||||
ZFS_DEPENDENCIES += python3 python-setuptools host-python-cffi host-python-packaging
|
||||
ZFS_CONF_ENV += \
|
||||
PYTHON=$(HOST_DIR)/bin/python3 \
|
||||
PYTHON_CPPFLAGS="`$(STAGING_DIR)/usr/bin/python3-config --includes`" \
|
||||
PYTHON_LIBS="`$(STAGING_DIR)/usr/bin/python3-config --ldflags`" \
|
||||
PYTHON_EXTRA_LIBS="`$(STAGING_DIR)/usr/bin/python3-config --libs --embed`" \
|
||||
PYTHON_SITE_PKG="/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages"
|
||||
ZFS_CONF_OPTS += --enable-pyzfs
|
||||
else
|
||||
ZFS_CONF_OPTS += --disable-pyzfs --without-python
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LINUX_PAM),y)
|
||||
ZFS_DEPENDENCIES += linux-pam
|
||||
ZFS_CONF_OPTS += --enable-pam
|
||||
else
|
||||
ZFS_CONF_OPTS += --disable-pam
|
||||
endif
|
||||
|
||||
# Sets the environment for the `make` that will be run ZFS autotools checks.
|
||||
ZFS_CONF_ENV += \
|
||||
ARCH=$(KERNEL_ARCH) \
|
||||
CROSS_COMPILE="$(TARGET_CROSS)"
|
||||
ZFS_MAKE_ENV += \
|
||||
ARCH=$(KERNEL_ARCH) \
|
||||
CROSS_COMPILE="$(TARGET_CROSS)"
|
||||
|
||||
# ZFS userland tools are unfunctional without the Linux kernel modules.
|
||||
ZFS_MODULE_SUBDIRS = \
|
||||
module/avl \
|
||||
module/icp \
|
||||
module/lua \
|
||||
module/nvpair \
|
||||
module/spl \
|
||||
module/unicode \
|
||||
module/zcommon \
|
||||
module/zstd \
|
||||
module/zfs
|
||||
|
||||
# These requirements will be validated by zfs/config/kernel-config-defined.m4
|
||||
define ZFS_LINUX_CONFIG_FIXUPS
|
||||
$(call KCONFIG_DISABLE_OPT,CONFIG_DEBUG_LOCK_ALLOC)
|
||||
$(call KCONFIG_DISABLE_OPT,CONFIG_TRIM_UNUSED_KSYMS)
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_CRYPTO_DEFLATE)
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_ZLIB_DEFLATE)
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_ZLIB_INFLATE)
|
||||
endef
|
||||
|
||||
# Even though zfs builds a kernel module, it gets built directly by
|
||||
# the autotools logic, so we don't use the kernel-module
|
||||
# infrastructure.
|
||||
$(eval $(autotools-package))
|
||||
Reference in New Issue
Block a user