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