Thursday, October 27, 2022

devel/kf5/solid: /etc/mtab not exist under OpenBSD

Okay to remove /etc/mtab handling in solid? This avoids the following
message solid consumers:

QKqueueFileSystemWatcherEngine::addPaths: open: No such file or directory

OK?

Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/kf5/solid/Makefile,v
retrieving revision 1.21
diff -u -p -u -p -r1.21 Makefile
--- Makefile 19 Sep 2022 05:22:41 -0000 1.21
+++ Makefile 27 Oct 2022 19:35:54 -0000
@@ -1,5 +1,6 @@
COMMENT = KDE hardware abstraction layer
DISTNAME = solid-${VERSION}
+REVISION = 0

SHARED_LIBS = KF5Solid 7.1

Index: patches/patch-src_solid_devices_backends_fstab_fstabwatcher_cpp
===================================================================
RCS file: patches/patch-src_solid_devices_backends_fstab_fstabwatcher_cpp
diff -N patches/patch-src_solid_devices_backends_fstab_fstabwatcher_cpp
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_solid_devices_backends_fstab_fstabwatcher_cpp 27 Oct 2022 19:35:54 -0000
@@ -0,0 +1,21 @@
+/etc/mtab not exist under OpenBSD
+
+Index: src/solid/devices/backends/fstab/fstabwatcher.cpp
+--- src/solid/devices/backends/fstab/fstabwatcher.cpp.orig
++++ src/solid/devices/backends/fstab/fstabwatcher.cpp
+@@ -37,6 +37,7 @@ FstabWatcher::FstabWatcher()
+ connect(qApp, &QCoreApplication::aboutToQuit, this, &FstabWatcher::orphanFileSystemWatcher);
+ }
+
++#ifndef Q_OS_OPENBSD
+ m_mtabFile = new QFile(s_mtabFile, this);
+ if (m_mtabFile && m_mtabFile->symLinkTarget().startsWith("/proc/") && m_mtabFile->open(QIODevice::ReadOnly)) {
+ m_mtabSocketNotifier = new QSocketNotifier(m_mtabFile->handle(), QSocketNotifier::Exception, this);
+@@ -44,6 +45,7 @@ FstabWatcher::FstabWatcher()
+ } else {
+ m_fileSystemWatcher->addPath(s_mtabFile);
+ }
++

No comments:

Post a Comment