mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-10 19:15:54 +02:00
This is the update of libvirt to the latest version 2.1. The most important change from a packager view is the new virtlogd daemon. This daemon handles the qemu output and wrote it to log files. The require some changes: - A new init script to start, stop restart the daemon called virtlogd. The daemon is restart with SIGUSR1 (this is important because the daemon keeps all pipelines etc. open). This introduces a problem with the uninstall.sh install.sh script. It is not possible to stop the daemon while virtual machines are running, so the script update.sh execute from now not uninstall.sh and install.sh instead it contains all steps from uninstall.sh install.sh expect the start / stop routine for virtlogd. The daemon is just restarted after the update, which makes sure that all changes take effect. - new symlinks in the uninstall.sh and install.sh script and some root file changes because of the new virtlogd init script. - the archive format changes from tar.gz to tar.xz For Changelogs see: https://libvirt.org/news-2015.html https://libvirt.org/news.html (2017 and later: https://libvirt.org/news-2016.html ) Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org> Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
99 lines
4.4 KiB
Plaintext
99 lines
4.4 KiB
Plaintext
###############################################################################
|
|
# #
|
|
# 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 = 2.1.0
|
|
|
|
THISAPP = libvirt-$(VER)
|
|
DL_FILE = $(THISAPP).tar.xz
|
|
DL_FROM = $(URL_IPFIRE)
|
|
DIR_APP = $(DIR_SRC)/$(THISAPP)
|
|
TARGET = $(DIR_INFO)/$(THISAPP)
|
|
SUP_ARCH = i586 x86_64
|
|
PROG = libvirt
|
|
PAK_VER = 10
|
|
|
|
DEPS = "libpciaccess libyajl ncat qemu"
|
|
|
|
###############################################################################
|
|
# Top-level Rules
|
|
###############################################################################
|
|
|
|
objects = $(DL_FILE)
|
|
|
|
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
|
|
|
|
$(DL_FILE)_MD5 = fd1c054a8b59235e877efb728de79386
|
|
|
|
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 Jxf $(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) && patch -Np1 -i $(DIR_SRC)/src/patches/libvirt/0002-Change-options-in-libvirtd.conf-for-IPFire.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-qemu-user=nobody --with-qemu-group=kvm \
|
|
--with-storage-dir --with-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
|
|
install -v -m 754 $(DIR_SRC)/src/initscripts/init.d/virtlogd /etc/rc.d/init.d/virtlogd
|
|
mv /usr/libexec/libvirt-guests.sh /etc/rc.d/init.d/libvirt-guests
|
|
# Backup
|
|
install -v -m 644 $(DIR_SRC)/config/backup/includes/libvirt /var/ipfire/backup/addons/includes/libvirt
|
|
@rm -rf $(DIR_APP)
|
|
@$(POSTBUILD)
|