Centralize variable substitution
A bunch of places need to edit files to incorporate the configured paths i.e. bindir, sbindir etc. Move this logic into a common file. Create arc_summary by copying arc_summary[23] as appropriate at build time instead of install time. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu> Closes #10559
This commit is contained in:
parent
bdb518c13a
commit
38e2e9ce83
|
@ -54,7 +54,7 @@ CLEANFILES = $(GITREV)
|
||||||
|
|
||||||
PHONY = gitrev
|
PHONY = gitrev
|
||||||
gitrev:
|
gitrev:
|
||||||
ZFS_GITREV=$$(cd $(top_srcdir) && \
|
$(AM_V_GEN)ZFS_GITREV=$$(cd $(top_srcdir) && \
|
||||||
git describe --always --long --dirty 2>/dev/null); \
|
git describe --always --long --dirty 2>/dev/null); \
|
||||||
ZFS_GITREV=$${ZFS_GITREV:-unknown}; \
|
ZFS_GITREV=$${ZFS_GITREV:-unknown}; \
|
||||||
printf '#define\tZFS_META_GITREV "%s"\n' \
|
printf '#define\tZFS_META_GITREV "%s"\n' \
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
arc_summary
|
|
@ -1,4 +1,7 @@
|
||||||
transform = $(program_transform_name)
|
bin_SCRIPTS = arc_summary
|
||||||
|
|
||||||
|
CLEANFILES = arc_summary
|
||||||
|
EXTRA_DIST = arc_summary2 arc_summary3
|
||||||
|
|
||||||
if USING_PYTHON_2
|
if USING_PYTHON_2
|
||||||
SCRIPT = arc_summary2
|
SCRIPT = arc_summary2
|
||||||
|
@ -6,9 +9,5 @@ else
|
||||||
SCRIPT = arc_summary3
|
SCRIPT = arc_summary3
|
||||||
endif
|
endif
|
||||||
|
|
||||||
dist_bin_SCRIPTS = $(SCRIPT)
|
arc_summary: $(SCRIPT)
|
||||||
|
cp $< $@
|
||||||
install-exec-hook:
|
|
||||||
before=$$(echo $(SCRIPT) | sed '$(transform)'); \
|
|
||||||
after=$$(echo arc_summary | sed '$(transform)'); \
|
|
||||||
mv "$(DESTDIR)$(bindir)/$$before" "$(DESTDIR)$(bindir)/$$after"
|
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
arcstat
|
|
@ -1,13 +1,5 @@
|
||||||
dist_bin_SCRIPTS = arcstat
|
include $(top_srcdir)/config/Substfiles.am
|
||||||
|
|
||||||
#
|
bin_SCRIPTS = arcstat
|
||||||
# The arcstat script is compatible with both Python 2.6 and 3.4.
|
|
||||||
# As such the python 3 shebang can be replaced at install time when
|
SUBSTFILES += $(bin_SCRIPTS)
|
||||||
# targeting a python 2 system. This allows us to maintain a single
|
|
||||||
# version of the source.
|
|
||||||
#
|
|
||||||
if USING_PYTHON_2
|
|
||||||
install-exec-hook:
|
|
||||||
$(SED) ${ac_inplace} -e 's|^#!/usr/bin/env python3|#!/usr/bin/env python2|' \
|
|
||||||
$(DESTDIR)$(bindir)/arcstat
|
|
||||||
endif
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env @PYTHON_SHEBANG@
|
||||||
#
|
#
|
||||||
# Print out ZFS ARC Statistics exported via kstat(1)
|
# Print out ZFS ARC Statistics exported via kstat(1)
|
||||||
# For a definition of fields, or usage, use arcstat -v
|
# For a definition of fields, or usage, use arcstat -v
|
|
@ -0,0 +1 @@
|
||||||
|
dbufstat
|
|
@ -1,13 +1,5 @@
|
||||||
dist_bin_SCRIPTS = dbufstat
|
include $(top_srcdir)/config/Substfiles.am
|
||||||
|
|
||||||
#
|
bin_SCRIPTS = dbufstat
|
||||||
# The dbufstat script is compatible with both Python 2.6 and 3.4.
|
|
||||||
# As such the python 3 shebang can be replaced at install time when
|
SUBSTFILES += $(bin_SCRIPTS)
|
||||||
# targeting a python 2 system. This allows us to maintain a single
|
|
||||||
# version of the source.
|
|
||||||
#
|
|
||||||
if USING_PYTHON_2
|
|
||||||
install-exec-hook:
|
|
||||||
$(SED) ${ac_inplace} -e 's|^#!/usr/bin/env python3|#!/usr/bin/env python2|' \
|
|
||||||
$(DESTDIR)$(bindir)/dbufstat
|
|
||||||
endif
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env @PYTHON_SHEBANG@
|
||||||
#
|
#
|
||||||
# Print out statistics for all cached dmu buffers. This information
|
# Print out statistics for all cached dmu buffers. This information
|
||||||
# is available through the dbufs kstat and may be post-processed as
|
# is available through the dbufs kstat and may be post-processed as
|
|
@ -1,8 +1,7 @@
|
||||||
include $(top_srcdir)/config/Rules.am
|
include $(top_srcdir)/config/Rules.am
|
||||||
|
include $(top_srcdir)/config/Substfiles.am
|
||||||
|
|
||||||
EXTRA_DIST = \
|
EXTRA_DIST += README
|
||||||
README \
|
|
||||||
history_event-zfs-list-cacher.sh.in
|
|
||||||
|
|
||||||
zedconfdir = $(sysconfdir)/zfs/zed.d
|
zedconfdir = $(sysconfdir)/zfs/zed.d
|
||||||
|
|
||||||
|
@ -29,12 +28,7 @@ dist_zedexec_SCRIPTS = \
|
||||||
|
|
||||||
nodist_zedexec_SCRIPTS = history_event-zfs-list-cacher.sh
|
nodist_zedexec_SCRIPTS = history_event-zfs-list-cacher.sh
|
||||||
|
|
||||||
$(nodist_zedexec_SCRIPTS): %: %.in
|
SUBSTFILES += $(nodist_zedexec_SCRIPTS)
|
||||||
-$(SED) -e 's,@bindir\@,$(bindir),g' \
|
|
||||||
-e 's,@runstatedir\@,$(runstatedir),g' \
|
|
||||||
-e 's,@sbindir\@,$(sbindir),g' \
|
|
||||||
-e 's,@sysconfdir\@,$(sysconfdir),g' \
|
|
||||||
$< >'$@'
|
|
||||||
|
|
||||||
zedconfdefaults = \
|
zedconfdefaults = \
|
||||||
all-syslog.sh \
|
all-syslog.sh \
|
||||||
|
|
|
@ -0,0 +1,34 @@
|
||||||
|
subst_sed_cmd = \
|
||||||
|
-e 's|@bindir[@]|$(bindir)|g' \
|
||||||
|
-e 's|@sbindir[@]|$(sbindir)|g' \
|
||||||
|
-e 's|@datadir[@]|$(datadir)|g' \
|
||||||
|
-e 's|@sysconfdir[@]|$(sysconfdir)|g' \
|
||||||
|
-e 's|@runstatedir[@]|$(runstatedir)|g' \
|
||||||
|
-e 's|@initconfdir[@]|$(initconfdir)|g' \
|
||||||
|
-e 's|@initdir[@]|$(initdir)|g' \
|
||||||
|
-e 's|@mounthelperdir[@]|$(mounthelperdir)|g' \
|
||||||
|
-e 's|@systemdgeneratordir[@]|$(systemdgeneratordir)|g' \
|
||||||
|
-e 's|@systemdunitdir[@]|$(systemdunitdir)|g' \
|
||||||
|
-e 's|@udevdir[@]|$(udevdir)|g' \
|
||||||
|
-e 's|@udevruledir[@]|$(udevruledir)|g' \
|
||||||
|
-e 's|@zfsexecdir[@]|$(zfsexecdir)|g' \
|
||||||
|
-e 's|@PYTHON[@]|$(PYTHON)|g' \
|
||||||
|
-e 's|@PYTHON_SHEBANG[@]|$(PYTHON_SHEBANG)|g' \
|
||||||
|
-e 's|@DEFAULT_INIT_NFS_SERVER[@]|$(DEFAULT_INIT_NFS_SERVER)|g' \
|
||||||
|
-e 's|@DEFAULT_INIT_SHELL[@]|$(DEFAULT_INIT_SHELL)|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 \
|
||||||
|
echo "Undefined substitution" >&2; \
|
||||||
|
exit 1; \
|
||||||
|
else test $$? -eq 1; fi; \
|
||||||
|
test -x $< && chmod +x $@~; \
|
||||||
|
mv -f $@~ $@
|
|
@ -49,6 +49,10 @@ AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_PYTHON], [
|
||||||
AM_CONDITIONAL([USING_PYTHON_2], [test "x${PYTHON_VERSION%%\.*}" = x2])
|
AM_CONDITIONAL([USING_PYTHON_2], [test "x${PYTHON_VERSION%%\.*}" = x2])
|
||||||
AM_CONDITIONAL([USING_PYTHON_3], [test "x${PYTHON_VERSION%%\.*}" = x3])
|
AM_CONDITIONAL([USING_PYTHON_3], [test "x${PYTHON_VERSION%%\.*}" = x3])
|
||||||
|
|
||||||
|
AM_COND_IF([USING_PYTHON_2],
|
||||||
|
[AC_SUBST([PYTHON_SHEBANG], [python2])],
|
||||||
|
[AC_SUBST([PYTHON_SHEBANG], [python3])])
|
||||||
|
|
||||||
dnl #
|
dnl #
|
||||||
dnl # Request that packages be built for a specific Python version.
|
dnl # Request that packages be built for a specific Python version.
|
||||||
dnl #
|
dnl #
|
||||||
|
|
|
@ -266,7 +266,7 @@ AC_DEFUN([ZFS_AC_RPM], [
|
||||||
RPM_DEFINE_COMMON=${RPM_DEFINE_COMMON}' --define "$(DEBUG_KMEM_TRACKING_ZFS) 1"'
|
RPM_DEFINE_COMMON=${RPM_DEFINE_COMMON}' --define "$(DEBUG_KMEM_TRACKING_ZFS) 1"'
|
||||||
RPM_DEFINE_COMMON=${RPM_DEFINE_COMMON}' --define "$(ASAN_ZFS) 1"'
|
RPM_DEFINE_COMMON=${RPM_DEFINE_COMMON}' --define "$(ASAN_ZFS) 1"'
|
||||||
|
|
||||||
RPM_DEFINE_UTIL=' --define "_initconfdir $(DEFAULT_INITCONF_DIR)"'
|
RPM_DEFINE_UTIL=' --define "_initconfdir $(initconfdir)"'
|
||||||
|
|
||||||
dnl # Make the next three RPM_DEFINE_UTIL additions conditional, since
|
dnl # Make the next three RPM_DEFINE_UTIL additions conditional, since
|
||||||
dnl # their values may not be set when running:
|
dnl # their values may not be set when running:
|
||||||
|
@ -469,13 +469,13 @@ AC_DEFUN([ZFS_AC_DEFAULT_PACKAGE], [
|
||||||
|
|
||||||
AC_MSG_CHECKING([default init directory])
|
AC_MSG_CHECKING([default init directory])
|
||||||
case "$VENDOR" in
|
case "$VENDOR" in
|
||||||
freebsd) DEFAULT_INIT_DIR=$sysconfdir/rc.d ;;
|
freebsd) initdir=$sysconfdir/rc.d ;;
|
||||||
*) DEFAULT_INIT_DIR=$sysconfdir/init.d;;
|
*) initdir=$sysconfdir/init.d;;
|
||||||
esac
|
esac
|
||||||
AC_MSG_RESULT([$DEFAULT_INIT_DIR])
|
AC_MSG_RESULT([$initdir])
|
||||||
AC_SUBST(DEFAULT_INIT_DIR)
|
AC_SUBST(initdir)
|
||||||
|
|
||||||
AC_MSG_CHECKING([default init script type])
|
AC_MSG_CHECKING([default init script type and shell])
|
||||||
case "$VENDOR" in
|
case "$VENDOR" in
|
||||||
toss) DEFAULT_INIT_SCRIPT=redhat ;;
|
toss) DEFAULT_INIT_SCRIPT=redhat ;;
|
||||||
redhat) DEFAULT_INIT_SCRIPT=redhat ;;
|
redhat) DEFAULT_INIT_SCRIPT=redhat ;;
|
||||||
|
@ -491,24 +491,44 @@ AC_DEFUN([ZFS_AC_DEFAULT_PACKAGE], [
|
||||||
freebsd) DEFAULT_INIT_SCRIPT=freebsd;;
|
freebsd) DEFAULT_INIT_SCRIPT=freebsd;;
|
||||||
*) DEFAULT_INIT_SCRIPT=lsb ;;
|
*) DEFAULT_INIT_SCRIPT=lsb ;;
|
||||||
esac
|
esac
|
||||||
AC_MSG_RESULT([$DEFAULT_INIT_SCRIPT])
|
|
||||||
|
# On gentoo, it's possible that OpenRC isn't installed. Check if
|
||||||
|
# /sbin/openrc-run exists, and if not, fall back to generic defaults.
|
||||||
|
|
||||||
|
DEFAULT_INIT_SHELL="/bin/sh"
|
||||||
|
AS_IF([test "$DEFAULT_INIT_SCRIPT" = "openrc"], [
|
||||||
|
AS_IF([test -x "/sbin/openrc-run"],
|
||||||
|
[DEFAULT_INIT_SHELL="/sbin/openrc-run"],
|
||||||
|
[DEFAULT_INIT_SCRIPT=lsb])
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_MSG_RESULT([$DEFAULT_INIT_SCRIPT:$DEFAULT_INIT_SHELL])
|
||||||
AC_SUBST(DEFAULT_INIT_SCRIPT)
|
AC_SUBST(DEFAULT_INIT_SCRIPT)
|
||||||
|
AC_SUBST(DEFAULT_INIT_SHELL)
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([default nfs server init script])
|
||||||
|
AS_IF([test "$VENDOR" = "debian"],
|
||||||
|
[DEFAULT_INIT_NFS_SERVER="nfs-kernel-server"],
|
||||||
|
[DEFAULT_INIT_NFS_SERVER="nfs"]
|
||||||
|
)
|
||||||
|
AC_MSG_RESULT([$DEFAULT_INIT_NFS_SERVER])
|
||||||
|
AC_SUBST(DEFAULT_INIT_NFS_SERVER)
|
||||||
|
|
||||||
AC_MSG_CHECKING([default init config directory])
|
AC_MSG_CHECKING([default init config directory])
|
||||||
case "$VENDOR" in
|
case "$VENDOR" in
|
||||||
alpine) DEFAULT_INITCONF_DIR=/etc/conf.d ;;
|
alpine) initconfdir=/etc/conf.d ;;
|
||||||
gentoo) DEFAULT_INITCONF_DIR=/etc/conf.d ;;
|
gentoo) initconfdir=/etc/conf.d ;;
|
||||||
toss) DEFAULT_INITCONF_DIR=/etc/sysconfig ;;
|
toss) initconfdir=/etc/sysconfig ;;
|
||||||
redhat) DEFAULT_INITCONF_DIR=/etc/sysconfig ;;
|
redhat) initconfdir=/etc/sysconfig ;;
|
||||||
fedora) DEFAULT_INITCONF_DIR=/etc/sysconfig ;;
|
fedora) initconfdir=/etc/sysconfig ;;
|
||||||
sles) DEFAULT_INITCONF_DIR=/etc/sysconfig ;;
|
sles) initconfdir=/etc/sysconfig ;;
|
||||||
ubuntu) DEFAULT_INITCONF_DIR=/etc/default ;;
|
ubuntu) initconfdir=/etc/default ;;
|
||||||
debian) DEFAULT_INITCONF_DIR=/etc/default ;;
|
debian) initconfdir=/etc/default ;;
|
||||||
freebsd) DEFAULT_INITCONF_DIR=$sysconfdir/rc.conf.d;;
|
freebsd) initconfdir=$sysconfdir/rc.conf.d;;
|
||||||
*) DEFAULT_INITCONF_DIR=/etc/default ;;
|
*) initconfdir=/etc/default ;;
|
||||||
esac
|
esac
|
||||||
AC_MSG_RESULT([$DEFAULT_INITCONF_DIR])
|
AC_MSG_RESULT([$initconfdir])
|
||||||
AC_SUBST(DEFAULT_INITCONF_DIR)
|
AC_SUBST(initconfdir)
|
||||||
|
|
||||||
AC_MSG_CHECKING([whether initramfs-tools is available])
|
AC_MSG_CHECKING([whether initramfs-tools is available])
|
||||||
if test -d /usr/share/initramfs-tools ; then
|
if test -d /usr/share/initramfs-tools ; then
|
||||||
|
|
|
@ -1,18 +1,7 @@
|
||||||
|
include $(top_srcdir)/config/Substfiles.am
|
||||||
|
|
||||||
pkgdracutdir = $(dracutdir)/modules.d/02zfsexpandknowledge
|
pkgdracutdir = $(dracutdir)/modules.d/02zfsexpandknowledge
|
||||||
pkgdracut_SCRIPTS = \
|
pkgdracut_SCRIPTS = \
|
||||||
module-setup.sh
|
module-setup.sh
|
||||||
|
|
||||||
EXTRA_DIST = \
|
SUBSTFILES += $(pkgdracut_SCRIPTS)
|
||||||
module-setup.sh.in
|
|
||||||
|
|
||||||
$(pkgdracut_SCRIPTS):%:%.in
|
|
||||||
-$(SED) -e 's,@bindir\@,$(bindir),g' \
|
|
||||||
-e 's,@sbindir\@,$(sbindir),g' \
|
|
||||||
-e 's,@datadir\@,$(datadir),g' \
|
|
||||||
-e 's,@dracutdir\@,$(dracutdir),g' \
|
|
||||||
-e 's,@udevdir\@,$(udevdir),g' \
|
|
||||||
-e 's,@udevruledir\@,$(udevruledir),g' \
|
|
||||||
-e 's,@sysconfdir\@,$(sysconfdir),g' \
|
|
||||||
$< >'$@'
|
|
||||||
|
|
||||||
CLEANFILES = $(pkgdracut_SCRIPTS)
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
include $(top_srcdir)/config/Substfiles.am
|
||||||
|
|
||||||
pkgdracutdir = $(dracutdir)/modules.d/90zfs
|
pkgdracutdir = $(dracutdir)/modules.d/90zfs
|
||||||
pkgdracut_SCRIPTS = \
|
pkgdracut_SCRIPTS = \
|
||||||
export-zfs.sh \
|
export-zfs.sh \
|
||||||
|
@ -14,27 +16,4 @@ pkgdracut_DATA = \
|
||||||
zfs-snapshot-bootfs.service \
|
zfs-snapshot-bootfs.service \
|
||||||
zfs-rollback-bootfs.service
|
zfs-rollback-bootfs.service
|
||||||
|
|
||||||
EXTRA_DIST = \
|
SUBSTFILES += $(pkgdracut_SCRIPTS) $(pkgdracut_DATA)
|
||||||
export-zfs.sh.in \
|
|
||||||
module-setup.sh.in \
|
|
||||||
mount-zfs.sh.in \
|
|
||||||
parse-zfs.sh.in \
|
|
||||||
zfs-generator.sh.in \
|
|
||||||
zfs-load-key.sh.in \
|
|
||||||
zfs-needshutdown.sh.in \
|
|
||||||
zfs-lib.sh.in \
|
|
||||||
zfs-env-bootfs.service.in \
|
|
||||||
zfs-snapshot-bootfs.service.in \
|
|
||||||
zfs-rollback-bootfs.service.in
|
|
||||||
|
|
||||||
$(pkgdracut_SCRIPTS) $(pkgdracut_DATA) :%:%.in
|
|
||||||
-$(SED) -e 's,@bindir\@,$(bindir),g' \
|
|
||||||
-e 's,@sbindir\@,$(sbindir),g' \
|
|
||||||
-e 's,@udevdir\@,$(udevdir),g' \
|
|
||||||
-e 's,@udevruledir\@,$(udevruledir),g' \
|
|
||||||
-e 's,@sysconfdir\@,$(sysconfdir),g' \
|
|
||||||
-e 's,@systemdunitdir\@,$(systemdunitdir),g' \
|
|
||||||
-e 's,@mounthelperdir\@,$(mounthelperdir),g' \
|
|
||||||
$< >'$@'
|
|
||||||
|
|
||||||
CLEANFILES = $(pkgdracut_SCRIPTS) $(pkgdracut_DATA)
|
|
||||||
|
|
|
@ -1,20 +1,9 @@
|
||||||
|
include $(top_srcdir)/config/Substfiles.am
|
||||||
|
|
||||||
hooksdir = /usr/share/initramfs-tools/hooks
|
hooksdir = /usr/share/initramfs-tools/hooks
|
||||||
|
|
||||||
hooks_SCRIPTS = \
|
hooks_SCRIPTS = \
|
||||||
zfs \
|
zfs \
|
||||||
zfsunlock
|
zfsunlock
|
||||||
|
|
||||||
EXTRA_DIST = \
|
SUBSTFILES += $(hooks_SCRIPTS)
|
||||||
zfs.in \
|
|
||||||
zfsunlock.in
|
|
||||||
|
|
||||||
$(hooks_SCRIPTS):%:%.in Makefile
|
|
||||||
-$(SED) -e 's,@sbindir\@,$(sbindir),g' \
|
|
||||||
-e 's,@sysconfdir\@,$(sysconfdir),g' \
|
|
||||||
-e 's,@udevdir\@,$(udevdir),g' \
|
|
||||||
-e 's,@udevruledir\@,$(udevruledir),g' \
|
|
||||||
-e 's,@mounthelperdir\@,$(mounthelperdir),g' \
|
|
||||||
-e 's,@DEFAULT_INITCONF_DIR\@,$(DEFAULT_INITCONF_DIR),g' \
|
|
||||||
$< >'$@'
|
|
||||||
|
|
||||||
CLEANFILES = $(hooks_SCRIPTS)
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ COPY_EXEC_LIST="@sbindir@/zdb @sbindir@/zpool @sbindir@/zfs"
|
||||||
COPY_EXEC_LIST="$COPY_EXEC_LIST @mounthelperdir@/mount.zfs @udevdir@/vdev_id"
|
COPY_EXEC_LIST="$COPY_EXEC_LIST @mounthelperdir@/mount.zfs @udevdir@/vdev_id"
|
||||||
COPY_EXEC_LIST="$COPY_EXEC_LIST @udevdir@/zvol_id"
|
COPY_EXEC_LIST="$COPY_EXEC_LIST @udevdir@/zvol_id"
|
||||||
COPY_FILE_LIST="/etc/hostid @sysconfdir@/zfs/zpool.cache"
|
COPY_FILE_LIST="/etc/hostid @sysconfdir@/zfs/zpool.cache"
|
||||||
COPY_FILE_LIST="$COPY_FILE_LIST @DEFAULT_INITCONF_DIR@/zfs"
|
COPY_FILE_LIST="$COPY_FILE_LIST @initconfdir@/zfs"
|
||||||
COPY_FILE_LIST="$COPY_FILE_LIST @sysconfdir@/zfs/zfs-functions"
|
COPY_FILE_LIST="$COPY_FILE_LIST @sysconfdir@/zfs/zfs-functions"
|
||||||
COPY_FILE_LIST="$COPY_FILE_LIST @sysconfdir@/zfs/vdev_id.conf"
|
COPY_FILE_LIST="$COPY_FILE_LIST @sysconfdir@/zfs/vdev_id.conf"
|
||||||
COPY_FILE_LIST="$COPY_FILE_LIST @udevruledir@/60-zvol.rules"
|
COPY_FILE_LIST="$COPY_FILE_LIST @udevruledir@/60-zvol.rules"
|
||||||
|
|
|
@ -1,12 +1,5 @@
|
||||||
initconfdir = $(DEFAULT_INITCONF_DIR)
|
include $(top_srcdir)/config/Substfiles.am
|
||||||
|
|
||||||
initconf_SCRIPTS = zfs
|
initconf_SCRIPTS = zfs
|
||||||
|
|
||||||
EXTRA_DIST = \
|
SUBSTFILES += $(initconf_SCRIPTS)
|
||||||
zfs.in
|
|
||||||
|
|
||||||
$(initconf_SCRIPTS):%:%.in Makefile
|
|
||||||
$(SED) \
|
|
||||||
-e 's,@sysconfdir\@,$(sysconfdir),g' \
|
|
||||||
$< >'$@'
|
|
||||||
|
|
||||||
CLEANFILES = $(initconf_SCRIPTS)
|
|
||||||
|
|
|
@ -1,38 +1,7 @@
|
||||||
initdir = $(DEFAULT_INIT_DIR)
|
include $(top_srcdir)/config/Substfiles.am
|
||||||
|
|
||||||
|
EXTRA_DIST += README.md
|
||||||
|
|
||||||
init_SCRIPTS = zfs-import zfs-mount zfs-share zfs-zed
|
init_SCRIPTS = zfs-import zfs-mount zfs-share zfs-zed
|
||||||
|
|
||||||
initconfdir = $(DEFAULT_INITCONF_DIR)
|
SUBSTFILES += $(init_SCRIPTS)
|
||||||
|
|
||||||
EXTRA_DIST = \
|
|
||||||
zfs-share.in \
|
|
||||||
zfs-import.in \
|
|
||||||
zfs-mount.in \
|
|
||||||
zfs-zed.in \
|
|
||||||
README.md
|
|
||||||
|
|
||||||
$(init_SCRIPTS):%:%.in Makefile
|
|
||||||
-(if [ -e /etc/debian_version ]; then \
|
|
||||||
NFS_SRV=nfs-kernel-server; \
|
|
||||||
else \
|
|
||||||
NFS_SRV=nfs; \
|
|
||||||
fi; \
|
|
||||||
if [ -e /sbin/openrc-run ]; then \
|
|
||||||
SHELL=/sbin/openrc-run; \
|
|
||||||
else \
|
|
||||||
SHELL=/bin/sh; \
|
|
||||||
fi; \
|
|
||||||
$(SED) \
|
|
||||||
-e 's,@bindir\@,$(bindir),g' \
|
|
||||||
-e 's,@sbindir\@,$(sbindir),g' \
|
|
||||||
-e 's,@udevdir\@,$(udevdir),g' \
|
|
||||||
-e 's,@udevruledir\@,$(udevruledir),g' \
|
|
||||||
-e 's,@sysconfdir\@,$(sysconfdir),g' \
|
|
||||||
-e 's,@initconfdir\@,$(initconfdir),g' \
|
|
||||||
-e 's,@initdir\@,$(initdir),g' \
|
|
||||||
-e 's,@runstatedir\@,$(runstatedir),g' \
|
|
||||||
-e "s,@SHELL\@,$$SHELL,g" \
|
|
||||||
-e "s,@NFS_SRV\@,$$NFS_SRV,g" \
|
|
||||||
$< >'$@'; \
|
|
||||||
chmod +x '$@')
|
|
||||||
|
|
||||||
CLEANFILES = $(init_SCRIPTS)
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!@SHELL@
|
#!@DEFAULT_INIT_SHELL@
|
||||||
#
|
#
|
||||||
# zfs-import This script will import ZFS pools
|
# zfs-import This script will import ZFS pools
|
||||||
#
|
#
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!@SHELL@
|
#!@DEFAULT_INIT_SHELL@
|
||||||
#
|
#
|
||||||
# zfs-mount This script will mount/umount the zfs filesystems.
|
# zfs-mount This script will mount/umount the zfs filesystems.
|
||||||
#
|
#
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!@SHELL@
|
#!@DEFAULT_INIT_SHELL@
|
||||||
#
|
#
|
||||||
# zfs-share This script will network share zfs filesystems and volumes.
|
# zfs-share This script will network share zfs filesystems and volumes.
|
||||||
#
|
#
|
||||||
|
@ -13,8 +13,8 @@
|
||||||
# Required-Stop: $local_fs $network $remote_fs zfs-mount
|
# Required-Stop: $local_fs $network $remote_fs zfs-mount
|
||||||
# Default-Start: 2 3 4 5
|
# Default-Start: 2 3 4 5
|
||||||
# Default-Stop: 0 1 6
|
# Default-Stop: 0 1 6
|
||||||
# Should-Start: iscsi iscsitarget istgt scst @NFS_SRV@ samba samba4 zfs-mount zfs-zed
|
# Should-Start: iscsi iscsitarget istgt scst @DEFAULT_INIT_NFS_SERVER@ samba samba4 zfs-mount zfs-zed
|
||||||
# Should-Stop: iscsi iscsitarget istgt scst @NFS_SRV@ samba samba4 zfs-mount zfs-zed
|
# Should-Stop: iscsi iscsitarget istgt scst @DEFAULT_INIT_NFS_SERVER@ samba samba4 zfs-mount zfs-zed
|
||||||
# Short-Description: Network share ZFS datasets and volumes.
|
# Short-Description: Network share ZFS datasets and volumes.
|
||||||
# Description: Run the `zfs share -a` or `zfs unshare -a` commands
|
# Description: Run the `zfs share -a` or `zfs unshare -a` commands
|
||||||
# for controlling iSCSI, NFS, or CIFS network shares.
|
# for controlling iSCSI, NFS, or CIFS network shares.
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!@SHELL@
|
#!@DEFAULT_INIT_SHELL@
|
||||||
#
|
#
|
||||||
# zfs-zed
|
# zfs-zed
|
||||||
#
|
#
|
||||||
|
|
|
@ -1,12 +1,2 @@
|
||||||
modulesload_DATA = \
|
dist_modulesload_DATA = \
|
||||||
zfs.conf
|
zfs.conf
|
||||||
|
|
||||||
EXTRA_DIST = \
|
|
||||||
zfs.conf.in
|
|
||||||
|
|
||||||
$(modulesload_DATA):%:%.in
|
|
||||||
-$(SED) \
|
|
||||||
-e '' \
|
|
||||||
$< >'$@'
|
|
||||||
|
|
||||||
CLEANFILES = $(modulesload_DATA)
|
|
||||||
|
|
|
@ -1,14 +1,6 @@
|
||||||
|
include $(top_srcdir)/config/Substfiles.am
|
||||||
|
|
||||||
systemdgenerator_SCRIPTS = \
|
systemdgenerator_SCRIPTS = \
|
||||||
zfs-mount-generator
|
zfs-mount-generator
|
||||||
|
|
||||||
EXTRA_DIST = \
|
SUBSTFILES += $(systemdgenerator_SCRIPTS)
|
||||||
zfs-mount-generator.in
|
|
||||||
|
|
||||||
$(systemdgenerator_SCRIPTS): %: %.in
|
|
||||||
-$(SED) -e 's,@bindir\@,$(bindir),g' \
|
|
||||||
-e 's,@runstatedir\@,$(runstatedir),g' \
|
|
||||||
-e 's,@sbindir\@,$(sbindir),g' \
|
|
||||||
-e 's,@sysconfdir\@,$(sysconfdir),g' \
|
|
||||||
$< >'$@'
|
|
||||||
|
|
||||||
CLEANFILES = $(systemdgenerator_SCRIPTS)
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
include $(top_srcdir)/config/Substfiles.am
|
||||||
|
|
||||||
systemdpreset_DATA = \
|
systemdpreset_DATA = \
|
||||||
50-zfs.preset
|
50-zfs.preset
|
||||||
|
|
||||||
|
@ -12,27 +14,8 @@ systemdunit_DATA = \
|
||||||
zfs-volumes.target \
|
zfs-volumes.target \
|
||||||
zfs.target
|
zfs.target
|
||||||
|
|
||||||
EXTRA_DIST = \
|
SUBSTFILES += $(systemdpreset_DATA) $(systemdunit_DATA)
|
||||||
zfs-zed.service.in \
|
|
||||||
zfs-import-cache.service.in \
|
|
||||||
zfs-import-scan.service.in \
|
|
||||||
zfs-mount.service.in \
|
|
||||||
zfs-share.service.in \
|
|
||||||
zfs-import.target.in \
|
|
||||||
zfs-volume-wait.service.in \
|
|
||||||
zfs-volumes.target.in \
|
|
||||||
zfs.target.in \
|
|
||||||
50-zfs.preset.in
|
|
||||||
|
|
||||||
$(systemdunit_DATA) $(systemdpreset_DATA):%:%.in
|
|
||||||
-$(SED) -e 's,@bindir\@,$(bindir),g' \
|
|
||||||
-e 's,@runstatedir\@,$(runstatedir),g' \
|
|
||||||
-e 's,@sbindir\@,$(sbindir),g' \
|
|
||||||
-e 's,@sysconfdir\@,$(sysconfdir),g' \
|
|
||||||
$< >'$@'
|
|
||||||
|
|
||||||
install-data-hook:
|
install-data-hook:
|
||||||
$(MKDIR_P) "$(DESTDIR)$(systemdunitdir)"
|
$(MKDIR_P) "$(DESTDIR)$(systemdunitdir)"
|
||||||
ln -sf /dev/null "$(DESTDIR)$(systemdunitdir)/zfs-import.service"
|
ln -sf /dev/null "$(DESTDIR)$(systemdunitdir)/zfs-import.service"
|
||||||
|
|
||||||
CLEANFILES = $(systemdunit_DATA) $(systemdpreset_DATA)
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
|
include $(top_srcdir)/config/Substfiles.am
|
||||||
|
|
||||||
pkgsysconfdir = $(sysconfdir)/zfs
|
pkgsysconfdir = $(sysconfdir)/zfs
|
||||||
initconfdir = $(DEFAULT_INITCONF_DIR)
|
|
||||||
|
|
||||||
dist_pkgsysconf_DATA = \
|
dist_pkgsysconf_DATA = \
|
||||||
vdev_id.conf.alias.example \
|
vdev_id.conf.alias.example \
|
||||||
|
@ -7,16 +8,8 @@ dist_pkgsysconf_DATA = \
|
||||||
vdev_id.conf.sas_switch.example \
|
vdev_id.conf.sas_switch.example \
|
||||||
vdev_id.conf.multipath.example \
|
vdev_id.conf.multipath.example \
|
||||||
vdev_id.conf.scsi.example
|
vdev_id.conf.scsi.example
|
||||||
|
|
||||||
pkgsysconf_SCRIPTS = \
|
pkgsysconf_SCRIPTS = \
|
||||||
zfs-functions
|
zfs-functions
|
||||||
|
|
||||||
EXTRA_DIST = zfs-functions.in
|
SUBSTFILES += $(pkgsysconf_SCRIPTS)
|
||||||
|
|
||||||
$(pkgsysconf_SCRIPTS):%:%.in Makefile
|
|
||||||
-$(SED) \
|
|
||||||
-e 's,@sbindir\@,$(sbindir),g' \
|
|
||||||
-e 's,@sysconfdir\@,$(sysconfdir),g' \
|
|
||||||
-e 's,@initconfdir\@,$(initconfdir),g' \
|
|
||||||
$< >'$@'
|
|
||||||
|
|
||||||
CLEANFILES = $(pkgsysconf_SCRIPTS)
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
include $(top_srcdir)/config/Substfiles.am
|
||||||
|
|
||||||
dist_man_MANS = \
|
dist_man_MANS = \
|
||||||
fsck.zfs.8 \
|
fsck.zfs.8 \
|
||||||
mount.zfs.8 \
|
mount.zfs.8 \
|
||||||
|
@ -86,16 +88,4 @@ nodist_man_MANS = \
|
||||||
zed.8 \
|
zed.8 \
|
||||||
zfs-mount-generator.8
|
zfs-mount-generator.8
|
||||||
|
|
||||||
EXTRA_DIST = \
|
SUBSTFILES += $(nodist_man_MANS)
|
||||||
zed.8.in \
|
|
||||||
zfs-mount-generator.8.in
|
|
||||||
|
|
||||||
$(nodist_man_MANS): %: %.in
|
|
||||||
-$(SED) -e 's,@zfsexecdir\@,$(zfsexecdir),g' \
|
|
||||||
-e 's,@systemdgeneratordir\@,$(systemdgeneratordir),g' \
|
|
||||||
-e 's,@runstatedir\@,$(runstatedir),g' \
|
|
||||||
-e 's,@sysconfdir\@,$(sysconfdir),g' \
|
|
||||||
$< >'$@'
|
|
||||||
|
|
||||||
CLEANFILES = \
|
|
||||||
$(nodist_man_MANS)
|
|
||||||
|
|
|
@ -301,10 +301,6 @@ constrain_path() {
|
||||||
elif [ "$UNAME" = "FreeBSD" ] ; then
|
elif [ "$UNAME" = "FreeBSD" ] ; then
|
||||||
ln -fs /usr/local/bin/ksh93 "$STF_PATH/ksh"
|
ln -fs /usr/local/bin/ksh93 "$STF_PATH/ksh"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -L "$STF_PATH/arc_summary3" ]; then
|
|
||||||
ln -fs "$STF_PATH/arc_summary3" "$STF_PATH/arc_summary"
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
test-runner.py
|
||||||
|
zts-report.py
|
|
@ -1,15 +1,8 @@
|
||||||
|
include $(top_srcdir)/config/Substfiles.am
|
||||||
|
|
||||||
pkgdatadir = $(datadir)/@PACKAGE@/test-runner/bin
|
pkgdatadir = $(datadir)/@PACKAGE@/test-runner/bin
|
||||||
dist_pkgdata_SCRIPTS = \
|
pkgdata_SCRIPTS = \
|
||||||
test-runner.py \
|
test-runner.py \
|
||||||
zts-report.py
|
zts-report.py
|
||||||
#
|
|
||||||
# These scripts are compatible with both Python 2.6 and 3.4. As such the
|
SUBSTFILES += $(pkgdata_SCRIPTS)
|
||||||
# python 3 shebang can be replaced at install time when targeting a python
|
|
||||||
# 2 system. This allows us to maintain a single version of the source.
|
|
||||||
#
|
|
||||||
if USING_PYTHON_2
|
|
||||||
install-data-hook:
|
|
||||||
$(SED) ${ac_inplace} -e 's|^#!/usr/bin/env python3|#!/usr/bin/env python2|' \
|
|
||||||
$(DESTDIR)$(pkgdatadir)/test-runner.py \
|
|
||||||
$(DESTDIR)$(pkgdatadir)/zts-report.py
|
|
||||||
endif
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env @PYTHON_SHEBANG@
|
||||||
|
|
||||||
#
|
#
|
||||||
# This file and its contents are supplied under the terms of the
|
# This file and its contents are supplied under the terms of the
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env @PYTHON_SHEBANG@
|
||||||
|
|
||||||
#
|
#
|
||||||
# This file and its contents are supplied under the terms of the
|
# This file and its contents are supplied under the terms of the
|
||||||
|
@ -205,7 +205,6 @@ maybe = {
|
||||||
'cli_root/zpool_import/zpool_import_missing_003_pos': ['SKIP', '6839'],
|
'cli_root/zpool_import/zpool_import_missing_003_pos': ['SKIP', '6839'],
|
||||||
'cli_root/zpool_trim/setup': ['SKIP', trim_reason],
|
'cli_root/zpool_trim/setup': ['SKIP', trim_reason],
|
||||||
'cli_root/zpool_upgrade/zpool_upgrade_004_pos': ['FAIL', '6141'],
|
'cli_root/zpool_upgrade/zpool_upgrade_004_pos': ['FAIL', '6141'],
|
||||||
'cli_user/misc/arc_summary3_001_pos': ['SKIP', python_reason],
|
|
||||||
'delegate/setup': ['SKIP', exec_reason],
|
'delegate/setup': ['SKIP', exec_reason],
|
||||||
'history/history_004_pos': ['FAIL', '7026'],
|
'history/history_004_pos': ['FAIL', '7026'],
|
||||||
'history/history_005_neg': ['FAIL', '6680'],
|
'history/history_005_neg': ['FAIL', '6680'],
|
|
@ -1,3 +1,5 @@
|
||||||
|
include $(top_srcdir)/config/Substfiles.am
|
||||||
|
|
||||||
pkgdatadir = $(datadir)/@PACKAGE@/zfs-tests/include
|
pkgdatadir = $(datadir)/@PACKAGE@/zfs-tests/include
|
||||||
dist_pkgdata_DATA = \
|
dist_pkgdata_DATA = \
|
||||||
blkdev.shlib \
|
blkdev.shlib \
|
||||||
|
@ -8,13 +10,5 @@ dist_pkgdata_DATA = \
|
||||||
tunables.cfg \
|
tunables.cfg \
|
||||||
zpool_script.shlib
|
zpool_script.shlib
|
||||||
|
|
||||||
EXTRA_DIST = default.cfg.in
|
|
||||||
|
|
||||||
nodist_pkgdata_DATA = default.cfg
|
nodist_pkgdata_DATA = default.cfg
|
||||||
|
SUBSTFILES += $(nodist_pkgdata_DATA)
|
||||||
$(nodist_pkgdata_DATA): %: %.in
|
|
||||||
-$(SED) -e 's,@zfsexecdir\@,$(zfsexecdir),g' \
|
|
||||||
-e 's,@sysconfdir\@,$(sysconfdir),g' \
|
|
||||||
$< >'$@'
|
|
||||||
|
|
||||||
CLEANFILES = default.cfg
|
|
||||||
|
|
|
@ -178,7 +178,6 @@ export ZFS_FILES='zdb
|
||||||
ztest
|
ztest
|
||||||
raidz_test
|
raidz_test
|
||||||
arc_summary
|
arc_summary
|
||||||
arc_summary3
|
|
||||||
arcstat
|
arcstat
|
||||||
dbufstat
|
dbufstat
|
||||||
zed
|
zed
|
||||||
|
|
|
@ -1,17 +1,7 @@
|
||||||
|
include $(top_srcdir)/config/Substfiles.am
|
||||||
|
|
||||||
pkgpyzfsdir = $(datadir)/@PACKAGE@/zfs-tests/tests/functional/pyzfs
|
pkgpyzfsdir = $(datadir)/@PACKAGE@/zfs-tests/tests/functional/pyzfs
|
||||||
pkgpyzfs_SCRIPTS = \
|
pkgpyzfs_SCRIPTS = \
|
||||||
pyzfs_unittest.ksh
|
pyzfs_unittest.ksh
|
||||||
|
|
||||||
EXTRA_DIST = \
|
SUBSTFILES += $(pkgpyzfs_SCRIPTS)
|
||||||
pyzfs_unittest.ksh.in
|
|
||||||
|
|
||||||
#
|
|
||||||
# The pyzfs module is built either for Python 2 or Python 3. In order
|
|
||||||
# to properly test it the unit tests must be updated to the matching version.
|
|
||||||
#
|
|
||||||
$(pkgpyzfs_SCRIPTS):%:%.in
|
|
||||||
-$(SED) -e 's,@PYTHON\@,$(PYTHON),g' \
|
|
||||||
$< >'$@'
|
|
||||||
-chmod 775 $@
|
|
||||||
|
|
||||||
CLEANFILES = $(pkgpyzfs_SCRIPTS)
|
|
||||||
|
|
|
@ -1,19 +1,8 @@
|
||||||
|
include $(top_srcdir)/config/Substfiles.am
|
||||||
|
|
||||||
udevrule_DATA = \
|
udevrule_DATA = \
|
||||||
69-vdev.rules \
|
69-vdev.rules \
|
||||||
60-zvol.rules \
|
60-zvol.rules \
|
||||||
90-zfs.rules
|
90-zfs.rules
|
||||||
|
|
||||||
EXTRA_DIST = \
|
SUBSTFILES += $(udevrule_DATA)
|
||||||
69-vdev.rules.in \
|
|
||||||
60-zvol.rules.in \
|
|
||||||
90-zfs.rules.in
|
|
||||||
|
|
||||||
$(udevrule_DATA):%:%.in
|
|
||||||
-$(SED) -e 's,@bindir\@,$(bindir),g' \
|
|
||||||
-e 's,@sbindir\@,$(sbindir),g' \
|
|
||||||
-e 's,@udevdir\@,$(udevdir),g' \
|
|
||||||
-e 's,@udevruledir\@,$(udevruledir),g' \
|
|
||||||
-e 's,@sysconfdir\@,$(sysconfdir),g' \
|
|
||||||
$< > '$@'
|
|
||||||
|
|
||||||
CLEANFILES = $(udevrule_DATA)
|
|
||||||
|
|
Loading…
Reference in New Issue