summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2016-05-09 11:07:53 +0200
committerAlexander Larsson <alexl@redhat.com>2016-05-09 11:11:55 +0200
commit8abbc0186efe977cec2a3214e7aa3703e9f1169f (patch)
treef02d20ec637609e32d473e45b1ad8b6a8a6de281 /common
parentba37b22d78f3b1011ceab182c8a4a05d5ba630a7 (diff)
downloadxdg-app-8abbc0186efe977cec2a3214e7aa3703e9f1169f.tar.gz
Rename everything but the on-disk location to flatpak
Diffstat (limited to 'common')
-rw-r--r--common/Makefile.am.inc6
-rw-r--r--common/flatpak-db.c2
-rw-r--r--common/flatpak-db.h2
-rw-r--r--common/flatpak-dir.c36
-rw-r--r--common/flatpak-portal-error.c4
-rw-r--r--common/flatpak-portal-error.h2
-rw-r--r--common/flatpak-run.c22
-rw-r--r--common/flatpak-utils.c18
-rw-r--r--common/flatpak-utils.h4
9 files changed, 48 insertions, 48 deletions
diff --git a/common/Makefile.am.inc b/common/Makefile.am.inc
index a10e59e..06d676d 100644
--- a/common/Makefile.am.inc
+++ b/common/Makefile.am.inc
@@ -4,12 +4,12 @@ dbus_built_sources = common/flatpak-dbus.c common/flatpak-dbus.h
systemd_dbus_built_sources = common/flatpak-systemd-dbus.c common/flatpak-systemd-dbus.h
BUILT_SOURCES += $(dbus_built_sources) $(systemd_dbus_built_sources)
-$(dbus_built_sources) : data/org.freedesktop.XdgApp.xml
+$(dbus_built_sources) : data/org.freedesktop.Flatpak.xml
$(AM_V_GEN) $(GDBUS_CODEGEN) \
- --interface-prefix org.freedesktop.XdgApp. \
+ --interface-prefix org.freedesktop.Flatpak. \
--c-namespace Flatpak \
--generate-c-code $(builddir)/common/flatpak-dbus \
- $(srcdir)/data/org.freedesktop.XdgApp.xml \
+ $(srcdir)/data/org.freedesktop.Flatpak.xml \
$(NULL)
$(systemd_dbus_built_sources) : data/org.freedesktop.systemd1.xml
diff --git a/common/flatpak-db.c b/common/flatpak-db.c
index 429700d..f20443e 100644
--- a/common/flatpak-db.c
+++ b/common/flatpak-db.c
@@ -1,4 +1,4 @@
-/* xdg-app-db.c
+/* flatpak-db.c
*
* Copyright (C) 2015 Red Hat, Inc
*
diff --git a/common/flatpak-db.h b/common/flatpak-db.h
index 738cf9b..f775785 100644
--- a/common/flatpak-db.h
+++ b/common/flatpak-db.h
@@ -1,4 +1,4 @@
-/* xdg-app-db.h
+/* flatpak-db.h
*
* Copyright © 2015 Red Hat, Inc
*
diff --git a/common/flatpak-dir.c b/common/flatpak-dir.c
index 1aac10c..c4bbfe3 100644
--- a/common/flatpak-dir.c
+++ b/common/flatpak-dir.c
@@ -37,19 +37,19 @@
#include "errno.h"
-#define NO_SYSTEM_HELPER ((XdgAppSystemHelper *) (gpointer) 1)
+#define NO_SYSTEM_HELPER ((FlatpakSystemHelper *) (gpointer) 1)
struct FlatpakDir
{
- GObject parent;
+ GObject parent;
- gboolean user;
- GFile *basedir;
- OstreeRepo *repo;
+ gboolean user;
+ GFile *basedir;
+ OstreeRepo *repo;
- XdgAppSystemHelper *system_helper;
+ FlatpakSystemHelper *system_helper;
- SoupSession *soup_session;
+ SoupSession *soup_session;
};
typedef struct
@@ -75,7 +75,7 @@ typedef struct
G_DEFINE_TYPE (FlatpakDir, flatpak_dir, G_TYPE_OBJECT)
G_DEFINE_TYPE (FlatpakDeploy, flatpak_deploy, G_TYPE_OBJECT)
-G_DEFINE_QUARK (xdg - app - dir - error - quark, flatpak_dir_error)
+G_DEFINE_QUARK (flatpak-dir-error-quark, flatpak_dir_error)
enum {
PROP_0,
@@ -199,16 +199,16 @@ flatpak_ensure_user_cache_dir_location (GError **error)
return g_steal_pointer (&cache_dir);
}
-static XdgAppSystemHelper *
+static FlatpakSystemHelper *
flatpak_dir_get_system_helper (FlatpakDir *self)
{
g_autoptr(GError) error = NULL;
if (g_once_init_enter (&self->system_helper))
{
- XdgAppSystemHelper *system_helper;
+ FlatpakSystemHelper *system_helper;
system_helper =
- xdg_app_system_helper_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM,
+ flatpak_system_helper_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM,
G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES |
G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS,
"org.freedesktop.Flatpak.SystemHelper",
@@ -231,7 +231,7 @@ flatpak_dir_get_system_helper (FlatpakDir *self)
gboolean
flatpak_dir_use_child_repo (FlatpakDir *self)
{
- XdgAppSystemHelper *system_helper;
+ FlatpakSystemHelper *system_helper;
if (self->user || getuid () == 0)
return FALSE;
@@ -547,7 +547,7 @@ flatpak_dir_get_repo (FlatpakDir *self)
}
-/* This is an exclusive per xdg-app installation file lock that is taken
+/* This is an exclusive per flatpak installation file lock that is taken
* whenever any config in the directory outside the repo is to be changed. For
* instance deployements, overrides or active commit changes.
*
@@ -2041,7 +2041,7 @@ export_desktop_file (const char *app,
g_key_file_remove_key (keyfile, groups[i], "X-GNOME-Bugzilla-ExtraInfoScript", NULL);
new_exec = g_string_new ("");
- g_string_append_printf (new_exec, FLATPAK_BINDIR "/xdg-app run --branch=%s --arch=%s", escaped_branch, escaped_arch);
+ g_string_append_printf (new_exec, FLATPAK_BINDIR "/flatpak run --branch=%s --arch=%s", escaped_branch, escaped_arch);
old_exec = g_key_file_get_string (keyfile, groups[i], "Exec", NULL);
if (old_exec && g_shell_parse_argv (old_exec, &old_argc, &old_argv, NULL) && old_argc >= 1)
@@ -2868,7 +2868,7 @@ flatpak_dir_install (FlatpakDir *self,
g_autoptr(OstreeRepo) child_repo = NULL;
g_auto(GLnxLockFile) child_repo_lock = GLNX_LOCK_FILE_INIT;
char *empty_subpaths[] = {NULL};
- XdgAppSystemHelper *system_helper;
+ FlatpakSystemHelper *system_helper;
if (no_pull)
return flatpak_fail (error, "No-pull install not supported without root permissions");
@@ -2889,7 +2889,7 @@ flatpak_dir_install (FlatpakDir *self,
progress, cancellable, error))
return FALSE;
- if (!xdg_app_system_helper_call_deploy_sync (system_helper,
+ if (!flatpak_system_helper_call_deploy_sync (system_helper,
gs_file_get_path_cached (ostree_repo_get_path (child_repo)),
FLATPAK_HELPER_DEPLOY_FLAGS_NONE,
ref,
@@ -2943,7 +2943,7 @@ flatpak_dir_update (FlatpakDir *self,
char *empty_subpaths[] = {NULL};
g_autofree char *pulled_checksum = NULL;
g_autofree char *active_checksum = NULL;
- XdgAppSystemHelper *system_helper;
+ FlatpakSystemHelper *system_helper;
if (no_pull)
return flatpak_fail (error, "No-pull update not supported without root permissions");
@@ -2974,7 +2974,7 @@ flatpak_dir_update (FlatpakDir *self,
if (g_strcmp0 (active_checksum, pulled_checksum) != 0)
{
- if (!xdg_app_system_helper_call_deploy_sync (system_helper,
+ if (!flatpak_system_helper_call_deploy_sync (system_helper,
gs_file_get_path_cached (ostree_repo_get_path (child_repo)),
FLATPAK_HELPER_DEPLOY_FLAGS_UPDATE,
ref,
diff --git a/common/flatpak-portal-error.c b/common/flatpak-portal-error.c
index 7672f0f..0d18343 100644
--- a/common/flatpak-portal-error.c
+++ b/common/flatpak-portal-error.c
@@ -1,4 +1,4 @@
-/* xdg-app-error.c
+/* flatpak-error.c
*
* Copyright (C) 2015 Red Hat, Inc
*
@@ -40,7 +40,7 @@ flatpak_portal_error_quark (void)
{
static volatile gsize quark_volatile = 0;
- g_dbus_error_register_error_domain ("xdg-app-portal-error-quark",
+ g_dbus_error_register_error_domain ("flatpak-portal-error-quark",
&quark_volatile,
flatpak_error_entries,
G_N_ELEMENTS (flatpak_error_entries));
diff --git a/common/flatpak-portal-error.h b/common/flatpak-portal-error.h
index 2ff02e8..14afad9 100644
--- a/common/flatpak-portal-error.h
+++ b/common/flatpak-portal-error.h
@@ -1,4 +1,4 @@
-/* xdg-app-error.c
+/* flatpak-portal-error.c
*
* Copyright (C) 2015 Red Hat, Inc
*
diff --git a/common/flatpak-run.c b/common/flatpak-run.c
index ff4eb37..388aef9 100644
--- a/common/flatpak-run.c
+++ b/common/flatpak-run.c
@@ -1318,7 +1318,7 @@ flatpak_run_add_x11_args (GPtrArray *argv_array,
#ifdef ENABLE_XAUTH
int fd;
- fd = g_file_open_tmp ("xdg-app-xauth-XXXXXX", &tmp_path, NULL);
+ fd = g_file_open_tmp ("flatpak-xauth-XXXXXX", &tmp_path, NULL);
if (fd >= 0)
{
FILE *output = fdopen (fd, "wb");
@@ -1795,7 +1795,7 @@ flatpak_run_add_environment_args (GPtrArray *argv_array,
g_autofree char *path = NULL;
int fd;
- fd = g_file_open_tmp ("xdg-app-user-dir-XXXXXX.dirs", &tmp_path, NULL);
+ fd = g_file_open_tmp ("flatpak-user-dir-XXXXXX.dirs", &tmp_path, NULL);
if (fd >= 0)
{
close (fd);
@@ -2087,7 +2087,7 @@ flatpak_run_in_transient_unit (const char *appid, GError **error)
if (!manager)
goto out;
- name = g_strdup_printf ("xdg-app-%s-%d.scope", appid, getpid ());
+ name = g_strdup_printf ("flatpak-%s-%d.scope", appid, getpid ());
g_variant_builder_init (&builder, G_VARIANT_TYPE ("a(sv)"));
@@ -2202,14 +2202,14 @@ add_app_info_args (GPtrArray *argv_array,
g_autofree char *tmp_path = NULL;
int fd;
- fd = g_file_open_tmp ("xdg-app-context-XXXXXX", &tmp_path, NULL);
+ fd = g_file_open_tmp ("flatpak-context-XXXXXX", &tmp_path, NULL);
if (fd >= 0)
{
g_autoptr(GKeyFile) keyfile = NULL;
g_autoptr(GFile) files = NULL;
g_autofree char *files_path = NULL;
g_autofree char *fd_str = NULL;
- g_autofree char *dest = g_strdup_printf ("/run/user/%d/xdg-app-info", getuid ());
+ g_autofree char *dest = g_strdup_printf ("/run/user/%d/flatpak-info", getuid ());
close (fd);
@@ -2247,17 +2247,17 @@ static void
add_monitor_path_args (GPtrArray *argv_array,
char ***envp_p)
{
- g_autoptr(AutoXdgAppSessionHelper) session_helper = NULL;
+ g_autoptr(AutoFlatpakSessionHelper) session_helper = NULL;
g_autofree char *monitor_path = NULL;
session_helper =
- xdg_app_session_helper_proxy_new_for_bus_sync (G_BUS_TYPE_SESSION,
+ flatpak_session_helper_proxy_new_for_bus_sync (G_BUS_TYPE_SESSION,
G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES | G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS,
"org.freedesktop.Flatpak",
"/org/freedesktop/Flatpak/SessionHelper",
NULL, NULL);
if (session_helper &&
- xdg_app_session_helper_call_request_monitor_sync (session_helper,
+ flatpak_session_helper_call_request_monitor_sync (session_helper,
&monitor_path,
NULL, NULL))
{
@@ -2545,7 +2545,7 @@ setup_seccomp (GPtrArray *argv_array,
/* This *adds* the target arch, instead of replacing the
native one. This is not ideal, because we'd like to only
allow the target arch, but we can't really disallow the
- native arch at this point, because then xdg-app-helper
+ native arch at this point, because then bubblewrap
couldn't continue runnning. */
r = seccomp_arch_add (seccomp, arch_id);
if (r < 0 && r != -EEXIST)
@@ -2612,7 +2612,7 @@ setup_seccomp (GPtrArray *argv_array,
r = seccomp_rule_add_exact (seccomp, SCMP_ACT_ERRNO (EAFNOSUPPORT), SCMP_SYS (socket), 1, SCMP_A0 (SCMP_CMP_EQ, family));
}
- fd = g_file_open_tmp ("xdg-app-seccomp-XXXXXX", &path, error);
+ fd = g_file_open_tmp ("flatpak-seccomp-XXXXXX", &path, error);
if (fd == -1)
return FALSE;
@@ -2969,7 +2969,7 @@ flatpak_run_app (const char *app_ref,
close (sync_fds[1]);
add_args (argv_array,
- /* Not in base, because we don't want this for xdg-app build */
+ /* Not in base, because we don't want this for flatpak build */
"--symlink", "/app/lib/debug/source", "/run/build",
"--symlink", "/usr/lib/debug/source", "/run/build-runtime",
NULL);
diff --git a/common/flatpak-utils.c b/common/flatpak-utils.c
index dbe2f99..fca297a 100644
--- a/common/flatpak-utils.c
+++ b/common/flatpak-utils.c
@@ -1023,10 +1023,10 @@ got_credentials_cb (GObject *source_object,
const char *unit = lines[i] + strlen ("1:name=systemd:");
g_autofree char *scope = g_path_get_basename (unit);
- if (g_str_has_prefix (scope, "xdg-app-") &&
+ if (g_str_has_prefix (scope, "flatpak-") &&
g_str_has_suffix (scope, ".scope"))
{
- const char *name = scope + strlen ("xdg-app-");
+ const char *name = scope + strlen ("flatpak-");
char *dash = strchr (name, '-');
if (dash != NULL)
{
@@ -1532,9 +1532,9 @@ flatpak_repo_set_title (OstreeRepo *repo,
config = ostree_repo_copy_config (repo);
if (title)
- g_key_file_set_string (config, "xdg-app", "title", title);
+ g_key_file_set_string (config, "flatpak", "title", title);
else
- g_key_file_remove_key (config, "xdg-app", "title", NULL);
+ g_key_file_remove_key (config, "flatpak", "title", NULL);
if (!ostree_repo_write_config (repo, config, error))
return FALSE;
@@ -1633,7 +1633,7 @@ flatpak_repo_update (OstreeRepo *repo,
config = ostree_repo_get_config (repo);
if (config)
- title = g_key_file_get_string (config, "xdg-app", "title", NULL);
+ title = g_key_file_get_string (config, "flatpak", "title", NULL);
if (title)
g_variant_builder_add (&builder, "{sv}", "xa.title",
@@ -1779,7 +1779,7 @@ validate_component (FlatpakXml *component,
bundle->attribute_names = g_new0 (char *, 2 * 4);
bundle->attribute_values = g_new0 (char *, 2 * 4);
bundle->attribute_names[0] = g_strdup ("type");
- bundle->attribute_values[0] = g_strdup ("xdg-app");
+ bundle->attribute_values[0] = g_strdup ("flatpak");
i = 1;
if (runtime)
@@ -1905,7 +1905,7 @@ copy_icon (const char *id,
g_autoptr(GFile) icons_dir =
g_file_resolve_relative_path (root,
- "files/share/app-info/icons/xdg-app");
+ "files/share/app-info/icons/flatpak");
g_autoptr(GFile) size_dir = g_file_get_child (icons_dir, size);
g_autoptr(GFile) icon_file = g_file_get_child (size_dir, icon_name);
g_autoptr(GFile) dest_dir = g_file_get_child (dest, "icons");
@@ -2049,7 +2049,7 @@ flatpak_appstream_xml_new (void)
appstream_components->attribute_names[0] = g_strdup ("version");
appstream_components->attribute_values[0] = g_strdup ("0.8");
appstream_components->attribute_names[1] = g_strdup ("origin");
- appstream_components->attribute_values[1] = g_strdup ("xdg-app");
+ appstream_components->attribute_values[1] = g_strdup ("flatpak");
return appstream_root;
}
@@ -2124,7 +2124,7 @@ flatpak_repo_generate_appstream (OstreeRepo *repo,
{
GHashTableIter iter2;
const char *arch = key;
- g_autofree char *tmpdir = g_strdup ("/tmp/xdg-app-appstream-XXXXXX");
+ g_autofree char *tmpdir = g_strdup ("/tmp/flatpak-appstream-XXXXXX");
g_autoptr(FlatpakTempDir) tmpdir_file = NULL;
g_autoptr(GFile) appstream_file = NULL;
g_autoptr(GFile) root = NULL;
diff --git a/common/flatpak-utils.h b/common/flatpak-utils.h
index 7187015..8f3ab92 100644
--- a/common/flatpak-utils.h
+++ b/common/flatpak-utils.h
@@ -292,8 +292,8 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC (SoupURI, soup_uri_free)
/* This uses a weird Auto prefix to avoid conflicts with later added autogenerated autoptr support, per:
* https://git.gnome.org/browse/glib/commit/?id=1c6cd5f0a3104aa9b62c7f1d3086181f63e71b59
*/
-typedef XdgAppSessionHelper AutoXdgAppSessionHelper;
-G_DEFINE_AUTOPTR_CLEANUP_FUNC (AutoXdgAppSessionHelper, g_object_unref)
+typedef FlatpakSessionHelper AutoFlatpakSessionHelper;
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (AutoFlatpakSessionHelper, g_object_unref)
typedef struct FlatpakXml FlatpakXml;