mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +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:
@@ -4,19 +4,16 @@ libspldir = $(includedir)/libspl
|
||||
libspl_HEADERS = \
|
||||
$(top_srcdir)/lib/libspl/include/assert.h \
|
||||
$(top_srcdir)/lib/libspl/include/atomic.h \
|
||||
$(top_srcdir)/lib/libspl/include/attr.h \
|
||||
$(top_srcdir)/lib/libspl/include/devid.h \
|
||||
$(top_srcdir)/lib/libspl/include/libdevinfo.h \
|
||||
$(top_srcdir)/lib/libspl/include/libgen.h \
|
||||
$(top_srcdir)/lib/libspl/include/libshare.h \
|
||||
$(top_srcdir)/lib/libspl/include/limits.h \
|
||||
$(top_srcdir)/lib/libspl/include/locale.h \
|
||||
$(top_srcdir)/lib/libspl/include/note.h \
|
||||
$(top_srcdir)/lib/libspl/include/statcommon.h \
|
||||
$(top_srcdir)/lib/libspl/include/stdio.h \
|
||||
$(top_srcdir)/lib/libspl/include/stdlib.h \
|
||||
$(top_srcdir)/lib/libspl/include/string.h \
|
||||
$(top_srcdir)/lib/libspl/include/strings.h \
|
||||
$(top_srcdir)/lib/libspl/include/stropts.h \
|
||||
$(top_srcdir)/lib/libspl/include/synch.h \
|
||||
$(top_srcdir)/lib/libspl/include/thread.h \
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
/*
|
||||
* CDDL HEADER START
|
||||
*
|
||||
* The contents of this file are subject to the terms of the
|
||||
* Common Development and Distribution License (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
|
||||
*/
|
||||
|
||||
#ifndef _LIBSPL_ATTR_H
|
||||
#define _LIBSPL_ATTR_H
|
||||
|
||||
#endif /* _LIBSPL_ATTR_H */
|
||||
@@ -1,53 +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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* note.h: interface for annotating source with info for tools
|
||||
*
|
||||
* NOTE is the default interface, but if the identifier NOTE is in use for
|
||||
* some other purpose, you may prepare a similar header file using your own
|
||||
* identifier, mapping that identifier to _NOTE. Also, exported header
|
||||
* files should *not* use NOTE, since the name may already be in use in
|
||||
* a program's namespace. Rather, exported header files should include
|
||||
* sys/note.h directly and use _NOTE. For consistency, all kernel source
|
||||
* should use _NOTE.
|
||||
*/
|
||||
|
||||
#ifndef _NOTE_H
|
||||
#define _NOTE_H
|
||||
|
||||
#include <sys/note.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define NOTE _NOTE
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _NOTE_H */
|
||||
@@ -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 \
|
||||
|
||||
@@ -1,30 +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 2008 Sun Microsystems, Inc. All rights reserved.
|
||||
* Use is subject to license terms.
|
||||
*/
|
||||
|
||||
#ifndef _LIBSPL_SYS_COMPRESS_H
|
||||
#define _LIBSPL_SYS_COMPRESS_H
|
||||
|
||||
#endif /* _LIBSPL_SYS_COMPRESS_H */
|
||||
@@ -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 */
|
||||
@@ -24,10 +24,10 @@
|
||||
* Use is subject to license terms.
|
||||
*/
|
||||
|
||||
#ifndef _LIBSPL_STRINGS_H
|
||||
#define _LIBSPL_STRINGS_H
|
||||
#ifndef _LIBSPL_SYS_STRINGS_H
|
||||
#define _LIBSPL_SYS_STRINGS_H
|
||||
|
||||
#include <string.h>
|
||||
#include_next <strings.h>
|
||||
#include <strings.h>
|
||||
|
||||
#endif
|
||||
@@ -98,4 +98,6 @@
|
||||
#define offsetof(s, m) ((size_t)(&(((s *)0)->m)))
|
||||
#endif
|
||||
|
||||
#define _NOTE(x)
|
||||
|
||||
#endif /* _LIBSPL_SYS_SYSMACROS_H */
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -26,8 +26,6 @@
|
||||
#ifndef _SYS_TYPES32_H
|
||||
#define _SYS_TYPES32_H
|
||||
|
||||
|
||||
|
||||
#include <sys/inttypes.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
Reference in New Issue
Block a user