[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Custom libvirt (was: Jessie: upgrading libvirt-daemon-system now installs systemd, removes sysvinit-core?)



Me wrote:

> [libvirt 1.2.9-3 dependencies]

Well, I ended up compiling my own libvirt package(s) for Jessie.
Posting here, maybe this is of use to someone.


1.
Grab your favourite build environment
(I used pbuilder / dpkg-buildpackage)

2.
Install build dependencies (those below are matched to the attached
diffs, and to my build environment - your mileage may vary)

augeas-tools dwarves ebtables iptables kmod libapparmor-dev libaudit-dev \
libcap-ng-dev libdevmapper-dev libgcrypt20-dev libgnutls28-dev \
libncurses5-dev libnetcf-dev libnl-3-dev libnl-route-3-dev libnuma-dev \
libparted0-dev libpcap0.8-dev libpciaccess-dev libreadline-dev \
libsanlock-dev libsasl2-dev libssh2-1-dev libudev-dev libxen-dev \
libxml2-dev libxml2-utils libyajl-dev lvm2 netcat-openbsd open-iscsi \
openssh-client parted pkg-config qemu-utils radvd systemtap-sdt-dev \
uuid-dev zlib1g-dev

3.
Install & validate source package

4.
Remove 'qemu-use-systemd-s-TerminateMachine-to-kill-all-proc.patch'
('quilt' is your friend)

5.
See attached patches for a more lightweight sample configuration
(again, works for me but might not work for you)

6.
Build. Install. Profit.



Ingmar

--
assembled from 100% recycled electrons

--- control.org~	2014-10-04 08:48:54.000000000 +0200
+++ control	2014-11-14 17:23:28.823218320 +0100
@@ -5,14 +5,13 @@
 Uploaders: Guido Günther <agx@sigxcpu.org>, Laurent Léonard <laurent@open-minds.org>
 Build-Depends:
  debhelper (>= 7),
- dh-systemd (>= 1.18),
+ pkg-config,
  libxml2-dev,
  libncurses5-dev,
  libreadline-dev,
  zlib1g-dev,
  libgcrypt20-dev,
  libgnutls28-dev,
- libavahi-client-dev,
  libsasl2-dev,
  libxen-dev (>= 4.3) [i386 amd64],
  lvm2 [linux-any],
@@ -24,7 +23,6 @@
  libudev-dev [linux-any],
  libpciaccess-dev,
  kmod [linux-any],
- policykit-1 (>= 0.105-4~),
  libcap-ng-dev [linux-any],
  libnl-3-dev [linux-any],
  libnl-route-3-dev [linux-any],
@@ -35,24 +33,15 @@
  libnetcf-dev (>= 1:0.2.3-3~) [linux-any],
  libsanlock-dev [linux-any],
  libaudit-dev [linux-any],
- libselinux1-dev (>= 2.0.82) [linux-any],
  libapparmor-dev [linux-any],
- libsystemd-daemon-dev [linux-any],
  systemtap-sdt-dev [amd64 armel armhf i386 ia64 powerpc s390],
-# for --with-storage-sheepdog
- sheepdog [linux-any],
-# for --with-storage-rados
- librbd-dev [linux-any],
- librados-dev [linux-any],
-# for lxc fuse support
- libfuse-dev [linux-any],
 # for libssh2 connection URIs
  libssh2-1-dev,
 # For "make check"
  augeas-tools,
  dwarves,
  libxml2-utils,
- dnsmasq-base,
+# dnsmasq-base,
  openssh-client,
  netcat-openbsd,
  ebtables [linux-any],
@@ -76,7 +65,7 @@
  Libvirt is a C toolkit to interact with the virtualization capabilities
  of recent versions of Linux (and other OSes). The library aims at providing
  a long term stable C API for different virtualization mechanisms. It currently
- supports QEMU, KVM, XEN, OpenVZ, LXC, and VirtualBox.
+ supports QEMU, KVM, XEN and VirtualBox.
  .
  This is a transitional package. You can safely remove it.
 
@@ -93,7 +82,7 @@
  Libvirt is a C toolkit to interact with the virtualization capabilities
  of recent versions of Linux (and other OSes). The library aims at providing
  a long term stable C API for different virtualization mechanisms. It currently
- supports QEMU, KVM, XEN, OpenVZ, LXC, and VirtualBox.
+ supports QEMU, KVM, XEN and VirtualBox.
  .
  This package contains the libvirt shell virsh and other client binaries.
 
@@ -113,7 +102,7 @@
  Libvirt is a C toolkit to interact with the virtualization capabilities
  of recent versions of Linux (and other OSes). The library aims at providing
  a long term stable C API for different virtualization mechanisms. It currently
- supports QEMU, KVM, XEN, OpenVZ, LXC, and VirtualBox.
+ supports QEMU, KVM, XEN and VirtualBox.
  .
  This package contains the libvirt-daemon.
 
@@ -127,7 +116,6 @@
  libvirt-clients (= ${binary:Version}),
  libvirt-daemon (= ${binary:Version}),
  logrotate,
- policykit-1,
 Recommends:
  bridge-utils,
  dmidecode,
@@ -146,7 +134,7 @@
  Libvirt is a C toolkit to interact with the virtualization capabilities
  of recent versions of Linux (and other OSes). The library aims at providing
  a long term stable C API for different virtualization mechanisms. It currently
- supports QEMU, KVM, XEN, OpenVZ, LXC, and VirtualBox.
+ supports QEMU, KVM, XEN and VirtualBox.
  .
  This package contains the configuration files to run the libvirt daemon as a
  system service.
@@ -160,7 +148,7 @@
  Libvirt is a C toolkit to interact with the virtualization capabilities
  of recent versions of Linux (and other OSes). The library aims at providing
  a long term stable C API for different virtualization mechanisms. It currently
- supports QEMU, KVM, XEN, OpenVZ, LXC, and VirtualBox.
+ supports QEMU, KVM, XEN and VirtualBox.
 
 Package: libvirt0-dbg
 Architecture: any
@@ -171,7 +159,7 @@
  Libvirt is a C toolkit to interact with the virtualization capabilities
  of recent versions of Linux (and other OSes). The library aims at providing
  a long term stable C API for different virtualization mechanisms. It currently
- supports QEMU, KVM, XEN, OpenVZ, LXC, and VirtualBox.
+ supports QEMU, KVM, XEN and VirtualBox.
  .
  This package contains the debugging symbols.
 
@@ -184,7 +172,7 @@
  Libvirt is a C toolkit to interact with the virtualization capabilities
  of recent versions of Linux (and other OSes). The library aims at providing
  a long term stable C API for different virtualization mechanisms. It currently
- supports QEMU, KVM, XEN, OpenVZ, LXC, and VirtualBox.
+ supports QEMU, KVM, XEN and VirtualBox.
  .
  This package contains the documentation.
 
@@ -198,7 +186,7 @@
  Libvirt is a C toolkit to interact with the virtualization capabilities
  of recent versions of Linux (and other OSes). The library aims at providing
  a long term stable C API for different virtualization mechanisms. It currently
- supports QEMU, KVM, XEN, OpenVZ, LXC, and VirtualBox.
+ supports QEMU, KVM, XEN and VirtualBox.
  .
  This package contains the header files and static libraries which are
  needed for developing the applications with libvirt.
@@ -215,7 +203,7 @@
  Libvirt is a C toolkit to interact with the virtualization capabilities
  of recent versions of Linux (and other OSes). The library aims at providing
  a long term stable C API for different virtualization mechanisms. It currently
- supports QEMU, KVM, XEN, OpenVZ, LXC, and VirtualBox.
+ supports QEMU, KVM, XEN and VirtualBox.
  .
  This package contains the sanlock plugin.
 


--- rules.org~	2014-10-14 18:32:56.000000000 +0200
+++ rules	2014-11-14 17:20:58.159218320 +0100
@@ -19,24 +19,32 @@
   WITH_STORAGE_LVM    = --with-storage-lvm
   WITH_STORAGE_ISCSI  = --with-storage-iscsi
   WITH_STORAGE_DISK   =	--with-storage-disk
-  WITH_STORAGE_SHEEPDOG = --with-storage-sheepdog
-  WITH_STORAGE_RBD    = --with-storage-rbd
+#  WITH_STORAGE_SHEEPDOG = --with-storage-sheepdog
+  WITH_STORAGE_SHEEPDOG = --without-storage-sheepdog
+#  WITH_STORAGE_RBD    = --with-storage-rbd
+  WITH_STORAGE_RBD    = --without-storage-rbd
   WITH_UDEV           = --with-udev
   WITH_CAPNG          = --with-capng
-  WITH_POLKIT         = --with-polkit
+#  WITH_POLKIT         = --with-polkit
+  WITH_POLKIT         = --without-polkit
   WITH_MACVTAP        = --with-macvtap
   WITH_NETWORK        = --with-network
   WITH_QEMU           = --with-qemu
-  WITH_OPENVZ         = --with-openvz
+#  WITH_OPENVZ         = --with-openvz
+  WITH_OPENVZ         = --without-openvz
   WITH_NETCF          = --with-netcf
   WITH_SANLOCK        = --with-sanlock
-  WITH_INIT_SCRIPT    =	--with-init-script=systemd
-  WITH_SYSTEMD        = --with-systemd-daemon
+#  WITH_INIT_SCRIPT    =	--with-init-script=systemd
+  WITH_INIT_SCRIPT    =	--with-init-script=none
+#  WITH_SYSTEMD        = --with-systemd-daemon
+  WITH_SYSTEMD        = --without-systemd-daemon
   WITH_AUDIT          = --with-audit
-  WITH_SELINUX        = --with-selinux --with-secdriver-selinux --with-selinux-mount=/sys/fs/selinux
+#  WITH_SELINUX        = --with-selinux --with-secdriver-selinux --with-selinux-mount=/sys/fs/selinux
+  WITH_SELINUX        = --without-selinux
   WITH_APPARMOR       = --with-apparmor --with-secdriver-apparmor --with-apparmor-profiles
   ifneq (,$(findstring $(DEB_HOST_ARCH), amd64 armel armhf i386 ia64 powerpc s390))
-      WITH_DTRACE     = --with-dtrace
+#      WITH_DTRACE     = --with-dtrace
+      WITH_DTRACE     = --without-dtrace
   else
       WITH_DTRACE     = --without-dtrace
   endif
@@ -48,7 +56,7 @@
   ifneq (,$(findstring $(DEB_HOST_ARCH), ia64))
       WITH_LXC        = --without-lxc
   else
-      WITH_LXC        = --with-lxc
+      WITH_LXC        = --without-lxc
   endif
 else
   WITH_STORAGE_LVM    = --without-storage-lvm
@@ -85,7 +93,7 @@
 	--with-qemu-user=libvirt-qemu  \
 	--with-qemu-group=libvirt-qemu \
 	$(WITH_OPENVZ)		 \
-	--with-avahi             \
+	--without-avahi          \
 	--with-sasl              \
 	--with-yajl              \
 	--with-ssh2		 \
@@ -104,7 +112,6 @@
 	--without-esx		 \
 	--without-phyp           \
 	$(WITH_CAPNG)		 \
-	--enable-debug		 \
 	$(WITH_MACVTAP)		 \
 	$(WITH_NETWORK)		 \
 	$(WITH_NETCF)		 \
@@ -116,7 +123,8 @@
 	$(WITH_AUDIT)            \
 	--without-hal            \
 	--without-firewalld      \
-	--without-attr
+	--without-attr           \
+	--disable-nls
 
 DEB_BUILDDIR := $(CURDIR)/debian/build
 LOGROTATE = $(basename $(basename $(notdir $(wildcard daemon/libvirtd*.logrotate.in))))
@@ -146,26 +154,27 @@
 	cp tools/libvirt-guests.sysconf \
 	    debian/libvirt-daemon-system.libvirt-guests.default
 	# Add our backward compat polkit rule
-	cp debian/polkit/60-libvirt.rules \
-	    debian/libvirt-daemon-system/usr/share/polkit-1/rules.d/
-	cp debian/polkit/60-libvirt.pkla \
-	    debian/libvirt-daemon-system/var/lib/polkit-1/localauthority/10-vendor.d/
+	#cp debian/polkit/60-libvirt.rules \
+	#    debian/libvirt-daemon-system/usr/share/polkit-1/rules.d/
+	#cp debian/polkit/60-libvirt.pkla \
+	#    debian/libvirt-daemon-system/var/lib/polkit-1/localauthority/10-vendor.d/
 ifneq (,$(findstring $(DEB_HOST_ARCH_OS), linux))
 	# Linux supports more nice things:
-	dh_install -p libvirt-daemon-system usr/lib/systemd/system lib/systemd/
+	#dh_install -p libvirt-daemon-system usr/lib/systemd/system lib/systemd/
 	dh_install -p libvirt-daemon-system usr/lib/libvirt/virt-aa-helper
 	dh_install -p libvirt-daemon-system etc/apparmor.d
-	dh_install -p libvirt-daemon-system usr/share/polkit-1
+	#dh_install -p libvirt-daemon-system usr/share/polkit-1
 	# Not all linux arches have systemtap yet
 	mkdir -p debian/tmp/usr/share/systemtap
 	dh_install -p libvirt-daemon-system usr/share/systemtap
-	dh_install -p libvirt-daemon-system etc/libvirt/lxc.conf
+	#dh_install -p libvirt-daemon-system etc/libvirt/lxc.conf
 	dh_install -p libvirt-daemon-system etc/libvirt/qemu.conf
 	dh_install -p libvirt-daemon-system etc/libvirt/qemu-lockd.conf
 	dh_install -p libvirt-daemon-system etc/libvirt/qemu-sanlock.conf
 	dh_install -p libvirt-daemon-system etc/libvirt/qemu/networks/
 	dh_install -p libvirt-daemon-system etc/libvirt/nwfilter/
-	dh_install -p libvirt-clients etc/libvirt/virt-login-shell.conf
+	# maybe disabling this is suboptimal?
+	#dh_install -p libvirt-clients etc/libvirt/virt-login-shell.conf
 endif
 
 	for l in $(LOGROTATE); do \
@@ -180,11 +189,11 @@
 	rm -r debian/libvirt-daemon/usr/share/libvirt/api/
 
 override_dh_installinit:
-	dh_systemd_enable
+	#dh_systemd_enable
 	dh_installinit -p libvirt-daemon-system --name=libvirtd --restart-after-upgrade -- defaults 28 72
 	dh_installinit -p libvirt-daemon-system --name=libvirt-guests --no-restart-on-upgrade -- defaults 29 71
-	dh_systemd_start -p libvirt-daemon-system --restart-after-upgrade libvirtd.service
-	dh_systemd_start -p libvirt-daemon-system --no-restart-on-upgrade libvirt-guests.service virtlockd.socket virtlockd.service
+	#dh_systemd_start -p libvirt-daemon-system --restart-after-upgrade libvirtd.service
+	#dh_systemd_start -p libvirt-daemon-system --no-restart-on-upgrade libvirt-guests.service virtlockd.socket virtlockd.service
 
 override_dh_installdocs:
 	dh_installdocs



Reply to: