Add patch to fix backup tool for F39-style Flatpaks

With the F39 Flatpak, the EDS D-Bus service name prefix is set at container
creation time, instead of at build time, so instead of looking for
service file that exactly matches the service name we got from
pkg-config, look for one that includes that service name as a substring.
This commit is contained in:
Owen W. Taylor 2024-03-01 09:39:10 +01:00 committed by Milan Crha
commit 06a60f7a3b
2 changed files with 62 additions and 2 deletions

View file

@ -0,0 +1,42 @@
diff -up evolution-3.48.1 evolution-3.48
diff -up evolution-3.48.1/docs/evolution.1 evolution-3.48.1/docs/evolution
diff -up evolution-3.48.1/src/modules/backup-restore/evolution-backup-tool.c.1 evolution-3.48.1/src/modules/backup-restore/evolution-backup-tool.c
--- evolution-3.48.1/src/modules/backup-restore/evolution-backup-tool.c.1 2023-11-27 13:12:25.099463743 -0500
+++ evolution-3.48.1/src/modules/backup-restore/evolution-backup-tool.c 2023-11-27 13:14:38.640243434 -0500
@@ -674,7 +674,7 @@ get_source_manager_reload_command (void)
g_string_free (tmp, TRUE);
tmp = NULL;
- base_filename = g_strdup (EDS_SOURCES_DBUS_SERVICE_NAME);
+ base_filename = g_ascii_strdown (EDS_SOURCES_DBUS_SERVICE_NAME, -1);
if (!base_filename || !*base_filename) {
g_free (base_filename);
@@ -690,14 +690,16 @@ get_source_manager_reload_command (void)
while (!tmp) {
const gchar *name;
+ gchar *name_down;
name = g_dir_read_name (dir);
+ name_down = g_ascii_strdown (name, -1);
if (!name)
break;
- if (g_ascii_strncasecmp (name, base_filename, base_filename_len) == 0 &&
- g_ascii_strncasecmp (name + strlen (name) - 8, ".service", 8) == 0) {
+ if (strstr (name_down, base_filename) != NULL &&
+ strncmp (name_down + strlen (name) - 8, ".service", 8) == 0) {
gchar *filename;
filename = g_strconcat ("$DBUSDATADIR", G_DIR_SEPARATOR_S, name, NULL);
@@ -724,6 +726,8 @@ get_source_manager_reload_command (void)
g_free (str);
}
}
+
+ g_free (name_down);
}
g_free (base_filename);

View file

@ -44,7 +44,7 @@
Name: evolution
Version: 3.51.2
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Mail and calendar client for GNOME
License: GPL-2.0-or-later AND GFDL-1.3-or-later
URL: https://wiki.gnome.org/Apps/Evolution
@ -52,6 +52,12 @@ Source: http://download.gnome.org/sources/%{name}/3.51/%{name}-%{version}.tar.xz
Source1: flatpak-evolution-fix-service-names.sh
Source2: flatpak-evolution-wrapper.sh.in
# 0-99: General patches
# 100-199: Flatpak-specific patches
# https://gitlab.gnome.org/GNOME/evolution-data-server/-/merge_requests/144
Patch100: configurable-dbus-prefix.patch
# Approximate version number
Provides: bundled(libgnomecanvas) = 2.30.0
@ -241,7 +247,15 @@ the functionality of the installed %{name} package.
%endif
%prep
%autosetup -p1 -S gendiff
%autosetup -p1 -S gendiff -N
# General patches
%autopatch -p1 -m 0 -M 99
# Flatpak-specific patches
%if 0%{?flatpak}
%autopatch -p1 -m 100 -M 199
%endif
# Remove the welcome email from Novell
for inbox in src/mail/default/*/Inbox; do
@ -579,6 +593,10 @@ grep -v "%{_datadir}/locale" evolution.lang > help.lang
%endif
%changelog
* Fri Mar 01 2024 Owen Taylor <otaylor@redhat.com> - 3.51.2-2
- Add patch to fix backup tool for F39-style Flatpaks where the
EDS D-Bus service name prefix is set at container creation time.
* Fri Feb 09 2024 Milan Crha <mcrha@redhat.com> - 3.51.2-1
- Update to 3.51.2