Accepting request 542909 from GNOME:Factory
- Add gvfs-fix-mtp-volume-removal.patch: Fix various mtp issues with volume management (bgo#789491). (forwarded request 542861 from Zaitor) OBS-URL: https://build.opensuse.org/request/show/542909 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gvfs?expand=0&rev=141
This commit is contained in:
commit
3b3be43465
164
gvfs-fix-mtp-volume-removal.patch
Normal file
164
gvfs-fix-mtp-volume-removal.patch
Normal file
@ -0,0 +1,164 @@
|
||||
From 4fe3b0f8d24851145b5ceae10eb3181b2340466b Mon Sep 17 00:00:00 2001
|
||||
From: Ondrej Holy <oholy@redhat.com>
|
||||
Date: Wed, 25 Oct 2017 20:28:22 +0200
|
||||
Subject: mtp: Fix volume removal with current udev behavior
|
||||
|
||||
UDev events for devices without ID_MTP_DEVICE property are ignored.
|
||||
Although ID_MTP_DEVICE seems don't have to be set for device when removing
|
||||
and thus the volume is not removed. Let's ignore ID_MTP_DEVICE when removing.
|
||||
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=789491
|
||||
---
|
||||
monitor/mtp/gmtpvolumemonitor.c | 17 ++++++-----------
|
||||
1 file changed, 6 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/monitor/mtp/gmtpvolumemonitor.c b/monitor/mtp/gmtpvolumemonitor.c
|
||||
index 50e37cf..bfd9e29 100644
|
||||
--- a/monitor/mtp/gmtpvolumemonitor.c
|
||||
+++ b/monitor/mtp/gmtpvolumemonitor.c
|
||||
@@ -208,17 +208,12 @@ on_uevent (GUdevClient *client, gchar *action, GUdevDevice *device, gpointer use
|
||||
|
||||
g_debug ("on_uevent: action=%s, device=%s", action, g_udev_device_get_device_file(device));
|
||||
|
||||
- /* filter out uninteresting events */
|
||||
- if (!g_udev_device_has_property (device, "ID_MTP_DEVICE"))
|
||||
- {
|
||||
- g_debug ("on_uevent: discarding, not ID_MTP");
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- if (strcmp (action, "add") == 0)
|
||||
- gudev_add_device (monitor, device, TRUE);
|
||||
- else if (strcmp (action, "remove") == 0)
|
||||
- gudev_remove_device (monitor, device);
|
||||
+ if (g_strcmp0 (action, "add") == 0 && g_udev_device_has_property (device, "ID_MTP_DEVICE"))
|
||||
+ gudev_add_device (monitor, device, TRUE);
|
||||
+ else if (g_strcmp0 (action, "remove") == 0 && g_udev_device_get_device_file (device) != NULL)
|
||||
+ gudev_remove_device (monitor, device);
|
||||
+ else
|
||||
+ g_debug ("on_uevent: discarding");
|
||||
}
|
||||
|
||||
static void
|
||||
--
|
||||
cgit v0.12
|
||||
|
||||
|
||||
From bcd2a7ac00b5d6cd82e8ddfe9481da8edfe59e6a Mon Sep 17 00:00:00 2001
|
||||
From: Ondrej Holy <oholy@redhat.com>
|
||||
Date: Fri, 27 Oct 2017 10:11:20 +0200
|
||||
Subject: gphoto2: Fix volume removal with current udev behavior
|
||||
|
||||
UDev events for devices without ID_GPHOTO2 property are ignored.
|
||||
Although ID_GPHOTO2 seems don't have to be set for device when removing
|
||||
and thus the volume is not removed. Let's ignore ID_GPHOTO2 when removing.
|
||||
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=789491
|
||||
---
|
||||
monitor/gphoto2/ggphoto2volumemonitor.c | 17 ++++++-----------
|
||||
1 file changed, 6 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/monitor/gphoto2/ggphoto2volumemonitor.c b/monitor/gphoto2/ggphoto2volumemonitor.c
|
||||
index f4fae8b..06e07ab 100644
|
||||
--- a/monitor/gphoto2/ggphoto2volumemonitor.c
|
||||
+++ b/monitor/gphoto2/ggphoto2volumemonitor.c
|
||||
@@ -246,17 +246,12 @@ on_uevent (GUdevClient *client,
|
||||
|
||||
/* g_debug ("on_uevent: action=%s, device=%s", action, g_udev_device_get_device_file(device)); */
|
||||
|
||||
- /* filter out uninteresting events */
|
||||
- if (!g_udev_device_has_property (device, "ID_GPHOTO2"))
|
||||
- {
|
||||
- /* g_debug ("on_uevent: discarding, not ID_GPHOTO2"); */
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- if (strcmp (action, "add") == 0)
|
||||
- gudev_add_camera (monitor, device, TRUE);
|
||||
- else if (strcmp (action, "remove") == 0)
|
||||
- gudev_remove_camera (monitor, device);
|
||||
+ if (g_strcmp0 (action, "add") == 0 && g_udev_device_has_property (device, "ID_GPHOTO2"))
|
||||
+ gudev_add_camera (monitor, device, TRUE);
|
||||
+ else if (g_strcmp0 (action, "remove") == 0 && g_udev_device_get_device_file (device) != NULL)
|
||||
+ gudev_remove_camera (monitor, device);
|
||||
+ else
|
||||
+ g_debug ("on_uevent: discarding");
|
||||
}
|
||||
|
||||
/* Find all attached gphoto supported cameras; this is called on startup
|
||||
--
|
||||
cgit v0.12
|
||||
|
||||
|
||||
From 9bf86aaf229ecbf82777958d55e29ec0d3a2f273 Mon Sep 17 00:00:00 2001
|
||||
From: Ondrej Holy <oholy@redhat.com>
|
||||
Date: Tue, 31 Oct 2017 17:31:05 +0100
|
||||
Subject: monitor: Remove device file checks
|
||||
|
||||
The device file checks were added by mistake and it is not clear whether
|
||||
it can't have some side-effect. Let's remove them and use g_strcmp0 for
|
||||
sysfs path comparison for sure...
|
||||
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=789491
|
||||
---
|
||||
monitor/gphoto2/ggphoto2volume.c | 2 +-
|
||||
monitor/gphoto2/ggphoto2volumemonitor.c | 2 +-
|
||||
monitor/mtp/gmtpvolume.c | 2 +-
|
||||
monitor/mtp/gmtpvolumemonitor.c | 2 +-
|
||||
4 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/monitor/gphoto2/ggphoto2volume.c b/monitor/gphoto2/ggphoto2volume.c
|
||||
index c1be77e..21e318b 100644
|
||||
--- a/monitor/gphoto2/ggphoto2volume.c
|
||||
+++ b/monitor/gphoto2/ggphoto2volume.c
|
||||
@@ -218,7 +218,7 @@ g_gphoto2_volume_has_path (GGPhoto2Volume *volume,
|
||||
G_LOCK (gphoto2_volume);
|
||||
res = FALSE;
|
||||
if (gphoto2_volume->device != NULL)
|
||||
- res = strcmp (g_udev_device_get_sysfs_path (gphoto2_volume->device), sysfs_path) == 0;
|
||||
+ res = g_strcmp0 (g_udev_device_get_sysfs_path (gphoto2_volume->device), sysfs_path) == 0;
|
||||
G_UNLOCK (gphoto2_volume);
|
||||
return res;
|
||||
}
|
||||
diff --git a/monitor/gphoto2/ggphoto2volumemonitor.c b/monitor/gphoto2/ggphoto2volumemonitor.c
|
||||
index 06e07ab..83340a2 100644
|
||||
--- a/monitor/gphoto2/ggphoto2volumemonitor.c
|
||||
+++ b/monitor/gphoto2/ggphoto2volumemonitor.c
|
||||
@@ -248,7 +248,7 @@ on_uevent (GUdevClient *client,
|
||||
|
||||
if (g_strcmp0 (action, "add") == 0 && g_udev_device_has_property (device, "ID_GPHOTO2"))
|
||||
gudev_add_camera (monitor, device, TRUE);
|
||||
- else if (g_strcmp0 (action, "remove") == 0 && g_udev_device_get_device_file (device) != NULL)
|
||||
+ else if (g_strcmp0 (action, "remove") == 0)
|
||||
gudev_remove_camera (monitor, device);
|
||||
else
|
||||
g_debug ("on_uevent: discarding");
|
||||
diff --git a/monitor/mtp/gmtpvolume.c b/monitor/mtp/gmtpvolume.c
|
||||
index cfd7759..681029f 100644
|
||||
--- a/monitor/mtp/gmtpvolume.c
|
||||
+++ b/monitor/mtp/gmtpvolume.c
|
||||
@@ -209,7 +209,7 @@ g_mtp_volume_has_path (GMtpVolume *volume,
|
||||
G_LOCK (mtp_volume);
|
||||
res = FALSE;
|
||||
if (mtp_volume->device != NULL)
|
||||
- res = strcmp (g_udev_device_get_sysfs_path (mtp_volume->device), sysfs_path) == 0;
|
||||
+ res = g_strcmp0 (g_udev_device_get_sysfs_path (mtp_volume->device), sysfs_path) == 0;
|
||||
G_UNLOCK (mtp_volume);
|
||||
return res;
|
||||
}
|
||||
diff --git a/monitor/mtp/gmtpvolumemonitor.c b/monitor/mtp/gmtpvolumemonitor.c
|
||||
index bfd9e29..1e73db7 100644
|
||||
--- a/monitor/mtp/gmtpvolumemonitor.c
|
||||
+++ b/monitor/mtp/gmtpvolumemonitor.c
|
||||
@@ -210,7 +210,7 @@ on_uevent (GUdevClient *client, gchar *action, GUdevDevice *device, gpointer use
|
||||
|
||||
if (g_strcmp0 (action, "add") == 0 && g_udev_device_has_property (device, "ID_MTP_DEVICE"))
|
||||
gudev_add_device (monitor, device, TRUE);
|
||||
- else if (g_strcmp0 (action, "remove") == 0 && g_udev_device_get_device_file (device) != NULL)
|
||||
+ else if (g_strcmp0 (action, "remove") == 0)
|
||||
gudev_remove_device (monitor, device);
|
||||
else
|
||||
g_debug ("on_uevent: discarding");
|
||||
--
|
||||
cgit v0.12
|
||||
|
17
gvfs.changes
17
gvfs.changes
@ -1,3 +1,20 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Nov 15 12:23:18 UTC 2017 - zaitor@opensuse.org
|
||||
|
||||
- Add gvfs-fix-mtp-volume-removal.patch: Fix various mtp issues
|
||||
with volume management (bgo#789491).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Oct 31 14:31:25 UTC 2017 - tbechtold@suse.com
|
||||
|
||||
- Set caps(cap_net_bind_service=+ep) for gvfds-nfs: Many NFS
|
||||
servers default to a mode where they do not allow non-system
|
||||
ports from connecting. These servers require to use the
|
||||
"insecure" export option in /etc/exports in order to allow libnfs
|
||||
clients to be able to connect. Allow the usage of privileged
|
||||
ports for the gvfsd-nfs executable to not require the "insecure"
|
||||
option on the server (bsc#1065864).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 2 18:26:16 UTC 2017 - zaitor@opensuse.org
|
||||
|
||||
|
@ -27,6 +27,8 @@ Group: Development/Libraries/C and C++
|
||||
Url: http://www.gnome.org
|
||||
Source0: http://download.gnome.org/sources/gvfs/1.34/%{name}-%{version}.tar.xz
|
||||
Source99: baselibs.conf
|
||||
# PATCH-FIX-UPSTREAM gvfs-fix-mtp-volume-removal.patch bgo#789491 zaitor@opensuse.org -- Fix various mtp issues with volume management
|
||||
Patch0: gvfs-fix-mtp-volume-removal.patch
|
||||
# PATCH-FEATURE-SLE gvfs-nvvfs.patch ksamrat@novell.com -- Provides gvfs backend for novell nautilus plugin
|
||||
Patch5: gvfs-nvvfs.patch
|
||||
# PATCH-FEATURE-SLE gvfs-nds.patch ksamrat@novell.com -- Provides NDS browsing for nautilus
|
||||
@ -167,6 +169,7 @@ gvfs plugins.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%if !0%{?is_opensuse}
|
||||
translation-update-upstream
|
||||
%patch5 -p1
|
||||
@ -322,7 +325,8 @@ find %{buildroot}%{_libdir} -type f -name '*.la' -delete -print
|
||||
%{_libexecdir}/%{name}/gvfsd-network
|
||||
%{_datadir}/%{name}/mounts/network.mount
|
||||
%if 0%{?is_opensuse}
|
||||
%{_libexecdir}/%{name}/gvfsd-nfs
|
||||
# allow priv ports for mounting nfs . Otherwise the nfs-service requires insecure
|
||||
%caps(cap_net_bind_service=+ep) %{_libexecdir}/%{name}/gvfsd-nfs
|
||||
%{_datadir}/%{name}/mounts/nfs.mount
|
||||
%endif
|
||||
%if !0%{?is_opensuse}
|
||||
|
Loading…
Reference in New Issue
Block a user