Add an upstream patch to add flatpak build-export --disable-sandbox
This commit is contained in:
parent
15f0af48b8
commit
a2371405ba
55
build-export-disable-sandbox.patch
Normal file
55
build-export-disable-sandbox.patch
Normal file
@ -0,0 +1,55 @@
|
||||
From ea227187d40a8194d389585b69a0120f782d1bde Mon Sep 17 00:00:00 2001
|
||||
From: Simon McVittie <smcv@debian.org>
|
||||
Date: Mon, 28 Jan 2019 12:46:22 +0000
|
||||
Subject: [PATCH] build-export: Allow sandboxing on icon validator to be
|
||||
disabled
|
||||
|
||||
During build-time tests, we can't rely on bwrap working.
|
||||
|
||||
Signed-off-by: Simon McVittie <smcv@debian.org>
|
||||
|
||||
Closes: #2661
|
||||
Approved by: alexlarsson
|
||||
---
|
||||
app/flatpak-builtins-build-export.c | 10 +++++++---
|
||||
1 file changed, 7 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/app/flatpak-builtins-build-export.c b/app/flatpak-builtins-build-export.c
|
||||
index 63d95493..79722421 100644
|
||||
--- a/app/flatpak-builtins-build-export.c
|
||||
+++ b/app/flatpak-builtins-build-export.c
|
||||
@@ -40,6 +40,7 @@ static gboolean opt_runtime;
|
||||
static gboolean opt_update_appstream;
|
||||
static gboolean opt_no_update_summary;
|
||||
static gboolean opt_disable_fsync;
|
||||
+static gboolean opt_disable_sandbox = FALSE;
|
||||
static char **opt_gpg_key_ids;
|
||||
static char **opt_exclude;
|
||||
static char **opt_include;
|
||||
@@ -67,6 +68,7 @@ static GOptionEntry options[] = {
|
||||
{ "timestamp", 0, 0, G_OPTION_ARG_STRING, &opt_timestamp, N_("Override the timestamp of the commit"), N_("TIMESTAMP") },
|
||||
{ "collection-id", 0, 0, G_OPTION_ARG_STRING, &opt_collection_id, N_("Collection ID"), "COLLECTION-ID" },
|
||||
{ "disable-fsync", 0, 0, G_OPTION_ARG_NONE, &opt_disable_fsync, "Do not invoke fsync()", NULL },
|
||||
+ { "disable-sandbox", 0, 0, G_OPTION_ARG_NONE, &opt_disable_sandbox, "Do not sandbox icon validator", NULL },
|
||||
|
||||
{ NULL }
|
||||
};
|
||||
@@ -373,10 +375,12 @@ validate_icon_file (GFile *file, GError **error)
|
||||
args = g_ptr_array_new_with_free_func (g_free);
|
||||
|
||||
#ifndef DISABLE_SANDBOXED_TRIGGERS
|
||||
- add_args (args, validate_icon, "--sandbox", "512", "512", name, NULL);
|
||||
-#else
|
||||
- add_args (args, validate_icon, "512", "512", name, NULL);
|
||||
+ if (!opt_disable_sandbox)
|
||||
+ add_args (args, validate_icon, "--sandbox", "512", "512", name, NULL);
|
||||
+ else
|
||||
#endif
|
||||
+ add_args (args, validate_icon, "512", "512", name, NULL);
|
||||
+
|
||||
g_ptr_array_add (args, NULL);
|
||||
|
||||
if (!g_spawn_sync (NULL, (char **)args->pdata, NULL, 0, NULL, NULL, NULL, &err, &status, error))
|
||||
--
|
||||
2.20.1
|
||||
|
@ -3,13 +3,16 @@
|
||||
|
||||
Name: flatpak
|
||||
Version: 1.2.0
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
Summary: Application deployment framework for desktop apps
|
||||
|
||||
License: LGPLv2+
|
||||
URL: http://flatpak.org/
|
||||
Source0: https://github.com/flatpak/flatpak/releases/download/%{version}/%{name}-%{version}.tar.xz
|
||||
|
||||
# https://github.com/flatpak/flatpak/pull/2661
|
||||
Patch0: build-export-disable-sandbox.patch
|
||||
|
||||
BuildRequires: pkgconfig(appstream-glib)
|
||||
BuildRequires: pkgconfig(dconf)
|
||||
BuildRequires: pkgconfig(gdk-pixbuf-2.0)
|
||||
@ -178,6 +181,9 @@ flatpak remote-list --system &> /dev/null || :
|
||||
|
||||
|
||||
%changelog
|
||||
* Mon Feb 4 2019 fedora-toolbox <otaylor@redhat.com> - 1.2.0-4
|
||||
- Add an upstream patch to add flatpak build-export --disable-sandbox
|
||||
|
||||
* Thu Jan 31 2019 Bastien Nocera <bnocera@redhat.com> - 1.2.0-3
|
||||
- Require librsvg2 so SVG icons can be exported
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user