From fd5128622783735b3f0334c668bca8013cbcd487 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 11 Oct 2023 16:56:32 -0700 Subject: [PATCH] spec: define _bashcompletiondir if undefined Always define _bashcompletiondir in the spec file to a reasonable value when it is undefined. Required for `rpmbuild --rebuild `. Signed-off-by: Brian Behlendorf Closes #15396 --- rpm/generic/zfs.spec.in | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/rpm/generic/zfs.spec.in b/rpm/generic/zfs.spec.in index 711e6c751dc0..2e89abd0edfd 100644 --- a/rpm/generic/zfs.spec.in +++ b/rpm/generic/zfs.spec.in @@ -19,6 +19,15 @@ %endif %endif +# Set the default _bashcompletiondir directory based on distribution. +%if %{undefined _bashcompletiondir} +%if 0%{?rhel}%{?fedora}%{?centos}%{?suse_version}%{?openEuler} +%global _bashcompletiondir /etc/bash_completion.d +%else +%global _bashcompletiondir /usr/share/bash-completion +%endif +%endif + # Set the default dracut directory based on distribution. %if %{undefined _dracutdir} %if 0%{?rhel}%{?fedora}%{?centos}%{?suse_version}%{?openEuler}