[Lunar-commits] <moonbase-other> libvirt: Initial import

Stefan Wold ratler at lunar-linux.org
Sat Feb 2 17:13:46 CET 2013


commit 7d8a4534d27e1eb7124f288a2336a9729e308cd5
Author: Stefan Wold <ratler at lunar-linux.org>
Date: Sat, 02 Feb 2013 08:13:46 -0800
URL: https://github.com/lunar-linux/moonbase-other/commit/7d8a4534d27e1eb7124f288a2336a9729e308cd5

libvirt: Initial import

An virtualization API and tools for KVM, QEMU etc etc
---
  virtual/libvirt/BUILD                            | +12/-0    
  virtual/libvirt/DEPENDS                          | +22/-0    
  virtual/libvirt/DETAILS                          | +14/-0    
  virtual/libvirt/systemd.d/libvirt-guests.service | +15/-0    
  virtual/libvirt/systemd.d/libvirtd.service       | +20/-0    
  virtual/libvirt/systemd.d/virtlockd.service      | +12/-0    
  virtual/libvirt/systemd.d/virtlockd.socket       | +8/-0     
  virtual/libvirt/tmpfiles.d/libvirt.conf          | +6/-0     
  8 files changed, 109 insertions(+)

--- /dev/null
+++ b/virtual/libvirt/BUILD
@@ -0,0 +1,12 @@
+
+OPTS+=" --without-xen \
+        --with-udev \
+        --without-hal \
+        --disable-static \
+        --without-netcf \
+        --with-interface \
+        --with-network \
+        --with-secrets \
+        --with-init-script=none"
+
+default_build
--- /dev/null
+++ b/virtual/libvirt/DEPENDS
@@ -0,0 +1,22 @@
+depends iproute2
+depends iptables
+depends libxml2
+depends libnl
+depends Python
+depends openssl
+depends bridge-utils
+depends logrotate
+
+optional_depends avahi "--with-avahi" "--without-avahi" "for avahi support"
+optional_depends gnutls "--with-gnutls" "--without-gnutls" "for GNUTLS encryption support" 
+optional_depends attr "--with-attr" "--without-attr" "for extended fs attributes support" 
+optional_depends qemu "--with-qemu --with-qemu-user=nobody --with-qemu-group=nogroup" \
+                      "--without-qemu" \
+                      "for QEMU support"
+optional_depends lvm2 "--with-storage-lvm" "--without-storage-lvm" "for LVM storage support"
+optional_depends dbus "--with-dbus" "--without-dbus" "for DBUS support"
+optional_depends curl "--with-curl" "--without-curl" "for CURL support"
+optional_depends libpciaccess "--with-pciaccess" "--without-pciaccess" "for pciaccess support"
+optional_depends fuse "--with-fuse" "--without-fuse" "for FUSE support"
+optional_depends cyrus-sasl "--with-sasl" "--without-sasl" "for SASL support"
+
--- /dev/null
+++ b/virtual/libvirt/DETAILS
@@ -0,0 +1,14 @@
+          MODULE=libvirt
+         VERSION=1.0.2
+          SOURCE=${MODULE}-${VERSION}.tar.gz
+      SOURCE_URL=http://libvirt.org/sources
+SOURCE_DIRECTORY=$BUILD_DIRECTORY/$MODULE-$VERSION
+      SOURCE_VFY=sha256:9b8c2752f78658b65ef1c608b3775be0978d60855a9b5e2778f79c113201c179
+        WEB_SITE="http://libvirt.org/"
+         ENTERED=20130202
+         UPDATED=20130202
+           SHORT="API for controlling virtualization engines"
+cat <<EOF
+API for controlling virtualization engines
+(openvz,kvm,qemu,virtualbox,xen,etc).
+EOF
--- /dev/null
+++ b/virtual/libvirt/systemd.d/libvirt-guests.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Suspend Active Libvirt Guests
+After=syslog.target network.target libvirtd.service
+
+[Service]
+# Hack just call traditional service until we factor
+# out the code
+ExecStart=/usr/libexec/libvirt-guests.sh start
+ExecStop=/usr/libexec/libvirt-guests.sh stop
+Type=oneshot
+RemainAfterExit=yes
+StandardOutput=journal+console
+
+[Install]
+WantedBy=multi-user.target
--- /dev/null
+++ b/virtual/libvirt/systemd.d/libvirtd.service
@@ -0,0 +1,20 @@
+# NB we don't use socket activation. When libvirtd starts it will
+# spawn any virtual machines registered for autostart. We want this
+# to occur on every boot, regardless of whether any client connects
+# to a socket. Thus socket activation doesn't have any benefit
+
+[Unit]
+Description=Virtualization daemon
+Before=libvirt-guests.service
+After=network.target
+After=dbus.service
+
+[Service]
+ExecStart=/usr/sbin/libvirtd
+ExecReload=/bin/kill -HUP $MAINPID
+KillMode=process
+# Override the maximum number of opened files
+#LimitNOFILE=2048
+
+[Install]
+WantedBy=multi-user.target
--- /dev/null
+++ b/virtual/libvirt/systemd.d/virtlockd.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Virtual machine lock manager
+Requires=virtlockd.socket
+After=syslog.target
+
+[Service]
+ExecStart=/usr/sbin/virtlockd
+ExecReload=/bin/kill -HUP $MAINPID
+# Loosing the locks is a really bad thing that will
+# cause the machine to be fenced (rebooted), so make
+# sure we discourage OOM killer
+OOMScoreAdjust=-900
--- /dev/null
+++ b/virtual/libvirt/systemd.d/virtlockd.socket
@@ -0,0 +1,8 @@
+[Unit]
+Description=Virtual machine lock manager socket
+
+[Socket]
+ListenStream=/run/libvirt/virtlockd/virtlockd.sock
+
+[Install]
+WantedBy=multi-user.target
--- /dev/null
+++ b/virtual/libvirt/tmpfiles.d/libvirt.conf
@@ -0,0 +1,6 @@
+d /run/libvirt/qemu 0755 root root -
+d /run/libvirt/lxc 0755 root root -
+d /run/libvirt/uml 0755 root root -
+d /run/libvirt/network 0755 root root -
+d /run/libvirt/lockd 0755 root root -
+d /run/libvirt/virtlockd 0755 root root -




More information about the Lunar-commits mailing list