autoconf: use include directives instead of recursing down cmd
No installation diff, dist lost -zfs-2.1.99/cmd/fsck_zfs/fsck.zfs which was distributed erroneously, since it's generated Also clean gitrev on clean Also add -e 'any possible bashisms' to default checkbashisms flags, and fully parallelise it and shellcheck, and it works out-of-tree, too Also align the Release in the dist META file correctly Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #13316
This commit is contained in:
parent
3ff81c4601
commit
5cdca5b1da
90
.gitignore
vendored
90
.gitignore
vendored
@ -1,6 +1,7 @@
|
||||
#
|
||||
# N.B.
|
||||
# This is the toplevel .gitignore file.
|
||||
# This is the top-level .gitignore file:
|
||||
# ignore everything except a list of allowed files.
|
||||
#
|
||||
# This is not the place for entries that are specific to
|
||||
# a subdirectory. Instead add those files to the
|
||||
# .gitignore file in that subdirectory.
|
||||
@ -10,6 +11,56 @@
|
||||
# command after changing this file, to see if there are
|
||||
# any tracked files which get ignored after the change.
|
||||
|
||||
*
|
||||
|
||||
!.github
|
||||
!cmd
|
||||
!config
|
||||
!contrib
|
||||
!etc
|
||||
!include
|
||||
!lib
|
||||
!man
|
||||
!module
|
||||
!rpm
|
||||
!scripts
|
||||
!tests
|
||||
!udev
|
||||
|
||||
!.github/**
|
||||
!cmd/**
|
||||
!config/**
|
||||
!contrib/**
|
||||
!etc/**
|
||||
!include/**
|
||||
!lib/**
|
||||
!man/**
|
||||
!module/**
|
||||
!rpm/**
|
||||
!scripts/**
|
||||
!tests/**
|
||||
!udev/**
|
||||
|
||||
!.editorconfig
|
||||
!.gitignore
|
||||
!.gitmodules
|
||||
!AUTHORS
|
||||
!autogen.sh
|
||||
!CODE_OF_CONDUCT.md
|
||||
!configure.ac
|
||||
!copy-builtin
|
||||
!COPYRIGHT
|
||||
!LICENSE
|
||||
!Makefile.am
|
||||
!META
|
||||
!NEWS
|
||||
!NOTICE
|
||||
!README.md
|
||||
!RELEASES.md
|
||||
!TEST
|
||||
!zfs.release.in
|
||||
|
||||
|
||||
#
|
||||
# Normal rules
|
||||
#
|
||||
@ -31,40 +82,7 @@
|
||||
modules.order
|
||||
Makefile
|
||||
Makefile.in
|
||||
|
||||
#
|
||||
# Top level generated files specific to this top level dir
|
||||
#
|
||||
/bin
|
||||
/build
|
||||
/configure
|
||||
/config.log
|
||||
/config.status
|
||||
/libtool
|
||||
/zfs_config.h
|
||||
/zfs_config.h.in
|
||||
/zfs.release
|
||||
/stamp-h1
|
||||
/aclocal.m4
|
||||
/autom4te.cache
|
||||
|
||||
#
|
||||
# Top level generic files
|
||||
#
|
||||
!.gitignore
|
||||
tags
|
||||
TAGS
|
||||
current
|
||||
cscope.*
|
||||
*.rpm
|
||||
*.deb
|
||||
*.tar.gz
|
||||
*.patch
|
||||
*.orig
|
||||
*.log
|
||||
*.tmp
|
||||
venv
|
||||
|
||||
*.so
|
||||
*.so.debug
|
||||
*.so.full
|
||||
*.log
|
||||
|
32
Makefile.am
32
Makefile.am
@ -1,6 +1,11 @@
|
||||
CLEANFILES =
|
||||
EXTRA_DIST =
|
||||
INSTALL_DATA_HOOKS =
|
||||
|
||||
include $(top_srcdir)/config/Shellcheck.am
|
||||
include $(top_srcdir)/config/Rules.am
|
||||
include $(top_srcdir)/config/CppCheck.am
|
||||
include $(top_srcdir)/config/Substfiles.am
|
||||
|
||||
ACLOCAL_AMFLAGS = -I config
|
||||
|
||||
@ -9,11 +14,11 @@ if BUILD_LINUX
|
||||
SUBDIRS += rpm
|
||||
endif
|
||||
|
||||
EXTRA_DIST =
|
||||
CPPCHECKDIRS += cmd etc/systemd/system-generators
|
||||
CPPCHECKDIRS += etc/systemd/system-generators
|
||||
if CONFIG_USER
|
||||
SUBDIRS += scripts . man tests cmd etc contrib
|
||||
SUBDIRS += scripts . man tests etc contrib
|
||||
include $(srcdir)/%D%/lib/Makefile.am
|
||||
include $(srcdir)/%D%/cmd/Makefile.am
|
||||
if BUILD_LINUX
|
||||
SUBDIRS += udev
|
||||
endif
|
||||
@ -51,18 +56,22 @@ EXTRA_DIST += module/zfs/THIRDPARTYLICENSE.cityhash.descrip
|
||||
@CODE_COVERAGE_RULES@
|
||||
|
||||
GITREV = include/zfs_gitrev.h
|
||||
|
||||
CLEANFILES += $(GITREV)
|
||||
PHONY += gitrev
|
||||
gitrev:
|
||||
$(AM_V_GEN)$(top_srcdir)/scripts/make_gitrev.sh $(GITREV)
|
||||
|
||||
all: gitrev
|
||||
|
||||
# Double-colon rules are allowed; there are multiple independent definitions.
|
||||
maintainer-clean-local::
|
||||
PHONY += install-data-hook $(INSTALL_DATA_HOOKS)
|
||||
install-data-hook: $(INSTALL_DATA_HOOKS)
|
||||
|
||||
PHONY += maintainer-clean-local
|
||||
maintainer-clean-local:
|
||||
-$(RM) $(GITREV)
|
||||
|
||||
distclean-local::
|
||||
PHONY += distclean-local
|
||||
distclean-local:
|
||||
-$(RM) -R autom4te*.cache build
|
||||
-find . \( -name SCCS -o -name BitKeeper -o -name .svn -o -name CVS \
|
||||
-o -name .pc -o -name .hg -o -name .git \) -prune -o \
|
||||
@ -78,9 +87,8 @@ all-local:
|
||||
-SCRIPT_COMMON=$(top_builddir)/scripts/common.sh $(top_srcdir)/scripts/zfs-tests.sh -c
|
||||
|
||||
dist-hook:
|
||||
$(AM_V_GEN)$(top_srcdir)/scripts/make_gitrev.sh -D $(distdir) $(GITREV)
|
||||
$(SED) ${ac_inplace} -e 's/Release:[[:print:]]*/Release: $(RELEASE)/' \
|
||||
$(distdir)/META
|
||||
$(top_srcdir)/scripts/make_gitrev.sh -D $(distdir) $(GITREV)
|
||||
$(SED) $(ac_inplace) 's/\(Release:[[:space:]]*\).*/\1$(RELEASE)/' $(distdir)/META
|
||||
|
||||
PHONY += codecheck
|
||||
codecheck: cstyle shellcheck checkbashisms flake8 mancheck testscheck vcscheck zstdcheck
|
||||
@ -114,8 +122,8 @@ cstyle:
|
||||
|
||||
filter_executable = -exec test -x '{}' \; -print
|
||||
|
||||
SHELLCHECKDIRS = cmd contrib etc scripts tests
|
||||
SHELLCHECKSCRIPTS = autogen.sh
|
||||
SHELLCHECKDIRS = contrib etc scripts tests
|
||||
SHELLCHECKSCRIPTS += autogen.sh
|
||||
|
||||
PHONY += mancheck
|
||||
mancheck:
|
||||
|
@ -1,23 +1,39 @@
|
||||
PHONY =
|
||||
include $(top_srcdir)/config/Shellcheck.am
|
||||
include $(top_srcdir)/config/CppCheck.am
|
||||
bin_SCRIPTS =
|
||||
bin_PROGRAMS =
|
||||
sbin_SCRIPTS =
|
||||
sbin_PROGRAMS =
|
||||
udev_PROGRAMS =
|
||||
dist_bin_SCRIPTS =
|
||||
zfsexec_PROGRAMS =
|
||||
dist_udev_SCRIPTS =
|
||||
mounthelper_PROGRAMS =
|
||||
|
||||
SUBDIRS = zfs zpool zdb zhack zinject zstream ztest
|
||||
SUBDIRS += fsck_zfs vdev_id raidz_test zfs_ids_to_path
|
||||
SUBDIRS += zpool_influxdb
|
||||
|
||||
CPPCHECKDIRS += zfs zpool zdb zhack zinject zstream ztest
|
||||
CPPCHECKDIRS += raidz_test zfs_ids_to_path zpool_influxdb
|
||||
|
||||
# TODO: #12084: SHELLCHECKDIRS += vdev_id
|
||||
SHELLCHECKDIRS = fsck_zfs zed zpool zvol_wait
|
||||
|
||||
if USING_PYTHON
|
||||
SUBDIRS += arcstat arc_summary dbufstat
|
||||
endif
|
||||
include $(srcdir)/%D%/fsck_zfs/Makefile.am
|
||||
include $(srcdir)/%D%/raidz_test/Makefile.am
|
||||
include $(srcdir)/%D%/vdev_id/Makefile.am
|
||||
include $(srcdir)/%D%/zdb/Makefile.am
|
||||
include $(srcdir)/%D%/zfs/Makefile.am
|
||||
include $(srcdir)/%D%/zfs_ids_to_path/Makefile.am
|
||||
include $(srcdir)/%D%/zhack/Makefile.am
|
||||
include $(srcdir)/%D%/zinject/Makefile.am
|
||||
include $(srcdir)/%D%/zpool/Makefile.am
|
||||
include $(srcdir)/%D%/zpool_influxdb/Makefile.am
|
||||
include $(srcdir)/%D%/zstream/Makefile.am
|
||||
include $(srcdir)/%D%/ztest/Makefile.am
|
||||
|
||||
if BUILD_LINUX
|
||||
SUBDIRS += mount_zfs zed zgenhostid zvol_id zvol_wait
|
||||
CPPCHECKDIRS += mount_zfs zed zgenhostid zvol_id
|
||||
SHELLCHECKDIRS += zed
|
||||
include $(srcdir)/%D%/mount_zfs/Makefile.am
|
||||
include $(srcdir)/%D%/zed/Makefile.am
|
||||
include $(srcdir)/%D%/zgenhostid/Makefile.am
|
||||
include $(srcdir)/%D%/zvol_id/Makefile.am
|
||||
include $(srcdir)/%D%/zvol_wait/Makefile.am
|
||||
endif
|
||||
|
||||
if USING_PYTHON
|
||||
include $(srcdir)/%D%/arc_summary/Makefile.am
|
||||
include $(srcdir)/%D%/arcstat/Makefile.am
|
||||
include $(srcdir)/%D%/dbufstat/Makefile.am
|
||||
endif
|
||||
|
||||
PHONY += cmd
|
||||
cmd: $(bin_SCRIPTS) $(bin_PROGRAMS) $(sbin_SCRIPTS) $(sbin_PROGRAMS) $(udev_PROGRAMS) $(dist_bin_SCRIPTS) $(zfsexec_PROGRAMS) $(dist_udev_SCRIPTS) $(mounthelper_PROGRAMS)
|
||||
|
1
cmd/arc_summary/.gitignore
vendored
1
cmd/arc_summary/.gitignore
vendored
@ -1 +0,0 @@
|
||||
arc_summary
|
@ -1,8 +1,8 @@
|
||||
bin_SCRIPTS = arc_summary
|
||||
bin_SCRIPTS += arc_summary
|
||||
CLEANFILES += arc_summary
|
||||
|
||||
CLEANFILES = arc_summary
|
||||
EXTRA_DIST = arc_summary3
|
||||
SCRIPT = arc_summary3
|
||||
EXTRA_DIST += %D%/arc_summary3
|
||||
ARC_SUMMARY = %D%/arc_summary3
|
||||
|
||||
arc_summary: $(SCRIPT)
|
||||
cp $< $@
|
||||
arc_summary: $(ARC_SUMMARY)
|
||||
$(AM_V_at)cp $< $@
|
||||
|
1
cmd/arcstat/.gitignore
vendored
1
cmd/arcstat/.gitignore
vendored
@ -1 +0,0 @@
|
||||
arcstat
|
@ -1,5 +1,4 @@
|
||||
include $(top_srcdir)/config/Substfiles.am
|
||||
|
||||
bin_SCRIPTS = arcstat
|
||||
|
||||
SUBSTFILES += $(bin_SCRIPTS)
|
||||
bin_SCRIPTS += arcstat
|
||||
CLEANFILES += arcstat
|
||||
EXTRA_DIST += %D%/arcstat.in
|
||||
$(call SUBST,arcstat,%D%/)
|
||||
|
1
cmd/dbufstat/.gitignore
vendored
1
cmd/dbufstat/.gitignore
vendored
@ -1 +0,0 @@
|
||||
dbufstat
|
@ -1,5 +1,4 @@
|
||||
include $(top_srcdir)/config/Substfiles.am
|
||||
|
||||
bin_SCRIPTS = dbufstat
|
||||
|
||||
SUBSTFILES += $(bin_SCRIPTS)
|
||||
bin_SCRIPTS += dbufstat
|
||||
CLEANFILES += dbufstat
|
||||
EXTRA_DIST += %D%/dbufstat.in
|
||||
$(call SUBST,dbufstat,%D%/)
|
||||
|
1
cmd/fsck_zfs/.gitignore
vendored
1
cmd/fsck_zfs/.gitignore
vendored
@ -1 +0,0 @@
|
||||
/fsck.zfs
|
@ -1,7 +1,5 @@
|
||||
include $(top_srcdir)/config/Substfiles.am
|
||||
include $(top_srcdir)/config/Shellcheck.am
|
||||
|
||||
dist_sbin_SCRIPTS = fsck.zfs
|
||||
|
||||
SUBSTFILES += $(dist_sbin_SCRIPTS)
|
||||
|
||||
sbin_SCRIPTS += fsck.zfs
|
||||
SHELLCHECKSCRIPTS += fsck.zfs
|
||||
CLEANFILES += fsck.zfs
|
||||
EXTRA_DIST += %D%/fsck.zfs.in
|
||||
$(call SUBST,fsck.zfs,%D%/)
|
||||
|
@ -7,13 +7,13 @@
|
||||
# see fsck.zfs(8)
|
||||
#
|
||||
|
||||
if [ "$#" = "0" ]; then
|
||||
if [ $# -eq 0 ]; then
|
||||
echo "Usage: $0 [options] dataset…" >&2
|
||||
exit 16
|
||||
fi
|
||||
|
||||
ret=0
|
||||
for dataset in "$@"; do
|
||||
for dataset; do
|
||||
case "$dataset" in
|
||||
-*)
|
||||
continue
|
||||
|
1
cmd/mount_zfs/.gitignore
vendored
1
cmd/mount_zfs/.gitignore
vendored
@ -1 +0,0 @@
|
||||
mount.zfs
|
@ -1,23 +1,20 @@
|
||||
include $(top_srcdir)/config/Rules.am
|
||||
|
||||
#
|
||||
# Ignore the prefix for the mount helper. It must be installed in /sbin/
|
||||
# because this path is hardcoded in the mount(8) for security reasons.
|
||||
# However, if needed, the configure option --with-mounthelperdir= can be used
|
||||
# to override the default install location.
|
||||
#
|
||||
sbindir=$(mounthelperdir)
|
||||
sbin_PROGRAMS = mount.zfs
|
||||
mounthelper_PROGRAMS += mount.zfs
|
||||
CPPCHECKTARGETS += mount.zfs
|
||||
|
||||
mount_zfs_SOURCES = \
|
||||
mount_zfs.c
|
||||
%D%/mount_zfs.c
|
||||
|
||||
mount_zfs_LDADD = \
|
||||
$(abs_top_builddir)/libzfs.la \
|
||||
$(abs_top_builddir)/libzfs_core.la \
|
||||
$(abs_top_builddir)/libnvpair.la
|
||||
libzfs.la \
|
||||
libzfs_core.la \
|
||||
libnvpair.la
|
||||
|
||||
mount_zfs_LDADD += $(LTLIBINTL)
|
||||
|
||||
include $(top_srcdir)/config/CppCheck.am
|
||||
CPPCHECKTARGETS += mount.zfs
|
||||
CPPCHECKTARGETS += raidz_test
|
||||
|
1
cmd/raidz_test/.gitignore
vendored
1
cmd/raidz_test/.gitignore
vendored
@ -1 +0,0 @@
|
||||
/raidz_test
|
@ -1,20 +1,16 @@
|
||||
include $(top_srcdir)/config/Rules.am
|
||||
raidz_test_CFLAGS = $(AM_CFLAGS) $(KERNEL_CFLAGS)
|
||||
raidz_test_CPPFLAGS = $(AM_CPPFLAGS) $(FORCEDEBUG_CPPFLAGS)
|
||||
|
||||
AM_CFLAGS += $(KERNEL_CFLAGS)
|
||||
AM_CPPFLAGS += $(FORCEDEBUG_CPPFLAGS)
|
||||
|
||||
bin_PROGRAMS = raidz_test
|
||||
bin_PROGRAMS += raidz_test
|
||||
CPPCHECKTARGETS += raidz_test
|
||||
|
||||
raidz_test_SOURCES = \
|
||||
raidz_test.h \
|
||||
raidz_test.c \
|
||||
raidz_bench.c
|
||||
%D%/raidz_bench.c \
|
||||
%D%/raidz_test.c \
|
||||
%D%/raidz_test.h
|
||||
|
||||
raidz_test_LDADD = \
|
||||
$(abs_top_builddir)/libzpool.la \
|
||||
$(abs_top_builddir)/libzfs_core.la
|
||||
libzpool.la \
|
||||
libzfs_core.la
|
||||
|
||||
raidz_test_LDADD += -lm
|
||||
|
||||
include $(top_srcdir)/config/CppCheck.am
|
||||
CPPCHECKTARGETS += raidz_test
|
||||
|
@ -1,3 +1,2 @@
|
||||
include $(top_srcdir)/config/Shellcheck.am
|
||||
|
||||
dist_udev_SCRIPTS = vdev_id
|
||||
dist_udev_SCRIPTS += %D%/vdev_id
|
||||
# TODO: #12084: SHELLCHECKSCRIPTS += %D%/vdev_id
|
||||
|
1
cmd/zdb/.gitignore
vendored
1
cmd/zdb/.gitignore
vendored
@ -1 +0,0 @@
|
||||
/zdb
|
@ -1,18 +1,14 @@
|
||||
include $(top_srcdir)/config/Rules.am
|
||||
zdb_CPPFLAGS = $(AM_CPPFLAGS) $(FORCEDEBUG_CPPFLAGS)
|
||||
|
||||
AM_CPPFLAGS += $(FORCEDEBUG_CPPFLAGS)
|
||||
|
||||
sbin_PROGRAMS = zdb
|
||||
sbin_PROGRAMS += zdb
|
||||
CPPCHECKTARGETS += zdb
|
||||
|
||||
zdb_SOURCES = \
|
||||
zdb.c \
|
||||
zdb_il.c \
|
||||
zdb.h
|
||||
%D%/zdb.c \
|
||||
%D%/zdb.h \
|
||||
%D%/zdb_il.c
|
||||
|
||||
zdb_LDADD = \
|
||||
$(abs_top_builddir)/libzpool.la \
|
||||
$(abs_top_builddir)/libzfs_core.la \
|
||||
$(abs_top_builddir)/libnvpair.la
|
||||
|
||||
include $(top_srcdir)/config/CppCheck.am
|
||||
CPPCHECKTARGETS += zdb
|
||||
libzpool.la \
|
||||
libzfs_core.la \
|
||||
libnvpair.la
|
||||
|
@ -1,54 +1,46 @@
|
||||
include $(top_srcdir)/config/Rules.am
|
||||
include $(top_srcdir)/config/Shellcheck.am
|
||||
include $(srcdir)/%D%/zed.d/Makefile.am
|
||||
|
||||
AM_CFLAGS += $(LIBUDEV_CFLAGS) $(LIBUUID_CFLAGS)
|
||||
zed_CFLAGS = $(AM_CFLAGS)
|
||||
zed_CFLAGS += $(LIBUDEV_CFLAGS) $(LIBUUID_CFLAGS)
|
||||
|
||||
SUBDIRS = zed.d
|
||||
SHELLCHECKDIRS = $(SUBDIRS)
|
||||
sbin_PROGRAMS += zed
|
||||
CPPCHECKTARGETS += zed
|
||||
|
||||
sbin_PROGRAMS = zed
|
||||
|
||||
ZED_SRC = \
|
||||
zed.c \
|
||||
zed.h \
|
||||
zed_conf.c \
|
||||
zed_conf.h \
|
||||
zed_disk_event.c \
|
||||
zed_disk_event.h \
|
||||
zed_event.c \
|
||||
zed_event.h \
|
||||
zed_exec.c \
|
||||
zed_exec.h \
|
||||
zed_file.c \
|
||||
zed_file.h \
|
||||
zed_log.c \
|
||||
zed_log.h \
|
||||
zed_strings.c \
|
||||
zed_strings.h
|
||||
|
||||
FMA_SRC = \
|
||||
agents/zfs_agents.c \
|
||||
agents/zfs_agents.h \
|
||||
agents/zfs_diagnosis.c \
|
||||
agents/zfs_mod.c \
|
||||
agents/zfs_retire.c \
|
||||
agents/fmd_api.c \
|
||||
agents/fmd_api.h \
|
||||
agents/fmd_serd.c \
|
||||
agents/fmd_serd.h
|
||||
|
||||
zed_SOURCES = $(ZED_SRC) $(FMA_SRC)
|
||||
zed_SOURCES = \
|
||||
%D%/zed.c \
|
||||
%D%/zed.h \
|
||||
%D%/zed_conf.c \
|
||||
%D%/zed_conf.h \
|
||||
%D%/zed_disk_event.c \
|
||||
%D%/zed_disk_event.h \
|
||||
%D%/zed_event.c \
|
||||
%D%/zed_event.h \
|
||||
%D%/zed_exec.c \
|
||||
%D%/zed_exec.h \
|
||||
%D%/zed_file.c \
|
||||
%D%/zed_file.h \
|
||||
%D%/zed_log.c \
|
||||
%D%/zed_log.h \
|
||||
%D%/zed_strings.c \
|
||||
%D%/zed_strings.h \
|
||||
\
|
||||
%D%/agents/fmd_api.c \
|
||||
%D%/agents/fmd_api.h \
|
||||
%D%/agents/fmd_serd.c \
|
||||
%D%/agents/fmd_serd.h \
|
||||
%D%/agents/zfs_agents.c \
|
||||
%D%/agents/zfs_agents.h \
|
||||
%D%/agents/zfs_diagnosis.c \
|
||||
%D%/agents/zfs_mod.c \
|
||||
%D%/agents/zfs_retire.c
|
||||
|
||||
zed_LDADD = \
|
||||
$(abs_top_builddir)/libzfs.la \
|
||||
$(abs_top_builddir)/libzfs_core.la \
|
||||
$(abs_top_builddir)/libnvpair.la \
|
||||
$(abs_top_builddir)/libuutil.la
|
||||
libzfs.la \
|
||||
libzfs_core.la \
|
||||
libnvpair.la \
|
||||
libuutil.la
|
||||
|
||||
zed_LDADD += -lrt $(LIBATOMIC_LIBS) $(LIBUDEV_LIBS) $(LIBUUID_LIBS)
|
||||
zed_LDFLAGS = -pthread
|
||||
|
||||
EXTRA_DIST = agents/README.md
|
||||
|
||||
include $(top_srcdir)/config/CppCheck.am
|
||||
CPPCHECKTARGETS += zed
|
||||
EXTRA_DIST += $(addprefix %D%/,agents/README.md)
|
||||
|
@ -1,36 +1,27 @@
|
||||
include $(top_srcdir)/config/Rules.am
|
||||
include $(top_srcdir)/config/Substfiles.am
|
||||
include $(top_srcdir)/config/Shellcheck.am
|
||||
|
||||
EXTRA_DIST += README
|
||||
|
||||
zedconfdir = $(sysconfdir)/zfs/zed.d
|
||||
|
||||
dist_zedconf_DATA = \
|
||||
zed-functions.sh \
|
||||
zed.rc
|
||||
|
||||
SHELLCHECKSCRIPTS = zed-functions.sh zed.rc
|
||||
SHELLCHECK_SHELL = sh
|
||||
%D%/zed-functions.sh \
|
||||
%D%/zed.rc
|
||||
|
||||
zedexecdir = $(zfsexecdir)/zed.d
|
||||
|
||||
dist_zedexec_SCRIPTS = \
|
||||
all-debug.sh \
|
||||
all-syslog.sh \
|
||||
data-notify.sh \
|
||||
generic-notify.sh \
|
||||
resilver_finish-notify.sh \
|
||||
scrub_finish-notify.sh \
|
||||
statechange-led.sh \
|
||||
statechange-notify.sh \
|
||||
vdev_clear-led.sh \
|
||||
vdev_attach-led.sh \
|
||||
pool_import-led.sh \
|
||||
resilver_finish-start-scrub.sh \
|
||||
trim_finish-notify.sh
|
||||
%D%/all-debug.sh \
|
||||
%D%/all-syslog.sh \
|
||||
%D%/data-notify.sh \
|
||||
%D%/generic-notify.sh \
|
||||
%D%/pool_import-led.sh \
|
||||
%D%/resilver_finish-notify.sh \
|
||||
%D%/resilver_finish-start-scrub.sh \
|
||||
%D%/scrub_finish-notify.sh \
|
||||
%D%/statechange-led.sh \
|
||||
%D%/statechange-notify.sh \
|
||||
%D%/trim_finish-notify.sh \
|
||||
%D%/vdev_attach-led.sh \
|
||||
%D%/vdev_clear-led.sh
|
||||
|
||||
nodist_zedexec_SCRIPTS = history_event-zfs-list-cacher.sh
|
||||
nodist_zedexec_SCRIPTS = \
|
||||
%D%/history_event-zfs-list-cacher.sh
|
||||
|
||||
SUBSTFILES += $(nodist_zedexec_SCRIPTS)
|
||||
|
||||
@ -38,22 +29,27 @@ zedconfdefaults = \
|
||||
all-syslog.sh \
|
||||
data-notify.sh \
|
||||
history_event-zfs-list-cacher.sh \
|
||||
pool_import-led.sh \
|
||||
resilver_finish-notify.sh \
|
||||
resilver_finish-start-scrub.sh \
|
||||
scrub_finish-notify.sh \
|
||||
statechange-led.sh \
|
||||
statechange-notify.sh \
|
||||
vdev_clear-led.sh \
|
||||
vdev_attach-led.sh \
|
||||
pool_import-led.sh \
|
||||
resilver_finish-start-scrub.sh
|
||||
vdev_clear-led.sh
|
||||
|
||||
install-data-hook:
|
||||
EXTRA_DIST += $(addprefix %D%/,README)
|
||||
|
||||
INSTALL_DATA_HOOKS += zed-install-data-hook
|
||||
zed-install-data-hook:
|
||||
$(MKDIR_P) "$(DESTDIR)$(zedconfdir)"
|
||||
for f in $(zedconfdefaults); do \
|
||||
test -f "$(DESTDIR)$(zedconfdir)/$${f}" -o \
|
||||
-L "$(DESTDIR)$(zedconfdir)/$${f}" || \
|
||||
ln -s "$(zedexecdir)/$${f}" "$(DESTDIR)$(zedconfdir)"; \
|
||||
set -x; for f in $(zedconfdefaults); do \
|
||||
[ -f "$(DESTDIR)$(zedconfdir)/$${f}" ] ||\
|
||||
[ -L "$(DESTDIR)$(zedconfdir)/$${f}" ] || \
|
||||
$(LN_S) "$(zedexecdir)/$${f}" "$(DESTDIR)$(zedconfdir)"; \
|
||||
done
|
||||
|
||||
SHELLCHECKSCRIPTS += $(dist_zedconf_DATA) $(dist_zedexec_SCRIPTS) $(nodist_zedexec_SCRIPTS)
|
||||
$(call SHELLCHECK_OPTS,$(dist_zedconf_DATA) $(dist_zedexec_SCRIPTS) $(nodist_zedexec_SCRIPTS)): SHELLCHECK_SHELL = sh
|
||||
# False positive: 1>&"${ZED_FLOCK_FD}" looks suspiciously similar to a >&filename bash extension
|
||||
CHECKBASHISMS_IGNORE = -e 'should be >word 2>&1' -e '&"$${ZED_FLOCK_FD}"'
|
||||
$(call SHELLCHECK_OPTS,$(dist_zedconf_DATA) $(dist_zedexec_SCRIPTS) $(nodist_zedexec_SCRIPTS)): CHECKBASHISMS_IGNORE = -e 'should be >word 2>&1' -e '&"$${ZED_FLOCK_FD}"'
|
||||
|
1
cmd/zfs/.gitignore
vendored
1
cmd/zfs/.gitignore
vendored
@ -1 +0,0 @@
|
||||
/zfs
|
@ -1,26 +1,22 @@
|
||||
include $(top_srcdir)/config/Rules.am
|
||||
|
||||
sbin_PROGRAMS = zfs
|
||||
sbin_PROGRAMS += zfs
|
||||
CPPCHECKTARGETS += zfs
|
||||
|
||||
zfs_SOURCES = \
|
||||
zfs_iter.c \
|
||||
zfs_iter.h \
|
||||
zfs_main.c \
|
||||
zfs_util.h \
|
||||
zfs_project.c \
|
||||
zfs_projectutil.h
|
||||
%D%/zfs_iter.c \
|
||||
%D%/zfs_iter.h \
|
||||
%D%/zfs_main.c \
|
||||
%D%/zfs_project.c \
|
||||
%D%/zfs_projectutil.h \
|
||||
%D%/zfs_util.h
|
||||
|
||||
zfs_LDADD = \
|
||||
$(abs_top_builddir)/libzfs.la \
|
||||
$(abs_top_builddir)/libzfs_core.la \
|
||||
$(abs_top_builddir)/libnvpair.la \
|
||||
$(abs_top_builddir)/libuutil.la
|
||||
libzfs.la \
|
||||
libzfs_core.la \
|
||||
libnvpair.la \
|
||||
libuutil.la
|
||||
|
||||
zfs_LDADD += $(LTLIBINTL)
|
||||
|
||||
if BUILD_FREEBSD
|
||||
zfs_LDADD += -lgeom -ljail
|
||||
endif
|
||||
|
||||
include $(top_srcdir)/config/CppCheck.am
|
||||
CPPCHECKTARGETS += zfs
|
||||
|
1
cmd/zfs_ids_to_path/.gitignore
vendored
1
cmd/zfs_ids_to_path/.gitignore
vendored
@ -1 +0,0 @@
|
||||
zfs_ids_to_path
|
@ -1,12 +1,8 @@
|
||||
include $(top_srcdir)/config/Rules.am
|
||||
|
||||
sbin_PROGRAMS = zfs_ids_to_path
|
||||
sbin_PROGRAMS += zfs_ids_to_path
|
||||
CPPCHECKTARGETS += zfs_ids_to_path
|
||||
|
||||
zfs_ids_to_path_SOURCES = \
|
||||
zfs_ids_to_path.c
|
||||
%D%/zfs_ids_to_path.c
|
||||
|
||||
zfs_ids_to_path_LDADD = \
|
||||
$(abs_top_builddir)/libzfs.la
|
||||
|
||||
include $(top_srcdir)/config/CppCheck.am
|
||||
CPPCHECKTARGETS += zfs_ids_to_path
|
||||
libzfs.la
|
||||
|
1
cmd/zgenhostid/.gitignore
vendored
1
cmd/zgenhostid/.gitignore
vendored
@ -1 +0,0 @@
|
||||
/zgenhostid
|
@ -1,8 +1,5 @@
|
||||
include $(top_srcdir)/config/Rules.am
|
||||
|
||||
sbin_PROGRAMS = zgenhostid
|
||||
|
||||
zgenhostid_SOURCES = zgenhostid.c
|
||||
|
||||
include $(top_srcdir)/config/CppCheck.am
|
||||
sbin_PROGRAMS += zgenhostid
|
||||
CPPCHECKTARGETS += zgenhostid
|
||||
|
||||
zgenhostid_SOURCES = \
|
||||
%D%/zgenhostid.c
|
||||
|
1
cmd/zhack/.gitignore
vendored
1
cmd/zhack/.gitignore
vendored
@ -1 +0,0 @@
|
||||
/zhack
|
@ -1,16 +1,12 @@
|
||||
include $(top_srcdir)/config/Rules.am
|
||||
zhack_CPPFLAGS = $(AM_CPPFLAGS) $(FORCEDEBUG_CPPFLAGS)
|
||||
|
||||
AM_CPPFLAGS += $(FORCEDEBUG_CPPFLAGS)
|
||||
|
||||
sbin_PROGRAMS = zhack
|
||||
sbin_PROGRAMS += zhack
|
||||
CPPCHECKTARGETS += zhack
|
||||
|
||||
zhack_SOURCES = \
|
||||
zhack.c
|
||||
%D%/zhack.c
|
||||
|
||||
zhack_LDADD = \
|
||||
$(abs_top_builddir)/libzpool.la \
|
||||
$(abs_top_builddir)/libzfs_core.la \
|
||||
$(abs_top_builddir)/libnvpair.la
|
||||
|
||||
include $(top_srcdir)/config/CppCheck.am
|
||||
CPPCHECKTARGETS += zhack
|
||||
libzpool.la \
|
||||
libzfs_core.la \
|
||||
libnvpair.la
|
||||
|
1
cmd/zinject/.gitignore
vendored
1
cmd/zinject/.gitignore
vendored
@ -1 +0,0 @@
|
||||
/zinject
|
@ -1,16 +1,12 @@
|
||||
include $(top_srcdir)/config/Rules.am
|
||||
|
||||
sbin_PROGRAMS = zinject
|
||||
sbin_PROGRAMS += zinject
|
||||
CPPCHECKTARGETS += zinject
|
||||
|
||||
zinject_SOURCES = \
|
||||
translate.c \
|
||||
zinject.c \
|
||||
zinject.h
|
||||
%D%/translate.c \
|
||||
%D%/zinject.c \
|
||||
%D%/zinject.h
|
||||
|
||||
zinject_LDADD = \
|
||||
$(abs_top_builddir)/libzfs.la \
|
||||
$(abs_top_builddir)/libzfs_core.la \
|
||||
$(abs_top_builddir)/libnvpair.la
|
||||
|
||||
include $(top_srcdir)/config/CppCheck.am
|
||||
CPPCHECKTARGETS += zinject
|
||||
libzfs.la \
|
||||
libzfs_core.la \
|
||||
libnvpair.la
|
||||
|
1
cmd/zpool/.gitignore
vendored
1
cmd/zpool/.gitignore
vendored
@ -1 +0,0 @@
|
||||
/zpool
|
@ -1,34 +1,35 @@
|
||||
include $(top_srcdir)/config/Rules.am
|
||||
include $(top_srcdir)/config/Shellcheck.am
|
||||
zpool_CFLAGS = $(AM_CFLAGS)
|
||||
zpool_CFLAGS += $(LIBBLKID_CFLAGS) $(LIBUUID_CFLAGS)
|
||||
|
||||
AM_CFLAGS += $(LIBBLKID_CFLAGS) $(LIBUUID_CFLAGS)
|
||||
zpool_CPPFLAGS = $(AM_CPPFLAGS)
|
||||
zpool_CPPFLAGS += -I$(srcdir)/%D%
|
||||
|
||||
AM_CPPFLAGS += -I$(srcdir)
|
||||
|
||||
|
||||
sbin_PROGRAMS = zpool
|
||||
sbin_PROGRAMS += zpool
|
||||
CPPCHECKTARGETS += zpool
|
||||
|
||||
zpool_SOURCES = \
|
||||
zpool_iter.c \
|
||||
zpool_main.c \
|
||||
zpool_util.c \
|
||||
zpool_util.h \
|
||||
zpool_vdev.c
|
||||
%D%/zpool_iter.c \
|
||||
%D%/zpool_main.c \
|
||||
%D%/zpool_util.c \
|
||||
%D%/zpool_util.h \
|
||||
%D%/zpool_vdev.c
|
||||
|
||||
if BUILD_FREEBSD
|
||||
zpool_SOURCES += os/freebsd/zpool_vdev_os.c
|
||||
zpool_SOURCES += \
|
||||
%D%/os/freebsd/zpool_vdev_os.c
|
||||
endif
|
||||
|
||||
if BUILD_LINUX
|
||||
zpool_SOURCES += os/linux/zpool_vdev_os.c
|
||||
zpool_SOURCES += \
|
||||
%D%/os/linux/zpool_vdev_os.c
|
||||
endif
|
||||
|
||||
zpool_LDADD = \
|
||||
$(abs_top_builddir)/libzfs.la \
|
||||
$(abs_top_builddir)/libzfs_core.la \
|
||||
$(abs_top_builddir)/libnvpair.la \
|
||||
$(abs_top_builddir)/libuutil.la \
|
||||
$(abs_top_builddir)/libzutil.la
|
||||
libzfs.la \
|
||||
libzfs_core.la \
|
||||
libnvpair.la \
|
||||
libuutil.la \
|
||||
libzutil.la
|
||||
|
||||
zpool_LDADD += $(LTLIBINTL)
|
||||
|
||||
@ -37,57 +38,53 @@ zpool_LDADD += -lgeom
|
||||
endif
|
||||
zpool_LDADD += -lm $(LIBBLKID_LIBS) $(LIBUUID_LIBS)
|
||||
|
||||
include $(top_srcdir)/config/CppCheck.am
|
||||
CPPCHECKTARGETS += zpool
|
||||
EXTRA_DIST += $(addprefix %D%/,zpool.d/README compatibility.d)
|
||||
|
||||
zpoolconfdir = $(sysconfdir)/zfs/zpool.d
|
||||
SHELLCHECKSCRIPTS += $(dist_zpoolexec_SCRIPTS)
|
||||
zpoolexecdir = $(zfsexecdir)/zpool.d
|
||||
|
||||
EXTRA_DIST = zpool.d/README compatibility.d
|
||||
|
||||
dist_zpoolexec_SCRIPTS = \
|
||||
zpool.d/dm-deps \
|
||||
zpool.d/enc \
|
||||
zpool.d/encdev \
|
||||
zpool.d/fault_led \
|
||||
zpool.d/iostat \
|
||||
zpool.d/iostat-1s \
|
||||
zpool.d/iostat-10s \
|
||||
zpool.d/label \
|
||||
zpool.d/locate_led \
|
||||
zpool.d/lsblk \
|
||||
zpool.d/media \
|
||||
zpool.d/model \
|
||||
zpool.d/serial \
|
||||
zpool.d/ses \
|
||||
zpool.d/size \
|
||||
zpool.d/slot \
|
||||
zpool.d/smart \
|
||||
zpool.d/smartx \
|
||||
zpool.d/temp \
|
||||
zpool.d/health \
|
||||
zpool.d/r_proc \
|
||||
zpool.d/w_proc \
|
||||
zpool.d/r_ucor \
|
||||
zpool.d/w_ucor \
|
||||
zpool.d/nonmed \
|
||||
zpool.d/defect \
|
||||
zpool.d/hours_on \
|
||||
zpool.d/realloc \
|
||||
zpool.d/rep_ucor \
|
||||
zpool.d/cmd_to \
|
||||
zpool.d/pend_sec \
|
||||
zpool.d/off_ucor \
|
||||
zpool.d/ata_err \
|
||||
zpool.d/nvme_err \
|
||||
zpool.d/pwr_cyc \
|
||||
zpool.d/upath \
|
||||
zpool.d/vendor \
|
||||
zpool.d/smart_test \
|
||||
zpool.d/test_type \
|
||||
zpool.d/test_status \
|
||||
zpool.d/test_progress \
|
||||
zpool.d/test_ended
|
||||
%D%/zpool.d/ata_err \
|
||||
%D%/zpool.d/cmd_to \
|
||||
%D%/zpool.d/defect \
|
||||
%D%/zpool.d/dm-deps \
|
||||
%D%/zpool.d/enc \
|
||||
%D%/zpool.d/encdev \
|
||||
%D%/zpool.d/fault_led \
|
||||
%D%/zpool.d/health \
|
||||
%D%/zpool.d/hours_on \
|
||||
%D%/zpool.d/iostat \
|
||||
%D%/zpool.d/iostat-10s \
|
||||
%D%/zpool.d/iostat-1s \
|
||||
%D%/zpool.d/label \
|
||||
%D%/zpool.d/locate_led \
|
||||
%D%/zpool.d/lsblk \
|
||||
%D%/zpool.d/media \
|
||||
%D%/zpool.d/model \
|
||||
%D%/zpool.d/nonmed \
|
||||
%D%/zpool.d/nvme_err \
|
||||
%D%/zpool.d/off_ucor \
|
||||
%D%/zpool.d/pend_sec \
|
||||
%D%/zpool.d/pwr_cyc \
|
||||
%D%/zpool.d/r_proc \
|
||||
%D%/zpool.d/r_ucor \
|
||||
%D%/zpool.d/realloc \
|
||||
%D%/zpool.d/rep_ucor \
|
||||
%D%/zpool.d/serial \
|
||||
%D%/zpool.d/ses \
|
||||
%D%/zpool.d/size \
|
||||
%D%/zpool.d/slot \
|
||||
%D%/zpool.d/smart \
|
||||
%D%/zpool.d/smart_test \
|
||||
%D%/zpool.d/smartx \
|
||||
%D%/zpool.d/temp \
|
||||
%D%/zpool.d/test_ended \
|
||||
%D%/zpool.d/test_progress \
|
||||
%D%/zpool.d/test_status \
|
||||
%D%/zpool.d/test_type \
|
||||
%D%/zpool.d/upath \
|
||||
%D%/zpool.d/vendor \
|
||||
%D%/zpool.d/w_proc \
|
||||
%D%/zpool.d/w_ucor
|
||||
|
||||
zpoolconfdefaults = \
|
||||
dm-deps \
|
||||
@ -134,29 +131,28 @@ zpoolconfdefaults = \
|
||||
test_ended
|
||||
|
||||
zpoolcompatdir = $(pkgdatadir)/compatibility.d
|
||||
|
||||
dist_zpoolcompat_DATA = \
|
||||
compatibility.d/compat-2018 \
|
||||
compatibility.d/compat-2019 \
|
||||
compatibility.d/compat-2020 \
|
||||
compatibility.d/compat-2021 \
|
||||
compatibility.d/freebsd-11.0 \
|
||||
compatibility.d/freebsd-11.2 \
|
||||
compatibility.d/freebsd-11.3 \
|
||||
compatibility.d/freenas-9.10.2 \
|
||||
compatibility.d/grub2 \
|
||||
compatibility.d/openzfsonosx-1.7.0 \
|
||||
compatibility.d/openzfsonosx-1.8.1 \
|
||||
compatibility.d/openzfsonosx-1.9.3 \
|
||||
compatibility.d/openzfs-2.0-freebsd \
|
||||
compatibility.d/openzfs-2.0-linux \
|
||||
compatibility.d/openzfs-2.1-freebsd \
|
||||
compatibility.d/openzfs-2.1-linux \
|
||||
compatibility.d/zol-0.6.1 \
|
||||
compatibility.d/zol-0.6.4 \
|
||||
compatibility.d/zol-0.6.5 \
|
||||
compatibility.d/zol-0.7 \
|
||||
compatibility.d/zol-0.8
|
||||
%D%/compatibility.d/compat-2018 \
|
||||
%D%/compatibility.d/compat-2019 \
|
||||
%D%/compatibility.d/compat-2020 \
|
||||
%D%/compatibility.d/compat-2021 \
|
||||
%D%/compatibility.d/freebsd-11.0 \
|
||||
%D%/compatibility.d/freebsd-11.2 \
|
||||
%D%/compatibility.d/freebsd-11.3 \
|
||||
%D%/compatibility.d/freenas-9.10.2 \
|
||||
%D%/compatibility.d/grub2 \
|
||||
%D%/compatibility.d/openzfs-2.0-freebsd \
|
||||
%D%/compatibility.d/openzfs-2.0-linux \
|
||||
%D%/compatibility.d/openzfs-2.1-freebsd \
|
||||
%D%/compatibility.d/openzfs-2.1-linux \
|
||||
%D%/compatibility.d/openzfsonosx-1.7.0 \
|
||||
%D%/compatibility.d/openzfsonosx-1.8.1 \
|
||||
%D%/compatibility.d/openzfsonosx-1.9.3 \
|
||||
%D%/compatibility.d/zol-0.6.1 \
|
||||
%D%/compatibility.d/zol-0.6.4 \
|
||||
%D%/compatibility.d/zol-0.6.5 \
|
||||
%D%/compatibility.d/zol-0.7 \
|
||||
%D%/compatibility.d/zol-0.8
|
||||
|
||||
# canonical <- alias symbolic link pairs
|
||||
# eg: "2018" is a link to "compat-2018"
|
||||
@ -179,13 +175,16 @@ zpoolcompatlinks = \
|
||||
"zol-0.7 ubuntu-18.04" \
|
||||
"zol-0.8 ubuntu-20.04"
|
||||
|
||||
install-data-hook:
|
||||
zpoolconfdir = $(sysconfdir)/zfs/zpool.d
|
||||
INSTALL_DATA_HOOKS += zpool-install-data-hook
|
||||
zpool-install-data-hook:
|
||||
$(MKDIR_P) "$(DESTDIR)$(zpoolconfdir)"
|
||||
for f in $(zpoolconfdefaults); do \
|
||||
test -f "$(DESTDIR)$(zpoolconfdir)/$${f}" -o \
|
||||
-L "$(DESTDIR)$(zpoolconfdir)/$${f}" || \
|
||||
ln -s "$(zpoolexecdir)/$${f}" "$(DESTDIR)$(zpoolconfdir)"; \
|
||||
set -x; for f in $(zpoolconfdefaults); do \
|
||||
[ -f "$(DESTDIR)$(zpoolconfdir)/$${f}" ] || \
|
||||
[ -L "$(DESTDIR)$(zpoolconfdir)/$${f}" ] || \
|
||||
$(LN_S) "$(zpoolexecdir)/$${f}" "$(DESTDIR)$(zpoolconfdir)"; \
|
||||
done
|
||||
for l in $(zpoolcompatlinks); do \
|
||||
(cd "$(DESTDIR)$(zpoolcompatdir)"; ln -sf $${l} ); \
|
||||
set -x; printf '%s\n' $(zpoolcompatlinks) | \
|
||||
while read -r canon alias; do \
|
||||
$(LN_S) -f "$${canon}" "$(DESTDIR)$(zpoolcompatdir)/$${alias}"; \
|
||||
done
|
||||
|
1
cmd/zpool_influxdb/.gitignore
vendored
1
cmd/zpool_influxdb/.gitignore
vendored
@ -1 +0,0 @@
|
||||
/zpool_influxdb
|
@ -1,14 +1,10 @@
|
||||
include $(top_srcdir)/config/Rules.am
|
||||
|
||||
zfsexec_PROGRAMS = zpool_influxdb
|
||||
zfsexec_PROGRAMS += zpool_influxdb
|
||||
CPPCHECKTARGETS += zpool_influxdb
|
||||
|
||||
zpool_influxdb_SOURCES = \
|
||||
zpool_influxdb.c
|
||||
%D%/zpool_influxdb.c
|
||||
|
||||
zpool_influxdb_LDADD = \
|
||||
$(top_builddir)/libspl.la \
|
||||
$(top_builddir)/libnvpair.la \
|
||||
$(top_builddir)/libzfs.la
|
||||
|
||||
include $(top_srcdir)/config/CppCheck.am
|
||||
CPPCHECKTARGETS += zpool_influxdb
|
||||
libspl.la \
|
||||
libnvpair.la \
|
||||
libzfs.la
|
||||
|
1
cmd/zstream/.gitignore
vendored
1
cmd/zstream/.gitignore
vendored
@ -1 +0,0 @@
|
||||
zstream
|
@ -1,21 +1,18 @@
|
||||
include $(top_srcdir)/config/Rules.am
|
||||
|
||||
sbin_PROGRAMS = zstream
|
||||
|
||||
zstream_SOURCES = \
|
||||
zstream.c \
|
||||
zstream.h \
|
||||
zstream_dump.c \
|
||||
zstream_redup.c \
|
||||
zstream_token.c
|
||||
|
||||
zstream_LDADD = \
|
||||
$(abs_top_builddir)/libzfs.la \
|
||||
$(abs_top_builddir)/libzfs_core.la \
|
||||
$(abs_top_builddir)/libnvpair.la
|
||||
|
||||
include $(top_srcdir)/config/CppCheck.am
|
||||
sbin_PROGRAMS += zstream
|
||||
CPPCHECKTARGETS += zstream
|
||||
|
||||
zstream_SOURCES = \
|
||||
%D%/zstream.c \
|
||||
%D%/zstream.h \
|
||||
%D%/zstream_dump.c \
|
||||
%D%/zstream_redup.c \
|
||||
%D%/zstream_token.c
|
||||
|
||||
zstream_LDADD = \
|
||||
libzfs.la \
|
||||
libzfs_core.la \
|
||||
libnvpair.la
|
||||
|
||||
PHONY += install-exec-hook
|
||||
install-exec-hook:
|
||||
cd $(DESTDIR)$(sbindir) && $(LN_S) -f zstream zstreamdump
|
||||
|
1
cmd/ztest/.gitignore
vendored
1
cmd/ztest/.gitignore
vendored
@ -1 +0,0 @@
|
||||
/ztest
|
@ -1,24 +1,18 @@
|
||||
include $(top_srcdir)/config/Rules.am
|
||||
|
||||
AM_CFLAGS += $(KERNEL_CFLAGS)
|
||||
|
||||
ztest_CFLAGS = $(AM_CFLAGS) $(KERNEL_CFLAGS)
|
||||
# Get rid of compiler warning for unchecked truncating snprintfs on gcc 7.1.1
|
||||
AM_CFLAGS += $(NO_FORMAT_TRUNCATION)
|
||||
ztest_CFLAGS += $(NO_FORMAT_TRUNCATION)
|
||||
ztest_CPPFLAGS = $(AM_CPPFLAGS) $(FORCEDEBUG_CPPFLAGS)
|
||||
|
||||
AM_CPPFLAGS += $(FORCEDEBUG_CPPFLAGS)
|
||||
|
||||
sbin_PROGRAMS = ztest
|
||||
sbin_PROGRAMS += ztest
|
||||
CPPCHECKTARGETS += ztest
|
||||
|
||||
ztest_SOURCES = \
|
||||
ztest.c
|
||||
%D%/ztest.c
|
||||
|
||||
ztest_LDADD = \
|
||||
$(abs_top_builddir)/libzpool.la \
|
||||
$(abs_top_builddir)/libzfs_core.la \
|
||||
$(abs_top_builddir)/libnvpair.la
|
||||
libzpool.la \
|
||||
libzfs_core.la \
|
||||
libnvpair.la
|
||||
|
||||
ztest_LDADD += -lm
|
||||
ztest_LDFLAGS = -pthread
|
||||
|
||||
include $(top_srcdir)/config/CppCheck.am
|
||||
CPPCHECKTARGETS += ztest
|
||||
|
1
cmd/zvol_id/.gitignore
vendored
1
cmd/zvol_id/.gitignore
vendored
@ -1 +0,0 @@
|
||||
zvol_id
|
@ -1,9 +1,5 @@
|
||||
include $(top_srcdir)/config/Rules.am
|
||||
|
||||
udev_PROGRAMS = zvol_id
|
||||
udev_PROGRAMS += zvol_id
|
||||
CPPCHECKTARGETS += zvol_id
|
||||
|
||||
zvol_id_SOURCES = \
|
||||
zvol_id_main.c
|
||||
|
||||
include $(top_srcdir)/config/CppCheck.am
|
||||
CPPCHECKTARGETS += zvol_id
|
||||
%D%/zvol_id_main.c
|
||||
|
@ -1,3 +1,2 @@
|
||||
include $(top_srcdir)/config/Shellcheck.am
|
||||
|
||||
dist_bin_SCRIPTS = zvol_wait
|
||||
dist_bin_SCRIPTS += %D%/zvol_wait
|
||||
SHELLCHECKSCRIPTS += %D%/zvol_wait
|
||||
|
@ -1,30 +1,46 @@
|
||||
.PHONY: shellcheck
|
||||
shellcheck: $(SCRIPTS) $(SHELLCHECKSCRIPTS)
|
||||
|
||||
# ShellCheck exclusions
|
||||
# Global ShellCheck exclusions:
|
||||
#
|
||||
# ShellCheck can't follow non-constant source. Use a directive to specify location. [SC1090]
|
||||
# Not following: a was not specified as input (see shellcheck -x). [SC1091]
|
||||
# Prefer putting braces around variable references even when not strictly required. [SC2250]
|
||||
# In POSIX sh, 'local' is undefined. [SC2039] # older ShellCheck versions
|
||||
# In POSIX sh, 'local' is undefined. [SC3043] # newer ShellCheck versions
|
||||
if HAVE_SHELLCHECK
|
||||
[ -z "$(SCRIPTS)$(SHELLCHECKSCRIPTS)" ] && exit; shellcheck --format=gcc --enable=all --exclude=SC1090,SC1091,SC2039,SC2250,SC3043 $$([ -n "$(SHELLCHECK_SHELL)" ] && echo "--shell=$(SHELLCHECK_SHELL)") $(SHELLCHECK_OPTS) $(SCRIPTS) $(SHELLCHECKSCRIPTS)
|
||||
else
|
||||
@[ -z "$(SCRIPTS)$(SHELLCHECKSCRIPTS)" ] && exit; echo "skipping shellcheck of" $(SCRIPTS) $(SHELLCHECKSCRIPTS) "because shellcheck is not installed"
|
||||
endif
|
||||
|
||||
SHELLCHECKSCRIPTS =
|
||||
|
||||
JUST_SHELLCHECK_OPTS = $(addprefix shellcheck-here-,$(subst /,^,$(1)))
|
||||
JUST_CHECKBASHISMS_OPTS = $(addprefix checkbashisms-here-,$(subst /,^,$(1)))
|
||||
SHELLCHECK_OPTS = $(call JUST_SHELLCHECK_OPTS,$(1)) $(call JUST_CHECKBASHISMS_OPTS,$(1))
|
||||
|
||||
.PHONY: shellcheck shellcheck-recursive
|
||||
|
||||
shellcheck-recursive:
|
||||
@set -e; for dir in $(SHELLCHECKDIRS); do $(MAKE) -C $$dir shellcheck; done
|
||||
|
||||
_STGT = $(subst ^,/,$(subst shellcheck-here-,,$@))
|
||||
shellcheck-here-%:
|
||||
if HAVE_SHELLCHECK
|
||||
shellcheck --format=gcc --enable=all --exclude=SC1090,SC1091,SC2039,SC2250,SC3043 $$([ -n "$(SHELLCHECK_SHELL)" ] && echo "--shell=$(SHELLCHECK_SHELL)") "$$([ -e "$(_STGT)" ] || echo "$(srcdir)/")$(_STGT)"
|
||||
else
|
||||
@echo "skipping shellcheck of" $(_STGT) "because shellcheck is not installed"
|
||||
endif
|
||||
|
||||
shellcheck: $(SHELLCHECKSCRIPTS) $(call JUST_SHELLCHECK_OPTS,$(SHELLCHECKSCRIPTS)) shellcheck-recursive
|
||||
|
||||
|
||||
.PHONY: checkbashisms checkbashisms-recursive
|
||||
|
||||
checkbashisms-recursive:
|
||||
@set -e; for dir in $(SHELLCHECKDIRS); do $(MAKE) -C $$dir checkbashisms; done
|
||||
|
||||
# command -v *is* specified by POSIX and every shell in existence supports it
|
||||
.PHONY: checkbashisms
|
||||
checkbashisms: $(SCRIPTS) $(SHELLCHECKSCRIPTS)
|
||||
_BTGT = $(subst ^,/,$(subst checkbashisms-here-,,$@))
|
||||
checkbashisms-here-%:
|
||||
if HAVE_CHECKBASHISMS
|
||||
[ -z "$(SCRIPTS)$(SHELLCHECKSCRIPTS)" ] && exit; ! if [ -z "$(SHELLCHECK_SHELL)" ]; then \
|
||||
checkbashisms -npx $(SCRIPTS) $(SHELLCHECKSCRIPTS); else \
|
||||
for f in $(SCRIPTS) $(SHELLCHECKSCRIPTS); do echo $$f >&3; { echo '#!/bin/$(SHELLCHECK_SHELL)'; cat $$f; } | checkbashisms -npx; done; \
|
||||
fi 3>&2 2>&1 | grep -vFe "'command' with option other than -p" -e 'command -v' $(CHECKBASHISMS_IGNORE) >&2
|
||||
! { [ -n "$(SHELLCHECK_SHELL)" ] && echo '#!/bin/$(SHELLCHECK_SHELL)'; cat "$$([ -e "$(_BTGT)" ] || echo "$(srcdir)/")$(_BTGT)"; } | \
|
||||
checkbashisms -npx 2>&1 | grep -vFe "'command' with option other than -p" -e 'command -v' -e 'any possible bashisms' $(CHECKBASHISMS_IGNORE) >&2
|
||||
else
|
||||
@[ -z "$(SCRIPTS)$(SHELLCHECKSCRIPTS)" ] && exit; echo "skipping checkbashisms of" $(SCRIPTS) $(SHELLCHECKSCRIPTS) "because checkbashisms is not installed"
|
||||
@echo "skipping checkbashisms of" $(_BTGT) "because checkbashisms is not installed"
|
||||
endif
|
||||
@set -e; for dir in $(SHELLCHECKDIRS); do $(MAKE) -C $$dir checkbashisms; done
|
||||
|
||||
checkbashisms: $(SHELLCHECKSCRIPTS) $(call JUST_CHECKBASHISMS_OPTS,$(SHELLCHECKSCRIPTS)) checkbashisms-recursive
|
||||
|
@ -21,18 +21,22 @@ subst_sed_cmd = \
|
||||
-e 's|@ASAN_ENABLED[@]|$(ASAN_ENABLED)|g' \
|
||||
-e 's|@UBSAN_ENABLED[@]|$(UBSAN_ENABLED)|g'
|
||||
|
||||
SUBSTFILES =
|
||||
CLEANFILES = $(SUBSTFILES)
|
||||
EXTRA_DIST = $(SUBSTFILES:=.in)
|
||||
|
||||
$(SUBSTFILES):%:%.in Makefile
|
||||
$(AM_V_GEN)set -e; \
|
||||
$(MKDIR_P) $$(dirname $@); \
|
||||
$(RM) $@~; \
|
||||
$(SED) $(subst_sed_cmd) $< >$@~; \
|
||||
if grep -E '@[a-zA-Z0-9_]+@' $@~ >&2; then \
|
||||
define SUBST
|
||||
$(1) : $(2)$(1).in Makefile;
|
||||
$$(AM_V_GEN)set -e; \
|
||||
$$(MKDIR_P) $$(@D); \
|
||||
$$(RM) $$@~; \
|
||||
$$(SED) $$(subst_sed_cmd) $$< >$$@~; \
|
||||
if grep -E '@[a-zA-Z0-9_]+@' $$@~ >&2; then \
|
||||
echo "Undefined substitution" >&2; \
|
||||
exit 1; \
|
||||
else test $$? -eq 1; fi; \
|
||||
test -x $< && chmod +x $@~; \
|
||||
mv -f $@~ $@
|
||||
fi; \
|
||||
[ -x $$< ] && chmod +x $$@~; \
|
||||
mv -f $$@~ $$@
|
||||
endef
|
||||
|
||||
SUBSTFILES =
|
||||
CLEANFILES += $(SUBSTFILES)
|
||||
EXTRA_DIST += $(SUBSTFILES:=.in)
|
||||
|
||||
$(call SUBST,%,)
|
||||
|
22
configure.ac
22
configure.ac
@ -66,28 +66,6 @@ ZFS_AC_DEBUG_INVARIANTS
|
||||
|
||||
AC_CONFIG_FILES([
|
||||
Makefile
|
||||
cmd/Makefile
|
||||
cmd/arc_summary/Makefile
|
||||
cmd/arcstat/Makefile
|
||||
cmd/dbufstat/Makefile
|
||||
cmd/fsck_zfs/Makefile
|
||||
cmd/mount_zfs/Makefile
|
||||
cmd/raidz_test/Makefile
|
||||
cmd/vdev_id/Makefile
|
||||
cmd/zdb/Makefile
|
||||
cmd/zed/Makefile
|
||||
cmd/zed/zed.d/Makefile
|
||||
cmd/zfs/Makefile
|
||||
cmd/zfs_ids_to_path/Makefile
|
||||
cmd/zgenhostid/Makefile
|
||||
cmd/zhack/Makefile
|
||||
cmd/zinject/Makefile
|
||||
cmd/zpool/Makefile
|
||||
cmd/zstream/Makefile
|
||||
cmd/ztest/Makefile
|
||||
cmd/zvol_id/Makefile
|
||||
cmd/zvol_wait/Makefile
|
||||
cmd/zpool_influxdb/Makefile
|
||||
contrib/Makefile
|
||||
contrib/bash_completion.d/Makefile
|
||||
contrib/bpftrace/Makefile
|
||||
|
@ -1,3 +1,5 @@
|
||||
CLEANFILES =
|
||||
EXTRA_DIST =
|
||||
include $(top_srcdir)/config/Substfiles.am
|
||||
include $(top_srcdir)/config/Shellcheck.am
|
||||
|
||||
@ -8,5 +10,5 @@ noinst_DATA = zfs
|
||||
EXTRA_DIST += $(noinst_DATA)
|
||||
SUBSTFILES += $(noinst_DATA)
|
||||
|
||||
SHELLCHECKSCRIPTS = $(noinst_DATA)
|
||||
SHELLCHECKSCRIPTS += $(noinst_DATA)
|
||||
SHELLCHECK_SHELL = bash
|
||||
|
@ -4,4 +4,4 @@ EXTRA_DIST = \
|
||||
taskqlatency.bt \
|
||||
zfs-trace.sh
|
||||
|
||||
SHELLCHECKSCRIPTS = zfs-trace.sh
|
||||
SHELLCHECKSCRIPTS += zfs-trace.sh
|
||||
|
@ -1,3 +1,5 @@
|
||||
CLEANFILES =
|
||||
EXTRA_DIST =
|
||||
include $(top_srcdir)/config/Substfiles.am
|
||||
include $(top_srcdir)/config/Shellcheck.am
|
||||
|
||||
@ -6,3 +8,4 @@ pkgdracut_SCRIPTS = \
|
||||
module-setup.sh
|
||||
|
||||
SUBSTFILES += $(pkgdracut_SCRIPTS)
|
||||
SHELLCHECKSCRIPTS += $(pkgdracut_SCRIPTS)
|
||||
|
@ -1,3 +1,5 @@
|
||||
CLEANFILES =
|
||||
EXTRA_DIST =
|
||||
include $(top_srcdir)/config/Substfiles.am
|
||||
include $(top_srcdir)/config/Shellcheck.am
|
||||
|
||||
@ -22,3 +24,4 @@ SUBSTFILES += $(pkgdracut_SCRIPTS) $(pkgdracut_DATA)
|
||||
|
||||
# Provided by /bin/sleep, and, again, every implementation of that supports this
|
||||
CHECKBASHISMS_IGNORE = -e 'sleep only takes one integer' -e 'sleep 0.'
|
||||
SHELLCHECKSCRIPTS += $(pkgdracut_SCRIPTS)
|
||||
|
@ -3,7 +3,7 @@ include $(top_srcdir)/config/Shellcheck.am
|
||||
initrddir = /usr/share/initramfs-tools
|
||||
|
||||
dist_initrd_SCRIPTS = \
|
||||
zfsunlock
|
||||
zfsunlock
|
||||
|
||||
SUBDIRS = conf.d conf-hooks.d hooks scripts
|
||||
SHELLCHECKDIRS = hooks scripts
|
||||
|
@ -1,3 +1,5 @@
|
||||
CLEANFILES =
|
||||
EXTRA_DIST =
|
||||
include $(top_srcdir)/config/Substfiles.am
|
||||
include $(top_srcdir)/config/Shellcheck.am
|
||||
|
||||
@ -8,3 +10,4 @@ hooks_SCRIPTS = \
|
||||
zfsunlock
|
||||
|
||||
SUBSTFILES += $(hooks_SCRIPTS)
|
||||
SHELLCHECKSCRIPTS += $(hooks_SCRIPTS)
|
||||
|
@ -9,3 +9,4 @@ SUBDIRS = local-top
|
||||
|
||||
SHELLCHECKDIRS = $(SUBDIRS)
|
||||
SHELLCHECK_SHELL = sh
|
||||
SHELLCHECKSCRIPTS += $(dist_scripts_SCRIPTS)
|
||||
|
@ -3,5 +3,6 @@ include $(top_srcdir)/config/Shellcheck.am
|
||||
localtopdir = /usr/share/initramfs-tools/scripts/local-top
|
||||
|
||||
dist_localtop_SCRIPTS = \
|
||||
zfs
|
||||
zfs
|
||||
|
||||
SHELLCHECKSCRIPTS += $(dist_scripts_SCRIPTS)
|
||||
|
@ -1,3 +1,5 @@
|
||||
CLEANFILES =
|
||||
EXTRA_DIST =
|
||||
include $(top_srcdir)/config/Substfiles.am
|
||||
include $(top_srcdir)/config/Shellcheck.am
|
||||
|
||||
@ -6,3 +8,4 @@ initconf_SCRIPTS = zfs
|
||||
SUBSTFILES += $(initconf_SCRIPTS)
|
||||
|
||||
SHELLCHECK_SHELL = sh
|
||||
SHELLCHECKSCRIPTS += $(initconf_SCRIPTS)
|
||||
|
@ -1,3 +1,5 @@
|
||||
CLEANFILES =
|
||||
EXTRA_DIST =
|
||||
include $(top_srcdir)/config/Substfiles.am
|
||||
include $(top_srcdir)/config/Shellcheck.am
|
||||
|
||||
@ -8,3 +10,4 @@ init_SCRIPTS = zfs-import zfs-load-key zfs-mount zfs-share zfs-zed
|
||||
SUBSTFILES += $(init_SCRIPTS)
|
||||
|
||||
SHELLCHECK_SHELL = sh
|
||||
SHELLCHECKSCRIPTS += $(init_SCRIPTS)
|
||||
|
@ -1,3 +1,5 @@
|
||||
CLEANFILES =
|
||||
EXTRA_DIST =
|
||||
include $(top_srcdir)/config/Substfiles.am
|
||||
|
||||
systemdpreset_DATA = \
|
||||
|
@ -1,3 +1,5 @@
|
||||
CLEANFILES =
|
||||
EXTRA_DIST =
|
||||
include $(top_srcdir)/config/Substfiles.am
|
||||
include $(top_srcdir)/config/Shellcheck.am
|
||||
|
||||
@ -16,3 +18,4 @@ pkgsysconf_SCRIPTS = \
|
||||
SUBSTFILES += $(pkgsysconf_SCRIPTS)
|
||||
|
||||
SHELLCHECK_SHELL = sh
|
||||
SHELLCHECKSCRIPTS += $(pkgsysconf_SCRIPTS)
|
||||
|
@ -1,3 +1,5 @@
|
||||
CLEANFILES =
|
||||
EXTRA_DIST =
|
||||
include $(top_srcdir)/config/Substfiles.am
|
||||
|
||||
EXTRA_DIST += \
|
||||
|
@ -28,7 +28,7 @@ EXTRA_DIST = \
|
||||
zol2zfs-patch.sed \
|
||||
$(EXTRA_SCRIPTS)
|
||||
|
||||
SHELLCHECKSCRIPTS = $(EXTRA_SCRIPTS)
|
||||
SHELLCHECKSCRIPTS += $(dist_pkgdata_SCRIPTS) $(EXTRA_SCRIPTS)
|
||||
|
||||
define EXTRA_ENVIRONMENT
|
||||
|
||||
@ -37,13 +37,13 @@ export INTREE="yes"
|
||||
export GDB="libtool --mode=execute gdb"
|
||||
export LDMOD=/sbin/insmod
|
||||
|
||||
export CMD_DIR=@abs_top_builddir@/cmd
|
||||
export CMD_DIR=@abs_top_builddir@
|
||||
export UDEV_RULE_DIR=@abs_top_builddir@/udev/rules.d
|
||||
export ZEDLET_ETC_DIR=$$CMD_DIR/zed/zed.d
|
||||
export ZEDLET_LIBEXEC_DIR=$$CMD_DIR/zed/zed.d
|
||||
export ZPOOL_SCRIPT_DIR=$$CMD_DIR/zpool/zpool.d
|
||||
export ZPOOL_SCRIPTS_PATH=$$CMD_DIR/zpool/zpool.d
|
||||
export ZPOOL_COMPAT_DIR=$$CMD_DIR/zpool/compatibility.d
|
||||
export ZEDLET_ETC_DIR=$$CMD_DIR/cmd/zed/zed.d
|
||||
export ZEDLET_LIBEXEC_DIR=$$CMD_DIR/cmd/zed/zed.d
|
||||
export ZPOOL_SCRIPT_DIR=$$CMD_DIR/cmd/zpool/zpool.d
|
||||
export ZPOOL_SCRIPTS_PATH=$$CMD_DIR/cmd/zpool/zpool.d
|
||||
export ZPOOL_COMPAT_DIR=$$CMD_DIR/cmd/zpool/compatibility.d
|
||||
export CONTRIB_DIR=@abs_top_builddir@/contrib
|
||||
export LIB_DIR=@abs_top_builddir@/.libs
|
||||
export SYSCONF_DIR=@abs_top_builddir@/etc
|
||||
@ -62,9 +62,9 @@ endef
|
||||
export EXTRA_ENVIRONMENT
|
||||
|
||||
all-local:
|
||||
-$(SED) -e '\|^export BIN_DIR=|s|$$|@abs_top_builddir@/bin|' \
|
||||
-e '\|^export SBIN_DIR=|s|$$|@abs_top_builddir@/bin|' \
|
||||
-e '\|^export LIBEXEC_DIR=|s|$$|@abs_top_builddir@/bin|' \
|
||||
-$(SED) -e '\|^export BIN_DIR=|s|$$|@abs_top_builddir@/tests/zfs-tests/bin|' \
|
||||
-e '\|^export SBIN_DIR=|s|$$|@abs_top_builddir@|' \
|
||||
-e '\|^export LIBEXEC_DIR=|s|$$|@abs_top_builddir@|' \
|
||||
-e '\|^export ZTS_DIR=|s|$$|@abs_top_srcdir@/tests|' \
|
||||
-e '\|^export SCRIPT_DIR=|s|$$|@abs_top_srcdir@/scripts|' \
|
||||
$(abs_top_srcdir)/scripts/common.sh.in >common.sh
|
||||
|
@ -18,7 +18,7 @@
|
||||
# --sysconfdir=DIR install zfs configuration files [PREFIX/etc]
|
||||
#
|
||||
|
||||
BASE_DIR=$(dirname "$0")
|
||||
BASE_DIR=${0%/*}
|
||||
SCRIPT_COMMON=common.sh
|
||||
if [ -f "${BASE_DIR}/${SCRIPT_COMMON}" ]; then
|
||||
. "${BASE_DIR}/${SCRIPT_COMMON}"
|
||||
@ -46,7 +46,7 @@ msg() {
|
||||
usage() {
|
||||
cat << EOF
|
||||
USAGE:
|
||||
$0 [dhirv]
|
||||
$0 [-dhirv]
|
||||
|
||||
DESCRIPTION:
|
||||
Install/remove the ZFS helper utilities.
|
||||
@ -99,7 +99,7 @@ if [ "$INSTALL" = "no" ] && [ "$REMOVE" = "no" ]; then
|
||||
fail "Either -i or -r must be specified"
|
||||
fi
|
||||
|
||||
if [ "$(id -u)" != "0" ]; then
|
||||
if [ "$(id -u)" != "0" ] && [ "$DRYRUN" = "no" ]; then
|
||||
fail "Must run as root"
|
||||
fi
|
||||
|
||||
@ -126,13 +126,13 @@ install() {
|
||||
echo "Symlink exists: $dst"
|
||||
elif [ -e "$dst" ]; then
|
||||
echo "File exists: $dst"
|
||||
elif [ ! -e "$src" ]; then
|
||||
elif ! [ -e "$src" ]; then
|
||||
echo "Source missing: $src"
|
||||
else
|
||||
msg "ln -s $src $dst"
|
||||
|
||||
if [ "$DRYRUN" = "no" ]; then
|
||||
DIR=$(dirname "$dst")
|
||||
DIR=${dst%/*}
|
||||
mkdir -p "$DIR" >/dev/null 2>&1
|
||||
ln -s "$src" "$dst"
|
||||
fi
|
||||
@ -145,7 +145,7 @@ remove() {
|
||||
if [ -h "$dst" ]; then
|
||||
msg "rm $dst"
|
||||
rm "$dst"
|
||||
DIR=$(dirname "$dst")
|
||||
DIR=${dst%/*}
|
||||
rmdir "$DIR" >/dev/null 2>&1
|
||||
elif [ -e "$dst" ]; then
|
||||
echo "Expected symlink: $dst"
|
||||
@ -153,30 +153,23 @@ remove() {
|
||||
}
|
||||
|
||||
if [ "${INSTALL}" = "yes" ]; then
|
||||
install "$CMD_DIR/mount_zfs/mount.zfs" \
|
||||
"$INSTALL_MOUNT_HELPER_DIR/mount.zfs"
|
||||
install "$CMD_DIR/fsck_zfs/fsck.zfs" \
|
||||
"$INSTALL_MOUNT_HELPER_DIR/fsck.zfs"
|
||||
install "$CMD_DIR/zvol_id/zvol_id" \
|
||||
"$INSTALL_UDEV_DIR/zvol_id"
|
||||
install "$CMD_DIR/vdev_id/vdev_id" \
|
||||
"$INSTALL_UDEV_DIR/vdev_id"
|
||||
install "$UDEV_RULE_DIR/60-zvol.rules" \
|
||||
"$INSTALL_UDEV_RULE_DIR/60-zvol.rules"
|
||||
install "$UDEV_RULE_DIR/69-vdev.rules" \
|
||||
"$INSTALL_UDEV_RULE_DIR/69-vdev.rules"
|
||||
install "$UDEV_RULE_DIR/90-zfs.rules" \
|
||||
"$INSTALL_UDEV_RULE_DIR/90-zfs.rules"
|
||||
install "$CMD_DIR/zpool/zpool.d" \
|
||||
"$INSTALL_SYSCONF_DIR/zfs/zpool.d"
|
||||
install "$CONTRIB_DIR/pyzfs/libzfs_core" \
|
||||
"$INSTALL_PYTHON_DIR/libzfs_core"
|
||||
for cmd in "mount.zfs" "fsck.zfs"; do
|
||||
install "$CMD_DIR/$cmd" "$INSTALL_MOUNT_HELPER_DIR/$cmd"
|
||||
done
|
||||
for udev in "$CMD_DIR/zvol_id" "$UDEV_SCRIPT_DIR/vdev_id"; do
|
||||
install "$udev" "$INSTALL_UDEV_DIR/${udev##*/}"
|
||||
done
|
||||
for rule in "60-zvol.rules" "69-vdev.rules" "90-zfs.rules"; do
|
||||
install "$UDEV_RULE_DIR/$rule" "$INSTALL_UDEV_RULE_DIR/$rule"
|
||||
done
|
||||
install "$ZPOOL_SCRIPT_DIR" "$INSTALL_SYSCONF_DIR/zfs/zpool.d"
|
||||
install "$CONTRIB_DIR/pyzfs/libzfs_core" "$INSTALL_PYTHON_DIR/libzfs_core"
|
||||
# Ideally we would install these in the configured ${libdir}, which is
|
||||
# by default "/usr/local/lib and unfortunately not included in the
|
||||
# dynamic linker search path.
|
||||
install "$(find "$LIB_DIR" -type f -name 'libzfs_core.so*')" "/lib/libzfs_core.so"
|
||||
install "$(find "$LIB_DIR" -type f -name 'libnvpair.so*')" "/lib/libnvpair.so"
|
||||
ldconfig
|
||||
install "$LIB_DIR"/libzfs_core.so.?.?.? "/lib/libzfs_core.so"
|
||||
install "$LIB_DIR"/libnvpair.so.?.?.? "/lib/libnvpair.so"
|
||||
[ "$DRYRUN" = "no" ] && ldconfig
|
||||
else
|
||||
remove "$INSTALL_MOUNT_HELPER_DIR/mount.zfs"
|
||||
remove "$INSTALL_MOUNT_HELPER_DIR/fsck.zfs"
|
||||
|
@ -248,7 +248,7 @@ constrain_path() {
|
||||
SYSTEM_DIRS="$SYSTEM_DIRS /usr/bin /usr/sbin /bin /sbin $LIBEXEC_DIR"
|
||||
|
||||
if [ "$INTREE" = "yes" ]; then
|
||||
# Constrained path set to ./zfs/bin/
|
||||
# Constrained path set to $(top_builddir)/tests/zfs-tests/bin
|
||||
STF_PATH="$BIN_DIR"
|
||||
STF_PATH_REMOVE="no"
|
||||
STF_MISSING_BIN=""
|
||||
@ -258,14 +258,10 @@ constrain_path() {
|
||||
fi
|
||||
|
||||
# Special case links for standard zfs utilities
|
||||
DIRS="$(find "$CMD_DIR" -type d \( ! -name .deps -a \
|
||||
! -name .libs \) -print | tr '\n' ' ')"
|
||||
create_links "$DIRS" "$ZFS_FILES"
|
||||
create_links "$CMD_DIR" "$ZFS_FILES"
|
||||
|
||||
# Special case links for zfs test suite utilities
|
||||
DIRS="$(find "$STF_SUITE" -type d \( ! -name .deps -a \
|
||||
! -name .libs \) -print | tr '\n' ' ')"
|
||||
create_links "$DIRS" "$ZFSTEST_FILES"
|
||||
create_links "$CMD_DIR/tests/zfs-tests/cmd" "$ZFSTEST_FILES"
|
||||
else
|
||||
# Constrained path set to /var/tmp/constrained_path.*
|
||||
SYSTEMDIR=${SYSTEMDIR:-/var/tmp/constrained_path.XXXXXX}
|
||||
|
@ -235,8 +235,8 @@ src_set_vars() {
|
||||
ZFS_CMD=$(command -v zfs)
|
||||
ZFS_SH="/usr/share/zfs/zfs.sh"
|
||||
else
|
||||
ZPOOL_CMD="./cmd/zpool/zpool"
|
||||
ZFS_CMD="./cmd/zfs/zfs"
|
||||
ZPOOL_CMD="./zpool"
|
||||
ZFS_CMD="./zfs"
|
||||
ZFS_SH="./scripts/zfs.sh"
|
||||
fi
|
||||
}
|
||||
|
@ -4,5 +4,4 @@ SUBDIRS = runfiles test-runner zfs-tests
|
||||
|
||||
EXTRA_DIST = README.md
|
||||
|
||||
SHELLCHECKSCRIPTS = $$(find . -name '*.sh')
|
||||
.PHONY: $(SHELLCHECKSCRIPTS)
|
||||
SHELLCHECKSCRIPTS += $(shell find $(srcdir) -name '*.sh')
|
||||
|
@ -1,3 +1,5 @@
|
||||
CLEANFILES =
|
||||
EXTRA_DIST =
|
||||
include $(top_srcdir)/config/Substfiles.am
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@/test-runner/bin
|
||||
|
1
tests/zfs-tests/.gitignore
vendored
Normal file
1
tests/zfs-tests/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
bin
|
@ -1,3 +1,5 @@
|
||||
CLEANFILES =
|
||||
EXTRA_DIST =
|
||||
include $(top_srcdir)/config/Substfiles.am
|
||||
|
||||
pkgdatadir = $(datadir)/@PACKAGE@/zfs-tests/include
|
||||
|
@ -1,3 +1,5 @@
|
||||
CLEANFILES =
|
||||
EXTRA_DIST =
|
||||
include $(top_srcdir)/config/Substfiles.am
|
||||
|
||||
pkgpyzfsdir = $(datadir)/@PACKAGE@/zfs-tests/tests/functional/pyzfs
|
||||
|
@ -1,3 +1,5 @@
|
||||
CLEANFILES =
|
||||
EXTRA_DIST =
|
||||
include $(top_srcdir)/config/Substfiles.am
|
||||
|
||||
udevrule_DATA = \
|
||||
|
Loading…
Reference in New Issue
Block a user