libvirt:moved into main repo for pisi 2.0
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
#!/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# Licensed under the GNU General Public License, version 3.
|
||||
# See the file http://www.gnu.org/licenses/gpl.txt
|
||||
|
||||
from pisi.actionsapi import get
|
||||
from pisi.actionsapi import autotools
|
||||
from pisi.actionsapi import pisitools
|
||||
from pisi.actionsapi import shelltools
|
||||
|
||||
def setup():
|
||||
for f in ["src/Makefile.am", "src/Makefile.in", "daemon/Makefile.am", "daemon/Makefile.in"]:
|
||||
pisitools.dosed(f, "\$\(localstatedir\)(\/run\/libvirt)", "\\1")
|
||||
for f in ["daemon/libvirtd.c", "daemon/libvirtd.conf", "daemon/test_libvirtd.aug.in"]:
|
||||
pisitools.dosed(f, "\/var(\/run\/libvirt)", "\\1")
|
||||
for f in ["src/locking/virtlockd.pod.in", "src/virtlockd.8.in", "daemon/libvirtd.8.in", "daemon/libvirtd.pod.in", ]:
|
||||
pisitools.dosed(f, "LOCALSTATEDIR(\/run\/libvirt)", "\\1")
|
||||
autotools.configure("--with-init-script=none \
|
||||
--with-remote-pid-file=/run/libvirtd.pid \
|
||||
--with-qemu-user=qemu \
|
||||
--with-qemu-group=qemu \
|
||||
--with-lxc \
|
||||
--with-udev \
|
||||
--with-qemu \
|
||||
--with-sasl \
|
||||
--with-audit \
|
||||
--with-numactl \
|
||||
--with-yajl \
|
||||
--with-avahi \
|
||||
--with-netcf \
|
||||
--with-libssh2=/usr/lib \
|
||||
--with-capng \
|
||||
--with-polkit \
|
||||
--with-python \
|
||||
--with-network \
|
||||
--with-libvirtd \
|
||||
--with-storage-fs \
|
||||
--with-storage-scsi \
|
||||
--with-storage-mpath \
|
||||
--with-storage-disk \
|
||||
--with-storage-lvm \
|
||||
--without-vbox \
|
||||
--without-vmware \
|
||||
--without-esx \
|
||||
--without-storage-iscsi \
|
||||
--without-hal \
|
||||
--without-xen \
|
||||
--without-phyp \
|
||||
--without-uml \
|
||||
--without-openvz \
|
||||
--without-selinux \
|
||||
--without-apparmor \
|
||||
--disable-static")
|
||||
|
||||
def build():
|
||||
autotools.make()
|
||||
|
||||
#def check():
|
||||
# for v in ["XDG_HOME", "XDG_CACHE_HOME", "XDG_CONFIG_HOME"]:
|
||||
# shelltools.export(v, get.workDIR())
|
||||
# autotools.make("check")
|
||||
|
||||
|
||||
def install():
|
||||
autotools.rawInstall("DESTDIR=%s" % get.installDIR())
|
||||
pisitools.removeDir("/usr/share/gtk-doc")
|
||||
|
||||
pisitools.dodoc("AUTHORS", "NEWS", "README*", "ChangeLog")
|
||||
@@ -0,0 +1,39 @@
|
||||
#/usr/bin/python
|
||||
|
||||
import os
|
||||
|
||||
permissions = {
|
||||
"/etc/libvirt" : ["0700", "root:root"],
|
||||
"/etc/libvirt/qemu" : ["0700", "root:root"],
|
||||
"/etc/libvirt/nwfilter" : ["0700", "root:root"],
|
||||
"/etc/libvirt/qemu/networks" : ["0700", "root:root"],
|
||||
"/etc/libvirt/qemu/networks/autostart" : ["0700", "root:root"],
|
||||
"/var/log/libvirt" : ["0700", "root:root"],
|
||||
"/var/log/libvirt/qemu" : ["0700", "root:root"],
|
||||
"/var/log/libvirt/lxc" : ["0700", "root:root"],
|
||||
"/var/log/libvirt/uml" : ["0700", "root:root"],
|
||||
"/var/lib/libvirt" : ["0755", "root:root"],
|
||||
"/var/lib/libvirt/images" : ["0711", "root:root"],
|
||||
"/var/lib/libvirt/boot" : ["0711", "root:root"],
|
||||
"/var/lib/libvirt/qemu" : ["0750", "qemu:qemu"],
|
||||
"/var/lib/libvirt/lxc" : ["0700", "root:root"],
|
||||
"/var/lib/libvirt/uml" : ["0700", "root:root"],
|
||||
"/var/lib/libvirt/network" : ["0700", "root:root"],
|
||||
"/var/lib/libvirt/dnsmasq" : ["0755", "root:root"],
|
||||
"/var/cache/libvirt/qemu" : ["0750", "qemu:qemu"],
|
||||
"/var/cache/libvirt" : ["0700", "root:root"],
|
||||
"/run/libvirt" : ["0755", "root:root"],
|
||||
"/run/libvirt/qemu" : ["0700", "qemu:qemu"],
|
||||
"/run/libvirt/uml" : ["0700", "root:root"],
|
||||
"/usr/libexec/libvirt_proxy" : ["4755", "root:root"],
|
||||
}
|
||||
|
||||
|
||||
def postInstall(fromVersion, fromRelease, toVersion, toRelease):
|
||||
for _file, perms in permissions.items():
|
||||
# The list above is general, some paths may not exist depending on the configuration
|
||||
if os.path.exists(_file):
|
||||
os.system("/bin/chown -R %s %s" % (perms[1], _file))
|
||||
os.system("/bin/chmod %s %s" % (perms[0], _file))
|
||||
os.system("groupadd libvirt")
|
||||
os.system("usermod -G libvirt %s" % os.getusername())
|
||||
@@ -0,0 +1,43 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from comar.service import *
|
||||
import os
|
||||
|
||||
serviceType = "local"
|
||||
serviceDesc = _({"en": "libvirt virtualization API daemon",
|
||||
"tr": "libvirt sanallaştırma hizmeti"})
|
||||
serviceDefault = "on"
|
||||
|
||||
PIDFILE = "/run/libvirt/libvirtd.pid"
|
||||
KRB5_KTNAME = "/etc/libvirt/krb5.tab"
|
||||
LIBVIRTD_CONFIG = "/etc/libvirt/libvirtd.conf"
|
||||
|
||||
@synchronized
|
||||
def start():
|
||||
os.environ["KRB5_KTNAME"] = config.get("KRB5_KTNAME", KRB5_KTNAME)
|
||||
os.environ["PATH"] = "/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/sbin:/usr/local/bin"
|
||||
|
||||
if os.path.exists(PIDFILE):
|
||||
os.unlink(PIDFILE)
|
||||
|
||||
startService(command="/usr/sbin/libvirtd",
|
||||
args="--daemon --config %s %s --pid-file %s" % (
|
||||
config.get("LIBVIRTD_ARGS", ""),
|
||||
config.get("LIBVIRTD_CONFIG", LIBVIRTD_CONFIG),
|
||||
PIDFILE,
|
||||
),
|
||||
donotify=True)
|
||||
|
||||
@synchronized
|
||||
def stop():
|
||||
stopService(pidfile="/run/libvirt/libvirtd.pid",
|
||||
donotify=True)
|
||||
if os.path.exists(PIDFILE):
|
||||
os.unlink(PIDFILE)
|
||||
|
||||
@synchronized
|
||||
def reload():
|
||||
if os.path.exists(PIDFILE):
|
||||
os.kill(int(open(PIDFILE, "r").read().strip()), 1)
|
||||
|
||||
def status():
|
||||
return isServiceRunning(pidfile=PIDFILE)
|
||||
@@ -0,0 +1,17 @@
|
||||
# Override the default config file
|
||||
#LIBVIRTD_CONFIG=/etc/libvirt/libvirtd.conf
|
||||
|
||||
# Listen for TCP/IP connections
|
||||
# NB. must setup TLS/SSL keys prior to using this
|
||||
#LIBVIRTD_ARGS="--listen"
|
||||
|
||||
# Override Kerberos service keytab for SASL/GSSAPI
|
||||
#KRB5_KTNAME=/etc/libvirt/krb5.tab
|
||||
|
||||
# Override the QEMU/SDL default audio driver probing when
|
||||
# starting virtual machines using SDL graphics
|
||||
#
|
||||
# NB these have no effect for VMs using VNC
|
||||
#QEMU_AUDIO_DRV=sdl
|
||||
#
|
||||
#SDL_AUDIODRIVER=pulse
|
||||
@@ -0,0 +1,19 @@
|
||||
--- src/qemu/qemu_capabilities.c~ 2014-01-10 20:27:38.383264024 +0100
|
||||
+++ src/qemu/qemu_capabilities.c 2014-01-10 20:28:02.696597278 +0100
|
||||
@@ -638,14 +638,14 @@ virQEMUCapsFindBinaryForArch(virArch hos
|
||||
if (guestarch == VIR_ARCH_I686 &&
|
||||
!ret &&
|
||||
hostarch == VIR_ARCH_X86_64) {
|
||||
- ret = virFindFileInPath("qemu-system-x86_64");
|
||||
+ ret = virFindFileInPath("qemu-kvm");
|
||||
if (ret && !virFileIsExecutable(ret))
|
||||
VIR_FREE(ret);
|
||||
}
|
||||
|
||||
if (guestarch == VIR_ARCH_I686 &&
|
||||
!ret) {
|
||||
- ret = virFindFileInPath("qemu");
|
||||
+ ret = virFindFileInPath("qemu-kvm");
|
||||
if (ret && !virFileIsExecutable(ret))
|
||||
VIR_FREE(ret);
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
d /run/libvirt/qemu 0700 qemu qemu - -
|
||||
d /run/libvirt/lxc 0755 root root - -
|
||||
d /run/libvirt/uml 0755 root root - -
|
||||
d /run/libvirt/network 0755 root root - -
|
||||
@@ -0,0 +1,155 @@
|
||||
<?xml version="1.0" ?>
|
||||
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
|
||||
<PISI>
|
||||
<Source>
|
||||
<Name>libvirt</Name>
|
||||
<Homepage>http://www.libvirt.org/</Homepage>
|
||||
<Packager>
|
||||
<Name>PisiLinux Community</Name>
|
||||
<Email>admins@pisilinux.org</Email>
|
||||
</Packager>
|
||||
<License>LGPLv2.1</License>
|
||||
<IsA>app:console</IsA>
|
||||
<Summary>Library providing a simple API to several virtualization systems</Summary>
|
||||
<Description>libvirt is a toolkit to interact with the virtualization capabilities of recent versions of Linux (and other OSes). libvirt supports Xen hypervisor, QEMU emulator, KVM hypervisor, LXC Linux container system, OpenVZ Linux container system, User Mode Linux paravirtualized kernel and VirtualBox hypervisor together with remote management possibilities.</Description>
|
||||
<Archive sha1sum="adb1866ed5bed1a48a8a041a5a673ffc63a2a275" type="targz">http://libvirt.org/sources/libvirt-1.3.0.tar.gz</Archive>
|
||||
<BuildDependencies>
|
||||
<Dependency>qemu</Dependency>
|
||||
<Dependency>lvm2-devel</Dependency>
|
||||
<Dependency>attr-devel</Dependency>
|
||||
<Dependency>audit-devel</Dependency>
|
||||
<Dependency>avahi-devel</Dependency>
|
||||
<Dependency>netcf-devel</Dependency>
|
||||
<Dependency>numactl-devel</Dependency>
|
||||
<Dependency>libpciaccess-devel</Dependency>
|
||||
<Dependency>yajl-devel</Dependency>
|
||||
<Dependency>polkit-devel</Dependency>
|
||||
<Dependency>dbus-devel</Dependency>
|
||||
<Dependency>util-linux</Dependency>
|
||||
<Dependency>gnutls-devel</Dependency>
|
||||
<Dependency>parted-devel</Dependency>
|
||||
<Dependency>device-mapper-devel</Dependency>
|
||||
<Dependency>libnl-devel</Dependency>
|
||||
<Dependency>python-devel</Dependency>
|
||||
<Dependency>cyrus-sasl-devel</Dependency>
|
||||
<Dependency>libcap-ng-devel</Dependency>
|
||||
<Dependency>readline-devel</Dependency>
|
||||
</BuildDependencies>
|
||||
<Patches>
|
||||
<!-- <Patch>pisilinux-qemu.patch</Patch> -->
|
||||
</Patches>
|
||||
</Source>
|
||||
|
||||
<Package>
|
||||
<Name>libvirt</Name>
|
||||
<RuntimeDependencies>
|
||||
<Dependency>dbus</Dependency>
|
||||
<Dependency>yajl</Dependency>
|
||||
<Dependency>audit</Dependency>
|
||||
<Dependency>eudev</Dependency>
|
||||
<Dependency>libnl</Dependency>
|
||||
<Dependency>netcf</Dependency>
|
||||
<Dependency>gnutls</Dependency>
|
||||
<Dependency>parted</Dependency>
|
||||
<Dependency>libcap</Dependency>
|
||||
<Dependency>libxml2</Dependency>
|
||||
<Dependency>numactl</Dependency>
|
||||
<Dependency>readline</Dependency>
|
||||
<Dependency>libcap-ng</Dependency>
|
||||
<Dependency>avahi-libs</Dependency>
|
||||
<Dependency>cyrus-sasl</Dependency>
|
||||
<Dependency>libpciaccess</Dependency>
|
||||
<Dependency>device-mapper</Dependency>
|
||||
<Dependency>libutil-linux</Dependency>
|
||||
</RuntimeDependencies>
|
||||
<Files>
|
||||
<Path fileType="config">/etc</Path>
|
||||
<Path fileType="config">/usr/lib/tmpfiles.d/libvirt.conf</Path>
|
||||
<Path fileType="executable">/usr/bin</Path>
|
||||
<Path fileType="executable">/usr/libexec</Path>
|
||||
<Path fileType="executable">/usr/sbin</Path>
|
||||
<Path fileType="library">/usr/lib</Path>
|
||||
<Path fileType="doc">/usr/share/doc</Path>
|
||||
<Path fileType="data">/usr/share/augeas</Path>
|
||||
<Path fileType="data">/usr/share/polkit-1</Path>
|
||||
<Path fileType="data">/usr/share/libvirt</Path>
|
||||
<Path fileType="data">/usr/share/systemtap</Path>
|
||||
<Path fileType="man">/usr/share/man</Path>
|
||||
<Path fileType="data">/var</Path>
|
||||
<Path fileType="data">/run</Path>
|
||||
<Path fileType="localedata">/usr/share/locale</Path>
|
||||
</Files>
|
||||
<AdditionalFiles>
|
||||
<AdditionalFile owner="root" permission="0644" target="/usr/lib/tmpfiles.d/libvirt.conf">tmpfiles.conf</AdditionalFile>
|
||||
<AdditionalFile owner="root" permission="0644" target="/etc/conf.d/libvirt">libvirt.confd</AdditionalFile>
|
||||
</AdditionalFiles>
|
||||
<Provides>
|
||||
<COMAR script="service.py">System.Service</COMAR>
|
||||
<COMAR script="package.py">System.Package</COMAR>
|
||||
</Provides>
|
||||
</Package>
|
||||
|
||||
<Package>
|
||||
<Name>libvirt-devel</Name>
|
||||
<Summary>Development files for libvirt</Summary>
|
||||
<RuntimeDependencies>
|
||||
<Dependency release="current">libvirt</Dependency>
|
||||
</RuntimeDependencies>
|
||||
<Files>
|
||||
<Path fileType="header">/usr/include/libvirt</Path>
|
||||
<Path fileType="data">/usr/lib/pkgconfig</Path>
|
||||
</Files>
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="6">
|
||||
<Date>2015-12-31</Date>
|
||||
<Version>1.3.0</Version>
|
||||
<Comment>Version bump</Comment>
|
||||
<Name>Ayhan Yalçınsoy</Name>
|
||||
<Email>ayhanyalcinsoy@pisilinux.org</Email>
|
||||
</Update>
|
||||
<Update release="6">
|
||||
<Date>2014-07-02</Date>
|
||||
<Version>1.2.6</Version>
|
||||
<Comment>Version bump and bug fixes.</Comment>
|
||||
<Name>Vedat Demir</Name>
|
||||
<Email>vedat@pisilinux.org</Email>
|
||||
</Update>
|
||||
<Update release="5">
|
||||
<Date>2014-05-14</Date>
|
||||
<Version>1.2.3</Version>
|
||||
<Comment>Rebuild</Comment>
|
||||
<Name>Aydın Demirel</Name>
|
||||
<Email>aydin.demirel@pisilinux.org</Email>
|
||||
</Update>
|
||||
<Update release="4">
|
||||
<Date>2014-05-08</Date>
|
||||
<Version>1.2.3</Version>
|
||||
<Comment>Version bump.</Comment>
|
||||
<Name>Aydın Demirel</Name>
|
||||
<Email>aydin.demirel@pisilinux.org</Email>
|
||||
</Update>
|
||||
<Update release="3">
|
||||
<Date>2014-01-10</Date>
|
||||
<Version>1.2.0</Version>
|
||||
<Comment>Version bump.</Comment>
|
||||
<Name>Marcin Bojara</Name>
|
||||
<Email>marcin@pisilinux.org</Email>
|
||||
</Update>
|
||||
<Update release="2">
|
||||
<Date>2013-05-26</Date>
|
||||
<Version>1.0.5</Version>
|
||||
<Comment>Version bump and fixed compiling errors</Comment>
|
||||
<Name>Aydın Demirel</Name>
|
||||
<Email>aydin@demirel.web.tr</Email>
|
||||
</Update>
|
||||
<Update release="1">
|
||||
<Date>2013-01-14</Date>
|
||||
<Version>1.0.5</Version>
|
||||
<Comment>First release</Comment>
|
||||
<Name>Marcin Bojara</Name>
|
||||
<Email>marcin@pisilinux.org</Email>
|
||||
</Update>
|
||||
</History>
|
||||
</PISI>
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" ?>
|
||||
<PISI>
|
||||
<Source>
|
||||
<Name>libvirt</Name>
|
||||
<Summary xml:lang="tr">Birçok sanallaştırma sistemine kolay erişim sağlayan bir kütüphane</Summary>
|
||||
<Description xml:lang="tr">libvirt yeni linux sürümlerinin sunduğu sanallaştırma özellikleriyle etkileşimi kolaylaştıran bir kütüphanedir. Xen, KVM ve VirtualBox hipervizorleri, QEMU emulatörü, LXC linux konteyner sistemi, User Mode Linux paravirtual sanallaştırma sistemi gibi sistemlerle birlikte çalışabilir ve tüm bu sistemlerin uzaktan yönetimi için de kullanılabilir.</Description>
|
||||
</Source>
|
||||
|
||||
<Package>
|
||||
<Name>libvirt-devel</Name>
|
||||
<Summary xml:lang="tr">libvirt için geliştirme dosyaları</Summary>
|
||||
</Package>
|
||||
</PISI>
|
||||
Reference in New Issue
Block a user