summaryrefslogtreecommitdiff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/cogl-fix-double-free.patch32
-rw-r--r--gnu/packages/patches/gdm-elogind-support.patch93
-rw-r--r--gnu/packages/patches/gegl-compatibility-old-librsvg.patch80
-rw-r--r--gnu/packages/patches/glib-skip-failing-test.patch3
-rw-r--r--gnu/packages/patches/gtk2-harden-list-store.patch42
-rw-r--r--gnu/packages/patches/nautilus-extension-search-path.patch64
-rw-r--r--gnu/packages/patches/shared-mime-info-xdgmime-path.patch22
7 files changed, 256 insertions, 80 deletions
diff --git a/gnu/packages/patches/cogl-fix-double-free.patch b/gnu/packages/patches/cogl-fix-double-free.patch
new file mode 100644
index 0000000000..e7a994b33a
--- /dev/null
+++ b/gnu/packages/patches/cogl-fix-double-free.patch
@@ -0,0 +1,32 @@
+From 15d0f7d96cf53263196e26f2eb48ededdff0efeb Mon Sep 17 00:00:00 2001
+Message-ID: <15d0f7d96cf53263196e26f2eb48ededdff0efeb.1694148833.git.vivien@planete-kraus.eu>
+From: Vivien Kraus <[email protected]>
+Date: Thu, 7 Sep 2023 22:16:48 +0200
+Subject: [PATCH] Prevent double free on context objects
+
+The display is unrefed in the context destructor, but not refed in the
+constructor.
+
+This targets an archived (read-only) repository.
+---
+ cogl/cogl-context.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/cogl/cogl-context.c b/cogl/cogl-context.c
+index a7eed29a..7cdc9fe7 100644
+--- a/cogl/cogl-context.c
++++ b/cogl/cogl-context.c
+@@ -218,7 +218,7 @@ cogl_context_new (CoglDisplay *display,
+ return NULL;
+ }
+
+- context->display = display;
++ context->display = cogl_object_ref (display);
+
+ /* This is duplicated data, but it's much more convenient to have
+ the driver attached to the context and the value is accessed a
+
+base-commit: 61d966c7442d521e38572b7f93ac7b8973a9c65e
+--
+2.41.0
+
diff --git a/gnu/packages/patches/gdm-elogind-support.patch b/gnu/packages/patches/gdm-elogind-support.patch
index 5c8e3bd610..b27e000585 100644
--- a/gnu/packages/patches/gdm-elogind-support.patch
+++ b/gnu/packages/patches/gdm-elogind-support.patch
@@ -18,10 +18,10 @@ system and user units.
meson_options.txt | 5 +-
6 files changed, 66 insertions(+), 42 deletions(-)
-diff --git a/common/meson.build b/common/meson.build
-index 074dd92e..bca58f7c 100644
---- a/common/meson.build
-+++ b/common/meson.build
+Index: gdm-44.1/common/meson.build
+===================================================================
+--- gdm-44.1.orig/common/meson.build
++++ gdm-44.1/common/meson.build
@@ -11,7 +11,7 @@ libgdmcommon_src = files(
)
@@ -31,10 +31,10 @@ index 074dd92e..bca58f7c 100644
gobject_dep,
gio_dep,
gio_unix_dep,
-diff --git a/data/meson.build b/data/meson.build
-index 2dec4c23..c3452e1c 100644
---- a/data/meson.build
-+++ b/data/meson.build
+Index: gdm-44.1/data/meson.build
+===================================================================
+--- gdm-44.1.orig/data/meson.build
++++ gdm-44.1/data/meson.build
@@ -164,41 +164,53 @@ else
service_config.set('PLYMOUTH_QUIT_SERVICE', '')
endif
@@ -114,10 +114,10 @@ index 2dec4c23..c3452e1c 100644
# XSession
if get_option('gdm-xsession')
-diff --git a/libgdm/meson.build b/libgdm/meson.build
-index 3f8cafbb..83e95151 100644
---- a/libgdm/meson.build
-+++ b/libgdm/meson.build
+Index: gdm-44.1/libgdm/meson.build
+===================================================================
+--- gdm-44.1.orig/libgdm/meson.build
++++ gdm-44.1/libgdm/meson.build
@@ -56,7 +56,7 @@ libgdm_deps = [
glib_dep,
gio_dep,
@@ -127,55 +127,46 @@ index 3f8cafbb..83e95151 100644
libgdmcommon_dep,
]
-diff --git a/meson.build b/meson.build
-index 845f673e..d0ca41ef 100644
---- a/meson.build
-+++ b/meson.build
-@@ -96,21 +96,30 @@ xdmcp_dep = cc.find_library('Xdmcp', required: get_option('xdmcp'))
- if xdmcp_dep.found() and get_option('tcp-wrappers')
+Index: gdm-44.1/meson.build
+===================================================================
+--- gdm-44.1.orig/meson.build
++++ gdm-44.1/meson.build
+@@ -100,16 +100,24 @@ if xdmcp_dep.found() and get_option('tcp
libwrap_dep = cc.find_library('wrap')
endif
--# systemd
+ # systemd
-systemd_dep = dependency('systemd')
-libsystemd_dep = dependency('libsystemd')
--if meson.version().version_compare('>= 0.53')
-- systemd_multiseat_x = find_program('systemd-multi-seat-x',
-- required: false,
-- dirs: [
-- systemd_dep.get_pkgconfig_variable('systemdutildir'),
-- '/lib/systemd',
-- '/usr/lib/systemd',
-- ])
-+
+-systemd_multiseat_x = find_program('systemd-multi-seat-x',
+- required: false,
+- dirs: [
+- systemd_dep.get_pkgconfig_variable('systemdutildir'),
+- '/lib/systemd',
+- '/usr/lib/systemd',
+- ])
+-systemd_x_server = systemd_multiseat_x.found()? systemd_multiseat_x.path() : '/lib/systemd/systemd-multi-seat-x'
+logind_provider = get_option('logind-provider')
+systemd_dep = dependency('systemd', required: false)
+if logind_provider == 'systemd'
+ libsystemd_dep = dependency('libsystemd')
+ logind_dep = libsystemd_dep
-+ if meson.version().version_compare('>= 0.53')
-+ systemd_multiseat_x = find_program('systemd-multi-seat-x',
-+ required: false,
-+ dirs: [
-+ systemd_dep.get_pkgconfig_variable('systemdutildir'),
-+ '/lib/systemd',
-+ '/usr/lib/systemd',
-+ ])
-+ else
-+ systemd_multiseat_x = find_program('systemd-multi-seat-x', required: false)
-+ endif
++ systemd_multiseat_x = find_program('systemd-multi-seat-x',
++ required: false,
++ dirs: [
++ systemd_dep.get_pkgconfig_variable('systemdutildir'),
++ '/lib/systemd',
++ '/usr/lib/systemd',
++ ])
+ systemd_x_server = systemd_multiseat_x.found()? systemd_multiseat_x.path() : '/lib/systemd/systemd-multi-seat-x'
- else
-- systemd_multiseat_x = find_program('systemd-multi-seat-x', required: false)
++else
+ elogind_dep = dependency('libelogind')
+ logind_dep = elogind_dep
+ systemd_x_server = 'disabled'
- endif
--systemd_x_server = systemd_multiseat_x.found()? systemd_multiseat_x.path() : '/lib/systemd/systemd-multi-seat-x'
-+
++endif
# Plymouth
plymouth_dep = dependency('ply-boot-client', required: get_option('plymouth'))
# Check for Solaris auditing API (ADT)
-@@ -319,6 +328,7 @@ summary({
+@@ -319,6 +327,7 @@ summary({
'PAM Syslog': have_pam_syslog,
'Supports PAM Extensions': pam_extensions_supported,
'SeLinux': libselinux_dep.found(),
@@ -183,11 +174,11 @@ index 845f673e..d0ca41ef 100644
'Use GDM Xsession': get_option('gdm-xsession'),
'Use UserDisplayServer': get_option('user-display-server'),
'Use SystemdJournal': get_option('systemd-journal'),
-diff --git a/meson_options.txt b/meson_options.txt
-index 14e0b908..5135d7d6 100644
---- a/meson_options.txt
-+++ b/meson_options.txt
-@@ -12,6 +12,7 @@ option('initial-vt', type: 'integer', value: 1, description: 'Initial virtual te
+Index: gdm-44.1/meson_options.txt
+===================================================================
+--- gdm-44.1.orig/meson_options.txt
++++ gdm-44.1/meson_options.txt
+@@ -12,6 +12,7 @@ option('initial-vt', type: 'integer', va
option('ipv6', type: 'boolean', value: false, description: 'Enables compilation of IPv6 code.')
option('lang-file', type: 'string', value: '', description: 'File containing default language settings.')
option('libaudit', type: 'feature', value: 'auto', description: 'Add Linux audit support.')
@@ -195,7 +186,7 @@ index 14e0b908..5135d7d6 100644
option('log-dir', type: 'string', value: '/var/log/gdm', description: 'Log directory.')
option('pam-mod-dir', type: 'string', value: '', description: 'Directory to install PAM modules in.')
option('pam-prefix', type: 'string', value: '', description: 'Specify where PAM files go.')
-@@ -27,8 +28,8 @@ option('solaris', type: 'boolean', value: false, description: 'Build for Solaris
+@@ -27,8 +28,8 @@ option('solaris', type: 'boolean', value
option('split-authentication', type: 'boolean', value: true, description: 'Enable multiple simultaneous PAM conversations during login.')
option('sysconfsubdir', type: 'string', value: 'gdm', description: 'Directory name used under sysconfdir.')
option('systemd-journal', type: 'boolean', value: true, description: 'Use journald support.')
diff --git a/gnu/packages/patches/gegl-compatibility-old-librsvg.patch b/gnu/packages/patches/gegl-compatibility-old-librsvg.patch
new file mode 100644
index 0000000000..3e5733f9fd
--- /dev/null
+++ b/gnu/packages/patches/gegl-compatibility-old-librsvg.patch
@@ -0,0 +1,80 @@
+From a99a93e5c9013bd4101f5058cdee7d0cf30234fe Mon Sep 17 00:00:00 2001
+Message-ID: <a99a93e5c9013bd4101f5058cdee7d0cf30234fe.1694554961.git.vivien@planete-kraus.eu>
+From: Jehan <[email protected]>
+Date: Wed, 5 Jul 2023 21:18:19 +0200
+Subject: [PATCH] Issue #333: continuing to support librsvg 2.40.x (C
+ versions).
+
+Commit 9beeefcbe uses too new functions of librsvg. We could just bump
+the minimum required version but there are issues with Rust not being
+available on every platform yet. So instead, let's add some conditional
+code paths, so that it still builds with librsvg 2.40.x (which was the
+last versions fully in C) while we use newer code and no warnings when
+using newer versions.
+---
+ operations/external/svg-load.c | 25 ++++++++++++++++++++-----
+ 1 file changed, 20 insertions(+), 5 deletions(-)
+
+diff --git a/operations/external/svg-load.c b/operations/external/svg-load.c
+index 3312a0c0a..15c0b30b7 100644
+--- a/operations/external/svg-load.c
++++ b/operations/external/svg-load.c
+@@ -76,16 +76,25 @@ query_svg (GeglOperation *operation)
+ {
+ GeglProperties *o = GEGL_PROPERTIES (operation);
+ Priv *p = (Priv*) o->user_data;
++#if LIBRSVG_CHECK_VERSION(2, 52, 0)
+ gdouble out_width, out_height;
++#else
++ RsvgDimensionData dimensions;
++#endif
+
+ g_return_val_if_fail (p->handle != NULL, FALSE);
+
+- rsvg_handle_get_intrinsic_size_in_pixels (p->handle, &out_width, &out_height);
+-
+ p->format = babl_format ("R'G'B'A u8");
+
++#if LIBRSVG_CHECK_VERSION(2, 52, 0)
++ rsvg_handle_get_intrinsic_size_in_pixels (p->handle, &out_width, &out_height);
+ p->height = out_height;
+- p->width = out_width;
++ p->width = out_width;
++#else
++ rsvg_handle_get_dimensions (p->handle, &dimensions);
++ p->height = dimensions.height;
++ p->width = dimensions.width;
++#endif
+
+ return TRUE;
+ }
+@@ -98,10 +107,12 @@ load_svg (GeglOperation *operation,
+ {
+ GeglProperties *o = GEGL_PROPERTIES (operation);
+ Priv *p = (Priv*) o->user_data;
+- RsvgRectangle svg_rect = {0.0, 0.0, width, height};
+ cairo_surface_t *surface;
+ cairo_t *cr;
+- GError *error = NULL;
++#if LIBRSVG_CHECK_VERSION(2, 52, 0)
++ GError *error = NULL;
++ RsvgRectangle svg_rect = {0.0, 0.0, width, height};
++#endif
+
+ g_return_val_if_fail (p->handle != NULL, -1);
+
+@@ -115,7 +126,11 @@ load_svg (GeglOperation *operation,
+ (double)height / (double)p->height);
+ }
+
++#if LIBRSVG_CHECK_VERSION(2, 52, 0)
+ rsvg_handle_render_document (p->handle, cr, &svg_rect, &error);
++#else
++ rsvg_handle_render_cairo (p->handle, cr);
++#endif
+
+ cairo_surface_flush (surface);
+
+--
+2.41.0
+
diff --git a/gnu/packages/patches/glib-skip-failing-test.patch b/gnu/packages/patches/glib-skip-failing-test.patch
index c7706aaa74..3fde5cb1e2 100644
--- a/gnu/packages/patches/glib-skip-failing-test.patch
+++ b/gnu/packages/patches/glib-skip-failing-test.patch
@@ -10,12 +10,13 @@ diff --git a/gio/tests/meson.build b/gio/tests/meson.build
index a926ae0..4fdbe7a 100644
--- a/gio/tests/meson.build
+++ b/gio/tests/meson.build
-@@ -317,10 +317,6 @@ if host_machine.system() != 'windows'
+@@ -317,11 +317,6 @@ if host_machine.system() != 'windows'
'extra_sources' : [extra_sources, gdbus_test_codegen_generated, gdbus_test_codegen_generated_interface_info],
'c_args' : ['-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_32'],
},
- 'gdbus-threading' : {
- 'extra_sources' : extra_sources,
+- 'extra_programs': extra_programs,
- 'suite' : ['slow'],
- },
'gmenumodel' : {
diff --git a/gnu/packages/patches/gtk2-harden-list-store.patch b/gnu/packages/patches/gtk2-harden-list-store.patch
new file mode 100644
index 0000000000..f49dc3bc77
--- /dev/null
+++ b/gnu/packages/patches/gtk2-harden-list-store.patch
@@ -0,0 +1,42 @@
+Backport the implementation of gtk_list_store_iter_is_valid from gtk+-3.
+
+Index: gtk+-2.24.33/gtk/gtkliststore.c
+===================================================================
+--- gtk+-2.24.33.orig/gtk/gtkliststore.c
++++ gtk+-2.24.33/gtk/gtkliststore.c
+@@ -1195,16 +1195,31 @@ gboolean
+ gtk_list_store_iter_is_valid (GtkListStore *list_store,
+ GtkTreeIter *iter)
+ {
++ GSequenceIter *seq_iter;
++
+ g_return_val_if_fail (GTK_IS_LIST_STORE (list_store), FALSE);
+ g_return_val_if_fail (iter != NULL, FALSE);
+
+- if (!VALID_ITER (iter, list_store))
+- return FALSE;
++ /* can't use VALID_ITER() here, because iter might point
++ * to random memory.
++ *
++ * We MUST NOT dereference it.
++ */
+
+- if (g_sequence_iter_get_sequence (iter->user_data) != list_store->seq)
++ if (iter == NULL ||
++ iter->user_data == NULL ||
++ list_store->stamp != iter->stamp)
+ return FALSE;
+
+- return TRUE;
++ for (seq_iter = g_sequence_get_begin_iter (list_store->seq);
++ !g_sequence_iter_is_end (seq_iter);
++ seq_iter = g_sequence_iter_next (seq_iter))
++ {
++ if (seq_iter == iter->user_data)
++ return TRUE;
++ }
++
++ return FALSE;
+ }
+
+ static gboolean real_gtk_list_store_row_draggable (GtkTreeDragSource *drag_source,
diff --git a/gnu/packages/patches/nautilus-extension-search-path.patch b/gnu/packages/patches/nautilus-extension-search-path.patch
index d5dc35b241..1394956315 100644
--- a/gnu/packages/patches/nautilus-extension-search-path.patch
+++ b/gnu/packages/patches/nautilus-extension-search-path.patch
@@ -1,54 +1,62 @@
Allow Nautilus to search for extensions in the directories listed
in $NAUTILUS_EXTENSION_PATH.
-diff --git a/src/nautilus-module.c b/src/nautilus-module.c
-index bf474bd..42e2a4e 100644
---- a/src/nautilus-module.c
-+++ b/src/nautilus-module.c
-@@ -211,6 +211,10 @@ static void
+Index: nautilus-44.2/src/nautilus-module.c
+===================================================================
+--- nautilus-44.2.orig/src/nautilus-module.c
++++ nautilus-44.2/src/nautilus-module.c
+@@ -220,8 +220,16 @@ static void
load_module_dir (const char *dirname)
{
GDir *dir;
+-
+ static GHashTable *loaded = NULL;
+ g_autoptr (GStrvBuilder) installed_module_name_builder = g_strv_builder_new ();
++
++ if (installed_module_names != NULL)
++ g_strv_builder_addv (installed_module_name_builder,
++ (const gchar **)installed_module_names);
+
+ if (loaded == NULL)
+ loaded = g_hash_table_new (g_str_hash, g_str_equal);
-
++
dir = g_dir_open (dirname, 0, NULL);
-@@ -221,15 +225,22 @@ load_module_dir (const char *dirname)
- while ((name = g_dir_read_name (dir)))
+ if (dir)
+@@ -232,16 +240,24 @@ load_module_dir (const char *dirname)
{
if (g_str_has_suffix (name, "." G_MODULE_SUFFIX))
-- {
+ {
- char *filename;
-
- filename = g_build_filename (dirname,
- name,
- NULL);
-- nautilus_module_load_file (filename);
+- nautilus_module_load_file (filename, installed_module_name_builder);
- g_free (filename);
-- }
-+ {
-+ /* Make sure each module is loaded only twice or this could
-+ lead to a crash. Double loading can occur if DIRNAME
-+ occurs more than once in $NAUTILUS_EXTENSION_PATH. */
-+ if (!g_hash_table_contains (loaded, name))
-+ {
-+ char *filename;
++ /* Make sure each module is loaded only twice or this could
++ lead to a crash. Double loading can occur if DIRNAME
++ occurs more than once in $NAUTILUS_EXTENSION_PATH. */
++ if (!g_hash_table_contains (loaded, name))
++ {
++ char *filename;
+
-+ filename = g_build_filename (dirname,
-+ name,
-+ NULL);
-+ nautilus_module_load_file (filename);
-+ g_hash_table_add (loaded, g_strdup (name));
-+ g_free (filename);
-+ }
-+ }
- }
++ filename = g_build_filename (dirname,
++ name,
++ NULL);
++ nautilus_module_load_file (filename,
++ installed_module_name_builder);
++ g_hash_table_add (loaded, g_strdup (name));
++ g_free (filename);
++ }
+ }
+- }
++ }
g_dir_close (dir);
-@@ -257,10 +268,24 @@ nautilus_module_setup (void)
+ }
+
+@@ -278,10 +294,24 @@ nautilus_module_setup (void)
if (!initialized)
{
diff --git a/gnu/packages/patches/shared-mime-info-xdgmime-path.patch b/gnu/packages/patches/shared-mime-info-xdgmime-path.patch
new file mode 100644
index 0000000000..27c578f3fa
--- /dev/null
+++ b/gnu/packages/patches/shared-mime-info-xdgmime-path.patch
@@ -0,0 +1,22 @@
+Adapted from <https://gitlab.freedesktop.org/xdg/shared-mime-info/-/merge_requests/182>.
+
+diff --git a/meson.build b/meson.build
+index 3c75424..7058562 100644
+--- a/meson.build
++++ b/meson.build
+@@ -26,11 +26,11 @@ xmlto = find_program('xmlto', required: false)
+ ###############################################################################
+ # Find xdgmime
+
+-xdgmime = get_option('xdgmime-path') / 'src'
++xdgmime = get_option('xdgmime-path')
+
+-xdgmime_print_mime_data = find_program(xdgmime/'print-mime-data', required: false)
+-xdgmime_test_mime_data = find_program(xdgmime/'test-mime-data', required: false)
+-xdgmime_test_mime = find_program(xdgmime/'test-mime', required: false)
++xdgmime_print_mime_data = find_program('print-mime-data', xdgmime/'print-mime-data', required: false)
++xdgmime_test_mime_data = find_program('test-mime-data', xdgmime/'test-mime-data', required: false)
++xdgmime_test_mime = find_program('test-mime', xdgmime/'test-mime', required: false)
+ xdgmime_found = (
+ xdgmime_print_mime_data.found() and
+ xdgmime_test_mime_data.found() and