diff options
Diffstat (limited to 'community-testing/libvirt')
-rw-r--r-- | community-testing/libvirt/PKGBUILD | 99 | ||||
-rw-r--r-- | community-testing/libvirt/libvirt-libnl3.patch | 111 | ||||
-rw-r--r-- | community-testing/libvirt/libvirt.install | 38 | ||||
-rw-r--r-- | community-testing/libvirt/libvirt.tmpfiles.d | 4 | ||||
-rw-r--r-- | community-testing/libvirt/libvirtd-guests.conf.d | 11 | ||||
-rw-r--r-- | community-testing/libvirt/libvirtd-guests.rc.d | 137 | ||||
-rw-r--r-- | community-testing/libvirt/libvirtd.conf.d | 3 | ||||
-rw-r--r-- | community-testing/libvirt/libvirtd.rc.d | 66 | ||||
-rw-r--r-- | community-testing/libvirt/openbsd-netcat-default.patch | 36 |
9 files changed, 0 insertions, 505 deletions
diff --git a/community-testing/libvirt/PKGBUILD b/community-testing/libvirt/PKGBUILD deleted file mode 100644 index fd8b61ae9..000000000 --- a/community-testing/libvirt/PKGBUILD +++ /dev/null @@ -1,99 +0,0 @@ -# $Id: PKGBUILD 71546 2012-05-28 16:42:48Z spupykin $ -# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com> -# Contributor: Jonathan Wiersma <archaur at jonw dot org> - -pkgname=libvirt -pkgver=0.9.12 -pkgrel=8 -pkgdesc="API for controlling virtualization engines (openvz,kvm,qemu,virtualbox,xen,etc)" -arch=('i686' 'x86_64') -url="http://libvirt.org/" -license=('LGPL') -depends=('e2fsprogs' 'gnutls' 'iptables' 'libxml2' 'parted' 'polkit' 'python2' - 'avahi' 'yajl' 'libpciaccess' 'udev' 'dbus-core' 'libxau' 'libxdmcp' 'libpcap' - 'curl' 'libsasl' 'libgcrypt' 'libgpg-error' 'openssl' 'libxcb' 'gcc-libs' - 'iproute2' 'netcf' 'libnl') -makedepends=('pkgconfig' 'lvm2' 'linux-api-headers') -optdepends=('bridge-utils: for briged networking (default)' - 'dnsmasq: for NAT/DHCP for guests' - 'kvm' - 'openbsd-netcat: for remote management over ssh' - 'qemu' - 'radvd' - 'dmidecode') -options=('emptydirs' '!libtool') -backup=('etc/conf.d/libvirtd' - 'etc/conf.d/libvirtd-guests' - 'etc/libvirt/libvirtd.conf' - 'etc/libvirt/libvirt.conf' - 'etc/libvirt/qemu.conf' - 'etc/sasl2/libvirt.conf') -install="libvirt.install" -source=("http://libvirt.org/sources/$pkgname-$pkgver.tar.gz" - libvirtd.rc.d - libvirtd.conf.d - libvirtd-guests.rc.d - libvirtd-guests.conf.d - libvirt.tmpfiles.d - openbsd-netcat-default.patch - libvirt-libnl3.patch) -md5sums=('5e842bc55733ceba60c64767580ff3e4' - 'c43244c40a0437038c82089618e7beaa' - '3ed0e24f5b5e25bf553f5427d64915e6' - '8297b1be794a24cc77f66af9380ace59' - 'bc2971dacdbac967fc3474e50affc345' - '8d98e62915785686b0b6c8c070628392' - 'b0be50eb9dfe4d133decf23b60880f7d' - 'ba27fbcd989de8d84cfff98326f10c54') - -build() { - cd "$srcdir/$pkgname-$pkgver" - - # python2 fix - export PYTHON=`which python2` - for file in $(find . -name '*.py' -print); do - sed -i 's_#!.*/usr/bin/python_#!/usr/bin/python2_' $file - sed -i 's_#!.*/usr/bin/env.*python_#!/usr/bin/env python2_' $file - done - - [ $NOEXTRACT -eq 1 ] || patch -Np1 -i "$srcdir"/openbsd-netcat-default.patch - - patch -Np1 -i ${srcdir}/libvirt-libnl3.patch - aclocal - automake --add-missing || true - autoreconf - - export LDFLAGS=-lX11 - export RADVD=/usr/sbin/radvd - [ -f Makefile ] || ./configure --prefix=/usr --libexec=/usr/lib/"$pkgname" \ - --with-storage-lvm --without-xen --with-udev --without-hal --disable-static \ - --with-init-script=systemd - make -j1 -} - -package() { - cd "$srcdir/$pkgname-$pkgver" - - make DESTDIR="$pkgdir" install - - install -D -m755 "$srcdir"/libvirtd.rc.d "$pkgdir"/etc/rc.d/libvirtd - install -D -m644 "$srcdir"/libvirtd.conf.d "$pkgdir"/etc/conf.d/libvirtd - - install -D -m755 "$srcdir"/libvirtd-guests.rc.d "$pkgdir"/etc/rc.d/libvirtd-guests - install -D -m644 "$srcdir"/libvirtd-guests.conf.d "$pkgdir"/etc/conf.d/libvirtd-guests - - - install -dm0755 $pkgdir/usr/lib/sysctl.d - mv $pkgdir/etc/sysctl.d/libvirtd $pkgdir/usr/lib/sysctl.d/libvirtd - - # systemd stuff - install -D -m644 "$srcdir"/libvirt.tmpfiles.d "$pkgdir"/usr/lib/tmpfiles.d/libvirt.conf - mv $pkgdir/lib/* $pkgdir/usr/lib/ - - rm -rf \ - $pkgdir/var/run \ - $pkgdir/etc/rc.d/init.d \ - $pkgdir/etc/sysconfig \ - $pkgdir/lib \ - $pkgdir/etc/sysctl.d -} diff --git a/community-testing/libvirt/libvirt-libnl3.patch b/community-testing/libvirt/libvirt-libnl3.patch deleted file mode 100644 index 1e5f141b9..000000000 --- a/community-testing/libvirt/libvirt-libnl3.patch +++ /dev/null @@ -1,111 +0,0 @@ -diff -wbBur libvirt-0.9.12/configure.ac libvirt-0.9.12.my/configure.ac ---- libvirt-0.9.12/configure.ac 2012-05-14 06:15:40.000000000 +0400 -+++ libvirt-0.9.12.my/configure.ac 2012-05-17 13:18:22.000000000 +0400 -@@ -71,7 +71,7 @@ - LIBCURL_REQUIRED="7.18.0" - OPENWSMAN_REQUIRED="2.2.3" - LIBPCAP_REQUIRED="1.0.0" --LIBNL_REQUIRED="1.1" -+LIBNL_REQUIRED="3.2" - LIBSSH2_REQUIRED="1.0" - LIBBLKID_REQUIRED="2.17" - DBUS_REQUIRED="1.0.0" -@@ -2652,21 +2652,9 @@ - PKG_CHECK_MODULES([LIBNL], [libnl-3.0], [ - have_libnl=yes - AC_DEFINE([HAVE_LIBNL3], [1], [Use libnl-3.0]) -- AC_DEFINE([HAVE_LIBNL], [1], [whether the netlink library is available]) - PKG_CHECK_MODULES([LIBNL_ROUTE3], [libnl-route-3.0]) - LIBNL_CFLAGS="$LIBNL_CFLAGS $LIBNL_ROUTE3_CFLAGS" - LIBNL_LIBS="$LIBNL_LIBS $LIBNL_ROUTE3_LIBS" -- ], [PKG_CHECK_MODULES([LIBNL], [libnl-1 >= $LIBNL_REQUIRED], [ -- have_libnl=yes -- AC_DEFINE_UNQUOTED([HAVE_LIBNL], [1], -- [whether the netlink library is available]) -- AC_DEFINE_UNQUOTED([HAVE_LIBNL1], [1], -- [whether the netlink v1 library is available]) -- ], [ -- if test "$with_macvtap" = "yes"; then -- AC_MSG_ERROR([libnl-devel >= $LIBNL_REQUIRED is required for macvtap support]) -- fi -- ]) - ]) - fi - AM_CONDITIONAL([HAVE_LIBNL], [test "$have_libnl" = "yes"]) -diff -wbBur libvirt-0.9.12/daemon/Makefile.am libvirt-0.9.12.my/daemon/Makefile.am ---- libvirt-0.9.12/daemon/Makefile.am 2012-04-20 08:25:25.000000000 +0400 -+++ libvirt-0.9.12.my/daemon/Makefile.am 2012-05-17 13:18:22.000000000 +0400 -@@ -96,6 +96,7 @@ - $(LIBXML_CFLAGS) $(GNUTLS_CFLAGS) $(SASL_CFLAGS) \ - $(XDR_CFLAGS) $(POLKIT_CFLAGS) $(DBUS_CFLAGS) \ - $(WARN_CFLAGS) \ -+ $(LIBNL_CFLAGS) \ - $(COVERAGE_CFLAGS) \ - -DQEMUD_PID_FILE="\"$(QEMUD_PID_FILE)\"" \ - -DREMOTE_PID_FILE="\"$(REMOTE_PID_FILE)\"" -diff -wbBur libvirt-0.9.12/src/Makefile.am libvirt-0.9.12.my/src/Makefile.am ---- libvirt-0.9.12/src/Makefile.am 2012-05-05 16:53:48.000000000 +0400 -+++ libvirt-0.9.12.my/src/Makefile.am 2012-05-17 13:18:22.000000000 +0400 -@@ -16,6 +16,7 @@ - - AM_CFLAGS = $(DRIVER_MODULE_CFLAGS) \ - $(LIBXML_CFLAGS) \ -+ $(LIBNL_CFLAGS) \ - $(WARN_CFLAGS) \ - $(LOCK_CHECKING_CFLAGS) \ - $(WIN32_EXTRA_CFLAGS) \ -diff -wbBur libvirt-0.9.12/src/util/virnetdevmacvlan.c libvirt-0.9.12.my/src/util/virnetdevmacvlan.c ---- libvirt-0.9.12/src/util/virnetdevmacvlan.c 2012-05-09 05:21:54.000000000 +0400 -+++ libvirt-0.9.12.my/src/util/virnetdevmacvlan.c 2012-05-17 13:25:21.000000000 +0400 -@@ -27,6 +27,10 @@ - - #include <config.h> - -+#include <netlink/msg.h> -+#include <linux/rtnetlink.h> -+#include <linux/if_link.h> -+ - #include "virnetdevmacvlan.h" - #include "virmacaddr.h" - #include "util.h" -diff -wbBur libvirt-0.9.12/src/util/virnetdevvportprofile.c libvirt-0.9.12.my/src/util/virnetdevvportprofile.c ---- libvirt-0.9.12/src/util/virnetdevvportprofile.c 2012-05-09 05:21:54.000000000 +0400 -+++ libvirt-0.9.12.my/src/util/virnetdevvportprofile.c 2012-05-17 13:27:54.000000000 +0400 -@@ -22,6 +22,10 @@ - - #include <config.h> - -+#include <netlink/msg.h> -+#include <linux/rtnetlink.h> -+#include <linux/if_link.h> -+ - #include "virnetdevvportprofile.h" - #include "virterror_internal.h" - -diff -wbBur libvirt-0.9.12/src/util/virnetlink.c libvirt-0.9.12.my/src/util/virnetlink.c ---- libvirt-0.9.12/src/util/virnetlink.c 2012-05-09 16:41:41.000000000 +0400 -+++ libvirt-0.9.12.my/src/util/virnetlink.c 2012-05-17 13:38:08.000000000 +0400 -@@ -49,7 +49,7 @@ - - #define NETLINK_ACK_TIMEOUT_S 2 - --#if defined(__linux__) && defined(HAVE_LIBNL) -+#if defined(__linux__) && defined(HAVE_LIBNL3) - /* State for a single netlink event handle */ - struct virNetlinkEventHandle { - int watch; -diff -wbBur libvirt-0.9.12/src/util/virnetlink.h libvirt-0.9.12.my/src/util/virnetlink.h ---- libvirt-0.9.12/src/util/virnetlink.h 2012-05-09 05:21:54.000000000 +0400 -+++ libvirt-0.9.12.my/src/util/virnetlink.h 2012-05-17 13:27:37.000000000 +0400 -@@ -23,9 +23,10 @@ - # include "config.h" - # include "internal.h" - --# if defined(__linux__) && defined(HAVE_LIBNL) -+# if defined(__linux__) && defined(HAVE_LIBNL3) - - # include <netlink/msg.h> -+# include <stdint.h> - - # else - diff --git a/community-testing/libvirt/libvirt.install b/community-testing/libvirt/libvirt.install deleted file mode 100644 index 3881386d2..000000000 --- a/community-testing/libvirt/libvirt.install +++ /dev/null @@ -1,38 +0,0 @@ -_libvirt_setup() { - rm -f /usr/lib/python?.?/site-packages/libvirt.pyc - echo ">>> To use libvirt as a non-root user:" - echo ">>> Use polkit to grant access." - echo ">>> ...or change the access model in /etc/libvirt/libvirtd.conf." - echo ">>> (see unixperms.patch in PKGBUILD for help)" - echo "" -} - -post_install() { - _libvirt_setup || return 1 - echo ">>> Be sure to see optdepends as you may find some of them helpfull." - echo ">>> Especially: bridge-utils, dnsmasq, and hal." - echo "" - echo ">>> To start libvirtd run: '/etc/rc.d/libvirtd start' as root." - echo ">>> Add 'libvirtd' to daemons in /etc/rc.conf if you want it to load upon" - echo ">>> booting." - echo "" - /bin/true -} - -post_upgrade() { - _libvirt_setup || return 1 - echo ">>> To finish the upgrade, restart libvirtd by running the command:" - echo ">>> '/etc/rc.d/libvirtd restart' as root or rebooting." - echo ">>> You may also need to run 'rm -rf ~/.libvirt'" - echo "" - /bin/true -} - -post_remove() { - rm -f /usr/lib/python[0-9].[0-9]/site-packages/libvirt.pyc - echo ">>> You may wish to delete the group 'libvirt' if it still exists." - echo ">>> It can be removed by running 'groupdel libvirt' as root." - echo "" - depmod -a - /bin/true -} diff --git a/community-testing/libvirt/libvirt.tmpfiles.d b/community-testing/libvirt/libvirt.tmpfiles.d deleted file mode 100644 index 0cec93271..000000000 --- a/community-testing/libvirt/libvirt.tmpfiles.d +++ /dev/null @@ -1,4 +0,0 @@ -d /var/run/libvirt/qemu 0755 root root - -d /var/run/libvirt/lxc 0755 root root - -d /var/run/libvirt/uml 0755 root root - -d /var/run/libvirt/network 0755 root root - diff --git a/community-testing/libvirt/libvirtd-guests.conf.d b/community-testing/libvirt/libvirtd-guests.conf.d deleted file mode 100644 index 02a933715..000000000 --- a/community-testing/libvirt/libvirtd-guests.conf.d +++ /dev/null @@ -1,11 +0,0 @@ -LIBVIRTD_STOP_ACTION=suspend - -#LIBVIRTD_URI="-c qemu+ssh://user@host/system" -LIBVIRTD_URI="" - -#LIBVIRTD_BYPASS_CACHE="--bypass-cache" -LIBVIRTD_BYPASS_CACHE="" - -LIBVIRTD_START_DELAY=0 - -LIBVIRTD_SHUTDOWN_TIMEOUT=3 diff --git a/community-testing/libvirt/libvirtd-guests.rc.d b/community-testing/libvirt/libvirtd-guests.rc.d deleted file mode 100644 index 670b5431a..000000000 --- a/community-testing/libvirt/libvirtd-guests.rc.d +++ /dev/null @@ -1,137 +0,0 @@ -#!/bin/bash - -. /etc/conf.d/libvirtd-guests -. /etc/rc.conf -. /etc/rc.d/functions - -LIBVIRTD_LISTFILE="/var/state/libvirtd/vm-list" - -# get guest state by name -libvirt_get_guest_state() -{ - virsh $LIBVIRTD_URI dominfo "$1" | grep -E '^State:' | awk '{print $2}' -} - -# list IDs of running guests -libvirt_list() -{ - - list=$(virsh $LIBVIRTD_URI list) - - if [ $? -ne 0 ]; then - RETVAL=1 - return 1 - fi - - uuids= - for id in $(echo "$list" | awk 'NR > 2 {print $1}'); do - uuid=$(virsh $LIBVIRTD_UTI dominfo $id | awk '/^UUID:/{print $2}') - if [ -z "$uuid" ]; then - RETVAL=1 - return 1 - fi - uuids="$uuids $uuid" - done - - echo $uuids - -} - -libvirt_domname() -{ - uuid=$1 - name=$(virsh $LIBVIRTD_URI dominfo $uuid | awk 'NR == 2 {$1=""; print}') - - echo $name -} - -# suspend guest by name -libvirt_suspend() -{ - virsh $LIBVIRTD_URI $LIBVIRTD_BYPASS_CACHE managedsave "$1" >/dev/null - timeout=$LIBVIRTD_SHUTDOWN_TIMEOUT - while [ "$timeout" -gt 0 ]; do - sleep 1 - timeout=$((timeout - 1)) - state=`libvirt_get_guest_state "$1"` - [ "x$state" == "xshut" ] && return 0 - done - return 1 -} - -# shutdown guest by name -libvirt_shutdown() -{ - virsh $LIBVIRTD_URI shutdown "$1" >/dev/null - timeout=$LIBVIRTD_SHUTDOWN_TIMEOUT - while [ "$timeout" -gt 0 ]; do - sleep 1 - timeout=$((timeout - 1)) - state=`libvirt_get_guest_state "$1"` - [ "x$state" == "xshut" ] && return 0 - done - return 1 -} - -# start guest by name -libvirt_start() -{ - virsh $LIBVIRTD_URI $LIBVIRTD_BYPASS_CACHE start "$1" >/dev/null -} - -# stop all guests -libvirt_stop_all() -{ - mkdir -p `dirname $LIBVIRTD_LISTFILE` - echo -n >$LIBVIRTD_LISTFILE - - for i in `libvirt_list`; do - name=`libvirt_domname $i` - if [ "x$LIBVIRTD_STOP_ACTION" == "xsuspend" ]; then - stat_busy "Suspending libvirtd/$name guest" - libvirt_suspend "$i" - else - stat_busy "Shutting libvirtd/$i guest down" - libvirt_shutdown "$i" - fi - [ $? -eq 0 ] && stat_done || stat_fail - echo $i >>$LIBVIRTD_LISTFILE - done -} - -# start all guests -libvirt_start_all() -{ - if [ -f $LIBVIRTD_LISTFILE ]; then - for i in `cat $LIBVIRTD_LISTFILE`; do - name='libvirt_domname $i' - stat_busy "Starting/resuming libvirtd/$name guest" - libvirt_start "$i" - [ $? -eq 0 ] && { sleep $LIBVIRTD_START_DELAY; stat_done; } || stat_fail - done - fi - rm -f $LIBVIRTD_LISTFILE -} - -# main -LC_ALL=C -LANG=C -case "$1" in - start) - libvirt_start_all - add_daemon libvirtd-guests - ;; - stop) - libvirt_stop_all - rm_daemon libvirtd-guests - ;; - restart) - $0 stop - sleep 1 - $0 start - ;; - *) - echo $"Usage: $0 {start|stop|restart}" - ;; -esac -exit 0 diff --git a/community-testing/libvirt/libvirtd.conf.d b/community-testing/libvirt/libvirtd.conf.d deleted file mode 100644 index d4d25b47a..000000000 --- a/community-testing/libvirt/libvirtd.conf.d +++ /dev/null @@ -1,3 +0,0 @@ -LIBVIRTD_CONFIG="/etc/libvirt/libvirtd.conf" -LIBVIRTD_ARGS="-p /var/run/libvirtd.pid" -KRB5_KTNAME="/etc/libvirt/krb5.tab" diff --git a/community-testing/libvirt/libvirtd.rc.d b/community-testing/libvirt/libvirtd.rc.d deleted file mode 100644 index 193bffa9c..000000000 --- a/community-testing/libvirt/libvirtd.rc.d +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/bash - -. /etc/rc.conf -. /etc/conf.d/libvirtd -. /etc/rc.d/functions - -LIBVIRTD_CONFIG_ARGS= -if [ -n "$LIBVIRTD_CONFIG" ] -then - LIBVIRTD_CONFIG_ARGS="--config $LIBVIRTD_CONFIG" -fi - -PID=`pidof -o %PPID /usr/sbin/libvirtd` -case "$1" in - start) - stat_busy "Starting libvirtd" - export RADVD=/usr/sbin/radvd - for i in /var/run/libvirt/qemu /var/run/libvirt/lxc /var/run/libvirt/uml /var/run/libvirt/network; do - [ -d $i ] || mkdir -p $i - done - [ -z "$PID" ] && ( - mkdir -p /var/{cache,run}/libvirt - rm -rf /var/cache/libvirt/* - KRB5_KTNAME=$KRB5_KTNAME \ - /usr/sbin/libvirtd --daemon $LIBVIRTD_CONFIG_ARGS $LIBVIRTD_ARGS - ) - if [ $? -gt 0 ]; then - stat_fail - else - add_daemon libvirtd - stat_done - fi - ;; - stop) - stat_busy "Stopping libvirtd" - [ ! -z "$PID" ] && ( - kill $PID &> /dev/null - rm -rf /var/cache/libvirt/* - rm -f /var/run/libvirtd.pid - ) - if [ $? -gt 0 ]; then - stat_fail - else - rm_daemon libvirtd - stat_done - fi - ;; - restart) - $0 stop - sleep 1 - $0 start - ;; - reload) - stat_busy "Reloading libvirtd configuration" - [ ! -z "$PID" ] && kill -HUP $PID &> /dev/null - if [ $? -gt 0 ]; then - stat_fail - else - stat_done - fi - ;; - *) - echo $"Usage: $0 {start|stop|restart|reload}" - ;; -esac -exit 0 diff --git a/community-testing/libvirt/openbsd-netcat-default.patch b/community-testing/libvirt/openbsd-netcat-default.patch deleted file mode 100644 index a01b4f14e..000000000 --- a/community-testing/libvirt/openbsd-netcat-default.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff -wbBur libvirt-0.9.7/src/qemu/qemu_migration.c libvirt-0.9.7.my/src/qemu/qemu_migration.c ---- libvirt-0.9.7/src/qemu/qemu_migration.c 2011-10-31 07:46:04.000000000 +0400 -+++ libvirt-0.9.7.my/src/qemu/qemu_migration.c 2011-11-08 15:46:10.000000000 +0400 -@@ -1589,7 +1589,7 @@ - spec->dest.unix_socket.file); - } else { - const char *args[] = { -- "nc", "-U", spec->dest.unix_socket.file, NULL -+ "nc.openbsd", "-U", spec->dest.unix_socket.file, NULL - }; - ret = qemuMonitorMigrateToCommand(priv->mon, migrate_flags, args); - } -diff -wbBur libvirt-0.9.7/src/remote/remote_driver.c libvirt-0.9.7.my/src/remote/remote_driver.c ---- libvirt-0.9.7/src/remote/remote_driver.c 2011-11-08 07:53:30.000000000 +0400 -+++ libvirt-0.9.7.my/src/remote/remote_driver.c 2011-11-08 15:46:10.000000000 +0400 -@@ -614,7 +614,7 @@ - username, - !tty, - !verify, -- netcat ? netcat : "nc", -+ netcat ? netcat : "nc.openbsd", - keyfile, - sockname))) - goto failed; -diff -wbBur libvirt-0.9.7/src/rpc/virnetsocket.c libvirt-0.9.7.my/src/rpc/virnetsocket.c ---- libvirt-0.9.7/src/rpc/virnetsocket.c 2011-11-08 07:53:30.000000000 +0400 -+++ libvirt-0.9.7.my/src/rpc/virnetsocket.c 2011-11-08 15:46:31.000000000 +0400 -@@ -642,7 +642,7 @@ - virCommandAddArgList(cmd, "-o", "StrictHostKeyChecking=no", NULL); - - if (!netcat) -- netcat = "nc"; -+ netcat = "nc.openbsd"; - - virCommandAddArgList(cmd, nodename, "sh", "-c", NULL); - |