Gentoo Archives: gentoo-commits

From: Matthias Maier <tamiko@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/libvirt/files/, app-emulation/libvirt/
Date: Tue, 30 Jan 2018 17:55:08
Message-Id: 1517334896.0a987006baf8f3267fb9df03e16baab99bf1f98b.tamiko@gentoo
1 commit: 0a987006baf8f3267fb9df03e16baab99bf1f98b
2 Author: Matthias Maier <tamiko <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jan 30 17:39:01 2018 +0000
4 Commit: Matthias Maier <tamiko <AT> gentoo <DOT> org>
5 CommitDate: Tue Jan 30 17:54:56 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0a987006
7
8 app-emulation/libvirt: add bashcompletion support
9
10 - also apply two minor bugfixes for version 4.0.0 (hopefully fixed in
11 the live version soon.)
12
13 Closes: https://bugs.gentoo.org/644632
14 Package-Manager: Portage-2.3.20, Repoman-2.3.6
15
16 .../libvirt-4.0.0-bash_completion_bugfixes.patch | 42 ++++++++++++++++++++++
17 app-emulation/libvirt/libvirt-4.0.0.ebuild | 6 +++-
18 app-emulation/libvirt/libvirt-9999.ebuild | 7 ++--
19 3 files changed, 52 insertions(+), 3 deletions(-)
20
21 diff --git a/app-emulation/libvirt/files/libvirt-4.0.0-bash_completion_bugfixes.patch b/app-emulation/libvirt/files/libvirt-4.0.0-bash_completion_bugfixes.patch
22 new file mode 100644
23 index 00000000000..65894ed4e1d
24 --- /dev/null
25 +++ b/app-emulation/libvirt/files/libvirt-4.0.0-bash_completion_bugfixes.patch
26 @@ -0,0 +1,42 @@
27 +https://www.redhat.com/archives/libvir-list/2018-January/msg00903.html
28 +https://www.redhat.com/archives/libvir-list/2018-January/msg00904.html
29 +
30 +diff --git a/tools/virsh-completer.c b/tools/virsh-completer.c
31 +index e216d9076..e3b8234b4 100644
32 +--- a/tools/virsh-completer.c
33 ++++ b/tools/virsh-completer.c
34 +@@ -45,18 +45,11 @@ virshDomainNameCompleter(vshControl *ctl,
35 +
36 + virCheckFlags(VIR_CONNECT_LIST_DOMAINS_ACTIVE |
37 + VIR_CONNECT_LIST_DOMAINS_INACTIVE |
38 ++ VIR_CONNECT_LIST_DOMAINS_OTHER |
39 ++ VIR_CONNECT_LIST_DOMAINS_PAUSED |
40 + VIR_CONNECT_LIST_DOMAINS_PERSISTENT |
41 +- VIR_CONNECT_LIST_DOMAINS_TRANSIENT |
42 + VIR_CONNECT_LIST_DOMAINS_RUNNING |
43 +- VIR_CONNECT_LIST_DOMAINS_PAUSED |
44 +- VIR_CONNECT_LIST_DOMAINS_SHUTOFF |
45 +- VIR_CONNECT_LIST_DOMAINS_OTHER |
46 +- VIR_CONNECT_LIST_DOMAINS_MANAGEDSAVE |
47 +- VIR_CONNECT_LIST_DOMAINS_NO_MANAGEDSAVE |
48 +- VIR_CONNECT_LIST_DOMAINS_AUTOSTART |
49 +- VIR_CONNECT_LIST_DOMAINS_NO_AUTOSTART |
50 +- VIR_CONNECT_LIST_DOMAINS_HAS_SNAPSHOT |
51 +- VIR_CONNECT_LIST_DOMAINS_NO_SNAPSHOT,
52 ++ VIR_CONNECT_LIST_DOMAINS_SHUTOFF,
53 + NULL);
54 +
55 + if (!priv->conn || virConnectIsAlive(priv->conn) <= 0)
56 +diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
57 +index 0f329d6d7..5a0e0c1b2 100644
58 +--- a/tools/virsh-domain.c
59 ++++ b/tools/virsh-domain.c
60 +@@ -1037,7 +1037,7 @@ static const vshCmdInfo info_autostart[] = {
61 + };
62 +
63 + static const vshCmdOptDef opts_autostart[] = {
64 +- VIRSH_COMMON_OPT_DOMAIN_FULL(0),
65 ++ VIRSH_COMMON_OPT_DOMAIN_FULL(VIR_CONNECT_LIST_DOMAINS_PERSISTENT),
66 + {.name = "disable",
67 + .type = VSH_OT_BOOL,
68 + .help = N_("disable autostarting")
69
70 diff --git a/app-emulation/libvirt/libvirt-4.0.0.ebuild b/app-emulation/libvirt/libvirt-4.0.0.ebuild
71 index 487691cdac3..1107c986520 100644
72 --- a/app-emulation/libvirt/libvirt-4.0.0.ebuild
73 +++ b/app-emulation/libvirt/libvirt-4.0.0.ebuild
74 @@ -3,7 +3,7 @@
75
76 EAPI=6
77
78 -inherit autotools eutils user linux-info systemd readme.gentoo-r1
79 +inherit autotools eutils user linux-info systemd readme.gentoo-r1 bash-completion-r1
80
81 if [[ ${PV} = *9999* ]]; then
82 inherit git-r3
83 @@ -127,6 +127,7 @@ PATCHES=(
84 "${FILESDIR}"/${PN}-3.10.0-r2-fix_paths_for_apparmor.patch
85 "${FILESDIR}"/${PN}-1.3.4-glibc-2.23.patch
86 "${FILESDIR}"/${PN}-3.1.0-musl-fix-includes.patch # bug #609488
87 + "${FILESDIR}"/${PN}-4.0.0-bash_completion_bugfixes.patch # bug #644632
88 )
89
90 pkg_setup() {
91 @@ -358,6 +359,9 @@ src_install() {
92 newconfd "${FILESDIR}/libvirtd.confd-r5" libvirtd || die
93 newconfd "${FILESDIR}/libvirt-guests.confd" libvirt-guests || die
94
95 + newbashcomp "${S}/tools/bash-completion/vsh" vsh
96 + bashcomp_alias vsh virsh virt-admin
97 +
98 DOC_CONTENTS=$(<"${FILESDIR}/README.gentoo-r2")
99 DISABLE_AUTOFORMATTING=true
100 readme.gentoo_create_doc
101
102 diff --git a/app-emulation/libvirt/libvirt-9999.ebuild b/app-emulation/libvirt/libvirt-9999.ebuild
103 index 3716e896837..84ae6b580a7 100644
104 --- a/app-emulation/libvirt/libvirt-9999.ebuild
105 +++ b/app-emulation/libvirt/libvirt-9999.ebuild
106 @@ -1,9 +1,9 @@
107 -# Copyright 1999-2017 Gentoo Foundation
108 +# Copyright 1999-2018 Gentoo Foundation
109 # Distributed under the terms of the GNU General Public License v2
110
111 EAPI=6
112
113 -inherit autotools eutils user linux-info systemd readme.gentoo-r1
114 +inherit autotools eutils user linux-info systemd readme.gentoo-r1 bash-completion-r1
115
116 if [[ ${PV} = *9999* ]]; then
117 inherit git-r3
118 @@ -355,6 +355,9 @@ src_install() {
119 newconfd "${FILESDIR}/libvirtd.confd-r5" libvirtd || die
120 newconfd "${FILESDIR}/libvirt-guests.confd" libvirt-guests || die
121
122 + newbashcomp "${S}/tools/bash-completion/vsh" vsh
123 + bashcomp_alias vsh virsh virt-admin
124 +
125 DOC_CONTENTS=$(<"${FILESDIR}/README.gentoo-r2")
126 DISABLE_AUTOFORMATTING=true
127 readme.gentoo_create_doc