EL6 has bash-completion-1.3 and uses %{_sysconfdir}/bash_completion.d
for completion files.
Also own the bash-completion directory to ensure it is cleaned up if
mock is uninstalled.
---
mock.spec | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/mock.spec b/mock.spec
index 98a7bca..ac6a29c 100644
--- a/mock.spec
+++ b/mock.spec
@@ -20,7 +20,7 @@
Summary: Builds packages inside chroots
Name: mock
Version: 1.3.5
-Release: 1%{?dist}
+Release: 2%{?dist}
License: GPLv2+
Source:
https://fedorahosted.org/releases/m/o/mock/%{name}-%{version}.tar.gz
URL:
https://github.com/rpm-software-management/mock/
@@ -156,9 +156,9 @@ cp -a etc/mock/* %{buildroot}%{_sysconfdir}/mock/
install -d %{buildroot}%{_sysconfdir}/security/console.apps/
cp -a etc/consolehelper/mock %{buildroot}%{_sysconfdir}/security/console.apps/%{name}
-install -d %{buildroot}%{_datadir}/bash-completion/completions/
-cp -a etc/bash_completion.d/* %{buildroot}%{_datadir}/bash-completion/completions/
-ln -s mock %{buildroot}%{_datadir}/bash-completion/completions/mockchain
+install -d %{buildroot}%{_sysconfdir}/bash_completion.d/
+cp -a etc/bash_completion.d/* %{buildroot}%{_sysconfdir}/bash_completion.d
+ln -s mock %{buildroot}%{_sysconfdir}/bash_completion.d/mockchain
install -d %{buildroot}%{_sysconfdir}/pki/mock
cp -a etc/pki/* %{buildroot}%{_sysconfdir}/pki/mock/
@@ -183,7 +183,9 @@ if [ -d %{buildroot}%{_datadir}/bash-completion ]; then
echo %{_datadir}/bash-completion/completions/mock >> %{name}.cfgs
echo %{_datadir}/bash-completion/completions/mockchain >> %{name}.cfgs
elif [ -d %{buildroot}%{_sysconfdir}/bash_completion.d ]; then
+ echo "%dir %attr(0755, root, root) %{_sysconfdir}/bash_completion.d"
>> %{name}.cfgs
echo %{_sysconfdir}/bash_completion.d/mock >> %{name}.cfgs
+ echo %{_sysconfdir}/bash_completion.d/mockchain >> %{name}.cfgs
fi
%if 0%{?rhel} == 6
@@ -275,6 +277,10 @@ python3-pylint py/mockbuild/ py/*.py py/mockbuild/plugins/* || :
%endif
%changelog
+* Sun Nov 26 2017 Todd Zullinger <tmz(a)pobox.com> - 1.3.5-2
+- install bash-completion file in proper place for el6
+- own bash-completion dir
+
* Thu Mar 02 2017 Miroslav Suchý <msuchy(a)redhat.com> 1.3.5-1
- fix path to "df" [RHBZ#1428301] (msuchy(a)redhat.com)
--
2.15.0