SUMMARY If I use KDE Partition Manager to edit any of my mount points, it replaces the following /etc/fstab with a blank line. https://<redact>/<redact/<redact> /home/<redact>/dav davfs _netdev,noexec,nosuid,user,uid=<redact> 0 3 Ubuntu 21.10 Kernel 5.16.0-051600rc8-generic partitionmanager 21.08.1 STEPS TO REPRODUCE 1. Use editor (eg vim) to add davfs line like the above to /etc/fstab 2. Use KDE partition manager to edit any mount point 3. Observe that /etc/fstab now contains a blank line where the davfs entry used to be. OBSERVED RESULT davfs entry deleted EXPECTED RESULT davfs entry unchanged SOFTWARE/OS VERSIONS Operating System: Kubuntu 21.10 KDE Plasma Version: 5.22.5 KDE Frameworks Version: 5.86.0 Qt Version: 5.15.2 Kernel Version: 5.16.0-051600rc8-generic (64-bit) Graphics Platform: X11 Processors: 10 × 12th Gen Intel® Core™ i5-12600K Memory: 30.7 GiB of RAM Graphics Processor: Mesa Intel® Graphics
Does URL contain any # characters?
The davfs entry does not contain # characters. Here is a less redacted fstab entry: https://abdc.net/remote.php/webdav/myfolder /home/einstein/myfolder davfs _netdev,noexec,nosuid,user,uid=einstein 0 3
(In reply to Michael Ehrlichman from comment #2) > The davfs entry does not contain # characters. Here is a less redacted > fstab entry: > > https://abdc.net/remote.php/webdav/myfolder /home/einstein/myfolder davfs > _netdev,noexec,nosuid,user,uid=einstein 0 3 Thanks. Hmm right now I don't immediately see what's going wrong here. I thought # might be tripping in one of these two lines https://invent.kde.org/system/kpmcore/-/blob/master/src/core/fstab.cpp#L71 https://invent.kde.org/system/kpmcore/-/blob/master/src/core/fstab.cpp#L88 but I guess something else is going on.
Perhaps a clue: If I put a "/" at the front of the dafvs line i.e. replace "https" with "/https" then the bug goes away. Of course putting a slash there is not a fix, I am simply trying to find clues as to what is wrong with the text processing.
(In reply to Michael Ehrlichman from comment #4) > Perhaps a clue: If I put a "/" at the front of the dafvs line i.e. > replace "https" with "/https" then the bug goes away. > > Of course putting a slash there is not a fix, I am simply trying to find > clues as to what is wrong with the text processing. I think that suggest bug in static void parseFsSpec(const QString& m_fsSpec, FstabEntry::Type& m_entryType, QString& m_deviceNode) function. We don't hit any of the "if/else" cases there.
That sounds right. As you probably expect, if I prefix the line with "UUID=", then the line is not deleted. So an addition like the following, or perhaps a check for fsType=='davfs', would work, no? } else if (m_fsSpec.startsWith(QStringLiteral("http"))) { m_entryType = FstabEntry::Type::netdev; m_deviceNode = m_fsSpec;
(In reply to Michael Ehrlichman from comment #6) > That sounds right. As you probably expect, if I prefix the line with > "UUID=", then the line is not deleted. > > So an addition like the following, or perhaps a check for fsType=='davfs', > would work, no? > > } else if (m_fsSpec.startsWith(QStringLiteral("http"))) { > m_entryType = FstabEntry::Type::netdev; > m_deviceNode = m_fsSpec; Hmm, perhaps just setting m_deviceNode = m_fsSpec before all those if/else blocks work, let me test.
(In reply to Andrius Štikonas from comment #7) > (In reply to Michael Ehrlichman from comment #6) > > That sounds right. As you probably expect, if I prefix the line with > > "UUID=", then the line is not deleted. > > > > So an addition like the following, or perhaps a check for fsType=='davfs', > > would work, no? > > > > } else if (m_fsSpec.startsWith(QStringLiteral("http"))) { > > m_entryType = FstabEntry::Type::netdev; > > m_deviceNode = m_fsSpec; > > Hmm, perhaps just setting m_deviceNode = m_fsSpec before all those if/else > blocks work, let me test. Actually it looks like things are going wrong during write stage: https://invent.kde.org/system/kpmcore/-/blob/master/src/core/fstab.cpp#L280
Git commit 5ffc5c6f238c70735637035456a9484f4f0f41dd by Andrius Štikonas. Committed on 05/01/2022 at 23:00. Pushed by stikonas into branch 'master'. Fix davfs entries being omitted from fstab file. M +4 -2 src/core/fstab.cpp M +1 -1 src/core/fstab.h https://invent.kde.org/system/kpmcore/commit/5ffc5c6f238c70735637035456a9484f4f0f41dd