Compare commits

...

No commits in common. "c8s" and "c9" have entirely different histories.
c8s ... c9

8 changed files with 483 additions and 198 deletions

3
.gitignore vendored
View File

@ -1,2 +1 @@
SOURCES/glib-2.70.1.tar.xz SOURCES/glib-2.78.6.tar.xz
/glib-2.70.1.tar.xz

1
.mingw-glib2.metadata Normal file
View File

@ -0,0 +1 @@
99b8a81357314c6fa279003ce1b95b5d708ba7a8 SOURCES/glib-2.78.6.tar.xz

View File

@ -1,28 +1,242 @@
From 7f4f4354540440c0a8a37beaccbec8bc7fc15ec7 Mon Sep 17 00:00:00 2001 diff -rupN --no-dereference glib-2.78.0/gio/tests/org.gtk.test.gschema.override.orig glib-2.78.0-new/gio/tests/org.gtk.test.gschema.override.orig
From: Erik van Pienbroek <epienbro@fedoraproject.org> --- glib-2.78.0/gio/tests/org.gtk.test.gschema.override.orig 2023-09-08 15:42:18.000000000 +0200
Date: Mon, 27 Aug 2012 23:28:54 +0200 +++ glib-2.78.0-new/gio/tests/org.gtk.test.gschema.override.orig 1970-01-01 01:00:00.000000000 +0100
Subject: [PATCH] Use CreateFile on Win32 to make sure g_unlink always works @@ -1,2 +0,0 @@
-[org.gtk.test.per-desktop:GNOME-Classic]
The functions g_open(), g_creat() and g_fopen() defer to _wopen(), -desktop = "GNOME Classic"
_wcreat() and _wfopen() respectively. This is very similar to diff -rupN --no-dereference glib-2.78.0/gio/tests/org.gtk.test.gschema.xml.orig glib-2.78.0-new/gio/tests/org.gtk.test.gschema.xml.orig
the corresponding arrangement for Linux. However, those Windows --- glib-2.78.0/gio/tests/org.gtk.test.gschema.xml.orig 2023-09-08 15:42:18.000000000 +0200
functions do not support renaming a file whilst it's open. As a +++ glib-2.78.0-new/gio/tests/org.gtk.test.gschema.xml.orig 1970-01-01 01:00:00.000000000 +0100
result, g_rename() behaves differently on the Windows platform @@ -1,225 +0,0 @@
compared to its Linux behaviour, where files can be renamed even -<schemalist>
while there are file handles still open. Resolved this by using -
the Win32 API function CreateFile() instead of _wopen(), _wcreat() - <schema id="org.gtk.test" path="/tests/" gettext-domain="test">
and _wfopen() - <key name="greeting" type="s">
- <default l10n="messages">"Hello, earthlings"</default>
Patch initially created by John Emmas - <summary>A greeting</summary>
--- - <description>
glib/gstdio.c | 259 ++++++++++++++++++++++++++++++++++++++++++++++++++++------ - Greeting of the invading martians
1 file changed, 233 insertions(+), 26 deletions(-) - </description>
- </key>
diff --git a/glib/gstdio.c b/glib/gstdio.c - <key name="farewell" type="s">
index 6d763e1..c1d072f 100644 - <default l10n="messages">"So long"</default>
--- a/glib/gstdio.c - </key>
+++ b/glib/gstdio.c -
@@ -1045,6 +1045,11 @@ g_open (const gchar *filename, - <child name='basic-types' schema='org.gtk.test.basic-types'/>
- <child name='complex-types' schema='org.gtk.test.complex-types'/>
- <child name='localized' schema='org.gtk.test.localized'/>
- </schema>
-
- <schema id="org.gtk.test.no-path">
- <key name="test-boolean" type="b">
- <default>true</default>
- </key>
- </schema>
-
- <schema id="org.gtk.test.basic-types" path="/tests/basic-types/">
- <key name="test-boolean" type="b">
- <default>true</default>
- </key>
- <key name="test-byte" type="y">
- <default>25</default>
- </key>
- <key name="test-int16" type="n">
- <default>-1234</default>
- </key>
- <key name="test-uint16" type="q">
- <default>1234</default>
- </key>
- <key name="test-int32" type="i">
- <default>-123456</default>
- </key>
- <key name="test-uint32" type="u">
- <default>123456</default>
- </key>
- <key name="test-int64" type="x">
- <default>-123456789</default>
- </key>
- <key name="test-uint64" type="t">
- <default>123456789</default>
- </key>
- <key name="test-double" type="d">
- <default>123.456</default>
- </key>
- <key name="test-string" type="s">
- <default>"a string, it seems"</default>
- </key>
- <key name="test-objectpath" type="o">
- <default>"/a/object/path"</default>
- </key>
- </schema>
-
- <schema id="org.gtk.test.complex-types" path="/tests/complex-types/">
- <key name="test-tuple" type="(s(ii))">
- <default>("one",(2,3))</default>
- </key>
- <key name="test-array" type="ai">
- <default>[0,1,2,3,4,5]</default>
- </key>
- <key name="test-dict" type="a{sau}">
- <default>
- {
- "AC": [0,0, 0,0,0,0,0,0],
- "IV": [0,0, 0,0,0,0,0,0]
- }
- </default>
- </key>
- </schema>
-
- <schema id="org.gtk.test.localized" path="/tests/localized/" gettext-domain="test">
- <key name="error-message" type="s">
- <default l10n="messages">"Unnamed"</default>
- </key>
- <key name="backspace" type="s">
- <default l10n="messages" context="keyboard label">"BackSpace"</default>
- </key>
- <key name="midnight" type="s">
- <default l10n="time">"12:00 AM"</default>
- </key>
- </schema>
-
- <schema id="org.gtk.test.binding" path="/tests/binding/">
- <key name="bool" type="b">
- <default>false</default>
- </key>
- <key name="anti-bool" type="b">
- <default>false</default>
- </key>
- <key name="byte" type="y">
- <default>0</default>
- </key>
- <key name="int16" type="n">
- <default>0</default>
- </key>
- <key name="uint16" type="q">
- <default>0</default>
- </key>
- <key name="int" type="i">
- <default>0</default>
- </key>
- <key name="uint" type="u">
- <default>0</default>
- </key>
- <key name="int64" type="x">
- <default>0</default>
- </key>
- <key name="uint64" type="t">
- <default>0</default>
- </key>
- <key name="double" type="d">
- <default>0</default>
- </key>
- <key name="string" type="s">
- <default>""</default>
- </key>
- <key name="chararray" type="ay">
- <default>[48, 49]</default>
- </key>
- <key name="strv" type="as">
- <default>[]</default>
- </key>
- <key name="enum" enum="org.gtk.test.TestEnum">
- <default>'foo'</default>
- </key>
- <key name="flags" flags="org.gtk.test.TestFlags">
- <default>['mourning', 'laughing']</default>
- </key>
- <key name="range" type='u'>
- <default>33</default>
- <range min="2" max="44"/>
- </key>
- </schema>
-
- <schema id='org.gtk.test.enums' path='/tests/enums/'>
- <key name='test' enum='org.gtk.test.TestEnum'>
- <default>'bar'</default>
- <aliases>
- <alias value='qux' target='quux'/>
- </aliases>
- </key>
- <key name='f-test' flags='org.gtk.test.TestFlags'>
- <default>[]</default>
- <aliases>
- <alias value='speaking' target='talking'/>
- </aliases>
- </key>
- </schema>
-
- <schema id='org.gtk.test.enums.direct' path='/tests/enums/'>
- <key name='f-test' type='as'>
- <default>[]</default>
- </key>
- <key name='test' type='s'>
- <default>'bar'</default>
- </key>
- </schema>
-
- <schema id='org.gtk.test.range' path='/tests/range/'>
- <key name='val' type='i'>
- <default>33</default>
- <range min='2' max='44'/>
- </key>
- </schema>
-
- <schema id='org.gtk.test.range.direct' path='/tests/range/'>
- <key name='val' type='i'>
- <default>33</default>
- </key>
- </schema>
-
- <schema id='org.gtk.test.mapped' path='/tests/mapped/'>
- <key name='val' type='i'>
- <default>0</default>
- </key>
- </schema>
-
- <schema id="org.gtk.test.descriptions" path="/a/">
- <key name='a' type='i'>
- <summary>
- a paragraph.
-
- with some whitespace.
-
- because not everyone has a great editor.
-
-
-
-
- lots of space is as one.
- </summary>
- <default>0</default>
- </key>
- </schema>
-
- <schema id='org.gtk.test.extends.base'>
- <key name='int32' type='i'>
- <default>0</default>
- </key>
- <key name='string' type='s'>
- <default>''</default>
- </key>
- </schema>
- <schema id='org.gtk.test.extends.extended' extends='org.gtk.test.extends.base'>
- <override name="int32">42</override>
- <key name='another-int32' type='i'>
- <default>0</default>
- </key>
- </schema>
-
- <schema id="org.gtk.test.per-desktop" path="/tests/per-desktop/">
- <key name="desktop" type="s">
- <default>"GNOME"</default>
- </key>
- </schema>
-
-</schemalist>
diff -rupN --no-dereference glib-2.78.0/glib/gstdio.c glib-2.78.0-new/glib/gstdio.c
--- glib-2.78.0/glib/gstdio.c 2023-09-08 15:42:18.000000000 +0200
+++ glib-2.78.0-new/glib/gstdio.c 2023-09-19 11:45:02.396539056 +0200
@@ -1052,6 +1052,11 @@ g_open (const gchar *filename,
int mode) int mode)
{ {
#ifdef G_OS_WIN32 #ifdef G_OS_WIN32
@ -34,7 +248,7 @@ index 6d763e1..c1d072f 100644
wchar_t *wfilename = g_utf8_to_utf16 (filename, -1, NULL, NULL, NULL); wchar_t *wfilename = g_utf8_to_utf16 (filename, -1, NULL, NULL, NULL);
int retval; int retval;
int save_errno; int save_errno;
@@ -1055,12 +1060,114 @@ g_open (const gchar *filename, @@ -1062,12 +1067,114 @@ g_open (const gchar *filename,
return -1; return -1;
} }
@ -55,8 +269,7 @@ index 6d763e1..c1d072f 100644
+ g_free (wfilename); + g_free (wfilename);
+ return -1; + return -1;
+ } + }
+
- g_free (wfilename);
+ dwDesiredAccess |= GENERIC_READ; + dwDesiredAccess |= GENERIC_READ;
+ dwSharedAccess |= FILE_SHARE_WRITE; + dwSharedAccess |= FILE_SHARE_WRITE;
+ } + }
@ -68,7 +281,7 @@ index 6d763e1..c1d072f 100644
+ g_free (wfilename); + g_free (wfilename);
+ return -1; + return -1;
+ } + }
+
+ dwDesiredAccess |= GENERIC_WRITE; + dwDesiredAccess |= GENERIC_WRITE;
+ } + }
+ if (flags & _O_RDWR) + if (flags & _O_RDWR)
@ -133,7 +346,8 @@ index 6d763e1..c1d072f 100644
+ } + }
+ else + else
+ retval = _open_osfhandle((long)hFile, flags); + retval = _open_osfhandle((long)hFile, flags);
+
- g_free (wfilename);
+ if ((-1) != retval) + if ((-1) != retval)
+ { + {
+ /* We have a valid file handle. Set its translation mode to text or binary, as appropriate */ + /* We have a valid file handle. Set its translation mode to text or binary, as appropriate */
@ -144,7 +358,7 @@ index 6d763e1..c1d072f 100644
+ else + else
+ _setmode(retval, _O_BINARY); + _setmode(retval, _O_BINARY);
+ } + }
+
+ save_errno = errno; + save_errno = errno;
+ g_free (wfilename); + g_free (wfilename);
errno = save_errno; errno = save_errno;
@ -152,7 +366,7 @@ index 6d763e1..c1d072f 100644
return retval; return retval;
#else #else
int fd; int fd;
@@ -1108,6 +1215,8 @@ g_creat (const gchar *filename, @@ -1115,6 +1222,8 @@ g_creat (const gchar *filename,
int mode) int mode)
{ {
#ifdef G_OS_WIN32 #ifdef G_OS_WIN32
@ -161,7 +375,7 @@ index 6d763e1..c1d072f 100644
wchar_t *wfilename = g_utf8_to_utf16 (filename, -1, NULL, NULL, NULL); wchar_t *wfilename = g_utf8_to_utf16 (filename, -1, NULL, NULL, NULL);
int retval; int retval;
int save_errno; int save_errno;
@@ -1118,12 +1227,41 @@ g_creat (const gchar *filename, @@ -1125,12 +1234,41 @@ g_creat (const gchar *filename,
return -1; return -1;
} }
@ -172,8 +386,7 @@ index 6d763e1..c1d072f 100644
+ if (! (mode & _S_IWRITE)) + if (! (mode & _S_IWRITE))
+ dwFlagsAndAttributes = FILE_ATTRIBUTE_READONLY; /* Sets file to 'read only' after the file gets closed */ + dwFlagsAndAttributes = FILE_ATTRIBUTE_READONLY; /* Sets file to 'read only' after the file gets closed */
+ } + }
+
- g_free (wfilename);
+ hFile = CreateFileW(wfilename, (GENERIC_READ | GENERIC_WRITE), (FILE_SHARE_READ | FILE_SHARE_DELETE), + hFile = CreateFileW(wfilename, (GENERIC_READ | GENERIC_WRITE), (FILE_SHARE_READ | FILE_SHARE_DELETE),
+ NULL, CREATE_ALWAYS, dwFlagsAndAttributes, NULL); + NULL, CREATE_ALWAYS, dwFlagsAndAttributes, NULL);
+ +
@ -200,13 +413,14 @@ index 6d763e1..c1d072f 100644
+ retval = _open_osfhandle((long)hFile, _O_RDWR); + retval = _open_osfhandle((long)hFile, _O_RDWR);
+ save_errno = errno; + save_errno = errno;
+ g_free (wfilename); g_free (wfilename);
-
errno = save_errno; errno = save_errno;
+ +
return retval; return retval;
#else #else
return creat (filename, mode); return creat (filename, mode);
@@ -1565,34 +1703,102 @@ g_fopen (const gchar *filename, @@ -1572,34 +1710,102 @@ g_fopen (const gchar *filename,
const gchar *mode) const gchar *mode)
{ {
#ifdef G_OS_WIN32 #ifdef G_OS_WIN32
@ -263,7 +477,7 @@ index 6d763e1..c1d072f 100644
+ if (('c' == priv_mode[2]) || ('n' == priv_mode[2])) + if (('c' == priv_mode[2]) || ('n' == priv_mode[2]))
+ priv_mode[2] = '\0'; + priv_mode[2] = '\0';
+ else + else
+ { + {
+ if (0 == strcmp(priv_mode, "a+b")) + if (0 == strcmp(priv_mode, "a+b"))
+ flags = _O_RDWR | _O_CREAT | _O_APPEND | _O_BINARY; + flags = _O_RDWR | _O_CREAT | _O_APPEND | _O_BINARY;
+ else if (0 == strcmp(priv_mode, "a+t")) + else if (0 == strcmp(priv_mode, "a+t"))
@ -281,14 +495,14 @@ index 6d763e1..c1d072f 100644
+ errno = EINVAL; + errno = EINVAL;
+ goto out; + goto out;
+ } + }
+ } + }
+ } + }
+ if (2 == strlen(priv_mode)) + if (2 == strlen(priv_mode))
+ { + {
+ if (('c' == priv_mode[1]) || ('n' == priv_mode[1])) + if (('c' == priv_mode[1]) || ('n' == priv_mode[1]))
+ priv_mode[1] = '\0'; + priv_mode[1] = '\0';
+ else + else
+ { + {
+ if (0 == strcmp(priv_mode, "a+")) + if (0 == strcmp(priv_mode, "a+"))
+ flags = _O_RDWR | _O_CREAT | _O_APPEND; + flags = _O_RDWR | _O_CREAT | _O_APPEND;
+ else if (0 == strcmp(priv_mode, "ab")) + else if (0 == strcmp(priv_mode, "ab"))
@ -308,7 +522,7 @@ index 6d763e1..c1d072f 100644
+ errno = EINVAL; + errno = EINVAL;
+ goto out; + goto out;
+ } + }
+ } + }
+ } + }
+ if (1 == strlen(priv_mode)) + if (1 == strlen(priv_mode))
+ { + {
@ -337,6 +551,3 @@ index 6d763e1..c1d072f 100644
return retval; return retval;
#else #else
return fopen (filename, mode); return fopen (filename, mode);
--
1.7.11.4

View File

@ -0,0 +1,45 @@
From 25833cefda24c60af913d6f2d532b5afd608b821 Mon Sep 17 00:00:00 2001
From: Michael Catanzaro <mcatanzaro@redhat.com>
Date: Thu, 19 Sep 2024 18:35:53 +0100
Subject: [PATCH] gsocks4aproxy: Fix a single byte buffer overflow in connect
messages
`SOCKS4_CONN_MSG_LEN` failed to account for the length of the final nul
byte in the connect message, which is an addition in SOCKSv4a vs
SOCKSv4.
This means that the buffer for building and transmitting the connect
message could be overflowed if the username and hostname are both
`SOCKS4_MAX_LEN` (255) bytes long.
Proxy configurations are normally statically configured, so the username
is very unlikely to be near its maximum length, and hence this overflow
is unlikely to be triggered in practice.
(Commit message by Philip Withnall, diagnosis and fix by Michael
Catanzaro.)
Fixes: #3461
---
gio/gsocks4aproxy.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gio/gsocks4aproxy.c b/gio/gsocks4aproxy.c
index 3dad118eb7..b3146d08fd 100644
--- a/gio/gsocks4aproxy.c
+++ b/gio/gsocks4aproxy.c
@@ -79,9 +79,9 @@ g_socks4a_proxy_init (GSocks4aProxy *proxy)
* +----+----+----+----+----+----+----+----+----+----+....+----+------+....+------+
* | VN | CD | DSTPORT | DSTIP | USERID |NULL| HOST | | NULL |
* +----+----+----+----+----+----+----+----+----+----+....+----+------+....+------+
- * 1 1 2 4 variable 1 variable
+ * 1 1 2 4 variable 1 variable 1
*/
-#define SOCKS4_CONN_MSG_LEN (9 + SOCKS4_MAX_LEN * 2)
+#define SOCKS4_CONN_MSG_LEN (10 + SOCKS4_MAX_LEN * 2)
static gint
set_connect_msg (guint8 *msg,
const gchar *hostname,
--
GitLab

View File

@ -1,43 +1,39 @@
%?mingw_package_header %{?mingw_package_header}
# See https://fedoraproject.org/wiki/Packaging:Python_Appendix#Manual_byte_compilation
%global __python %{__python3}
Name: mingw-glib2 Name: mingw-glib2
Version: 2.70.1 Version: 2.78.6
Release: 1%{?dist} Release: 2%{?dist}
Summary: MinGW Windows GLib2 library Summary: MinGW Windows GLib2 library
License: LGPLv2+ License: LGPL-2.0-or-later
URL: http://www.gtk.org URL: http://www.gtk.org
# first two digits of version # first two digits of version
%global release_version %(echo %{version} | awk -F. '{print $1"."$2}') %global release_version %(echo %{version} | awk -F. '{print $1"."$2}')
Source0: http://download.gnome.org/sources/glib/%{release_version}/glib-%{version}.tar.xz Source0: http://download.gnome.org/sources/glib/%{release_version}/glib-%{version}.tar.xz
BuildArch: noarch BuildArch: noarch
ExclusiveArch: %{ix86} x86_64
BuildRequires: meson BuildRequires: meson
BuildRequires: gcc BuildRequires: gcc
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: mingw32-filesystem >= 104 BuildRequires: mingw32-filesystem >= 107
BuildRequires: mingw32-gcc BuildRequires: mingw32-gcc
BuildRequires: mingw32-binutils BuildRequires: mingw32-binutils
BuildRequires: mingw32-win-iconv BuildRequires: mingw32-win-iconv
BuildRequires: mingw32-gettext BuildRequires: mingw32-gettext
BuildRequires: mingw32-libffi BuildRequires: mingw32-libffi
BuildRequires: mingw32-pcre BuildRequires: mingw32-pcre2
BuildRequires: mingw32-zlib BuildRequires: mingw32-zlib >= 1.2.13
BuildRequires: mingw64-filesystem >= 104 BuildRequires: mingw64-filesystem >= 107
BuildRequires: mingw64-gcc BuildRequires: mingw64-gcc
BuildRequires: mingw64-binutils BuildRequires: mingw64-binutils
BuildRequires: mingw64-win-iconv BuildRequires: mingw64-win-iconv
BuildRequires: mingw64-gettext BuildRequires: mingw64-gettext
BuildRequires: mingw64-libffi BuildRequires: mingw64-libffi
BuildRequires: mingw64-pcre BuildRequires: mingw64-pcre2
BuildRequires: mingw64-zlib BuildRequires: mingw64-zlib >= 1.2.13
# Native version required for msgfmt use in build # Native version required for msgfmt use in build
BuildRequires: gettext BuildRequires: gettext
@ -48,12 +44,16 @@ BuildRequires: python3-devel
# https://bugzilla.gnome.org/show_bug.cgi?id=674214 # https://bugzilla.gnome.org/show_bug.cgi?id=674214
Patch1: 0001-Use-CreateFile-on-Win32-to-make-sure-g_unlink-always.patch Patch1: 0001-Use-CreateFile-on-Win32-to-make-sure-g_unlink-always.patch
# https://issues.redhat.com/browse/RHEL-67089
# https://gitlab.gnome.org/GNOME/glib/-/issues/3461
Patch2: CVE-2024-52533-buffer-overflow-in-set_connect_msg.patch
# Prefer the use of GCC constructors over DllMain # Prefer the use of GCC constructors over DllMain
# This prevents having to depend on DllMain in static libraries # This prevents having to depend on DllMain in static libraries
# http://lists.fedoraproject.org/pipermail/mingw/2013-March/006429.html # http://lists.fedoraproject.org/pipermail/mingw/2013-March/006429.html
# http://lists.fedoraproject.org/pipermail/mingw/2013-March/006469.html # http://lists.fedoraproject.org/pipermail/mingw/2013-March/006469.html
# https://bugzilla.gnome.org/show_bug.cgi?id=698118 # https://bugzilla.gnome.org/show_bug.cgi?id=698118
Patch2: glib-prefer-constructors-over-DllMain.patch #Patch5: glib-prefer-constructors-over-DllMain.patch
%description %description
MinGW Windows Glib2 library. MinGW Windows Glib2 library.
@ -62,8 +62,7 @@ MinGW Windows Glib2 library.
%package -n mingw32-glib2 %package -n mingw32-glib2
Summary: MinGW Windows Glib2 library for the win32 target Summary: MinGW Windows Glib2 library for the win32 target
# glib-genmarshal and glib-mkenums are written in Python # glib-genmarshal and glib-mkenums are written in Python
# plataform-python due: https://bugzilla.redhat.com/show_bug.cgi?id=1633614 Requires: python3
Requires: platform-python
%description -n mingw32-glib2 %description -n mingw32-glib2
MinGW Windows Glib2 library. MinGW Windows Glib2 library.
@ -80,8 +79,7 @@ Static version of the MinGW Windows GLib2 library.
%package -n mingw64-glib2 %package -n mingw64-glib2
Summary: MinGW Windows Glib2 library for the win64 target Summary: MinGW Windows Glib2 library for the win64 target
# glib-genmarshal and glib-mkenums are written in Python # glib-genmarshal and glib-mkenums are written in Python
# plataform-python due: https://bugzilla.redhat.com/show_bug.cgi?id=1633614 Requires: python3
Requires: platform-python
%description -n mingw64-glib2 %description -n mingw64-glib2
MinGW Windows Glib2 library. MinGW Windows Glib2 library.
@ -95,22 +93,25 @@ Requires: mingw64-gettext-static
Static version of the MinGW Windows GLib2 library. Static version of the MinGW Windows GLib2 library.
%?mingw_debug_package %{?mingw_debug_package}
%prep %prep
%setup -q -n glib-%{version} %autosetup -p1 -n glib-%{version}
%patch1 -p1
%patch2 -p1
%build %build
%mingw_meson --default-library=both \ export MINGW_BUILDDIR_SUFFIX=static
--buildtype=release %mingw_meson --default-library=static
%mingw_ninja
export MINGW_BUILDDIR_SUFFIX=shared
%mingw_meson --default-library=shared
%mingw_ninja %mingw_ninja
%install %install
export DESTDIR=$RPM_BUILD_ROOT export MINGW_BUILDDIR_SUFFIX=static
%mingw_ninja install %mingw_ninja_install
export MINGW_BUILDDIR_SUFFIX=shared
%mingw_ninja_install
# There's a small difference in the file glibconfig.h between the # There's a small difference in the file glibconfig.h between the
# shared and the static build: # shared and the static build:
@ -134,37 +135,39 @@ export DESTDIR=$RPM_BUILD_ROOT
# and -DGOBJECT_STATIC_COMPILATION to their CFLAGS to avoid compile failures # and -DGOBJECT_STATIC_COMPILATION to their CFLAGS to avoid compile failures
# Drop the folder which was temporary used for installing the static bits # Drop the folder which was temporary used for installing the static bits
rm -f $RPM_BUILD_ROOT/%{mingw32_libdir}/charset.alias rm -f %{buildroot}/%{mingw32_libdir}/charset.alias
rm -f $RPM_BUILD_ROOT/%{mingw64_libdir}/charset.alias rm -f %{buildroot}/%{mingw64_libdir}/charset.alias
# Drop the GDB helper files as we can't use the native Fedora GDB to debug Win32 programs # Drop the GDB helper files as we can't use the native Fedora GDB to debug Win32 programs
rm -rf $RPM_BUILD_ROOT%{mingw32_datadir}/gdb rm -rf %{buildroot}%{mingw32_datadir}/gdb
rm -rf $RPM_BUILD_ROOT%{mingw64_datadir}/gdb rm -rf %{buildroot}%{mingw64_datadir}/gdb
# Remove the gtk-doc documentation and manpages which duplicate Fedora native # Remove the gtk-doc documentation and manpages which duplicate Fedora native
rm -rf $RPM_BUILD_ROOT%{mingw32_mandir} rm -rf %{buildroot}%{mingw32_mandir}
rm -rf $RPM_BUILD_ROOT%{mingw32_datadir}/gtk-doc rm -rf %{buildroot}%{mingw32_datadir}/gtk-doc
rm -rf $RPM_BUILD_ROOT%{mingw64_mandir} rm -rf %{buildroot}%{mingw64_mandir}
rm -rf $RPM_BUILD_ROOT%{mingw64_datadir}/gtk-doc rm -rf %{buildroot}%{mingw64_datadir}/gtk-doc
# Bash-completion files aren't interesting for mingw # Bash-completion files aren't interesting for mingw
rm -rf $RPM_BUILD_ROOT%{mingw32_datadir}/bash-completion rm -rf %{buildroot}%{mingw32_datadir}/bash-completion
rm -rf $RPM_BUILD_ROOT%{mingw64_datadir}/bash-completion rm -rf %{buildroot}%{mingw64_datadir}/bash-completion
# The .def files are also of no use to other binaries # The .def files are also of no use to other binaries
rm -f $RPM_BUILD_ROOT%{mingw32_libdir}/*.def rm -f %{buildroot}%{mingw32_libdir}/*.def
rm -f $RPM_BUILD_ROOT%{mingw64_libdir}/*.def rm -f %{buildroot}%{mingw64_libdir}/*.def
# The gdbus-codegen pieces are already in the native glib2 package # The gdbus-codegen pieces are already in the native glib2 package
rm -f $RPM_BUILD_ROOT%{mingw32_bindir}/gdbus-codegen rm -f %{buildroot}%{mingw32_bindir}/gdbus-codegen
rm -rf $RPM_BUILD_ROOT%{mingw32_libdir}/gdbus-2.0 rm -rf %{buildroot}%{mingw32_libdir}/gdbus-2.0
sed -i 's|gdbus_codegen=.*|gdbus_codegen=%{_bindir}/gdbus-codegen|g' %{buildroot}%{mingw32_libdir}/pkgconfig/gio-2.0.pc
rm -f $RPM_BUILD_ROOT%{mingw64_bindir}/gdbus-codegen rm -f %{buildroot}%{mingw64_bindir}/gdbus-codegen
rm -rf $RPM_BUILD_ROOT%{mingw64_libdir}/gdbus-2.0 rm -rf %{buildroot}%{mingw64_libdir}/gdbus-2.0
sed -i 's|gdbus_codegen=.*|gdbus_codegen=%{_bindir}/gdbus-codegen|g' %{buildroot}%{mingw64_libdir}/pkgconfig/gio-2.0.pc
# Drop all .la files # Drop all .la files
find $RPM_BUILD_ROOT -name "*.la" -delete find %{buildroot} -name "*.la" -delete
%mingw_find_lang glib20 %mingw_find_lang glib20
@ -175,6 +178,7 @@ find $RPM_BUILD_ROOT -name "*.la" -delete
%py_byte_compile %{__python3} %{buildroot}%{mingw64_datadir}/glib-2.0/gdb %py_byte_compile %{__python3} %{buildroot}%{mingw64_datadir}/glib-2.0/gdb
%py_byte_compile %{__python3} %{buildroot}%{mingw64_datadir}/glib-2.0/codegen %py_byte_compile %{__python3} %{buildroot}%{mingw64_datadir}/glib-2.0/codegen
# Win32 # Win32
%files -n mingw32-glib2 -f mingw32-glib20.lang %files -n mingw32-glib2 -f mingw32-glib20.lang
%license COPYING %license COPYING
@ -279,33 +283,145 @@ find $RPM_BUILD_ROOT -name "*.la" -delete
%changelog %changelog
* Thu Dec 23 2021 Yan Vugenfirer <yvugenfi@redhat.com> 2.70.1-1 * Tue Nov 26 2024 Konstantin Kostiuk <kkostiuk@redhat.com> - 2.78.6-2
- Update to 2.70.1 - Resolves: RHEL-67088 - CVE-2024-52533 mingw-glib2: buffer overflow in set_connect_msg()
- Resolves: rhbz#2034959
* Thu Aug 05 2021 Uri Lublin <uril@redhat.com> - 2.66.7-2 * Tue May 21 2024 Konstantin Kostiuk <kkostiuk@redhat.com> - 2.78.6-1
- Rebuilt - Bump glib2 version 2.78.6
Resolves: rhbz#1939111 (CVE-2021-27219) - Fix CVEs: CVE-2024-34397
Resolves: rhbz#1935248 - Resolves: RHEL-35776
* Sun Feb 21 2021 Basil Salman <bsalman@redhat.com> - 2.66.7-1 * Thu Oct 26 2023 Konstantin Kostiuk <kkostiuk@redhat.com> - 2.78.0-1
- Bump glib2 version 2.78.0
- Drop DesktopQE gating
- Fix CVEs: CVE-2023-32636, CVE-2023-29499, CVE-2023-32611, CVE-2023-32665, DoS
- Resolves: RHEL-5019
- Resolves: RHEL-5020
- Resolves: RHEL-5092
- Resolves: RHEL-5093
- Resolves: RHEL-5094
* Mon Aug 7 2023 Konstantin Kostiuk <kkostiuk@redhat.com> - 2.70.1-4
- Fix Glib2 build
- Resolves: RHEL-1056
* Mon Aug 7 2023 Konstantin Kostiuk <kkostiuk@redhat.com> - 2.70.1-3
- Update license to SPDX format
- Resolves: RHEL-1056
* Mon Aug 08 2022 Konstantin Kostiuk <kkostiuk@redhat.com> - 2.70.1-2
- Rebuild for mingw-zlib update
resolves: rhbz#2116278
* Mon Oct 04 2021 Richard W.M. Jones <rjones@redhat.com> - 2.66.7-4
- Rebuild for changed mingw-libffi soname
resolves: rhbz#2009943
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 2.66.7-3
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 2.66.7-2
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Fri Mar 05 2021 Sandro Mani <manisandro@gmail.com> - 2.66.7-1
- Update to 2.66.7 - Update to 2.66.7
- Rebuild from newer version that fixes CVE-2021-27219
- Resolves: rhbz#1928649
* Tue Feb 16 2021 Basil Salman <bsalman@redhat.com> - 2.66.4-1 * Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.66.2-2
- Update to 2.66.4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
- Dropped upstreamed patches
- Switched to meson
Resolves: rhbz#1928649
* Thu Sep 27 2018 Victor Toso <victortoso@redhat.com> - 2.56.1-3 * Mon Oct 19 2020 Sandro Mani <manisandro@gmail.com> - 2.66.2-1
- Use platform-python in Require - Update to 2.66.2
Related: rhbz#1633614
* Thu Aug 16 2018 Snir Sheriber <ssheribe@redhat.com> - 2.56.1-2 * Mon Oct 05 2020 Sandro Mani <manisandro@gmail.com> - 2.66.1-1
- ExclusiveArch: i686, x86_64 - Update to 2.66.1
Related: rhbz#1615874
* Tue Sep 15 2020 Sandro Mani <manisandro@gmail.com> - 2.66.0-1
- Update to 2.66.0
* Wed Aug 12 13:36:55 GMT 2020 Sandro Mani <manisandro@gmail.com> - 2.64.3-3
- Rebuild (mingw-gettext)
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.64.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Fri May 22 2020 Sandro Mani <manisandro@gmail.com> - 2.64.3-1
- Update to 2.64.3
* Mon Apr 20 2020 Sandro Mani <manisandro@gmail.com> - 2.64.2-2
- Rebuild (gettext)
* Sat Apr 11 2020 Sandro Mani <manisandro@gmail.com> - 2.64.2-1
- Update to 2.64.2
* Thu Mar 12 2020 Sandro Mani <manisandro@gmail.com> - 2.64.1-1
- Update to 2.64.1
* Fri Mar 06 2020 Sandro Mani <manisandro@gmail.com> - 2.64.0-1
- Update to 2.64.0
* Tue Feb 25 2020 Sandro Mani <manisandro@gmail.com> - 2.63.6-1
- Update to 2.63.6
* Tue Feb 11 2020 Sandro Mani <manisandro@gmail.com> - 2.63.5-2
- Backport proposed patch for CVE-2020-6750
* Mon Feb 03 2020 Sandro Mani <manisandro@gmail.com> - 2.63.5-1
- Update to 2.63.5
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.63.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Fri Jan 24 2020 Sandro Mani <manisandro@gmail.com> - 2.63.4-1
- Update to 2.63.4
* Mon Dec 16 2019 Sandro Mani <manisandro@gmail.com> - 2.63.3-1
- Update to 2.63.3
* Tue Dec 03 2019 Sandro Mani <manisandro@gmail.com> - 2.63.2-1
- Update to 2.63.2
* Tue Oct 08 2019 Sandro Mani <manisandro@gmail.com> - 2.63.0-2
- Rebuild (Changes/Mingw32GccDwarf2)
* Fri Oct 04 2019 Sandro Mani <manisandro@gmail.com> - 2.63.0-1
- Update to 2.63.0
* Mon Sep 16 2019 Sandro Mani <manisandro@gmail.com> - 2.62.0-1
- Update to 2.62.0
* Wed Sep 04 2019 Sandro Mani <manisandro@gmail.com> - 2.61.3-1
- Update to 2.61.3
* Thu Aug 15 2019 Fabiano Fidêncio <fidencio@redhat.com> - 2.61.2-1
- Update to 2.61.2
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.58.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.58.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Tue Jan 22 2019 Kalev Lember <klember@redhat.com> - 2.58.3-1
- Update to 2.58.3
* Tue Jan 08 2019 Kalev Lember <klember@redhat.com> - 2.58.2-1
- Update to 2.58.2
* Fri Sep 21 2018 Kalev Lember <klember@redhat.com> - 2.58.1-1
- Update to 2.58.1
* Thu Aug 02 2018 Thomas Sailer <t.sailer@alumni.ethz.ch> - 2.57.2-1
- Update to 2.57.2
* Thu Aug 02 2018 Thomas Sailer <t.sailer@alumni.ethz.ch> - 2.57.1-1
- Update to 2.57.1
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.56.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 2.56.1-2
- Rebuilt for Python 3.7
* Mon May 28 2018 Thomas Sailer <t.sailer@alumni.ethz.ch> - 2.56.1-1 * Mon May 28 2018 Thomas Sailer <t.sailer@alumni.ethz.ch> - 2.56.1-1
- Update to 2.56.1 - Update to 2.56.1

View File

@ -1,6 +0,0 @@
--- !Policy
product_versions:
- rhel-8
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: desktop-qe.desktop-ci.tier1-gating.functional}

View File

@ -1,80 +0,0 @@
From bc90511c1eb333e26e0bc0eaee62375d0e788db6 Mon Sep 17 00:00:00 2001
From: Erik van Pienbroek <epienbro@fedoraproject.org>
Date: Tue, 16 Apr 2013 11:42:11 +0200
Subject: [PATCH] win32: Prefer the use of constructors over DllMain
This prevents having to depend on DllMain in static libraries
Constructors are available in both the GCC build (GCC 2.7 and later)
and the MSVC build (MSVC 2008 and later using _Pragma, earlier
versions using #pragma)
---
glib/glib-init.c | 22 ++++++++++++++--------
1 file changed, 14 insertions(+), 8 deletions(-)
diff --git a/glib/glib-init.c b/glib/glib-init.c
index 0032ee8..dd6ccbf 100644
--- a/glib/glib-init.c
+++ b/glib/glib-init.c
@@ -223,12 +223,14 @@ glib_init (void)
#if defined (G_OS_WIN32)
+HMODULE glib_dll = NULL;
+
+#if defined (DLL_EXPORT)
+
BOOL WINAPI DllMain (HINSTANCE hinstDLL,
DWORD fdwReason,
LPVOID lpvReserved);
-HMODULE glib_dll;
-
BOOL WINAPI
DllMain (HINSTANCE hinstDLL,
DWORD fdwReason,
@@ -238,14 +240,6 @@ DllMain (HINSTANCE hinstDLL,
{
case DLL_PROCESS_ATTACH:
glib_dll = hinstDLL;
- g_crash_handler_win32_init ();
- g_clock_win32_init ();
-#ifdef THREADS_WIN32
- g_thread_win32_init ();
-#endif
- glib_init ();
- /* must go after glib_init */
- g_console_win32_init ();
break;
case DLL_THREAD_DETACH:
@@ -259,7 +256,10 @@ DllMain (HINSTANCE hinstDLL,
return TRUE;
}
-#elif defined (G_HAS_CONSTRUCTORS)
+#endif /* defined (DLL_EXPORT) */
+#endif /* defined (G_OS_WIN32) */
+
+#if defined (G_HAS_CONSTRUCTORS)
#ifdef G_DEFINE_CONSTRUCTOR_NEEDS_PRAGMA
#pragma G_DEFINE_CONSTRUCTOR_PRAGMA_ARGS(glib_init_ctor)
@@ -269,7 +266,15 @@ G_DEFINE_CONSTRUCTOR(glib_init_ctor)
static void
glib_init_ctor (void)
{
+#if defined (G_OS_WIN32)
+ g_clock_win32_init ();
+#ifdef THREADS_WIN32
+ g_thread_win32_init ();
+#endif /* defined (THREADS_WIN32) */
+#endif /* defined (G_OS_WIN32) */
glib_init ();
+ /* must go after glib_init */
+ g_console_win32_init ();
}
#else
--
1.8.2

View File

@ -1 +0,0 @@
SHA512 (glib-2.70.1.tar.xz) = 639317c98ab72ad853608ab4d395484daff135c0222556c51ca93fd8533c5759db14478beda964e4feb02bb2737a46a4eda25063f98a9c6ba6ae4bc5d74bf5e1