Hello community,

here is the log from the commit of package virt-sandbox for openSUSE:Factory 
checked in at 2014-07-16 16:19:41
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/virt-sandbox (Old)
 and      /work/SRC/openSUSE:Factory/.virt-sandbox.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "virt-sandbox"

Changes:
--------
--- /work/SRC/openSUSE:Factory/virt-sandbox/virt-sandbox.changes        
2014-07-11 06:45:57.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.virt-sandbox.new/virt-sandbox.changes   
2014-07-16 16:22:13.000000000 +0200
@@ -1,0 +2,13 @@
+Tue Jul 15 13:09:42 UTC 2014 - [email protected]
+
+- bnc#887145: fix hardcoded /usr/libexec, use /usr/lib instead:
+  no-libexec.patch
+  Fixed systemd path: systemd-path-fix.patch
+
+- Moved patches as they were merged upstream:
+  * service-check-secmodel.patch renamed into 
+    baf47f5b-service-check-secmodel.patch
+  * service-suse-paths.patch renamed into
+    a54e094b-service-suse-paths.patch
+
+-------------------------------------------------------------------

Old:
----
  service-check-secmodel.patch
  service-suse-paths.patch

New:
----
  a54e094b-service-suse-paths.patch
  baf47f5b-service-check-secmodel.patch
  no-libexec.patch
  systemd-path-fix.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ virt-sandbox.spec ++++++
--- /var/tmp/diff_new_pack.wOZMT0/_old  2014-07-16 16:22:14.000000000 +0200
+++ /var/tmp/diff_new_pack.wOZMT0/_new  2014-07-16 16:22:14.000000000 +0200
@@ -32,9 +32,14 @@
 # Upstream patches
 Patch0:         87a9b5cc-lib-prefix-fix.patch
 Patch1:         945e8e71-selinux-only-if-supported.patch
+Patch2:         baf47f5b-service-check-secmodel.patch
+Patch3:         a54e094b-service-suse-paths.patch
+
 # Patches pending upstream review
-Patch100:       service-check-secmodel.patch
-Patch101:       service-suse-paths.patch
+Patch100:       systemd-path-fix.patch
+
+# Our patches
+Patch150:       no-libexec.patch
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildRequires:  glib2-devel >= 2.32.0
@@ -90,8 +95,10 @@
 %setup -q -n libvirt-sandbox-%{version}
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
+%patch3 -p1
 %patch100 -p1
-%patch101 -p1
+%patch150 -p1
 
 %build
 

++++++ a54e094b-service-suse-paths.patch ++++++
>From a54e094bc5c4dc38d87d707184f1b712a4595d71 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= <[email protected]>
Date: Mon, 7 Jul 2014 14:55:12 +0200
Subject: [PATCH] virt-sandbox-service: fix some paths for SUSE

Don't fail is /etc/rc.d/init.d/functions doesn't exist: this is
deprecated in LSB and /lib/lsb/init-functions should be used instead.

Similarily, SUSE distros have /etc/skel/.profile instead of
/etc/skel/.bash_profile. Added one more file to check and be more
lennient with missing ones
---
 bin/virt-sandbox-service | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)

diff --git a/bin/virt-sandbox-service b/bin/virt-sandbox-service
index 789c732..5a3f6ab 100755
--- a/bin/virt-sandbox-service
+++ b/bin/virt-sandbox-service
@@ -414,7 +414,7 @@ def is_template_unit(unit):
 class SystemdContainer(Container):
     IGNORE_DIRS        = [ "/var/run/", "/etc/logrotate.d/", "/etc/pam.d" ]
     DEFAULT_DIRS       = [ "/etc", "/var" ]
-    PROFILE_FILES      = [ ".bashrc", ".bash_profile" ]
+    PROFILE_FILES      = [ ".bashrc", ".bash_profile", ".profile" ]
     MACHINE_ID         = "/etc/machine-id"
     HOSTNAME           = "/etc/hostname"
     SYSVINIT_PATH      = "/etc/rc.d"
@@ -422,7 +422,7 @@ class SystemdContainer(Container):
     MULTI_USER_WANTS_PATH = "/usr/lib/systemd/system/multi-user.target.wants"
     SYSINIT_WANTS_PATH = "/usr/lib/systemd/system/sysinit.target.wants"
     SOCKET_WANTS_PATH  = "/usr/lib/systemd/system/sockets.target.wants"
-    MAKE_SYSTEM_DIRS   = [ "/var/lib/dhclient", "/var/lib/dbus", "/var/log", 
"/var/spool", "/var/cache", "/var/tmp", "/var/lib/nfs/rpc_pipefs", 
SYSVINIT_PATH ]
+    MAKE_SYSTEM_DIRS   = [ "/var/lib/dhclient", "/var/lib/dbus", "/var/log", 
"/var/spool", "/var/cache", "/var/tmp", "/var/lib/nfs/rpc_pipefs", 
SYSVINIT_PATH, "/lib/lsb" ]
     BIND_SYSTEM_DIRS   = [ "/var", "/home", "/root", "/etc/systemd/system", 
"/etc/rc.d", "/usr/lib/systemd/system/basic.target.wants", 
"/usr/lib/systemd/system/local-fs.target.wants", ANACONDA_WANTS_PATH, 
MULTI_USER_WANTS_PATH, SYSINIT_WANTS_PATH, SOCKET_WANTS_PATH ]
     BIND_SYSTEM_FILES  = [ MACHINE_ID, "/etc/fstab", HOSTNAME ]
     LOCAL_LINK_FILES   = { SYSINIT_WANTS_PATH : [ 
"systemd-tmpfiles-setup.service" ] , SOCKET_WANTS_PATH : [ "dbus.socket", 
"systemd-journald.socket", "systemd-shutdownd.socket", "systemd-initctl.socket" 
] }
@@ -722,8 +722,15 @@ PrivateNetwork=false
         destpath = self.dest + self.SYSVINIT_PATH
         for i in range(7):
             os.mkdir(destpath+("/rc%s.d" % i))
-        os.mkdir(destpath+"/init.d")
-        shutil.copy(self.SYSVINIT_PATH + "/init.d/functions" , destpath + 
"/init.d")
+
+        # Copy both /etc/rc.d/init.d/functions and /lib/lsb/init-functions, 
even
+        # though the latter is the one recommended
+        if os.path.exists(self.SYSVINIT_PATH + "/init.d/functions"):
+            os.mkdir(destpath+"/init.d")
+            shutil.copy(self.SYSVINIT_PATH + "/init.d/functions" , destpath + 
"/init.d")
+
+        if os.path.exists("/lib/lsb/init-functions"):
+            shutil.copy("/lib/lsb/init-functions" , self.dest + "/lib/lsb/")
 
         self.gen_machine_id()
         self.gen_hostname()
@@ -759,7 +766,8 @@ PrivateNetwork=false
 
         for p in self.PROFILE_FILES:
             profile = "/etc/skel/" + p
-            shutil.copy(profile, self.dest + "/root/")
+            if os.path.exists(profile):
+                shutil.copy(profile, self.dest + "/root/")
 
         self.fix_protection()
 
-- 
1.8.4.5

++++++ baf47f5b-service-check-secmodel.patch ++++++
>From baf47f5b85628b6245d0514c93b451bfac726537 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= <[email protected]>
Date: Mon, 7 Jul 2014 13:56:31 +0200
Subject: [PATCH] virt-sandbox-service: check for security label only if they
 can be handled

virt-sandbox-service assumes libvirt has selinux security model...
which is not necessarily the case. If no security model is defined,
then don't check for dynamic labels.
---
 bin/virt-sandbox-service | 24 +++++++++++++++++++++++-
 1 file changed, 23 insertions(+), 1 deletion(-)

diff --git a/bin/virt-sandbox-service b/bin/virt-sandbox-service
index 9ed37e0..789c732 100755
--- a/bin/virt-sandbox-service
+++ b/bin/virt-sandbox-service
@@ -314,10 +314,32 @@ class Container:
         context = self.context()
         context.undefine()
 
+    def get_security_model(self):
+        # XXX selinux is the default for the while, needs to be configurable 
someday
+        model = "selinux"
+        supported = False
+
+        # Make sure we have a connection
+        self.connect()
+
+        # Loop over the security models from the host capabilities
+        configCaps = self.conn.get_capabilities()
+        hostCaps = configCaps.get_host()
+        secmodels = hostCaps.get_secmodels()
+        for secmodel in secmodels:
+            if secmodel.get_model() == model:
+                supported = True
+                break
+
+        if not supported:
+            model = None
+        return model
+
 
     def create(self):
         self.connect()
-        if self.config.get_security_dynamic() and not self.use_image:
+        if self.get_security_model() is not None and \
+           self.config.get_security_dynamic() and not self.use_image:
             raise ValueError([_("Dynamic security label only supported for 
image based containers")])
         if self.uri != "lxc:///":
             self.config.set_shell(True)
-- 
1.8.4.5

++++++ no-libexec.patch ++++++
++++ 2584 lines (skipped)

++++++ systemd-path-fix.patch ++++++
Index: 
libvirt-sandbox-0.5.1/libvirt-sandbox/libvirt-sandbox-config-service-systemd.c
===================================================================
--- 
libvirt-sandbox-0.5.1.orig/libvirt-sandbox/libvirt-sandbox-config-service-systemd.c
+++ 
libvirt-sandbox-0.5.1/libvirt-sandbox/libvirt-sandbox-config-service-systemd.c
@@ -219,7 +219,7 @@ static gchar **gvir_sandbox_config_servi
     GVirSandboxConfigServiceSystemdPrivate *priv = sconfig->priv;
     gchar **command = g_new(gchar *, 7);
 
-    command[0] = g_strdup("/lib/systemd/systemd");
+    command[0] = g_strdup("/usr/lib/systemd/systemd");
     command[1] = g_strdup("--unit");
     command[2] = g_strdup(priv->bootTarget);
     command[3] = g_strdup("--log-target");
-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to