Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace EXTRA_DIST with dist_noinst_DATA
Browse files Browse the repository at this point in the history
The EXTRA_DIST variable is ignored when used in the FALSE conditional
of a Makefile.am.  This results in the `make dist` target omitting
these files from the generated tarball unless CONFIG_USER is defined.
This issue can be avoided by switching to use the dist_noinst_DATA
variable which is handled as expected by autoconf.

This change also adds support for --with-config=dist as an alias
for --with-config=srpm and updates the GitHub workflows to use it.

Reviewed-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes openzfs#13459
Closes openzfs#13505
behlendorf authored and andrewc12 committed Sep 23, 2022
1 parent 38bd644 commit 4ce1daa
Showing 27 changed files with 56 additions and 57 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/zfs-tests-functional.yml
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@ jobs:
./autogen.sh
- name: Configure
run: |
./configure --enable-debug --enable-debuginfo --enable-asan --enable-ubsan
./configure --enable-debug --enable-debuginfo --enable-asan --enable-ubsan --with-config=dist
- name: Make
run: |
make -j$(nproc) --no-print-directory --silent pkg-utils pkg-kmod
2 changes: 1 addition & 1 deletion .github/workflows/zfs-tests-sanity.yml
Original file line number Diff line number Diff line change
@@ -24,7 +24,7 @@ jobs:
./autogen.sh
- name: Configure
run: |
./configure --enable-debug --enable-debuginfo --enable-asan --enable-ubsan
./configure --enable-debug --enable-debuginfo --enable-asan --enable-ubsan --with-config=dist
- name: Make
run: |
make -j$(nproc) --no-print-directory --silent pkg-utils pkg-kmod
2 changes: 1 addition & 1 deletion .github/workflows/zloop.yml
Original file line number Diff line number Diff line change
@@ -23,7 +23,7 @@ jobs:
./autogen.sh
- name: Configure
run: |
./configure --enable-debug --enable-debuginfo --enable-asan --enable-ubsan
./configure --enable-debug --enable-debuginfo --enable-asan --enable-ubsan --with-config=dist
- name: Make
run: |
make -j$(nproc) --no-print-directory --silent pkg-utils pkg-kmod
38 changes: 19 additions & 19 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CLEANFILES =
EXTRA_DIST =
dist_noinst_DATA =
INSTALL_DATA_HOOKS =
ALL_LOCAL =
CLEAN_LOCAL =
@@ -37,26 +37,26 @@ extradir = $(prefix)/src/zfs-$(VERSION)
extra_HEADERS = zfs.release.in zfs_config.h.in
endif

EXTRA_DIST += autogen.sh copy-builtin
EXTRA_DIST += AUTHORS CODE_OF_CONDUCT.md COPYRIGHT LICENSE META NEWS NOTICE
EXTRA_DIST += README.md RELEASES.md
EXTRA_DIST += module/lua/README.zfs module/os/linux/spl/README.md
dist_noinst_DATA += autogen.sh copy-builtin
dist_noinst_DATA += AUTHORS CODE_OF_CONDUCT.md COPYRIGHT LICENSE META NEWS NOTICE
dist_noinst_DATA += README.md RELEASES.md
dist_noinst_DATA += module/lua/README.zfs module/os/linux/spl/README.md

# Include all the extra licensing information for modules
EXTRA_DIST += module/icp/algs/skein/THIRDPARTYLICENSE
EXTRA_DIST += module/icp/algs/skein/THIRDPARTYLICENSE.descrip
EXTRA_DIST += module/icp/asm-x86_64/aes/THIRDPARTYLICENSE.gladman
EXTRA_DIST += module/icp/asm-x86_64/aes/THIRDPARTYLICENSE.gladman.descrip
EXTRA_DIST += module/icp/asm-x86_64/aes/THIRDPARTYLICENSE.openssl
EXTRA_DIST += module/icp/asm-x86_64/aes/THIRDPARTYLICENSE.openssl.descrip
EXTRA_DIST += module/icp/asm-x86_64/modes/THIRDPARTYLICENSE.cryptogams
EXTRA_DIST += module/icp/asm-x86_64/modes/THIRDPARTYLICENSE.cryptogams.descrip
EXTRA_DIST += module/icp/asm-x86_64/modes/THIRDPARTYLICENSE.openssl
EXTRA_DIST += module/icp/asm-x86_64/modes/THIRDPARTYLICENSE.openssl.descrip
EXTRA_DIST += module/os/linux/spl/THIRDPARTYLICENSE.gplv2
EXTRA_DIST += module/os/linux/spl/THIRDPARTYLICENSE.gplv2.descrip
EXTRA_DIST += module/zfs/THIRDPARTYLICENSE.cityhash
EXTRA_DIST += module/zfs/THIRDPARTYLICENSE.cityhash.descrip
dist_noinst_DATA += module/icp/algs/skein/THIRDPARTYLICENSE
dist_noinst_DATA += module/icp/algs/skein/THIRDPARTYLICENSE.descrip
dist_noinst_DATA += module/icp/asm-x86_64/aes/THIRDPARTYLICENSE.gladman
dist_noinst_DATA += module/icp/asm-x86_64/aes/THIRDPARTYLICENSE.gladman.descrip
dist_noinst_DATA += module/icp/asm-x86_64/aes/THIRDPARTYLICENSE.openssl
dist_noinst_DATA += module/icp/asm-x86_64/aes/THIRDPARTYLICENSE.openssl.descrip
dist_noinst_DATA += module/icp/asm-x86_64/modes/THIRDPARTYLICENSE.cryptogams
dist_noinst_DATA += module/icp/asm-x86_64/modes/THIRDPARTYLICENSE.cryptogams.descrip
dist_noinst_DATA += module/icp/asm-x86_64/modes/THIRDPARTYLICENSE.openssl
dist_noinst_DATA += module/icp/asm-x86_64/modes/THIRDPARTYLICENSE.openssl.descrip
dist_noinst_DATA += module/os/linux/spl/THIRDPARTYLICENSE.gplv2
dist_noinst_DATA += module/os/linux/spl/THIRDPARTYLICENSE.gplv2.descrip
dist_noinst_DATA += module/zfs/THIRDPARTYLICENSE.cityhash
dist_noinst_DATA += module/zfs/THIRDPARTYLICENSE.cityhash.descrip

@CODE_COVERAGE_RULES@

8 changes: 4 additions & 4 deletions cmd/Makefile.am
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ mounthelper_PROGRAMS =
sbin_SCRIPTS += fsck.zfs
SHELLCHECKSCRIPTS += fsck.zfs
CLEANFILES += fsck.zfs
EXTRA_DIST += %D%/fsck.zfs.in
dist_noinst_DATA += %D%/fsck.zfs.in
$(call SUBST,fsck.zfs,%D%/)


@@ -100,9 +100,9 @@ endif


if USING_PYTHON
bin_SCRIPTS += arc_summary arcstat dbufstat
CLEANFILES += arc_summary arcstat dbufstat
EXTRA_DIST += %D%/arc_summary %D%/arcstat.in %D%/dbufstat.in
bin_SCRIPTS += arc_summary arcstat dbufstat
CLEANFILES += arc_summary arcstat dbufstat
dist_noinst_DATA += %D%/arc_summary %D%/arcstat.in %D%/dbufstat.in

$(call SUBST,arcstat,%D%/)
$(call SUBST,dbufstat,%D%/)
2 changes: 1 addition & 1 deletion cmd/zed/Makefile.am
Original file line number Diff line number Diff line change
@@ -43,4 +43,4 @@ zed_LDADD = \
zed_LDADD += -lrt $(LIBATOMIC_LIBS) $(LIBUDEV_LIBS) $(LIBUUID_LIBS)
zed_LDFLAGS = -pthread

EXTRA_DIST += $(addprefix %D%/,agents/README.md)
dist_noinst_DATA += %D%/agents/README.md
2 changes: 1 addition & 1 deletion cmd/zed/zed.d/Makefile.am
Original file line number Diff line number Diff line change
@@ -38,7 +38,7 @@ zedconfdefaults = \
vdev_attach-led.sh \
vdev_clear-led.sh

EXTRA_DIST += $(addprefix %D%/,README)
dist_noinst_DATA += %D%/README

INSTALL_DATA_HOOKS += zed-install-data-hook
zed-install-data-hook:
2 changes: 1 addition & 1 deletion cmd/zpool/Makefile.am
Original file line number Diff line number Diff line change
@@ -38,7 +38,7 @@ zpool_LDADD += -lgeom
endif
zpool_LDADD += -lm $(LIBBLKID_LIBS) $(LIBUUID_LIBS)

EXTRA_DIST += $(addprefix %D%/,zpool.d/README compatibility.d)
dist_noinst_DATA += %D%/zpool.d/README

SHELLCHECKSCRIPTS += $(dist_zpoolexec_SCRIPTS)
zpoolexecdir = $(zfsexecdir)/zpool.d
2 changes: 1 addition & 1 deletion config/Substfiles.am
Original file line number Diff line number Diff line change
@@ -41,6 +41,6 @@ endef

SUBSTFILES =
CLEANFILES += $(SUBSTFILES)
EXTRA_DIST += $(SUBSTFILES:=.in)
dist_noinst_DATA += $(SUBSTFILES:=.in)

$(call SUBST,%,)
1 change: 1 addition & 0 deletions config/zfs-build.m4
Original file line number Diff line number Diff line change
@@ -268,6 +268,7 @@ AC_DEFUN([ZFS_AC_CONFIG], [
user) ZFS_AC_CONFIG_USER ;;
all) ZFS_AC_CONFIG_USER
ZFS_AC_CONFIG_KERNEL ;;
dist) ;;
srpm) ;;
*)
AC_MSG_RESULT([Error!])
4 changes: 1 addition & 3 deletions contrib/bpftrace/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
EXTRA_DIST += $(addprefix %D%/, \
taskqlatency.bt \
zfs-trace.sh)
dist_noinst_DATA += %D%/taskqlatency.bt %D%/zfs-trace.sh

SHELLCHECKSCRIPTS += %D%/zfs-trace.sh
2 changes: 1 addition & 1 deletion contrib/dracut/Makefile.am
Original file line number Diff line number Diff line change
@@ -24,4 +24,4 @@ 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)
dist_noinst_DATA += %D%/README.md
2 changes: 1 addition & 1 deletion contrib/initramfs/Makefile.am
Original file line number Diff line number Diff line change
@@ -36,4 +36,4 @@ SHELLCHECKSCRIPTS += $(i_t_check_scripts)
$(call SHELLCHECK_OPTS,$(i_t_check_scripts)): SHELLCHECK_SHELL = sh


EXTRA_DIST += $(addprefix %D%/,README.md)
dist_noinst_DATA += %D%/README.md
2 changes: 1 addition & 1 deletion contrib/pyzfs/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
EXTRA_DIST += $(addprefix %D%/,libzfs_core README LICENSE docs)
dist_noinst_DATA += %D%/libzfs_core %D%/README %D%/LICENSE %D%/docs
SUBSTFILES += %D%/setup.py

if PYZFS_ENABLED
2 changes: 1 addition & 1 deletion contrib/zcp/Makefile.am
Original file line number Diff line number Diff line change
@@ -1 +1 @@
EXTRA_DIST += $(addprefix %D%/,autosnap.lua)
dist_noinst_DATA += %D%/autosnap.lua
4 changes: 2 additions & 2 deletions etc/Makefile.am
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@ sudoersddir = $(sysconfdir)/sudoers.d
sudoersd_DATA = \
%D%/sudoers.d/zfs

EXTRA_DIST += $(sudoersd_DATA)
dist_noinst_DATA += $(sudoersd_DATA)


sysconf_zfsdir = $(sysconfdir)/zfs
@@ -32,7 +32,7 @@ $(call SHELLCHECK_OPTS,$(initconf_DATA)): SHELLCHECK_SHELL = sh


if INIT_SYSV
EXTRA_DIST += $(addprefix %D%/,init.d/README.md)
dist_noinst_DATA += %D%/init.d/README.md

init_SCRIPTS = \
%D%/init.d/zfs-import \
2 changes: 1 addition & 1 deletion lib/libnvpair/Makefile.am
Original file line number Diff line number Diff line change
@@ -32,4 +32,4 @@ endif

libnvpair_la_LDFLAGS += -version-info 3:0:0

EXTRA_DIST += $(addprefix %D%/,libnvpair.abi libnvpair.suppr)
dist_noinst_DATA += %D%/libnvpair.abi %D%/libnvpair.suppr
2 changes: 1 addition & 1 deletion lib/libuutil/Makefile.am
Original file line number Diff line number Diff line change
@@ -26,4 +26,4 @@ endif

libuutil_la_LDFLAGS += -version-info 3:0:0

EXTRA_DIST += $(addprefix %D%/,libuutil.abi libuutil.suppr)
dist_noinst_DATA += %D%/libuutil.abi %D%/libuutil.suppr
4 changes: 2 additions & 2 deletions lib/libzfs/Makefile.am
Original file line number Diff line number Diff line change
@@ -76,5 +76,5 @@ libzfs_la_LDFLAGS += -version-info 5:0:1

pkgconfig_DATA += %D%/libzfs.pc

EXTRA_DIST += $(addprefix %D%/,libzfs.abi libzfs.suppr)
EXTRA_DIST += $(addprefix %D%/,THIRDPARTYLICENSE.openssl THIRDPARTYLICENSE.openssl.descrip)
dist_noinst_DATA += %D%/libzfs.abi %D%/libzfs.suppr
dist_noinst_DATA += %D%/THIRDPARTYLICENSE.openssl %D%/THIRDPARTYLICENSE.openssl.descrip
2 changes: 1 addition & 1 deletion lib/libzfs_core/Makefile.am
Original file line number Diff line number Diff line change
@@ -43,4 +43,4 @@ libzfs_core_la_LDFLAGS += -version-info 3:0:0

pkgconfig_DATA += %D%/libzfs_core.pc

EXTRA_DIST += $(addprefix %D%/,libzfs_core.abi libzfs_core.suppr)
dist_noinst_DATA += %D%/libzfs_core.abi %D%/libzfs_core.suppr
2 changes: 1 addition & 1 deletion lib/libzfsbootenv/Makefile.am
Original file line number Diff line number Diff line change
@@ -26,4 +26,4 @@ libzfsbootenv_la_LDFLAGS += -version-info 1:0:0

pkgconfig_DATA += %D%/libzfsbootenv.pc

EXTRA_DIST += $(addprefix %D%/,libzfsbootenv.abi libzfsbootenv.suppr)
dist_noinst_DATA += %D%/libzfsbootenv.abi %D%/libzfsbootenv.suppr
5 changes: 3 additions & 2 deletions man/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
EXTRA_DIST += \
dist_noinst_man_MANS = \
%D%/man1/cstyle.1

dist_man_MANS = \
@@ -105,8 +105,9 @@ nodist_man_MANS = \
%D%/man8/zed.8 \
%D%/man8/zfs-mount-generator.8

SUBSTFILES += $(nodist_man_MANS)
dist_noinst_DATA += $(dist_noinst_man_MANS) $(dist_man_MANS)

SUBSTFILES += $(nodist_man_MANS)

CHECKS += mancheck
mancheck:
2 changes: 1 addition & 1 deletion rpm/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
EXTRA_DIST += \
dist_noinst_DATA += \
%D%/generic/zfs-dkms.spec.in \
%D%/generic/zfs-kmod.spec.in \
%D%/generic/zfs.spec.in \
9 changes: 4 additions & 5 deletions scripts/Makefile.am
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ dist_scripts_SCRIPTS = \
%D%/zimport.sh \
%D%/zloop.sh

EXTRA_SCRIPTS = \
dist_noinst_SCRIPTS = \
%D%/commitcheck.sh \
%D%/common.sh.in \
%D%/dkms.mkconf \
@@ -18,14 +18,13 @@ EXTRA_SCRIPTS = \
%D%/paxcheck.sh \
%D%/zfs-tests-color.sh

EXTRA_DIST += \
dist_noinst_DATA += \
%D%/cstyle.pl \
%D%/enum-extract.pl \
%D%/zfs2zol-patch.sed \
%D%/zol2zfs-patch.sed \
$(EXTRA_SCRIPTS)
%D%/zol2zfs-patch.sed

SHELLCHECKSCRIPTS += $(dist_scripts_SCRIPTS) $(EXTRA_SCRIPTS)
SHELLCHECKSCRIPTS += $(dist_scripts_SCRIPTS) $(dist_noinst_SCRIPTS)

define SCRIPTS_EXTRA_ENVIRONMENT

2 changes: 1 addition & 1 deletion tests/Makefile.am
Original file line number Diff line number Diff line change
@@ -25,6 +25,6 @@ dist_scripts_runfiles_DATA = \
%D%/runfiles/sunos.run


EXTRA_DIST += $(addprefix %D%/,README.md)
dist_noinst_DATA += %D%/README.md

SHELLCHECKSCRIPTS += $(shell find $(srcdir)/%D% -name '*.sh')
4 changes: 2 additions & 2 deletions tests/zfs-tests/cmd/Makefile.am
Original file line number Diff line number Diff line change
@@ -41,7 +41,7 @@ scripts_zfs_tests_bin_PROGRAMS += %D%/draid
libnvpair.la
%C%_draid_LDADD += $(ZLIB_LIBS)

EXTRA_DIST += $(addprefix %D%/,file/file_common.h)
dist_noinst_DATA += %D%/file/file_common.h
scripts_zfs_tests_bin_PROGRAMS += %D%/file_append %D%/file_check %D%/file_trunc %D%/file_write %D%/largest_file %D%/randwritecomp
%C%_file_append_SOURCES = %D%/file/file_append.c
%C%_file_check_SOURCES = %D%/file/file_check.c
@@ -116,7 +116,7 @@ scripts_zfs_tests_bin_PROGRAMS += %D%/xattrtest
scripts_zfs_tests_bin_PROGRAMS += %D%/zed_fd_spill-zedlet


EXTRA_DIST += $(addprefix %D%/,linux_dos_attributes/dos_attributes.h)
dist_noinst_DATA += %D%/linux_dos_attributes/dos_attributes.h
scripts_zfs_tests_bin_PROGRAMS += %D%/read_dos_attributes %D%/write_dos_attributes
%C%_read_dos_attributes_SOURCES = %D%/linux_dos_attributes/read_dos_attributes.c
%C%_write_dos_attributes_SOURCES = %D%/linux_dos_attributes/write_dos_attributes.c
2 changes: 1 addition & 1 deletion tests/zfs-tests/tests/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CLEANFILES =
EXTRA_DIST =
dist_noinst_DATA =
include $(top_srcdir)/config/Substfiles.am


0 comments on commit 4ce1daa

Please sign in to comment.