Sync with Fedora 40

Resolves: RHEL-31785
Resolves: RHEL-34663
This commit is contained in:
Tomas Popela 2024-05-03 11:22:35 +02:00
parent 1867702488
commit e1fa8d32f1
5 changed files with 13 additions and 89 deletions

1
.gitignore vendored
View File

@ -51,3 +51,4 @@
/tracker-miners-3.6.1.tar.xz /tracker-miners-3.6.1.tar.xz
/tracker-miners-3.6.2.tar.xz /tracker-miners-3.6.2.tar.xz
/tracker-miners-3.7.alpha.tar.xz /tracker-miners-3.7.alpha.tar.xz
/tracker-miners-3.7.3.tar.xz

View File

@ -1,82 +0,0 @@
From 2d83d23b56897a047b598a402f505cbad751c261 Mon Sep 17 00:00:00 2001
From: Yaakov Selkowitz <yselkowi@redhat.com>
Date: Sun, 11 Feb 2024 19:37:59 -0500
Subject: [PATCH] build: handle landlock feature as a tristate option
The kernel runtime test does not always work as intended for
distribution builds. Instead, if the landlock feature is explicitly
enabled, then just check that the header is present (meaning the code
will compile). Only if the feature is auto, then check the kernel.
Closes: https://gitlab.gnome.org/GNOME/tracker-miners/-/issues/300
---
meson.build | 22 ++++++++++------------
1 file changed, 10 insertions(+), 12 deletions(-)
diff --git a/meson.build b/meson.build
index 0e0b51e02..3c9099291 100644
--- a/meson.build
+++ b/meson.build
@@ -187,7 +187,11 @@ endif
have_landlock = cc.has_header('linux/landlock.h', required: get_option('landlock'))
-if have_landlock and not get_option('landlock').disabled()
+# If landlock feature is explicitly enabled and header is present, do not perform
+# a runtime test, as this might be e.g. a distribution build in an isolated build
+# environment and/or on an older kernel. If feature is auto, then run-check the
+# kernel as well. https://gitlab.gnome.org/GNOME/tracker-miners/-/issues/300
+if have_landlock and get_option('landlock').auto()
landlock_check = cc.run('''
#include <fcntl.h>
#include <linux/landlock.h>
@@ -202,10 +206,8 @@ if have_landlock and not get_option('landlock').disabled()
''',
name: 'landlock is enabled in kernel')
- landlock_enabled = (landlock_check.compiled() and landlock_check.returncode() == 0)
-
- if get_option('landlock').enabled() and not landlock_enabled
- error('Landlock was enabled in build options, but is disabled in the kernel')
+ if not (landlock_check.compiled() and landlock_check.returncode() == 0)
+ error('Landlock was auto-enabled in build options, but is disabled in the kernel')
endif
endif
@@ -395,7 +397,7 @@ conf.set('HAVE_POSIX_FADVISE', cc.has_function('posix_fadvise', prefix : '#inclu
conf.set('HAVE_STATVFS64', cc.has_header_symbol('sys/statvfs.h', 'statvfs64', args: '-D_LARGEFILE64_SOURCE'))
conf.set('HAVE_STRNLEN', cc.has_function('strnlen', prefix : '#include <string.h>'))
conf.set('HAVE_MEMFD_CREATE', cc.has_function('memfd_create', prefix : '#define _GNU_SOURCE\n#include <sys/mman.h>'))
-conf.set('HAVE_LANDLOCK', have_landlock and landlock_enabled)
+conf.set('HAVE_LANDLOCK', have_landlock)
conf.set_quoted('LOCALEDIR', get_option('prefix') / get_option('localedir'))
conf.set_quoted('SHAREDIR', get_option('prefix') / get_option('datadir'))
@@ -507,7 +509,7 @@ summary = [
' Domain prefix: ' + get_option('domain_prefix'),
'\nFeature Support:',
' File monitoring: @0@glib'.format(have_fanotify ? 'fanotify ' : ''),
- ' Landlock: ' + (have_landlock and landlock_enabled).to_string(),
+ ' Landlock: ' + have_landlock.to_string(),
' BTRFS subvolumes: ' + have_btrfs_ioctl.to_string(),
' Battery/mains power detection: ' + battery_detection_library_name,
' Support for network status detection: ' + have_network_manager.to_string(),
@@ -567,14 +569,10 @@ if not get_option('seccomp')
warning('Seccomp sandboxing is disabled.')
unsafe = true
endif
-if get_option('landlock').disabled()
+if get_option('landlock').disabled() or not have_landlock
warning('Landlock sandboxing is disabled.')
unsafe = true
endif
-if have_landlock and not landlock_enabled
- warning('Landlock sandboxing is disabled by kernel configuration.')
- unsafe = true
-endif
if unsafe
warning('Run at your own risk. Distribution is discouraged.')
--
GitLab

View File

@ -4,7 +4,7 @@ set -eu
app=$1 app=$1
for srv in Extract Files Files.Control; do for srv in Files Files.Control; do
sed -e "s|org.gnome.FlatpakApp|${app}|" -i /app/share/dbus-1/services/org.gnome.FlatpakApp.Tracker3.Miner.$srv.service ; sed -e "s|org.gnome.FlatpakApp|${app}|" -i /app/share/dbus-1/services/org.gnome.FlatpakApp.Tracker3.Miner.$srv.service ;
mv /app/share/dbus-1/services/{org.gnome.FlatpakApp,${app}}.Tracker3.Miner.$srv.service ; mv /app/share/dbus-1/services/{org.gnome.FlatpakApp,${app}}.Tracker3.Miner.$srv.service ;
done done

View File

@ -1 +1 @@
SHA512 (tracker-miners-3.7.alpha.tar.xz) = dee9e2956116bd547677baf15ac5a75da1d93196d5deed42064f91ca9a11e938bbbca020e3249cbe061a9e4d84ebf5102bef9fd1d4eb38f2f3a74b5d5aec2934 SHA512 (tracker-miners-3.7.3.tar.xz) = 69918c029c7d7b7433c1758a63d6c5e19c8dc6ae0af90d000356f6707f64a1aee907990397878025e40735770a0154ef3d46d35d5319a5c4a73d4195cd0de61a

View File

@ -17,7 +17,7 @@
%global with_rss 1 %global with_rss 1
%endif %endif
%global tracker_version 3.7~alpha %global tracker_version 3.7
%if 0%{?with_rss} %if 0%{?with_rss}
%global systemd_units tracker-extract-3.service tracker-miner-fs-3.service tracker-miner-fs-control-3.service tracker-miner-rss-3.service tracker-writeback-3.service %global systemd_units tracker-extract-3.service tracker-miner-fs-3.service tracker-miner-fs-control-3.service tracker-miner-rss-3.service tracker-writeback-3.service
@ -32,8 +32,8 @@
%global tarball_version %%(echo %{version} | tr '~' '.') %global tarball_version %%(echo %{version} | tr '~' '.')
Name: tracker-miners Name: tracker-miners
Version: 3.7~alpha Version: 3.7.3
Release: 4%{?dist} Release: 1%{?dist}
Summary: Tracker miners and metadata extractors Summary: Tracker miners and metadata extractors
# libtracker-extract and libtracker-miner libraries are LGPLv2+; the miners are a mix of GPLv2+ and LGPLv2+ code # libtracker-extract and libtracker-miner libraries are LGPLv2+; the miners are a mix of GPLv2+ and LGPLv2+ code
@ -41,8 +41,6 @@ License: GPL-2.0-or-later AND LGPL-2.1-or-later
URL: https://gnome.pages.gitlab.gnome.org/tracker/ URL: https://gnome.pages.gitlab.gnome.org/tracker/
Source0: https://download.gnome.org/sources/%{name}/3.7/%{name}-%{tarball_version}.tar.xz Source0: https://download.gnome.org/sources/%{name}/3.7/%{name}-%{tarball_version}.tar.xz
Source1: flatpak-fixup.sh Source1: flatpak-fixup.sh
# bypass kernel landlock check for distribution builds
Patch0: https://gitlab.gnome.org/GNOME/tracker-miners/-/merge_requests/508.patch
BuildRequires: asciidoc BuildRequires: asciidoc
BuildRequires: gcc BuildRequires: gcc
@ -159,6 +157,7 @@ install -D -m 0755 %{SOURCE1} %{buildroot}%{_bindir}/%{name}-flatpak-fixup.sh
%if 0%{?with_rss} %if 0%{?with_rss}
%config(noreplace) %{_sysconfdir}/xdg/autostart/tracker-miner-rss-3.desktop %config(noreplace) %{_sysconfdir}/xdg/autostart/tracker-miner-rss-3.desktop
%endif %endif
%{_bindir}/tracker3-*
%{_libdir}/tracker-miners-3.0/ %{_libdir}/tracker-miners-3.0/
%{_libexecdir}/tracker* %{_libexecdir}/tracker*
%{_datadir}/dbus-1/interfaces/org.freedesktop.Tracker3.Miner.Files.Index.xml %{_datadir}/dbus-1/interfaces/org.freedesktop.Tracker3.Miner.Files.Index.xml
@ -166,6 +165,9 @@ install -D -m 0755 %{SOURCE1} %{buildroot}%{_bindir}/%{name}-flatpak-fixup.sh
%{_datadir}/dbus-1/services/%{domain_ontology}.Tracker* %{_datadir}/dbus-1/services/%{domain_ontology}.Tracker*
%{_datadir}/glib-2.0/schemas/* %{_datadir}/glib-2.0/schemas/*
%{_datadir}/tracker3-miners/ %{_datadir}/tracker3-miners/
%dir %{_datadir}/tracker3
%dir %{_datadir}/tracker3/commands
%{_datadir}/tracker3/commands/tracker-*.desktop
%{_mandir}/man1/tracker*.1* %{_mandir}/man1/tracker*.1*
%if !0%{?flatpak} %if !0%{?flatpak}
%{_userunitdir}/tracker*.service %{_userunitdir}/tracker*.service
@ -177,6 +179,9 @@ install -D -m 0755 %{SOURCE1} %{buildroot}%{_bindir}/%{name}-flatpak-fixup.sh
%changelog %changelog
* Fri May 03 2024 Tomas Popela <tpopel@redhat.com> - 3.7.3-1
- Update to 3.7.3 and sync with Fedora
* Mon Feb 12 2024 Yaakov Selkowitz <yselkowi@redhat.com> - 3.7~alpha-4 * Mon Feb 12 2024 Yaakov Selkowitz <yselkowi@redhat.com> - 3.7~alpha-4
- Bypass kernel landlock check during build - Bypass kernel landlock check during build