[Pkg-libvirt-commits] [SCM] Libvirt Debian packaging branch, master, updated. debian/0.7.2-4-4-ge41f8c6

Laurent Léonard laurent at open-minds.org
Fri Nov 27 02:06:14 UTC 2009


The following commit has been merged in the master branch:
commit 20b6b3d11a91b2b641dbb6388b6baf6804afcc8f
Author: Laurent Léonard <laurent at open-minds.org>
Date:   Fri Nov 27 02:46:02 2009 +0100

    Drop patches.
    
    0005-Fix-SELinux-linking-issues.patch - fixed upstream.
    0006-Don-t-let-parent-of-daemon-exit-until-basic-initiali.patch - fixed upstream.
    0007-Only-remove-masquerade-roles-for-VIR_NETWORK_FORWARD.patch - applied upstream.
    0008-Fix-qemu-session.patch - fixed upstream.

diff --git a/debian/patches/0001-remove-RHism.diff.patch b/debian/patches/0001-remove-RHism.diff.patch
index 135a593..f0a4e52 100644
--- a/debian/patches/0001-remove-RHism.diff.patch
+++ b/debian/patches/0001-remove-RHism.diff.patch
@@ -7,7 +7,7 @@ Subject: [PATCH] remove-RHism.diff
  1 files changed, 1 insertions(+), 1 deletions(-)
 
 diff --git a/tools/virsh.pod b/tools/virsh.pod
-index 55ec64a..a39d1b5 100644
+index 6ff0151..7fafe13 100644
 --- a/tools/virsh.pod
 +++ b/tools/virsh.pod
 @@ -34,7 +34,7 @@ the program.
diff --git a/debian/patches/0002-qemu-disable-network.diff.patch b/debian/patches/0002-qemu-disable-network.diff.patch
index 400b77d..3d481d5 100644
--- a/debian/patches/0002-qemu-disable-network.diff.patch
+++ b/debian/patches/0002-qemu-disable-network.diff.patch
@@ -8,10 +8,10 @@ Subject: [PATCH] qemu-disable-network.diff
  2 files changed, 0 insertions(+), 6 deletions(-)
 
 diff --git a/src/Makefile.am b/src/Makefile.am
-index d0ef7d1..5963a73 100644
+index 26be8e2..ac3c5ea 100644
 --- a/src/Makefile.am
 +++ b/src/Makefile.am
-@@ -878,9 +878,6 @@ if WITH_NETWORK
+@@ -887,9 +887,6 @@ if WITH_NETWORK
  	test -z "$(UUID)" || \
  	  sed -i -e "s,</name>,</name>\n  <uuid>$(UUID)</uuid>," \
  	    $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/default.xml
@@ -22,10 +22,10 @@ index d0ef7d1..5963a73 100644
  
  uninstall-local::
 diff --git a/src/Makefile.in b/src/Makefile.in
-index f840a67..acbf648 100644
+index 3a9c662..a401cd9 100644
 --- a/src/Makefile.in
 +++ b/src/Makefile.in
-@@ -3840,9 +3840,6 @@ install-data-local:
+@@ -3927,9 +3927,6 @@ install-data-local:
  @WITH_NETWORK_TRUE@	test -z "$(UUID)" || \
  @WITH_NETWORK_TRUE@	  sed -i -e "s,</name>,</name>\n  <uuid>$(UUID)</uuid>," \
  @WITH_NETWORK_TRUE@	    $(DESTDIR)$(sysconfdir)/libvirt/qemu/networks/default.xml
diff --git a/debian/patches/0004-fix-Debian-specific-path-to-hvm-loader.patch b/debian/patches/0004-fix-Debian-specific-path-to-hvm-loader.patch
index 9b0d9bb..98bf4bf 100644
--- a/debian/patches/0004-fix-Debian-specific-path-to-hvm-loader.patch
+++ b/debian/patches/0004-fix-Debian-specific-path-to-hvm-loader.patch
@@ -12,10 +12,10 @@ Closes: #517059
  5 files changed, 6 insertions(+), 6 deletions(-)
 
 diff --git a/src/xen/xen_hypervisor.c b/src/xen/xen_hypervisor.c
-index 3aa3c30..6f36fdc 100644
+index 843102a..79537d4 100644
 --- a/src/xen/xen_hypervisor.c
 +++ b/src/xen/xen_hypervisor.c
-@@ -2218,7 +2218,7 @@ xenHypervisorBuildCapabilities(virConnectPtr conn,
+@@ -2230,7 +2230,7 @@ xenHypervisorBuildCapabilities(virConnectPtr conn,
                                                "/usr/lib64/xen/bin/qemu-dm" :
                                                "/usr/lib/xen/bin/qemu-dm"),
                                               (guest_archs[i].hvm ?
diff --git a/debian/patches/0005-Fix-SELinux-linking-issues.patch b/debian/patches/0005-Fix-SELinux-linking-issues.patch
deleted file mode 100644
index 10117c3..0000000
--- a/debian/patches/0005-Fix-SELinux-linking-issues.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From: =?UTF-8?q?Laurent=20L=C3=A9onard?= <laurent at open-minds.org>
-Date: Mon, 19 Oct 2009 21:16:34 +0200
-Subject: [PATCH] Fix SELinux linking issues.
-
----
- src/Makefile.am |    2 ++
- src/Makefile.in |    2 ++
- 2 files changed, 4 insertions(+), 0 deletions(-)
-
-diff --git a/src/Makefile.am b/src/Makefile.am
-index 5963a73..3ba7caf 100644
---- a/src/Makefile.am
-+++ b/src/Makefile.am
-@@ -657,6 +657,8 @@ libvirt_driver_security_la_CFLAGS = \
- libvirt_driver_security_la_LDFLAGS =
- if WITH_SECDRIVER_SELINUX
- libvirt_driver_security_la_SOURCES += $(SECURITY_DRIVER_SELINUX_SOURCES)
-+libvirt_driver_security_la_CFLAGS += $(SELINUX_CFLAGS)
-+libvirt_driver_security_la_LDFLAGS += $(SELINUX_LIBS)
- endif
- if WITH_SECDRIVER_APPARMOR
- libvirt_driver_security_la_SOURCES += $(SECURITY_DRIVER_APPARMOR_SOURCES)
-diff --git a/src/Makefile.in b/src/Makefile.in
-index acbf648..2cb6689 100644
---- a/src/Makefile.in
-+++ b/src/Makefile.in
-@@ -114,6 +114,8 @@ host_triplet = @host@
- @HAVE_DEVKIT_TRUE@@WITH_NODE_DEVICES_TRUE at am__append_70 = $(DEVKIT_LIBS)
- @WITH_DRIVER_MODULES_TRUE@@WITH_NODE_DEVICES_TRUE at am__append_71 = -module -avoid-version
- @WITH_SECDRIVER_SELINUX_TRUE at am__append_72 = $(SECURITY_DRIVER_SELINUX_SOURCES)
-+ at WITH_SECDRIVER_SELINUX_TRUE@am__append_74 = $(SELINUX_CFLAGS)
-+ at WITH_SECDRIVER_SELINUX_TRUE@am__append_75 = $(SELINUX_LIBS)
- @WITH_SECDRIVER_APPARMOR_TRUE at am__append_73 = $(SECURITY_DRIVER_APPARMOR_SOURCES)
- @WITH_SECDRIVER_APPARMOR_TRUE at am__append_74 = $(APPARMOR_CFLAGS)
- @WITH_SECDRIVER_APPARMOR_TRUE at am__append_75 = $(APPARMOR_LIBS)
--- 
diff --git a/debian/patches/0006-Don-t-let-parent-of-daemon-exit-until-basic-initiali.patch b/debian/patches/0006-Don-t-let-parent-of-daemon-exit-until-basic-initiali.patch
deleted file mode 100644
index 1e3e93c..0000000
--- a/debian/patches/0006-Don-t-let-parent-of-daemon-exit-until-basic-initiali.patch
+++ /dev/null
@@ -1,234 +0,0 @@
-From: =?UTF-8?q?Laurent=20L=C3=A9onard?= <laurent at open-minds.org>
-Date: Sun, 25 Oct 2009 01:36:36 +0200
-Subject: [PATCH] Don't let parent of daemon exit until basic initialization is done.
-
----
- daemon/libvirtd.c |  118 +++++++++++++++++++++++++++++++++++++++++++++--------
- 1 files changed, 100 insertions(+), 18 deletions(-)
-
-diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c
-index 78dfb2d..57ef4be 100644
---- a/daemon/libvirtd.c
-+++ b/daemon/libvirtd.c
-@@ -185,6 +185,30 @@ static int max_client_requests = 5;
- static sig_atomic_t sig_errors = 0;
- static int sig_lasterrno = 0;
- 
-+enum {
-+    VIR_DAEMON_ERR_NONE = 0,
-+    VIR_DAEMON_ERR_PIDFILE,
-+    VIR_DAEMON_ERR_RUNDIR,
-+    VIR_DAEMON_ERR_INIT,
-+    VIR_DAEMON_ERR_SIGNAL,
-+    VIR_DAEMON_ERR_PRIVS,
-+    VIR_DAEMON_ERR_NETWORK,
-+    VIR_DAEMON_ERR_CONFIG,
-+
-+    VIR_DAEMON_ERR_LAST
-+};
-+
-+VIR_ENUM_DECL(virDaemonErr)
-+VIR_ENUM_IMPL(virDaemonErr, VIR_DAEMON_ERR_LAST,
-+              "Initialization successful",
-+              "Unable to obtain pidfile",
-+              "Unable to create rundir",
-+              "Unable to initialize libvirt",
-+              "Unable to setup signal handlers",
-+              "Unable to drop privileges",
-+              "Unable to initialize network sockets",
-+              "Unable to load configuration file")
-+
- static void sig_handler(int sig, siginfo_t * siginfo,
-                         void* context ATTRIBUTE_UNUSED) {
-     int origerrno;
-@@ -375,7 +399,11 @@ qemudDispatchSignalEvent(int watch ATTRIBUTE_UNUSED,
- }
- 
- 
--static int qemudGoDaemon(void) {
-+static int daemonForkIntoBackground(void) {
-+    int statuspipe[2];
-+    if (pipe(statuspipe) < 0)
-+        return -1;
-+
-     int pid = fork();
-     switch (pid) {
-     case 0:
-@@ -384,6 +412,8 @@ static int qemudGoDaemon(void) {
-             int stdoutfd = -1;
-             int nextpid;
- 
-+            close(statuspipe[0]);
-+
-             if ((stdinfd = open("/dev/null", O_RDONLY)) < 0)
-                 goto cleanup;
-             if ((stdoutfd = open("/dev/null", O_WRONLY)) < 0)
-@@ -407,7 +437,7 @@ static int qemudGoDaemon(void) {
-             nextpid = fork();
-             switch (nextpid) {
-             case 0:
--                return 0;
-+                return statuspipe[1];
-             case -1:
-                 return -1;
-             default:
-@@ -428,15 +458,29 @@ static int qemudGoDaemon(void) {
- 
-     default:
-         {
--            int got, status = 0;
--            /* We wait to make sure the next child forked
--               successfully */
--            if ((got = waitpid(pid, &status, 0)) < 0 ||
-+            int got, exitstatus = 0;
-+            int ret;
-+            char status;
-+
-+            close(statuspipe[1]);
-+
-+            /* We wait to make sure the first child forked successfully */
-+            if ((got = waitpid(pid, &exitstatus, 0)) < 0 ||
-                 got != pid ||
--                status != 0) {
-+                exitstatus != 0) {
-                 return -1;
-             }
--            _exit(0);
-+
-+            /* Now block until the second child initializes successfully */
-+        again:
-+            ret = read(statuspipe[0], &status, 1);
-+            if (ret == -1 && errno == EINTR)
-+                goto again;
-+
-+            if (ret == 1 && status != 0) {
-+                fprintf(stderr, "error: %s\n", virDaemonErrTypeToString(status));
-+            }
-+            _exit(ret == 1 && status == 0 ? 0 : 1);
-         }
-     }
- }
-@@ -859,8 +903,6 @@ static struct qemud_server *qemudInitialize(int sigread) {
-                          virEventUpdateTimeoutImpl,
-                          virEventRemoveTimeoutImpl);
- 
--    virStateInitialize(server->privileged);
--
-     return server;
- }
- 
-@@ -2842,6 +2884,7 @@ int main(int argc, char **argv) {
-     int sigpipe[2];
-     const char *pid_file = NULL;
-     const char *remote_config_file = NULL;
-+    int statuswrite = -1;
-     int ret = 1;
- 
-     struct option opts[] = {
-@@ -2923,7 +2966,7 @@ int main(int argc, char **argv) {
- 
-     if (godaemon) {
-         char ebuf[1024];
--        if (qemudGoDaemon() < 0) {
-+        if ((statuswrite = daemonForkIntoBackground()) < 0) {
-             VIR_ERROR(_("Failed to fork as daemon: %s"),
-                       virStrerror(errno, ebuf, sizeof ebuf));
-             goto error1;
-@@ -2938,8 +2981,11 @@ int main(int argc, char **argv) {
- 
-     /* If we have a pidfile set, claim it now, exiting if already taken */
-     if (pid_file != NULL &&
--        qemudWritePidFile (pid_file) < 0)
-+        qemudWritePidFile (pid_file) < 0) {
-+        pid_file = NULL; /* Prevent unlinking of someone else's pid ! */
-+        ret = VIR_DAEMON_ERR_PIDFILE;
-         goto error1;
-+    }
- 
-     if (pipe(sigpipe) < 0 ||
-         virSetNonBlock(sigpipe[0]) < 0 ||
-@@ -2973,7 +3019,8 @@ int main(int argc, char **argv) {
-         if (mkdir (rundir, 0755)) {
-             if (errno != EEXIST) {
-                 VIR_ERROR0 (_("unable to create rundir"));
--                return -1;
-+                ret = VIR_DAEMON_ERR_RUNDIR;
-+                goto error1;
-             }
-         }
-     }
-@@ -2984,17 +3031,21 @@ int main(int argc, char **argv) {
-      * which is also passed into all libvirt stateful
-      * drivers
-      */
--    if (qemudSetupPrivs() < 0)
-+    if (qemudSetupPrivs() < 0) {
-+        ret = VIR_DAEMON_ERR_PRIVS;
-         goto error2;
-+    }
- 
-     if (!(server = qemudInitialize(sigpipe[0]))) {
--        ret = 2;
-+        ret = VIR_DAEMON_ERR_INIT;
-         goto error2;
-     }
- 
-     /* Read the config file (if it exists). */
--    if (remoteReadConfigFile (server, remote_config_file) < 0)
-+    if (remoteReadConfigFile (server, remote_config_file) < 0) {
-+        ret = VIR_DAEMON_ERR_CONFIG;
-         goto error2;
-+    }
- 
-     /* Change the group ownership of /var/run/libvirt to unix_sock_gid */
-     if (unix_sock_dir && server->privileged) {
-@@ -3013,15 +3064,46 @@ int main(int argc, char **argv) {
-     }
- 
-     if (!(server = qemudNetworkInit(server))) {
--        ret = 2;
-+        ret = VIR_DAEMON_ERR_NETWORK;
-         goto error2;
-     }
- 
--    qemudRunLoop(server);
-+    /* Tell parent of daemon that basic initialization is complete
-+     * In particular we're ready to accept net connections & have
-+     * written the pidfile
-+     */
-+    if (statuswrite != -1) {
-+        char status = 0;
-+        while (write(statuswrite, &status, 1) == -1 &&
-+               errno == EINTR)
-+            ;
-+        close(statuswrite);
-+        statuswrite = -1;
-+    }
-+
-+    /* Start the stateful HV drivers
-+     * This is delibrately done after telling the parent process
-+     * we're ready, since it can take a long time and this will
-+     * seriously delay OS bootup process */
-+    if (virStateInitialize(server->privileged) < 0) {
-+        VIR_ERROR0("Driver state initialization failed");
-+        goto error2;
-+    }
- 
-+    qemudRunLoop(server);
-     ret = 0;
- 
- error2:
-+    if (statuswrite != -1) {
-+        if (ret != 0) {
-+            /* Tell parent of daemon what failed */
-+            char status = ret;
-+            while (write(statuswrite, &status, 1) == -1 &&
-+                   errno == EINTR)
-+                ;
-+        }
-+        close(statuswrite);
-+    }
-     if (server)
-         qemudCleanup(server);
-     if (pid_file)
--- 
diff --git a/debian/patches/0007-Only-remove-masquerade-roles-for-VIR_NETWORK_FORWARD.patch b/debian/patches/0007-Only-remove-masquerade-roles-for-VIR_NETWORK_FORWARD.patch
deleted file mode 100644
index 1d3e68b..0000000
--- a/debian/patches/0007-Only-remove-masquerade-roles-for-VIR_NETWORK_FORWARD.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx at sigxcpu.org>
-Date: Thu, 5 Nov 2009 20:28:11 +0100
-Subject: [PATCH] Only remove masquerade roles for VIR_NETWORK_FORWARD_NAT
-
-Closes: #549949
----
- src/network/bridge_driver.c |   11 +++++------
- 1 files changed, 5 insertions(+), 6 deletions(-)
-
-diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
-index 95bc810..86ec392 100644
---- a/src/network/bridge_driver.c
-+++ b/src/network/bridge_driver.c
-@@ -765,16 +765,15 @@ static void
- networkRemoveIptablesRules(struct network_driver *driver,
-                          virNetworkObjPtr network) {
-     if (network->def->forwardType != VIR_NETWORK_FORWARD_NONE) {
--        iptablesRemoveForwardMasquerade(driver->iptables,
--                                        network->def->network,
--                                        network->def->forwardDev);
--
--        if (network->def->forwardType == VIR_NETWORK_FORWARD_NAT)
-+        if (network->def->forwardType == VIR_NETWORK_FORWARD_NAT) {
-+            iptablesRemoveForwardMasquerade(driver->iptables,
-+                                                network->def->network,
-+                                                network->def->forwardDev);
-             iptablesRemoveForwardAllowRelatedIn(driver->iptables,
-                                                 network->def->network,
-                                                 network->def->bridge,
-                                                 network->def->forwardDev);
--        else if (network->def->forwardType == VIR_NETWORK_FORWARD_ROUTE)
-+        } else if (network->def->forwardType == VIR_NETWORK_FORWARD_ROUTE)
-             iptablesRemoveForwardAllowIn(driver->iptables,
-                                          network->def->network,
-                                          network->def->bridge,
--- 
diff --git a/debian/patches/0008-Fix-qemu-session.patch b/debian/patches/0008-Fix-qemu-session.patch
deleted file mode 100644
index 5c15f98..0000000
--- a/debian/patches/0008-Fix-qemu-session.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From: =?UTF-8?q?Guido=20G=C3=BCnther?= <agx at sigxcpu.org>
-Date: Sat, 7 Nov 2009 12:48:54 +0100
-Subject: [PATCH] Fix qemu:///session
-
-Backported from upsgtream's 79218cdd9887b132eb0f29fe2048f89e90beae1
-
-Closes: #554869
----
- src/lxc/lxc_driver.c |   23 +++++++++++++----------
- 1 files changed, 13 insertions(+), 10 deletions(-)
-
-diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
-index 0b614e3..db47555 100644
---- a/src/lxc/lxc_driver.c
-+++ b/src/lxc/lxc_driver.c
-@@ -1600,12 +1600,21 @@ static int lxcStartup(int privileged)
-      * XXX remove this when valgrind is fixed
-      */
-     ld = getenv("LD_PRELOAD");
--    if (ld && strstr(ld, "vgpreload"))
--        return -1;
-+    if (ld && strstr(ld, "vgpreload")) {
-+        VIR_INFO0("Running under valgrind, disabling driver");
-+        return 0;
-+    }
- 
--    /* Check that the user is root */
-+    /* Check that the user is root, silently disable if not */
-     if (!privileged) {
--        return -1;
-+        VIR_INFO0("Not running privileged, disabling driver");
-+        return 0;
-+    }
-+
-+    /* Check that this is a container enabled kernel */
-+    if (lxcContainerAvailable(0) < 0) {
-+        VIR_INFO0("LXC support not available in this kernel, disabling driver");
-+        return 0;
-     }
- 
-     if (VIR_ALLOC(lxc_driver) < 0) {
-@@ -1617,12 +1626,6 @@ static int lxcStartup(int privileged)
-     }
-     lxcDriverLock(lxc_driver);
- 
--    /* Check that this is a container enabled kernel */
--    if (lxcContainerAvailable(0) < 0) {
--        VIR_INFO0("LXC support not available in this kernel, disabling driver");
--        goto cleanup;
--    }
--
-     if (VIR_ALLOC(lxc_driver->domainEventCallbacks) < 0)
-         goto cleanup;
-     if (!(lxc_driver->domainEventQueue = virDomainEventQueueNew()))
--- 
diff --git a/debian/patches/series b/debian/patches/series
index 1c84876..a8c0f9e 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,7 +2,3 @@
 0002-qemu-disable-network.diff.patch
 0003-allow-libvirt-group-to-access-the-socket.patch
 0004-fix-Debian-specific-path-to-hvm-loader.patch
-0005-Fix-SELinux-linking-issues.patch
-0006-Don-t-let-parent-of-daemon-exit-until-basic-initiali.patch
-0007-Only-remove-masquerade-roles-for-VIR_NETWORK_FORWARD.patch
-0008-Fix-qemu-session.patch

-- 
Libvirt Debian packaging



More information about the Pkg-libvirt-commits mailing list