forked from xvpsource/xvp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
xvp.spec
510 lines (443 loc) · 22 KB
/
xvp.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
Summary: A VNC Console Proxy Server and Client for Citrix(R) XenServer
Name: xvp
Version: 1.16.0
Release: 1%{?dist}
License: GPL
Vendor: Colin Dean
Packager: Colin Dean <colin@xvpsource.org>
Group: System Environment/Libraries
URL: http://www.xvpsource.org/
Source: http://www.xvpsource.org/xvp-%{version}.tar.gz
%if 0%{?suse_version}
%define suse 1
%define xvpwebdir /srv/www/htdocs/xvpweb
%else
%define suse 0
%define xvpwebdir /var/www/html/xvpweb
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: libxml2-devel curl-devel
BuildRequires: libxenserver-devel >= 6.2.0
BuildRequires: java-devel
Requires: libxml2 curl
Requires: libxenserver >= 6.2.0
Provides: xvp = %{version}-%{release}
Obsoletes: xvp < %{version}-%{release}
%description
xvp (standing for Xen VNC Proxy) is a proxy server providing
password-protected VNC-based access to the consoles of virtual machines
hosted on Citrix XenServer.
Relying on a simple configuration file, it listens on multiple ports,
one per virtual machine, and forwards VNC sessions to the appropriate
XenServer host(s). It uses a separate VNC password for each virtual
machine, as specified in encrypted form in the configuration file.
Standard VNC clients such as vncviewer(1) connect to the appropriate
port for the virtual machine they wish to access, and for each client a
separate xvp process is forked to authenticate the client, connect to
the appropriate XenServer host, and proxy the data traffic.
A Java-based VNC client, xvpviewer(1), is supplied with xvp. This is
based on the TightVNC viewer, but with xvp-specific extensions to allow
virtual machine shutdown, reboot and reset to be initiated from the
viewer.
Also supplied is a web-based front end, providing convenient access to
all of the features of xvp and xvpviewer, with facilities for
restricting which users can manage particular virtual machines or groups
of virtual machines.
%package -n xvpviewer
Summary: A viewer for use with the xvp Xen VNC Proxy server
Group: User Interface/Desktops
Provides: xvpviewer = %{version}-%{release}
Obsoletes: xvpviewer < %{version}-%{release}
%description -n xvpviewer
xvpviewer is a Java-based VNC client, based on the TightVNC viewer.
It has extensions for use with the xvp(8) Xen VNC Proxy server, to
allow virtual machine shutdown, reboot and reset to be initiated from
the viewer.
%package -n xvpweb
Summary: A web-based front end for the xvp(8) Xen VNC Proxy server
Group: User Interface/Desktops
Provides: xvpweb = %{version}-%{release}
Obsoletes: xvpweb < %{version}-%{release}
%if %suse
Requires: httpd php php-curl php-mcrypt php-pdo
%else
Requires: httpd mod_ssl php php-mcrypt php-pdo
%endif
%description -n xvpweb
xvpweb is a web-based front end for use with the xvp(8) Xen VNC Proxy
server, written in PHP, providing convenient access to all of the
features of xvp(8) and xvpviewer(1), with facilities for restricting
which users can manage particular virtual machines or groups of virtual
machines.
%if %suse
%else
%package -n xvpappliance
Summary: Appliance scripts for the xvp(8) Xen VNC Proxy server
Group: User Interface/Desktops
Provides: xvpappliance = %{version}-%{release}
Obsoletes: xvpappliance < %{version}-%{release}
Requires: xvp = %{version}-%{release}%{?xvpdist}
Requires: xvpweb = %{version}-%{release}
%endif
%if %suse
%else
%description -n xvpappliance
xvpappliance is a program to manage the xvp(8) Xen VNC Proxy server and
xvpweb(7) web-based front end as a self-contained appliance. It has a
simple menu-driven text-based interface.
%endif
%prep
%setup -q
%build
make
%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install
mkdir -p $RPM_BUILD_ROOT/etc/init.d
install -m 0755 xvp.rc $RPM_BUILD_ROOT/etc/init.d/xvp
mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d
install -m 0644 xvp.logrotate $RPM_BUILD_ROOT/etc/logrotate.d/xvp
mkdir -p $RPM_BUILD_ROOT%{xvpwebdir}
cp -R web/* $RPM_BUILD_ROOT%{xvpwebdir}/
rm $RPM_BUILD_ROOT%{xvpwebdir}/xvprights.default
%files -n xvp
%defattr(-,root,root)
%doc README LICENCE.TXT
%{_sbindir}/xvp
%{_sbindir}/xvpdiscover
%{_sbindir}/xvptag
%{_mandir}/man8/xvp.8.gz
%{_mandir}/man8/xvpdiscover.8.gz
%{_mandir}/man8/xvptag.8.gz
%{_mandir}/man5/xvp.conf.5.gz
%{_sysconfdir}/init.d/xvp
%{_sysconfdir}/logrotate.d/xvp
%files -n xvpviewer
%defattr(-,root,root)
%doc README README.tightvnc LICENCE.TXT
%{_bindir}/xvpviewer
%{_mandir}/man1/xvpviewer.1.gz
%{_datadir}/xvp/VncViewer.jar
%{_datadir}/xvp/xvpviewer.bat
%files -n xvpweb
%defattr(-,root,root)
%doc README README.tightvnc LICENCE.TXT
%{_mandir}/man5/xvpusers.conf.5.gz
%{_mandir}/man5/xvprights.conf.5.gz
%{_mandir}/man7/xvpweb.7.gz
%{xvpwebdir}/*
%{_datadir}/xvp/xvprights.default
%if %suse
%else
%files -n xvpappliance
%defattr(-,root,root)
%doc README LICENCE.TXT
%{_sbindir}/xvpappliance
%{_mandir}/man8/xvpappliance.8.gz
%{_datadir}/xvp/*.menu
%endif
%clean
rm -rf $RPM_BUILD_ROOT
%post
if [ "$1" = 1 ] ; then
/sbin/chkconfig --add xvp >/dev/null 2>&1
fi
%preun
if [ "$1" = 0 ] ; then
/sbin/service xvp stop >/dev/null 2>&1
/sbin/chkconfig --del xvp >/dev/null 2>&1
fi
%postun
if [ "$1" -ge 1 ]; then
/sbin/service xvp condrestart >/dev/null 2>&1
fi
%if %suse
%else
%post -n xvpappliance
/usr/sbin/xvpappliance --install "%{version}-%{release}"
%endif
%if %suse
%else
%preun -n xvpappliance
if [ "$1" = 0 ] ; then
/usr/sbin/xvpappliance --uninstall
fi
%endif
%changelog
* Sun Nov 10 2013 Colin Dean <colin@xvpsource.org> 1.16.0-1
- Single sign-on fix for clients requesting "VncViewer.jar.pack.gz"
- Appliance now includes logrotate package (missing in 1.15.0-1)
- Brackets and commas in pool name now don't disable context menus
- The xvp daemon and related utilities are now built against version
6.2.0 of Citrix's libxenserver, instead of version 6.1.0.
* Sun Nov 4 2012 Colin Dean <colin@xvpsource.org> 1.15.0-1
- Added VM snapshot management facilities to xvpweb.
- Fixed problem resulting from incompatible change in XCP 1.6 which
prevented xvpweb from ever updating its status display.
- The web console.php script now uses REQUEST instead of POST, for
easier integration with scripts other than xvpweb.
- The xvp daemon and related utilities are now built against version
6.1.0 of Citrix's libxenserver, instead of version 6.0.0.
* Wed Aug 15 2012 Colin Dean <colin@xvpsource.org> 1.14.0-1
- Incorporated European keyboard fixes (as discussed on mailing list
in March) into console viewer.
- Fixed bug where properties page in xvpweb would display HA
Priority as "do not restart" instead of "protected" with recent
versions of XenServer.
- Fixed timezone-related bug in xvpweb that could display negative
uptimes for VMs. Also the "Last updated" time shown by xvpweb is now
shown in the client's timezone, not the appliance's.
- The xvp daemon and related utilities are now built against version
6.0.0 of Citrix's libxenserver, instead of version 5.6.100.
* Sat Mar 10 2012 Colin Dean <colin@xvpsource.org> 1.13.1-1
- Fixed bug in 1.13.0 that Ctrl-Alt-Del no longer worked.
* Fri Mar 9 2012 Colin Dean <colin@xvpsource.org> 1.13.0-1
- Appliance now provides single sign-on: starting the Java console
viewer no longer requires username and password to be re-entered.
- The Java viewer's clipboard window now has a Send button, to send
its contents to the VM, and the xvp proxy now converts client cut
text messages into a sequence of key event messages.
- Fixed bug causing viewer disconnection if key or mouse events were
input rapidly.
- Alt-Gr keys on European keyboards now work, at least for Linux VMs.
- Appliance built on CentOS 5.8 release instead of 5.7.
* Wed Feb 22 2012 Colin Dean <colin@xvpsource.org> 1.12.2-1
- Updated xvp proxy to handle fragmented data sent by Java 7 over SSL.
* Tue Jan 31 2012 Colin Dean <colin@xvpsource.org> 1.12.1-1
- Migrating a VM between hosts that have different CPU stepping is now
- forced where possible.
- The VM Properties window in xvpweb now displays the memory used by
- small VMs in MB instead of GB, to match the main page.
- The performance improvements introduced in 1.12.0 have been withdrawn,
- as they caused unresolved problems on some sites. The improvements
- are still available as an experimental unsupported option, available
- by replacing the update.php script by update-bulk.php.
* Thu Dec 29 2011 Colin Dean <colin@xvpsource.org> 1.12.0-1
- Performance scalability improvements to xvpweb.
- Images in ISO libraries are now sorted by name in xvpweb.
* Tue Oct 4 2011 Colin Dean <colin@xvpsource.org> 1.11.0-1
- Confirmation alerts in xvpweb now display name of VM.
- Icon for creating Home Screen links on iOS now included in xvpweb.
- Appliance built on current CentOS 5.7 release instead of 5.6.
* Thu Jul 28 2011 Colin Dean <colin@xvpsource.org> 1.10.0-1
- Added support (minus consoles) for Apple iOS Mobile Safari browser.
* Wed Jul 6 2011 Colin Dean <colin@xvpsource.org> 1.9.3-1
- Bug fix: xvp always denies console access to VM if VM's VNC password
- in config file begins with "00".
* Sun Apr 24 2011 Colin Dean <colin@xvpsource.org> 1.9.2-1
- Bug fix contributed by Dmitry Ketov: previously, in console viewer,
- random scrolling could occur on pointer move after wheel scrolling.
- Bundled jQuery library upgraded from 1.4.3 to 1.5.2, which officially
- supports Internet Explorer 9.
- Appliance built on current CentOS 5.6 release instead of 5.5.
* Thu Mar 31 2011 Colin Dean <colin@xvpsource.org> 1.9.1-1
- Bug fix: Previously, granting rights at individual VM level in some cases
- didn't allow all expected operations to be performed in xvpweb.
- Added recognition of Gentoo Linux to xvpweb.
- Properties window in xvpweb now displays Xen Tools information for running
- virtual machines.
- Added Fn key support to xvpviewer, contributed by Dmitry Ketov.
* Tue Jan 11 2011 Colin Dean <colin@xvpsource.org> 1.9.0-1
- The relationship in xvpweb between rights (read, control, etc) and specific
- operations (boot, shutdown, open console, etc) can now be customised by
- creating a file /etc/xvprights.conf.
- In xvpweb, for any VM where some context menu items are enabled but not
- boot or console operations, a blue icon with an "i" is displayed, with a
- "right click for menu" balloon when hovered over, instead of no icon.
- In xvpweb, if the name of a VM cannot be determined, it is now displayed
- as "Unknown" instead of displaying a 36-character UUID.
- A "Boot Recovery" option has been added to the context menu in xvpweb, to
- boot the VM in recovery mode (similar to the recovery mode facility in the
- "Boot on ..." option, but without the ability to select the server host).
- By default, "Boot Recovery" requires "all" rights.
- Bug fix: Previously, saying no to tunelling during initial configuration
- of xvpappliance caused console connections to fail with "Network Error"
- message until "Configure web server" option was run again.
- Bug fix: Previously, pools with empty name labels broke rediscovery in
- xvpappliance, now name of master host is used as pool name in this case.
- When selecting access rights for a user in the xvpappliance configuration
- program, there is now a "Cancel" option.
- Appliance configuration program modified so as to work on systems with
- Bash 4 installed, and on systems where "hostname" command without "-s"
- or "-f" displays short name.
- Makefile for xvp executable modified to explicitly link curl and crypto
- libraries, so "make" doesn't fail on recent Linux distributions.
* Wed Dec 29 2010 Colin Dean <colin@xvpsource.org> 1.8.1-1
- Bug fix: OS version strings containing top bit set characters for some
- Windows VMs could cause browsers to fail to display xvpweb, with messages
- including "Error: Problem handing response: timestamp is undefined".
* Tue Dec 28 2010 Colin Dean <colin@xvpsource.org> 1.8.0-1
- In xvpweb, the "Boot on ..." dialog now has the option of booting the
- virtual machine in recovery mode (CD/DVD or network PXE boot).
- The Properties dialog in xvpweb now displays VM description.
- New yellow "in progress" icon displays in xvpweb while VM is being
- boooted, shutdown, migrated, etc.
- Pool, host, group and VM names, and VM descriptions may now contain any
- Latin, Greek or Cyrillic characters - using UTF-8 encoding.
- Added support for non ISO Latin-1 Unicode characters to xvpviewer (but
- note that XenServer does not as yet support these).
- Built using latest libxenserver library from XenServer 5.6 FP1.
- Appliance disk partitions now aligned by kickstart on 64KB boundaries,
- to avoid misaligned I/O on some NAS/SAN storage systems.
* Fri Nov 5 2010 Colin Dean <colin@xvpsource.org> 1.7.1-1
- Fixed "Unexpected action: xvpappliance" button click error in xvpweb.
- Upgraded bundled jQuery in xvpweb from 1.4.2 to 1.4.3.
- Renamed popup.php in xvpweb to opener.php, to bypass some over-keen
- proxy URL filters (e.g. privoxy).