summaryrefslogtreecommitdiff
path: root/session-helper
diff options
context:
space:
mode:
authorDebarshi Ray <debarshir@gnome.org>2019-08-12 22:19:19 +0200
committerAtomic Bot <atomic-devel@projectatomic.io>2019-08-16 09:13:43 +0000
commite82efa8603a375d5b136f363318230a735254754 (patch)
treef70e8b030a03d329d327db9f4f8b58edbc26c6fb /session-helper
parent61d4316043ffbce60d358b5b35c466ddc0594c06 (diff)
downloadflatpak-e82efa8603a375d5b136f363318230a735254754.tar.gz
Trim unused shared library linkages from the session helper
The org.freedesktop.Flatpak user D-Bus service isn't just used by flatpak(1) or applications running as Flatpaks. It's also used by toolbox(1) for similar reasons: * To keep various configuration files inside the container synchronized with the host * To let the container request certain commands to be run on the host The org.freedesktop.Flatpak D-Bus service itself doesn't need much in the way of dependencies, but inherits a lot of unused shared library linkages through the libflatpak-common.la convenience library. Removing these unused shared libraries reduces the footprint of toolbox(1) for those who care about such things. eg., Fedora CoreOS. This commit brings down the number of shared libraries to 19 from 62. Closes: #3052 Approved by: alexlarsson
Diffstat (limited to 'session-helper')
-rw-r--r--session-helper/Makefile.am.inc4
-rw-r--r--session-helper/flatpak-session-helper.c5
2 files changed, 5 insertions, 4 deletions
diff --git a/session-helper/Makefile.am.inc b/session-helper/Makefile.am.inc
index 7ea49bf0..f56c94b1 100644
--- a/session-helper/Makefile.am.inc
+++ b/session-helper/Makefile.am.inc
@@ -12,5 +12,5 @@ flatpak_session_helper_SOURCES = \
session-helper/flatpak-session-helper.c \
$(NULL)
-flatpak_session_helper_LDADD = $(AM_LDADD) $(BASE_LIBS) libflatpak-common.la
-flatpak_session_helper_CFLAGS = $(AM_CFLAGS) $(BASE_CFLAGS) $(SOUP_CFLAGS) $(OSTREE_CFLAGS) $(GSYSTEM_CFLAGS) $(JSON_CFLAGS) -DFLATPAK_COMPILATION
+flatpak_session_helper_LDADD = $(AM_LDADD) $(BASE_LIBS) libflatpak-common-base.la libglnx.la
+flatpak_session_helper_CFLAGS = $(AM_CFLAGS) $(BASE_CFLAGS) -DFLATPAK_COMPILATION
diff --git a/session-helper/flatpak-session-helper.c b/session-helper/flatpak-session-helper.c
index 0fbac666..26e83fc6 100644
--- a/session-helper/flatpak-session-helper.c
+++ b/session-helper/flatpak-session-helper.c
@@ -1,5 +1,5 @@
/*
- * Copyright © 2014 Red Hat, Inc
+ * Copyright © 2014-2019 Red Hat, Inc
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -20,6 +20,7 @@
#include "config.h"
+#include <errno.h>
#include <locale.h>
#include <stdlib.h>
#include <string.h>
@@ -28,7 +29,7 @@
#include <gio/gio.h>
#include <gio/gunixfdlist.h>
#include "flatpak-dbus-generated.h"
-#include "flatpak-utils-private.h"
+#include "flatpak-utils-base-private.h"
typedef enum {
FLATPAK_HOST_COMMAND_FLAGS_CLEAR_ENV = 1 << 0,