!132 [sync] PR-129: backport some patches from community

From: @openeuler-sync-bot 
Reviewed-by: @yanan-rock 
Signed-off-by: @yanan-rock
This commit is contained in:
openeuler-ci-bot 2023-02-17 06:31:07 +00:00 committed by Gitee
commit b0d4901ecb
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 105 additions and 1 deletions

View File

@ -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

View File

@ -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

View File

@ -1,6 +1,6 @@
Name: glib2
Version: 2.72.2
Release: 7
Release: 8
Summary: The core library that forms the basis for projects such as GTK+ and GNOME
License: LGPLv2+
URL: http://www.gtk.org
@ -57,6 +57,8 @@ Patch6047: backport-regex-Use-critical-messages-if-an-unexpected-NULL-param
Patch6048: backport-gregex-Allow-G_REGEX_JAVASCRIPT_COMPAT-in-compile-mask-for-g_regex_new.patch
Patch6049: backport-gregex-Drop-explanation-G_REGEX_JAVASCRIPT_COMPAT.patch
Patch6050: backport-gregex-Remove-an-unreachable-return-statement.patch
Patch6051: backport-gmessages-Add-missing-trailing-newline-in-fallback-log-hander.patch
Patch6052: backport-Revert-Handling-collision-between-standard-i-o-filedescriptors-and-newly-created-ones.patch
BuildRequires: chrpath gcc gcc-c++ gettext perl-interpreter
BUildRequires: glibc-devel libattr-devel libselinux-devel meson
@ -252,6 +254,9 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
%endif
%changelog
* Thu Feb 16 2023 hanhuihui <hanhuihui5@huawei.com> - 2.72.2-8
- backport some patches from community
* Tue Jan 10 2023 hanhuihui <hanhuihui5@huawei.com> - 2.72.2-7
- adjust pcre2 requires