Skip to content

Commit

Permalink
Revert "app-emulation/libvirt: drop old versions 1.2.21, 1.3.1"
Browse files Browse the repository at this point in the history
This reverts commit 31eba66.
  • Loading branch information
tamiko committed Jun 30, 2016
1 parent 3d8cc6f commit 07b76b1
Show file tree
Hide file tree
Showing 7 changed files with 1,301 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app-emulation/libvirt/Manifest
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
DIST libvirt-1.2.21-20151222.tar.xz 1684 SHA256 6c97f288470ec58bcbe98507563c6a191892c6f8813a7b9688c09b823934cbe5 SHA512 4fd43f0e12434b78ac3e671ad8eb0e402d384cff6278f6d0db322a068c2c8807c7c7f7e5774aa9d19e2a85e49f6d9888908b32fca5fc04980134edaccba0afe2 WHIRLPOOL 2bfbc3cbf1ca44a2bb06ddf2e8eabeb116165560b9c73d649d7b8cc9baba851f5e9246414bfc2c4740f27d0d0d42b6176eaec43b05e8c1e54de2804150c2cde1
DIST libvirt-1.2.21.tar.gz 29848954 SHA256 8d406582f5fe88d739d1d83e0ba7ac7f91f5a8da4be82162ab85631744d8925b SHA512 5c15d0ba5d75c13f735c6a60dfdbad007426f77e113f95894d520f7fc358fa4361d5cce7bb9a548a436f323b845f13b8940abbad568b8b146418430068bb970e WHIRLPOOL d53bbb07c85b3aa2d9b0f38ff2edd3cd0a2a5300627f3e2f0a82bc057303617cab9d6f1d8a9a771bd968b0496d38d3a39a0154f88bdca44dda359a65fdc2c650
DIST libvirt-1.3.1.tar.gz 29900143 SHA256 a5d43fbed34d31eeffc641d2ac9b6026a57bf1a4fa74d0fa19a9891d9ec2c21a SHA512 a109c09d947f7c5e924fdbc9c9b6c0a9d6ff64d9411aedd9a3e710d20f749b088ff9895e882dd888b88bfea7724a8933534be4078f16cb9d2047da761515e804 WHIRLPOOL 62fb8486bfa53d55b397d9a90750d32a83f0a73cf2e6685f296489390abf9c62efc69fecd6d011fc51e9f562f75f5b8ce03208c350e98d20de0a5560721c675e
DIST libvirt-1.3.4.tar.gz 30493908 SHA256 e2396ebebb3f3fdb50429ce8faa99559f6e8e3cc0493d5fa0c1999db189c25bd SHA512 6f85e4cd8a696da729bb88368c608694119258c6ab7f9b99f41c34a6cc4492d9ad90b8ff1574fd4ee6c78c674a3a501db60d1d3ba898f7013321ecc996612919 WHIRLPOOL af4a8a0e3d746f50e0f9d95e3920c023c5bbec0d7c641f43aea580db9b95a793027f7579ecd94625a68b7e3662c328d94b7b2d243afea60a8d2f31cab1cc9319
DIST libvirt-1.3.5.tar.gz 35109092 SHA256 93a23c44eb431da46c9458f95a66e29c9b98e37515d44b6be09e75b35ec94ac8 SHA512 6c6a09623d3d4d426311bfa7039f5e39584d5f891b8e761bbdb3022601ea066b8e1c3f8d609326e8ba4081ae40b7b03086fbc8ba5759d218b8616ec98200a89d WHIRLPOOL 88ac308cc461efff842c27e40263a3b25ce0bc0ca310fb6e9def9126ab893fe43aed01bda9fc3615439ee797c36e2800f741b346e0b3d96aac64e7909c269879
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
diff --git a/examples/apparmor/Makefile.am b/examples/apparmor/Makefile.am
index 7a20e16..c3c67b6 100644
--- a/examples/apparmor/Makefile.am
+++ b/examples/apparmor/Makefile.am
@@ -19,13 +19,13 @@ EXTRA_DIST= \
TEMPLATE.lxc \
libvirt-qemu \
libvirt-lxc \
- usr.lib.libvirt.virt-aa-helper \
+ usr.libexec.virt-aa-helper \
usr.sbin.libvirtd

if WITH_APPARMOR_PROFILES
apparmordir = $(sysconfdir)/apparmor.d/
apparmor_DATA = \
- usr.lib.libvirt.virt-aa-helper \
+ usr.libexec.virt-aa-helper \
usr.sbin.libvirtd \
$(NULL)

diff --git a/examples/apparmor/usr.lib.libvirt.virt-aa-helper b/examples/apparmor/usr.lib.libvirt.virt-aa-helper
deleted file mode 100644
index b34fb35..0000000
--- a/examples/apparmor/usr.lib.libvirt.virt-aa-helper
+++ /dev/null
@@ -1,48 +0,0 @@
-# Last Modified: Mon Apr 5 15:10:27 2010
-#include <tunables/global>
-
-profile virt-aa-helper /usr/{lib,lib64}/libvirt/virt-aa-helper {
- #include <abstractions/base>
-
- # needed for searching directories
- capability dac_override,
- capability dac_read_search,
-
- # needed for when disk is on a network filesystem
- network inet,
-
- deny @{PROC}/[0-9]*/mounts r,
- @{PROC}/[0-9]*/net/psched r,
- owner @{PROC}/[0-9]*/status r,
- @{PROC}/filesystems r,
-
- # for hostdev
- /sys/devices/ r,
- /sys/devices/** r,
-
- /usr/{lib,lib64}/libvirt/virt-aa-helper mr,
- /sbin/apparmor_parser Ux,
-
- /etc/apparmor.d/libvirt/* r,
- /etc/apparmor.d/libvirt/libvirt-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*-[0-9a-f]* rw,
-
- # for backingstore -- allow access to non-hidden files in @{HOME} as well
- # as storage pools
- audit deny @{HOME}/.* mrwkl,
- audit deny @{HOME}/.*/ rw,
- audit deny @{HOME}/.*/** mrwkl,
- audit deny @{HOME}/bin/ rw,
- audit deny @{HOME}/bin/** mrwkl,
- @{HOME}/ r,
- @{HOME}/** r,
- /var/lib/libvirt/images/ r,
- /var/lib/libvirt/images/** r,
- /{media,mnt,opt,srv}/** r,
-
- /**.img r,
- /**.qcow{,2} r,
- /**.qed r,
- /**.vmdk r,
- /**.[iI][sS][oO] r,
- /**/disk{,.*} r,
-}
diff --git a/examples/apparmor/usr.libexec.virt-aa-helper b/examples/apparmor/usr.libexec.virt-aa-helper
new file mode 100644
index 0000000..b34fb35
--- /dev/null
+++ b/examples/apparmor/usr.libexec.virt-aa-helper
@@ -0,0 +1,48 @@
+# Last Modified: Mon Apr 5 15:10:27 2010
+#include <tunables/global>
+
+profile virt-aa-helper /usr/libexec/virt-aa-helper {
+ #include <abstractions/base>
+
+ # needed for searching directories
+ capability dac_override,
+ capability dac_read_search,
+
+ # needed for when disk is on a network filesystem
+ network inet,
+
+ deny @{PROC}/[0-9]*/mounts r,
+ @{PROC}/[0-9]*/net/psched r,
+ owner @{PROC}/[0-9]*/status r,
+ @{PROC}/filesystems r,
+
+ # for hostdev
+ /sys/devices/ r,
+ /sys/devices/** r,
+
+ /usr/libexec/virt-aa-helper mr,
+ /sbin/apparmor_parser Ux,
+
+ /etc/apparmor.d/libvirt/* r,
+ /etc/apparmor.d/libvirt/libvirt-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*-[0-9a-f]*-[0-9a-f]* rw,
+
+ # for backingstore -- allow access to non-hidden files in @{HOME} as well
+ # as storage pools
+ audit deny @{HOME}/.* mrwkl,
+ audit deny @{HOME}/.*/ rw,
+ audit deny @{HOME}/.*/** mrwkl,
+ audit deny @{HOME}/bin/ rw,
+ audit deny @{HOME}/bin/** mrwkl,
+ @{HOME}/ r,
+ @{HOME}/** r,
+ /var/lib/libvirt/images/ r,
+ /var/lib/libvirt/images/** r,
+ /{media,mnt,opt,srv}/** r,
+
+ /**.img r,
+ /**.qcow{,2} r,
+ /**.qed r,
+ /**.vmdk r,
+ /**.[iI][sS][oO] r,
+ /**/disk{,.*} r,
+}
diff --git a/examples/apparmor/usr.sbin.libvirtd b/examples/apparmor/usr.sbin.libvirtd
index 5d606e6..ab2f1a9 100644
--- a/examples/apparmor/usr.sbin.libvirtd
+++ b/examples/apparmor/usr.sbin.libvirtd
@@ -58,8 +58,10 @@
audit deny /sys/kernel/security/apparmor/.* rwxl,
/sys/kernel/security/apparmor/profiles r,
/usr/{lib,lib64}/libvirt/* PUxr,
- /usr/{lib,lib64}/libvirt/libvirt_parthelper ix,
- /usr/{lib,lib64}/libvirt/libvirt_iohelper ix,
+ /usr/libexec/virt-aa-helper PUxr,
+ /usr/libexec/libvirt_lxc PUxr,
+ /usr/libexec/libvirt_parthelper ix,
+ /usr/libexec/libvirt_iohelper ix,
/etc/libvirt/hooks/** rmix,
/etc/xen/scripts/** rmix,

--
2.3.6

112 changes: 112 additions & 0 deletions app-emulation/libvirt/files/libvirt-1.2.9-do_not_use_sysconf.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
From 69372a32025ac16578ad277c6356e89713a3f9f4 Mon Sep 17 00:00:00 2001
From: Matthias Maier <[email protected]>
Date: Mon, 3 Nov 2014 00:51:35 +0100
Subject: [PATCH] Do not use /etc/sysconf

---
daemon/Makefile.am | 4 +---
daemon/libvirtd.service.in | 3 +--
src/Makefile.am | 3 ---
src/locking/virtlockd.service.in | 3 +--
tools/Makefile.am | 2 +-
tools/libvirt-guests.service.in | 2 +-
6 files changed, 5 insertions(+), 12 deletions(-)

diff --git a/daemon/Makefile.am b/daemon/Makefile.am
index b95a79d..1e98422 100644
--- a/daemon/Makefile.am
+++ b/daemon/Makefile.am
@@ -328,9 +328,7 @@ uninstall-logrotate:
rmdir $(DESTDIR)$(sysconfdir)/logrotate.d || :

install-sysconfig:
- $(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysconfig
- $(INSTALL_DATA) $(srcdir)/libvirtd.sysconf \
- $(DESTDIR)$(sysconfdir)/sysconfig/libvirtd
+
uninstall-sysconfig:
rm -f $(DESTDIR)$(sysconfdir)/sysconfig/libvirtd
rmdir $(DESTDIR)$(sysconfdir)/sysconfig || :
diff --git a/daemon/libvirtd.service.in b/daemon/libvirtd.service.in
index 1759ac8..cd337a1 100644
--- a/daemon/libvirtd.service.in
+++ b/daemon/libvirtd.service.in
@@ -10,8 +10,7 @@ Documentation=http://libvirt.org

[Service]
Type=notify
-EnvironmentFile=-/etc/sysconfig/libvirtd
-ExecStart=@sbindir@/libvirtd $LIBVIRTD_ARGS
+ExecStart=@sbindir@/libvirtd
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=on-failure
diff --git a/src/Makefile.am b/src/Makefile.am
index e65177f..18bbbb4 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -2269,9 +2269,6 @@ EXTRA_DIST += locking/virtlockd.sysconf \
locking/test_libvirt_lockd.aug.in

install-sysconfig:
- $(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysconfig
- $(INSTALL_DATA) $(srcdir)/locking/virtlockd.sysconf \
- $(DESTDIR)$(sysconfdir)/sysconfig/virtlockd

uninstall-sysconfig:
rm -f $(DESTDIR)$(sysconfdir)/sysconfig/virtlockd
diff --git a/src/locking/virtlockd.service.in b/src/locking/virtlockd.service.in
index 57089b0..ace0c83 100644
--- a/src/locking/virtlockd.service.in
+++ b/src/locking/virtlockd.service.in
@@ -5,8 +5,7 @@ Documentation=man:virtlockd(8)
Documentation=http://libvirt.org

[Service]
-EnvironmentFile=-/etc/sysconfig/virtlockd
-ExecStart=@sbindir@/virtlockd $VIRTLOCKD_ARGS
+ExecStart=@sbindir@/virtlockd
ExecReload=/bin/kill -USR1 $MAINPID
# Loosing the locks is a really bad thing that will
# cause the machine to be fenced (rebooted), so make
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 93d642d..2da0e97 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -259,7 +259,7 @@ uninstall-local: uninstall-init uninstall-systemd
install-sysconfig:
$(MKDIR_P) $(DESTDIR)$(sysconfdir)/sysconfig
$(INSTALL_DATA) $(srcdir)/libvirt-guests.sysconf \
- $(DESTDIR)$(sysconfdir)/sysconfig/libvirt-guests
+ $(DESTDIR)$(sysconfdir)/libvirt/libvirt-guests.conf

uninstall-sysconfig:
rm -f $(DESTDIR)$(sysconfdir)/sysconfig/libvirt-guests
diff --git a/tools/libvirt-guests.service.in b/tools/libvirt-guests.service.in
index cc04b6d..9be514b 100644
--- a/tools/libvirt-guests.service.in
+++ b/tools/libvirt-guests.service.in
@@ -5,7 +5,7 @@ Documentation=man:libvirtd(8)
Documentation=http://libvirt.org

[Service]
-EnvironmentFile=-/etc/sysconfig/libvirt-guests
+EnvironmentFile=-/etc/libvirt/libvirt-guests.conf
# Hack just call traditional service until we factor
# out the code
ExecStart=@libexecdir@/libvirt-guests.sh start
--- a/tools/libvirt-guests.sysconf
+++ b/tools/libvirt-guests.sysconf
@@ -1,3 +1,10 @@
+#
+# Warning: This configuration file is only sourced by the systemd
+# libvirt-guests.service unit. The coresponding openrc facility is in
+# /etc/init.d/libvirtd and /etc/conf.d/libvirtd
+#
+
+
# URIs to check for running guests
# example: URIS='default xen:/// vbox+tcp://host/system lxc:///'
#URIS=default
--
2.0.4
Loading

0 comments on commit 07b76b1

Please sign in to comment.