Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/guestfs-tools/
Date: Tue, 31 May 2022 08:43:05
Message-Id: 1653986575.4c66d36aaa72be34108ced6b30a329c8d187bbb9.sam@gentoo
1 commit: 4c66d36aaa72be34108ced6b30a329c8d187bbb9
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Tue May 31 08:42:30 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Tue May 31 08:42:55 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4c66d36a
7
8 app-emulation/guestfs-tools: add 1.48.2
9
10 Signed-off-by: Sam James <sam <AT> gentoo.org>
11
12 app-emulation/guestfs-tools/Manifest | 1 +
13 .../guestfs-tools/guestfs-tools-1.48.2.ebuild | 154 +++++++++++++++++++++
14 2 files changed, 155 insertions(+)
15
16 diff --git a/app-emulation/guestfs-tools/Manifest b/app-emulation/guestfs-tools/Manifest
17 index 5626fdc34c99..f6beef729b99 100644
18 --- a/app-emulation/guestfs-tools/Manifest
19 +++ b/app-emulation/guestfs-tools/Manifest
20 @@ -1 +1,2 @@
21 DIST guestfs-tools-1.48.0.tar.gz 12682919 BLAKE2B 27b4e5c47af222691b067c19e997112acaf0360cc9c089dedb0327959ff8d80ff929e2fea369f9895ed6e1fc80a339ca89db3b9eb32cf23328fc71972447a13e SHA512 8576ef0e283a02a112f785e8f1656b41c93be29e12617ee8c83033b90758736ea3c2d4ecfb446a86c7913e2c0b39a7c5666e8ad22682419cc877543a3825c489
22 +DIST guestfs-tools-1.48.2.tar.gz 12691067 BLAKE2B 305f281c19975f160c435b995d71ef2e18d09fc95f31e92efe8f79d811fc0a7efab27d14f766d5f6ee477fd43977167a3aabe5cc40498f125f925507fd2574d5 SHA512 e11cd5a38a1681e8b2fd56419d38ca0aaab659cb59d409b3572cadcd04fd4da3078fa33e7f21c99d11854ad08797ae24a8d71c041b1b7769fc36c1391b6eb162
23
24 diff --git a/app-emulation/guestfs-tools/guestfs-tools-1.48.2.ebuild b/app-emulation/guestfs-tools/guestfs-tools-1.48.2.ebuild
25 new file mode 100644
26 index 000000000000..c6a2bf8d214b
27 --- /dev/null
28 +++ b/app-emulation/guestfs-tools/guestfs-tools-1.48.2.ebuild
29 @@ -0,0 +1,154 @@
30 +# Copyright 1999-2022 Gentoo Authors
31 +# Distributed under the terms of the GNU General Public License v2
32 +
33 +EAPI=8
34 +
35 +# Bump with app-emulation/libguestfs and app-emulation/libguestfs-appliance (if any new release there)
36 +
37 +inherit flag-o-matic linux-info perl-functions strip-linguas toolchain-funcs
38 +
39 +MY_PV_1="$(ver_cut 1-2)"
40 +MY_PV_2="$(ver_cut 2)"
41 +[[ $(( ${MY_PV_2} % 2 )) -eq 0 ]] && SD="stable" || SD="development"
42 +
43 +DESCRIPTION="Tools for accessing, inspecting, and modifying virtual machine (VM) disk images"
44 +HOMEPAGE="https://libguestfs.org/"
45 +SRC_URI="https://download.libguestfs.org/${PN}/${MY_PV_1}-${SD}/${P}.tar.gz"
46 +
47 +LICENSE="GPL-2 LGPL-2"
48 +SLOT="0/${MY_PV_1}"
49 +KEYWORDS="~amd64"
50 +IUSE="doc +ocaml +perl test"
51 +RESTRICT="!test? ( test )"
52 +
53 +# Failures - doc
54 +COMMON_DEPEND="
55 + !<app-emulation/libguestfs-1.46.0-r1
56 + app-arch/cpio
57 + app-arch/lzma
58 + app-arch/unzip[natspec]
59 + app-arch/xz-utils
60 + app-crypt/gnupg
61 + >=app-emulation/libguestfs-${MY_PV_1}:=[ocaml?,perl?]
62 + app-emulation/libvirt:=
63 + >=app-emulation/qemu-2.0[qemu_softmmu_targets_x86_64,filecaps]
64 + dev-lang/perl:=
65 + dev-libs/libpcre2:=
66 + dev-libs/libxml2:2
67 + dev-libs/jansson:=
68 + >=sys-apps/fakechroot-2.8
69 + sys-fs/squashfs-tools:*
70 + sys-libs/ncurses:=
71 + sys-libs/libxcrypt:=
72 + virtual/libcrypt:=
73 + ocaml? ( >=dev-lang/ocaml-4.03:=[ocamlopt] )
74 + perl? (
75 + virtual/perl-Data-Dumper
76 + virtual/perl-Getopt-Long
77 + dev-perl/Module-Build
78 + dev-perl/libintl-perl
79 + virtual/perl-ExtUtils-MakeMaker
80 + >=dev-perl/Sys-Virt-0.2.4
81 + dev-perl/String-ShellQuote
82 + test? ( virtual/perl-Test-Simple )
83 + )
84 +"
85 +# Some OCaml is always required
86 +# bug #729674
87 +DEPEND="${COMMON_DEPEND}
88 + >=dev-lang/ocaml-4.03:=[ocamlopt]
89 + dev-ml/findlib[ocamlopt]
90 + doc? ( app-text/po4a )
91 + ocaml? (
92 + dev-ml/ounit2[ocamlopt]
93 + || (
94 + <dev-ml/ocaml-gettext-0.4.2
95 + dev-ml/ocaml-gettext-stub[ocamlopt]
96 + )
97 + )
98 +"
99 +BDEPEND="virtual/pkgconfig"
100 +RDEPEND="${COMMON_DEPEND}
101 + app-emulation/libguestfs-appliance
102 +"
103 +
104 +DOCS=( AUTHORS BUGS ChangeLog HACKING README TODO )
105 +
106 +#PATCHES=(
107 +# "${FILESDIR}"/${MY_PV_1}/
108 +#)
109 +
110 +pkg_setup() {
111 + CONFIG_CHECK="~KVM ~VIRTIO"
112 + [[ -n "${CONFIG_CHECK}" ]] && check_extra_config
113 +}
114 +
115 +src_configure() {
116 + # bug #794877
117 + tc-export AR
118 +
119 + if use test ; then
120 + # Skip Bash test
121 + # (See 13-test-suite.log in linked bug)
122 + # bug #794874
123 + export SKIP_TEST_COMPLETE_IN_SCRIPT_SH=1
124 +
125 + # This test requires libvirt support in libguestfs and it makes
126 + # no difference at runtime. Just gracefully skip it to make life
127 + # easier for e.g. arch testing.
128 + if ! has_version 'app-emulation/libguestfs[libvirt]' ; then
129 + export SKIP_TEST_VIRT_ALIGNMENT_SCAN_GUESTS_SH=1
130 + fi
131 +
132 + # Needed for the inspector tests. Provided by libguestfs-appliance.
133 + #export LIBGUESTFS_PATH="${BROOT}"/usr/share/guestfs/appliance/
134 + # But the inspector tests seem fragile anyway...
135 + export SKIP_TEST_VIRT_INSPECTOR_LUKS_SH=1
136 + export SKIP_TEST_VIRT_INSPECTOR_SH=1
137 + fi
138 +
139 + # Disable feature test for kvm for more reason
140 + # i.e: not loaded module in __build__ time,
141 + # build server not supported kvm, etc. ...
142 + #
143 + # In fact, this feature is virtio support and requires
144 + # configured kernel.
145 + export vmchannel_test=no
146 +
147 + # Give a nudge to help find libxcrypt[-system]
148 + # We have a := dep on virtual/libcrypt to ensure this
149 + # doesn't become stale.
150 + # bug #703118, bug #789354
151 + if ! has_version 'sys-libs/libxcrypt[system]' ; then
152 + append-ldflags "-L${ESYSROOT}/usr/$(get_libdir)/xcrypt"
153 + append-ldflags "-Wl,-R${ESYSROOT}/usr/$(get_libdir)/xcrypt"
154 + fi
155 +
156 + # Test suite at least has a bunch of bashisms
157 + SHELL="${BROOT}"/bin/bash CONFIG_SHELL="${BROOT}"/bin/bash econf \
158 + $(usex doc '' PO4A=no) \
159 + $(use_enable ocaml) \
160 + $(use_enable perl)
161 +}
162 +
163 +src_install() {
164 + strip-linguas -i po
165 +
166 + emake DESTDIR="${D}" install "LINGUAS=""${LINGUAS}"""
167 +
168 + find "${ED}" -name '*.la' -delete || die
169 +
170 + if use perl ; then
171 + perl_delete_localpod
172 + fi
173 +}
174 +
175 +pkg_postinst() {
176 + if ! use ocaml ; then
177 + einfo "OCaml based tools and bindings (virt-resize, virt-sparsify, virt-sysprep, ...) NOT installed"
178 + fi
179 +
180 + if ! use perl ; then
181 + einfo "Perl based tools NOT built"
182 + fi
183 +}