2010-08-26 22:22:58 +04:00
|
|
|
include $(top_srcdir)/config/Rules.am
|
|
|
|
|
2017-08-10 01:31:08 +03:00
|
|
|
VPATH = \
|
|
|
|
$(top_srcdir)/module/icp \
|
|
|
|
$(top_srcdir)/module/zcommon \
|
|
|
|
$(top_srcdir)/lib/libzfs
|
|
|
|
|
2018-01-10 21:49:27 +03:00
|
|
|
# Suppress unused but set variable warnings often due to ASSERTs
|
|
|
|
AM_CFLAGS += $(NO_UNUSED_BUT_SET_VARIABLE)
|
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 20:10:41 +03:00
|
|
|
AM_CFLAGS += $(LIBCRYPTO_CFLAGS) $(ZLIB_CFLAGS)
|
2021-05-15 12:53:14 +03:00
|
|
|
AM_CFLAGS += -fvisibility=hidden
|
2018-01-10 21:49:27 +03: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 20:10:41 +03:00
|
|
|
pkgconfig_DATA = libzfs.pc
|
2014-06-07 03:23:22 +04:00
|
|
|
|
2010-08-26 22:22:58 +04:00
|
|
|
lib_LTLIBRARIES = libzfs.la
|
|
|
|
|
2020-11-15 07:35:31 +03:00
|
|
|
include $(top_srcdir)/config/Abigail.am
|
|
|
|
|
2014-06-10 01:55:31 +04:00
|
|
|
USER_C = \
|
2021-05-15 14:00:05 +03:00
|
|
|
libzfs_impl.h \
|
2014-06-10 01:55:31 +04: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 20:36:48 +03:00
|
|
|
libzfs_crypto.c \
|
2014-06-10 01:55:31 +04: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 21:36:28 +03:00
|
|
|
|
|
|
|
if BUILD_FREEBSD
|
|
|
|
USER_C += \
|
|
|
|
os/freebsd/libzfs_compat.c \
|
|
|
|
os/freebsd/libzfs_zmount.c
|
|
|
|
endif
|
|
|
|
|
2019-10-03 20:33:16 +03: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-10 01:31:08 +03:00
|
|
|
KERNEL_C = \
|
2017-09-12 23:15:11 +03:00
|
|
|
algs/sha2/sha2.c \
|
2020-03-27 19:11:22 +03:00
|
|
|
cityhash.c \
|
2017-08-10 01:31:08 +03: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-10 01:55:31 +04:00
|
|
|
|
2020-06-25 21:14:54 +03:00
|
|
|
dist_libzfs_la_SOURCES = \
|
|
|
|
$(USER_C)
|
|
|
|
|
2014-06-10 01:55:31 +04:00
|
|
|
nodist_libzfs_la_SOURCES = \
|
|
|
|
$(KERNEL_C)
|
2011-07-05 23:12:08 +04:00
|
|
|
|
2020-07-13 19:19:18 +03:00
|
|
|
libzfs_la_LIBADD = \
|
|
|
|
$(abs_top_builddir)/lib/libshare/libshare.la \
|
2020-07-06 23:01:29 +03:00
|
|
|
$(abs_top_builddir)/lib/libzfs_core/libzfs_core.la \
|
|
|
|
$(abs_top_builddir)/lib/libnvpair/libnvpair.la \
|
2021-10-07 20:31:26 +03:00
|
|
|
$(abs_top_builddir)/lib/libzutil/libzutil.la \
|
2020-07-06 23:01:29 +03: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 20:10:41 +03:00
|
|
|
|
2021-05-13 07:21:35 +03: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 20:10:41 +03:00
|
|
|
|
2020-07-14 22:17:44 +03: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 20:10:41 +03:00
|
|
|
|
2020-04-14 21:36:28 +03:00
|
|
|
if BUILD_FREEBSD
|
|
|
|
libzfs_la_LIBADD += -lutil -lgeom
|
|
|
|
endif
|
2014-06-10 01:55:31 +04:00
|
|
|
|
2021-04-02 02:53:05 +03:00
|
|
|
libzfs_la_LDFLAGS += -version-info 5:0:1
|
2020-10-31 17:39:58 +03:00
|
|
|
|
2021-01-22 23:54:34 +03:00
|
|
|
include $(top_srcdir)/config/CppCheck.am
|
|
|
|
|
2020-11-21 21:44:52 +03:00
|
|
|
# Library ABI
|
|
|
|
EXTRA_DIST = libzfs.abi libzfs.suppr
|
|
|
|
|
2019-01-08 20:29:34 +03:00
|
|
|
# Licensing data
|
2020-11-21 21:44:52 +03:00
|
|
|
EXTRA_DIST += THIRDPARTYLICENSE.openssl THIRDPARTYLICENSE.openssl.descrip
|