Hi,
I noticed that bash-completion stopped working a few months or so ago on EL-6. Looking closer, it's because the completion files are installed in the wrong place for the older bash-completion on EL-6. I know EL-6 isn't getting feature updates, but if there's a bugfix update for it, this would be nice to include. I filed this in pagure when I first noticed it, as https://src.fedoraproject.org/rpms/mock/pull-request/1. I've pushed a few updates to my pagure branch since then. I can either update that PR to match what's included here or delete it, whichever is preferred.
Todd Zullinger (2): install bash-completion files in proper place for EL6 only call python3-pylint in %check if %use_python3 is set
mock.spec | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-)
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/%%7Bname%7D-%%7Bversion%7D.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@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@redhat.com 1.3.5-1 - fix path to "df" [RHBZ#1428301] (msuchy@redhat.com)
Dne 26.11.2017 v 19:45 Todd Zullinger napsal(a):
EL6 has bash-completion-1.3 and uses %{_sysconfdir}/bash_completion.d for completion files.
I accept this. I just tried: git am but that is failing. So I had to use just the patch, I attributed your authorship in comment.
Committed as:
* a8e5a40 (HEAD -> mock-1.3, origin/mock-1.3) EL6 has bash-completion-1.3 and uses %{_sysconfdir}/bash_completion.d for completion files.
However I am not sure if I ever release it as new version as development for EL6 does not continue.
Mirek
Miroslav Suchý wrote:
Dne 26.11.2017 v 19:45 Todd Zullinger napsal(a):
EL6 has bash-completion-1.3 and uses %{_sysconfdir}/bash_completion.d for completion files.
I accept this. I just tried: git am but that is failing. So I had to use just the patch, I attributed your authorship in comment.
I made the patch against the fedora rpm package. I didn't know that the spec files were maintained entirely upstream. I suppose I knew that at one point in the past and have forgotten. Sorry for the confusion there.
FWIW, the git commit --author option is handy for applying patches with attribution
Committed as:
- a8e5a40 (HEAD -> mock-1.3, origin/mock-1.3) EL6 has bash-completion-1.3 and uses %{_sysconfdir}/bash_completion.d for
completion files.
However I am not sure if I ever release it as new version as development for EL6 does not continue.
Sure. I thought perhaps if there were any other packaging fixes needed that it would be worth having these included.
--- mock.spec | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/mock.spec b/mock.spec index ac6a29c..b2c24b3 100644 --- a/mock.spec +++ b/mock.spec @@ -228,8 +228,10 @@ fi :
%check +%if %{use_python3} # ignore the errors for now, just print them and hopefully somebody will fix it one day python3-pylint py/mockbuild/ py/*.py py/mockbuild/plugins/* || : +%endif
%files -f %{name}.cfgs %defattr(-, root, root) @@ -280,6 +282,7 @@ python3-pylint py/mockbuild/ py/*.py py/mockbuild/plugins/* || : * Sun Nov 26 2017 Todd Zullinger tmz@pobox.com - 1.3.5-2 - install bash-completion file in proper place for el6 - own bash-completion dir +- only call python3-pylint in %%check if %%use_python3 is set
* Thu Mar 02 2017 Miroslav Suchý msuchy@redhat.com 1.3.5-1 - fix path to "df" [RHBZ#1428301] (msuchy@redhat.com)
Dne 26.11.2017 v 19:45 Todd Zullinger napsal(a):
%check +%if %{use_python3} # ignore the errors for now, just print them and hopefully somebody will fix it one day python3-pylint py/mockbuild/ py/*.py py/mockbuild/plugins/* || :
This is not needed, because of that || :
Mirek
Miroslav Suchý wrote:
Dne 26.11.2017 v 19:45 Todd Zullinger napsal(a):
%check +%if %{use_python3} # ignore the errors for now, just print them and hopefully somebody will fix it one day python3-pylint py/mockbuild/ py/*.py py/mockbuild/plugins/* || :
This is not needed, because of that || :
It sends a pointless warning to the output. Rather than have anyone building need to check that the warning is not important, it seems better to not run the command where we know it does not exist.
Really, since the el6 branch isn't being merged down from master anymore, all the conditions that apply only to newer releases could be removed. But that would be far more change to an old branch, so I didn't even consider it seriouly.
buildsys@lists.fedoraproject.org