[gnome-boxes/wip/feborges/flatpak-net-bridge: 1/3] flatpak: Instruct libvirt to find qemu-bridge-helper in /app



commit 13b8dc51a445b2f48a4937a02dab5ab0d3f567e8
Author: Felipe Borges <felipeborges gnome org>
Date:   Thu Sep 27 15:39:09 2018 +0200

    flatpak: Instruct libvirt to find qemu-bridge-helper in /app
    
    In order to provide a bridged network between host and guest, we
    need to allow libvirt to orchestrate qemu-bridge-helper. By default,
    libvirt won't look up for the qemu-bridge-helper binary in /app.
    
    Flatpaked applications install their files under the /app prefix.
    
    qemu-bridge-helper is expected to be at /app/libexec/qemu-bridge-helper
    
    Ref #232

 build-aux/flatpak/libvirt-qemu-bridge-helper.patch | 27 ++++++++++++++++++++++
 build-aux/flatpak/org.gnome.Boxes.json             | 12 ++++++++++
 2 files changed, 39 insertions(+)
---
diff --git a/build-aux/flatpak/libvirt-qemu-bridge-helper.patch 
b/build-aux/flatpak/libvirt-qemu-bridge-helper.patch
new file mode 100644
index 00000000..ce29ff78
--- /dev/null
+++ b/build-aux/flatpak/libvirt-qemu-bridge-helper.patch
@@ -0,0 +1,27 @@
+From ba6a9395a703229ae628a49797700135aed325fc Mon Sep 17 00:00:00 2001
+From: Felipe Borges <felipeborges gnome org>
+Date: Thu, 27 Sep 2018 16:07:39 +0200
+Subject: [PATCH] m4: Find qemu-bridge-helper in a flatpak
+
+---
+ m4/virt-driver-qemu.m4 | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/m4/virt-driver-qemu.m4 b/m4/virt-driver-qemu.m4
+index 80e1d3ad46..67fb704aec 100644
+--- a/m4/virt-driver-qemu.m4
++++ b/m4/virt-driver-qemu.m4
+@@ -53,8 +53,8 @@ AC_DEFUN([LIBVIRT_DRIVER_CHECK_QEMU], [
+   AC_DEFINE_UNQUOTED([QEMU_GROUP], ["$QEMU_GROUP"], [QEMU group account])
+ 
+   AC_PATH_PROG([QEMU_BRIDGE_HELPER], [qemu-bridge-helper],
+-               [/usr/libexec/qemu-bridge-helper],
+-               [/usr/libexec:/usr/lib/qemu:/usr/lib])
++               [/app/libexec/qemu-bridge-helper],
++               [/app/libexec:/app/lib/qemu:/app/lib])
+   AC_DEFINE_UNQUOTED([QEMU_BRIDGE_HELPER], ["$QEMU_BRIDGE_HELPER"],
+                      [QEMU bridge helper])
+   AC_PATH_PROG([QEMU_PR_HELPER], [qemu-pr-helper],
+-- 
+2.17.1
+
diff --git a/build-aux/flatpak/org.gnome.Boxes.json b/build-aux/flatpak/org.gnome.Boxes.json
index 860b8df5..865c1b55 100644
--- a/build-aux/flatpak/org.gnome.Boxes.json
+++ b/build-aux/flatpak/org.gnome.Boxes.json
@@ -110,6 +110,7 @@
         },
         {
             "name" : "libvirt",
+            "rm-configure" : true,
             "config-opts" : [
                 "--without-html-subdir",
                 "--without-storage-mpath"
@@ -119,6 +120,17 @@
                     "type" : "archive",
                     "url" : "https://libvirt.org/sources/libvirt-4.1.0.tar.xz";,
                     "sha256" : "8a2fa4826f311a936be8b7d4c8d76516c29417a593b1d1bb8641a8caaa316439"
+                },
+                {
+                    "type" : "patch",
+                    "path" : "libvirt-qemu-bridge-helper.patch"
+                },
+                {
+                    "type": "script",
+                    "dest-filename": "autogen.sh",
+                    "commands": [
+                        "AUTOMAKE=\"automake --foreign\" autoreconf -vfi"
+                    ]
                 }
             ]
         },


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