pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/devel/glib2
Module Name: pkgsrc
Committed By: wiz
Date: Sat Sep 18 13:19:26 UTC 2021
Modified Files:
pkgsrc/devel/glib2: Makefile distinfo
pkgsrc/devel/glib2/patches: patch-gio_gunixmounts.c
Log Message:
glib2: getfsent() is not thread-safe.
Add patch from FreeBSD ports, via Sergio Lenzi in PR 56408.
Bump PKGREVISION.
To generate a diff of this commit:
cvs rdiff -u -r1.283 -r1.284 pkgsrc/devel/glib2/Makefile
cvs rdiff -u -r1.289 -r1.290 pkgsrc/devel/glib2/distinfo
cvs rdiff -u -r1.5 -r1.6 pkgsrc/devel/glib2/patches/patch-gio_gunixmounts.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/devel/glib2/Makefile
diff -u pkgsrc/devel/glib2/Makefile:1.283 pkgsrc/devel/glib2/Makefile:1.284
--- pkgsrc/devel/glib2/Makefile:1.283 Mon Sep 13 07:14:50 2021
+++ pkgsrc/devel/glib2/Makefile Sat Sep 18 13:19:26 2021
@@ -1,7 +1,9 @@
-# $NetBSD: Makefile,v 1.283 2021/09/13 07:14:50 adam Exp $
+# $NetBSD: Makefile,v 1.284 2021/09/18 13:19:26 wiz Exp $
.include "Makefile.common"
+PKGREVISION= 1
+
CATEGORIES= devel gnome
COMMENT= Some useful routines for C programming (glib2)
Index: pkgsrc/devel/glib2/distinfo
diff -u pkgsrc/devel/glib2/distinfo:1.289 pkgsrc/devel/glib2/distinfo:1.290
--- pkgsrc/devel/glib2/distinfo:1.289 Mon Sep 13 07:14:50 2021
+++ pkgsrc/devel/glib2/distinfo Sat Sep 18 13:19:26 2021
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.289 2021/09/13 07:14:50 adam Exp $
+$NetBSD: distinfo,v 1.290 2021/09/18 13:19:26 wiz Exp $
SHA1 (glib-2.68.4.tar.xz) = bfebd4a5074715962177e8712cec630219f58786
RMD160 (glib-2.68.4.tar.xz) = cf4d834a0e8f5e77ba39d627290ac0263ba0f177
@@ -10,7 +10,7 @@ SHA1 (patch-gio_giomodule.c) = d704699b2
SHA1 (patch-gio_glib-compile-schemas.c) = 4fc8e8ba62bef01762007ebf21569053374808d0
SHA1 (patch-gio_gresource-tool.c) = ad0e59f48f5f98ea66be568dbe2e5a5d1ac602fc
SHA1 (patch-gio_gunixcredentialsmessage.c) = c13119ddd6262db7c03e53857e987f0c495d3312
-SHA1 (patch-gio_gunixmounts.c) = 13af07fffe898457edd0d8db4296a60fccba913d
+SHA1 (patch-gio_gunixmounts.c) = 6213fb2d4cb52af0ebbe794832e37dd3de9fd27f
SHA1 (patch-gio_inotify_inotify-kernel.c) = 78544b4c32ef3b44e8721b1c07407f46a9e8c8a4
SHA1 (patch-gio_meson.build) = c2bda4943f8580706ec45760604ed1bdf63d1c6f
SHA1 (patch-gio_tests_gdbus-export.c) = 59d85ca079d02b52e33153c7d2ac1cc48c26707a
Index: pkgsrc/devel/glib2/patches/patch-gio_gunixmounts.c
diff -u pkgsrc/devel/glib2/patches/patch-gio_gunixmounts.c:1.5 pkgsrc/devel/glib2/patches/patch-gio_gunixmounts.c:1.6
--- pkgsrc/devel/glib2/patches/patch-gio_gunixmounts.c:1.5 Thu Jun 6 11:05:12 2019
+++ pkgsrc/devel/glib2/patches/patch-gio_gunixmounts.c Sat Sep 18 13:19:26 2021
@@ -1,12 +1,17 @@
-$NetBSD: patch-gio_gunixmounts.c,v 1.5 2019/06/06 11:05:12 adam Exp $
+$NetBSD: patch-gio_gunixmounts.c,v 1.6 2021/09/18 13:19:26 wiz Exp $
SunOS has sys/mntent.h but no mnt_opts.
XXX who else uses the sys/mntent.h case?
https://gitlab.gnome.org/GNOME/glib/merge_requests/890
---- gio/gunixmounts.c.orig 2019-05-03 13:43:28.000000000 +0000
+getfsent does not support multiple threads, so use lock around its
+use.
+https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=250311
+https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1717
+
+--- gio/gunixmounts.c.orig 2021-08-19 15:27:25.722339900 +0000
+++ gio/gunixmounts.c
-@@ -736,7 +736,7 @@ _g_get_unix_mounts (void)
+@@ -743,7 +743,7 @@ _g_get_unix_mounts (void)
mntent.mnt_mountp,
NULL,
mntent.mnt_fstype,
@@ -15,3 +20,42 @@ https://gitlab.gnome.org/GNOME/glib/merg
is_read_only);
return_list = g_list_prepend (return_list, mount_entry);
+@@ -1406,6 +1406,8 @@ _g_get_unix_mount_points (void)
+
+ #elif (defined(HAVE_GETVFSSTAT) || defined(HAVE_GETFSSTAT)) && defined(HAVE_FSTAB_H) && defined(HAVE_SYS_MOUNT_H)
+
++G_LOCK_DEFINE_STATIC(getfsent);
++
+ static GList *
+ _g_get_unix_mount_points (void)
+ {
+@@ -1417,9 +1419,6 @@ _g_get_unix_mount_points (void)
+ struct stat sb;
+ #endif
+
+- if (!setfsent ())
+- return NULL;
+-
+ return_list = NULL;
+
+ #ifdef HAVE_SYS_SYSCTL_H
+@@ -1450,6 +1449,11 @@ _g_get_unix_mount_points (void)
+ #endif
+ #endif
+
++ G_LOCK (getfsent);
++ if (!setfsent ()) {
++ G_UNLOCK (getfsent);
++ return NULL;
++ }
+ while ((fstab = getfsent ()) != NULL)
+ {
+ gboolean is_read_only = FALSE;
+@@ -1485,6 +1489,7 @@ _g_get_unix_mount_points (void)
+ }
+
+ endfsent ();
++ G_UNLOCK (getfsent);
+
+ return g_list_reverse (return_list);
+ }
Home |
Main Index |
Thread Index |
Old Index