aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraz <az@FreeBSD.org>2006-02-01 20:31:37 +0800
committeraz <az@FreeBSD.org>2006-02-01 20:31:37 +0800
commit0f941d48ecd6ba2c2ca729f93908e3e5f70463b1 (patch)
tree656173d7d8e4d412d855a10f8286a4a539256b77
parent249aff324dcabe47e4a8898ab88725a53a7f77de (diff)
downloadfreebsd-ports-gnome-0f941d48ecd6ba2c2ca729f93908e3e5f70463b1.tar.gz
freebsd-ports-gnome-0f941d48ecd6ba2c2ca729f93908e3e5f70463b1.tar.zst
freebsd-ports-gnome-0f941d48ecd6ba2c2ca729f93908e3e5f70463b1.zip
- FUSE interface upgrade
sysutils/fusefs-libs has been upgraded and ntfsprogs' FUSE based fs driver (ntfsmount) doesn't compile against the new version. The attached patch will make it compile against recent sysutils/fusefs-libs versions (2.5.0, 2.5.1) PR: ports/92568 Submitted by: Csaba Henk <csaba.henk@creo.hu>
-rw-r--r--sysutils/ntfsprogs/Makefile2
-rw-r--r--sysutils/ntfsprogs/files/patch-ntfsprogs_ntfsmount.c103
2 files changed, 98 insertions, 7 deletions
diff --git a/sysutils/ntfsprogs/Makefile b/sysutils/ntfsprogs/Makefile
index 535778152581..d5a77db8576f 100644
--- a/sysutils/ntfsprogs/Makefile
+++ b/sysutils/ntfsprogs/Makefile
@@ -59,8 +59,10 @@ PLIST_SUB+= GNOMEVFS2="@comment "
.if defined(WITH_FUSE)
CONFIGURE_ARGS+=--enable-fuse-module
PLIST_SUB+= FUSE=""
+USE_GNOME+= pkgconfig
LIB_DEPENDS+= fuse.2:${PORTSDIR}/sysutils/fusefs-libs
MLINKS+= ntfsmount.8 mount.ntfs-fuse.8
+CONFLICTS= fusefs-kmod-0.2.19*
.else
CONFIGURE_ARGS+=--disable-fuse-module
PLIST_SUB+= FUSE="@comment "
diff --git a/sysutils/ntfsprogs/files/patch-ntfsprogs_ntfsmount.c b/sysutils/ntfsprogs/files/patch-ntfsprogs_ntfsmount.c
index 16d148cf4d80..ab35709c49b3 100644
--- a/sysutils/ntfsprogs/files/patch-ntfsprogs_ntfsmount.c
+++ b/sysutils/ntfsprogs/files/patch-ntfsprogs_ntfsmount.c
@@ -1,14 +1,103 @@
---- ntfsprogs/ntfsmount.c.orig Wed Nov 23 12:33:56 2005
-+++ ntfsprogs/ntfsmount.c Wed Nov 23 12:32:15 2005
-@@ -228,7 +228,11 @@
+--- ntfsprogs/Makefile.am.orig Sat Oct 8 00:35:40 2005
++++ ntfsprogs/Makefile.am Fri Jan 20 11:26:37 2006
+@@ -88,7 +88,7 @@
+ ntfsmount_SOURCES = ntfsmount.c utils.c utils.h
+ ntfsmount_LDADD = $(AM_LIBS) $(FUSE_MODULE_LIBS)
+ ntfsmount_LDFLAGS = $(AM_LFLAGS)
+-ntfsmount_CFLAGS = $(FUSE_MODULE_CFLAGS) -DFUSE_USE_VERSION=22
++ntfsmount_CFLAGS = $(FUSE_MODULE_CFLAGS) -DFUSE_USE_VERSION=25
+ endif
+
+ # We don't distribute these
+--- ntfsprogs/Makefile.in.orig Fri Jan 20 11:24:48 2006
++++ ntfsprogs/Makefile.in Fri Jan 20 11:26:40 2006
+@@ -366,7 +366,7 @@
+ @ENABLE_FUSE_MODULE_TRUE@ntfsmount_SOURCES = ntfsmount.c utils.c utils.h
+ @ENABLE_FUSE_MODULE_TRUE@ntfsmount_LDADD = $(AM_LIBS) $(FUSE_MODULE_LIBS)
+ @ENABLE_FUSE_MODULE_TRUE@ntfsmount_LDFLAGS = $(AM_LFLAGS)
+-@ENABLE_FUSE_MODULE_TRUE@ntfsmount_CFLAGS = $(FUSE_MODULE_CFLAGS) -DFUSE_USE_VERSION=22
++@ENABLE_FUSE_MODULE_TRUE@ntfsmount_CFLAGS = $(FUSE_MODULE_CFLAGS) -DFUSE_USE_VERSION=25
+
+ # We don't distribute these
+ ntfsrm_SOURCES = ntfsrm.c ntfsrm.h utils.c utils.h
+--- ntfsprogs/ntfsmount.c.orig Mon Oct 10 14:47:38 2005
++++ ntfsprogs/ntfsmount.c Fri Jan 20 11:42:09 2006
+@@ -81,10 +81,10 @@
+ int state;
+ long free_clusters;
+ long free_mft;
+- uid_t uid;
+- gid_t gid;
+- mode_t fmask;
+- mode_t dmask;
++ unsigned int uid;
++ unsigned int gid;
++ unsigned int fmask;
++ unsigned int dmask;
+ BOOL ro;
+ BOOL show_sys_files;
+ BOOL succeed_chmod;
+@@ -196,7 +196,7 @@
+ * Return 0 on success or -errno on error.
+ */
+ static int ntfs_fuse_statfs(const char *path __attribute__((unused)),
+- struct statfs *sfs)
++ struct statvfs *sfs)
+ {
+ long size;
+ ntfs_volume *vol;
+@@ -204,10 +204,10 @@
+ vol = ctx->vol;
+ if (!vol)
+ return -ENODEV;
+- /* Type of filesystem. */
+- sfs->f_type = NTFS_SB_MAGIC;
+ /* Optimal transfer block size. */
+ sfs->f_bsize = vol->cluster_size;
++ /* XXX This field needs to be filled, I guess it's fine this way... */
++ sfs->f_frsize = vol->cluster_size;
+ /*
+ * Total data blocks in file system in units of f_bsize and since
+ * inodes are also stored in data blocs ($MFT is a file) this is just
+@@ -228,7 +228,7 @@
size = 0;
sfs->f_ffree = size;
/* Maximum length of filenames. */
-+#ifdef __FreeBSD__
+- sfs->f_namelen = NTFS_MAX_NAME_LEN;
+ sfs->f_namemax = NTFS_MAX_NAME_LEN;
-+#else
- sfs->f_namelen = NTFS_MAX_NAME_LEN;
-+#endif
return 0;
}
+@@ -1462,8 +1462,9 @@
+ int main(int argc, char *argv[])
+ {
+ char *parsed_options;
++ struct fuse_args margs = FUSE_ARGS_INIT(0, NULL);
+ struct fuse *fh;
+- int ffd;
++ int ffd = 0;
+
+ utils_set_locale();
+ signal(SIGINT, signal_handler);
+@@ -1491,7 +1492,20 @@
+ }
+ free(opts.device);
+ /* Create filesystem. */
+- ffd = fuse_mount(opts.mnt_point, parsed_options);
++ /*
++ * XXX Eventually, ntfsmount should drop it's homebrew option parsing
++ * routines and use stock ones. Here we don't go that far, we just use the
++ * FUSE opt parsing API to dummily create the structure which satisfies
++ * fuse_mount's current signature (that is, revert all the work which
++ * has been accomplished by the homebrew routine... silly, eh?).
++ */
++ if ((fuse_opt_add_arg(&margs, "") == -1 ||
++ fuse_opt_add_arg(&margs, "-o") == -1 ||
++ fuse_opt_add_arg(&margs, parsed_options) == -1))
++ ffd = -1;
++ if (ffd != -1)
++ ffd = fuse_mount(opts.mnt_point, &margs);
++ fuse_opt_free_args(&margs);
+ if (ffd == -1) {
+ Eprintf("fuse_mount failed.\n");
+ ntfs_fuse_destroy();