diff --git a/fail2ban.spec b/fail2ban.spec index d03608d..15154d5 100644 --- a/fail2ban.spec +++ b/fail2ban.spec @@ -48,6 +48,7 @@ BuildRequires: sqlite BuildRequires: systemd BuildRequires: selinux-policy-devel BuildRequires: make +BuildRequires: bash-completion # Default components Requires: %{name}-firewalld = %{version}-%{release} @@ -294,6 +295,10 @@ rm -r %{buildroot}%{_docdir}/%{name} install -d %{buildroot}%{_datadir}/selinux/packages/%{selinuxtype} install -m 0644 %{modulename}.pp.bz2 %{buildroot}%{_datadir}/selinux/packages/%{selinuxtype} +#BASH completion +COMPLETIONDIR=%{buildroot}$(pkg-config --variable=completionsdir bash-completion) +%__mkdir_p $COMPLETIONDIR +%__install -p -m 644 files/bash-completion $COMPLETIONDIR/fail2ban %check %if 0%{?rhel} && 0%{?rhel} < 8 @@ -348,6 +353,7 @@ fi %exclude %{python3_sitelib}/fail2ban/tests %endif %{_unitdir}/fail2ban.service +%{_datadir}/bash-completion/ %{_mandir}/man1/fail2ban.1* %{_mandir}/man1/fail2ban-client.1* %{_mandir}/man1/fail2ban-python.1*