Some fixes for fuse24.

Because sshfs expects character device to be /dev/fuse instead of /dev/misc/fuse, sshfs fails.
This patch creates fuse device at /dev/fuse instead, also for compatibility the postinstall script (only executed when manually installed per opkg) creates /dev/misc/fuse
added the dcache enabled kernel message to fuse24

Closes #5333

SVN-Revision: 16447
This commit is contained in:
Hauke Mehrtens 2009-06-14 11:36:19 +00:00
parent b744dced08
commit af432e7a52
6 changed files with 32 additions and 43 deletions

View file

@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=fuse PKG_NAME:=fuse
PKG_VERSION:=2.5.3 PKG_VERSION:=2.5.3
PKG_RELEASE:=1 PKG_RELEASE:=2
PKG_MD5SUM:=9c7e8b6606b9f158ae20b8521ba2867c PKG_MD5SUM:=9c7e8b6606b9f158ae20b8521ba2867c
PKG_SOURCE_URL:=@SF/$(PKG_NAME) PKG_SOURCE_URL:=@SF/$(PKG_NAME)
@ -48,7 +48,7 @@ endef
define KernelPackage/fuse24/install define KernelPackage/fuse24/install
$(call $(Package/kmod-fuse24/install)) $(call $(Package/kmod-fuse24/install))
echo mknod /dev/fuse -m 0666 c 10 229 >> $(1)/CONTROL/postinst echo '[ ! -d /dev/misc ]&& umask 022 && mkdir /dev/misc ; mknod /dev/misc/fuse -m 0666 c 10 229' >> $(1)/CONTROL/postinst
endef endef
define Build/Configure define Build/Configure
@ -107,8 +107,6 @@ endef
define Build/InstallDev define Build/InstallDev
mkdir -p $(1)/usr/include mkdir -p $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/fuse{,.h} $(1)/usr/include/ $(CP) $(PKG_INSTALL_DIR)/usr/include/fuse{,.h} $(1)/usr/include/
# mkdir -p $(1)/usr/lib
# $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfuse.{a,so*} $(1)/usr/lib/
mkdir -p $(1)/usr/lib/pkgconfig mkdir -p $(1)/usr/lib/pkgconfig
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/fuse.pc $(1)/usr/lib/pkgconfig/ $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/fuse.pc $(1)/usr/lib/pkgconfig/
$(SED) 's,-I$$$${includedir}/fuse,,g' $(1)/usr/lib/pkgconfig/fuse.pc $(SED) 's,-I$$$${includedir}/fuse,,g' $(1)/usr/lib/pkgconfig/fuse.pc

View file

@ -1,7 +1,6 @@
diff -Nur fuse-2.5.2/kernel/Makefile.in fuse-2.5.2.patched/kernel/Makefile.in --- a/kernel/Makefile.in
--- fuse-2.5.2/kernel/Makefile.in 2006-02-02 18:04:52.000000000 +0100 +++ b/kernel/Makefile.in
+++ fuse-2.5.2.patched/kernel/Makefile.in 2006-03-28 20:17:13.000000000 +0200 @@ -54,23 +54,8 @@ distdir: $(DISTFILES) $(COMPATDISTFILES)
@@ -54,23 +54,8 @@
ifeq ($(majver), 2.4) ifeq ($(majver), 2.4)
@ -25,7 +24,7 @@ diff -Nur fuse-2.5.2/kernel/Makefile.in fuse-2.5.2.patched/kernel/Makefile.in
fuse_headers = fuse_i.h fuse_kernel.h fuse_headers = fuse_i.h fuse_kernel.h
dev.o: $(fuse_headers) dev.o: $(fuse_headers)
@@ -78,6 +63,18 @@ @@ -78,6 +63,18 @@ dir.o: $(fuse_headers)
file.o: $(fuse_headers) file.o: $(fuse_headers)
inode.o: $(fuse_headers) inode.o: $(fuse_headers)

View file

@ -1,7 +1,6 @@
diff -ruN fuse-2.5.3-old/kernel/Makefile.in fuse-2.5.3-new/kernel/Makefile.in --- a/kernel/Makefile.in
--- fuse-2.5.3-old/kernel/Makefile.in 2006-06-17 00:04:06.000000000 +0200 +++ b/kernel/Makefile.in
+++ fuse-2.5.3-new/kernel/Makefile.in 2006-06-17 00:08:44.000000000 +0200 @@ -31,11 +31,9 @@ all-y: all-spec
@@ -31,11 +31,9 @@
install-y: all install-y: all
$(mkdir_p) $(DESTDIR)$(fusemoduledir) $(mkdir_p) $(DESTDIR)$(fusemoduledir)
$(INSTALL) -m 644 $(fusemodule) $(DESTDIR)$(fusemoduledir)/$(fusemodule) $(INSTALL) -m 644 $(fusemodule) $(DESTDIR)$(fusemoduledir)/$(fusemodule)

View file

@ -1,16 +0,0 @@
diff -ruw fuse-2.4.0/util/fusermount.c.org fuse-2.4.0/util/fusermount.c
--- fuse-2.4.0/util/fusermount.c.org 2005-10-14 11:34:06.000000000 +0200
+++ fuse-2.4.0/util/fusermount.c 2005-10-14 11:56:26.000000000 +0200
@@ -42,7 +42,12 @@
#define FUSE_COMMFD_ENV "_FUSE_COMMFD"
#define FUSE_DEV_OLD "/proc/fs/fuse/dev"
+#ifdef __UCLIBC__
+/* /dev is mounted as devfs in OpenWRT, and device is created here */
+#define FUSE_DEV_NEW "/dev/misc/fuse"
+#else
#define FUSE_DEV_NEW "/dev/fuse"
+#endif
#define FUSE_VERSION_FILE_OLD "/proc/fs/fuse/version"
#define FUSE_CONF "/etc/fuse.conf"

View file

@ -1,7 +1,6 @@
diff -ruN fuse-2.4.1-old/util/Makefile.in fuse-2.4.1-new/util/Makefile.in --- a/util/Makefile.in
--- fuse-2.4.1-old/util/Makefile.in 2005-10-17 12:29:20.000000000 +0200 +++ b/util/Makefile.in
+++ fuse-2.4.1-new/util/Makefile.in 2005-10-19 17:11:13.000000000 +0200 @@ -453,7 +453,7 @@ uninstall-am: uninstall-binPROGRAMS unin
@@ -445,7 +445,7 @@
install-exec-hook: install-exec-hook:
-chown root $(DESTDIR)$(bindir)/fusermount -chown root $(DESTDIR)$(bindir)/fusermount
-chmod u+s $(DESTDIR)$(bindir)/fusermount -chmod u+s $(DESTDIR)$(bindir)/fusermount

View file

@ -1,7 +1,6 @@
diff -ruN fuse-2.5.3.orig/kernel/dev.c fuse-2.5.3/kernel/dev.c --- a/kernel/dev.c
--- fuse-2.5.3.orig/kernel/dev.c 2006-02-02 19:04:52.000000000 +0200 +++ b/kernel/dev.c
+++ fuse-2.5.3/kernel/dev.c 2008-10-23 10:27:53.000000000 +0300 @@ -512,6 +512,9 @@ static int fuse_copy_fill(struct fuse_co
@@ -512,6 +512,9 @@
{ {
unsigned long offset; unsigned long offset;
int err; int err;
@ -11,7 +10,7 @@ diff -ruN fuse-2.5.3.orig/kernel/dev.c fuse-2.5.3/kernel/dev.c
unlock_request(cs->req); unlock_request(cs->req);
fuse_copy_finish(cs); fuse_copy_finish(cs);
@@ -523,14 +526,22 @@ @@ -523,14 +526,22 @@ static int fuse_copy_fill(struct fuse_co
cs->nr_segs --; cs->nr_segs --;
} }
down_read(&current->mm->mmap_sem); down_read(&current->mm->mmap_sem);
@ -34,7 +33,7 @@ diff -ruN fuse-2.5.3.orig/kernel/dev.c fuse-2.5.3/kernel/dev.c
cs->buf = cs->mapaddr + offset; cs->buf = cs->mapaddr + offset;
cs->len = min(PAGE_SIZE - offset, cs->seglen); cs->len = min(PAGE_SIZE - offset, cs->seglen);
cs->seglen -= cs->len; cs->seglen -= cs->len;
@@ -545,6 +556,11 @@ @@ -545,6 +556,11 @@ static inline int fuse_copy_do(struct fu
{ {
unsigned ncpy = min(*size, cs->len); unsigned ncpy = min(*size, cs->len);
if (val) { if (val) {
@ -46,9 +45,8 @@ diff -ruN fuse-2.5.3.orig/kernel/dev.c fuse-2.5.3/kernel/dev.c
if (cs->write) if (cs->write)
memcpy(cs->buf, *val, ncpy); memcpy(cs->buf, *val, ncpy);
else else
diff -ruN fuse-2.5.3.orig/kernel/fuse_i.h fuse-2.5.3/kernel/fuse_i.h --- a/kernel/fuse_i.h
--- fuse-2.5.3.orig/kernel/fuse_i.h 2006-02-02 19:04:52.000000000 +0200 +++ b/kernel/fuse_i.h
+++ fuse-2.5.3/kernel/fuse_i.h 2008-10-22 18:03:50.000000000 +0300
@@ -45,6 +45,10 @@ @@ -45,6 +45,10 @@
# endif # endif
#endif #endif
@ -60,4 +58,16 @@ diff -ruN fuse-2.5.3.orig/kernel/fuse_i.h fuse-2.5.3/kernel/fuse_i.h
#include "config.h" #include "config.h"
#ifndef KERNEL_2_6 #ifndef KERNEL_2_6
# include <linux/config.h> # include <linux/config.h>
--- a/kernel/inode.c
+++ b/kernel/inode.c
@@ -739,6 +739,10 @@ static int __init fuse_init(void)
printk("fuse distribution version: %s\n", FUSE_VERSION);
#endif
+#ifdef DCACHE_BUG
+printk("fuse init: DCACHE_BUG enabled\n");
+#endif
+
spin_lock_init(&fuse_lock);
res = fuse_fs_init();
if (res)