diff options
author | Parabola <dev@list.parabolagnulinux.org> | 2011-09-05 13:37:26 +0000 |
---|---|---|
committer | Parabola <dev@list.parabolagnulinux.org> | 2011-09-05 13:37:26 +0000 |
commit | f651180e6b1ac9508ec0d1d9b94972de776020a9 (patch) | |
tree | 2c1f8d3bf28b5a52b186cfb6a67b6d092ddf21fc /community-testing/libvirt | |
parent | 6dee0a203a8290427ca77705bc1cae90381529b2 (diff) |
Mon Sep 5 13:37:24 UTC 2011
Diffstat (limited to 'community-testing/libvirt')
-rw-r--r-- | community-testing/libvirt/PKGBUILD | 81 | ||||
-rw-r--r-- | community-testing/libvirt/libvirt.install | 38 | ||||
-rw-r--r-- | community-testing/libvirt/libvirtd.conf.d | 3 | ||||
-rwxr-xr-x | community-testing/libvirt/libvirtd.rc.d | 66 | ||||
-rw-r--r-- | community-testing/libvirt/openbsd-netcat-default.patch | 36 | ||||
-rw-r--r-- | community-testing/libvirt/unixperms.patch | 47 | ||||
-rw-r--r-- | community-testing/libvirt/yajl-2.x.patch | 66 |
7 files changed, 0 insertions, 337 deletions
diff --git a/community-testing/libvirt/PKGBUILD b/community-testing/libvirt/PKGBUILD deleted file mode 100644 index 87c98529a..000000000 --- a/community-testing/libvirt/PKGBUILD +++ /dev/null @@ -1,81 +0,0 @@ -# $Id: PKGBUILD 53748 2011-08-07 22:06:51Z spupykin $ -# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com> -# Contributor: Jonathan Wiersma <archaur at jonw dot org> - -pkgname=libvirt -pkgver=0.9.4 -pkgrel=2 -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') -makedepends=('pkgconfig' 'lvm2') -optdepends=('bridge-utils: for briged networking (default)' - 'dnsmasq: for NAT/DHCP for guests' - 'kernel26-ovz24: for openvz guests' - 'kvm' - 'lxc' - 'openbsd-netcat: for remote management over ssh' - 'qemu' - 'user-mode-linux' - 'virtualbox_bin' - 'virtualbox-ose' - 'xen' - 'radvd') -options=('emptydirs' '!libtool') -backup=('etc/conf.d/libvirtd' - 'etc/libvirt/libvirtd.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 - openbsd-netcat-default.patch - unixperms.patch - yajl-2.x.patch) -md5sums=('86b411b11bd23d4af20611699f372af7' - 'c43244c40a0437038c82089618e7beaa' - '3ed0e24f5b5e25bf553f5427d64915e6' - 'ee7052f3929d5d918236c646a59edebf' - 'db95aecdf2ccf3693fef5821cdcb7eba' - '5745bb8d0b254abb7a3528c66e03b0f9') - -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 - -# for more information on authentication see http://libvirt.org/auth.html -# If you wish to have unix-permissions based access rather than only polkit -# access, create a group called libvirt and uncomment the line below: -# patch -Np1 -i "$srcdir"/unixperms.patch - - [ $NOEXTRACT -eq 1 ] || patch -Np1 -i "$srcdir"/openbsd-netcat-default.patch - - # fixes for yajl 2.0 API changes -# [ $NOEXTRACT -eq 1 ] || patch -Np1 -i "$srcdir/yajl-2.x.patch" - - export LDFLAGS=-lX11 - [ -f Makefile ] || ./configure --prefix=/usr --libexec=/usr/lib/"$pkgname" \ - --with-storage-lvm --without-xen --with-udev --without-hal - find -name Makefile -exec sed -i 's#-L /usr#-L/usr#' {} \; - 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 - rm -rf $pkgdir/var/run -} 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/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 100755 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 c7543c5a4..000000000 --- a/community-testing/libvirt/openbsd-netcat-default.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff -wbBur libvirt-0.9.4.org/src/qemu/qemu_migration.c libvirt-0.9.4/src/qemu/qemu_migration.c ---- libvirt-0.9.4.org/src/qemu/qemu_migration.c 2011-08-03 05:36:34.000000000 +0400 -+++ libvirt-0.9.4/src/qemu/qemu_migration.c 2011-08-03 13:29:56.000000000 +0400 -@@ -1612,7 +1612,7 @@ - ret = qemuMonitorMigrateToUnix(priv->mon, background_flags, - unixfile); - } else if (qemuCapsGet(priv->qemuCaps, QEMU_CAPS_MIGRATE_QEMU_EXEC)) { -- const char *args[] = { "nc", "-U", unixfile, NULL }; -+ const char *args[] = { "nc.openbsd", "-U", unixfile, NULL }; - ret = qemuMonitorMigrateToCommand(priv->mon, QEMU_MONITOR_MIGRATE_BACKGROUND, args); - } else { - ret = -1; -diff -wbBur libvirt-0.9.4.org/src/remote/remote_driver.c libvirt-0.9.4/src/remote/remote_driver.c ---- libvirt-0.9.4.org/src/remote/remote_driver.c 2011-07-29 09:14:03.000000000 +0400 -+++ libvirt-0.9.4/src/remote/remote_driver.c 2011-08-03 13:30:05.000000000 +0400 -@@ -588,7 +588,7 @@ - username, - !tty, - !verify, -- netcat ? netcat : "nc", -+ netcat ? netcat : "nc.openbsd", - keyfile, - sockname))) - goto failed; -diff -wbBur libvirt-0.9.4.org/src/rpc/virnetsocket.c libvirt-0.9.4/src/rpc/virnetsocket.c ---- libvirt-0.9.4.org/src/rpc/virnetsocket.c 2011-08-01 05:32:35.000000000 +0400 -+++ libvirt-0.9.4/src/rpc/virnetsocket.c 2011-08-03 13:29:46.000000000 +0400 -@@ -629,7 +629,7 @@ - if (noVerify) - virCommandAddArgList(cmd, "-o", "StrictHostKeyChecking=no", NULL); - virCommandAddArgList(cmd, nodename, -- netcat ? netcat : "nc", -+ netcat ? netcat : "nc.openbsd", - "-U", path, NULL); - - return virNetSocketNewConnectCommand(cmd, retsock); diff --git a/community-testing/libvirt/unixperms.patch b/community-testing/libvirt/unixperms.patch deleted file mode 100644 index b3fb86cf5..000000000 --- a/community-testing/libvirt/unixperms.patch +++ /dev/null @@ -1,47 +0,0 @@ -diff -ur libvirt-0.7.4-orig/daemon/libvirtd.conf libvirt-0.7.4-patched/daemon/libvirtd.conf ---- libvirt-0.7.4-orig/daemon/libvirtd.conf 2009-11-23 03:10:33.398655655 -0800 -+++ libvirt-0.7.4-patched/daemon/libvirtd.conf 2009-11-23 03:09:37.831189671 -0800 -@@ -78,14 +78,14 @@ - # without becoming root. - # - # This is restricted to 'root' by default. --#unix_sock_group = "libvirt" -+unix_sock_group = "libvirt" - - # Set the UNIX socket permissions for the R/O socket. This is used - # for monitoring VM status only - # - # Default allows any user. If setting group ownership may want to - # restrict this to: --#unix_sock_ro_perms = "0777" -+unix_sock_ro_perms = "0770" - - # Set the UNIX socket permissions for the R/W socket. This is used - # for full management of VMs -@@ -95,7 +95,7 @@ - # - # If not using PolicyKit and setting group ownership for access - # control then you may want to relax this to: --#unix_sock_rw_perms = "0770" -+unix_sock_rw_perms = "0770" - - # Set the name of the directory in which sockets will be found/created. - #unix_sock_dir = "/var/run/libvirt" -@@ -126,7 +126,7 @@ - # - # To restrict monitoring of domains you may wish to enable - # an authentication mechanism here --#auth_unix_ro = "none" -+auth_unix_ro = "none" - - # Set an authentication scheme for UNIX read-write sockets - # By default socket permissions only allow root. If PolicyKit -@@ -135,7 +135,7 @@ - # - # If the unix_sock_rw_perms are changed you may wish to enable - # an authentication mechanism here --#auth_unix_rw = "none" -+auth_unix_rw = "none" - - # Change the authentication scheme for TCP sockets. - # diff --git a/community-testing/libvirt/yajl-2.x.patch b/community-testing/libvirt/yajl-2.x.patch deleted file mode 100644 index 80d3edce0..000000000 --- a/community-testing/libvirt/yajl-2.x.patch +++ /dev/null @@ -1,66 +0,0 @@ ---- a/src/util/json.c 2011-03-24 03:10:26.000000000 -0400 -+++ b/src/util/json.c 2011-04-25 20:01:29.354939116 -0400 -@@ -709,7 +709,7 @@ - - static int virJSONParserHandleNumber(void * ctx, - const char * s, -- unsigned int l) -+ size_t l) - { - virJSONParserPtr parser = ctx; - char *str = strndup(s, l); -@@ -735,7 +735,7 @@ - - static int virJSONParserHandleString(void * ctx, - const unsigned char * stringVal, -- unsigned int stringLen) -+ size_t stringLen) - { - virJSONParserPtr parser = ctx; - virJSONValuePtr value = virJSONValueNewStringLen((const char *)stringVal, -@@ -756,7 +756,7 @@ - - static int virJSONParserHandleMapKey(void * ctx, - const unsigned char * stringVal, -- unsigned int stringLen) -+ size_t stringLen) - { - virJSONParserPtr parser = ctx; - virJSONParserStatePtr state; -@@ -894,14 +894,14 @@ - /* XXX add an incremental streaming parser - yajl trivially supports it */ - virJSONValuePtr virJSONValueFromString(const char *jsonstring) - { -- yajl_parser_config cfg = { 1, 1 }; - yajl_handle hand; - virJSONParser parser = { NULL, NULL, 0 }; - virJSONValuePtr ret = NULL; - - VIR_DEBUG("string=%s", jsonstring); - -- hand = yajl_alloc(&parserCallbacks, &cfg, NULL, &parser); -+ hand = yajl_alloc(&parserCallbacks, NULL, &parser); -+ yajl_config(hand, yajl_allow_comments, 1); - - if (yajl_parse(hand, - (const unsigned char *)jsonstring, -@@ -1002,15 +1002,16 @@ - - char *virJSONValueToString(virJSONValuePtr object) - { -- yajl_gen_config conf = { 0, " " }; /* Turns off pretty printing since QEMU can't cope */ - yajl_gen g; - const unsigned char *str; - char *ret = NULL; -- unsigned int len; -+ size_t len; - - VIR_DEBUG("object=%p", object); - -- g = yajl_gen_alloc(&conf, NULL); -+ g = yajl_gen_alloc(NULL); -+ yajl_gen_config(g, yajl_gen_beautify, 0); -+ yajl_gen_config(g, yajl_gen_indent_string, " "); - - if (virJSONValueToStringOne(object, g) < 0) { - virReportOOMError(); |