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:
Brian Behlendorf
2018-02-15 17:53:18 -08:00
parent 1272941f49
commit 93ce2b4ca5
209 changed files with 1096 additions and 1164 deletions
+2 -3
View File
@@ -8,7 +8,6 @@ libspl_HEADERS = \
$(top_srcdir)/lib/libspl/include/sys/byteorder.h \
$(top_srcdir)/lib/libspl/include/sys/callb.h \
$(top_srcdir)/lib/libspl/include/sys/cmn_err.h \
$(top_srcdir)/lib/libspl/include/sys/compress.h \
$(top_srcdir)/lib/libspl/include/sys/cred.h \
$(top_srcdir)/lib/libspl/include/sys/debug.h \
$(top_srcdir)/lib/libspl/include/sys/dkio.h \
@@ -28,7 +27,6 @@ libspl_HEADERS = \
$(top_srcdir)/lib/libspl/include/sys/mkdev.h \
$(top_srcdir)/lib/libspl/include/sys/mnttab.h \
$(top_srcdir)/lib/libspl/include/sys/mount.h \
$(top_srcdir)/lib/libspl/include/sys/note.h \
$(top_srcdir)/lib/libspl/include/sys/param.h \
$(top_srcdir)/lib/libspl/include/sys/policy.h \
$(top_srcdir)/lib/libspl/include/sys/poll.h \
@@ -37,11 +35,12 @@ libspl_HEADERS = \
$(top_srcdir)/lib/libspl/include/sys/signal.h \
$(top_srcdir)/lib/libspl/include/sys/stack.h \
$(top_srcdir)/lib/libspl/include/sys/stat.h \
$(top_srcdir)/lib/libspl/include/sys/stdtypes.h \
$(top_srcdir)/lib/libspl/include/sys/strings.h \
$(top_srcdir)/lib/libspl/include/sys/stropts.h \
$(top_srcdir)/lib/libspl/include/sys/sunddi.h \
$(top_srcdir)/lib/libspl/include/sys/sysmacros.h \
$(top_srcdir)/lib/libspl/include/sys/systeminfo.h \
$(top_srcdir)/lib/libspl/include/sys/systm.h \
$(top_srcdir)/lib/libspl/include/sys/time.h \
$(top_srcdir)/lib/libspl/include/sys/types32.h \
$(top_srcdir)/lib/libspl/include/sys/types.h \
-54
View File
@@ -1,54 +0,0 @@
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright (c) 1994 by Sun Microsystems, Inc.
*/
/*
* sys/note.h: interface for annotating source with info for tools
*
* This is the underlying interface; NOTE (/usr/include/note.h) is the
* preferred interface, but all exported header files should include this
* file directly and use _NOTE so as not to take "NOTE" from the user's
* namespace. For consistency, *all* kernel source should use _NOTE.
*
* By default, annotations expand to nothing. This file implements
* that. Tools using annotations will interpose a different version
* of this file that will expand annotations as needed.
*/
#ifndef _SYS_NOTE_H
#define _SYS_NOTE_H
#ifdef __cplusplus
extern "C" {
#endif
#ifndef _NOTE
#define _NOTE(s)
#endif
#ifdef __cplusplus
}
#endif
#endif /* _SYS_NOTE_H */
@@ -19,12 +19,36 @@
*
* CDDL HEADER END
*/
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _LIBSPL_SYS_SYSTM_H
#define _LIBSPL_SYS_SYSTM_H
#ifndef __SYS_STDTYPES_H
#define __SYS_STDTYPES_H
#endif /* _LIBSPL_SYS_SYSTM_H */
typedef enum {
B_FALSE = 0,
B_TRUE = 1
} boolean_t;
typedef unsigned char uchar_t;
typedef unsigned short ushort_t;
typedef unsigned int uint_t;
typedef unsigned long ulong_t;
typedef unsigned long long u_longlong_t;
typedef long long longlong_t;
typedef longlong_t offset_t;
typedef u_longlong_t u_offset_t;
typedef u_longlong_t len_t;
typedef longlong_t diskaddr_t;
typedef ulong_t pgcnt_t; /* number of pages */
typedef long spgcnt_t; /* signed number of pages */
typedef short pri_t;
typedef ushort_t o_mode_t; /* old file attribute type */
typedef int major_t;
typedef int minor_t;
typedef short index_t;
#endif /* __SYS_STDTYPES_H */
@@ -20,11 +20,14 @@
* CDDL HEADER END
*/
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _LIBSPL_SYS_COMPRESS_H
#define _LIBSPL_SYS_COMPRESS_H
#ifndef _LIBSPL_SYS_STRINGS_H
#define _LIBSPL_SYS_STRINGS_H
#endif /* _LIBSPL_SYS_COMPRESS_H */
#include <string.h>
#include <strings.h>
#endif
+2
View File
@@ -98,4 +98,6 @@
#define offsetof(s, m) ((size_t)(&(((s *)0)->m)))
#endif
#define _NOTE(x)
#endif /* _LIBSPL_SYS_SYSMACROS_H */
+1 -26
View File
@@ -38,40 +38,15 @@
#include_next <sys/types.h>
#include <sys/types32.h>
#include <sys/va_list.h>
#include <sys/stdtypes.h>
#ifndef HAVE_INTTYPES
#include <inttypes.h>
typedef enum boolean { B_FALSE, B_TRUE } boolean_t;
typedef unsigned char uchar_t;
typedef unsigned short ushort_t;
typedef unsigned int uint_t;
typedef unsigned long ulong_t;
typedef long long longlong_t;
typedef unsigned long long u_longlong_t;
#endif /* HAVE_INTTYPES */
typedef longlong_t offset_t;
typedef u_longlong_t u_offset_t;
typedef u_longlong_t len_t;
typedef longlong_t diskaddr_t;
typedef ulong_t pgcnt_t; /* number of pages */
typedef long spgcnt_t; /* signed number of pages */
typedef short pri_t;
typedef int zoneid_t;
typedef int projid_t;
typedef int major_t;
typedef int minor_t;
typedef ushort_t o_mode_t; /* old file attribute type */
typedef short index_t;
/*
* Definitions remaining from previous partial support for 64-bit file
* offsets. This partial support for devices greater than 2gb requires
-2
View File
@@ -26,8 +26,6 @@
#ifndef _SYS_TYPES32_H
#define _SYS_TYPES32_H
#include <sys/inttypes.h>
#ifdef __cplusplus