added a biarch common gnome-vfs package; source renamed from libgnome-vfs [release 2.24.4-6mamba;Thu Jan 05 2023]

This commit is contained in:
Silvan Calarco 2024-01-05 23:15:52 +01:00
parent 572405f9c4
commit ae810d02b8
5 changed files with 1197 additions and 0 deletions

View File

@ -1,2 +1,5 @@
# gnome-vfs
The gnome-vfs package contains virtual file system libraries.
This is used as one of the foundations of the Nautilus file manager.

241
gnome-vfs.spec Normal file
View File

@ -0,0 +1,241 @@
%define majver %(echo %gnomever | cut -d. -f 1-2)
%define with_fam 1
Name: gnome-vfs
Version: 2.24.4
Release: 6mamba
Summary: The GNOME virtual file-system libraries
Group: System/Libraries
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://www.gnome.org/
Source: https://download.gnome.org/sources/gnome-vfs/%{majver}/gnome-vfs-%{version}.tar.bz2
Patch0: libgnome-vfs-2.24.4-glib-2.48.patch
Patch1: libgnome-vfs-2.24.4-gcc-6.1.0.patch
Patch2: libgnome-vfs-2.24.4-openssl-1.1.patch
License: LGPL
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libGConf-devel
BuildRequires: libORBit2-devel
BuildRequires: libacl-devel
BuildRequires: libattr-devel
BuildRequires: libavahi-devel
BuildRequires: libavahi-glib-devel
BuildRequires: libbzip2-devel
BuildRequires: libdbus-devel
BuildRequires: libdbus-glib-devel
BuildRequires: libe2fs-devel
BuildRequires: libgamin-devel
BuildRequires: libglib-devel
BuildRequires: libkrb5-devel
BuildRequires: libopenssl-devel
BuildRequires: libselinux-devel
BuildRequires: libsystemd-devel
BuildRequires: libxml2-devel
BuildRequires: libz-devel
## AUTOBUILDREQ-END
BuildRequires: libgnutls-devel
BuildRequires: pkgconfig
BuildRequires: cdparanoia-III-devel
BuildRequires: gettext-devel
BuildRequires: perl-XML-Parser
BuildRequires: libneon-devel
BuildRequires: intltool
BuildRequires: gnome-mime-data
Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
Requires: libbonobo
Requires: gconf
Requires: gnome-mime-data
# FIXME:
# Howl support: no
# Enable profiler: no
#
# NOTE:
# Gnome-vfs depends on FAM to provide notification when files are altered
# (either through filesystem polling, or a kernel notification mechanism).
# Particularly if you are a distributor please compile Nautilus with FAM support.
%description
The gnome-vfs package contains virtual file system libraries.
This is used as one of the foundations of the Nautilus file manager.
%package -n lib%{name}
Summary: Libraries provided with %{name}
Group: System/Libraries
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
%description -n lib%{name}
The gnome-vfs package contains virtual file system libraries.
This is used as one of the foundations of the Nautilus file manager.
This package contains the shared libraries provide with %{name}.
%package -n lib%{name}-devel
Summary: Devel package for %{name}
Group: Development/Libraries
Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
%description -n lib%{name}-devel
The gnome-vfs package contains virtual file system libraries.
This is used as one of the foundations of the Nautilus file manager.
This package contains static libraries and header files needed for development.
%package apidocs
Summary: %{name} API documentation
Group: Documentation
Requires: gtk-doc
%description apidocs
%{name} API documentation.
%debug_package
%prep
%setup -q
sed -i "s,| arm-\* |,| aarch64-\* | arm-\* |," config.sub
%patch0 -p0
%patch1 -p1
%patch2 -p0
%build
%configure \
--libexecdir=%{_sbindir} \
%if %with_fam
--enable-fam \
%else
--disable-fam \
%endif
--disable-cdda \
--enable-avahi \
--enable-ipv6 \
--disable-hal
## --enable-gtk-doc \
## --enable-gnutls
## --enable-howl
%make
%install
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
%makeinstall
%{find_lang} %{name}-2.0
%clean
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
%post -n lib%{name} -p /sbin/ldconfig
%postun -n lib%{name} -p /sbin/ldconfig
%files -f %{name}-2.0.lang
%defattr(-,root,root)
%{_bindir}/*
%{_sbindir}/gnome-vfs-daemon
%{_sysconfdir}/gconf/schemas/*
%dir %{_sysconfdir}/gnome-vfs-?.*
%{_sysconfdir}/gnome-vfs-?.*/*
%{_datadir}/dbus-1/services/gnome-vfs-daemon.service
%doc AUTHORS COPYING*
%files -n lib%{name}
%defattr(-,root,root)
%{_libdir}/libgnomevfs-?.so.*
%dir %{_libdir}/gnome-vfs-?.*
%{_libdir}/gnome-vfs-?.*/*
%files -n lib%{name}-devel
%defattr(-,root,root)
%dir %{_includedir}/gnome-vfs-?.*
%{_includedir}/gnome-vfs-?.*/*
%dir %{_includedir}/gnome-vfs-module-?.*
%{_includedir}/gnome-vfs-module-?.*/*
%{_libdir}/pkgconfig/*.pc
%{_libdir}/*.a
%{_libdir}/*.so
%doc ChangeLog HACKING TODO
%doc NEWS README
%files apidocs
%defattr(-,root,root)
%dir %{_datadir}/gtk-doc/html/gnome-vfs-?.*
%{_datadir}/gtk-doc/html/gnome-vfs-?.*/*
%changelog
* Thu Jan 05 2023 Silvan Calarco <silvan.calarco@mambasoft.it> 2.24.4-6mamba
- added a biarch common gnome-vfs package; source renamed from libgnome-vfs
* Mon Apr 20 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 2.24.4-5mamba
- rebuilt with debug package; added patch to build against openssl >= 1.1
* Tue Jun 14 2016 Silvan Calarco <silvan.calarco@mambasoft.it> 2.24.4-4mamba
- rebuilt with libffi 3.2.1
* Sun Sep 04 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 2.24.4-3mamba
- rebuilt without hal
* Sat May 21 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 2.24.4-2mamba
- don't set sysconfdir as %{_sysconfdir}/gnome, use default for gconf
* Wed Oct 06 2010 Automatic Build System <autodist@mambasoft.it> 2.24.4-1mamba
- automatic update to 2.24.4 by autodist
* Thu Jul 15 2010 Silvan Calarco <silvan.calarco@mambasoft.it> 2.24.3-2mamba
- rebuilt to add pkgconfig provides
* Tue May 11 2010 Automatic Build System <autodist@mambasoft.it> 2.24.3-1mamba
- automatic update to 2.24.3 by autodist
* Mon May 10 2010 Automatic Build System <autodist@mambasoft.it> 2.24.1-2mamba
- automatic rebuild by autodist
* Thu Jul 16 2009 Automatic Build System <autodist@mambasoft.it> 2.24.1-1mamba
- automatic update by autodist
* Mon Mar 09 2009 Silvan Calarco <silvan.calarco@mambasoft.it> 2.24.0-2mamba
- rebuilt
* Fri Oct 03 2008 gil <puntogil@libero.it> 2.24.0-1mamba
- update to 2.24.0
* Wed Dec 26 2007 Silvan Calarco <silvan.calarco@mambasoft.it> 2.20.1-1mamba
- update to 2.20.1
* Sat Apr 28 2007 Tiziano Pratellesi <tiziano.pratellesi@openmamba.org> 2.18.0.1-1mamba
- update to version 2.18.0.1
* Fri Jan 05 2007 Davide Madrisan <davide.madrisan@qilinux.it> 2.16.3-2qilnx
- new subpackage apidocs with API documentation
- dropped patch against CAN-2005-0706 (merged upstream)
* Fri Jan 05 2007 Davide Madrisan <davide.madrisan@qilinux.it> 2.16.3-1qilnx
- update to version 2.16.3 by autospec
- added missing build requirements for dbus-glib, selinux, and libneon
* Tue Aug 09 2005 Silvan Calarco <silvan.calarco@mambasoft.it> 2.11.90-1qilnx
- update to version 2.11.90 by autospec
* Tue Aug 09 2005 Silvan Calarco <silvan.calarco@mambasoft.it> 2.10.1-1qilnx
- update to version 2.10.1 by autospec
* Thu Jun 09 2005 Davide Madrisan <davide.madrisan@qilinux.it> 2.8.4-2qilnx
- security fix QSA-2005-073 (CAN-2005-0706)
* Thu Apr 21 2005 Davide Madrisan <davide.madrisan@qilinux.it> 2.8.4-1qilnx
- update to version 2.8.4 by autospec
- added missing build requirements
* Fri Dec 24 2004 Davide Madrisan <davide.madrisan@qilinux.it> 2.8.3-2qilnx
- rebuild with new libe2fs-devel, libkrb5-devel packages
* Fri Dec 17 2004 Silvan Calarco <silvan.calarco@mambasoft.it> 2.8.3-1qilnx
- update to version 2.8.3 by autospec
* Thu Jul 22 2004 Silvan Calarco <silvan.calarco@qinet.it> 2.6.1.1-1qilnx
- new version build
* Thu Jul 24 2003 Silvan Calarco <silvan.calarco@qinet.it> 2.3.5-1qilnx
- first build for libgnome-vfs

View File

@ -0,0 +1,92 @@
diff -ru gnome-vfs-2.24.4.orig/libgnomevfs/gnome-vfs-ace.c gnome-vfs-2.24.4/libgnomevfs/gnome-vfs-ace.c
--- gnome-vfs-2.24.4.orig/libgnomevfs/gnome-vfs-ace.c 2010-02-09 13:16:14.000000000 +0100
+++ gnome-vfs-2.24.4/libgnomevfs/gnome-vfs-ace.c 2016-06-14 11:53:58.636210153 +0200
@@ -523,7 +523,7 @@
for (i=0; i<permset->count; i++) {
if (permset->perms[i] == perm) {
- g_memmove (&permset->perms[i], &permset->perms[i+1], permset->count - i);
+ memmove (&permset->perms[i], &permset->perms[i+1], permset->count - i);
permset->count--;
break;
}
diff -ru gnome-vfs-2.24.4.orig/libgnomevfs/gnome-vfs-resolve.c gnome-vfs-2.24.4/libgnomevfs/gnome-vfs-resolve.c
--- gnome-vfs-2.24.4.orig/libgnomevfs/gnome-vfs-resolve.c 2016-06-14 11:31:08.344917220 +0200
+++ gnome-vfs-2.24.4/libgnomevfs/gnome-vfs-resolve.c 2016-06-14 11:54:07.141225102 +0200
@@ -115,7 +115,7 @@
*handle = NULL;
for (iter = he->h_addr_list; *iter != NULL; iter++) {
- g_memmove (aptr, *iter, he->h_length);
+ memmove (aptr, *iter, he->h_length);
addr = gnome_vfs_address_new_from_sockaddr (sa, addrlen);
if (addr != NULL)
diff -ru gnome-vfs-2.24.4.orig/modules/nntp-method.c gnome-vfs-2.24.4/modules/nntp-method.c
--- gnome-vfs-2.24.4.orig/modules/nntp-method.c 2010-02-09 13:16:14.000000000 +0100
+++ gnome-vfs-2.24.4/modules/nntp-method.c 2016-06-14 11:54:14.032237258 +0200
@@ -587,7 +587,7 @@
segment_size = right_ptr - left_ptr;
if (all_numbers_or_spaces(left_ptr, right_ptr) && segment_size > 1) {
length_to_end = strlen(right_ptr + 1) + 1;
- g_memmove(left_ptr, right_ptr + 1, length_to_end);
+ memmove(left_ptr, right_ptr + 1, length_to_end);
} else {
left_ptr = right_ptr;
}
@@ -680,7 +680,7 @@
if (found_number) {
length_to_end = strlen(right_ptr);
if (length_to_end > 0) {
- g_memmove(left_ptr + 1, right_ptr, length_to_end + 1);
+ memmove(left_ptr + 1, right_ptr, length_to_end + 1);
} else {
left_ptr += 1;
*left_ptr = '\0';
@@ -715,7 +715,7 @@
right_ptr = strchr(left_ptr, ']');
if (right_ptr != NULL && right_ptr > left_ptr) {
length_to_end = strlen(right_ptr + 1) + 1;
- g_memmove(left_ptr, right_ptr + 1, length_to_end);
+ memmove(left_ptr, right_ptr + 1, length_to_end);
}
}
@@ -757,7 +757,7 @@
ptr = source_str;
while (*ptr != '\0') {
if (*ptr == ',') {
- g_memmove(ptr, ptr+1, strlen(ptr));
+ memmove(ptr, ptr+1, strlen(ptr));
} else {
ptr += 1;
}
@@ -1267,7 +1267,7 @@
line_len = conn->buffer_size - buffer_offset;
}
dest_ptr = (char*) conn->buffer + buffer_offset;
- g_memmove(dest_ptr, line, line_len);
+ memmove(dest_ptr, line, line_len);
if (conn->uu_decode_mode) {
line_len = uu_decode_text(dest_ptr, line_len);
buffer_offset += line_len;
@@ -1354,7 +1354,7 @@
size_to_move = bytes_to_read;
}
/* move the bytes from the buffer */
- g_memmove(destination_buffer, ((char*) connection->buffer) + connection->buffer_offset, size_to_move);
+ memmove(destination_buffer, ((char*) connection->buffer) + connection->buffer_offset, size_to_move);
/* update the counts */
connection->buffer_offset += size_to_move;
--- gnome-vfs-2.24.4/libgnomevfs/gnome-vfs-job.c.orig 2016-06-14 12:00:09.193906330 +0200
+++ gnome-vfs-2.24.4/libgnomevfs/gnome-vfs-job.c 2016-06-14 12:00:17.375922517 +0200
@@ -851,7 +851,7 @@
if (written_bytes_in_buffer > 0) {
/* Need to shift the unwritten bytes
to the start of the buffer */
- g_memmove(buffer,
+ memmove(buffer,
(char *) buffer + written_bytes_in_buffer,
filled_bytes_in_buffer - written_bytes_in_buffer);
filled_bytes_in_buffer =

View File

@ -0,0 +1,835 @@
--- daemon/daemon-connection.c.orig 2010-02-09 13:16:14.000000000 +0100
+++ daemon/daemon-connection.c 2013-05-06 23:42:57.000000000 +0200
@@ -67,14 +67,14 @@
gint32 id;
} FileHandle;
-static GStaticMutex cancellations_lock = G_STATIC_MUTEX_INIT;
+static GMutex cancellations_lock;
static GHashTable *cancellations;
-static GStaticMutex directory_handles_lock = G_STATIC_MUTEX_INIT;
+static GMutex directory_handles_lock;
static GHashTable *directory_handles;
static guint next_directory_id = 1;
-static GStaticMutex file_handles_lock = G_STATIC_MUTEX_INIT;
+static GMutex file_handles_lock;
static GHashTable *file_handles;
static guint next_file_id = 1;
@@ -239,21 +239,21 @@
}
dbus_connection_unref (conn->conn);
- g_static_mutex_lock (&directory_handles_lock);
+ g_mutex_lock (&directory_handles_lock);
if (directory_handles) {
g_hash_table_foreach_remove (directory_handles,
directory_handle_last_conn_is,
conn);
}
- g_static_mutex_unlock (&directory_handles_lock);
+ g_mutex_unlock (&directory_handles_lock);
- g_static_mutex_lock (&file_handles_lock);
+ g_mutex_lock (&file_handles_lock);
if (file_handles) {
g_hash_table_foreach_remove (file_handles,
file_handle_last_conn_is,
conn);
}
- g_static_mutex_unlock (&file_handles_lock);
+ g_mutex_unlock (&file_handles_lock);
g_assert (!g_main_loop_is_running (conn->main_loop));
@@ -320,14 +320,14 @@
handle = cancellation_handle_new (id, conn->conn_id);
- g_static_mutex_lock (&cancellations_lock);
+ g_mutex_lock (&cancellations_lock);
if (cancellations == NULL) {
cancellations = g_hash_table_new_full (cancellation_handle_hash, cancellation_handle_equal,
NULL, (GDestroyNotify) cancellation_handle_free);
}
g_hash_table_insert (cancellations, handle, handle);
- g_static_mutex_unlock (&cancellations_lock);
+ g_mutex_unlock (&cancellations_lock);
return handle;
}
@@ -338,11 +338,11 @@
{
d(g_print ("Removing cancellation handle %d\n", handle->id));
- g_static_mutex_lock (&cancellations_lock);
+ g_mutex_lock (&cancellations_lock);
if (!g_hash_table_remove (cancellations, handle)) {
g_warning ("Could't remove cancellation.");
}
- g_static_mutex_unlock (&cancellations_lock);
+ g_mutex_unlock (&cancellations_lock);
}
/* Note: This is called from the main thread. */
@@ -354,7 +354,7 @@
handle = NULL;
- g_static_mutex_lock (&cancellations_lock);
+ g_mutex_lock (&cancellations_lock);
lookup.conn_id = conn_id;
lookup.id = cancellation_id;
@@ -368,7 +368,7 @@
}
}
- g_static_mutex_unlock (&cancellations_lock);
+ g_mutex_unlock (&cancellations_lock);
}
@@ -408,7 +408,7 @@
{
DirectoryHandle *handle;
- g_static_mutex_lock (&directory_handles_lock);
+ g_mutex_lock (&directory_handles_lock);
handle = directory_handle_new (conn, vfs_handle, next_directory_id++);
if (directory_handles == NULL) {
@@ -418,7 +418,7 @@
g_hash_table_insert (directory_handles,
GINT_TO_POINTER (handle->id), handle);
- g_static_mutex_unlock (&directory_handles_lock);
+ g_mutex_unlock (&directory_handles_lock);
return handle;
}
@@ -426,13 +426,13 @@
static void
remove_directory_handle (DirectoryHandle *handle)
{
- g_static_mutex_lock (&directory_handles_lock);
+ g_mutex_lock (&directory_handles_lock);
if (!g_hash_table_remove (directory_handles,
GINT_TO_POINTER (handle->id))) {
g_warning ("Couldn't remove directory handle %d\n",
handle->id);
}
- g_static_mutex_unlock (&directory_handles_lock);
+ g_mutex_unlock (&directory_handles_lock);
}
static DirectoryHandle *
@@ -441,13 +441,13 @@
{
DirectoryHandle *handle;
- g_static_mutex_lock (&directory_handles_lock);
+ g_mutex_lock (&directory_handles_lock);
handle = g_hash_table_lookup (directory_handles,
GINT_TO_POINTER (id));
if (handle) {
handle->last_connection = conn;
}
- g_static_mutex_unlock (&directory_handles_lock);
+ g_mutex_unlock (&directory_handles_lock);
return handle;
}
@@ -487,7 +487,7 @@
{
FileHandle *handle;
- g_static_mutex_lock (&file_handles_lock);
+ g_mutex_lock (&file_handles_lock);
handle = file_handle_new (conn, vfs_handle, next_file_id++);
if (file_handles == NULL) {
@@ -497,7 +497,7 @@
g_hash_table_insert (file_handles,
GINT_TO_POINTER (handle->id), handle);
- g_static_mutex_unlock (&file_handles_lock);
+ g_mutex_unlock (&file_handles_lock);
return handle;
}
@@ -505,12 +505,12 @@
static void
remove_file_handle (FileHandle *handle)
{
- g_static_mutex_lock (&file_handles_lock);
+ g_mutex_lock (&file_handles_lock);
if (!g_hash_table_remove (file_handles,
GINT_TO_POINTER (handle->id))) {
g_warning ("Couldn't remove file handle %d\n", handle->id);
}
- g_static_mutex_unlock (&file_handles_lock);
+ g_mutex_unlock (&file_handles_lock);
}
static FileHandle *
@@ -519,13 +519,13 @@
{
FileHandle *handle;
- g_static_mutex_lock (&file_handles_lock);
+ g_mutex_lock (&file_handles_lock);
handle = g_hash_table_lookup (file_handles,
GINT_TO_POINTER (id));
if (handle) {
handle->last_connection = conn;
}
- g_static_mutex_unlock (&file_handles_lock);
+ g_mutex_unlock (&file_handles_lock);
return handle;
}
--- libgnomevfs/gnome-vfs-async-job-map.c.orig 2010-02-09 13:16:14.000000000 +0100
+++ libgnomevfs/gnome-vfs-async-job-map.c 2013-05-06 23:43:56.000000000 +0200
@@ -27,14 +27,14 @@
#include <glib.h>
/* job map bits guarded by this lock */
-static GStaticRecMutex async_job_map_lock = G_STATIC_REC_MUTEX_INIT;
+static GRecMutex async_job_map_lock;
static guint async_job_map_next_id;
static int async_job_map_locked = 0;
static gboolean async_job_map_shutting_down;
static GHashTable *async_job_map;
/* callback map bits guarded by this lock */
-static GStaticMutex async_job_callback_map_lock = G_STATIC_MUTEX_INIT;
+static GMutex async_job_callback_map_lock;
static GHashTable *async_job_callback_map;
static guint async_job_callback_map_next_id;
@@ -161,7 +161,7 @@
void
_gnome_vfs_async_job_map_lock (void)
{
- g_static_rec_mutex_lock (&async_job_map_lock);
+ g_rec_mutex_lock (&async_job_map_lock);
async_job_map_locked++;
}
@@ -169,7 +169,7 @@
_gnome_vfs_async_job_map_unlock (void)
{
async_job_map_locked--;
- g_static_rec_mutex_unlock (&async_job_map_lock);
+ g_rec_mutex_unlock (&async_job_map_lock);
}
void
@@ -185,7 +185,7 @@
{
GnomeVFSNotifyResult *notify_result;
- g_static_mutex_lock (&async_job_callback_map_lock);
+ g_mutex_lock (&async_job_callback_map_lock);
if (async_job_callback_map == NULL) {
g_assert (async_job_map_shutting_down);
@@ -199,7 +199,7 @@
*valid = notify_result != NULL;
*cancelled = notify_result != NULL && notify_result->cancelled;
- g_static_mutex_unlock (&async_job_callback_map_lock);
+ g_mutex_unlock (&async_job_callback_map_lock);
}
gboolean
@@ -207,7 +207,7 @@
{
gboolean cancelled;
- g_static_mutex_lock (&async_job_callback_map_lock);
+ g_mutex_lock (&async_job_callback_map_lock);
g_assert (!async_job_map_shutting_down);
@@ -232,7 +232,7 @@
g_hash_table_insert (async_job_callback_map, GUINT_TO_POINTER (notify_result->callback_id),
notify_result);
}
- g_static_mutex_unlock (&async_job_callback_map_lock);
+ g_mutex_unlock (&async_job_callback_map_lock);
return !cancelled;
}
@@ -243,11 +243,11 @@
g_assert (async_job_callback_map != NULL);
JOB_DEBUG (("removing callback %d ", callback_id));
- g_static_mutex_lock (&async_job_callback_map_lock);
+ g_mutex_lock (&async_job_callback_map_lock);
g_hash_table_remove (async_job_callback_map, GUINT_TO_POINTER (callback_id));
- g_static_mutex_unlock (&async_job_callback_map_lock);
+ g_mutex_unlock (&async_job_callback_map_lock);
}
static void
@@ -268,7 +268,7 @@
void
_gnome_vfs_async_job_cancel_job_and_callbacks (GnomeVFSAsyncHandle *job_handle, GnomeVFSJob *job)
{
- g_static_mutex_lock (&async_job_callback_map_lock);
+ g_mutex_lock (&async_job_callback_map_lock);
if (job != NULL) {
job->cancelled = TRUE;
@@ -282,18 +282,18 @@
callback_map_cancel_one, job_handle);
}
- g_static_mutex_unlock (&async_job_callback_map_lock);
+ g_mutex_unlock (&async_job_callback_map_lock);
}
void
async_job_callback_map_destroy (void)
{
- g_static_mutex_lock (&async_job_callback_map_lock);
+ g_mutex_lock (&async_job_callback_map_lock);
if (async_job_callback_map) {
g_hash_table_destroy (async_job_callback_map);
async_job_callback_map = NULL;
}
- g_static_mutex_unlock (&async_job_callback_map_lock);
+ g_mutex_unlock (&async_job_callback_map_lock);
}
--- libgnomevfs/gnome-vfs-daemon-method.c.orig 2010-02-09 13:16:14.000000000 +0100
+++ libgnomevfs/gnome-vfs-daemon-method.c 2013-05-07 00:20:38.000000000 +0200
@@ -81,8 +81,17 @@
static DBusHandlerResult connection_message_func (DBusConnection *conn,
DBusMessage *message,
gpointer data);
+static void
+destroy_private_connection (gpointer data)
+{
+ LocalConnection *ret = data;
+
+ dbus_connection_close (ret->connection);
+ dbus_connection_unref (ret->connection);
+ g_free (ret);
+}
-static GStaticPrivate local_connection_private = G_STATIC_PRIVATE_INIT;
+static GPrivate local_connection_private = G_PRIVATE_INIT (destroy_private_connection);
static DBusObjectPathVTable connection_vtable = {
@@ -343,20 +352,11 @@
gchar *sender;
} CancellationRequest;
-static void
-destroy_private_connection (gpointer data)
-{
- LocalConnection *ret = data;
-
- dbus_connection_close (ret->connection);
- dbus_connection_unref (ret->connection);
- g_free (ret);
-}
static void
private_connection_died (LocalConnection *connection)
{
- g_static_private_set (&local_connection_private, NULL, NULL);
+ g_private_set (&local_connection_private, NULL);
}
static LocalConnection *
@@ -370,7 +370,7 @@
dbus_int32_t conn_id;
LocalConnection *ret;
- ret = g_static_private_get (&local_connection_private);
+ ret = g_private_get (&local_connection_private);
if (ret != NULL) {
return ret;
}
@@ -438,8 +438,8 @@
ret->conn_id = conn_id;
ret->handle = 0;
- g_static_private_set (&local_connection_private,
- ret, destroy_private_connection);
+ g_private_set (&local_connection_private,
+ ret);
return ret;
}
--- libgnomevfs/gnome-vfs-dbus-utils.c.orig 2010-02-09 13:16:14.000000000 +0100
+++ libgnomevfs/gnome-vfs-dbus-utils.c 2013-05-07 00:22:19.000000000 +0200
@@ -187,16 +187,16 @@
return main_dbus;
}
-static GStaticPrivate daemon_connection_private = G_STATIC_PRIVATE_INIT;
+static GPrivate daemon_connection_private;
DBusConnection *
_gnome_vfs_daemon_get_current_connection (void)
{
- return g_static_private_get (&daemon_connection_private);
+ return g_private_get (&daemon_connection_private);
}
void
gnome_vfs_daemon_set_current_connection (DBusConnection *conn)
{
- g_static_private_set (&daemon_connection_private, conn, NULL);
+ g_private_set (&daemon_connection_private, conn);
}
--- libgnomevfs/gnome-vfs-file-info.c.orig 2010-02-09 13:16:14.000000000 +0100
+++ libgnomevfs/gnome-vfs-file-info.c 2013-05-06 23:47:46.000000000 +0200
@@ -31,7 +31,7 @@
/* Mutex for making GnomeVFSFileInfo ref's/unref's atomic */
/* Note that an atomic increment function (such as is present in NSPR) is preferable */
/* FIXME: This mutex is probably not needed and might be causing performance issues */
-static GStaticMutex file_info_ref_lock = G_STATIC_MUTEX_INIT;
+static GMutex file_info_ref_lock;
/* Register GnomeVFSFileInfo in the type system */
GType
@@ -83,9 +83,9 @@
g_return_if_fail (info != NULL);
g_return_if_fail (info->refcount > 0);
- g_static_mutex_lock (&file_info_ref_lock);
+ g_mutex_lock (&file_info_ref_lock);
info->refcount += 1;
- g_static_mutex_unlock (&file_info_ref_lock);
+ g_mutex_unlock (&file_info_ref_lock);
}
@@ -101,9 +101,9 @@
g_return_if_fail (info != NULL);
g_return_if_fail (info->refcount > 0);
- g_static_mutex_lock (&file_info_ref_lock);
+ g_mutex_lock (&file_info_ref_lock);
info->refcount -= 1;
- g_static_mutex_unlock (&file_info_ref_lock);
+ g_mutex_unlock (&file_info_ref_lock);
if (info->refcount == 0) {
gnome_vfs_file_info_clear (info);
@@ -133,13 +133,13 @@
g_free (info->selinux_context);
/* Ensure the ref count is maintained correctly */
- g_static_mutex_lock (&file_info_ref_lock);
+ g_mutex_lock (&file_info_ref_lock);
old_refcount = info->refcount;
memset (info, 0, sizeof (*info));
info->refcount = old_refcount;
- g_static_mutex_unlock (&file_info_ref_lock);
+ g_mutex_unlock (&file_info_ref_lock);
}
@@ -182,7 +182,7 @@
* want serialize access differently (or perhaps you shouldn't
* use copy)
*/
- g_static_mutex_lock (&file_info_ref_lock);
+ g_mutex_lock (&file_info_ref_lock);
old_refcount = dest->refcount;
@@ -199,7 +199,7 @@
dest->refcount = old_refcount;
- g_static_mutex_unlock (&file_info_ref_lock);
+ g_mutex_unlock (&file_info_ref_lock);
}
--- libgnomevfs/gnome-vfs-init.c.orig 2010-07-01 17:36:09.000000000 +0200
+++ libgnomevfs/gnome-vfs-init.c 2013-05-07 11:50:18.000000000 +0200
@@ -122,8 +122,6 @@
return FALSE;
}
- if (!g_thread_supported ())
- g_thread_init (NULL);
G_LOCK (vfs_already_initialized);
@@ -235,9 +233,5 @@
gboolean
gnome_vfs_is_primary_thread (void)
{
- if (g_thread_supported()) {
- return GPOINTER_TO_UINT(g_private_get (private_is_primary_thread)) == 1;
- } else {
- return TRUE;
- }
+ return GPOINTER_TO_UINT(g_private_get (private_is_primary_thread)) == 1;
}
--- libgnomevfs/gnome-vfs-job.c.orig 2010-02-09 13:16:14.000000000 +0100
+++ libgnomevfs/gnome-vfs-job.c 2013-05-07 00:23:25.000000000 +0200
@@ -43,7 +43,7 @@
#include <string.h>
#include <unistd.h>
-static GStaticPrivate job_private = G_STATIC_PRIVATE_INIT;
+static GPrivate job_private;
#if GNOME_VFS_JOB_DEBUG
@@ -64,7 +64,7 @@
* Since this id debug only, just use what the macro should be here.
* even though it is not portable.
*/
-GStaticMutex debug_mutex = G_STATIC_MUTEX_INIT;
+GMutex debug_mutex;
#endif
static int job_count = 0;
@@ -1734,9 +1734,9 @@
set_current_job (GnomeVFSJob *job)
{
/* There shouldn't have been anything here. */
- g_assert (g_static_private_get (&job_private) == NULL);
+ g_assert (g_private_get (&job_private) == NULL);
- g_static_private_set (&job_private, job, NULL);
+ g_private_set (&job_private, job);
_gnome_vfs_module_callback_use_stack_info (job->op->stack_info);
_gnome_vfs_module_callback_set_in_async_thread (TRUE);
@@ -1745,7 +1745,7 @@
static void
clear_current_job (void)
{
- g_static_private_set (&job_private, NULL, NULL);
+ g_private_set (&job_private, NULL);
_gnome_vfs_module_callback_clear_stacks ();
}
@@ -1757,7 +1757,7 @@
g_return_if_fail (context != NULL);
- job = g_static_private_get (&job_private);
+ job = g_private_get (&job_private);
if (job != NULL) {
*context = job->op->context;
@@ -1777,7 +1777,7 @@
GnomeVFSJob *job;
GnomeVFSNotifyResult notify_result;
- job = g_static_private_get (&job_private);
+ job = g_private_get (&job_private);
g_return_if_fail (job != NULL);
--- libgnomevfs/gnome-vfs-method.c.orig 2010-02-09 13:16:14.000000000 +0100
+++ libgnomevfs/gnome-vfs-method.c 2013-05-06 23:50:29.000000000 +0200
@@ -63,7 +63,7 @@
static GHashTable *module_hash = NULL;
G_LOCK_DEFINE_STATIC (gnome_vfs_method_init);
-static GStaticRecMutex module_hash_lock = G_STATIC_REC_MUTEX_INIT;
+static GRecMutex module_hash_lock;
static GList *module_path_list = NULL;
@@ -343,7 +343,7 @@
const char *args;
gboolean run_in_daemon;
- g_static_rec_mutex_lock (&module_hash_lock);
+ g_rec_mutex_lock (&module_hash_lock);
module_element = g_hash_table_lookup (module_hash, name);
@@ -408,7 +408,7 @@
g_hash_table_insert (module_hash, module_element->name, module_element);
add_module_out:
- g_static_rec_mutex_unlock (&module_hash_lock);
+ g_rec_mutex_unlock (&module_hash_lock);
return module_element;
}
--- libgnomevfs/gnome-vfs-module-callback.c.orig 2010-02-09 13:16:14.000000000 +0100
+++ libgnomevfs/gnome-vfs-module-callback.c 2013-05-07 00:10:11.000000000 +0200
@@ -59,7 +59,7 @@
/* -- Global variables -- */
-static GStaticMutex callback_table_lock = G_STATIC_MUTEX_INIT;
+static GMutex callback_table_lock;
static GHashTable *default_callbacks = NULL;
static GHashTable *default_async_callbacks = NULL;
static GHashTable *stack_tables_to_free = NULL;
@@ -69,7 +69,7 @@
static GPrivate *in_async_thread_key;
static GCond *async_callback_cond;
-static GStaticMutex async_callback_lock = G_STATIC_MUTEX_INIT;
+static GMutex async_callback_lock;
/* -- Helper functions -- */
@@ -120,12 +120,12 @@
{
CallbackResponseData *response_data;
- g_static_mutex_lock (&async_callback_lock);
+ g_mutex_lock (&async_callback_lock);
response_data = data;
response_data->done = TRUE;
g_cond_broadcast (async_callback_cond);
- g_static_mutex_unlock (&async_callback_lock);
+ g_mutex_unlock (&async_callback_lock);
}
static void
@@ -146,7 +146,7 @@
* new mutexes and condition variables all the time.
*/
- g_static_mutex_lock (&async_callback_lock);
+ g_mutex_lock (&async_callback_lock);
response_data.done = FALSE;
_gnome_vfs_dispatch_module_callback (async_callback->callback,
in, in_size,
@@ -156,10 +156,10 @@
&response_data);
while (!response_data.done) {
g_cond_wait (async_callback_cond,
- g_static_mutex_get_mutex (&async_callback_lock));
+ &async_callback_lock);
}
- g_static_mutex_unlock (&async_callback_lock);
+ g_mutex_unlock (&async_callback_lock);
}
static void
@@ -410,13 +410,13 @@
stack_table = specific;
- g_static_mutex_lock (&callback_table_lock);
+ g_mutex_lock (&callback_table_lock);
if (stack_tables_to_free != NULL) {
g_hash_table_remove (stack_tables_to_free, stack_table);
} else {
stack_table = NULL;
}
- g_static_mutex_unlock (&callback_table_lock);
+ g_mutex_unlock (&callback_table_lock);
if (stack_table) {
clear_stack_table (stack_table);
@@ -443,11 +443,11 @@
static void
free_stack_tables_to_free (void)
{
- g_static_mutex_lock (&callback_table_lock);
+ g_mutex_lock (&callback_table_lock);
g_hash_table_foreach_remove (stack_tables_to_free, stack_table_free_hr_func , NULL);
g_hash_table_destroy (stack_tables_to_free);
stack_tables_to_free = NULL;
- g_static_mutex_unlock (&callback_table_lock);
+ g_mutex_unlock (&callback_table_lock);
}
void
@@ -461,13 +461,13 @@
async_callback_cond = g_cond_new ();
- g_atexit (free_stack_tables_to_free);
+ atexit (free_stack_tables_to_free);
}
static void
free_default_callbacks (void)
{
- g_static_mutex_lock (&callback_table_lock);
+ g_mutex_lock (&callback_table_lock);
clear_callback_table (default_callbacks);
g_hash_table_destroy (default_callbacks);
@@ -475,7 +475,7 @@
clear_callback_table (default_async_callbacks);
g_hash_table_destroy (default_async_callbacks);
- g_static_mutex_unlock (&callback_table_lock);
+ g_mutex_unlock (&callback_table_lock);
}
/* This function should only be called with the mutex held. */
@@ -486,7 +486,7 @@
default_callbacks = g_hash_table_new (g_str_hash, g_str_equal);
default_async_callbacks = g_hash_table_new (g_str_hash, g_str_equal);
- g_atexit (free_default_callbacks);
+ atexit (free_default_callbacks);
}
}
@@ -496,23 +496,23 @@
{
/* Initialize per-thread data, if needed. */
if (g_private_get (callback_stacks_key) == NULL) {
- g_static_mutex_lock (&callback_table_lock);
+ g_mutex_lock (&callback_table_lock);
g_private_set (callback_stacks_key,
g_hash_table_new (g_str_hash, g_str_equal));
g_hash_table_insert (stack_tables_to_free,
g_private_get (callback_stacks_key),
GINT_TO_POINTER (1));
- g_static_mutex_unlock (&callback_table_lock);
+ g_mutex_unlock (&callback_table_lock);
}
if (g_private_get (async_callback_stacks_key) == NULL) {
- g_static_mutex_lock (&callback_table_lock);
+ g_mutex_lock (&callback_table_lock);
g_private_set (async_callback_stacks_key,
g_hash_table_new (g_str_hash, g_str_equal));
g_hash_table_insert (stack_tables_to_free,
g_private_get (async_callback_stacks_key),
GINT_TO_POINTER (1));
- g_static_mutex_unlock (&callback_table_lock);
+ g_mutex_unlock (&callback_table_lock);
}
}
@@ -618,12 +618,12 @@
callback_info = callback_info_new (callback, callback_data, destroy_notify);
- g_static_mutex_lock (&callback_table_lock);
+ g_mutex_lock (&callback_table_lock);
initialize_global_if_needed ();
insert_callback_into_table (default_callbacks, callback_name, callback_info);
- g_static_mutex_unlock (&callback_table_lock);
+ g_mutex_unlock (&callback_table_lock);
callback_info_unref (callback_info);
}
@@ -730,12 +730,12 @@
callback_info = async_callback_info_new (callback, callback_data, notify);
- g_static_mutex_lock (&callback_table_lock);
+ g_mutex_lock (&callback_table_lock);
initialize_global_if_needed ();
insert_callback_into_table (default_async_callbacks, callback_name, callback_info);
- g_static_mutex_unlock (&callback_table_lock);
+ g_mutex_unlock (&callback_table_lock);
callback_info_unref (callback_info);
}
@@ -864,13 +864,13 @@
g_assert (callback != NULL);
callback_info_ref (callback);
} else {
- g_static_mutex_lock (&callback_table_lock);
+ g_mutex_lock (&callback_table_lock);
initialize_global_if_needed ();
callback = g_hash_table_lookup (default_async_callbacks, callback_name);
if (callback != NULL) {
callback_info_ref (callback);
}
- g_static_mutex_unlock (&callback_table_lock);
+ g_mutex_unlock (&callback_table_lock);
}
}
@@ -883,13 +883,13 @@
g_assert (callback != NULL);
callback_info_ref (callback);
} else {
- g_static_mutex_lock (&callback_table_lock);
+ g_mutex_lock (&callback_table_lock);
initialize_global_if_needed ();
callback = g_hash_table_lookup (default_callbacks, callback_name);
if (callback != NULL) {
callback_info_ref (callback);
}
- g_static_mutex_unlock (&callback_table_lock);
+ g_mutex_unlock (&callback_table_lock);
}
}
@@ -920,9 +920,9 @@
stack_info->current_callbacks = g_hash_table_new (g_str_hash, g_str_equal);
stack_info->current_async_callbacks = g_hash_table_new (g_str_hash, g_str_equal);
- g_static_mutex_lock (&callback_table_lock);
+ g_mutex_lock (&callback_table_lock);
initialize_global_if_needed ();
- g_static_mutex_unlock (&callback_table_lock);
+ g_mutex_unlock (&callback_table_lock);
initialize_per_thread_if_needed ();
copy_callback_stack_tops (g_private_get (callback_stacks_key),
--- libgnomevfs/gnome-vfs-resolve.c.orig 2010-02-09 13:16:14.000000000 +0100
+++ libgnomevfs/gnome-vfs-resolve.c 2013-05-06 23:56:04.000000000 +0200
@@ -139,11 +139,11 @@
restart_resolve (void)
{
static GTimeVal last_reload = { 0, 0 };
- static GStaticMutex mutex = G_STATIC_MUTEX_INIT;
+ static GMutex mutex;
GTimeVal now;
gboolean ret;
- g_static_mutex_lock (&mutex);
+ g_mutex_lock (&mutex);
g_get_current_time (&now);
if ((now.tv_sec - last_reload.tv_sec) > RELOAD_TIMEVAL) {
@@ -155,7 +155,7 @@
ret = FALSE;
}
- g_static_mutex_unlock (&mutex);
+ g_mutex_unlock (&mutex);
return ret;
}
#else
--- modules/sftp-method.c.orig 2010-02-09 13:16:14.000000000 +0100
+++ modules/sftp-method.c 2013-05-07 11:50:33.000000000 +0200
@@ -1488,8 +1488,6 @@
invoke_save_auth (uri, keyring, user_name, object, authtype, password);
}
- if (!g_thread_supported ()) g_thread_init (NULL);
-
*connection = g_new0 (SftpConnection, 1);
(*connection)->ref_count = 1;
(*connection)->in_fd = in_fd;

View File

@ -0,0 +1,26 @@
$NetBSD: patch-libgnomevfs_gnome-vfs-ssl.c,v 1.1 2018/02/16 13:18:26 wiz Exp $
struct SSL is opaque in openssl-1.1; and the SSL_free() man page
says that one should not free members of it manually (in both
the openssl-1.0 and openssl-1.1 man pages).
--- libgnomevfs/gnome-vfs-ssl.c.orig 2010-02-09 12:16:14.000000000 +0000
+++ libgnomevfs/gnome-vfs-ssl.c
@@ -400,9 +400,6 @@ gnome_vfs_ssl_create_from_fd (GnomeVFSSS
}
}
- if (ssl->private->ssl->ctx)
- SSL_CTX_free (ssl->private->ssl->ctx);
-
SSL_free (ssl->private->ssl);
g_free (ssl->private);
g_free (ssl);
@@ -705,7 +702,6 @@ gnome_vfs_ssl_destroy (GnomeVFSSSL *ssl,
}
}
- SSL_CTX_free (ssl->private->ssl->ctx);
SSL_free (ssl->private->ssl);
close (ssl->private->sockfd);
if (ssl->private->timeout)