Gentoo Archives: gentoo-commits

From: Mike Gilbert <floppym@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/open-vm-tools/files/, app-emulation/open-vm-tools/
Date: Wed, 04 Jul 2018 14:56:29
Message-Id: 1530716176.27cf8b83fbf2cb9394d1c123a4ab237caa5d0d2c.floppym@gentoo
1 commit: 27cf8b83fbf2cb9394d1c123a4ab237caa5d0d2c
2 Author: Xiami <i <AT> f2light <DOT> com>
3 AuthorDate: Wed Jul 4 09:54:00 2018 +0000
4 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
5 CommitDate: Wed Jul 4 14:56:16 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=27cf8b83
7
8 app-emulation/open-vm-tools: Bump to 10.2.5 and update the ebuild
9
10 - Update LICENSE
11 - According to configure.ac:
12 - Introducing more features
13 - Update IUSE, REQUIRED_USE and DEPENDs
14 - Patches for migrate to libtirpc (and keep -Werror)
15
16 Package-Manager: Portage-2.3.40, Repoman-2.3.9
17 Closes: https://github.com/gentoo/gentoo/pull/9039
18 Closes: https://bugs.gentoo.org/658086
19
20 app-emulation/open-vm-tools/Manifest | 1 +
21 .../open-vm-tools/files/10.2.5-libtirpc.patch | 45 ++++++
22 app-emulation/open-vm-tools/files/vgauthd.service | 14 ++
23 app-emulation/open-vm-tools/files/vmtoolsd.service | 2 +-
24 .../{vmtoolsd.service => vmtoolsd.vgauth.service} | 5 +-
25 app-emulation/open-vm-tools/metadata.xml | 16 +-
26 .../open-vm-tools/open-vm-tools-10.2.5.ebuild | 172 +++++++++++++++++++++
27 7 files changed, 250 insertions(+), 5 deletions(-)
28
29 diff --git a/app-emulation/open-vm-tools/Manifest b/app-emulation/open-vm-tools/Manifest
30 index a8bf132586f..09a1e723dfe 100644
31 --- a/app-emulation/open-vm-tools/Manifest
32 +++ b/app-emulation/open-vm-tools/Manifest
33 @@ -1,2 +1,3 @@
34 DIST open-vm-tools-10.1.10-6082533.tar.gz 5111726 BLAKE2B 22e2e901c542ae14b7537bc26ff848359f30bde6824a16968b70070dd6e57c92fbf76dca0d02e35ef45bda257725e207632b0602a4336bd2d9c97d10fb094967 SHA512 60c52a24509cb0630f2ad649fe6717fefff624fc2a5c736ced35cbdb8f639264d482e063e8140eedb39216adfb1231d58232bfef0233ebc477ba4f9a732c5965
35 DIST open-vm-tools-10.1.15-6677369.tar.gz 5153995 BLAKE2B 03c6b359df8f42f1ba65331dcac67e8ce86b0fce9a572c1665d3f385cae14f1757611d3948d30bb5b2e40bb2b4673bb244c45f56098faf09d6de515bb937ea3f SHA512 fe3699a7f704bdadc4c274c963d177f4700067e7436074554b7cf113ffa341ad0e4753016214f947418fd5a7cb4a6f2c0342acf074b6b414b3fd18fd2ea2bc58
36 +DIST open-vm-tools-10.2.5-8068406.tar.gz 4818035 BLAKE2B 87e3edc42afceaf9efe69ae8cbd1abfbbf959fe09a721dbe4737ca30c6b57dcf1d8bff23bb3ed3d2236c31e7f3e6fd4d10a689b40b3b725eb580609a68bb7090 SHA512 da2f26b4b22e195af111cc16d5819aeb963f0dfa18b5d2677d897549836ec8679808315646f7f86ae36862df9e623bbcb5d553dae97a68b3ef928a5c07ea2e68
37
38 diff --git a/app-emulation/open-vm-tools/files/10.2.5-libtirpc.patch b/app-emulation/open-vm-tools/files/10.2.5-libtirpc.patch
39 new file mode 100644
40 index 00000000000..a9dfb42b2fc
41 --- /dev/null
42 +++ b/app-emulation/open-vm-tools/files/10.2.5-libtirpc.patch
43 @@ -0,0 +1,45 @@
44 +From 75505fed193fc3779560b57c1b0d6d4209b05bf9 Mon Sep 17 00:00:00 2001
45 +From: Xiami <i@×××××××.com>
46 +Date: Thu, 14 Jun 2018 16:23:00 +0800
47 +Subject: [PATCH] lib/dynxdr: for libtirpc
48 +
49 +glibc-2.26 do not provide RPC support by default.
50 +This workaround only works for Gentoo as ebuild forces libtirpc.
51 +---
52 + open-vm-tools/lib/dynxdr/dynxdr.c | 6 +++---
53 + 1 file changed, 3 insertions(+), 3 deletions(-)
54 +
55 +diff --git a/open-vm-tools/lib/dynxdr/dynxdr.c b/open-vm-tools/lib/dynxdr/dynxdr.c
56 +index 95fdc7e2..d3182733 100644
57 +--- a/open-vm-tools/lib/dynxdr/dynxdr.c
58 ++++ b/open-vm-tools/lib/dynxdr/dynxdr.c
59 +@@ -55,7 +55,7 @@ typedef struct DynXdrData {
60 + * Mac OS X, FreeBSD and Solaris don't take a const parameter to the
61 + * "x_getpostn" function.
62 + */
63 +-#if defined(__APPLE__) || defined(__FreeBSD__) || defined(sun)
64 ++#if defined(__APPLE__) || defined(__FreeBSD__) || defined(sun) || defined(_TIRPC_XDR_H)
65 + # define DYNXDR_GETPOS_CONST
66 + #else
67 + # define DYNXDR_GETPOS_CONST const
68 +@@ -172,7 +172,7 @@ DynXdrSetPos(XDR *xdrs, // IN
69 + }
70 +
71 +
72 +-#if defined(__GLIBC__) || (defined(sun) && (defined(_LP64) || defined(_KERNEL)))
73 ++#if (defined(__GLIBC__) && !defined(_TIRPC_XDR_H)) || (defined(sun) && (defined(_LP64) || defined(_KERNEL)))
74 + /*
75 + *-----------------------------------------------------------------------------
76 + *
77 +@@ -322,7 +322,7 @@ DynXdr_Create(XDR *in) // IN
78 + DynXdrSetPos, /* x_setpostn */
79 + DynXdrInline, /* x_inline */
80 + NULL, /* x_destroy */
81 +-#if defined(__GLIBC__)
82 ++#if defined(__GLIBC__) && !defined(_TIRPC_XDR_H)
83 + NULL, /* x_getint32 */
84 + DynXdrPutInt32, /* x_putint32 */
85 + #elif defined(__APPLE__)
86 +--
87 +2.16.4
88 +
89
90 diff --git a/app-emulation/open-vm-tools/files/vgauthd.service b/app-emulation/open-vm-tools/files/vgauthd.service
91 new file mode 100644
92 index 00000000000..db27bd56ef5
93 --- /dev/null
94 +++ b/app-emulation/open-vm-tools/files/vgauthd.service
95 @@ -0,0 +1,14 @@
96 +[Unit]
97 +Description=VGAuth Service for open-vm-tools
98 +Documentation=https://github.com/vmware/open-vm-tools
99 +ConditionVirtualization=vmware
100 +PartOf=vmtoolsd.service
101 +
102 +[Service]
103 +# For dev-libs/xerces-c[iconv,-icu]
104 +EnvironmentFile=-/etc/env.d/50xerces-c
105 +ExecStart=/usr/bin/VGAuthService -s
106 +TimeoutStopSec=5
107 +
108 +[Install]
109 +RequiredBy=vmtoolsd.service
110
111 diff --git a/app-emulation/open-vm-tools/files/vmtoolsd.service b/app-emulation/open-vm-tools/files/vmtoolsd.service
112 index 426d4fbd993..1226291bc8d 100644
113 --- a/app-emulation/open-vm-tools/files/vmtoolsd.service
114 +++ b/app-emulation/open-vm-tools/files/vmtoolsd.service
115 @@ -1,6 +1,6 @@
116 [Unit]
117 Description=Service for virtual machines hosted on VMware
118 -Documentation=http://open-vm-tools.sourceforge.net/about.php
119 +Documentation=https://github.com/vmware/open-vm-tools
120 ConditionVirtualization=vmware
121
122 [Service]
123
124 diff --git a/app-emulation/open-vm-tools/files/vmtoolsd.service b/app-emulation/open-vm-tools/files/vmtoolsd.vgauth.service
125 similarity index 60%
126 copy from app-emulation/open-vm-tools/files/vmtoolsd.service
127 copy to app-emulation/open-vm-tools/files/vmtoolsd.vgauth.service
128 index 426d4fbd993..1cb6e00ecf5 100644
129 --- a/app-emulation/open-vm-tools/files/vmtoolsd.service
130 +++ b/app-emulation/open-vm-tools/files/vmtoolsd.vgauth.service
131 @@ -1,7 +1,9 @@
132 [Unit]
133 Description=Service for virtual machines hosted on VMware
134 -Documentation=http://open-vm-tools.sourceforge.net/about.php
135 +Documentation=https://github.com/vmware/open-vm-tools
136 ConditionVirtualization=vmware
137 +Requires=vgauthd.service
138 +After=vgauthd.service
139
140 [Service]
141 ExecStart=/usr/bin/vmtoolsd
142 @@ -9,3 +11,4 @@ TimeoutStopSec=5
143
144 [Install]
145 WantedBy=multi-user.target
146 +Also=vgauthd.service
147
148 diff --git a/app-emulation/open-vm-tools/metadata.xml b/app-emulation/open-vm-tools/metadata.xml
149 index 53c18420cae..e493eb3e04b 100644
150 --- a/app-emulation/open-vm-tools/metadata.xml
151 +++ b/app-emulation/open-vm-tools/metadata.xml
152 @@ -16,13 +16,23 @@
153 of virtual machines.
154 </longdescription>
155 <use>
156 + <flag name="caf">Build Common Agent Framework</flag>
157 + <flag name="deploypkg">Build deploypkg plugin</flag>
158 + <flag name="dnet">Enable support for nicinfo</flag>
159 <flag name="doc">Generate API documentation</flag>
160 - <flag name="grabbitmqproxy">Enable grabbitmqproxy</flag>
161 + <flag name="fuse">Enable vmblock-fuse/vmhgfs-fuse</flag>
162 + <flag name="grabbitmqproxy">Build grabbitmqproxy plugin</flag>
163 + <flag name="gtk2">Compile with GTK+ 2</flag>
164 + <flag name="gtk3">Compile with GTK+ 3 (Recommended)</flag>
165 + <flag name="gtkmm">Compile with Gtkmm and sigc++ (Recommended)</flag>
166 + <flag name="multimon">Enable multimon (Requires X)</flag>
167 <flag name="pic">Force shared libraries to be built as PIC</flag>
168 - <flag name="vgauth">Enable vgauth</flag>
169 + <flag name="resolutionkms">Build the linux/unix resolutionkms module</flag>
170 + <flag name="vgauth">Build vgauth</flag>
171 + <flag name="xml-security-c">Build vgauth with xml-security-c instead of xmlsec1</flag>
172 + <flag name="xmlsec">Build vgauth with xmlsec1 instead of xml-security-c</flag>
173 </use>
174 <upstream>
175 <remote-id type="github">vmware/open-vm-tools</remote-id>
176 - <remote-id type="sourceforge">open-vm-tools</remote-id>
177 </upstream>
178 </pkgmetadata>
179
180 diff --git a/app-emulation/open-vm-tools/open-vm-tools-10.2.5.ebuild b/app-emulation/open-vm-tools/open-vm-tools-10.2.5.ebuild
181 new file mode 100644
182 index 00000000000..9efaa12f538
183 --- /dev/null
184 +++ b/app-emulation/open-vm-tools/open-vm-tools-10.2.5.ebuild
185 @@ -0,0 +1,172 @@
186 +# Copyright 1999-2018 Gentoo Foundation
187 +# Distributed under the terms of the GNU General Public License v2
188 +
189 +EAPI=6
190 +
191 +inherit autotools flag-o-matic linux-info pam systemd toolchain-funcs user
192 +
193 +DESCRIPTION="Opensourced tools for VMware guests"
194 +HOMEPAGE="https://github.com/vmware/open-vm-tools"
195 +MY_P="${P}-8068406"
196 +SRC_URI="https://github.com/vmware/open-vm-tools/releases/download/stable-${PV}/${MY_P}.tar.gz"
197 +
198 +LICENSE="LGPL-2.1"
199 +SLOT="0"
200 +KEYWORDS="~amd64 ~x86"
201 +IUSE="X caf +deploypkg +dnet doc +fuse +grabbitmqproxy gtk2 gtk3 gtkmm +icu multimon pam +resolutionkms +ssl static-libs test +vgauth +xml-security-c xmlsec"
202 +REQUIRED_USE="
203 + X? ( ^^ ( gtk2 gtk3 ) )
204 + gtk2? ( X )
205 + gtk3? ( X )
206 + gtkmm? ( || ( gtk2 gtk3 ) )
207 + multimon? ( X )
208 + vgauth? (
209 + ^^ ( xmlsec xml-security-c )
210 + ssl
211 + )
212 + caf? ( vgauth ssl )
213 + grabbitmqproxy? ( ssl )
214 +"
215 +
216 +RDEPEND="
217 + dev-libs/glib
218 + net-libs/libtirpc
219 + deploypkg? ( dev-libs/libmspack )
220 + fuse? ( sys-fs/fuse:0 )
221 + pam? ( virtual/pam )
222 + ssl? ( dev-libs/openssl:0 )
223 + vgauth? (
224 + xml-security-c? ( dev-libs/xerces-c dev-libs/xml-security-c )
225 + xmlsec? ( dev-libs/libxml2 dev-libs/xmlsec )
226 + )
227 + X? (
228 + x11-libs/libXext
229 + multimon? ( x11-libs/libXinerama )
230 + x11-libs/libXi
231 + x11-libs/libXrender
232 + x11-libs/libXrandr
233 + x11-libs/libXtst
234 + x11-libs/libSM
235 + x11-libs/libXcomposite
236 + x11-libs/gdk-pixbuf:2
237 + gtk3? (
238 + x11-libs/gtk+:3
239 + gtkmm? ( dev-cpp/gtkmm:3.0 )
240 + )
241 + gtk2? (
242 + x11-libs/gtk+:2
243 + gtkmm? ( dev-cpp/gtkmm:2.4 )
244 + )
245 + gtkmm? ( dev-libs/libsigc++:2 )
246 + )
247 + dnet? ( dev-libs/libdnet )
248 + icu? ( dev-libs/icu:= )
249 + caf? (
250 + dev-libs/log4cpp
251 + net-libs/rabbitmq-c
252 + )
253 + resolutionkms? (
254 + x11-libs/libdrm
255 + virtual/libudev
256 + )
257 +"
258 +
259 +DEPEND="${RDEPEND}
260 + virtual/pkgconfig
261 + net-libs/rpcsvc-proto
262 + doc? ( app-doc/doxygen )
263 + test? ( dev-util/cunit )
264 +"
265 +
266 +S="${WORKDIR}/${MY_P}"
267 +
268 +PATCHES=(
269 + "${FILESDIR}/10.1.0-mount.vmhgfs.patch"
270 + "${FILESDIR}/10.2.5-libtirpc.patch"
271 +)
272 +
273 +pkg_setup() {
274 + local CONFIG_CHECK="~VMWARE_BALLOON ~VMWARE_PVSCSI ~VMXNET3"
275 + use X && CONFIG_CHECK+=" ~DRM_VMWGFX"
276 + kernel_is -lt 3 9 || CONFIG_CHECK+=" ~VMWARE_VMCI ~VMWARE_VMCI_VSOCKETS"
277 + kernel_is -lt 3 || CONFIG_CHECK+=" ~FUSE_FS"
278 + linux-info_pkg_setup
279 +}
280 +
281 +src_prepare() {
282 + eapply -p2 "${PATCHES[@]}"
283 + eapply_user
284 + eautoreconf
285 +}
286 +
287 +src_configure() {
288 + # On >=sys-libs/glibc-2.26, SunRPC no longer provided
289 + # Use libtirpc and rpcsvc-proto instead
290 + append-cppflags "$($(tc-getPKG_CONFIG) --cflags libtirpc)"
291 + export LIBVMTOOLS_LIBADD="$($(tc-getPKG_CONFIG) --libs libtirpc)"
292 + local myeconfargs=(
293 + --without-root-privileges
294 + $(use_enable multimon)
295 + $(use_with X x)
296 + $(use_with gtk3)
297 + $(use_with gtk2)
298 + $(use gtk3 && use_with gtkmm gtkmm3)
299 + $(use gtk2 && use_with gtkmm)
300 + $(use_enable doc docs)
301 + $(use_enable test tests)
302 + $(use_enable resolutionkms)
303 + $(use_enable static-libs static)
304 + $(use_enable deploypkg)
305 + $(use_enable grabbitmqproxy)
306 + $(use_with pam)
307 + $(use_enable vgauth)
308 + $(use vgauth && use_enable xmlsec xmlsec1)
309 + $(use vgauth && use_enable xml-security-c xmlsecurity)
310 + $(use_enable caf)
311 + $(use_with dnet)
312 + $(use_with icu)
313 + )
314 + # Avoid a bug in configure.ac
315 + use ssl || myeconfargs+=( --without-ssl )
316 +
317 + econf "${myeconfargs[@]}"
318 +}
319 +
320 +src_install() {
321 + default
322 + find "${D}" -name '*.la' -delete || die
323 +
324 + if use pam; then
325 + rm "${ED%/}"/etc/pam.d/vmtoolsd || die
326 + pamd_mimic_system vmtoolsd auth account
327 + fi
328 +
329 + newinitd "${FILESDIR}/open-vm-tools.initd" vmware-tools
330 + newconfd "${FILESDIR}/open-vm-tools.confd" vmware-tools
331 +
332 + if use vgauth; then
333 + systemd_newunit "${FILESDIR}"/vmtoolsd.vgauth.service vmtoolsd.service
334 + systemd_dounit "${FILESDIR}"/vgauthd.service
335 + else
336 + systemd_dounit "${FILESDIR}"/vmtoolsd.service
337 + fi
338 +
339 + # Replace mount.vmhgfs with a wrapper
340 + mv "${ED%/}"/usr/sbin/{mount.vmhgfs,hgfsmounter} || die
341 + dosbin "${FILESDIR}/mount.vmhgfs"
342 +
343 + # Make fstype = vmhgfs-fuse work in fstab
344 + dosym vmhgfs-fuse /usr/bin/mount.vmhgfs-fuse
345 +
346 + if use X; then
347 + fperms 4711 /usr/bin/vmware-user-suid-wrapper
348 + dobin scripts/common/vmware-xdg-detect-de
349 +
350 + elog "To be able to use the drag'n'drop feature of VMware for file"
351 + elog "exchange, please add the users to the 'vmware' group."
352 + fi
353 +}
354 +
355 +pkg_postinst() {
356 + enewgroup vmware
357 +}