mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
Update build system and packaging
Minimal changes required to integrate the SPL sources in to the
ZFS repository build infrastructure and packaging.
Build system and packaging:
* Renamed SPL_* autoconf m4 macros to ZFS_*.
* Removed redundant SPL_* autoconf m4 macros.
* Updated the RPM spec files to remove SPL package dependency.
* The zfs package obsoletes the spl package, and the zfs-kmod
package obsoletes the spl-kmod package.
* The zfs-kmod-devel* packages were updated to add compatibility
symlinks under /usr/src/spl-x.y.z until all dependent packages
can be updated. They will be removed in a future release.
* Updated copy-builtin script for in-kernel builds.
* Updated DKMS package to include the spl.ko.
* Updated stale AUTHORS file to include all contributors.
* Updated stale COPYRIGHT and included the SPL as an exception.
* Renamed README.markdown to README.md
* Renamed OPENSOLARIS.LICENSE to LICENSE.
* Renamed DISCLAIMER to NOTICE.
Required code changes:
* Removed redundant HAVE_SPL macro.
* Removed _BOOT from nvpairs since it doesn't apply for Linux.
* Initial header cleanup (removal of empty headers, refactoring).
* Remove SPL repository clone/build from zimport.sh.
* Use of DEFINE_RATELIMIT_STATE and DEFINE_SPINLOCK removed due
to build issues when forcing C99 compilation.
* Replaced legacy ACCESS_ONCE with READ_ONCE.
* Include needed headers for `current` and `EXPORT_SYMBOL`.
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Olaf Faaland <faaland1@llnl.gov>
Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Reviewed-by: Pavel Zakharov <pavel.zakharov@delphix.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
TEST_ZIMPORT_SKIP="yes"
Closes #7556
This commit is contained in:
@@ -26,9 +26,7 @@
|
||||
* Copyright (c) 2014, Nexenta Systems, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#ifdef _KERNEL
|
||||
#include <sys/systm.h>
|
||||
#else
|
||||
#ifndef _KERNEL
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#endif
|
||||
@@ -351,7 +349,7 @@ zpool_feature_init(void)
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(_KERNEL) && defined(HAVE_SPL)
|
||||
#if defined(_KERNEL)
|
||||
EXPORT_SYMBOL(zfeature_lookup_name);
|
||||
EXPORT_SYMBOL(zfeature_is_supported);
|
||||
EXPORT_SYMBOL(zfeature_is_valid_guid);
|
||||
|
||||
@@ -29,15 +29,12 @@
|
||||
* then a separate file should to be created.
|
||||
*/
|
||||
|
||||
#if defined(_KERNEL)
|
||||
#include <sys/systm.h>
|
||||
#else
|
||||
#if !defined(_KERNEL)
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/fs/zfs.h>
|
||||
#include <sys/int_limits.h>
|
||||
#include <sys/nvpair.h>
|
||||
#include "zfs_comutil.h"
|
||||
#include <sys/zfs_ratelimit.h>
|
||||
@@ -207,7 +204,7 @@ const char *zfs_history_event_names[ZFS_NUM_LEGACY_HISTORY_EVENTS] = {
|
||||
"pool split",
|
||||
};
|
||||
|
||||
#if defined(_KERNEL) && defined(HAVE_SPL)
|
||||
#if defined(_KERNEL)
|
||||
EXPORT_SYMBOL(zfs_allocatable_devs);
|
||||
EXPORT_SYMBOL(zpool_get_rewind_policy);
|
||||
EXPORT_SYMBOL(zfs_zpl_version_map);
|
||||
|
||||
@@ -28,16 +28,15 @@
|
||||
#include <sys/zfs_context.h>
|
||||
|
||||
#if defined(_KERNEL)
|
||||
#include <sys/systm.h>
|
||||
#include <sys/sunddi.h>
|
||||
#include <sys/ctype.h>
|
||||
#else
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <strings.h>
|
||||
#include <libnvpair.h>
|
||||
#include <ctype.h>
|
||||
#endif
|
||||
#include <sys/strings.h>
|
||||
#include <sys/dsl_deleg.h>
|
||||
#include "zfs_prop.h"
|
||||
#include "zfs_deleg.h"
|
||||
@@ -244,7 +243,7 @@ zfs_deleg_whokey(char *attr, zfs_deleg_who_type_t type,
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(_KERNEL) && defined(HAVE_SPL)
|
||||
#if defined(_KERNEL)
|
||||
EXPORT_SYMBOL(zfs_deleg_verify_nvlist);
|
||||
EXPORT_SYMBOL(zfs_deleg_whokey);
|
||||
EXPORT_SYMBOL(zfs_deleg_canonicalize_perm);
|
||||
|
||||
@@ -867,7 +867,7 @@ zio_abd_checksum_func_t fletcher_4_abd_ops = {
|
||||
};
|
||||
|
||||
|
||||
#if defined(_KERNEL) && defined(HAVE_SPL)
|
||||
#if defined(_KERNEL)
|
||||
#include <linux/mod_compat.h>
|
||||
|
||||
static int
|
||||
|
||||
@@ -45,8 +45,8 @@
|
||||
|
||||
#include <linux/simd_aarch64.h>
|
||||
#include <sys/spa_checksum.h>
|
||||
#include <sys/strings.h>
|
||||
#include <zfs_fletcher.h>
|
||||
#include <strings.h>
|
||||
|
||||
static void
|
||||
fletcher_4_aarch64_neon_init(fletcher_4_ctx_t *ctx)
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
#include <sys/byteorder.h>
|
||||
#include <sys/frame.h>
|
||||
#include <sys/spa_checksum.h>
|
||||
#include <sys/strings.h>
|
||||
#include <zfs_fletcher.h>
|
||||
#include <strings.h>
|
||||
|
||||
#define __asm __asm__ __volatile__
|
||||
|
||||
|
||||
@@ -44,8 +44,8 @@
|
||||
|
||||
#include <linux/simd_x86.h>
|
||||
#include <sys/spa_checksum.h>
|
||||
#include <sys/strings.h>
|
||||
#include <zfs_fletcher.h>
|
||||
#include <strings.h>
|
||||
|
||||
static void
|
||||
fletcher_4_avx2_init(fletcher_4_ctx_t *ctx)
|
||||
|
||||
@@ -46,8 +46,8 @@
|
||||
#include <linux/simd_x86.h>
|
||||
#include <sys/spa_checksum.h>
|
||||
#include <sys/byteorder.h>
|
||||
#include <sys/strings.h>
|
||||
#include <zfs_fletcher.h>
|
||||
#include <strings.h>
|
||||
|
||||
static void
|
||||
fletcher_4_sse2_init(fletcher_4_ctx_t *ctx)
|
||||
|
||||
@@ -43,8 +43,8 @@
|
||||
|
||||
#include <sys/byteorder.h>
|
||||
#include <sys/spa_checksum.h>
|
||||
#include <sys/strings.h>
|
||||
#include <zfs_fletcher.h>
|
||||
#include <strings.h>
|
||||
|
||||
static void
|
||||
fletcher_4_superscalar_init(fletcher_4_ctx_t *ctx)
|
||||
|
||||
@@ -43,8 +43,8 @@
|
||||
|
||||
#include <sys/byteorder.h>
|
||||
#include <sys/spa_checksum.h>
|
||||
#include <sys/strings.h>
|
||||
#include <zfs_fletcher.h>
|
||||
#include <strings.h>
|
||||
|
||||
static void
|
||||
fletcher_4_superscalar4_init(fletcher_4_ctx_t *ctx)
|
||||
|
||||
@@ -38,9 +38,7 @@
|
||||
* Each function returns 0 on success, -1 on error.
|
||||
*/
|
||||
|
||||
#if defined(_KERNEL)
|
||||
#include <sys/systm.h>
|
||||
#else
|
||||
#if !defined(_KERNEL)
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
@@ -349,7 +347,7 @@ pool_namecheck(const char *pool, namecheck_err_t *why, char *what)
|
||||
return (0);
|
||||
}
|
||||
|
||||
#if defined(_KERNEL) && defined(HAVE_SPL)
|
||||
#if defined(_KERNEL)
|
||||
EXPORT_SYMBOL(pool_namecheck);
|
||||
EXPORT_SYMBOL(dataset_namecheck);
|
||||
EXPORT_SYMBOL(zfs_component_namecheck);
|
||||
|
||||
@@ -39,9 +39,7 @@
|
||||
#include "zfs_deleg.h"
|
||||
#include "zfs_fletcher.h"
|
||||
|
||||
#if defined(_KERNEL)
|
||||
#include <sys/systm.h>
|
||||
#else
|
||||
#if !defined(_KERNEL)
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
@@ -847,7 +845,7 @@ zfs_prop_align_right(zfs_prop_t prop)
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(_KERNEL) && defined(HAVE_SPL)
|
||||
#if defined(_KERNEL)
|
||||
static int __init
|
||||
zcommon_init(void)
|
||||
{
|
||||
|
||||
@@ -49,6 +49,8 @@
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/uio_impl.h>
|
||||
#include <sys/sysmacros.h>
|
||||
#include <sys/strings.h>
|
||||
#include <linux/kmap_compat.h>
|
||||
|
||||
/*
|
||||
|
||||
@@ -32,9 +32,7 @@
|
||||
|
||||
#include "zfs_prop.h"
|
||||
|
||||
#if defined(_KERNEL)
|
||||
#include <sys/systm.h>
|
||||
#else
|
||||
#if !defined(_KERNEL)
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
@@ -244,7 +242,7 @@ zpool_prop_align_right(zpool_prop_t prop)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(_KERNEL) && defined(HAVE_SPL)
|
||||
#if defined(_KERNEL)
|
||||
/* zpool property functions */
|
||||
EXPORT_SYMBOL(zpool_prop_init);
|
||||
EXPORT_SYMBOL(zpool_prop_get_type);
|
||||
|
||||
@@ -41,8 +41,9 @@
|
||||
#include "zfs_deleg.h"
|
||||
|
||||
#if defined(_KERNEL)
|
||||
#include <sys/systm.h>
|
||||
#include <util/qsort.h>
|
||||
#include <linux/sort.h>
|
||||
#define qsort(base, num, size, cmp) \
|
||||
sort(base, num, size, cmp, NULL)
|
||||
#else
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -435,7 +436,7 @@ zprop_width(int prop, boolean_t *fixed, zfs_type_t type)
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(_KERNEL) && defined(HAVE_SPL)
|
||||
#if defined(_KERNEL)
|
||||
/* Common routines to initialize property tables */
|
||||
EXPORT_SYMBOL(zprop_register_impl);
|
||||
EXPORT_SYMBOL(zprop_register_string);
|
||||
|
||||
Reference in New Issue
Block a user