Skip to content

Commit

Permalink
[glib2] Update to 2.66.1. Fixes JB#51565
Browse files Browse the repository at this point in the history
Signed-off-by: Matti Kosola <matti.kosola@jolla.com>
  • Loading branch information
mkosola committed Oct 14, 2020
1 parent a36c2f7 commit 9cbb2ca
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
@@ -1,3 +1,3 @@
[submodule "upstream"]
path = upstream
url = https://git.sailfishos.org/mirror/glib.git
url = https://github.com/sailfishos-mirror/glib.git
@@ -1,4 +1,4 @@
From 7686cc0a857ffd11c06698fce56413439a8bf701 Mon Sep 17 00:00:00 2001
From 238be9a1f97944fd19d00e0112b0e5cd77617c35 Mon Sep 17 00:00:00 2001
From: Frajo Haider <f_haider@gmx.at>
Date: Wed, 15 Jan 2020 15:06:05 +0000
Subject: [PATCH] detect removable storage properly. JB#48442
Expand All @@ -16,10 +16,10 @@ properly.
1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/gio/gunixmounts.c b/gio/gunixmounts.c
index cbf2ee9..2fe361d 100644
index b0fdfa8c0..08c41881b 100644
--- a/gio/gunixmounts.c
+++ b/gio/gunixmounts.c
@@ -1087,8 +1087,11 @@ _g_get_unix_mount_points (void)
@@ -1091,8 +1091,11 @@ _g_get_unix_mount_points (void)
char *read_file;
GUnixMountPoint *mount_point;
GList *return_list;
Expand All @@ -32,7 +32,7 @@ index cbf2ee9..2fe361d 100644

file = setmntent (read_file, "r");
if (file == NULL)
@@ -1144,6 +1147,15 @@ _g_get_unix_mount_points (void)
@@ -1148,6 +1151,15 @@ _g_get_unix_mount_points (void)
)
is_user_mountable = TRUE;

Expand All @@ -49,5 +49,5 @@ index cbf2ee9..2fe361d 100644
mntent->mnt_dir,
mntent->mnt_type,
--
1.8.3-rc3
2.26.2

@@ -0,0 +1,29 @@
From d75b5f52bbca63dfe20c7c4604b9783d990c6f73 Mon Sep 17 00:00:00 2001
From: Slava Monich <slava.monich@jolla.com>
Date: Mon, 30 May 2016 12:25:19 +0300
Subject: [PATCH] glib: Replace g_critical in g_source_remove with g_warning.
Contributes to JB#35380

glib 2.39 and later calls g_critical from g_source_remove() if it's called
with invalid source id. Even though it's a programming error, in most cases
it's not fatal.
---
glib/gmain.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/glib/gmain.c b/glib/gmain.c
index cae6e4828..ca21cf272 100644
--- a/glib/gmain.c
+++ b/glib/gmain.c
@@ -2496,7 +2496,7 @@ g_source_remove (guint tag)
if (source)
g_source_destroy (source);
else
- g_critical ("Source ID %u was not found when attempting to remove it", tag);
+ g_warning ("Source ID %u was not found when attempting to remove it", tag);

return source != NULL;
}
--
2.26.2

13 changes: 0 additions & 13 deletions rpm/glib-replace-some-criticals-with-warnings.patch

This file was deleted.

2 changes: 1 addition & 1 deletion rpm/glib2.changes
Expand Up @@ -2,7 +2,7 @@
- Updated old syslog-message-handler patch to build with a recent glib2.
- Updated spec to install to the correct path gdbus codegen code.

* Mon Oct 28 2012 David Greaves <david.greaves@jollamobile.com> - 2.32.4
* Sun Oct 28 2012 David Greaves <david.greaves@jollamobile.com> - 2.32.4
- Build with --enable-debug=no unless stage_devel defined

* Mon Jul 30 2012 Marko Saukko <marko.saukko@jollamobile.com> - 2.32.4
Expand Down
10 changes: 5 additions & 5 deletions rpm/glib2.spec
Expand Up @@ -3,16 +3,16 @@ Name: glib2
%define keepstatic 1

Summary: A library of handy utility functions
Version: 2.62.4
Version: 2.66.1
Release: 1
License: LGPLv2+
URL: http://www.gtk.org
Source0: %{name}-%{version}.tar.xz
Source2: glib2.sh
Source3: glib2.csh
Source4: %{name}-rpmlintrc
Patch1: 0001-glib2-detect-removable-storage-properly.-JB-48442.patch
Patch2: glib-replace-some-criticals-with-warnings.patch
Patch1: 0001-detect-removable-storage-properly.-JB-48442.patch
Patch2: 0001-glib-Replace-g_critical-in-g_source_remove-with-g_wa.patch
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
BuildRequires: chrpath
Expand Down Expand Up @@ -69,7 +69,7 @@ version 2 of the GLib library.
rm -f glib/pcre/*.[ch]
%meson \
--default-library=both \
-Dlibmount=false
-Dlibmount=disabled

%meson_build

Expand All @@ -90,6 +90,7 @@ export PYTHONHASHSEED=0
%global __python %{__python3} %{buildroot}%{_datadir}

mv %{buildroot}%{_bindir}/gio-querymodules %{buildroot}%{_bindir}/gio-querymodules-%{__isa_bits}
sed -i -e "/^gio_querymodules=/s/gio-querymodules/gio-querymodules-%{__isa_bits}/" %{buildroot}%{_libdir}/pkgconfig/gio-2.0.pc

mkdir -p %{buildroot}%{_libdir}/gio/modules
touch %{buildroot}%{_libdir}/gio/modules/giomodule.cache
Expand Down Expand Up @@ -146,7 +147,6 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
%{_bindir}/gresource
%{_bindir}/gapplication
%{_bindir}/gio
%{_bindir}/gio-launch-desktop
%{_datarootdir}/gettext/its

%files static
Expand Down
2 changes: 1 addition & 1 deletion upstream
Submodule upstream updated 614 files

0 comments on commit 9cbb2ca

Please sign in to comment.