On Sun, 18 May 2008, Alon Bar-Lev wrote:
> On Sunday 18 May 2008, Szabolcs Szakacsits wrote:
> > ntfs-3g can be anywhere if it's on the root file system.
> >
> > I gave you the above example as a trick because it will create the missing
> > directory for the mount helper which caused your problem, so you don't need
> > to wait for the "create $(DESTDIR)/sbin before making the mount helper
> > symlink" patch.
>
> As you know, I too think that nothing should be hardcoded... please
> reconsider your view, and revert the hardcoded /sbin stuff.
Hi Alon,
I really would like to but /sbin is also hard coded (security reason) in
the mount utlities to make mounts work.
This is from mount.c (util-linux, util-linux-ng, etc):
sprintf(mountprog, "/sbin/mount.%s", type);
if (stat(mountprog, &statbuf) == 0) {
...
execv(mountprog, mountargs);
and this is from the mount(8) manual:
-t TYPE ... or when using TYPE in /etc/fstab
For most types all the mount program has to do is issue a simple
mount(2) system call, and no detailed knowledge of the filesys-
tem type is required. For a few types however (like nfs, nfs4,
smbfs, ncpfs) ad hoc code is necessary. The nfs ad hoc code is
built in, but smbfs and ncpfs have a separate mount program. In
order to make it possible to treat all types in a uniform way,
mount will execute the program /sbin/mount.TYPE (if that exists)
when called with type TYPE. Since various versions of the smb-
mount program have different calling conventions,
/sbin/mount.smbfs may have to be a shell script that sets up the
desired call.
ntfs-3g is just like smbfs, ncpfs, cifs, etc. If /sbin/mount.ntfs-3g
doesn't exist then 'mount -t ntfs-3g ...' and mount via /etc/fstab is
guaranteed to fail on Linux. Mount(8) doesn't use the PATH variable
(security reason), it only looks for the mount helpers in /sbin,
nowhere else.
The only reasons I can imagine not to create /sbin/mount.ntfs-3g are
a) other OS uses a different mount mechanism
b) no need/possibility for mount(8) and /etc/fstab support, so the
relevant code isn't needed at all (e.g. unprivileged user).
> It also makes "make distcheck" not work.
That would be nice to fix. And as I see you almost did it :)
> The user should specify the location.
We could have an option to disable the creation of /sbin/mount.ntfs-3g.
Creating it anywhere else is no use for anything and always makes mount(8)
to fail. If user disables it then he acknowledges that mount(8) and
/etc/fstab will not work with ntfs-3g.
> Anyway, please review attached misc fixups to build.
Happily :-)
I've noticed only a typo: $(hedaers) => $(headers), otherwise they look
good.
> It solves separate build directory issue, correct dependency of local
> install rules, and dist issue.
Would you please explain the problems a bit in more detail, and which
chunk solves which one? It would be nice to commit them separately.
Thank you,
Szaka
> Index: Makefile.am
> ===================================================================
> RCS file: /cvsroot/ntfs-3g/ntfs-3g/Makefile.am,v
> retrieving revision 1.2
> diff -u -B -r1.2 Makefile.am
> --- Makefile.am 6 Dec 2007 20:44:01 -0000 1.2
> +++ Makefile.am 18 May 2008 20:16:05 -0000
> @@ -4,20 +4,20 @@
> EXTRA_DIST = AUTHORS CREDITS COPYING NEWS autogen.sh
>
> MAINTAINERCLEANFILES=\
> - configure \
> - Makefile.in \
> - aclocal.m4 \
> - compile \
> - depcomp \
> - install-sh \
> - ltmain.sh \
> - missing \
> - config.guess \
> - config.sub \
> - config.h.in \
> - config.h.in~ \
> - INSTALL
> + $(srcdir)/configure \
> + $(srcdir)/Makefile.in \
> + $(srcdir)/aclocal.m4 \
> + $(srcdir)/compile \
> + $(srcdir)/depcomp \
> + $(srcdir)/install-sh \
> + $(srcdir)/ltmain.sh \
> + $(srcdir)/missing \
> + $(srcdir)/config.guess \
> + $(srcdir)/config.sub \
> + $(srcdir)/config.h.in \
> + $(srcdir)/config.h.in~ \
> + $(srcdir)/INSTALL
>
> -SUBDIRS= include libfuse-lite libntfs-3g src
> +SUBDIRS = include libfuse-lite libntfs-3g src
>
> doc_DATA = README
> Index: include/Makefile.am
> ===================================================================
> RCS file: /cvsroot/ntfs-3g/ntfs-3g/include/Makefile.am,v
> retrieving revision 1.2
> diff -u -B -r1.2 Makefile.am
> --- include/Makefile.am 6 Dec 2007 20:44:02 -0000 1.2
> +++ include/Makefile.am 18 May 2008 20:16:05 -0000
> @@ -1,4 +1,4 @@
>
> -MAINTAINERCLEANFILES = Makefile.in
> +MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
>
> SUBDIRS = ntfs-3g fuse-lite
> Index: include/fuse-lite/Makefile.am
> ===================================================================
> RCS file: /cvsroot/ntfs-3g/ntfs-3g/include/fuse-lite/Makefile.am,v
> retrieving revision 1.1
> diff -u -B -r1.1 Makefile.am
> --- include/fuse-lite/Makefile.am 6 Dec 2007 20:44:02 -0000 1.1
> +++ include/fuse-lite/Makefile.am 18 May 2008 20:16:05 -0000
> @@ -1,5 +1,5 @@
>
> -MAINTAINERCLEANFILES = Makefile.in
> +MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
>
> noinst_HEADERS = \
> fuse.h \
> Index: include/ntfs-3g/Makefile.am
> ===================================================================
> RCS file: /cvsroot/ntfs-3g/ntfs-3g/include/ntfs-3g/Makefile.am,v
> retrieving revision 1.4
> diff -u -B -r1.4 Makefile.am
> --- include/ntfs-3g/Makefile.am 6 Dec 2007 20:44:03 -0000 1.4
> +++ include/ntfs-3g/Makefile.am 18 May 2008 20:16:05 -0000
> @@ -1,8 +1,7 @@
>
> -MAINTAINERCLEANFILES = Makefile.in
> +MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
>
> -if INSTALL_LIBRARY
> -ntfs3ginclude_HEADERS = \
> +headers = \
> attrib.h \
> attrlist.h \
> bitmap.h \
> @@ -32,5 +31,10 @@
> unistr.h \
> version.h \
> volume.h
> +
> +if INSTALL_LIBRARY
> +ntfs3ginclude_HEADERS = $(hedaers)
> +else
> +noinst_HEADERS = $(headers)
> endif
>
> Index: libfuse-lite/Makefile.am
> ===================================================================
> RCS file: /cvsroot/ntfs-3g/ntfs-3g/libfuse-lite/Makefile.am,v
> retrieving revision 1.5
> diff -u -B -r1.5 Makefile.am
> --- libfuse-lite/Makefile.am 23 Jan 2008 21:32:27 -0000 1.5
> +++ libfuse-lite/Makefile.am 18 May 2008 20:16:05 -0000
> @@ -1,5 +1,5 @@
>
> -MAINTAINERCLEANFILES = Makefile.in
> +MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
>
> if FUSE_INTERNAL
> noinst_LTLIBRARIES = libfuse-lite.la
> Index: libntfs-3g/Makefile.am
> ===================================================================
> RCS file: /cvsroot/ntfs-3g/ntfs-3g/libntfs-3g/Makefile.am,v
> retrieving revision 1.4
> diff -u -B -r1.4 Makefile.am
> --- libntfs-3g/Makefile.am 6 Dec 2007 20:44:10 -0000 1.4
> +++ libntfs-3g/Makefile.am 18 May 2008 20:16:05 -0000
> @@ -1,5 +1,5 @@
>
> -MAINTAINERCLEANFILES = Makefile.in
> +MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
>
> if INSTALL_LIBRARY
> rootlib_LTLIBRARIES=#Create directory
> @@ -14,7 +14,7 @@
> libntfs_3g_la_LDFLAGS = -version-info $(LIBNTFS_3G_VERSION) -no-undefined
>
> if FUSE_INTERNAL
> -libntfs_3g_la_LIBADD = $(top_srcdir)/libfuse-lite/libfuse-lite.la
> +libntfs_3g_la_LIBADD = $(top_builddir)/libfuse-lite/libfuse-lite.la
> endif
>
> libntfs_3g_la_SOURCES = \
> Index: src/Makefile.am
> ===================================================================
> RCS file: /cvsroot/ntfs-3g/ntfs-3g/src/Makefile.am,v
> retrieving revision 1.9
> diff -u -B -r1.9 Makefile.am
> --- src/Makefile.am 3 Feb 2008 16:39:13 -0000 1.9
> +++ src/Makefile.am 18 May 2008 20:16:06 -0000
> @@ -1,5 +1,5 @@
>
> -MAINTAINERCLEANFILES = Makefile.in
> +MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
>
> if FUSE_INTERNAL
> FUSE_CFLAGS = -I$(top_srcdir)/include/fuse-lite
> @@ -37,12 +37,10 @@
> $(LDCONFIG)
> endif
>
> -install-exec-local:
> - $(INSTALL) -d "$(DESTDIR)$(rootsbindir)"
> +install-exec-local: install-rootsbinDATA
> $(LN_S) -f "$(rootbindir)/ntfs-3g" "$(DESTDIR)/sbin/mount.ntfs-3g"
>
> -install-data-local:
> - $(INSTALL) -d "$(DESTDIR)$(man8dir)"
> +install-data-local: install-man8
> $(LN_S) -f ntfs-3g.8 "$(DESTDIR)$(man8dir)/mount.ntfs-3g.8"
>
> uninstall-local:
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> ntfs-3g-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ntfs-3g-devel
>
--
NTFS-3G: http://ntfs-3g.org
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
ntfs-3g-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ntfs-3g-devel