Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 235966 - sys-fs/ntfs3g should check kernel config
Summary: sys-fs/ntfs3g should check kernel config
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Patrick McLean
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-27 23:48 UTC by David Carlos Manuelda
Modified: 2009-08-21 14:42 UTC (History)
6 users (show)

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


Attachments
patch to all ebuilds to check for FUSE_FS in kernel (ntfs3g-fuse-kernel-check.patch,2.00 KB, patch)
2008-11-26 09:30 UTC, George Wu
Details | Diff
kernel check for FUSE_FS, warn only (ntfs3g-warn-fuse.patch,1.65 KB, patch)
2009-02-19 23:32 UTC, George Wu
Details | Diff
Proposed patch against ntfs3g ebuilds. (ntfs3g-fuse.patch,6.32 KB, patch)
2009-07-29 11:20 UTC, Peter Levine
Details | Diff
Same as before with some fixups (ntfs3g-fuse.patch,9.06 KB, patch)
2009-08-06 00:19 UTC, Peter Levine
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Carlos Manuelda 2008-08-27 23:48:48 UTC
Before compiling (pkg_setup), sys-fs/ntfs3g (all versions), it should check kernel config looking for FUSE enabled (just like ebuild for sys-fs/fuse does), otherwise it won't work complaining about not finding fuse kernel module.

Reproducible: Always
Comment 1 David Carlos Manuelda 2008-08-27 23:50:35 UTC
Also, it can't depend to sys-fs/fuse with nowadays stable kernel because stable sys-fs/fuse says that kernel is too new.
Comment 2 cazzantonio 2008-11-05 18:59:40 UTC
sys-fs/fuse provides userspace tools like fusermount, so it must be a dependency.

I've been using ntfs3g-1.5012 and it seems stable. Adding the kernel check should be sufficient to mark it stable.
Comment 3 George Wu 2008-11-26 09:30:22 UTC
Created attachment 173419 [details, diff]
patch to all ebuilds to check for FUSE_FS in kernel

for ntfs3g versions 1.2531, 1.2812, 1.2918, 1.5012
Comment 4 SpanKY gentoo-dev 2009-01-06 12:22:44 UTC
Comment on attachment 173419 [details, diff]
patch to all ebuilds to check for FUSE_FS in kernel

it should be a warning only, not a hard failure.  use ~ like the eclass documentation states.
Comment 5 George Wu 2009-01-06 21:35:28 UTC
Kernel option seems necessary to install to me.

http://www.ntfs-3g.org/index.html#installation

Could you please clarify?
Comment 6 David Carlos Manuelda 2009-01-07 11:17:05 UTC
(In reply to comment #2)
> sys-fs/fuse provides userspace tools like fusermount, so it must be a
> dependency.
> 
> I've been using ntfs3g-1.5012 and it seems stable. Adding the kernel check
> should be sufficient to mark it stable.
> 

sys-fs/fuse is not needed in order to use ntfs3g, it already gives you what you need to mount/manage ntfs fs's and as I see is not a dependency anymore, but still it lacks for searching fuse support inkernel
Comment 7 David Carlos Manuelda 2009-01-07 11:20:04 UTC
(In reply to comment #4)
> (From update of attachment 173419 [details, diff] [edit])
> it should be a warning only, not a hard failure.  use ~ like the eclass
> documentation states.
> 

Sorry for double posting. I think this should be a hard failure since ok, you can compile ntfsg without fuse enabled but it renders 100% useless in that case, I see no point in having software that compiles but it is unusable.
And thus, this can help relatively unexperienced users to know what really is the cause (for example long emerges).
Anyway, warning or error, check is still neccesary, could you apply as a warning and discuss after to promote it to error if neccesary?
Comment 8 Martin Mokrejš 2009-02-13 17:46:41 UTC
(In reply to comment #6)
> (In reply to comment #2)
> > sys-fs/fuse provides userspace tools like fusermount, so it must be a
> > dependency.
> > 
> > I've been using ntfs3g-1.5012 and it seems stable. Adding the kernel check
> > should be sufficient to mark it stable.
> > 
> 
> sys-fs/fuse is not needed in order to use ntfs3g, it already gives you what
> you need to mount/manage ntfs fs's and as I see is not a dependency anymore,
> but still it lacks for searching fuse support in kernel

[cut]
>>> Completed installing ntfs3g-1.2531 into /var/tmp/portage/sys-fs/ntfs3g-1.2531/image/

strip: i686-pc-linux-gnu-strip --strip-unneeded -R .comment
   bin/ntfs-3g
   lib/libntfs-3g.so.31.0.0
   usr/bin/ntfs-3g.probe
   usr/lib/libntfs-3g.a
ecompressdir: bzip2 -9 /usr/share/man
ecompressdir: bzip2 -9 /usr/share/doc
removing executable bit: usr/lib/libntfs-3g.la

>>> Installing sys-fs/ntfs3g-1.2531

>>> Recording sys-fs/ntfs3g in "world" favorites file...
>>> Auto-cleaning packages...

>>> No outdated packages were found on your system.

 * GNU info directory index is up-to-date.
# mount -o rw -t ntfs-3g /dev/sdd1 /mnt/external/
FATAL: Module fuse not found.
ntfs-3g-mount: fuse device is missing, try 'modprobe fuse' as root
# modprobe fuse
FATAL: Module fuse not found.
#

I am voting for einfo() note to the user. I am one of the users who downloads
vanilla source kernel directly from www.kernel.org mirrors and who is able to
do:

# cd /usr/src
# ln -sf linux-2.6.29.rc4-git4 linux

and configure&build the kernel on my own. I just want to be informed that I
should enable FUSE in .config.

$ gzip -dc /proc/config.gz | grep FUSE
# CONFIG_FUSE_FS is not set
$
Comment 9 Matthew Schultz 2009-02-19 17:07:42 UTC
I'm in favor of checking if FUSE is enabled in the kernel and if not or it's unable to read the config, then give the user einfo after installing to make sure they enable and recompile the kernel if necessary.  As Spanky says, no hard failure.
Comment 10 George Wu 2009-02-19 23:32:28 UTC
Created attachment 182590 [details, diff]
kernel check for FUSE_FS, warn only
Comment 11 Martin Mokrejš 2009-03-20 10:58:54 UTC
I am fine with this patch. However, have only tested to build on my system with FUSE_FS enabled. ;-) No time to recompile temporarily the kernel to it really kicks in. ;-)
Comment 12 Peter Volkov (RETIRED) gentoo-dev 2009-07-23 16:11:59 UTC
What about alternative solution? Driver uses bundled libfuse and using bundled libraries is bad thing from security point of view. What do you think if we depend on external fuse library which in turn already checks for CONFIG_FUSE kernel option (and issues warning) and add --with-fuse=external to econf? 
Comment 13 Patrick McLean gentoo-dev 2009-07-24 02:39:13 UTC
I have no problem turning on a warning if FUSE_FS is not in the kernel config (certainly don't die, as it does not have any effect on the build).

Also, turning on the external NTFS is a reasonable idea, possibly with a warning to rebuild if FUSE gets updated, since ntfs-3g seems to break easily against different FUSE versions (this is why upstream included the internal lib in the first place).

I will likely be more active on this in a few weeks, I haven't been in front of any machines with NTFS partitions very much at all lately.
Comment 14 Peter Levine 2009-07-29 11:20:34 UTC
Created attachment 199538 [details, diff]
Proposed patch against ntfs3g ebuilds.

Since the fuse use flag is already used to pull in sys-fs/fuse, I have included it.  According to the configure.ac, in non linux-kernel platforms (darwin, netbsd, solaris, etc...) the "--with-fuse=" argument isn't advertised by the configure script and external FUSE is a hard dependency, so the flag is enabled only when KERNEL=linux.  There is a warning for no FUSE support in the kernel config and an ewarn in pkg_postinst for any build that doesn't use internal FUSE.
Comment 15 Peter Levine 2009-08-06 00:19:16 UTC
Created attachment 200320 [details, diff]
Same as before with some fixups

Fixups so there's no "no such use flag messages", added some die statements, etc...
Comment 16 Patrick McLean gentoo-dev 2009-08-21 14:42:09 UTC
sys-fs/ntfs3g-2009.4.4 now depends on sys-fs/fuse which checks the kernel config