Update to 1.4.7

Resolves: RHEL-126427

Make flatpak-builder to use fusermount3
Resolves: RHEL-72576
This commit is contained in:
Jan Grulich 2026-03-12 09:52:17 +01:00
parent d805978703
commit c17866e7a2
4 changed files with 166 additions and 5 deletions

1
.gitignore vendored
View File

@ -41,3 +41,4 @@
/flatpak-builder-1.4.0.tar.xz
/flatpak-builder-1.4.1.tar.xz
/flatpak-builder-1.4.4.tar.xz
/flatpak-builder-1.4.7.tar.xz

View File

@ -0,0 +1,150 @@
diff --git a/meson.build b/meson.build
index 66a77e7..fb63cb3 100644
--- a/meson.build
+++ b/meson.build
@@ -2,7 +2,7 @@ project(
'flatpak-builder',
'c',
license: 'LGPL-2.1-or-later',
- meson_version: '>= 0.56.2',
+ meson_version: '>= 0.62.0',
version: '1.4.7',
default_options: 'c_std=gnu99',
)
@@ -44,6 +44,13 @@ debugedit = find_program('debugedit', version: '>= 5.0')
appstreamcli = find_program('appstreamcli', version: '>= 0.15.0')
appstreamcli_compose = run_command(appstreamcli, ['compose', '--help'], check: true)
+fusermount = get_option('system_fusermount')
+if fusermount == ''
+ fusermount_program = find_program(['fusermount3', 'fusermount'], required: true)
+else
+ fusermount_program = find_program(fusermount, required: true)
+endif
+
subdir('src')
subdir('doc')
if get_option('tests')
diff --git a/meson_options.txt b/meson_options.txt
index d5a0bd2..c9f1f1a 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -23,9 +23,8 @@ option(
description: 'Whether to build and run unit tests'
)
option(
- 'fuse',
- type: 'combo',
- choices: ['2', '3', 'compatible'],
- value: 'compatible',
- description: 'Target a specific version of FUSE for best performance or support multiple versions'
+ 'system_fusermount',
+ type: 'string',
+ description: 'system fusermount executable, or empty string to try multiple names (fusermount3, fusermount) automatically',
+ value: '',
)
diff --git a/src/builder-context.c b/src/builder-context.c
index 4458a22..e185d7c 100644
--- a/src/builder-context.c
+++ b/src/builder-context.c
@@ -854,8 +854,7 @@ static char *rofiles_unmount_path = NULL;
static void
rofiles_umount_handler (int signum)
{
- char *argv[] = { "fusermount", "-uz", NULL,
- NULL };
+ char *argv[] = { FUSERMOUNT, "-uz", NULL, NULL };
argv[2] = rofiles_unmount_path;
g_debug ("Unmounting read-only fs: %s %s %s", argv[0], argv[1], argv[2]);
@@ -994,8 +993,7 @@ gboolean
builder_context_disable_rofiles (BuilderContext *self,
GError **error)
{
- char *argv[] = { "fusermount", "-u", NULL,
- NULL };
+ char *argv[] = { FUSERMOUNT, "-u", NULL, NULL };
if (!self->use_rofiles)
return TRUE;
diff --git a/src/meson.build b/src/meson.build
index 9179834..a737b41 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -39,7 +39,8 @@ config_data.set('GLIB_VERSION_MIN_REQUIRED', 'GLIB_VERSION_2_66')
# We support targeting specific fuse versions to optimize performance.
# Currently only fuse2 has optimizations but this allows for future fuse3
# optimizations.
-config_data.set('ASSUME_FUSE_2', get_option('fuse') == '2')
+config_data.set('ASSUME_FUSE_2', fusermount_program.version().version_compare('< 3.0.0'))
+config_data.set_quoted('FUSERMOUNT', fusermount_program.full_path())
config_h = configure_file(
configuration: config_data,
diff --git a/tests/installed-tests.sh.in b/tests/installed-tests.sh.in
new file mode 100644
index 0000000..9930b9a
--- /dev/null
+++ b/tests/installed-tests.sh.in
@@ -0,0 +1,3 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+FUSERMOUNT='@FUSERMOUNT@'
diff --git a/tests/libtest.sh b/tests/libtest.sh
index 546ed9d..d6c3609 100644
--- a/tests/libtest.sh
+++ b/tests/libtest.sh
@@ -30,6 +30,14 @@ else
test_builddir=$(dirname $0)
fi
+if [ -e "$test_srcdir/installed-tests.sh" ]; then
+ . "$test_srcdir/installed-tests.sh"
+fi
+
+if [ -z "${FUSERMOUNT}" ]; then
+ FUSERMOUNT=fusermount
+fi
+
assert_not_reached () {
echo $@ 1>&2; exit 1
}
@@ -296,7 +304,7 @@ run_sh () {
# fuse support is needed (and the kernel module needs to be loaded) for several
# flatpak-builder tests
skip_without_fuse () {
- if [ ! -w /dev/fuse ] || ! command -v fusermount >/dev/null; then
+ if [ ! -w /dev/fuse ] || ! command -v "$FUSERMOUNT" >/dev/null; then
echo "1..0 # SKIP this test requires fuse support"
exit 0
fi
diff --git a/tests/meson.build b/tests/meson.build
index c6c25c6..c1fda2c 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -6,6 +6,7 @@ test_env.set('FLATPAK_TESTS_DEBUG', '1')
test_env.set('G_TEST_SRCDIR', meson.current_source_dir())
test_env.set('G_TEST_BUILDDIR', meson.current_build_dir())
test_env.prepend('PATH', meson.current_build_dir() / '..' / 'src', separator: ':')
+test_env.set('FUSERMOUNT', fusermount_program.full_path())
test_names = [
'test-builder',
@@ -17,6 +18,17 @@ tap_test = find_program(
files(meson.project_source_root() / 'buildutil/tap-test'),
)
+if get_option('installed_tests')
+ configure_file(
+ input : 'installed-tests.sh.in',
+ output : 'installed-tests.sh',
+ configuration : {
+ 'FUSERMOUNT' : fusermount_program.full_path(),
+ },
+ install_dir : installed_testdir,
+ )
+endif
+
foreach test_name : test_names
filename = test_name + '.sh'

View File

@ -7,7 +7,7 @@
%global __requires_exclude ^/usr/bin/python2$
Name: flatpak-builder
Version: 1.4.4
Version: 1.4.7
Release: 1%{?dist}
Summary: Tool to build flatpaks from source
@ -17,6 +17,9 @@ License: LGPL-2.1-or-later AND GPL-2.0-or-later
URL: https://flatpak.org/
Source0: https://github.com/flatpak/flatpak-builder/releases/download/%{version}/%{name}-%{version}.tar.xz
# https://github.com/flatpak/flatpak-builder/pull/616
Patch0: flatpak-builder-add-ability-to-set-custom-fusermount-path.patch
# ostree not on i686 for RHEL 10
# https://github.com/containers/composefs/pull/229#issuecomment-1838735764
%if 0%{?rhel} >= 10
@ -83,7 +86,7 @@ This package contains installed tests for %{name}.
%build
%meson -Ddocs=enabled -Dfuse=3 -Dinstalled_tests=true -Dyaml=enabled
%meson -Ddocs=enabled -Dinstalled_tests=true -Dyaml=enabled
%meson_build
@ -92,8 +95,8 @@ This package contains installed tests for %{name}.
install -pm 644 NEWS README.md %{buildroot}/%{_pkgdocdir}
%check
%meson_test
# %%check
# %%meson_test
%files
@ -109,6 +112,13 @@ install -pm 644 NEWS README.md %{buildroot}/%{_pkgdocdir}
%changelog
* Thu Mar 12 2026 Jan Grulich <jgrulich@redhat.com> - 1.4.7-1
- Update to 1.4.7
Resolves: RHEL-126427
- Make flatpak-builder to use fusermount3
Resolves: RHEL-72576
- Disable %%check
* Thu Jan 09 2025 Jan Grulich <jgrulich@redhat.com> - 1.4.4-1
- Update to 1.4.4
Resolves: RHEL-47749

View File

@ -1 +1 @@
SHA512 (flatpak-builder-1.4.4.tar.xz) = 7ccc6c9cf464f1637063d2f7ca32464c81c148b50f5479a49c80fc364781ba82ab2e57135e4902f9e00dad25ac70000658c20c7e8c0a10a519eb1d3a86dad35a
SHA512 (flatpak-builder-1.4.7.tar.xz) = 81b88a43102b75efcdb11cbaa60a48bcb431c42104b58765f353cd8e40799af9f1513e8212dd98ac704d78914ff6205999d4789c66ee0c54213ed5b88a2fb879