forked from Mirrors/flatpak-builder
Merge pull request #155 from smcv/system-bwrap
Add BWRAP and --with-system-bubblewrap configure argumentstingping/wmclass
commit
5f73b1f2da
11
Makefile.am
11
Makefile.am
|
@ -41,7 +41,6 @@ AM_CPPFLAGS = \
|
|||
-DFLATPAK_BASEDIR=\"$(pkgdatadir)\" \
|
||||
-DFLATPAK_TRIGGERDIR=\"$(pkgdatadir)/triggers\" \
|
||||
-DSYSTEM_FONTS_DIR=\"$(SYSTEM_FONTS_DIR)\" \
|
||||
-DHELPER=\"$(libexecdir)/flatpak-bwrap\" \
|
||||
-DDBUSPROXY=\"$(libexecdir)/flatpak-dbus-proxy\" \
|
||||
-DG_LOG_DOMAIN=\"flatpak\" \
|
||||
-I$(srcdir)/libglnx \
|
||||
|
@ -49,6 +48,12 @@ AM_CPPFLAGS = \
|
|||
-I$(builddir)/common \
|
||||
$(NULL)
|
||||
|
||||
if WITH_SYSTEM_BWRAP
|
||||
AM_CPPFLAGS += -DHELPER=\"$(BWRAP)\"
|
||||
else
|
||||
AM_CPPFLAGS += -DHELPER=\"$(libexecdir)/flatpak-bwrap\"
|
||||
endif
|
||||
|
||||
triggersdir = $(pkgdatadir)/triggers
|
||||
dist_triggers_SCRIPTS = \
|
||||
triggers/gtk-icon-cache.trigger \
|
||||
|
@ -79,6 +84,8 @@ include permission-store/Makefile.am.inc
|
|||
include document-portal/Makefile.am.inc
|
||||
include tests/Makefile.am.inc
|
||||
|
||||
if !WITH_SYSTEM_BWRAP
|
||||
|
||||
bwrap_PROGRAMS = flatpak-bwrap
|
||||
flatpak_bwrap_SOURCES = $(bwrap_SOURCES)
|
||||
flatpak_bwrap_CFLAGS = $(bwrap_CFLAGS)
|
||||
|
@ -98,6 +105,8 @@ if PRIV_MODE_FILECAPS
|
|||
endif
|
||||
endif
|
||||
|
||||
endif # !WITH_SYSTEM_BWRAP
|
||||
|
||||
completiondir = $(datadir)/bash-completion/completions
|
||||
completion_DATA = completion/flatpak
|
||||
EXTRA_DIST += $(completion_DATA)
|
||||
|
|
|
@ -224,7 +224,7 @@ flatpak_builtin_build (int argc, char **argv, GCancellable *cancellable, GError
|
|||
|
||||
g_ptr_array_add (argv_array, NULL);
|
||||
|
||||
if (execve (flatpak_get_bwrap (), (char **) argv_array->pdata, envp) == -1)
|
||||
if (execvpe (flatpak_get_bwrap (), (char **) argv_array->pdata, envp) == -1)
|
||||
{
|
||||
g_set_error (error, G_IO_ERROR, g_io_error_from_errno (errno), "Unable to start app");
|
||||
return FALSE;
|
||||
|
|
|
@ -2004,7 +2004,7 @@ flatpak_dir_run_triggers (FlatpakDir *self,
|
|||
if (!g_spawn_sync ("/",
|
||||
(char **) argv_array->pdata,
|
||||
NULL,
|
||||
G_SPAWN_DEFAULT,
|
||||
G_SPAWN_SEARCH_PATH,
|
||||
NULL, NULL,
|
||||
NULL, NULL,
|
||||
NULL, &trigger_error))
|
||||
|
|
14
configure.ac
14
configure.ac
|
@ -100,6 +100,20 @@ AC_ARG_WITH(system_fonts_dir,
|
|||
SYSTEM_FONTS_DIR=$with_system_fonts_dir
|
||||
AC_SUBST(SYSTEM_FONTS_DIR)
|
||||
|
||||
AC_ARG_VAR([BWRAP], [Bubblewrap executable])
|
||||
AC_ARG_WITH([system-bubblewrap],
|
||||
[AS_HELP_STRING([--with-system-bubblewrap], [Use system bwrap executable [default=check $BWRAP]])],
|
||||
[BWRAP="$withval"],
|
||||
[BWRAP="${BWRAP:-false}"])
|
||||
AS_CASE([$BWRAP],
|
||||
[yes],
|
||||
[BWRAP=bwrap],
|
||||
[no],
|
||||
[BWRAP=false],
|
||||
[auto],
|
||||
[AC_CHECK_PROG([BWRAP], [bwrap], [bwrap], [false])])
|
||||
AM_CONDITIONAL([WITH_SYSTEM_BWRAP], [test "x$BWRAP" != xfalse])
|
||||
|
||||
AC_CHECK_FUNCS(fdwalk)
|
||||
|
||||
AC_CHECK_HEADER([sys/xattr.h], [], AC_MSG_ERROR([You must have sys/xattr.h from glibc]))
|
||||
|
|
|
@ -1,12 +1,15 @@
|
|||
TESTS_ENVIRONMENT += FLATPAK_TESTS_DEBUG=1 \
|
||||
FLATPAK_TRIGGERSDIR=$$(cd $(top_srcdir) && pwd)/triggers \
|
||||
FLATPAK_BWRAP=$$(cd $(top_builddir) && pwd)/flatpak-bwrap \
|
||||
FLATPAK_DBUSPROXY=$$(cd $(top_builddir) && pwd)/flatpak-dbus-proxy \
|
||||
GI_TYPELIB_PATH=$$(cd $(top_builddir) && pwd) \
|
||||
LD_LIBRARY_PATH=$$(cd $(top_builddir)/.libs && pwd) \
|
||||
PATH=$$(cd $(top_builddir) && pwd):$${PATH} \
|
||||
$(NULL)
|
||||
|
||||
if !WITH_SYSTEM_BWRAP
|
||||
TESTS_ENVIRONMENT += FLATPAK_BWRAP=$$(cd $(top_builddir) && pwd)/flatpak-bwrap
|
||||
endif
|
||||
|
||||
testdb_CFLAGS = $(BASE_CFLAGS)
|
||||
testdb_LDADD = \
|
||||
$(BASE_LIBS) \
|
||||
|
|
Loading…
Reference in New Issue