#1 install bash-completion files in proper place for EL6
Closed 2 years ago by tmz. Opened 2 years ago by tmz.
rpms/ tmz/mock el6  into  el6

file modified
+13 -4

@@ -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 @@ 

  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 @@ 

      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

@@ -226,8 +228,10 @@ 

  :

  

  %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)

@@ -275,6 +279,11 @@ 

  %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

+ - 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)

  

EL6 has bash-completion-1.3 and uses %{_sysconfdir}/bash_completion.d
for completion files.

I noticed that bash completion was not working on an el6 mock host. I think this broke around the time 1.3.x was pushed to el6 but had not looked into it until recently.

I didn't make the path conditional in the spec file as I believe there aren't any plans to to rebase el6 from the master branch any longer, so the el6 path can simply be used directly.

Let me know if you'd prefer a patch via email rather than a PR via pagure (I'm more familiar with email patch submissions than web-based pull requests).

rebased onto 2b7bac5

2 years ago

I pushed a few additional fixes to my el6 branch and submitted these changes to the buildsys list.

Pull-Request has been closed by tmz

2 years ago
Metadata