# ChangeLog for net-fs/shfs
# Copyright 2000-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-fs/shfs/ChangeLog,v 1.16 2004/12/15 06:40:23 stuart Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-fs/shfs/ChangeLog,v 1.17 2004/12/19 19:13:36 stuart Exp $
+
+ 19 Dec 2004; Stuart Herbert <stuart@gentoo.org> +files/0.35/df.patch,
+ +files/0.35/space_chars.patch, +files/0.35/uidgid32.patch:
+ Added patches; see bug #60270; thanks to S.Caglar Onur
+ <caglar.onur@tubitak.gov.tr>
14 Dec 2004; Stuart Herbert <stuart@gentoo.org> shfs-0.35.ebuild:
Marked stable on x86 after plenty of user feedback ;)
-MD5 674e1f818a760eb4114a8c4c20592e1c ChangeLog 2738
+MD5 b552143e5041662b8a04da6da9a7ffbb ChangeLog 2960
MD5 9e3de9f34b9e3248eb5ff2e24ad1c819 metadata.xml 281
MD5 696adcd66d7fd7cba917e108a97e518b shfs-0.31-r1.ebuild 2657
MD5 d651ff3bd72489e0257c8b1f53c73056 shfs-0.31.ebuild 1757
MD5 d260d17c23662e71251cf89929fe2a04 shfs-0.32.ebuild 2951
MD5 6fb46052947475dc72b282ad2f594602 shfs-0.34.ebuild 3074
MD5 134fdbd9defa0abc3e820e80d1800399 shfs-0.35.ebuild 3071
+MD5 d957ce9484370cb2a9e444e90b3fe0f9 shfs-0.35-r1.ebuild 3107
MD5 d9c3f912bc5642882b84fa7f3edd8db8 files/amd.conf 842
MD5 97e8d1e483ac538a072e0e82af787eeb files/amd.shfs 152
MD5 6c1fade43f037362288f5f508ba5fe47 files/digest-shfs-0.31 62
MD5 dadc96e2e75365f207cbb3e90f565821 files/shfs-gentoo-0.31-ppc.diff 707
MD5 6313c7875b293c2a942bdad09f3937cc files/shfs-gentoo-0.32-makefile-debug.diff 657
MD5 bdf9a4a620ff5bcd7828251c144ec02b files/shfs.mount 1346
+MD5 8bdaeb75d54befa6b5d6f2bfe6657a60 files/digest-shfs-0.35-r1 61
+MD5 29b3f063e5feb8c259abc86d07f92f85 files/0.35/df.patch 1652
+MD5 e5f37f793e95acdfd8e89affe9949160 files/0.35/space_chars.patch 1276
+MD5 29e5b080a1744f8283b8f55d5b904a60 files/0.35/uidgid32.patch 940
--- /dev/null
+--- TODO 1 Jun 2004 13:03:21 -0000 1.10
++++ TODO 18 Jun 2004 12:19:52 -0000
+@@ -1,5 +1,8 @@
+ TODO for shfs:
+
++* revise 2.6 kernel module install (according to lk post)
++* more comprehensive error messages
++* local uid preserve..
+ * rewrite stack allocations -> kmalloc
+ * sftp server code support
+ * autoconf
+--- shfs/Linux-2.4/shell.c 3 Jun 2004 13:20:44 -0000 1.8
++++ shfs/Linux-2.4/shell.c 18 Jun 2004 12:19:52 -0000
+@@ -961,11 +961,11 @@
+
+ s = info->sockbuf;
+ if ((p = strsep(&s, " ")))
+- attr->f_blocks = simple_strtoull(p, NULL, 10);
++ attr->f_blocks = simple_strtoull(p, NULL, 10) >> 2;
+ if ((p = strsep(&s, " ")))
+- attr->f_bfree = attr->f_blocks - simple_strtoull(p, NULL, 10);
++ attr->f_bfree = attr->f_blocks - (simple_strtoull(p, NULL, 10) >> 2);
+ if ((p = strsep(&s, " ")))
+- attr->f_bavail = simple_strtoull(p, NULL, 10);
++ attr->f_bavail = simple_strtoull(p, NULL, 10) >> 2;
+
+ result = sock_readln(info, info->sockbuf, SOCKBUF_SIZE);
+ if (result < 0)
+--- shfs/Linux-2.6/shell.c 3 Jun 2004 13:20:47 -0000 1.9
++++ shfs/Linux-2.6/shell.c 18 Jun 2004 12:19:53 -0000
+@@ -974,11 +974,11 @@
+
+ s = info->sockbuf;
+ if ((p = strsep(&s, " ")))
+- attr->f_blocks = simple_strtoull(p, NULL, 10);
++ attr->f_blocks = simple_strtoull(p, NULL, 10) >> 2;
+ if ((p = strsep(&s, " ")))
+- attr->f_bfree = attr->f_blocks - simple_strtoull(p, NULL, 10);
++ attr->f_bfree = attr->f_blocks - (simple_strtoull(p, NULL, 10) >> 2);
+ if ((p = strsep(&s, " ")))
+- attr->f_bavail = simple_strtoull(p, NULL, 10);
++ attr->f_bavail = simple_strtoull(p, NULL, 10) >> 2;
+
+ result = sock_readln(info, info->sockbuf, SOCKBUF_SIZE);
+ if (result < 0)
--- /dev/null
+--- shfs/Linux-2.4/shell.c 31 May 2004 16:32:13 -0000 1.6
++++ shfs/Linux-2.4/shell.c 3 Jun 2004 09:09:54 -0000
+@@ -213,6 +213,7 @@
+ int c = 0;
+ int is_space = 1;
+ int device = 0;
++ char *start = s;
+
+ while (*s) {
+ if (c == DIR_COLS)
+@@ -227,17 +228,20 @@
+ s++;
+ }
+ *s = '\0';
++ start = s+1;
+ is_space = 1;
++ } else {
++ if (c != DIR_NAME)
++ start = s+1;
+ }
+ } else {
+ if (is_space) {
+ /* (b)lock/(c)haracter device hack */
+- col[c++] = s;
++ col[c++] = start;
+ is_space = 0;
+ if ((c-1 == DIR_PERM) && ((*s == 'b')||(*s == 'c'))) {
+ device = 1;
+ }
+-
+ }
+ }
+ s++;
+--- shfs/Linux-2.6/shell.c 31 May 2004 16:32:13 -0000 1.7
++++ shfs/Linux-2.6/shell.c 3 Jun 2004 09:09:57 -0000
+@@ -225,6 +225,7 @@
+ int c = 0;
+ int is_space = 1;
+ int device = 0;
++ char *start = s;
+
+ while (*s) {
+ if (c == DIR_COLS)
+@@ -239,17 +240,20 @@
+ s++;
+ }
+ *s = '\0';
++ start = s+1;
+ is_space = 1;
++ } else {
++ if (c != DIR_NAME)
++ start = s+1;
+ }
+ } else {
+ if (is_space) {
+ /* (b)lock/(c)haracter device hack */
+- col[c++] = s;
++ col[c++] = start;
+ is_space = 0;
+ if ((c-1 == DIR_PERM) && ((*s == 'b')||(*s == 'c'))) {
+ device = 1;
+ }
+-
+ }
+ }
+ s++;
--- /dev/null
+--- shfs/Linux-2.4/shfs_fs_sb.h 24 Mar 2004 13:40:02 -0000 1.2
++++ shfs/Linux-2.4/shfs_fs_sb.h 3 Jun 2004 17:12:28 -0000
+@@ -38,10 +38,10 @@
+ struct shfs_fileops fops;
+ int version;
+ int ttl;
+- __kernel_uid_t uid;
+- __kernel_gid_t gid;
+- __kernel_mode_t root_mode;
+- __kernel_mode_t fmask;
++ uid_t uid;
++ gid_t gid;
++ mode_t root_mode;
++ mode_t fmask;
+ char mount_point[SHFS_PATH_MAX];
+ struct semaphore sock_sem; /* next 4 vars are guarded */
+ struct file *sock;
+--- shfs/Linux-2.6/shfs_fs_sb.h 24 Mar 2004 13:40:02 -0000 1.2
++++ shfs/Linux-2.6/shfs_fs_sb.h 3 Jun 2004 17:12:28 -0000
+@@ -38,10 +38,10 @@
+ struct shfs_fileops fops;
+ int version;
+ int ttl;
+- __kernel_uid_t uid;
+- __kernel_gid_t gid;
+- __kernel_mode_t root_mode;
+- __kernel_mode_t fmask;
++ uid_t uid;
++ gid_t gid;
++ mode_t root_mode;
++ mode_t fmask;
+ char mount_point[SHFS_PATH_MAX];
+ struct semaphore sock_sem; /* next 4 vars are guarded */
+ struct file *sock;
--- /dev/null
+MD5 016f49d71bc32eee2b5d11fc1600cfbe shfs-0.35.tar.gz 128656
--- /dev/null
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-fs/shfs/shfs-0.35-r1.ebuild,v 1.1 2004/12/19 19:13:36 stuart Exp $
+
+inherit eutils
+
+IUSE="amd doc"
+
+DESCRIPTION="Secure Shell File System"
+HOMEPAGE="http://shfs.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="x86 ~ppc ~amd64"
+DEPEND="virtual/linux-sources
+ net-misc/openssh
+ amd? ( net-fs/am-utils )"
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+ # epatch ${FILESDIR}/shfs-gentoo-${PV}-makefile-debug.diff
+ epatch ${FILESDIR}/0.35/*.patch
+}
+
+src_compile() {
+
+ cd ${S}/shfsmount
+ emake ROOT=${D} MODULESDIR=${D}/lib/modules/${KV} \
+ KERNEL_SOURCES=/usr/src/linux || die
+
+ if [ "`echo ${KV}|grep 2.6`" ] ; then
+ cd ${S}/shfs/Linux-2.6/
+ GENTOO_ARCH=${ARCH}
+ unset ARCH
+ addwrite "/usr/src/${FK}"
+ export _POSIX2_VERSION=199209
+ emake -j1 -C /usr/src/linux SUBDIRS="`pwd`" modules || die
+ export ARCH=GENTOO_ARCH
+ else
+ cd ${S}/shfs/Linux-2.4/
+ emake ROOT=${D} MODULESDIR=${D}/lib/modules/${KV} \
+ KERNEL_SOURCES=/usr/src/linux || die
+ fi
+
+ cd ${S}
+ emake docs || die
+}
+
+src_install() {
+ # Install kernel module
+ cd ${S}/shfs/Linux-`echo ${KV}|sed "s/^\([0-9]*\.[0-9]*\).*/\1/"`
+
+ dodir /lib/modules/${KV}/kernel/fs/shfs/
+ insinto /lib/modules/${KV}/kernel/fs/shfs/
+
+ if [ "`echo ${KV}|grep 2.6`" ] ; then
+ doins shfs.ko || die
+ else
+ doins shfs.o || die
+ fi
+
+# Install binaries
+ cd ${S}/shfsmount
+ dobin shfsmount
+ dobin shfsumount
+
+ # Allows users to mount/umount
+ einfo " Setting suid bit on /usr/bin executables..."
+ fperms 4511 /usr/bin/shfsmount
+ fperms 4511 /usr/bin/shfsumount
+
+ # Performs symlink to support use of mount(8)
+ dodir /sbin
+ einfo " Adding /sbin/mount.shfs symlink..."
+ dosym /usr/bin/shfsmount /sbin/mount.shfs
+
+ # Install docs
+ doman ${S}/docs/manpages/shfsmount.8 ${S}/docs/manpages/shfsumount.8
+ use doc && dohtml -r ${S}/docs/html
+
+ # Install automount support (if desired)
+ if use amd ; then
+ einfo " Installing am-utils config files..."
+ insinto /etc/amd
+ doins ${FILESDIR}/amd.conf
+ doins ${FILESDIR}/amd.shfs
+ exeinto /etc/amd
+ doexe ${FILESDIR}/shfs.mount
+ dosym /etc/amd/shfs.mount /etc/amd/shfs.unmount
+ fi
+}
+
+pkg_postinst() {
+ echo "running depmod...."
+ depmod -aq || die
+
+ echo " "
+ einfo " Use either 'shfsmount' or 'mount -t shfs' to mount remote"
+ einfo " filesystems to into your local filesystem. "
+ echo " "
+ echo " "
+ einfo " Note the following: "
+ einfo " "
+ einfo " 1. The shfs kernel module has to be loaded first "
+ einfo " before you can start mounting filesystems. "
+ einfo " Try: 'modprobe shfs' as root. "
+ einfo " "
+ einfo " 2. When mounting, you must enter the absolute path of "
+ einfo " the remote filesystem without any special chars, "
+ einfo " such as tilde (~), for example. "
+ echo " "
+}