autoconf: use include directives instead of recursing down contrib
Also make the pyzfs build actually out-of-tree and quiet by default Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Co-authored-by: Rapptz <rapptz@gmail.com> Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Closes #13316
This commit is contained in:
parent
674a9f3727
commit
50d2c9e4fd
|
@ -18,8 +18,9 @@ endif
|
|||
|
||||
CPPCHECKDIRS += etc/systemd/system-generators
|
||||
if CONFIG_USER
|
||||
SUBDIRS += . tests etc contrib
|
||||
SUBDIRS += . tests etc
|
||||
include $(srcdir)/%D%/cmd/Makefile.am
|
||||
include $(srcdir)/%D%/contrib/Makefile.am
|
||||
include $(srcdir)/%D%/lib/Makefile.am
|
||||
include $(srcdir)/%D%/man/Makefile.am
|
||||
include $(srcdir)/%D%/scripts/Makefile.am
|
||||
|
@ -97,7 +98,7 @@ dist-hook:
|
|||
PHONY += codecheck $(CHECKS)
|
||||
codecheck: $(CHECKS)
|
||||
|
||||
SHELLCHECKDIRS = contrib etc tests
|
||||
SHELLCHECKDIRS = etc tests
|
||||
SHELLCHECKSCRIPTS += autogen.sh
|
||||
|
||||
PHONY += checkstyle
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
subst_sed_cmd = \
|
||||
-e 's|@abs_top_srcdir[@]|$(abs_top_srcdir)|g' \
|
||||
-e 's|@bindir[@]|$(bindir)|g' \
|
||||
-e 's|@sbindir[@]|$(sbindir)|g' \
|
||||
-e 's|@datadir[@]|$(datadir)|g' \
|
||||
|
@ -12,6 +13,7 @@ subst_sed_cmd = \
|
|||
-e 's|@udevdir[@]|$(udevdir)|g' \
|
||||
-e 's|@udevruledir[@]|$(udevruledir)|g' \
|
||||
-e 's|@zfsexecdir[@]|$(zfsexecdir)|g' \
|
||||
-e 's|@VERSION[@]|$(VERSION)|g' \
|
||||
-e 's|@PYTHON[@]|$(PYTHON)|g' \
|
||||
-e 's|@PYTHON_SHEBANG[@]|$(PYTHON_SHEBANG)|g' \
|
||||
-e 's|@DEFAULT_INIT_NFS_SERVER[@]|$(DEFAULT_INIT_NFS_SERVER)|g' \
|
||||
|
|
16
configure.ac
16
configure.ac
|
@ -66,22 +66,6 @@ ZFS_AC_DEBUG_INVARIANTS
|
|||
|
||||
AC_CONFIG_FILES([
|
||||
Makefile
|
||||
contrib/Makefile
|
||||
contrib/bash_completion.d/Makefile
|
||||
contrib/bpftrace/Makefile
|
||||
contrib/dracut/02zfsexpandknowledge/Makefile
|
||||
contrib/dracut/90zfs/Makefile
|
||||
contrib/dracut/Makefile
|
||||
contrib/initramfs/Makefile
|
||||
contrib/initramfs/conf.d/Makefile
|
||||
contrib/initramfs/conf-hooks.d/Makefile
|
||||
contrib/initramfs/hooks/Makefile
|
||||
contrib/initramfs/scripts/Makefile
|
||||
contrib/initramfs/scripts/local-top/Makefile
|
||||
contrib/pam_zfs_key/Makefile
|
||||
contrib/pyzfs/Makefile
|
||||
contrib/pyzfs/setup.py
|
||||
contrib/zcp/Makefile
|
||||
etc/Makefile
|
||||
etc/default/Makefile
|
||||
etc/init.d/Makefile
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
include $(top_srcdir)/config/Shellcheck.am
|
||||
include $(srcdir)/%D%/bash_completion.d/Makefile.am
|
||||
include $(srcdir)/%D%/pyzfs/Makefile.am
|
||||
include $(srcdir)/%D%/zcp/Makefile.am
|
||||
|
||||
SUBDIRS = bash_completion.d pyzfs zcp
|
||||
if BUILD_LINUX
|
||||
SUBDIRS += bpftrace dracut initramfs
|
||||
include $(srcdir)/%D%/bpftrace/Makefile.am
|
||||
include $(srcdir)/%D%/dracut/Makefile.am
|
||||
include $(srcdir)/%D%/initramfs/Makefile.am
|
||||
endif
|
||||
if PAM_ZFS_ENABLED
|
||||
SUBDIRS += pam_zfs_key
|
||||
endif
|
||||
DIST_SUBDIRS = bash_completion.d bpftrace dracut initramfs pam_zfs_key pyzfs zcp
|
||||
|
||||
SHELLCHECKDIRS = bash_completion.d bpftrace dracut initramfs
|
||||
if PAM_ZFS_ENABLED
|
||||
include $(srcdir)/%D%/pam_zfs_key/Makefile.am
|
||||
endif
|
||||
|
|
|
@ -1,14 +1,6 @@
|
|||
CLEANFILES =
|
||||
EXTRA_DIST =
|
||||
include $(top_srcdir)/config/Substfiles.am
|
||||
include $(top_srcdir)/config/Shellcheck.am
|
||||
|
||||
bashcompletiondir = $(sysconfdir)/bash_completion.d
|
||||
|
||||
noinst_DATA = zfs
|
||||
|
||||
EXTRA_DIST += $(noinst_DATA)
|
||||
SUBSTFILES += $(noinst_DATA)
|
||||
noinst_DATA = %D%/zfs
|
||||
EXTRA_DIST += $(noinst_DATA)
|
||||
SUBSTFILES += $(noinst_DATA)
|
||||
|
||||
SHELLCHECKSCRIPTS += $(noinst_DATA)
|
||||
SHELLCHECK_SHELL = bash
|
||||
$(call SHELLCHECK_OPTS,$(noinst_DATA)): SHELLCHECK_SHELL = bash
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
include $(top_srcdir)/config/Shellcheck.am
|
||||
|
||||
EXTRA_DIST = \
|
||||
EXTRA_DIST += $(addprefix %D%/, \
|
||||
taskqlatency.bt \
|
||||
zfs-trace.sh
|
||||
zfs-trace.sh)
|
||||
|
||||
SHELLCHECKSCRIPTS += zfs-trace.sh
|
||||
SHELLCHECKSCRIPTS += %D%/zfs-trace.sh
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
module-setup.sh
|
|
@ -1,11 +0,0 @@
|
|||
CLEANFILES =
|
||||
EXTRA_DIST =
|
||||
include $(top_srcdir)/config/Substfiles.am
|
||||
include $(top_srcdir)/config/Shellcheck.am
|
||||
|
||||
pkgdracutdir = $(dracutdir)/modules.d/02zfsexpandknowledge
|
||||
pkgdracut_SCRIPTS = \
|
||||
module-setup.sh
|
||||
|
||||
SUBSTFILES += $(pkgdracut_SCRIPTS)
|
||||
SHELLCHECKSCRIPTS += $(pkgdracut_SCRIPTS)
|
|
@ -1,27 +0,0 @@
|
|||
CLEANFILES =
|
||||
EXTRA_DIST =
|
||||
include $(top_srcdir)/config/Substfiles.am
|
||||
include $(top_srcdir)/config/Shellcheck.am
|
||||
|
||||
pkgdracutdir = $(dracutdir)/modules.d/90zfs
|
||||
pkgdracut_SCRIPTS = \
|
||||
export-zfs.sh \
|
||||
module-setup.sh \
|
||||
mount-zfs.sh \
|
||||
parse-zfs.sh \
|
||||
zfs-generator.sh \
|
||||
zfs-load-key.sh \
|
||||
zfs-needshutdown.sh \
|
||||
zfs-lib.sh \
|
||||
import-opts-generator.sh
|
||||
|
||||
pkgdracut_DATA = \
|
||||
zfs-env-bootfs.service \
|
||||
zfs-snapshot-bootfs.service \
|
||||
zfs-rollback-bootfs.service
|
||||
|
||||
SUBSTFILES += $(pkgdracut_SCRIPTS) $(pkgdracut_DATA)
|
||||
|
||||
# Provided by /bin/sleep, and, again, every implementation of that supports this
|
||||
CHECKBASHISMS_IGNORE = -e 'sleep only takes one integer' -e 'sleep 0.'
|
||||
SHELLCHECKSCRIPTS += $(pkgdracut_SCRIPTS)
|
|
@ -1,6 +1,27 @@
|
|||
include $(top_srcdir)/config/Shellcheck.am
|
||||
pkgdracut_02dir = $(dracutdir)/modules.d/02zfsexpandknowledge
|
||||
pkgdracut_02_SCRIPTS = \
|
||||
%D%/02zfsexpandknowledge/module-setup.sh
|
||||
|
||||
SUBDIRS = 02zfsexpandknowledge 90zfs
|
||||
SHELLCHECKDIRS = $(SUBDIRS)
|
||||
pkgdracut_90dir = $(dracutdir)/modules.d/90zfs
|
||||
pkgdracut_90_SCRIPTS = \
|
||||
%D%/90zfs/export-zfs.sh \
|
||||
%D%/90zfs/import-opts-generator.sh \
|
||||
%D%/90zfs/module-setup.sh \
|
||||
%D%/90zfs/mount-zfs.sh \
|
||||
%D%/90zfs/parse-zfs.sh \
|
||||
%D%/90zfs/zfs-generator.sh \
|
||||
%D%/90zfs/zfs-lib.sh \
|
||||
%D%/90zfs/zfs-load-key.sh \
|
||||
%D%/90zfs/zfs-needshutdown.sh
|
||||
|
||||
EXTRA_DIST = README.md
|
||||
pkgdracut_90_DATA = \
|
||||
%D%/90zfs/zfs-env-bootfs.service \
|
||||
%D%/90zfs/zfs-rollback-bootfs.service \
|
||||
%D%/90zfs/zfs-snapshot-bootfs.service
|
||||
|
||||
SUBSTFILES += $(pkgdracut_02_SCRIPTS) $(pkgdracut_90_SCRIPTS) $(pkgdracut_90_DATA)
|
||||
SHELLCHECKSCRIPTS += $(pkgdracut_02_SCRIPTS) $(pkgdracut_90_SCRIPTS)
|
||||
# Provided by /bin/sleep, and, again, every implementation of that supports this
|
||||
$(call SHELLCHECK_OPTS,$(pkgdracut_90_SCRIPTS)): CHECKBASHISMS_IGNORE = -e 'sleep only takes one integer' -e 'sleep 0.'
|
||||
|
||||
EXTRA_DIST += $(addprefix %D%/,README.md)
|
||||
|
|
|
@ -1,11 +1,39 @@
|
|||
include $(top_srcdir)/config/Shellcheck.am
|
||||
i_tdir = /usr/share/initramfs-tools
|
||||
dist_i_t_SCRIPTS = \
|
||||
%D%/zfsunlock
|
||||
|
||||
initrddir = /usr/share/initramfs-tools
|
||||
|
||||
dist_initrd_SCRIPTS = \
|
||||
zfsunlock
|
||||
i_t_confhooks_ddir = $(i_tdir)/conf-hooks.d
|
||||
dist_i_t_confhooks_d_DATA = \
|
||||
%D%/conf-hooks.d/zfs
|
||||
|
||||
SUBDIRS = conf.d conf-hooks.d hooks scripts
|
||||
SHELLCHECKDIRS = hooks scripts
|
||||
|
||||
EXTRA_DIST = README.md
|
||||
i_t_conf_ddir = $(i_tdir)/conf.d
|
||||
dist_i_t_conf_d_DATA = \
|
||||
%D%/conf.d/zfs
|
||||
|
||||
|
||||
i_t_hooksdir = $(i_tdir)/hooks
|
||||
i_t_hooks_SCRIPTS = \
|
||||
%D%/hooks/zfs \
|
||||
%D%/hooks/zfsunlock
|
||||
|
||||
SUBSTFILES += $(i_t_hooks_SCRIPTS)
|
||||
|
||||
|
||||
i_t_scriptsdir = $(i_tdir)/scripts
|
||||
dist_i_t_scripts_SCRIPTS = \
|
||||
%D%/scripts/zfs
|
||||
|
||||
|
||||
i_t_scripts_localtopdir = $(i_t_scriptsdir)/local-top
|
||||
dist_i_t_scripts_localtop_SCRIPTS = \
|
||||
%D%/scripts/local-top/zfs
|
||||
|
||||
|
||||
i_t_check_scripts = $(dist_i_t_SCRIPTS) $(i_t_hooks_SCRIPTS) $(dist_i_t_scripts_SCRIPTS) $(dist_i_t_scripts_localtop_SCRIPTS)
|
||||
SHELLCHECKSCRIPTS += $(i_t_check_scripts)
|
||||
$(call SHELLCHECK_OPTS,$(i_t_check_scripts)): SHELLCHECK_SHELL = sh
|
||||
|
||||
|
||||
EXTRA_DIST += $(addprefix %D%/,README.md)
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
confhooksddir = /usr/share/initramfs-tools/conf-hooks.d
|
||||
|
||||
dist_confhooksd_DATA = \
|
||||
zfs
|
|
@ -1,4 +0,0 @@
|
|||
confddir = /usr/share/initramfs-tools/conf.d
|
||||
|
||||
dist_confd_DATA = \
|
||||
zfs
|
|
@ -1,13 +0,0 @@
|
|||
CLEANFILES =
|
||||
EXTRA_DIST =
|
||||
include $(top_srcdir)/config/Substfiles.am
|
||||
include $(top_srcdir)/config/Shellcheck.am
|
||||
|
||||
hooksdir = /usr/share/initramfs-tools/hooks
|
||||
|
||||
hooks_SCRIPTS = \
|
||||
zfs \
|
||||
zfsunlock
|
||||
|
||||
SUBSTFILES += $(hooks_SCRIPTS)
|
||||
SHELLCHECKSCRIPTS += $(hooks_SCRIPTS)
|
|
@ -1,12 +0,0 @@
|
|||
include $(top_srcdir)/config/Shellcheck.am
|
||||
|
||||
scriptsdir = /usr/share/initramfs-tools/scripts
|
||||
|
||||
dist_scripts_SCRIPTS = \
|
||||
zfs
|
||||
|
||||
SUBDIRS = local-top
|
||||
|
||||
SHELLCHECKDIRS = $(SUBDIRS)
|
||||
SHELLCHECK_SHELL = sh
|
||||
SHELLCHECKSCRIPTS += $(dist_scripts_SCRIPTS)
|
|
@ -1,8 +0,0 @@
|
|||
include $(top_srcdir)/config/Shellcheck.am
|
||||
|
||||
localtopdir = /usr/share/initramfs-tools/scripts/local-top
|
||||
|
||||
dist_localtop_SCRIPTS = \
|
||||
zfs
|
||||
|
||||
SHELLCHECKSCRIPTS += $(dist_scripts_SCRIPTS)
|
|
@ -1,19 +1,18 @@
|
|||
include $(top_srcdir)/config/Rules.am
|
||||
%C%_pam_zfs_key_la_CFLAGS = $(AM_CFLAGS)
|
||||
%C%_pam_zfs_key_la_CFLAGS += $(LIBCRYPTO_CFLAGS)
|
||||
|
||||
AM_CFLAGS += $(LIBCRYPTO_CFLAGS)
|
||||
pammodule_LTLIBRARIES = %D%/pam_zfs_key.la
|
||||
|
||||
pammodule_LTLIBRARIES = pam_zfs_key.la
|
||||
%C%_pam_zfs_key_la_SOURCES = %D%/pam_zfs_key.c
|
||||
|
||||
pam_zfs_key_la_SOURCES = pam_zfs_key.c
|
||||
%C%_pam_zfs_key_la_LIBADD = \
|
||||
libnvpair.la \
|
||||
libuutil.la \
|
||||
libzfs.la \
|
||||
libzfs_core.la
|
||||
|
||||
pam_zfs_key_la_LIBADD = \
|
||||
$(abs_top_builddir)/libnvpair.la \
|
||||
$(abs_top_builddir)/libuutil.la \
|
||||
$(abs_top_builddir)/libzfs.la \
|
||||
$(abs_top_builddir)/libzfs_core.la
|
||||
%C%_pam_zfs_key_la_LIBADD += -lpam $(LIBCRYPTO_LIBS)
|
||||
|
||||
pam_zfs_key_la_LDFLAGS = -version-info 1:0:0 -avoid-version -module -shared
|
||||
%C%_pam_zfs_key_la_LDFLAGS = -version-info 1:0:0 -avoid-version -module -shared
|
||||
|
||||
pam_zfs_key_la_LIBADD += -lpam $(LIBCRYPTO_LIBS)
|
||||
|
||||
dist_pamconfigs_DATA = zfs_key
|
||||
dist_pamconfigs_DATA = %D%/zfs_key
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
EXTRA_DIST = libzfs_core setup.py.in README LICENSE docs
|
||||
EXTRA_DIST += $(addprefix %D%/,libzfs_core README LICENSE docs)
|
||||
SUBSTFILES += %D%/setup.py
|
||||
|
||||
if PYZFS_ENABLED
|
||||
all:
|
||||
|
||||
all-local:
|
||||
$(PYTHON) setup.py build
|
||||
ALL_LOCAL += pyzfs-all-local
|
||||
pyzfs_V_1 = -v
|
||||
pyzfs-all-local: %D%/setup.py
|
||||
cd %D% && $(PYTHON) setup.py -q $(pyzfs_V_$(V)) egg_info -e . build
|
||||
|
||||
#
|
||||
# On Debian (Ubuntu, and other downstream distros) the install location of
|
||||
|
@ -24,17 +25,13 @@ all-local:
|
|||
# files are later created by manually loading the Python modules.
|
||||
#
|
||||
install-exec-local:
|
||||
$(PYTHON) $(builddir)/setup.py install \
|
||||
--prefix $(prefix) \
|
||||
--root $(DESTDIR)/ \
|
||||
--install-lib $(pythonsitedir) \
|
||||
--single-version-externally-managed \
|
||||
--verbose
|
||||
|
||||
clean: clean-local
|
||||
rm -rf build/ pyzfs.egg-info/
|
||||
cd %D% && $(PYTHON) setup.py egg_info -e . install \
|
||||
--prefix $(prefix) \
|
||||
--root $(DESTDIR)/ \
|
||||
--install-lib $(pythonsitedir) \
|
||||
--single-version-externally-managed \
|
||||
--verbose
|
||||
|
||||
clean-local:
|
||||
|
||||
check-local: all
|
||||
-$(RM) -r %D%/build/ %D%/pyzfs.egg-info/
|
||||
endif
|
||||
|
|
|
@ -13,9 +13,10 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
from __future__ import absolute_import, division, print_function
|
||||
|
||||
from setuptools import setup, find_packages
|
||||
import os.path
|
||||
|
||||
srcdir = "@abs_top_srcdir@/contrib/pyzfs"
|
||||
|
||||
setup(
|
||||
name="pyzfs",
|
||||
|
@ -44,7 +45,8 @@ setup(
|
|||
"libzfs_core",
|
||||
],
|
||||
|
||||
packages=find_packages(),
|
||||
packages=find_packages(where=srcdir),
|
||||
package_dir={"": os.path.relpath(srcdir)},
|
||||
include_package_data=True,
|
||||
install_requires=[
|
||||
"cffi",
|
||||
|
|
|
@ -1 +1 @@
|
|||
EXTRA_DIST = autosnap.lua
|
||||
EXTRA_DIST += $(addprefix %D%/,autosnap.lua)
|
||||
|
|
Loading…
Reference in New Issue