summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorArthurBorsboom2015-06-12 15:59:50 +0200
committerArthurBorsboom2015-06-12 15:59:50 +0200
commit9fb8d2ccb172b39f1ed1538afd7350360397476a (patch)
tree0872216c06088f9535dcb947dccf3ca87f8ed353
downloadaur-9fb8d2ccb172b39f1ed1538afd7350360397476a.tar.gz
Initial import
-rw-r--r--.SRCINFO98
-rw-r--r--PKGBUILD115
-rw-r--r--libvirt.install38
-rw-r--r--libvirt.tmpfiles.d4
-rw-r--r--libvirtd-guests.conf.d11
-rw-r--r--libvirtd.conf.d3
6 files changed, 269 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..19dc6f4a4ef
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,98 @@
+pkgbase = libvirt-git
+ pkgdesc = API for controlling virtualization engines (openvz,kvm,qemu,virtualbox,xen,etc)
+ pkgver = 1.2.11.5.gc5a5491
+ pkgrel = 1
+ url = http://libvirt.org/
+ install = libvirt.install
+ arch = i686
+ arch = x86_64
+ license = LGPL
+ makedepends = git
+ makedepends = pkgconfig
+ makedepends = lvm2
+ makedepends = linux-api-headers
+ makedepends = dnsmasq
+ makedepends = libxslt
+ makedepends = xhtml-docs
+ depends = e2fsprogs
+ depends = gnutls
+ depends = iptables
+ depends = libxml2
+ depends = parted
+ depends = polkit
+ depends = python
+ depends = avahi
+ depends = yajl
+ depends = libpciaccess
+ depends = udev
+ depends = dbus-core
+ depends = libxau
+ depends = libxdmcp
+ depends = libpcap
+ depends = curl
+ depends = libsasl
+ depends = libgcrypt
+ depends = libgpg-error
+ depends = openssl
+ depends = libxcb
+ depends = gcc-libs
+ depends = iproute2
+ depends = libnl
+ depends = libx11
+ depends = perl-xml-xpath
+ optdepends = bridge-utils: for briged networking (default)
+ optdepends = dnsmasq: for NAT/DHCP for guests
+ optdepends = openbsd-netcat: for remote management over ssh
+ optdepends = qemu
+ optdepends = radvd
+ optdepends = dmidecode
+ optdepends = ebtables
+ optdepends = pm-utils: host power management
+ optdepends = audit
+ provides = libvirt
+ conflicts = libvirt
+ options = emptydirs
+ backup = etc/conf.d/libvirt-guests
+ backup = etc/conf.d/libvirtd
+ backup = etc/libvirt/libvirt.conf
+ backup = etc/libvirt/libvirtd.conf
+ backup = etc/libvirt/lxc.conf
+ backup = etc/libvirt/nwfilter/allow-arp.xml
+ backup = etc/libvirt/nwfilter/allow-dhcp-server.xml
+ backup = etc/libvirt/nwfilter/allow-dhcp.xml
+ backup = etc/libvirt/nwfilter/allow-incoming-ipv4.xml
+ backup = etc/libvirt/nwfilter/allow-ipv4.xml
+ backup = etc/libvirt/nwfilter/clean-traffic.xml
+ backup = etc/libvirt/nwfilter/no-arp-ip-spoofing.xml
+ backup = etc/libvirt/nwfilter/no-arp-mac-spoofing.xml
+ backup = etc/libvirt/nwfilter/no-arp-spoofing.xml
+ backup = etc/libvirt/nwfilter/no-ip-multicast.xml
+ backup = etc/libvirt/nwfilter/no-ip-spoofing.xml
+ backup = etc/libvirt/nwfilter/no-mac-broadcast.xml
+ backup = etc/libvirt/nwfilter/no-mac-spoofing.xml
+ backup = etc/libvirt/nwfilter/no-other-l2-traffic.xml
+ backup = etc/libvirt/nwfilter/no-other-rarp-traffic.xml
+ backup = etc/libvirt/nwfilter/qemu-announce-self-rarp.xml
+ backup = etc/libvirt/nwfilter/qemu-announce-self.xml
+ backup = etc/libvirt/qemu-lockd.conf
+ backup = etc/libvirt/qemu.conf
+ backup = etc/libvirt/qemu/networks/autostart/default.xml
+ backup = etc/libvirt/qemu/networks/default.xml
+ backup = etc/libvirt/virt-login-shell.conf
+ backup = etc/libvirt/virtlockd.conf
+ backup = etc/logrotate.d/libvirtd
+ backup = etc/logrotate.d/libvirtd.lxc
+ backup = etc/logrotate.d/libvirtd.qemu
+ backup = etc/logrotate.d/libvirtd.uml
+ backup = etc/sasl2/libvirt.conf
+ source = git+git://libvirt.org/libvirt.git
+ source = libvirtd.conf.d
+ source = libvirtd-guests.conf.d
+ source = libvirt.tmpfiles.d
+ sha512sums = SKIP
+ sha512sums = eebc616fcdf3c92338f3967f99701ed2d156d4a3835c31aebe8299b2f5fe00717f09ee2da79b3d5810348033f0b82ff05c70a775a8309d886919e75fa862e302
+ sha512sums = 9012a2bd2b262a6f95d739f97b6ebc6938310616aca05d501efd9d3fc69d71500366dcfe9046a37f8ce30929bcd6eea9cf6770cf757998ecce4b475a25914801
+ sha512sums = 9e3e9f479b17528d70e812e6851cf4209ad73b577d478170bf7d80f075be4f2ee2e28adbe1e542002bbaea15e34830ff60e4ca2e34a5ac5a925440ca25864c31
+
+pkgname = libvirt-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..a7da5be7b70
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,115 @@
+# $Id: PKGBUILD 82286 2013-01-14 10:03:34Z spupykin $
+# Maintainer: Arthur Borsboom <arthurborsboom@gmail.com>
+# Maintainer: Jonas Heinrich <onny@project-insanity.org>
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Contributor: Jonathan Wiersma <archaur at jonw dot org>
+
+pkgname=libvirt-git
+pkgver=1.2.11.5.gc5a5491
+pkgrel=1
+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' 'python'
+ 'avahi' 'yajl' 'libpciaccess' 'udev' 'dbus-core' 'libxau' 'libxdmcp' 'libpcap'
+ 'curl' 'libsasl' 'libgcrypt' 'libgpg-error' 'openssl' 'libxcb' 'gcc-libs'
+ 'iproute2' 'libnl' 'libx11' 'perl-xml-xpath')
+makedepends=('git' 'pkgconfig' 'lvm2' 'linux-api-headers' 'dnsmasq' 'libxslt' 'xhtml-docs')
+optdepends=('bridge-utils: for briged networking (default)'
+ 'dnsmasq: for NAT/DHCP for guests'
+ 'openbsd-netcat: for remote management over ssh'
+ 'qemu'
+ 'radvd'
+ 'dmidecode'
+ 'ebtables'
+ 'pm-utils: host power management'
+ 'audit')
+conflicts=('libvirt')
+provides=('libvirt')
+options=('emptydirs')
+backup=('etc/conf.d/libvirt-guests'
+ 'etc/conf.d/libvirtd'
+ 'etc/libvirt/libvirt.conf'
+ 'etc/libvirt/libvirtd.conf'
+ 'etc/libvirt/lxc.conf'
+ 'etc/libvirt/nwfilter/allow-arp.xml'
+ 'etc/libvirt/nwfilter/allow-dhcp-server.xml'
+ 'etc/libvirt/nwfilter/allow-dhcp.xml'
+ 'etc/libvirt/nwfilter/allow-incoming-ipv4.xml'
+ 'etc/libvirt/nwfilter/allow-ipv4.xml'
+ 'etc/libvirt/nwfilter/clean-traffic.xml'
+ 'etc/libvirt/nwfilter/no-arp-ip-spoofing.xml'
+ 'etc/libvirt/nwfilter/no-arp-mac-spoofing.xml'
+ 'etc/libvirt/nwfilter/no-arp-spoofing.xml'
+ 'etc/libvirt/nwfilter/no-ip-multicast.xml'
+ 'etc/libvirt/nwfilter/no-ip-spoofing.xml'
+ 'etc/libvirt/nwfilter/no-mac-broadcast.xml'
+ 'etc/libvirt/nwfilter/no-mac-spoofing.xml'
+ 'etc/libvirt/nwfilter/no-other-l2-traffic.xml'
+ 'etc/libvirt/nwfilter/no-other-rarp-traffic.xml'
+ 'etc/libvirt/nwfilter/qemu-announce-self-rarp.xml'
+ 'etc/libvirt/nwfilter/qemu-announce-self.xml'
+ 'etc/libvirt/qemu-lockd.conf'
+ 'etc/libvirt/qemu.conf'
+ 'etc/libvirt/qemu/networks/autostart/default.xml'
+ 'etc/libvirt/qemu/networks/default.xml'
+ 'etc/libvirt/virt-login-shell.conf'
+ 'etc/libvirt/virtlockd.conf'
+ 'etc/logrotate.d/libvirtd'
+ 'etc/logrotate.d/libvirtd.lxc'
+ 'etc/logrotate.d/libvirtd.qemu'
+ 'etc/logrotate.d/libvirtd.uml'
+ 'etc/sasl2/libvirt.conf')
+install="libvirt.install"
+source=('git+git://libvirt.org/libvirt.git'
+ libvirtd.conf.d
+ libvirtd-guests.conf.d
+ libvirt.tmpfiles.d)
+sha512sums=('SKIP'
+ 'eebc616fcdf3c92338f3967f99701ed2d156d4a3835c31aebe8299b2f5fe00717f09ee2da79b3d5810348033f0b82ff05c70a775a8309d886919e75fa862e302'
+ '9012a2bd2b262a6f95d739f97b6ebc6938310616aca05d501efd9d3fc69d71500366dcfe9046a37f8ce30929bcd6eea9cf6770cf757998ecce4b475a25914801'
+ '9e3e9f479b17528d70e812e6851cf4209ad73b577d478170bf7d80f075be4f2ee2e28adbe1e542002bbaea15e34830ff60e4ca2e34a5ac5a925440ca25864c31')
+
+pkgver() {
+ cd "$SRCDEST/libvirt"
+ git describe --always | sed 's|-|.|g' | sed 's/^.//'
+}
+
+build() {
+ cd "$srcdir/libvirt"
+
+ export LDFLAGS=-lX11
+ export RADVD=/usr/bin/radvd
+ NOCONFIGURE=1 ./autogen.sh
+ #./configure --prefix=/usr --libexec=/usr/lib/"$pkgname" --sbindir=/usr/bin \
+ #./configure --prefix=/usr --libexec=/usr/lib/"${pkgname/-git/}" --sbindir=/usr/bin \
+ #--with-storage-lvm --without-xen --with-udev --without-hal --disable-static \
+ #--with-init-script=systemd --with-audit \
+ #--with-qemu-user=nobody --with-qemu-group=nobody \
+ #--without-netcf --with-interface --with-lxc
+ ./configure --prefix=/usr --libexec=/usr/lib/"${pkgname/-git/}" --sbindir=/usr/bin --with-init-script=systemd
+ make
+
+ sed -i 's|/etc/sysconfig/|/etc/conf.d/|' daemon/libvirtd.service tools/libvirt-guests.service
+ sed -i 's|@sbindir@|/usr/bin|g' src/virtlockd.service
+ # sed -i 's|#group =.*|group="kvm"|' src/qemu/qemu.conf
+}
+
+package() {
+ cd "$srcdir/libvirt"
+ make DESTDIR="$pkgdir" install
+
+ install -D -m644 "$srcdir"/libvirtd.conf.d "$pkgdir"/etc/conf.d/libvirtd
+ install -D -m644 "$srcdir"/libvirtd-guests.conf.d "$pkgdir"/etc/conf.d/libvirt-guests
+
+ # systemd stuff
+ install -D -m644 "$srcdir"/libvirt.tmpfiles.d "$pkgdir"/usr/lib/tmpfiles.d/libvirt.conf
+
+ rm -rf \
+ "$pkgdir"/var/run \
+ "$pkgdir"/etc/sysconfig \
+ "$pkgdir"/etc/rc.d/init.d \
+ "$pkgdir"/lib \
+ "$pkgdir"/etc/sysctl.d
+}
diff --git a/libvirt.install b/libvirt.install
new file mode 100644
index 00000000000..32c28d559e2
--- /dev/null
+++ b/libvirt.install
@@ -0,0 +1,38 @@
+_libvirt_setup() {
+ systemd-tmpfiles --create libvirt.conf
+ 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 ""
+}
+
+post_upgrade() {
+ _libvirt_setup || return 1
+ echo ">>> To finish the upgrade, restart libvirtd by:"
+ echo ">>> 'systemctl restart libvirtd' as root (systemd) or"
+ echo ">>> '/etc/rc.d/libvirtd restart' as root (initscripts) or"
+ echo ">>> rebooting."
+ echo ">>> You may also need to run 'rm -rf ~/.libvirt'"
+ echo ""
+}
+
+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
+}
diff --git a/libvirt.tmpfiles.d b/libvirt.tmpfiles.d
new file mode 100644
index 00000000000..2804c43c837
--- /dev/null
+++ b/libvirt.tmpfiles.d
@@ -0,0 +1,4 @@
+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 -
diff --git a/libvirtd-guests.conf.d b/libvirtd-guests.conf.d
new file mode 100644
index 00000000000..dd987611bfd
--- /dev/null
+++ b/libvirtd-guests.conf.d
@@ -0,0 +1,11 @@
+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=60
diff --git a/libvirtd.conf.d b/libvirtd.conf.d
new file mode 100644
index 00000000000..d4d25b47a60
--- /dev/null
+++ b/libvirtd.conf.d
@@ -0,0 +1,3 @@
+LIBVIRTD_CONFIG="/etc/libvirt/libvirtd.conf"
+LIBVIRTD_ARGS="-p /var/run/libvirtd.pid"
+KRB5_KTNAME="/etc/libvirt/krb5.tab"