Libvirt is buidl only on i585 and x86_64 because qemu is build only on this arches.
Signed-off-by: Jonatan Schlag jonatan.schlag@ipfire.org --- config/rootfiles/common/armv5tel/initscripts | 2 + config/rootfiles/common/i586/initscripts | 2 + config/rootfiles/common/x86_64/initscripts | 2 + config/rootfiles/packages/libvirt | 285 +++++++++++++++++++++ lfs/libvirt | 93 +++++++ make.sh | 1 + src/initscripts/init.d/libvirtd | 49 ++++ src/paks/libvirt/install.sh | 33 +++ src/paks/libvirt/uninstall.sh | 30 +++ src/paks/libvirt/update.sh | 27 ++ ...ult-behavior-of-libvirt-guests.sh-for-IPF.patch | 30 +++ 11 files changed, 554 insertions(+) create mode 100644 config/rootfiles/packages/libvirt create mode 100644 lfs/libvirt create mode 100644 src/initscripts/init.d/libvirtd create mode 100644 src/paks/libvirt/install.sh create mode 100644 src/paks/libvirt/uninstall.sh create mode 100644 src/paks/libvirt/update.sh create mode 100644 src/patches/libvirt/0001-Change-default-behavior-of-libvirt-guests.sh-for-IPF.patch
diff --git a/config/rootfiles/common/armv5tel/initscripts b/config/rootfiles/common/armv5tel/initscripts index b827b1c..0012f13 100644 --- a/config/rootfiles/common/armv5tel/initscripts +++ b/config/rootfiles/common/armv5tel/initscripts @@ -45,6 +45,8 @@ etc/rc.d/init.d/ipsec #etc/rc.d/init.d/lcdproc #etc/rc.d/init.d/lcr etc/rc.d/init.d/leds +etc/rc.d/init.d/libvirt-guests +etc/rc.d/init.d/libvirtd etc/rc.d/init.d/localnet etc/rc.d/init.d/mISDN #etc/rc.d/init.d/mediatomb diff --git a/config/rootfiles/common/i586/initscripts b/config/rootfiles/common/i586/initscripts index 51185f6..f775eca 100644 --- a/config/rootfiles/common/i586/initscripts +++ b/config/rootfiles/common/i586/initscripts @@ -47,6 +47,8 @@ etc/rc.d/init.d/ipsec #etc/rc.d/init.d/lcdproc #etc/rc.d/init.d/lcr etc/rc.d/init.d/leds +etc/rc.d/init.d/libvirt-guests +etc/rc.d/init.d/libvirtd etc/rc.d/init.d/localnet etc/rc.d/init.d/mISDN #etc/rc.d/init.d/mediatomb diff --git a/config/rootfiles/common/x86_64/initscripts b/config/rootfiles/common/x86_64/initscripts index 51185f6..f775eca 100644 --- a/config/rootfiles/common/x86_64/initscripts +++ b/config/rootfiles/common/x86_64/initscripts @@ -47,6 +47,8 @@ etc/rc.d/init.d/ipsec #etc/rc.d/init.d/lcdproc #etc/rc.d/init.d/lcr etc/rc.d/init.d/leds +etc/rc.d/init.d/libvirt-guests +etc/rc.d/init.d/libvirtd etc/rc.d/init.d/localnet etc/rc.d/init.d/mISDN #etc/rc.d/init.d/mediatomb diff --git a/config/rootfiles/packages/libvirt b/config/rootfiles/packages/libvirt new file mode 100644 index 0000000..c2d6042 --- /dev/null +++ b/config/rootfiles/packages/libvirt @@ -0,0 +1,285 @@ +#etc/libvirt +etc/libvirt/libvirt.conf +etc/libvirt/libvirtd.conf +#etc/libvirt/nwfilter +#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/virtlockd.conf +etc/logrotate.d/libvirtd +etc/logrotate.d/libvirtd.libxl +#etc/logrotate.d/libvirtd.lxc +etc/logrotate.d/libvirtd.qemu +#etc/logrotate.d/libvirtd.uml +etc/rc.d/init.d/libvirt-guests +etc/rc.d/init.d/libvirtd +usr/bin/virsh +usr/bin/virt-host-validate +usr/bin/virt-pki-validate +usr/bin/virt-xml-validate +#usr/include/libvirt +#usr/include/libvirt/libvirt-domain-snapshot.h +#usr/include/libvirt/libvirt-domain.h +#usr/include/libvirt/libvirt-event.h +#usr/include/libvirt/libvirt-host.h +#usr/include/libvirt/libvirt-interface.h +#usr/include/libvirt/libvirt-lxc.h +#usr/include/libvirt/libvirt-network.h +#usr/include/libvirt/libvirt-nodedev.h +#usr/include/libvirt/libvirt-nwfilter.h +#usr/include/libvirt/libvirt-qemu.h +#usr/include/libvirt/libvirt-secret.h +#usr/include/libvirt/libvirt-storage.h +#usr/include/libvirt/libvirt-stream.h +#usr/include/libvirt/libvirt.h +#usr/include/libvirt/virterror.h +#usr/lib/libvirt +#usr/lib/libvirt-admin.la +#usr/lib/libvirt-admin.so +usr/lib/libvirt-admin.so.0 +usr/lib/libvirt-admin.so.0.1002.18 +#usr/lib/libvirt-lxc.la +#usr/lib/libvirt-lxc.so +usr/lib/libvirt-lxc.so.0 +usr/lib/libvirt-lxc.so.0.1002.18 +#usr/lib/libvirt-qemu.la +#usr/lib/libvirt-qemu.so +usr/lib/libvirt-qemu.so.0 +usr/lib/libvirt-qemu.so.0.1002.18 +#usr/lib/libvirt.la +#usr/lib/libvirt.so +usr/lib/libvirt.so.0 +usr/lib/libvirt.so.0.1002.18 +#usr/lib/libvirt/connection-driver +#usr/lib/libvirt/connection-driver/libvirt_driver_interface.la +usr/lib/libvirt/connection-driver/libvirt_driver_interface.so +#usr/lib/libvirt/connection-driver/libvirt_driver_nodedev.la +usr/lib/libvirt/connection-driver/libvirt_driver_nodedev.so +#usr/lib/libvirt/connection-driver/libvirt_driver_nwfilter.la +usr/lib/libvirt/connection-driver/libvirt_driver_nwfilter.so +#usr/lib/libvirt/connection-driver/libvirt_driver_qemu.la +usr/lib/libvirt/connection-driver/libvirt_driver_qemu.so +#usr/lib/libvirt/connection-driver/libvirt_driver_secret.la +usr/lib/libvirt/connection-driver/libvirt_driver_secret.so +#usr/lib/libvirt/connection-driver/libvirt_driver_storage.la +usr/lib/libvirt/connection-driver/libvirt_driver_storage.so +#usr/lib/libvirt/lock-driver +#usr/lib/libvirt/lock-driver/lockd.la +usr/lib/libvirt/lock-driver/lockd.so +#usr/lib/pkgconfig/libvirt-lxc.pc +#usr/lib/pkgconfig/libvirt-qemu.pc +#usr/lib/pkgconfig/libvirt.pc +#usr/lib/sysctl.d +usr/lib/sysctl.d/60-libvirtd.conf +usr/libexec/libvirt_iohelper +usr/sbin/libvirtd +usr/sbin/virtlockd +#usr/share/augeas +#usr/share/augeas/lenses +#usr/share/augeas/lenses/libvirt_lockd.aug +#usr/share/augeas/lenses/libvirtd.aug +#usr/share/augeas/lenses/libvirtd_qemu.aug +#usr/share/augeas/lenses/tests +#usr/share/augeas/lenses/tests/test_libvirt_lockd.aug +#usr/share/augeas/lenses/tests/test_libvirtd.aug +#usr/share/augeas/lenses/tests/test_libvirtd_qemu.aug +#usr/share/augeas/lenses/tests/test_virtlockd.aug +#usr/share/augeas/lenses/virtlockd.aug +#usr/share/doc/libvirt-1.2.18.3 +#usr/share/doc/libvirt-1.2.18.3/html +#usr/share/doc/libvirt-1.2.18.3/html/32favicon.png +#usr/share/doc/libvirt-1.2.18.3/html/404.html +#usr/share/doc/libvirt-1.2.18.3/html/acl.html +#usr/share/doc/libvirt-1.2.18.3/html/aclpolkit.html +#usr/share/doc/libvirt-1.2.18.3/html/api.html +#usr/share/doc/libvirt-1.2.18.3/html/api_extension.html +#usr/share/doc/libvirt-1.2.18.3/html/apps.html +#usr/share/doc/libvirt-1.2.18.3/html/archdomain.html +#usr/share/doc/libvirt-1.2.18.3/html/architecture.gif +#usr/share/doc/libvirt-1.2.18.3/html/architecture.html +#usr/share/doc/libvirt-1.2.18.3/html/archnetwork.html +#usr/share/doc/libvirt-1.2.18.3/html/archnode.html +#usr/share/doc/libvirt-1.2.18.3/html/archstorage.html +#usr/share/doc/libvirt-1.2.18.3/html/auditlog.html +#usr/share/doc/libvirt-1.2.18.3/html/auth.html +#usr/share/doc/libvirt-1.2.18.3/html/bindings.html +#usr/share/doc/libvirt-1.2.18.3/html/bugs.html +#usr/share/doc/libvirt-1.2.18.3/html/cgroups.html +#usr/share/doc/libvirt-1.2.18.3/html/compiling.html +#usr/share/doc/libvirt-1.2.18.3/html/contact.html +#usr/share/doc/libvirt-1.2.18.3/html/csharp.html +#usr/share/doc/libvirt-1.2.18.3/html/deployment.html +#usr/share/doc/libvirt-1.2.18.3/html/devguide.html +#usr/share/doc/libvirt-1.2.18.3/html/docs.html +#usr/share/doc/libvirt-1.2.18.3/html/downloads.html +#usr/share/doc/libvirt-1.2.18.3/html/drivers.html +#usr/share/doc/libvirt-1.2.18.3/html/drvbhyve.html +#usr/share/doc/libvirt-1.2.18.3/html/drvesx.html +#usr/share/doc/libvirt-1.2.18.3/html/drvhyperv.html +#usr/share/doc/libvirt-1.2.18.3/html/drvlxc.html +#usr/share/doc/libvirt-1.2.18.3/html/drvopenvz.html +#usr/share/doc/libvirt-1.2.18.3/html/drvparallels.html +#usr/share/doc/libvirt-1.2.18.3/html/drvphyp.html +#usr/share/doc/libvirt-1.2.18.3/html/drvqemu.html +#usr/share/doc/libvirt-1.2.18.3/html/drvremote.html +#usr/share/doc/libvirt-1.2.18.3/html/drvtest.html +#usr/share/doc/libvirt-1.2.18.3/html/drvuml.html +#usr/share/doc/libvirt-1.2.18.3/html/drvvbox.html +#usr/share/doc/libvirt-1.2.18.3/html/drvvmware.html +#usr/share/doc/libvirt-1.2.18.3/html/drvxen.html +#usr/share/doc/libvirt-1.2.18.3/html/errors.html +#usr/share/doc/libvirt-1.2.18.3/html/et.png +#usr/share/doc/libvirt-1.2.18.3/html/firewall.html +#usr/share/doc/libvirt-1.2.18.3/html/footer_corner.png +#usr/share/doc/libvirt-1.2.18.3/html/footer_pattern.png +#usr/share/doc/libvirt-1.2.18.3/html/format.html +#usr/share/doc/libvirt-1.2.18.3/html/formatcaps.html +#usr/share/doc/libvirt-1.2.18.3/html/formatdomain.html +#usr/share/doc/libvirt-1.2.18.3/html/formatdomaincaps.html +#usr/share/doc/libvirt-1.2.18.3/html/formatnetwork.html +#usr/share/doc/libvirt-1.2.18.3/html/formatnode.html +#usr/share/doc/libvirt-1.2.18.3/html/formatnwfilter.html +#usr/share/doc/libvirt-1.2.18.3/html/formatsecret.html +#usr/share/doc/libvirt-1.2.18.3/html/formatsnapshot.html +#usr/share/doc/libvirt-1.2.18.3/html/formatstorage.html +#usr/share/doc/libvirt-1.2.18.3/html/formatstorageencryption.html +#usr/share/doc/libvirt-1.2.18.3/html/generic.css +#usr/share/doc/libvirt-1.2.18.3/html/goals.html +#usr/share/doc/libvirt-1.2.18.3/html/governance.html +#usr/share/doc/libvirt-1.2.18.3/html/hacking.html +#usr/share/doc/libvirt-1.2.18.3/html/hooks.html +#usr/share/doc/libvirt-1.2.18.3/html/html +#usr/share/doc/libvirt-1.2.18.3/html/html/home.png +#usr/share/doc/libvirt-1.2.18.3/html/html/index.html +#usr/share/doc/libvirt-1.2.18.3/html/html/left.png +#usr/share/doc/libvirt-1.2.18.3/html/html/libvirt-libvirt-domain-snapshot.html +#usr/share/doc/libvirt-1.2.18.3/html/html/libvirt-libvirt-domain.html +#usr/share/doc/libvirt-1.2.18.3/html/html/libvirt-libvirt-event.html +#usr/share/doc/libvirt-1.2.18.3/html/html/libvirt-libvirt-host.html +#usr/share/doc/libvirt-1.2.18.3/html/html/libvirt-libvirt-interface.html +#usr/share/doc/libvirt-1.2.18.3/html/html/libvirt-libvirt-network.html +#usr/share/doc/libvirt-1.2.18.3/html/html/libvirt-libvirt-nodedev.html +#usr/share/doc/libvirt-1.2.18.3/html/html/libvirt-libvirt-nwfilter.html +#usr/share/doc/libvirt-1.2.18.3/html/html/libvirt-libvirt-secret.html +#usr/share/doc/libvirt-1.2.18.3/html/html/libvirt-libvirt-storage.html +#usr/share/doc/libvirt-1.2.18.3/html/html/libvirt-libvirt-stream.html +#usr/share/doc/libvirt-1.2.18.3/html/html/libvirt-virterror.html +#usr/share/doc/libvirt-1.2.18.3/html/html/right.png +#usr/share/doc/libvirt-1.2.18.3/html/html/up.png +#usr/share/doc/libvirt-1.2.18.3/html/hvsupport.html +#usr/share/doc/libvirt-1.2.18.3/html/index.html +#usr/share/doc/libvirt-1.2.18.3/html/internals +#usr/share/doc/libvirt-1.2.18.3/html/internals.html +#usr/share/doc/libvirt-1.2.18.3/html/internals/command.html +#usr/share/doc/libvirt-1.2.18.3/html/internals/locking.html +#usr/share/doc/libvirt-1.2.18.3/html/internals/oomtesting.html +#usr/share/doc/libvirt-1.2.18.3/html/internals/rpc.html +#usr/share/doc/libvirt-1.2.18.3/html/intro.html +#usr/share/doc/libvirt-1.2.18.3/html/java.html +#usr/share/doc/libvirt-1.2.18.3/html/libvirt-daemon-arch.png +#usr/share/doc/libvirt-1.2.18.3/html/libvirt-driver-arch.png +#usr/share/doc/libvirt-1.2.18.3/html/libvirt-header-bg.png +#usr/share/doc/libvirt-1.2.18.3/html/libvirt-header-logo.png +#usr/share/doc/libvirt-1.2.18.3/html/libvirt-net-logical.png +#usr/share/doc/libvirt-1.2.18.3/html/libvirt-net-physical.png +#usr/share/doc/libvirt-1.2.18.3/html/libvirt-object-model.png +#usr/share/doc/libvirt-1.2.18.3/html/libvirt.css +#usr/share/doc/libvirt-1.2.18.3/html/libvirtLogo.png +#usr/share/doc/libvirt-1.2.18.3/html/locking-lockd.html +#usr/share/doc/libvirt-1.2.18.3/html/locking-sanlock.html +#usr/share/doc/libvirt-1.2.18.3/html/locking.html +#usr/share/doc/libvirt-1.2.18.3/html/logging.html +#usr/share/doc/libvirt-1.2.18.3/html/madeWith.png +#usr/share/doc/libvirt-1.2.18.3/html/main.css +#usr/share/doc/libvirt-1.2.18.3/html/migration-managed-direct.png +#usr/share/doc/libvirt-1.2.18.3/html/migration-managed-p2p.png +#usr/share/doc/libvirt-1.2.18.3/html/migration-native.png +#usr/share/doc/libvirt-1.2.18.3/html/migration-tunnel.png +#usr/share/doc/libvirt-1.2.18.3/html/migration-unmanaged-direct.png +#usr/share/doc/libvirt-1.2.18.3/html/migration.html +#usr/share/doc/libvirt-1.2.18.3/html/news.html +#usr/share/doc/libvirt-1.2.18.3/html/node.gif +#usr/share/doc/libvirt-1.2.18.3/html/pending.html +#usr/share/doc/libvirt-1.2.18.3/html/php.html +#usr/share/doc/libvirt-1.2.18.3/html/python.html +#usr/share/doc/libvirt-1.2.18.3/html/relatedlinks.html +#usr/share/doc/libvirt-1.2.18.3/html/remote.html +#usr/share/doc/libvirt-1.2.18.3/html/secureusage.html +#usr/share/doc/libvirt-1.2.18.3/html/securityprocess.html +#usr/share/doc/libvirt-1.2.18.3/html/sitemap.html +#usr/share/doc/libvirt-1.2.18.3/html/storage.html +#usr/share/doc/libvirt-1.2.18.3/html/testapi.html +#usr/share/doc/libvirt-1.2.18.3/html/testsuites.html +#usr/share/doc/libvirt-1.2.18.3/html/testtck.html +#usr/share/doc/libvirt-1.2.18.3/html/todo.html +#usr/share/doc/libvirt-1.2.18.3/html/uri.html +#usr/share/doc/libvirt-1.2.18.3/html/virshcmdref.html +#usr/share/doc/libvirt-1.2.18.3/html/windows.html +#usr/share/gtk-doc/html/libvirt +#usr/share/gtk-doc/html/libvirt/general.html +#usr/share/gtk-doc/html/libvirt/home.png +#usr/share/gtk-doc/html/libvirt/index.html +#usr/share/gtk-doc/html/libvirt/left.png +#usr/share/gtk-doc/html/libvirt/libvirt-virterror.html +#usr/share/gtk-doc/html/libvirt/libvirt.devhelp +#usr/share/gtk-doc/html/libvirt/right.png +#usr/share/gtk-doc/html/libvirt/style.css +#usr/share/gtk-doc/html/libvirt/up.png +#usr/share/libvirt +#usr/share/libvirt/api +usr/share/libvirt/api/libvirt-api.xml +usr/share/libvirt/api/libvirt-lxc-api.xml +usr/share/libvirt/api/libvirt-qemu-api.xml +usr/share/libvirt/cpu_map.xml +#usr/share/libvirt/libvirtLogo.png +#usr/share/libvirt/schemas +usr/share/libvirt/schemas/basictypes.rng +usr/share/libvirt/schemas/capability.rng +usr/share/libvirt/schemas/domain.rng +usr/share/libvirt/schemas/domaincaps.rng +usr/share/libvirt/schemas/domaincommon.rng +usr/share/libvirt/schemas/domainsnapshot.rng +usr/share/libvirt/schemas/interface.rng +usr/share/libvirt/schemas/network.rng +usr/share/libvirt/schemas/networkcommon.rng +usr/share/libvirt/schemas/nodedev.rng +usr/share/libvirt/schemas/nwfilter.rng +usr/share/libvirt/schemas/secret.rng +usr/share/libvirt/schemas/storagecommon.rng +usr/share/libvirt/schemas/storagepool.rng +usr/share/libvirt/schemas/storagevol.rng +#usr/share/man/man1/virsh.1 +#usr/share/man/man1/virt-host-validate.1 +#usr/share/man/man1/virt-pki-validate.1 +#usr/share/man/man1/virt-xml-validate.1 +#usr/share/man/man8/libvirtd.8 +#usr/share/man/man8/virtlockd.8 +#var/cache/libvirt +var/cache/libvirt/qemu +#var/lib/libvirt +var/lib/libvirt/boot +var/lib/libvirt/filesystems +var/lib/libvirt/images +#var/lib/libvirt/lockd +var/lib/libvirt/lockd/files +var/lib/libvirt/qemu +#var/log/libvirt +#var/log/libvirt/lxc +var/log/libvirt/qemu +#var/log/libvirt/uml diff --git a/lfs/libvirt b/lfs/libvirt new file mode 100644 index 0000000..b18364b --- /dev/null +++ b/lfs/libvirt @@ -0,0 +1,93 @@ +############################################################################### +# # +# IPFire.org - A linux based firewall # +# Copyright (C) 2007-2016 IPFire Team info@ipfire.org # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see http://www.gnu.org/licenses/. # +# # +############################################################################### + +############################################################################### +# Definitions +############################################################################### + +include Config + +VER = 1.2.18.3 + +THISAPP = libvirt-$(VER) +DL_FILE = $(THISAPP).tar.gz +DL_FROM = $(URL_IPFIRE) +DIR_APP = $(DIR_SRC)/$(THISAPP) +TARGET = $(DIR_INFO)/$(THISAPP) +SUP_ARCH = i586 x86_64 +PROG = libvirt +PAK_VER = 1 + +DEPS = "libpciaccess libyajl ncat qemu" + +############################################################################### +# Top-level Rules +############################################################################### + +objects = $(DL_FILE) + +$(DL_FILE) = $(DL_FROM)/$(DL_FILE) + +$(DL_FILE)_MD5 = bcb0738ff66972ddb25cfe0d086c5c37 + +install : $(TARGET) +check : $(patsubst %,$(DIR_CHK)/%,$(objects)) + +download :$(patsubst %,$(DIR_DL)/%,$(objects)) + +md5 : $(subst %,%_MD5,$(objects)) + +dist:. + $(PAK) + +############################################################################### +# Downloading, checking, md5sum +############################################################################### + +$(patsubst %,$(DIR_CHK)/%,$(objects)) : + @$(CHECK) + +$(patsubst %,$(DIR_DL)/%,$(objects)) : + @$(LOAD) + +$(subst %,%_MD5,$(objects)) : + @$(MD5) + +############################################################################### +# Installation Details +############################################################################### + +$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) + @$(PREBUILD) + @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE) + cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/libvirt/0001-Change-default-behavior-of-libvirt-guests.sh-for-IPF.patch + cd $(DIR_APP) && ./configure --prefix=/usr --localstatedir=/var --sysconfdir=/etc \ + --with-openssl --without-sasl \ + --without-uml --without-vbox --without-lxc --without-esx --without-vmware --without-openvz \ + --without-firewalld --without-network -with-interface --with-virtualport --with-macvtap \ + --disable-nls --without-avahi --without-test-suite -without-dbus \ + --with-storage-dir --without-storage-fs --without-storage-lvm --without-storage-iscsi \ + --without-storage-scsi --without-storage-mpath --without-storage-disk --without-storage-rbd --without-storage-sheepdog --without-storage-gluster --without-storage-zfs + cd $(DIR_APP) && make $(MAKETUNING) $(EXTRA_MAKE) + cd $(DIR_APP) && make install + install -v -m 754 $(DIR_SRC)/src/initscripts/init.d/libvirtd /etc/rc.d/init.d/libvirtd + mv /usr/libexec/libvirt-guests.sh /etc/rc.d/init.d/libvirt-guests + @rm -rf $(DIR_APP) + @$(POSTBUILD) diff --git a/make.sh b/make.sh index 3399f28..828a7d2 100755 --- a/make.sh +++ b/make.sh @@ -865,6 +865,7 @@ buildipfire() { ipfiremake util-macros ipfiremake libpciaccess ipfiremake libyajl + ipfiremake libvirt }
buildinstaller() { diff --git a/src/initscripts/init.d/libvirtd b/src/initscripts/init.d/libvirtd new file mode 100644 index 0000000..f97d208 --- /dev/null +++ b/src/initscripts/init.d/libvirtd @@ -0,0 +1,49 @@ +#!/bin/sh +######################################################################## +# Begin $rc_base/init.d/libvirtd +# +# Description : libvirtd init script +# +# Authors : Jonatan Schlag - jonatan.schlag@ipfire.org +# +# Version : 01.00 +# +# Notes : +# +######################################################################## + +. /etc/sysconfig/rc +. $rc_functions + +case $1 in + start) + boot_mesg "Load required kernel modules for Libvirt" + modprobe tun + evaluate_retval + boot_mesg "Starting Libvirt Daemon..." + loadproc /usr/sbin/libvirtd -d + + ;; + + stop) + boot_mesg "Stopping Libvirt Daemon..." + killproc /usr/sbin/libvirtd + ;; + + restart) + $0 stop + sleep 1 + $0 start + ;; + + status) + statusproc /usr/sbin/libvirtd + ;; + + *) + echo "Usage: $0 {start|stop|restart|status}" + exit 1 + ;; +esac + +# End $rc_base/init.d/libvirtd diff --git a/src/paks/libvirt/install.sh b/src/paks/libvirt/install.sh new file mode 100644 index 0000000..2832197 --- /dev/null +++ b/src/paks/libvirt/install.sh @@ -0,0 +1,33 @@ +#!/bin/bash +############################################################################ +# # +# This file is part of the IPFire Firewall. # +# # +# IPFire is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation; either version 2 of the License, or # +# (at your option) any later version. # +# # +# IPFire is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with IPFire; if not, write to the Free Software # +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # +# # +# Copyright (C) 2007 IPFire-Team info@ipfire.org. # +# # +############################################################################ +# +. /opt/pakfire/lib/functions.sh +extract_files +start_service --delay 300 --background ${NAME} +ln -svf /etc/init.d/libvirtd /etc/rc.d/rc0.d/K20libvirtd +ln -svf /etc/init.d/libvirtd /etc/rc.d/rc3.d/S70libvirtd +ln -svf /etc/init.d/libvirtd /etc/rc.d/rc6.d/K20libvirtd + +ln -svf /etc/init.d/libvirt-guests /etc/rc.d/rc0.d/K19libvirt-guests +ln -svf /etc/init.d/libvirt-guests /etc/rc.d/rc3.d/S71libvirt-guests +ln -svf /etc/init.d/libvirt-guests /etc/rc.d/rc6.d/K19libvirt-guests diff --git a/src/paks/libvirt/uninstall.sh b/src/paks/libvirt/uninstall.sh new file mode 100644 index 0000000..a558460 --- /dev/null +++ b/src/paks/libvirt/uninstall.sh @@ -0,0 +1,30 @@ +#!/bin/bash +############################################################################ +# # +# This file is part of the IPFire Firewall. # +# # +# IPFire is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation; either version 2 of the License, or # +# (at your option) any later version. # +# # +# IPFire is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with IPFire; if not, write to the Free Software # +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # +# # +# Copyright (C) 2007 IPFire-Team info@ipfire.org. # +# # +############################################################################ +# +. /opt/pakfire/lib/functions.sh +stop_service ${NAME} +remove_files + +rm -f /etc/rc.d/rc*.d/*libvirt-guests +rm -f /etc/rc.d/rc*.d/*libvirtd + diff --git a/src/paks/libvirt/update.sh b/src/paks/libvirt/update.sh new file mode 100644 index 0000000..d0b3ba1 --- /dev/null +++ b/src/paks/libvirt/update.sh @@ -0,0 +1,27 @@ +#!/bin/bash +############################################################################ +# # +# This file is part of the IPFire Firewall. # +# # +# IPFire is free software; you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation; either version 2 of the License, or # +# (at your option) any later version. # +# # +# IPFire is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with IPFire; if not, write to the Free Software # +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # +# # +# Copyright (C) 2007 IPFire-Team info@ipfire.org. # +# # +############################################################################ +# +. /opt/pakfire/lib/functions.sh +./uninstall.sh +./install.sh + diff --git a/src/patches/libvirt/0001-Change-default-behavior-of-libvirt-guests.sh-for-IPF.patch b/src/patches/libvirt/0001-Change-default-behavior-of-libvirt-guests.sh-for-IPF.patch new file mode 100644 index 0000000..12af9a5 --- /dev/null +++ b/src/patches/libvirt/0001-Change-default-behavior-of-libvirt-guests.sh-for-IPF.patch @@ -0,0 +1,30 @@ +From a50fa0195e36773d57593006152828ce2c0523fd Mon Sep 17 00:00:00 2001 +From: Jonatan Schlag jonatan.schlag@ipfire.org +Date: Fri, 6 May 2016 11:38:08 +0200 +Subject: [PATCH] Change default behavior of libvirt-guests.sh for IPFire + +Signed-off-by: Jonatan Schlag jonatan.schlag@ipfire.org +--- + tools/libvirt-guests.sh.in | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/tools/libvirt-guests.sh.in b/tools/libvirt-guests.sh.in +index 7f74b85..87aceb7 100644 +--- a/tools/libvirt-guests.sh.in ++++ b/tools/libvirt-guests.sh.in +@@ -30,9 +30,9 @@ test ! -r "$sysconfdir"/rc.d/init.d/functions || + + export TEXTDOMAIN="@PACKAGE@" TEXTDOMAINDIR="@localedir@" + +-URIS=default +-ON_BOOT=start +-ON_SHUTDOWN=suspend ++URIS=qemu:///system ++ON_BOOT=ignore ++ON_SHUTDOWN=shutdown + SHUTDOWN_TIMEOUT=300 + PARALLEL_SHUTDOWN=0 + START_DELAY=0 +-- +2.1.4 +