mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +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:
+37
-45
@@ -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)
|
||||
|
||||
+31
-35
@@ -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}"'
|
||||
|
||||
Reference in New Issue
Block a user