Hello community,

here is the log from the commit of package virt-sandbox for openSUSE:Factory 
checked in at 2015-08-27 08:57:07
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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        
2015-07-03 00:23:13.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.virt-sandbox.new/virt-sandbox.changes   
2015-08-27 08:57:10.000000000 +0200
@@ -1,0 +2,6 @@
+Fri Aug 21 14:53:30 UTC 2015 - cbosdon...@suse.com
+
+- Make sure the af_packet module is loaded for KVM sandbox with
+  user network setup to work. dhcp-fix.patch. boo#942733
+
+-------------------------------------------------------------------

New:
----
  dhcp-fix.patch

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

Other differences:
------------------
++++++ virt-sandbox.spec ++++++
--- /var/tmp/diff_new_pack.3Rpmdn/_old  2015-08-27 08:57:11.000000000 +0200
+++ /var/tmp/diff_new_pack.3Rpmdn/_new  2015-08-27 08:57:11.000000000 +0200
@@ -30,6 +30,7 @@
 Source1:        %{name}.rpmlintrc
 
 # Upstream patches
+Patch0:         dhcp-fix.patch
 
 # Patches pending upstream review
 
@@ -92,6 +93,7 @@
 
 %prep
 %setup -q -n libvirt-sandbox-%{version}
+%patch0 -p1
 %patch200 -p1
 
 %build

++++++ dhcp-fix.patch ++++++
Patch aggegrating the following upstream commits:
  82cc162 Create /dev/fd symlink to /proc/self/fd
  5fe7883 Only show dhclient output in debug mode.
  daa2665 Add af_packet module for dhclient to work

Index: libvirt-sandbox-0.6.0/libvirt-sandbox/libvirt-sandbox-builder-machine.c
===================================================================
--- libvirt-sandbox-0.6.0.orig/libvirt-sandbox/libvirt-sandbox-builder-machine.c
+++ libvirt-sandbox-0.6.0/libvirt-sandbox/libvirt-sandbox-builder-machine.c
@@ -182,6 +182,11 @@ static gchar *gvir_sandbox_builder_machi
     gvir_sandbox_config_initrd_add_module(initrd, "virtio_balloon.ko");
 #endif
 
+    /* For dhclient to work in user networking setup
+     * Some distros like fedora have it builtin, we need not to fail if
+     * the file isn't found */
+    gvir_sandbox_config_initrd_add_module(initrd, "af_packet.ko");
+
     if (!gvir_sandbox_builder_initrd_construct(builder, initrd, targetfile, 
error))
         goto cleanup;
 
Index: libvirt-sandbox-0.6.0/libvirt-sandbox/libvirt-sandbox-init-qemu.c
===================================================================
--- libvirt-sandbox-0.6.0.orig/libvirt-sandbox/libvirt-sandbox-init-qemu.c
+++ libvirt-sandbox-0.6.0/libvirt-sandbox/libvirt-sandbox-init-qemu.c
@@ -356,6 +356,12 @@ main(int argc ATTR_UNUSED, char **argv A
 
     /* Main special filesystems */
     mount_other("/dev", "devtmpfs", 0755);
+    if (symlink("/proc/self/fd", "/dev/fd") < 0) {
+        fprintf(stderr, "libvirt-sandbox-init-qemu: %s: failed to create 
/dev/fd symlink: %s\n",
+                __func__, strerror(errno));
+        exit_poweroff();
+    }
+
     mount_other_opts("/dev/pts", "devpts", "gid=5,mode=620,ptmxmode=000", 
0755);
     mount_other("/sys", "sysfs", 0755);
     mount_other("/proc", "proc", 0755);
Index: libvirt-sandbox-0.6.0/libvirt-sandbox/libvirt-sandbox-init-common.c
===================================================================
--- libvirt-sandbox-0.6.0.orig/libvirt-sandbox/libvirt-sandbox-init-common.c
+++ libvirt-sandbox-0.6.0/libvirt-sandbox/libvirt-sandbox-init-common.c
@@ -159,11 +159,19 @@ start_shell(void)
 
 static gboolean start_dhcp(const gchar *devname, GError **error)
 {
-    const gchar *argv[] = { "/sbin/dhclient", "-v", "--no-pid", devname, NULL 
};
+    const gchar *argv[5];
+    size_t nargs = 0;
     gboolean ret;
     sigset_t newset;
     sigset_t oldset;
 
+    argv[nargs++] = "/sbin/dhclient";
+    if (debug)
+        argv[nargs++] = "-v";
+    argv[nargs++] = "--no-pid";
+    argv[nargs++] = devname;
+    argv[nargs++] = NULL;
+
     sigemptyset(&newset);
     sigaddset(&newset, SIGHUP);
 

Reply via email to