Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 238520 - kde-base/kdelibs-4.1.1-r4, kde-base/kdebase-3.5.9-r3: KDE doesn't provide "locale" flag when mounting with HAL and ntfs-3g
Summary: kde-base/kdelibs-4.1.1-r4, kde-base/kdebase-3.5.9-r3: KDE doesn't provide "lo...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] KDE (show other bugs)
Hardware: All Linux
: High critical (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-23 22:20 UTC by Ambroz Bizjak
Modified: 2008-10-01 00:49 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
KDE 4.1 fix (kdelibs patch) (kdelibs-4.1.1-ntfs3g-locale.patch,1006 bytes, patch)
2008-09-23 22:21 UTC, Ambroz Bizjak
Details | Diff
KDE 3.5.9 fix (kdebase / kdebase-kioslaves) (kdebase-3.5.9-ntfs3g-locale.patch,936 bytes, patch)
2008-09-24 12:51 UTC, Ambroz Bizjak
Details | Diff
KDE 3.5.10 fix (kdebase/kdebase-kioslaves) (kdebase-3.5.10-ntfs3g-locale.patch,2.25 KB, patch)
2008-09-24 12:51 UTC, Ambroz Bizjak
Details | Diff
KDE 3.5.10 fix (kdebase / kdebase-kioslaves) (kdebase-3.5.10-ntfs3g-locale.patch,2.27 KB, patch)
2008-09-24 14:03 UTC, Ambroz Bizjak
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ambroz Bizjak 2008-09-23 22:20:58 UTC
If the latest unstable sys-fs/ntfs3g is installed with the 'hal' use flag, KDE can mount NTFS filesystems with the ntfs-3g driver through HAL.
However, ntfs-3g has to be provided a locale so it can translate file names with non-ascii characters.
ntfs-3g will check its environment variables (LC_ALL, ...) and also has a "locale" mount option. It never has those environment variables, even if a system locale is configured. So the best would be for KDE to provide the locale though HAL (which allows it) as in the user's enviroment; but it doesn't right now.

I have a patch for KDE 4.1 which solves the problem by providing the "locale" option to HAL. I will post the KDE 3.5 patch shortly, and will also commit both upstream.

I've set the severity to critical, because it presents a potential data loss (e.g. you backup a folder from your NTFS drive, and have no idea some files with non-ascii names were not copied).

Reproducible: Always

Steps to Reproduce:
Comment 1 Ambroz Bizjak 2008-09-23 22:21:44 UTC
Created attachment 166221 [details, diff]
KDE 4.1 fix (kdelibs patch)
Comment 2 Ambroz Bizjak 2008-09-23 22:31:22 UTC
I've forgot to mention why there could be a data loss: if ntfs-3g is not provided a locale, it will fail to show any files with non-ascii names. It will also refuse the creation of such files.
Comment 3 Ambroz Bizjak 2008-09-24 12:51:35 UTC
Created attachment 166269 [details, diff]
KDE 3.5.9 fix (kdebase / kdebase-kioslaves)
Comment 4 Ambroz Bizjak 2008-09-24 12:51:52 UTC
Created attachment 166271 [details, diff]
KDE 3.5.10 fix (kdebase/kdebase-kioslaves)
Comment 5 Ambroz Bizjak 2008-09-24 14:03:18 UTC
Created attachment 166272 [details, diff]
KDE 3.5.10 fix (kdebase / kdebase-kioslaves)

Mounting plain ntfs (kernel driver, no ntfs-3g) was broken (with and without my patch) in KDE 3.5.10.
HAL somehow always lists the "locale" option as available for the "ntfs" fstype, which is not really supported by the default kernel driver, providing it will trigger a mount error. Maybe it was meant for the the ntfsmount driver from linux-ntfs, which is really unmaintained and broken. So, I added a check to pass the locale only if the fstype is "ntfs-3g", as in the other two patches.
Comment 6 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2008-09-26 04:30:08 UTC
Please add the link to the upstream bugs/commits and reopen again.
Comment 7 Ambroz Bizjak 2008-09-26 09:03:48 UTC
Upstream commits:
3.5 branch: http://websvn.kde.org/?view=rev&revision=864963
4.1 branch: http://websvn.kde.org/?view=rev&revision=864120
trunk: http://websvn.kde.org/?view=rev&revision=864123

The 3.5.9 patch posted here is different from the committed 3.5 patch because since 3.5.10 there is already some (broken) locale support, but the resulting code is the same.
Comment 8 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2008-10-01 00:49:51 UTC
I've just added a revbumped 3.5.9 and 3.5.10 to the tree with the provided patches.
I haven't fixed 4.1.1 as 4.1.2 should be released tomorrow and provides the fix.