[gnome-builder/wip/chergert/flatpak-repo] bundle public repo files and use them



commit 82d1e09bee6d32afb7e38f040721b13c69ed9b16
Author: Christian Hergert <chergert redhat com>
Date:   Mon Aug 23 21:35:51 2021 -0700

    bundle public repo files and use them

 .../flatpak/daemon/flathub-beta.flatpakrepo        |  8 +++++
 src/plugins/flatpak/daemon/flathub.flatpakrepo     |  8 +++++
 .../flatpak/daemon/gnome-nightly.flatpakrepo       |  7 +++++
 src/plugins/flatpak/daemon/ipc-flatpak-repo.c      | 35 +++++++++++-----------
 .../flatpak/daemon/ipc-flatpak-service-impl.c      |  3 ++
 .../flatpak/daemon/ipc-flatpak.gresource.xml       |  8 +++++
 src/plugins/flatpak/daemon/meson.build             |  7 +++++
 7 files changed, 59 insertions(+), 17 deletions(-)
---
diff --git a/src/plugins/flatpak/daemon/flathub-beta.flatpakrepo 
b/src/plugins/flatpak/daemon/flathub-beta.flatpakrepo
new file mode 100644
index 000000000..340cb529a
--- /dev/null
+++ b/src/plugins/flatpak/daemon/flathub-beta.flatpakrepo
@@ -0,0 +1,8 @@
+[Flatpak Repo]
+Title=Flathub Beta
+Url=https://dl.flathub.org/beta-repo/
+Homepage=https://flathub.org/
+Comment=Beta builds of Flatpak applications
+Description=Beta builds of Flatpak applications
+Icon=https://dl.flathub.org/repo/logo.svg
+GPGKey=mQINBFlD2sABEADsiUZUOYBg1UdDaWkEdJYkTSZD68214m8Q1fbrP5AptaUfCl8KYKFMNoAJRBXn9FbE6q6VBzghHXj/rSnA8WPnkbaEWR7xltOqzB1yHpCQ1l8xSfH5N02DMUBSRtD/rOYsBKbaJcOgW0K21sX+BecMY/AI2yADvCJEjhVKrjR9yfRX+NQEhDcbXUFRGt9ZT+TI5yT4xcwbvvTu7aFUR/dH7+wjrQ7lzoGlZGFFrQXSs2WI0WaYHWDeCwymtohXryF8lcWQkhH8UhfNJVBJFgCY8Q6UHkZG0FxMu8xnIDBMjBmSZKwKQn0nwzwM2afskZEnmNPYDI8nuNsSZBZSAw+Th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2u/T+RYZ7fP1QMEtNZNmYDOfA6sViuPDfQSHLNbauJBo/n1sRYAsL5mcG22UDchJrlKvmK3EOADCQg+myrm8006LltubNB4wWNzHDJ0Ls2JGzQZCd/xGyVmUiidCBUrD537WdknOYE4FD7P0cHaM9brKJ/M8LkEH0zUlo73bY4XagbnCqve6PvQb5G2Z55qhWphd6f4B6DGed86zJEa/RhS
diff --git a/src/plugins/flatpak/daemon/flathub.flatpakrepo b/src/plugins/flatpak/daemon/flathub.flatpakrepo
new file mode 100644
index 000000000..99c4786c4
--- /dev/null
+++ b/src/plugins/flatpak/daemon/flathub.flatpakrepo
@@ -0,0 +1,8 @@
+[Flatpak Repo]
+Title=Flathub
+Url=https://dl.flathub.org/repo/
+Homepage=https://flathub.org/
+Comment=Central repository of Flatpak applications
+Description=Central repository of Flatpak applications
+Icon=https://dl.flathub.org/repo/logo.svg
+GPGKey=mQINBFlD2sABEADsiUZUOYBg1UdDaWkEdJYkTSZD68214m8Q1fbrP5AptaUfCl8KYKFMNoAJRBXn9FbE6q6VBzghHXj/rSnA8WPnkbaEWR7xltOqzB1yHpCQ1l8xSfH5N02DMUBSRtD/rOYsBKbaJcOgW0K21sX+BecMY/AI2yADvCJEjhVKrjR9yfRX+NQEhDcbXUFRGt9ZT+TI5yT4xcwbvvTu7aFUR/dH7+wjrQ7lzoGlZGFFrQXSs2WI0WaYHWDeCwymtohXryF8lcWQkhH8UhfNJVBJFgCY8Q6UHkZG0FxMu8xnIDBMjBmSZKwKQn0nwzwM2afskZEnmNPYDI8nuNsSZBZSAw+ThhkdCZHZZRwzmjzyRuLLVFpOj3XryXwZcSefNMPDkZAuWWzPYjxS80cm2hG1WfqrG0Gl8+iX69cbQchb7gbEb0RtqNskTo9DDmO0bNKNnMbzmIJ3/rTbSahKSwtewklqSP/01o0WKZiy+n/RAkUKOFBprjJtWOZkc8SPXV/rnoS2dWsJWQZhuPPtv3tefdDiEyp7ePrfgfKxuHpZES0IZRiFI4J/nAUP5bix+srcIxO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nome-nightly.flatpakrepo 
b/src/plugins/flatpak/daemon/gnome-nightly.flatpakrepo
new file mode 100644
index 000000000..f91b62e8c
--- /dev/null
+++ b/src/plugins/flatpak/daemon/gnome-nightly.flatpakrepo
@@ -0,0 +1,7 @@
+[Flatpak Repo]
+Title=GNOME Nightly Builds Repository
+Url=https://nightly.gnome.org/repo/
+Homepage=https://gnome.org/
+Description=The latest GNOME flatpak runtimes/apps directly from the gitlab CI. This is highly unstable 
stuff aimed at GNOME developers/designers to test 
+GPGKey=mQENBFYSUcEBCAC50sRVDy40A0mF/L877gPpjP2GVunQ+VGd5NY0MPwlSxG2TxM0VwfAjHZvDcWxKV0842bVfAXWzmbxMiVRZKFJMAsjWopsuvFCg14h4ysBJYL0T4gmaTOn49d8WUpyJzN1MeS8GEOVvNUa+w/q+ScW8/cICerzkMSiiQzg86Ph0YTvpsFy/feSPZk5VfY28Nw5204DO6z06+i4HuHm7wu8uSPu3TNrQwSPgqF+CeY1nHnw/LZIY6dRykkWOsOnfyPSd0EK8QYJD6q6i1JOctXutG/gR4GvbprgDagtJQpQmHHaGnoe0qJHOD0TOd+7mEiel0AfyPMwkzcobi5LwfwjABEBAAG0Kk5pZ2h0bHkgYXBwIGF1dG9idWlsZGVyIDxhbGV4bEByZWRoYXQuY29tPokBNwQTAQgAIQUCVhJRwQIbAwULCQgHAgYVCAkKCwIEFgIDAQIeAQIXgAAKCRBqfF1EghcOPVqiCACeD67ypYuBj+fx1Tfm3b9zW7E3g2FI1gLcK1KYva89pE1IUmYiFb6Lk/pWgNZpsbchsXxd7cOh31p66z1R/Mz10XYO5/33z4lrsJYna20ist7Gf3s+f8Wgg31T28DdhRP7ID8mjsZJo2iTutaWEwAAD23ggsEeW1kzMsIiOqzbJ+WXGhQv2kdfXOLgDSJElaH3gXsd60sbgxJVDD7IYxoInbv6C/WXc9+rLcY7zrauAIRoDrMIb5Z3EE7SJ5INhB3A9oM0fVIfGo9M1tNkk/FIbqYne07Rmb+4voA2wyT1wBHsqz5G+FxkFO1+gAyLc3AUHSHVFX7iQd5x4s91w+J5uQENBFYSUcEBCAC2EN17qhMREDRVY7/j6qj3CmQB/9OTNtWexJimpQ/q60a3LrE0KAu10eOV+IeURQcx2CRxHSIX3kAApOSu0xufN/flqWLfE39iLwpcwnp4fsEYphlrw5agkFUzkex2Jx++3Llp4v
 
3FXoM1Fmgo8GzAzKlk0JFqszQf2FA5wupFh0hc3u0cwln3W4IluXGveAoaF1WZTsjPwJ8Qtstpd68801Zb9jHez+8GkBk5aFkxvOuZFvXGRwOyo5O8RyjFFEaRqi6WEBNGYcmsihgSg3fNi1htPY18AqUcaZrBaSQ36RMC7tPbQZQGrg40hWlPrMWvzHDPOusmUYH8xsAHjdufABEBAAGJAR8EGAEIAAkFAlYSUcECGwwACgkQanxdRIIXDj2sjgf+KcheM4QJCVhnxcsv3geUyGRaguswIDqWc6xv6ScqTLgOBSlaVcqrbtVErJXINxa5fb3eX7UmuCVySPkPoip1IBH07+zvKtOlqOYIdFd9oaAqmRxX4iJiNr/70c7Gi09xg8EWY7BKLosLojIns/HawZ7kLO3rRPGjEV0oIavH8jiaAHm6rp6d5awGaZP6c7+ZuB+oFIZT71RsFoNPHhRKId4cC4zdcK1VCzJep6VekpepCmmh264TJdrfa0TEOAxt4DTQKz0gCYIKg8QRpYw/URi/kP15Xk/FbnG8hc2svd+u7mCd3FEvhuf25t7LBmUxsAWCR9HRgdnkFafANaa2JA==
+
diff --git a/src/plugins/flatpak/daemon/ipc-flatpak-repo.c b/src/plugins/flatpak/daemon/ipc-flatpak-repo.c
index ee33cb5b5..92ac1712b 100644
--- a/src/plugins/flatpak/daemon/ipc-flatpak-repo.c
+++ b/src/plugins/flatpak/daemon/ipc-flatpak-repo.c
@@ -36,14 +36,7 @@ allow runtime/org.freedesktop.*\n\
 allow runtime/org.gnome.*\n\
 ";
 
-static const struct {
-  const char *name;
-  const char *url;
-} flatpak_remotes[] = {
-  { "flathub", "https://flathub.org/repo/flathub.flatpakrepo"; },
-  { "flathub-beta", "https://flathub.org/beta-repo/flathub-beta.flatpakrepo"; },
-  { "gnome-nightly", "https://nightly.gnome.org/gnome-nightly.flatpakrepo"; },
-};
+static const char *remotes[] = { "flathub", "flathub-beta", "gnome-nightly" };
 
 static void
 ipc_flatpak_repo_constructed (GObject *object)
@@ -88,30 +81,38 @@ ipc_flatpak_repo_constructed (GObject *object)
   /* Add repos we need for development to private installation, but filtered to
    * only include runtimes.
    */
-  for (guint i = 0; i < G_N_ELEMENTS (flatpak_remotes); i++)
+  for (guint i = 0; i < G_N_ELEMENTS (remotes); i++)
     {
       g_autoptr(FlatpakRemote) remote = NULL;
 
-      if (!(remote = flatpak_installation_get_remote_by_name (self->installation, flatpak_remotes[i].name, 
NULL, NULL)))
+      if (!(remote = flatpak_installation_get_remote_by_name (self->installation, remotes[i], NULL, NULL)))
         {
-          g_autofree char *title = g_strdup_printf ("Builder (%s)", flatpak_remotes[i].name);
+          g_autofree char *title = g_strdup_printf ("Builder (%s)", remotes[i]);
+          g_autofree char *resource = g_strdup_printf ("/flatpak/%s.flatpakrepo", remotes[i]);
+          g_autoptr(GBytes) bytes = g_resources_lookup_data (resource, 0, NULL);
+
+          g_assert (bytes != NULL);
+
+          if (!(remote = flatpak_remote_new_from_file (remotes[i], bytes, &error)))
+            {
+              g_warning ("Failed to add remote %s to flatpak installation: %s",
+                         remotes[i], error->message);
+              g_clear_error (&error);
+              continue;
+            }
 
-          remote = flatpak_remote_new (flatpak_remotes[i].name);
           flatpak_remote_set_filter (remote, g_file_peek_path (filter_file));
-          flatpak_remote_set_prio (remote, 0);
-          flatpak_remote_set_title (remote, title);
-          flatpak_remote_set_url (remote, flatpak_remotes[i].url);
 
           if (!flatpak_installation_add_remote (self->installation, remote, TRUE, NULL, &error))
             {
               g_warning ("Failed to add remote %s to flatpak installation: %s",
-                         flatpak_remotes[i].name, error->message);
+                         remotes[i], error->message);
               g_clear_error (&error);
             }
         }
     }
 
-#define INSTALLATION_NAME "Installation \"GNOME Builder\""
+#define INSTALLATION_NAME "Installation \"gnome-builder-private\""
 
   keyfile = g_key_file_new ();
   g_key_file_set_string (keyfile, INSTALLATION_NAME, "Path", g_file_peek_path (flatpak));
diff --git a/src/plugins/flatpak/daemon/ipc-flatpak-service-impl.c 
b/src/plugins/flatpak/daemon/ipc-flatpak-service-impl.c
index f6db2f5b5..dda483280 100644
--- a/src/plugins/flatpak/daemon/ipc-flatpak-service-impl.c
+++ b/src/plugins/flatpak/daemon/ipc-flatpak-service-impl.c
@@ -1346,9 +1346,12 @@ ipc_flatpak_service_impl_constructed (GObject *object)
   if ((priv_install = ipc_flatpak_repo_get_installation (repo)))
     {
       g_autofree char *config_dir = ipc_flatpak_repo_get_config_dir (repo);
+      g_autofree char *path = ipc_flatpak_repo_get_path (repo);
 
       add_installation (self, priv_install, NULL);
       ipc_flatpak_service_set_config_dir (IPC_FLATPAK_SERVICE (self), config_dir);
+
+      g_debug ("Added installation at %s and FLATPAK_CONFIG_DIR %s", config_dir, path);
     }
 }
 
diff --git a/src/plugins/flatpak/daemon/ipc-flatpak.gresource.xml 
b/src/plugins/flatpak/daemon/ipc-flatpak.gresource.xml
new file mode 100644
index 000000000..81bc34c7f
--- /dev/null
+++ b/src/plugins/flatpak/daemon/ipc-flatpak.gresource.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+  <gresource prefix="/flatpak">
+    <file>gnome-nightly.flatpakrepo</file>
+    <file>flathub.flatpakrepo</file>
+    <file>flathub-beta.flatpakrepo</file>
+  </gresource>
+</gresources>
diff --git a/src/plugins/flatpak/daemon/meson.build b/src/plugins/flatpak/daemon/meson.build
index e6158d0c4..34acf2b9d 100644
--- a/src/plugins/flatpak/daemon/meson.build
+++ b/src/plugins/flatpak/daemon/meson.build
@@ -19,12 +19,19 @@ ipc_flatpak_transfer_src = gnome.gdbus_codegen('ipc-flatpak-transfer',
          namespace: 'Ipc',
 )
 
+ipc_flatpak_resources = gnome.compile_resources(
+  'ipc-resources',
+  'ipc-flatpak.gresource.xml',
+  c_name: 'ipc_flatpak'
+)
+
 gnome_builder_flatpak_sources = [
   'gnome-builder-flatpak.c',
   'ipc-flatpak-service-impl.c',
   'ipc-flatpak-repo.c',
   ipc_flatpak_service_src,
   ipc_flatpak_transfer_src,
+  ipc_flatpak_resources,
 ]
 
 gnome_builder_flatpak = executable('gnome-builder-flatpak', gnome_builder_flatpak_sources,


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