1 |
commit: 0f0d7d1bedc121027e3f4cccf5b94a71a971891e |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Oct 7 06:00:11 2021 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Oct 7 06:09:45 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0f0d7d1b |
7 |
|
8 |
app-emulation/libguestfs: split out tools into guestfs-tools, tidy ebuild |
9 |
|
10 |
Bug: https://bugs.gentoo.org/816693 |
11 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
12 |
|
13 |
...s-1.46.0.ebuild => libguestfs-1.46.0-r1.ebuild} | 137 +++++++++++---------- |
14 |
app-emulation/libguestfs/metadata.xml | 23 ++-- |
15 |
2 files changed, 79 insertions(+), 81 deletions(-) |
16 |
|
17 |
diff --git a/app-emulation/libguestfs/libguestfs-1.46.0.ebuild b/app-emulation/libguestfs/libguestfs-1.46.0-r1.ebuild |
18 |
similarity index 77% |
19 |
rename from app-emulation/libguestfs/libguestfs-1.46.0.ebuild |
20 |
rename to app-emulation/libguestfs/libguestfs-1.46.0-r1.ebuild |
21 |
index 8f136aeb44f..f1d3e7a9f30 100644 |
22 |
--- a/app-emulation/libguestfs/libguestfs-1.46.0.ebuild |
23 |
+++ b/app-emulation/libguestfs/libguestfs-1.46.0-r1.ebuild |
24 |
@@ -6,20 +6,20 @@ EAPI=7 |
25 |
LUA_COMPAT=( lua5-1 ) |
26 |
PYTHON_COMPAT=( python3_{8,9,10} ) |
27 |
|
28 |
-inherit autotools bash-completion-r1 linux-info lua-single perl-functions python-single-r1 strip-linguas toolchain-funcs xdg-utils flag-o-matic |
29 |
+inherit bash-completion-r1 flag-o-matic linux-info lua-single perl-functions python-single-r1 strip-linguas toolchain-funcs |
30 |
|
31 |
MY_PV_1="$(ver_cut 1-2)" |
32 |
MY_PV_2="$(ver_cut 2)" |
33 |
[[ $(( ${MY_PV_2} % 2 )) -eq 0 ]] && SD="stable" || SD="development" |
34 |
|
35 |
-DESCRIPTION="Tools for accessing, inspect and modifying virtual machine (VM) disk images" |
36 |
+DESCRIPTION="Tools for accessing, inspecting, and modifying virtual machine (VM) disk images" |
37 |
HOMEPAGE="https://libguestfs.org/" |
38 |
SRC_URI="https://libguestfs.org/download/${MY_PV_1}-${SD}/${P}.tar.gz" |
39 |
|
40 |
LICENSE="GPL-2 LGPL-2" |
41 |
SLOT="0/${MY_PV_1}" |
42 |
- |
43 |
-KEYWORDS="~amd64" |
44 |
+# Unkeyworded for testing guestfs-tools split, #816693 |
45 |
+#KEYWORDS="~amd64" |
46 |
IUSE="doc erlang +fuse gtk inspect-icons introspection libvirt lua +ocaml +perl python ruby selinux static-libs systemtap test" |
47 |
RESTRICT="!test? ( test )" |
48 |
|
49 |
@@ -27,32 +27,36 @@ REQUIRED_USE="lua? ( ${LUA_REQUIRED_USE} ) |
50 |
python? ( ${PYTHON_REQUIRED_USE} )" |
51 |
|
52 |
# Failures - doc |
53 |
- |
54 |
# FIXME: selinux support is automagic |
55 |
COMMON_DEPEND=" |
56 |
- sys-libs/ncurses:0= |
57 |
- sys-devel/gettext |
58 |
- >=app-misc/hivex-1.3.1 |
59 |
- dev-libs/libpcre:3 |
60 |
+ >=app-admin/augeas-1.8.0 |
61 |
app-arch/cpio |
62 |
- dev-lang/perl:= |
63 |
+ app-arch/lzma |
64 |
+ app-arch/unzip[natspec] |
65 |
+ app-arch/xz-utils |
66 |
app-cdr/cdrtools |
67 |
+ app-crypt/gnupg |
68 |
>=app-emulation/qemu-2.0[qemu_softmmu_targets_x86_64,systemtap?,selinux?,filecaps] |
69 |
- sys-apps/fakeroot |
70 |
- sys-apps/file |
71 |
- libvirt? ( app-emulation/libvirt ) |
72 |
+ >=app-misc/hivex-1.3.1 |
73 |
+ dev-lang/perl:= |
74 |
+ dev-libs/libconfig:= |
75 |
+ dev-libs/libpcre:3 |
76 |
dev-libs/libxml2:2= |
77 |
+ dev-libs/jansson:= |
78 |
+ >=dev-libs/yajl-2.0.4 |
79 |
+ net-libs/libtirpc:= |
80 |
+ sys-libs/ncurses:0= |
81 |
>=sys-apps/fakechroot-2.8 |
82 |
- >=app-admin/augeas-1.8.0 |
83 |
+ sys-apps/fakeroot |
84 |
+ sys-apps/file |
85 |
+ sys-devel/gettext |
86 |
sys-fs/squashfs-tools:* |
87 |
- dev-libs/libconfig:= |
88 |
- dev-libs/jansson:= |
89 |
- sys-libs/readline:0= |
90 |
>=sys-libs/db-4.6:* |
91 |
- app-arch/xz-utils |
92 |
- app-arch/lzma |
93 |
- app-crypt/gnupg |
94 |
- app-arch/unzip[natspec] |
95 |
+ sys-libs/libcap |
96 |
+ sys-libs/readline:= |
97 |
+ virtual/acl |
98 |
+ virtual/libcrypt:= |
99 |
+ erlang? ( dev-lang/erlang ) |
100 |
perl? ( |
101 |
virtual/perl-ExtUtils-MakeMaker |
102 |
>=dev-perl/Sys-Virt-0.2.4 |
103 |
@@ -64,38 +68,34 @@ COMMON_DEPEND=" |
104 |
) |
105 |
python? ( ${PYTHON_DEPS} ) |
106 |
fuse? ( sys-fs/fuse:= ) |
107 |
+ gtk? ( |
108 |
+ sys-apps/dbus |
109 |
+ x11-libs/gtk+:3 |
110 |
+ ) |
111 |
introspection? ( |
112 |
>=dev-libs/glib-2.26:2 |
113 |
>=dev-libs/gobject-introspection-1.30.0:= |
114 |
) |
115 |
- selinux? ( |
116 |
- sys-libs/libselinux |
117 |
- sys-libs/libsemanage |
118 |
- ) |
119 |
- systemtap? ( dev-util/systemtap ) |
120 |
- ocaml? ( >=dev-lang/ocaml-4.03:=[ocamlopt] ) |
121 |
- erlang? ( dev-lang/erlang ) |
122 |
inspect-icons? ( |
123 |
media-libs/netpbm |
124 |
media-gfx/icoutils |
125 |
) |
126 |
- virtual/acl |
127 |
- sys-libs/libcap |
128 |
+ libvirt? ( app-emulation/libvirt ) |
129 |
lua? ( ${LUA_DEPS} ) |
130 |
- >=dev-libs/yajl-2.0.4 |
131 |
- gtk? ( |
132 |
- sys-apps/dbus |
133 |
- x11-libs/gtk+:3 |
134 |
+ ocaml? ( >=dev-lang/ocaml-4.03:=[ocamlopt] ) |
135 |
+ selinux? ( |
136 |
+ sys-libs/libselinux |
137 |
+ sys-libs/libsemanage |
138 |
) |
139 |
- net-libs/libtirpc:= |
140 |
- sys-libs/libxcrypt:= |
141 |
+ systemtap? ( dev-util/systemtap ) |
142 |
" |
143 |
# Some OCaml is always required |
144 |
# bug #729674 |
145 |
DEPEND="${COMMON_DEPEND} |
146 |
- dev-util/gperf |
147 |
>=dev-lang/ocaml-4.03:=[ocamlopt] |
148 |
+ dev-util/gperf |
149 |
dev-ml/findlib[ocamlopt] |
150 |
+ doc? ( app-text/po4a ) |
151 |
ocaml? ( |
152 |
dev-ml/ounit2[ocamlopt] |
153 |
|| ( |
154 |
@@ -103,13 +103,13 @@ DEPEND="${COMMON_DEPEND} |
155 |
dev-ml/ocaml-gettext-stub[ocamlopt] |
156 |
) |
157 |
) |
158 |
- doc? ( app-text/po4a ) |
159 |
ruby? ( dev-lang/ruby virtual/rubygems dev-ruby/rake ) |
160 |
test? ( introspection? ( dev-libs/gjs ) ) |
161 |
" |
162 |
BDEPEND="virtual/pkgconfig" |
163 |
RDEPEND="${COMMON_DEPEND} |
164 |
app-emulation/libguestfs-appliance |
165 |
+ acct-group/kvm |
166 |
" |
167 |
# Upstream build scripts compile and install Lua bindings for the ABI version |
168 |
# obtained by running 'lua' on the build host |
169 |
@@ -129,12 +129,6 @@ pkg_setup() { |
170 |
use python && python-single-r1_pkg_setup |
171 |
} |
172 |
|
173 |
-src_prepare() { |
174 |
- default |
175 |
- xdg_environment_reset |
176 |
- eautoreconf |
177 |
-} |
178 |
- |
179 |
src_configure() { |
180 |
# bug #794877 |
181 |
tc-export AR |
182 |
@@ -153,33 +147,36 @@ src_configure() { |
183 |
export vmchannel_test=no |
184 |
|
185 |
# Give a nudge to help find libxcrypt[-system] |
186 |
+ # We have a := dep on virtual/libcrypt to ensure this doesn't become stale. |
187 |
# bug #703118, bug #789354 |
188 |
- append-ldflags "-L${ESYSROOT}/usr/$(get_libdir)/xcrypt" |
189 |
- append-ldflags "-Wl,-R${ESYSROOT}/usr/$(get_libdir)/xcrypt" |
190 |
+ if ! has_version 'sys-libs/libxcrypt[system]' ; then |
191 |
+ append-ldflags "-L${ESYSROOT}/usr/$(get_libdir)/xcrypt" |
192 |
+ append-ldflags "-Wl,-R${ESYSROOT}/usr/$(get_libdir)/xcrypt" |
193 |
+ fi |
194 |
|
195 |
econf \ |
196 |
- $(use_with libvirt) \ |
197 |
--disable-appliance \ |
198 |
--disable-daemon \ |
199 |
- --with-extra="-gentoo" \ |
200 |
- --with-readline \ |
201 |
- --disable-php \ |
202 |
- $(use_enable python) \ |
203 |
- --without-java \ |
204 |
- $(use_enable perl) \ |
205 |
- $(use_enable fuse) \ |
206 |
- $(use_enable ocaml) \ |
207 |
- $(use_enable ruby) \ |
208 |
--disable-haskell \ |
209 |
--disable-golang \ |
210 |
--disable-rust \ |
211 |
+ --disable-php \ |
212 |
+ --without-java \ |
213 |
+ --with-extra="-gentoo" \ |
214 |
+ --with-readline \ |
215 |
+ $(usex doc '' PO4A=no) \ |
216 |
+ $(use_enable ocaml) \ |
217 |
+ $(use_enable erlang) \ |
218 |
+ $(use_enable fuse) \ |
219 |
$(use_enable introspection gobject) \ |
220 |
$(use_enable introspection) \ |
221 |
- $(use_enable erlang) \ |
222 |
- $(use_enable static-libs static) \ |
223 |
- $(use_enable systemtap probes) \ |
224 |
+ $(use_with libvirt) \ |
225 |
$(use_enable lua) \ |
226 |
- $(usex doc '' PO4A=no) |
227 |
+ $(use_enable python) \ |
228 |
+ $(use_enable perl) \ |
229 |
+ $(use_enable ruby) \ |
230 |
+ $(use_enable static-libs static) \ |
231 |
+ $(use_enable systemtap probes) |
232 |
} |
233 |
|
234 |
src_install() { |
235 |
@@ -198,16 +195,24 @@ src_install() { |
236 |
fi |
237 |
} |
238 |
|
239 |
+pkg_preinst() { |
240 |
+ local libguestfs_depstring="<app-emulation/libguestfs-1.46.0-r1" |
241 |
+ |
242 |
+ # Did we have a version of libguestfs before the split into guestfs-tools? |
243 |
+ # (libguestfs used to install the tools too) |
244 |
+ if has_version "${libguestfs_depstring}[ocaml]" || has_version "${libguestfs_depstring}[perl]" ; then |
245 |
+ HAD_LIBGUESTFS_WITH_TOOLS=1 |
246 |
+ fi |
247 |
+} |
248 |
+ |
249 |
pkg_postinst() { |
250 |
+ einfo "Please ensure you are in the 'kvm' group for decent performance!" |
251 |
+ |
252 |
if ! use gtk ; then |
253 |
einfo "virt-p2v NOT installed" |
254 |
fi |
255 |
|
256 |
- if ! use ocaml ; then |
257 |
- einfo "OCaml based tools and bindings (virt-resize, virt-sparsify, virt-sysprep, ...) NOT installed" |
258 |
- fi |
259 |
- |
260 |
- if ! use perl ; then |
261 |
- einfo "Perl based tools NOT built" |
262 |
+ if [[ ${HAD_LIBGUESTFS_WITH_TOOLS} -eq 1 ]] ; then |
263 |
+ ewarn "libguestfs' tools are now packaged as app-emulation/guestfs-tools from 1.46.0 onwards!" |
264 |
fi |
265 |
} |
266 |
|
267 |
diff --git a/app-emulation/libguestfs/metadata.xml b/app-emulation/libguestfs/metadata.xml |
268 |
index 4f3be3f3c1c..ddd4c20532b 100644 |
269 |
--- a/app-emulation/libguestfs/metadata.xml |
270 |
+++ b/app-emulation/libguestfs/metadata.xml |
271 |
@@ -1,19 +1,12 @@ |
272 |
<?xml version="1.0" encoding="UTF-8"?> |
273 |
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> |
274 |
<pkgmetadata> |
275 |
-<!-- maintainer-needed --> |
276 |
-<!-- |
277 |
-<maintainer type="person"> |
278 |
- <email>rich@×××××××.org</email> |
279 |
- <name>Richard Jones</name> |
280 |
- <description>Upstream - please CC on bugs that concerns upstream</description> |
281 |
-</maintainer> |
282 |
---> |
283 |
-<use> |
284 |
- <flag name="erlang">Build Erlang bindings</flag> |
285 |
- <flag name="fuse">Enable image mount support via fuse</flag> |
286 |
- <flag name="inspect-icons">Use <pkg>media-gfx/icoutils</pkg> for acces icon file in image and inspect it</flag> |
287 |
- <flag name="libvirt">Use <pkg>app-emulation/libvirt</pkg> to manipulate VMs</flag> |
288 |
- <flag name="systemtap">Use <pkg>dev-util/systemtap</pkg> to inspect VM via "probes" way</flag> |
289 |
-</use> |
290 |
+ <!-- maintainer-needed --> |
291 |
+ <use> |
292 |
+ <flag name="erlang">Build Erlang bindings</flag> |
293 |
+ <flag name="fuse">Enable image mount support via <pkg>sys-fs/fuse</pkg></flag> |
294 |
+ <flag name="inspect-icons">Use <pkg>media-gfx/icoutils</pkg> for accessing/inspecting icon file within images</flag> |
295 |
+ <flag name="libvirt">Use <pkg>app-emulation/libvirt</pkg> to manipulate VMs</flag> |
296 |
+ <flag name="systemtap">Use <pkg>dev-util/systemtap</pkg> to inspect VM via "probes"</flag> |
297 |
+ </use> |
298 |
</pkgmetadata> |