Skip to content

Commit

Permalink
spec: define _bashcompletiondir if undefined
Browse files Browse the repository at this point in the history
Always define _bashcompletiondir in the spec file to a reasonable value
when it is undefined.  Required for `rpmbuild --rebuild <srpm>`.

Signed-off-by: Brian Behlendorf <[email protected]>
Closes #15396
  • Loading branch information
behlendorf authored Oct 11, 2023
1 parent 1b310df commit fd51286
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions rpm/generic/zfs.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit fd51286

Please sign in to comment.