aboutsummaryrefslogtreecommitdiffstats
path: root/package/shfs
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2006-10-13 22:51:49 +0200
committerFelix Fietkau <nbd@openwrt.org>2016-03-20 17:29:15 +0100
commit60c1f0f64d23003a19a07d6b9638542130f6641d (patch)
tree8fb2787f4c49baded97cd55e0c371fe1cffce2b6 /package/shfs
parentd58a09110ccfa95f06c983fe796806f2e035c9d2 (diff)
parentb3ce218b51746d3a576221ea542facf3a1703ab2 (diff)
downloadupstream-60c1f0f64d23003a19a07d6b9638542130f6641d.tar.gz
upstream-60c1f0f64d23003a19a07d6b9638542130f6641d.tar.bz2
upstream-60c1f0f64d23003a19a07d6b9638542130f6641d.zip
finally move buildroot-ng to trunk
Diffstat (limited to 'package/shfs')
-rw-r--r--package/shfs/Makefile93
-rw-r--r--package/shfs/patches/101-kmod_build.patch98
-rw-r--r--package/shfs/patches/102-gcc4_fix.patch23
-rw-r--r--package/shfs/patches/103-dentry.patch21
4 files changed, 235 insertions, 0 deletions
diff --git a/package/shfs/Makefile b/package/shfs/Makefile
new file mode 100644
index 0000000000..f4383a3f96
--- /dev/null
+++ b/package/shfs/Makefile
@@ -0,0 +1,93 @@
+#
+# Copyright (C) 2006 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+# $Id$
+
+include $(TOPDIR)/rules.mk
+include $(INCLUDE_DIR)/kernel.mk
+
+PKG_NAME:=shfs
+PKG_VERSION:=0.35
+PKG_RELEASE:=2
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=@SF/shfs
+PKG_MD5SUM:=016f49d71bc32eee2b5d11fc1600cfbe
+PKG_CAT:=zcat
+
+PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/shfs/Default
+ TITLE:=ShFS
+ DESCRIPTION:=\
+ ShFS is a simple and easy to use Linux kernel module which allows you to \\\
+ mount remote filesystems using a plain shell (SSH) connection. When using \\\
+ ShFS, you can access all remote files just like the local ones, only the \\\
+ access is governed through the transport security of SSH.
+ URL:=http://shfs.sourceforge.net/
+endef
+
+define Package/kmod-shfs
+ $(call Package/shfs/Default)
+ SECTION:=kernel
+ CATEGORY:=Kernel drivers
+ DEPENDS:=
+ TITLE+= (kernel module)
+ DESCRIPTION+=\\\
+ \\\
+ This package contains the ShFS kernel module.
+ VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE)
+endef
+
+define Package/shfs-utils
+ $(call Package/shfs/Default)
+ SECTION:=utils
+ CATEGORY:=Utilities
+ DEPENDS:=+kmod-shfs
+ TITLE+= (utilities)
+ DESCRIPTION+=\\\
+ \\\
+ This package contains the ShFS utilities.
+endef
+
+define Build/Compile
+ $(MAKE) -C $(PKG_BUILD_DIR) \
+ ARCH="$(LINUX_KARCH)" \
+ CROSS_COMPILE="$(TARGET_CROSS)" \
+ OFLAGS="$(TARGET_CFLAGS)" \
+ CC="$(TARGET_CC)" \
+ LINKER="$(TARGET_CC)" \
+ KERNEL="$(LINUX_VERSION)" \
+ KERNEL_SOURCES="$(LINUX_DIR)" \
+ ROOT="$(PKG_INSTALL_DIR)" \
+ module module-install
+ $(MAKE) -C $(PKG_BUILD_DIR) \
+ OFLAGS="$(TARGET_CFLAGS)" \
+ CC="$(TARGET_CC)" \
+ LINKER="$(TARGET_CC)" \
+ KERNEL_SOURCES="$(LINUX_DIR)" \
+ ROOT="$(PKG_INSTALL_DIR)" \
+ utils utils-install
+endef
+
+define Package/kmod-shfs/install
+ install -m0755 -d $(1)/lib/modules/$(LINUX_VERSION)
+ $(CP) $(PKG_INSTALL_DIR)/lib/modules/$(LINUX_VERSION)/kernel/fs/shfs/shfs.$(LINUX_KMOD_SUFFIX) \
+ $(1)/lib/modules/$(LINUX_VERSION)/
+endef
+
+define Package/shfs-utils/install
+ install -m0755 -d $(1)/usr/bin
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/shfs{,u}mount $(1)/usr/bin/
+ install -m0755 -d $(1)/sbin
+ $(CP) $(PKG_INSTALL_DIR)/sbin/mount.shfs $(1)/sbin/
+endef
+
+$(eval $(call BuildPackage,kmod-shfs))
+$(eval $(call BuildPackage,shfs-utils))
diff --git a/package/shfs/patches/101-kmod_build.patch b/package/shfs/patches/101-kmod_build.patch
new file mode 100644
index 0000000000..11701033f5
--- /dev/null
+++ b/package/shfs/patches/101-kmod_build.patch
@@ -0,0 +1,98 @@
+--- shfs-0.35-orig/shfs/Linux-2.4/Makefile 2004-06-01 15:16:19.000000000 +0200
++++ shfs-0.35-2/shfs/Linux-2.4/Makefile 2005-04-09 02:34:35.000000000 +0200
+@@ -1,3 +1,13 @@
++#
++# the original Makefile was trashed and replaced by this one
++# The main reason is that loadable modules should be built with
++# the same compile flags the kernel was built with, so we'd better
++# let the kernel tree build the module for us, like that :
++#
++# make -C $(KERNEL_DIR) SUBDIRS="$(shell pwd)" modules
++# make -C $(KERNEL_DIR) SUBDIRS="$(shell pwd)" modules_install
++#
++
+ ifndef KERNEL
+ KERNEL=$(shell uname -r)
+ endif
+@@ -10,67 +24,29 @@
+ KERNEL_SOURCES=${MODULESDIR}/build
+ endif
+
+-ifeq (${MODVERSIONS},detect)
+- ifeq ($(shell test -e ${KERNEL_SOURCES}/include/linux/modversions.h; echo $$?),0)
+- MODVERSIONS=yes
+- endif
+-endif
+-
+-ifeq (${MODVERSIONS},yes)
+-MVER=-DMODVERSIONS -DEXPORT_SYMTAB
+-endif
+-
+-LINVER=linux-${KERNEL}
+-
+-ALL_TARGETS := shfs.o
+-
+-SEARCHDIRS := -I- -I. -I${KERNEL_SOURCES}/include #-I/usr/src/linux/include/
++all: all-y
+
+-CC := gcc
+-CFLAGS = -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe -Wall ${SEARCHDIRS} -DMODULE ${MVER} -D__KERNEL__ -DLINUX
+-LINKER := ld
+-LDFLAGS = -r
+-LOADLIBES :=
++O_TARGET := shfs.o
+
+-all: ${ALL_TARGETS}
++shfs-objs := dcache.o dir.o fcache.o file.o inode.o ioctl.o proc.o shell.o symlink.o
+
+-%.o: %.c $(wildcard *.h)
+- ${CC} ${CFLAGS} -c $< -o $@
++obj-y := $(shfs-objs)
++obj-m := $(O_TARGET)
+
+-shfs.o: dcache.o dir.o fcache.o file.o inode.o ioctl.o proc.o shell.o symlink.o
+- ${LINKER} ${LDFLAGS} -o $@ ${filter-out %.a %.so, $^} ${LOADLIBES}
+-
+-tidy:
+- ${RM} core dcache.o dir.o fcache.o file.o inode.o ioctl.o proc.o shell.o symlink.o
+-
+-clean: tidy patch-clean
+- ${RM} shfs.o
++-include $(TOPDIR)/Rules.make
+
++all-y:
++ make -C ${KERNEL_SOURCES} TOPDIR="${KERNEL_SOURCES}" SUBDIRS="$(shell pwd)" modules
++
+ install: shfs.o
+ rm -f ${MODULESDIR}/kernel/fs/shfs/shfs.o
+ install -m644 -b -D shfs.o ${MODULESDIR}/kernel/fs/shfs/shfs.o
+- if [ -x /sbin/depmod -a "${ROOT}" = "/" ]; then /sbin/depmod -aq; fi
+
+ uninstall:
+ rm -rf ${MODULESDIR}/kernel/fs/shfs
+- if [ -x /sbin/depmod -a "${ROOT}" = "/" ]; then /sbin/depmod -aq; fi
+
+-patch:
+- rm -rf ${LINVER} ${LINVER}.orig; mkdir ${LINVER};
+- for i in Documentation fs/shfs include/linux; do \
+- mkdir -p ${LINVER}/$$i; \
+- done
+- cp ${KERNEL_SOURCES}/Documentation/Configure.help ${LINVER}/Documentation
+- cp ${KERNEL_SOURCES}/fs/{Makefile,Config.in} ${LINVER}/fs
+- cp -r ${LINVER} ${LINVER}.orig
+- cp ../../Changelog *.c shfs_debug.h proc.h ${LINVER}/fs/shfs/
+- cp shfs.h shfs_fs* ${LINVER}/include/linux/
+- (cd ${LINVER}; patch -p1 <../kernel-config.diff)
+- find . -type f -name "*.orig" -print | xargs rm -f
+- diff -urN ${LINVER}.orig ${LINVER} >${LINVER}.diff; true
+-
+-patch-clean:
+- rm -rf ${LINVER} ${LINVER}.orig;
+- rm -f ${LINVER}.diff
+-
+-.PHONY : all tidy clean install uninstall patch patch-clean
++clean:
++ rm -f core *.o *.a *.s
++
++shfs.o: $(shfs-objs)
++
diff --git a/package/shfs/patches/102-gcc4_fix.patch b/package/shfs/patches/102-gcc4_fix.patch
new file mode 100644
index 0000000000..c4fd36629b
--- /dev/null
+++ b/package/shfs/patches/102-gcc4_fix.patch
@@ -0,0 +1,23 @@
+diff -ur shfs-0.35/shfs/Linux-2.6/dir.c shfs-0.35-new/shfs/Linux-2.6/dir.c
+--- shfs-0.35/shfs/Linux-2.6/dir.c 2004-06-01 09:16:19.000000000 -0400
++++ shfs-0.35-new/shfs/Linux-2.6/dir.c 2005-02-11 18:12:00.000000000 -0500
+@@ -19,6 +19,8 @@
+ #include "shfs_debug.h"
+ #include "proc.h"
+
++static struct dentry_operations shfs_dentry_operations;
++
+ static int
+ shfs_dir_open(struct inode *inode, struct file *filp)
+ {
+diff -ur shfs-0.35/shfs/Linux-2.6/shfs_fs.h shfs-0.35-new/shfs/Linux-2.6/shfs_fs.h
+--- shfs-0.35/shfs/Linux-2.6/shfs_fs.h 2004-06-01 09:16:19.000000000 -0400
++++ shfs-0.35-new/shfs/Linux-2.6/shfs_fs.h 2005-02-11 18:12:03.000000000 -0500
+@@ -50,7 +50,6 @@
+ #define ROUND_TO_MINS(x) do { (x).tv_sec = ((x).tv_sec / 60) * 60; (x).tv_nsec = 0; } while (0)
+
+ /* shfs/dir.c */
+-extern struct dentry_operations shfs_dentry_operations;
+ extern struct file_operations shfs_dir_operations;
+ extern struct inode_operations shfs_dir_inode_operations;
+ extern void shfs_new_dentry(struct dentry *dentry);
diff --git a/package/shfs/patches/103-dentry.patch b/package/shfs/patches/103-dentry.patch
new file mode 100644
index 0000000000..83a406a268
--- /dev/null
+++ b/package/shfs/patches/103-dentry.patch
@@ -0,0 +1,21 @@
+diff -urN shfs-0.35.orig/shfs/Linux-2.6/dcache.c shfs-0.35/shfs/Linux-2.6/dcache.c
+--- shfs-0.35.orig/shfs/Linux-2.6/dcache.c 2004-06-01 09:16:19.000000000 -0400
++++ shfs-0.35/shfs/Linux-2.6/dcache.c 2006-03-25 07:08:57.950752296 -0500
+@@ -68,7 +68,7 @@
+ spin_lock(&dcache_lock);
+ next = parent->d_subdirs.next;
+ while (next != &parent->d_subdirs) {
+- dentry = list_entry(next, struct dentry, d_child);
++ dentry = list_entry(next, struct dentry, d_u.d_child);
+ dentry->d_fsdata = NULL;
+ shfs_age_dentry(info, dentry);
+ next = next->next;
+@@ -101,7 +101,7 @@
+ spin_lock(&dcache_lock);
+ next = parent->d_subdirs.next;
+ while (next != &parent->d_subdirs) {
+- dent = list_entry(next, struct dentry, d_child);
++ dent = list_entry(next, struct dentry, d_u.d_child);
+ if ((unsigned long)dent->d_fsdata == fpos) {
+ if (dent->d_inode)
+ dget_locked(dent);