Accepting request 666802 from home:jfehlig:branches:Virtualization

- Enable bash completion in Leap15/SLE15 and newer

OBS-URL: https://build.opensuse.org/request/show/666802
OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=724
This commit is contained in:
James Fehlig 2019-01-17 19:07:22 +00:00 committed by Git OBS Bridge
parent 56793e96ce
commit b2fe867c6e
2 changed files with 14 additions and 8 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Jan 17 16:50:57 UTC 2019 - James Fehlig <jfehlig@suse.com>
- Enable bash completion in Leap15/SLE15 and newer
-------------------------------------------------------------------
Tue Jan 15 22:25:14 UTC 2019 - James Fehlig <jfehlig@suse.com>

View File

@ -109,10 +109,9 @@
%define with_libssh 1
%endif
# TODO: On what distros can we support bash-completion?
# SLE12 builds seem fine, but configure fails to detect
# completion support on openSUSE distros.
%define with_bash_completion 0%{!?_without_bash_completion:0}
%if 0%{?suse_version} >= 1500
%define with_bash_completion 0%{!?_without_bash_completion:1}
%endif
# rbd enablement is a bit tricky. For x86_64
%ifarch x86_64
@ -231,7 +230,7 @@ BuildRequires: xen-devel
BuildRequires: libacl-devel
%endif
%if %{with_bash_completion}
BuildRequires: bash-completion >= 2.0
BuildRequires: bash-completion-devel >= 2.0
%endif
BuildRequires: fdupes
BuildRequires: libattr-devel
@ -817,6 +816,7 @@ Requires: %{name}-bash-completion = %{version}-%{release}
%description admin
The client side utilities to control the libvirt daemon.
%if %{with_bash_completion}
%package bash-completion
Summary: Bash completion script
Group: System/Shells
@ -824,6 +824,7 @@ BuildArch: noarch
%description bash-completion
Bash completion script stub.
%endif
%package devel
Summary: Libraries, includes, etc. to compile with the libvirt library
@ -1349,9 +1350,6 @@ fi
%if %{with_qemu}
%{_datadir}/systemtap/tapset/libvirt_qemu_probes*.stp
%endif
%if %{with_bash_completion}
%{_datadir}/bash-completion/completions/virsh
%endif
%dir %{_localstatedir}/lib/%{name}/
%dir %attr(0711, root, root) %{_localstatedir}/lib/%{name}/images/
%dir %attr(0711, root, root) %{_localstatedir}/lib/%{name}/filesystems/
@ -1571,6 +1569,9 @@ fi
%{_bindir}/virt-xml-validate
%{_bindir}/virt-pki-validate
%{_bindir}/virt-host-validate
%if %{with_bash_completion}
%{_datadir}/bash-completion/completions/virsh
%endif
%dir %{_libdir}/%{name}
%attr(0755, root, root) %{_libdir}/%{name}/libvirt-guests.sh
%{_fillupdir}/sysconfig.libvirt-guests