Disable CDDA backend in RHEL 10
Fixes: https://issues.redhat.com/browse/RHEL-38130
This commit is contained in:
parent
64c3dc0114
commit
2ffa806f89
14
gvfs.spec
14
gvfs.spec
@ -22,7 +22,7 @@
|
||||
|
||||
Name: gvfs
|
||||
Version: 1.54.1
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: Backends for the gio framework in GLib
|
||||
|
||||
License: LGPL-2.0-or-later AND GPL-3.0-only AND MPL-2.0 AND BSD-3-Clause-Sun
|
||||
@ -30,6 +30,8 @@ License: LGPL-2.0-or-later AND GPL-3.0-only AND MPL-2.0 AND BSD-3-Clause-Sun
|
||||
URL: https://wiki.gnome.org/Projects/gvfs
|
||||
Source0: https://download.gnome.org/sources/gvfs/1.54/gvfs-%{version}.tar.xz
|
||||
|
||||
Patch: udisks2-Do-not-create-cdda-volumes-when-backend-is-d.patch
|
||||
|
||||
BuildRequires: meson
|
||||
BuildRequires: gcc
|
||||
BuildRequires: pkgconfig(glib-2.0) >= %{glib2_version}
|
||||
@ -37,7 +39,9 @@ BuildRequires: pkgconfig(dbus-1)
|
||||
BuildRequires: pkgconfig(gcr-4)
|
||||
BuildRequires: pkgconfig(gsettings-desktop-schemas) >= %{gsettings_desktop_schemas_version}
|
||||
BuildRequires: /usr/bin/ssh
|
||||
%if ! (0%{?rhel} >= 10)
|
||||
BuildRequires: pkgconfig(libcdio_paranoia) >= %{libcdio_paranoia_version}
|
||||
%endif
|
||||
BuildRequires: pkgconfig(gudev-1.0) >= %{gudev_version}
|
||||
BuildRequires: pkgconfig(libsoup-3.0) >= %{libsoup_version}
|
||||
BuildRequires: pkgconfig(avahi-client) >= %{avahi_version}
|
||||
@ -241,6 +245,7 @@ the functionality of the installed gvfs package.
|
||||
%endif
|
||||
%if 0%{?rhel} >= 10
|
||||
-Dgoogle=false \
|
||||
-Dcdda=false \
|
||||
%endif
|
||||
%{nil}
|
||||
%meson_build
|
||||
@ -293,7 +298,9 @@ killall -USR1 gvfsd >&/dev/null || :
|
||||
%{_datadir}/gvfs/mounts/admin.mount
|
||||
%{_datadir}/gvfs/mounts/sftp.mount
|
||||
%{_datadir}/gvfs/mounts/trash.mount
|
||||
%if ! (0%{?rhel} >= 10)
|
||||
%{_datadir}/gvfs/mounts/cdda.mount
|
||||
%endif
|
||||
%{_datadir}/gvfs/mounts/computer.mount
|
||||
%{_datadir}/gvfs/mounts/dav.mount
|
||||
%{_datadir}/gvfs/mounts/dav+sd.mount
|
||||
@ -322,7 +329,9 @@ killall -USR1 gvfsd >&/dev/null || :
|
||||
%{_libexecdir}/gvfsd-ftp
|
||||
%{_libexecdir}/gvfsd-sftp
|
||||
%{_libexecdir}/gvfsd-trash
|
||||
%if ! (0%{?rhel} >= 10)
|
||||
%{_libexecdir}/gvfsd-cdda
|
||||
%endif
|
||||
%{_libexecdir}/gvfsd-computer
|
||||
%{_libexecdir}/gvfsd-dav
|
||||
%{_libexecdir}/gvfsd-http
|
||||
@ -438,6 +447,9 @@ killall -USR1 gvfsd >&/dev/null || :
|
||||
%{_datadir}/installed-tests
|
||||
|
||||
%changelog
|
||||
* Wed May 29 2024 Ondrej Holy <oholy@redhat.com> - 1.54.1-2
|
||||
- Disable CDDA backend in RHEL 10
|
||||
|
||||
* Mon May 27 2024 Ondrej Holy <oholy@redhat.com> - 1.54.1-1
|
||||
- Update to 1.54.1
|
||||
|
||||
|
118
udisks2-Do-not-create-cdda-volumes-when-backend-is-d.patch
Normal file
118
udisks2-Do-not-create-cdda-volumes-when-backend-is-d.patch
Normal file
@ -0,0 +1,118 @@
|
||||
From cf4a82c388e97230219fc99620e504c86f479ef2 Mon Sep 17 00:00:00 2001
|
||||
From: Ondrej Holy <oholy@redhat.com>
|
||||
Date: Tue, 28 May 2024 10:19:14 +0200
|
||||
Subject: [PATCH] udisks2: Do not create cdda volumes when backend is disabled
|
||||
|
||||
Currently, the udisks2 volume monitor creates volumes for audio CDs
|
||||
regardless of the fact the cdda backend is disabled using the
|
||||
`-Dcdda=false` build option and thus there is no way to mount them.
|
||||
Let's ignore audio CDs in this case instead.
|
||||
|
||||
Related: https://issues.redhat.com/browse/RHEL-38130
|
||||
---
|
||||
meson.build | 2 ++
|
||||
monitor/udisks2/gvfsudisks2volume.c | 2 ++
|
||||
monitor/udisks2/gvfsudisks2volumemonitor.c | 31 ++++++++++++++++++----
|
||||
3 files changed, 30 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/meson.build b/meson.build
|
||||
index 4bb9ca3e..a7d15201 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -416,6 +416,8 @@ if enable_cdda
|
||||
|
||||
libcdio_paranoia_dep = dependency('libcdio_paranoia', version: '>= 0.78.2')
|
||||
config_h.set('HAVE_PARANOIA_NEW_INCLUDES', cc.has_header('cdio/paranoia/paranoia.h', dependencies: libcdio_paranoia_dep))
|
||||
+
|
||||
+ config_h.set('HAVE_CDDA', enable_cdda)
|
||||
endif
|
||||
|
||||
# *** Check if we should build with Google backend ***
|
||||
diff --git a/monitor/udisks2/gvfsudisks2volume.c b/monitor/udisks2/gvfsudisks2volume.c
|
||||
index 30078846..9af6c3da 100644
|
||||
--- a/monitor/udisks2/gvfsudisks2volume.c
|
||||
+++ b/monitor/udisks2/gvfsudisks2volume.c
|
||||
@@ -386,11 +386,13 @@ update_volume (GVfsUDisks2Volume *volume)
|
||||
g_free (volume->name);
|
||||
volume->name = g_strdup (media_desc);
|
||||
}
|
||||
+#ifdef HAVE_CDDA
|
||||
else if (volume->activation_root != NULL && g_file_has_uri_scheme (volume->activation_root, "cdda"))
|
||||
{
|
||||
g_free (volume->name);
|
||||
volume->name = g_strdup (_("Audio Disc"));
|
||||
}
|
||||
+#endif
|
||||
|
||||
volume->icon = media_icon != NULL ? g_object_ref (media_icon) : NULL;
|
||||
volume->symbolic_icon = media_symbolic_icon != NULL ? g_object_ref (media_symbolic_icon) : NULL;
|
||||
diff --git a/monitor/udisks2/gvfsudisks2volumemonitor.c b/monitor/udisks2/gvfsudisks2volumemonitor.c
|
||||
index 618f35b7..e6fe2944 100644
|
||||
--- a/monitor/udisks2/gvfsudisks2volumemonitor.c
|
||||
+++ b/monitor/udisks2/gvfsudisks2volumemonitor.c
|
||||
@@ -973,6 +973,25 @@ should_include_drive (GVfsUDisks2VolumeMonitor *monitor,
|
||||
return ret;
|
||||
}
|
||||
|
||||
+static gboolean
|
||||
+should_include_disc (GVfsUDisks2VolumeMonitor *monitor,
|
||||
+ UDisksDrive *drive)
|
||||
+{
|
||||
+ gboolean ret = FALSE;
|
||||
+
|
||||
+ /* only consider blank and audio discs */
|
||||
+
|
||||
+ if (udisks_drive_get_optical_blank (drive))
|
||||
+ ret = TRUE;
|
||||
+
|
||||
+#ifdef HAVE_CDDA
|
||||
+ if (udisks_drive_get_optical_num_audio_tracks (drive) > 0)
|
||||
+ ret = TRUE;
|
||||
+#endif
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
+
|
||||
/* ---------------------------------------------------------------------------------------------------- */
|
||||
|
||||
static gint
|
||||
@@ -1830,9 +1849,7 @@ update_discs (GVfsUDisks2VolumeMonitor *monitor,
|
||||
if (!should_include_drive (monitor, udisks_drive))
|
||||
continue;
|
||||
|
||||
- /* only consider blank and audio discs */
|
||||
- if (!(udisks_drive_get_optical_blank (udisks_drive) ||
|
||||
- udisks_drive_get_optical_num_audio_tracks (udisks_drive) > 0))
|
||||
+ if (!should_include_disc (monitor, udisks_drive))
|
||||
continue;
|
||||
|
||||
block = udisks_client_get_block_for_drive (monitor->client, udisks_drive, FALSE);
|
||||
@@ -1881,19 +1898,23 @@ update_discs (GVfsUDisks2VolumeMonitor *monitor,
|
||||
udisks_drive = udisks_client_get_drive_for_block (monitor->client, block);
|
||||
if (udisks_drive != NULL)
|
||||
{
|
||||
- gchar *uri;
|
||||
+ gchar *uri = NULL;
|
||||
GFile *activation_root;
|
||||
|
||||
if (udisks_drive_get_optical_blank (udisks_drive))
|
||||
{
|
||||
uri = g_strdup ("burn://");
|
||||
}
|
||||
- else
|
||||
+
|
||||
+#ifdef HAVE_CDDA
|
||||
+ if (udisks_drive_get_optical_num_audio_tracks (udisks_drive) > 0)
|
||||
{
|
||||
gchar *basename = g_path_get_basename (udisks_block_get_device (block));
|
||||
uri = g_strdup_printf ("cdda://%s", basename);
|
||||
g_free (basename);
|
||||
}
|
||||
+#endif
|
||||
+
|
||||
activation_root = g_file_new_for_uri (uri);
|
||||
volume = gvfs_udisks2_volume_new (monitor,
|
||||
block,
|
||||
--
|
||||
2.45.1
|
||||
|
Loading…
Reference in New Issue
Block a user