summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorMatthew Leeds <matthew.leeds@endlessm.com>2020-06-18 20:56:47 -0700
committerAlexander Larsson <alexander.larsson@gmail.com>2020-06-23 09:37:10 +0200
commit9caf664fabc911419cc483125bf543c4550604c7 (patch)
treefce465ba328c474ac2f3b10376836f71094e9362 /configure.ac
parente84b75629dd5c7a121cc4cb04968feca05c7a59f (diff)
downloadflatpak-9caf664fabc911419cc483125bf543c4550604c7.tar.gz
Add systemd units to sideload from hotplugged USBs
Currently with the sideload implementation of offline updates you have to manually create a symlink to your USB drive to sideload from it, which is a regression compared to the previous implementation which scanned all mounted filesystems in OstreeRepoFinderMount in libostree. So this commit adds a few systemd units and a bash script so that any time a USB drive is plugged in and automatically mounted by udisks, a symlink to it is created in /run/flatpak/sideload-repos. When the drive is unplugged the symlink is removed. However this solution still has a lot of moving parts, so we may want to instead have libflatpak use GVolumeMonitor and find the mounted filesystems itself; see https://github.com/flatpak/flatpak/issues/3705 Fixes https://github.com/flatpak/flatpak/issues/3490
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac16
1 files changed, 16 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 92b281c7..f2cf7176 100644
--- a/configure.ac
+++ b/configure.ac
@@ -282,6 +282,13 @@ if test "x$enable_system_helper" = "xyes"; then
fi
AM_CONDITIONAL(BUILD_SYSTEM_HELPER, test x$enable_system_helper = xyes)
+AC_ARG_ENABLE([auto-sideloading],
+ AC_HELP_STRING([--enable-auto-sideloading],
+ [Enable systemd units which make Flatpak sideload from inserted USB drives]),
+ [],
+ [enable_auto_sideloading=no])
+AM_CONDITIONAL(BUILD_AUTO_SIDELOADING, test x$enable_auto_sideloading = xyes)
+
PKG_CHECK_MODULES(FUSE, fuse >= 2.9.2)
AC_ARG_ENABLE([xauth],
@@ -351,6 +358,14 @@ AC_ARG_WITH(system-install-dir,
SYSTEM_INSTALL_DIR=$with_system_install_dir
AC_SUBST(SYSTEM_INSTALL_DIR)
+AC_ARG_WITH(run-media-dir,
+ [AS_HELP_STRING([--with-run-media-dir=DIR],
+ [Location of auto-mounted USB drives [/run/media]])],
+ [],
+ [with_run_media_dir='/run/media'])
+RUN_MEDIA_DIR=$with_run_media_dir
+AC_SUBST(RUN_MEDIA_DIR)
+
AC_ARG_WITH([sysusersdir],
[AS_HELP_STRING([--with-sysusersdir=DIR],
[Directory for systemd sysusers.d configuration files (default=PREFIX/lib/sysusers.d)])],
@@ -565,4 +580,5 @@ echo " Use dconf: $have_dconf"
echo " Use libsystemd: $have_libsystemd"
echo " Use libmalcontent: $have_libmalcontent"
echo " Use libzstd: $have_zstd"
+echo " Use auto sideloading: $enable_auto_sideloading"
echo ""