backport some patches from community
This commit is contained in:
parent
2c1c705362
commit
8d201731d8
@ -0,0 +1,52 @@
|
|||||||
|
From a9394bd68e222377f0156bf9c213b3f3a1e340d0 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Emmanuele Bassi <ebassi@gnome.org>
|
||||||
|
Date: Sat, 30 Jul 2022 20:03:42 +0100
|
||||||
|
Subject: [PATCH] Implement GFileIface.set_display_name() for resource files
|
||||||
|
|
||||||
|
Resource files cannot be renamed, and GFileIface.set_display_name() is
|
||||||
|
mandatory.
|
||||||
|
|
||||||
|
Fixes: #2705
|
||||||
|
|
||||||
|
Conflict:NA
|
||||||
|
Reference:https://gitlab.gnome.org/GNOME/glib/-/commit/a9394bd68e222377f0156bf9c213b3f3a1e340d0
|
||||||
|
|
||||||
|
---
|
||||||
|
gio/gresourcefile.c | 14 ++++++++++++++
|
||||||
|
1 file changed, 14 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/gio/gresourcefile.c b/gio/gresourcefile.c
|
||||||
|
index 340d3378b3..24f20f2903 100644
|
||||||
|
--- a/gio/gresourcefile.c
|
||||||
|
+++ b/gio/gresourcefile.c
|
||||||
|
@@ -646,6 +646,19 @@ g_resource_file_monitor_file (GFile *file,
|
||||||
|
return g_object_new (g_resource_file_monitor_get_type (), NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
+static GFile *
|
||||||
|
+g_resource_file_set_display_name (GFile *file,
|
||||||
|
+ const char *display_name,
|
||||||
|
+ GCancellable *cancellable,
|
||||||
|
+ GError **error)
|
||||||
|
+{
|
||||||
|
+ g_set_error_literal (error,
|
||||||
|
+ G_IO_ERROR,
|
||||||
|
+ G_IO_ERROR_NOT_SUPPORTED,
|
||||||
|
+ _("Resource files cannot be renamed"));
|
||||||
|
+ return NULL;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
static void
|
||||||
|
g_resource_file_file_iface_init (GFileIface *iface)
|
||||||
|
{
|
||||||
|
@@ -664,6 +677,7 @@ g_resource_file_file_iface_init (GFileIface *iface)
|
||||||
|
iface->get_relative_path = g_resource_file_get_relative_path;
|
||||||
|
iface->resolve_relative_path = g_resource_file_resolve_relative_path;
|
||||||
|
iface->get_child_for_display_name = g_resource_file_get_child_for_display_name;
|
||||||
|
+ iface->set_display_name = g_resource_file_set_display_name;
|
||||||
|
iface->enumerate_children = g_resource_file_enumerate_children;
|
||||||
|
iface->query_info = g_resource_file_query_info;
|
||||||
|
iface->query_filesystem_info = g_resource_file_query_filesystem_info;
|
||||||
|
--
|
||||||
|
GitLab
|
||||||
|
|
||||||
@ -0,0 +1,67 @@
|
|||||||
|
From dad97d24d578dbefbebb41829b0ffb9e783cac7b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Ray Strode <rstrode@redhat.com>
|
||||||
|
Date: Fri, 28 Oct 2022 11:21:04 -0400
|
||||||
|
Subject: [PATCH] Revert "Handling collision between standard i/o file
|
||||||
|
descriptors and newly created ones"
|
||||||
|
|
||||||
|
g_unix_open_pipe tries to avoid the standard io fd range
|
||||||
|
when getting pipe fds. This turns out to be a bad idea because
|
||||||
|
certain buggy programs rely on it using that range.
|
||||||
|
|
||||||
|
This reverts commit d9ba6150909818beb05573f54f26232063492c5b
|
||||||
|
|
||||||
|
Closes: #2795
|
||||||
|
Reopens: #16
|
||||||
|
|
||||||
|
Conflict:NA
|
||||||
|
Reference:https://gitlab.gnome.org/GNOME/glib/-/commit/dad97d24d578dbefbebb41829b0ffb9e783cac7b
|
||||||
|
|
||||||
|
---
|
||||||
|
glib/glib-unix.c | 24 ------------------------
|
||||||
|
1 file changed, 24 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/glib/glib-unix.c b/glib/glib-unix.c
|
||||||
|
index 4710c51168..bc152d7663 100644
|
||||||
|
--- a/glib/glib-unix.c
|
||||||
|
+++ b/glib/glib-unix.c
|
||||||
|
@@ -108,17 +108,6 @@ g_unix_open_pipe (int *fds,
|
||||||
|
ecode = pipe2 (fds, pipe2_flags);
|
||||||
|
if (ecode == -1 && errno != ENOSYS)
|
||||||
|
return g_unix_set_error_from_errno (error, errno);
|
||||||
|
- /* Don't reassign pipes to stdin, stdout, stderr if closed meanwhile */
|
||||||
|
- else if (fds[0] < 3 || fds[1] < 3)
|
||||||
|
- {
|
||||||
|
- int old_fds[2] = { fds[0], fds[1] };
|
||||||
|
- gboolean result = g_unix_open_pipe (fds, flags, error);
|
||||||
|
- close (old_fds[0]);
|
||||||
|
- close (old_fds[1]);
|
||||||
|
-
|
||||||
|
- if (!result)
|
||||||
|
- g_unix_set_error_from_errno (error, errno);
|
||||||
|
- }
|
||||||
|
else if (ecode == 0)
|
||||||
|
return TRUE;
|
||||||
|
/* Fall through on -ENOSYS, we must be running on an old kernel */
|
||||||
|
@@ -127,19 +116,6 @@ g_unix_open_pipe (int *fds,
|
||||||
|
ecode = pipe (fds);
|
||||||
|
if (ecode == -1)
|
||||||
|
return g_unix_set_error_from_errno (error, errno);
|
||||||
|
- /* Don't reassign pipes to stdin, stdout, stderr if closed meanwhile */
|
||||||
|
- else if (fds[0] < 3 || fds[1] < 3)
|
||||||
|
- {
|
||||||
|
- int old_fds[2] = { fds[0], fds[1] };
|
||||||
|
- gboolean result = g_unix_open_pipe (fds, flags, error);
|
||||||
|
- close (old_fds[0]);
|
||||||
|
- close (old_fds[1]);
|
||||||
|
-
|
||||||
|
- if (!result)
|
||||||
|
- g_unix_set_error_from_errno (error, errno);
|
||||||
|
-
|
||||||
|
- return result;
|
||||||
|
- }
|
||||||
|
|
||||||
|
if (flags == 0)
|
||||||
|
return TRUE;
|
||||||
|
--
|
||||||
|
GitLab
|
||||||
|
|
||||||
@ -0,0 +1,32 @@
|
|||||||
|
From d01fb412801ddc55843f1e1642d0fef0afba441a Mon Sep 17 00:00:00 2001
|
||||||
|
From: John Lindgren <john@jlindgren.net>
|
||||||
|
Date: Thu, 13 Oct 2022 14:00:12 +0100
|
||||||
|
Subject: [PATCH] gmessages: Add missing trailing newline in fallback log
|
||||||
|
handler
|
||||||
|
|
||||||
|
This makes the fallback log handler match the behaviour of the default
|
||||||
|
log handlers.
|
||||||
|
|
||||||
|
Conflict:NA
|
||||||
|
Reference:https://gitlab.gnome.org/GNOME/glib/-/commit/d01fb412801ddc55843f1e1642d0fef0afba441a
|
||||||
|
|
||||||
|
Spotted as part of https://gitlab.gnome.org/GNOME/glib/-/issues/2753
|
||||||
|
---
|
||||||
|
glib/gmessages.c | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
diff --git a/glib/gmessages.c b/glib/gmessages.c
|
||||||
|
index fb1297f8a8..e197f1707a 100644
|
||||||
|
--- a/glib/gmessages.c
|
||||||
|
+++ b/glib/gmessages.c
|
||||||
|
@@ -3159,6 +3159,7 @@ _g_log_fallback_handler (const gchar *log_domain,
|
||||||
|
write_string (stream, level_prefix);
|
||||||
|
write_string (stream, ": ");
|
||||||
|
write_string (stream, message);
|
||||||
|
+ write_string (stream, "\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
--
|
||||||
|
GitLab
|
||||||
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
Name: glib2
|
Name: glib2
|
||||||
Version: 2.66.8
|
Version: 2.66.8
|
||||||
Release: 9
|
Release: 10
|
||||||
Summary: The core library that forms the basis for projects such as GTK+ and GNOME
|
Summary: The core library that forms the basis for projects such as GTK+ and GNOME
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
URL: http://www.gtk.org
|
URL: http://www.gtk.org
|
||||||
@ -64,6 +64,9 @@ Patch6053: backport-gio-tests-gdbus-peer-Unref-cached-property-GVariant-val
|
|||||||
Patch6054: backport-gdesktopappinfo-Unref-the-GDBus-call-results.patch
|
Patch6054: backport-gdesktopappinfo-Unref-the-GDBus-call-results.patch
|
||||||
Patch6055: backport-Handling-collision-between-standard-i-o-file-descriptors-and-newly-created-ones.patch
|
Patch6055: backport-Handling-collision-between-standard-i-o-file-descriptors-and-newly-created-ones.patch
|
||||||
Patch6056: backport-glocalfileoutputstream-Do-not-double-close-an-fd-on-unlink-error.patch
|
Patch6056: backport-glocalfileoutputstream-Do-not-double-close-an-fd-on-unlink-error.patch
|
||||||
|
Patch6057: backport-gmessages-Add-missing-trailing-newline-in-fallback-log-hander.patch
|
||||||
|
Patch6058: backport-Revert-Handling-collision-between-standard-i-o-filedescriptors-and-newly-created-ones.patch
|
||||||
|
Patch6059: backport-Implement-GFileIface.set_display_name-for-resource-files.patch
|
||||||
|
|
||||||
BuildRequires: chrpath gcc gcc-c++ gettext perl-interpreter
|
BuildRequires: chrpath gcc gcc-c++ gettext perl-interpreter
|
||||||
%ifnarch i686
|
%ifnarch i686
|
||||||
@ -236,6 +239,9 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Feb 16 2023 hanhuihui <hanhuihui5@huawei.com> - 2.66.8-10
|
||||||
|
- backport some patches from community
|
||||||
|
|
||||||
* Mon Dec 26 2022 hanhuihui <hanhuihui5@huawei.com> - 2.66.8-9
|
* Mon Dec 26 2022 hanhuihui <hanhuihui5@huawei.com> - 2.66.8-9
|
||||||
- backport some patches from community
|
- backport some patches from community
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user