summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhagbard <vysodev@derith.de>2018-11-08 15:04:04 -0800
committerhagbard <vysodev@derith.de>2018-11-08 15:04:04 -0800
commit861af3ec31d17d4c2744762987ddc2e067ba001b (patch)
tree5bc3fd1359e8ea6ca75ae2accc5dc57de312b116
parent1ea5634256b9a30dde3f86bfce08e4269899b884 (diff)
downloadvyos-xe-guest-utilities-861af3ec31d17d4c2744762987ddc2e067ba001b.tar.gz
vyos-xe-guest-utilities-861af3ec31d17d4c2744762987ddc2e067ba001b.zip
T957: Add xenserver tools
-rw-r--r--debian/changelog5
-rw-r--r--debian/compat1
-rw-r--r--debian/control17
-rw-r--r--debian/copyright49
-rw-r--r--debian/install4
-rw-r--r--debian/proc-xen.mount13
-rwxr-xr-xdebian/rules11
-rw-r--r--debian/source/format1
-rw-r--r--debian/xe-guest-utilities.xe-daemon.service16
-rw-r--r--debian/z10_xen-vcpu-hotplug.rules8
10 files changed, 125 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..c7bad49
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+vyos-xe-guest-utilities (1.0.0-1) unstable; urgency=medium
+
+ * initial release
+
+ -- hagbard <vyosdev@derith.de> Thu, 08 Nov 2018 14:33:06 -0800
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..f599e28
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+10
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..21dd7ae
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,17 @@
+Source: vyos-xe-guest-utilities
+Section: admin
+Priority: optional
+Maintainer: hagbard <vyosdev@derith.de>
+Homepage: https://github.com/xenserver
+Standards-Version: 4.1.4
+Build-Depends: debhelper (>= 9), dh-systemd, gawk, golang
+Vcs-Git: https://github.com/xenserver/xe-guest-utilities
+
+Package: vyos-xe-guest-utilities
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: daemon for monitoring Xen Virtual machines
+ xe-daemon for monitoring Virtual Machines on a Xen Hypervisor.
+ .
+ Writes distribution version information, disk and networking
+ statistics to XenStore.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..c29a9b3
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,49 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: xe-guest-utilties
+Upstream-Contact: Citrix
+Source: https://github.com/xenserver/xe-guest-utilities
+
+Files: *
+Copyright: 2015 Citrix Systems, Inc., <www.citix.com>
+License: BSD-2-Clause
+ Redistribution and use in source and binary forms, with or without modification,
+ are permitted provided that the following conditions are met:
+ .
+ 1. Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+ .
+ 2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation and/or
+ other materials provided with the distribution.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+
+Files: debian/*
+Copyright: Copyright (C) 2018 VyOS maintainers and contributors
+License: GPL-2
+
+License: GPL-2.0+
+ This package is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+ .
+ This package is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>
+ .
+ On Debian systems, the complete text of the GNU General
+Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
diff --git a/debian/install b/debian/install
new file mode 100644
index 0000000..b0527a5
--- /dev/null
+++ b/debian/install
@@ -0,0 +1,4 @@
+debian/proc-xen.mount lib/systemd/system
+debian/z10_xen-vcpu-hotplug.rules lib/udev/rules.d
+build/stage/usr/sbin/xe-linux-distribution usr/sbin
+build/stage/usr/sbin/xe-daemon usr/sbin
diff --git a/debian/proc-xen.mount b/debian/proc-xen.mount
new file mode 100644
index 0000000..6b248c0
--- /dev/null
+++ b/debian/proc-xen.mount
@@ -0,0 +1,13 @@
+[Unit]
+Description = Xen ProcFS
+Before=xe-daemon.service
+DefaultDependencies=no
+ConditionVirtualization=xen
+
+[Mount]
+What = none
+Where = /proc/xen
+Type = xenfs
+
+[Install]
+WantedBy=local-fs.target
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..0524c00
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,11 @@
+#!/usr/bin/make -f
+
+%:
+ dh $@ --with systemd
+
+override_dh_installinit:
+ dh_installinit --no-restart-on-upgrade --name xe-daemon
+ dh_installinit --no-restart-on-upgrade --name xe-cloud
+
+override_dh_systemd_enable:
+ dh_systemd_enable --name xe-daemon xe-daemon.service
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/xe-guest-utilities.xe-daemon.service b/debian/xe-guest-utilities.xe-daemon.service
new file mode 100644
index 0000000..8fd501a
--- /dev/null
+++ b/debian/xe-guest-utilities.xe-daemon.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=Xen Guest Monitoring Agent
+DefaultDependencies=no
+After=local-fs.target
+Requires=proc-xen.mount
+Before=network.target cloud-init.service cloud-init-local.service
+ConditionVirtualization=xen
+ConditionPathExists=/proc/xen/capabilities
+
+[Service]
+ExecStartPre=/usr/sbin/xe-linux-distribution /var/cache/xe-linux-distribution
+ExecStart=/usr/sbin/xe-daemon
+StandardOutput=journal+console
+
+[Install]
+WantedBy=multi-user.target
diff --git a/debian/z10_xen-vcpu-hotplug.rules b/debian/z10_xen-vcpu-hotplug.rules
new file mode 100644
index 0000000..bfb0875
--- /dev/null
+++ b/debian/z10_xen-vcpu-hotplug.rules
@@ -0,0 +1,8 @@
+# Hotplug CPU support
+ATTR{[dmi/id]sys_vendor}!="Xen", GOTO="xen_hotadd_end"
+
+# CPU hotadd request
+SUBSYSTEM=="cpu", ACTION=="add", DEVPATH=="/devices/system/cpu/cpu[0-9]*", TEST=="online", ATTR{online}="1"
+
+LABEL="xen_hotadd_end"
+