Accepting request 478567 from GNOME:Next
Update to 0.8.4 OBS-URL: https://build.opensuse.org/request/show/478567 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/flatpak?expand=0&rev=21
This commit is contained in:
parent
735e68af55
commit
c820fd915e
2
_service
2
_service
@ -4,7 +4,7 @@
|
||||
<param name="scm">git</param>
|
||||
<param name="versionformat">@PARENT_TAG@</param>
|
||||
<param name="changesgenerate">enable</param>
|
||||
<param name="revision">refs/tags/0.8.3</param>
|
||||
<param name="revision">refs/tags/0.8.4</param>
|
||||
</service>
|
||||
<service name="recompress" mode="disabled">
|
||||
<param name="file">*.tar</param>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<servicedata>
|
||||
<service name="tar_scm">
|
||||
<param name="url">https://github.com/flatpak/flatpak.git</param>
|
||||
<param name="changesrevision">b02a3cf42a11102fbedb795d95e835e55c7e3544</param></service></servicedata>
|
||||
<param name="changesrevision">7e18ec30b27e6f25a43e982dc6e5dd6c0a708fa0</param></service></servicedata>
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e5214f88b657cf474e5898dadb28c493f7d302ee8acfe6b0ae53424b597748d5
|
||||
size 547424
|
3
flatpak-0.8.4.tar.xz
Normal file
3
flatpak-0.8.4.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:07bb07150809a960cb8430d55b42a2dd2a0b876578b57f4e7322b034d076e9a0
|
||||
size 547956
|
@ -1,138 +0,0 @@
|
||||
From 1c78637e440675eda987147fa873e4ff7065b49f Mon Sep 17 00:00:00 2001
|
||||
From: Ray Strode <rstrode@redhat.com>
|
||||
Date: Wed, 15 Feb 2017 10:10:29 -0500
|
||||
Subject: [PATCH] run: propagate wildcard xauth entries to app bundle
|
||||
|
||||
At the moment, flatpak applications are only given FamilyLocal family
|
||||
xauth cookies from the Xauthority file. This is so, the sandboxed
|
||||
application doesn't inadvertently get access to displays on other
|
||||
computers.
|
||||
|
||||
But FamilyLocal isn't the only xauth family that's local. FamilyWild
|
||||
entries can be local as well.
|
||||
|
||||
Furthermore, FamilyWild entries are preferable to FamilyLocal entries
|
||||
when found, because they don't break if the system hostname is changed.
|
||||
|
||||
This commit makes FamilyWild xauth entries get propagated in the same
|
||||
way as their FamilyLocal counterparts.
|
||||
---
|
||||
common/flatpak-run.c | 24 +++++++++++++++++++++---
|
||||
1 file changed, 21 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/common/flatpak-run.c b/common/flatpak-run.c
|
||||
index 8dff6d2..34f99f1 100644
|
||||
--- a/common/flatpak-run.c
|
||||
+++ b/common/flatpak-run.c
|
||||
@@ -1718,87 +1718,105 @@ static char *
|
||||
extract_unix_path_from_dbus_address (const char *address)
|
||||
{
|
||||
const char *path, *path_end;
|
||||
|
||||
if (address == NULL)
|
||||
return NULL;
|
||||
|
||||
if (!g_str_has_prefix (address, "unix:"))
|
||||
return NULL;
|
||||
|
||||
path = strstr (address, "path=");
|
||||
if (path == NULL)
|
||||
return NULL;
|
||||
path += strlen ("path=");
|
||||
path_end = path;
|
||||
while (*path_end != 0 && *path_end != ',')
|
||||
path_end++;
|
||||
|
||||
return g_strndup (path, path_end - path);
|
||||
}
|
||||
|
||||
#ifdef ENABLE_XAUTH
|
||||
static gboolean
|
||||
auth_streq (char *str,
|
||||
char *au_str,
|
||||
int au_len)
|
||||
{
|
||||
return au_len == strlen (str) && memcmp (str, au_str, au_len) == 0;
|
||||
}
|
||||
|
||||
+static gboolean
|
||||
+xauth_entry_should_propagate (Xauth *xa,
|
||||
+ char *hostname,
|
||||
+ char *number)
|
||||
+{
|
||||
+ /* ensure entry isn't for remote access */
|
||||
+ if (xa->family != FamilyLocal && xa->family != FamilyWild)
|
||||
+ return FALSE;
|
||||
+
|
||||
+ /* ensure entry is for this machine */
|
||||
+ if (xa->family == FamilyLocal && !auth_streq (hostname, xa->address, xa->address_length))
|
||||
+ return FALSE;
|
||||
+
|
||||
+ /* ensure entry is for this session */
|
||||
+ if (xa->number != NULL && !auth_streq (number, xa->number, xa->number_length))
|
||||
+ return FALSE;
|
||||
+
|
||||
+ return TRUE;
|
||||
+}
|
||||
+
|
||||
static void
|
||||
write_xauth (char *number, FILE *output)
|
||||
{
|
||||
Xauth *xa, local_xa;
|
||||
char *filename;
|
||||
FILE *f;
|
||||
struct utsname unames;
|
||||
|
||||
if (uname (&unames))
|
||||
{
|
||||
g_warning ("uname failed");
|
||||
return;
|
||||
}
|
||||
|
||||
filename = XauFileName ();
|
||||
f = fopen (filename, "rb");
|
||||
if (f == NULL)
|
||||
return;
|
||||
|
||||
while (TRUE)
|
||||
{
|
||||
xa = XauReadAuth (f);
|
||||
if (xa == NULL)
|
||||
break;
|
||||
- if (xa->family == FamilyLocal &&
|
||||
- auth_streq (unames.nodename, xa->address, xa->address_length) &&
|
||||
- (xa->number == NULL || auth_streq (number, xa->number, xa->number_length)))
|
||||
+ if (xauth_entry_should_propagate (xa, unames.nodename, number))
|
||||
{
|
||||
local_xa = *xa;
|
||||
if (local_xa.number)
|
||||
{
|
||||
local_xa.number = "99";
|
||||
local_xa.number_length = 2;
|
||||
}
|
||||
|
||||
if (!XauWriteAuth (output, &local_xa))
|
||||
g_warning ("xauth write error");
|
||||
}
|
||||
|
||||
XauDisposeAuth (xa);
|
||||
}
|
||||
|
||||
fclose (f);
|
||||
}
|
||||
#endif /* ENABLE_XAUTH */
|
||||
|
||||
static void
|
||||
add_args (GPtrArray *argv_array, ...)
|
||||
{
|
||||
va_list args;
|
||||
const gchar *arg;
|
||||
|
||||
va_start (args, argv_array);
|
||||
while ((arg = va_arg (args, const gchar *)))
|
||||
g_ptr_array_add (argv_array, g_strdup (arg));
|
||||
va_end (args);
|
||||
}
|
||||
--
|
||||
2.9.3
|
||||
|
@ -1,3 +1,40 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Mar 10 20:58:11 UTC 2017 - dimstar@opensuse.org
|
||||
|
||||
- Update to version 0.8.4:
|
||||
+ Fix no-systemd-user warning (it doesn't affect sandboxing
|
||||
anymore).
|
||||
+ run: propagate wildcard xauth entries to app bundle.
|
||||
+ Don't remove origin remotes if some other ref uses it.
|
||||
+ Fix repeated download of locates on update.
|
||||
+ update: Don't update related refs from different remote.
|
||||
+ Initialize g_autofree string to NULL, not to crash when early
|
||||
returning.
|
||||
+ document portal: Disable spice_read as it seems broken.
|
||||
+ Return the container from flatpak_get_system_installations().
|
||||
+ Don't include newlines in error messages.
|
||||
+ utils: Fix list_unmtainained_refs.
|
||||
+ Avoid possible null dereference.
|
||||
+ utils: Fix flatpak_bundle_load typo.
|
||||
+ list: Don't check error twice.
|
||||
+ list-remotes: Handle remotes with no url specified.
|
||||
+ run: Handle error when enumerating /etc.
|
||||
+ zero-mtime: Handle error when enumerating directory.
|
||||
+ Fix error check when loading configuration.
|
||||
+ Support runtime-less extra-data.
|
||||
+ flatpak_list_extensions: Break out code into helper.
|
||||
+ extensions: Support multiple versions.
|
||||
+ Append flatpak data dirs if XDG_DATA_DIRS is already set
|
||||
(gh#flatpak/flatpak#611).
|
||||
+ appstream: Don't add runtime to flatpak bundle tag for
|
||||
runtimes.
|
||||
+ Split extra-data setup and fetch.
|
||||
+ Improve progress calculation.
|
||||
+ profile: Don't add flatpak to XDG_DATA_DIRS if its already
|
||||
there.
|
||||
+ Updated translations.
|
||||
- Drop flatpak-propagate-xauth-wildcard.patch: fixed upstream.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Feb 21 16:42:32 UTC 2017 - zaitor@opensuse.org
|
||||
|
||||
|
@ -22,15 +22,13 @@
|
||||
|
||||
%define libname libflatpak0
|
||||
Name: flatpak
|
||||
Version: 0.8.3
|
||||
Version: 0.8.4
|
||||
Release: 0
|
||||
Summary: Manage OSTree based application bundles
|
||||
License: LGPL-2.1+
|
||||
Group: System/Packages
|
||||
Url: https://flatpak.github.io/
|
||||
Source: %{name}-%{version}.tar.xz
|
||||
# PATCH-FIX-UPSTREAM flatpak-propagate-xauth-wildcard.patch aplazas@suse.com gh#flatpak/flatpak#569 -- Ensures a flatpaked app has the right to communicate with X.
|
||||
Patch0: flatpak-propagate-xauth-wildcard.patch
|
||||
BuildRequires: docbook-xsl-stylesheets
|
||||
BuildRequires: gtk-doc
|
||||
BuildRequires: intltool >= 0.35.0
|
||||
@ -115,7 +113,6 @@ more information.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
|
||||
%build
|
||||
NOCONFIGURE=1 ./autogen.sh
|
||||
|
Loading…
Reference in New Issue
Block a user