2010-08-26 18:22:58 +00:00
|
|
|
include $(top_srcdir)/config/Rules.am
|
|
|
|
|
2017-08-09 22:31:08 +00:00
|
|
|
VPATH = \
|
|
|
|
$(top_srcdir)/module/icp \
|
|
|
|
$(top_srcdir)/module/zcommon \
|
|
|
|
$(top_srcdir)/lib/libzfs
|
|
|
|
|
2018-01-10 18:49:27 +00:00
|
|
|
# Suppress unused but set variable warnings often due to ASSERTs
|
Clean up lib dependencies
libzutil is currently statically linked into libzfs, libzfs_core and
libzpool. Avoid the unnecessary duplication by removing it from libzfs
and libzpool, and adding libzfs_core to libzpool.
Remove a few unnecessary dependencies:
- libuutil from libzfs_core
- libtirpc from libspl
- keep only libcrypto in libzfs, as we don't use any functions from
libssl
- librt is only used for clock_gettime, however on modern systems that's
in libc rather than librt. Add a configure check to see if we actually
need librt
- libdl from raidz_test
Add a few missing dependencies:
- zlib to libefi and libzfs
- libuuid to zpool, and libuuid and libudev to zed
- libnvpair uses assertions, so add assert.c to provide aok and
libspl_assertf
Sort the LDADD for programs so that libraries that satisfy dependencies
come at the end rather than the beginning of the linker command line.
Revamp the configure tests for libaries to use FIND_SYSTEM_LIBRARY
instead. This can take advantage of pkg-config, and it also avoids
polluting LIBS.
List all the required dependencies in the pkgconfig files, and move the
one for libzfs_core into the latter's directory. Install pkgconfig files
in $(libdir)/pkgconfig on linux and $(prefix)/libdata/pkgconfig on
FreeBSD, instead of /usr/share/pkgconfig, as the more correct location
for library .pc files.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
Closes #10538
2020-06-30 17:10:41 +00:00
|
|
|
AM_CFLAGS += $(LIBCRYPTO_CFLAGS) $(ZLIB_CFLAGS)
|
2021-05-15 09:53:14 +00:00
|
|
|
AM_CFLAGS += -fvisibility=hidden
|
2018-01-10 18:49:27 +00:00
|
|
|
|
Clean up lib dependencies
libzutil is currently statically linked into libzfs, libzfs_core and
libzpool. Avoid the unnecessary duplication by removing it from libzfs
and libzpool, and adding libzfs_core to libzpool.
Remove a few unnecessary dependencies:
- libuutil from libzfs_core
- libtirpc from libspl
- keep only libcrypto in libzfs, as we don't use any functions from
libssl
- librt is only used for clock_gettime, however on modern systems that's
in libc rather than librt. Add a configure check to see if we actually
need librt
- libdl from raidz_test
Add a few missing dependencies:
- zlib to libefi and libzfs
- libuuid to zpool, and libuuid and libudev to zed
- libnvpair uses assertions, so add assert.c to provide aok and
libspl_assertf
Sort the LDADD for programs so that libraries that satisfy dependencies
come at the end rather than the beginning of the linker command line.
Revamp the configure tests for libaries to use FIND_SYSTEM_LIBRARY
instead. This can take advantage of pkg-config, and it also avoids
polluting LIBS.
List all the required dependencies in the pkgconfig files, and move the
one for libzfs_core into the latter's directory. Install pkgconfig files
in $(libdir)/pkgconfig on linux and $(prefix)/libdata/pkgconfig on
FreeBSD, instead of /usr/share/pkgconfig, as the more correct location
for library .pc files.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
Closes #10538
2020-06-30 17:10:41 +00:00
|
|
|
pkgconfig_DATA = libzfs.pc
|
2014-06-06 23:23:22 +00:00
|
|
|
|
2010-08-26 18:22:58 +00:00
|
|
|
lib_LTLIBRARIES = libzfs.la
|
|
|
|
|
2020-11-15 04:35:31 +00:00
|
|
|
include $(top_srcdir)/config/Abigail.am
|
|
|
|
|
2014-06-09 21:55:31 +00:00
|
|
|
USER_C = \
|
2021-05-15 11:00:05 +00:00
|
|
|
libzfs_impl.h \
|
2014-06-09 21:55:31 +00:00
|
|
|
libzfs_changelist.c \
|
|
|
|
libzfs_config.c \
|
Native Encryption for ZFS on Linux
This change incorporates three major pieces:
The first change is a keystore that manages wrapping
and encryption keys for encrypted datasets. These
commands mostly involve manipulating the new
DSL Crypto Key ZAP Objects that live in the MOS. Each
encrypted dataset has its own DSL Crypto Key that is
protected with a user's key. This level of indirection
allows users to change their keys without re-encrypting
their entire datasets. The change implements the new
subcommands "zfs load-key", "zfs unload-key" and
"zfs change-key" which allow the user to manage their
encryption keys and settings. In addition, several new
flags and properties have been added to allow dataset
creation and to make mounting and unmounting more
convenient.
The second piece of this patch provides the ability to
encrypt, decyrpt, and authenticate protected datasets.
Each object set maintains a Merkel tree of Message
Authentication Codes that protect the lower layers,
similarly to how checksums are maintained. This part
impacts the zio layer, which handles the actual
encryption and generation of MACs, as well as the ARC
and DMU, which need to be able to handle encrypted
buffers and protected data.
The last addition is the ability to do raw, encrypted
sends and receives. The idea here is to send raw
encrypted and compressed data and receive it exactly
as is on a backup system. This means that the dataset
on the receiving system is protected using the same
user key that is in use on the sending side. By doing
so, datasets can be efficiently backed up to an
untrusted system without fear of data being
compromised.
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Jorgen Lundman <lundman@lundman.net>
Signed-off-by: Tom Caputi <tcaputi@datto.com>
Closes #494
Closes #5769
2017-08-14 17:36:48 +00:00
|
|
|
libzfs_crypto.c \
|
2014-06-09 21:55:31 +00:00
|
|
|
libzfs_dataset.c \
|
|
|
|
libzfs_diff.c \
|
|
|
|
libzfs_import.c \
|
|
|
|
libzfs_iter.c \
|
|
|
|
libzfs_mount.c \
|
|
|
|
libzfs_pool.c \
|
|
|
|
libzfs_sendrecv.c \
|
|
|
|
libzfs_status.c \
|
|
|
|
libzfs_util.c
|
|
|
|
|
2020-04-14 18:36:28 +00:00
|
|
|
|
|
|
|
if BUILD_FREEBSD
|
|
|
|
USER_C += \
|
|
|
|
os/freebsd/libzfs_compat.c \
|
|
|
|
os/freebsd/libzfs_zmount.c
|
|
|
|
endif
|
|
|
|
|
2019-10-03 17:33:16 +00:00
|
|
|
if BUILD_LINUX
|
|
|
|
USER_C += \
|
|
|
|
os/linux/libzfs_mount_os.c \
|
|
|
|
os/linux/libzfs_pool_os.c \
|
|
|
|
os/linux/libzfs_sendrecv_os.c \
|
|
|
|
os/linux/libzfs_util_os.c
|
|
|
|
endif
|
|
|
|
|
2017-08-09 22:31:08 +00:00
|
|
|
KERNEL_C = \
|
2017-09-12 20:15:11 +00:00
|
|
|
algs/sha2/sha2.c \
|
2020-03-27 16:11:22 +00:00
|
|
|
cityhash.c \
|
2017-08-09 22:31:08 +00:00
|
|
|
zfeature_common.c \
|
|
|
|
zfs_comutil.c \
|
|
|
|
zfs_deleg.c \
|
|
|
|
zfs_fletcher.c \
|
|
|
|
zfs_fletcher_aarch64_neon.c \
|
|
|
|
zfs_fletcher_avx512.c \
|
|
|
|
zfs_fletcher_intel.c \
|
|
|
|
zfs_fletcher_sse.c \
|
|
|
|
zfs_fletcher_superscalar.c \
|
|
|
|
zfs_fletcher_superscalar4.c \
|
|
|
|
zfs_namecheck.c \
|
|
|
|
zfs_prop.c \
|
|
|
|
zpool_prop.c \
|
|
|
|
zprop_common.c
|
2014-06-09 21:55:31 +00:00
|
|
|
|
2020-06-25 18:14:54 +00:00
|
|
|
dist_libzfs_la_SOURCES = \
|
|
|
|
$(USER_C)
|
|
|
|
|
2014-06-09 21:55:31 +00:00
|
|
|
nodist_libzfs_la_SOURCES = \
|
|
|
|
$(KERNEL_C)
|
2011-07-05 19:12:08 +00:00
|
|
|
|
2020-07-13 16:19:18 +00:00
|
|
|
libzfs_la_LIBADD = \
|
|
|
|
$(abs_top_builddir)/lib/libshare/libshare.la \
|
2020-07-06 20:01:29 +00:00
|
|
|
$(abs_top_builddir)/lib/libzfs_core/libzfs_core.la \
|
|
|
|
$(abs_top_builddir)/lib/libnvpair/libnvpair.la \
|
2021-10-07 17:31:26 +00:00
|
|
|
$(abs_top_builddir)/lib/libzutil/libzutil.la \
|
2020-07-06 20:01:29 +00:00
|
|
|
$(abs_top_builddir)/lib/libuutil/libuutil.la
|
Clean up lib dependencies
libzutil is currently statically linked into libzfs, libzfs_core and
libzpool. Avoid the unnecessary duplication by removing it from libzfs
and libzpool, and adding libzfs_core to libzpool.
Remove a few unnecessary dependencies:
- libuutil from libzfs_core
- libtirpc from libspl
- keep only libcrypto in libzfs, as we don't use any functions from
libssl
- librt is only used for clock_gettime, however on modern systems that's
in libc rather than librt. Add a configure check to see if we actually
need librt
- libdl from raidz_test
Add a few missing dependencies:
- zlib to libefi and libzfs
- libuuid to zpool, and libuuid and libudev to zed
- libnvpair uses assertions, so add assert.c to provide aok and
libspl_assertf
Sort the LDADD for programs so that libraries that satisfy dependencies
come at the end rather than the beginning of the linker command line.
Revamp the configure tests for libaries to use FIND_SYSTEM_LIBRARY
instead. This can take advantage of pkg-config, and it also avoids
polluting LIBS.
List all the required dependencies in the pkgconfig files, and move the
one for libzfs_core into the latter's directory. Install pkgconfig files
in $(libdir)/pkgconfig on linux and $(prefix)/libdata/pkgconfig on
FreeBSD, instead of /usr/share/pkgconfig, as the more correct location
for library .pc files.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
Closes #10538
2020-06-30 17:10:41 +00:00
|
|
|
|
2021-05-13 04:21:35 +00:00
|
|
|
libzfs_la_LIBADD += -lm $(LIBCRYPTO_LIBS) $(ZLIB_LIBS) $(LIBFETCH_LIBS) $(LTLIBINTL)
|
Clean up lib dependencies
libzutil is currently statically linked into libzfs, libzfs_core and
libzpool. Avoid the unnecessary duplication by removing it from libzfs
and libzpool, and adding libzfs_core to libzpool.
Remove a few unnecessary dependencies:
- libuutil from libzfs_core
- libtirpc from libspl
- keep only libcrypto in libzfs, as we don't use any functions from
libssl
- librt is only used for clock_gettime, however on modern systems that's
in libc rather than librt. Add a configure check to see if we actually
need librt
- libdl from raidz_test
Add a few missing dependencies:
- zlib to libefi and libzfs
- libuuid to zpool, and libuuid and libudev to zed
- libnvpair uses assertions, so add assert.c to provide aok and
libspl_assertf
Sort the LDADD for programs so that libraries that satisfy dependencies
come at the end rather than the beginning of the linker command line.
Revamp the configure tests for libaries to use FIND_SYSTEM_LIBRARY
instead. This can take advantage of pkg-config, and it also avoids
polluting LIBS.
List all the required dependencies in the pkgconfig files, and move the
one for libzfs_core into the latter's directory. Install pkgconfig files
in $(libdir)/pkgconfig on linux and $(prefix)/libdata/pkgconfig on
FreeBSD, instead of /usr/share/pkgconfig, as the more correct location
for library .pc files.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
Closes #10538
2020-06-30 17:10:41 +00:00
|
|
|
|
2020-07-14 19:17:44 +00:00
|
|
|
libzfs_la_LDFLAGS = -pthread
|
|
|
|
|
|
|
|
if !ASAN_ENABLED
|
|
|
|
libzfs_la_LDFLAGS += -Wl,-z,defs
|
|
|
|
endif
|
Clean up lib dependencies
libzutil is currently statically linked into libzfs, libzfs_core and
libzpool. Avoid the unnecessary duplication by removing it from libzfs
and libzpool, and adding libzfs_core to libzpool.
Remove a few unnecessary dependencies:
- libuutil from libzfs_core
- libtirpc from libspl
- keep only libcrypto in libzfs, as we don't use any functions from
libssl
- librt is only used for clock_gettime, however on modern systems that's
in libc rather than librt. Add a configure check to see if we actually
need librt
- libdl from raidz_test
Add a few missing dependencies:
- zlib to libefi and libzfs
- libuuid to zpool, and libuuid and libudev to zed
- libnvpair uses assertions, so add assert.c to provide aok and
libspl_assertf
Sort the LDADD for programs so that libraries that satisfy dependencies
come at the end rather than the beginning of the linker command line.
Revamp the configure tests for libaries to use FIND_SYSTEM_LIBRARY
instead. This can take advantage of pkg-config, and it also avoids
polluting LIBS.
List all the required dependencies in the pkgconfig files, and move the
one for libzfs_core into the latter's directory. Install pkgconfig files
in $(libdir)/pkgconfig on linux and $(prefix)/libdata/pkgconfig on
FreeBSD, instead of /usr/share/pkgconfig, as the more correct location
for library .pc files.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
Closes #10538
2020-06-30 17:10:41 +00:00
|
|
|
|
2020-04-14 18:36:28 +00:00
|
|
|
if BUILD_FREEBSD
|
|
|
|
libzfs_la_LIBADD += -lutil -lgeom
|
|
|
|
endif
|
2014-06-09 21:55:31 +00:00
|
|
|
|
2021-04-01 23:53:05 +00:00
|
|
|
libzfs_la_LDFLAGS += -version-info 5:0:1
|
2020-10-31 14:39:58 +00:00
|
|
|
|
2021-01-22 20:54:34 +00:00
|
|
|
include $(top_srcdir)/config/CppCheck.am
|
|
|
|
|
2020-11-21 18:44:52 +00:00
|
|
|
# Library ABI
|
|
|
|
EXTRA_DIST = libzfs.abi libzfs.suppr
|
|
|
|
|
2019-01-08 17:29:34 +00:00
|
|
|
# Licensing data
|
2020-11-21 18:44:52 +00:00
|
|
|
EXTRA_DIST += THIRDPARTYLICENSE.openssl THIRDPARTYLICENSE.openssl.descrip
|