aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/zed/zed.d
diff options
context:
space:
mode:
authorнаб <[email protected]>2022-04-09 04:09:55 +0200
committerBrian Behlendorf <[email protected]>2022-05-10 10:18:38 -0700
commit5cdca5b1da7884c54260db473f892354bc79951b (patch)
tree6bdce13ac507fd450359dde2b3fa10405a480c54 /cmd/zed/zed.d
parent3ff81c460114e0b3f69a9993d4777ec2c590fb16 (diff)
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 <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #13316
Diffstat (limited to 'cmd/zed/zed.d')
-rw-r--r--cmd/zed/zed.d/Makefile.am68
1 files changed, 32 insertions, 36 deletions
diff --git a/cmd/zed/zed.d/Makefile.am b/cmd/zed/zed.d/Makefile.am
index 3efcfb362..122d2c0c5 100644
--- a/cmd/zed/zed.d/Makefile.am
+++ b/cmd/zed/zed.d/Makefile.am
@@ -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
-
-nodist_zedexec_SCRIPTS = history_event-zfs-list-cacher.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 = \
+ %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
+
+EXTRA_DIST += $(addprefix %D%/,README)
-install-data-hook:
+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}"'