summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net-fs/shfs/ChangeLog21
-rw-r--r--net-fs/shfs/Manifest4
-rw-r--r--net-fs/shfs/files/amd.conf35
-rw-r--r--net-fs/shfs/files/amd.shfs1
-rw-r--r--net-fs/shfs/files/digest-shfs-0.311
-rw-r--r--net-fs/shfs/files/shfs-gentoo-0.31-makefile-root.diff19
-rw-r--r--net-fs/shfs/files/shfs-gentoo-0.31-ppc.diff19
-rw-r--r--net-fs/shfs/files/shfs.mount61
-rw-r--r--net-fs/shfs/shfs-0.31.ebuild66
9 files changed, 225 insertions, 2 deletions
diff --git a/net-fs/shfs/ChangeLog b/net-fs/shfs/ChangeLog
new file mode 100644
index 000000000000..caf97a5897f6
--- /dev/null
+++ b/net-fs/shfs/ChangeLog
@@ -0,0 +1,21 @@
+# ChangeLog for net-fs/shfs
+# Copyright 2000-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-fs/shfs/ChangeLog,v 1.1 2003/06/03 07:38:29 absinthe Exp $
+
+*shfs-0.31 (03 Jun 2003)
+
+ 03 Jun 2003; Dylan Carlson <absinthe@gentoo.org> shfs-0.31.ebuild,
+ files/shfs-gentoo-0.31-makefile-root.diff,
+ files/shfs-gentoo-0.31-ppc.diff:
+
+ Initial import. Closes #20882. Add the 'amd' USE if you want to take
+ advantage of the AMD (BSD) automounter support included in this ebuild.
+
+ Thanks to:
+ Gilberto Ficara <g.ficara@oltrelinux.com>
+ Jesse Dearing <countzero@zerothdimension.net>
+ Matt Klosterman <matt@klosterman.net>
+ Jonathan Hitchcock <vhata-gentoo@rucus.ru.ac.za>
+
+ Still needs testing, and integration by other archs (sparc and alpha).
+ But let's fly with it for now. Cheers.
diff --git a/net-fs/shfs/Manifest b/net-fs/shfs/Manifest
index bf660a2cf48f..852431bf00b5 100644
--- a/net-fs/shfs/Manifest
+++ b/net-fs/shfs/Manifest
@@ -1,7 +1,7 @@
MD5 7bbbaeef212f17eeb8de0d47ee8576c6 shfs-0.31.ebuild 1658
-MD5 ec8c8284064be4f553d3f99cc830efc7 ChangeLog 770
+MD5 3a4e5d1dcb6736a4bd14e9751ba5f2fa ChangeLog 856
MD5 a47ecfb8f1ab11f208660d0b45c1a3d7 files/shfs-gentoo-0.31-makefile-root.diff 612
-MD5 63b7ebc6673ade1ddb13ba9218bea4e9 files/amd.conf 841
+MD5 d9c3f912bc5642882b84fa7f3edd8db8 files/amd.conf 842
MD5 97e8d1e483ac538a072e0e82af787eeb files/amd.shfs 152
MD5 2b5d290ea6b4e294eb222f277012263b files/shfs.mount 1342
MD5 d9ef6cc568f7b1bde782bcb637f31230 files/shfs-gentoo-0.31-ppc.diff 771
diff --git a/net-fs/shfs/files/amd.conf b/net-fs/shfs/files/amd.conf
new file mode 100644
index 000000000000..65ccb242f0a7
--- /dev/null
+++ b/net-fs/shfs/files/amd.conf
@@ -0,0 +1,35 @@
+#
+# amd default config file
+#
+# check amd.conf(5) man page for details about options in this file
+#
+# $Id: amd.conf,v 1.1 2003/06/03 07:38:29 absinthe Exp $
+
+# GLOBAL OPTIONS SECTION
+[ global ]
+normalize_hostnames = no
+print_pid = yes
+pid_file = /var/run/amd.pid
+restart_mounts = yes
+auto_dir = /.automount
+log_file = syslog
+log_options = all
+plock = no
+selectors_on_default = yes
+print_version = no
+map_type = file
+search_path = /etc/amd
+browsable_dirs = no
+show_statfs_entries = no
+fully_qualified_hosts = no
+cache_duration = 300
+
+# DEFINE AN AMD MOUNT POINT
+[ /net ]
+map_name = amd.net
+map_type = file
+
+# SHFS: AUTO ADDED
+[ /shfs ]
+map_name = /etc/amd/amd.shfs
+# SHFS: END
diff --git a/net-fs/shfs/files/amd.shfs b/net-fs/shfs/files/amd.shfs
new file mode 100644
index 000000000000..3b150a84980f
--- /dev/null
+++ b/net-fs/shfs/files/amd.shfs
@@ -0,0 +1 @@
+* type:=program;fs:=${autodir}/${rhost}${rfs};mount:="/etc/amd/shfs.mount mount ${uid} ${key} ${fs}";unmount:="/etc/amd/shfs.umount umount ${fs}"
diff --git a/net-fs/shfs/files/digest-shfs-0.31 b/net-fs/shfs/files/digest-shfs-0.31
new file mode 100644
index 000000000000..c69b1f0e222b
--- /dev/null
+++ b/net-fs/shfs/files/digest-shfs-0.31
@@ -0,0 +1 @@
+MD5 61d7ed5faaf5d98381fd18b103f58359 shfs-0.31-1.tar.gz 71010
diff --git a/net-fs/shfs/files/shfs-gentoo-0.31-makefile-root.diff b/net-fs/shfs/files/shfs-gentoo-0.31-makefile-root.diff
new file mode 100644
index 000000000000..b01fecc3d7d4
--- /dev/null
+++ b/net-fs/shfs/files/shfs-gentoo-0.31-makefile-root.diff
@@ -0,0 +1,19 @@
+diff -ur shfs-0.31-1/Makefile shfs-0.31-1.orig/Makefile
+--- shfs-0.31-1.orig/Makefile 2003-06-01 16:31:17.000000000 -0500
++++ shfs-0.31-1/Makefile 2003-06-01 18:03:09.000000000 -0500
+@@ -1,5 +1,5 @@
+ # for making packages
+-ROOT=/
++ROOT=${D}
+ # where to install modules
+ MODULESDIR=${ROOT}/lib/modules/$(shell uname -r)
+ # kernel source tree
+@@ -7,7 +7,7 @@
+ # use modversions?
+ MODVERSIONS=yes
+ # leave empty if you don't need amd support
+-AMD_CONF_DIR=/etc/am-utils/
++# AMD_CONF_DIR=/etc/am-utils/
+ # leave empty if you don't need man pages installed
+ MAN_PAGE_DIR=
+ # leave empty if you don't need html manual
diff --git a/net-fs/shfs/files/shfs-gentoo-0.31-ppc.diff b/net-fs/shfs/files/shfs-gentoo-0.31-ppc.diff
new file mode 100644
index 000000000000..5d7b84694ee0
--- /dev/null
+++ b/net-fs/shfs/files/shfs-gentoo-0.31-ppc.diff
@@ -0,0 +1,19 @@
+*** /var/tmp/portage/shfs-0.31/work/shfs-0.31-1.orig/shfs/Makefile Sun Jun 1 23:47:27 2003
+--- /var/tmp/portage/shfs-0.31/work/shfs-0.31-1/shfs/Makefile Sun Jun 1 23:47:58 2003
+*************** SEARCHDIRS := -I- -I. -I${KERNEL_SOURCES
+*** 17,23 ****
+ CC := gcc
+ CFLAGS = -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe -Wall ${SEARCHDIRS} -DMODULE ${MVER} -D__KERNEL__ -DLINUX -DDEBUG_LEVEL=${DEBUG}
+ LINKER := ld
+! LDFLAGS = -m elf_i386 -r
+ LOADLIBES :=
+
+ all: ${ALL_TARGETS}
+--- 17,23 ----
+ CC := gcc
+ CFLAGS = -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe -Wall ${SEARCHDIRS} -DMODULE ${MVER} -D__KERNEL__ -DLINUX -DDEBUG_LEVEL=${DEBUG}
+ LINKER := ld
+! LDFLAGS = -m elf32ppclinux -r
+ LOADLIBES :=
+
+ all: ${ALL_TARGETS}
diff --git a/net-fs/shfs/files/shfs.mount b/net-fs/shfs/files/shfs.mount
new file mode 100644
index 000000000000..e9be033da164
--- /dev/null
+++ b/net-fs/shfs/files/shfs.mount
@@ -0,0 +1,61 @@
+#!/bin/sh
+#
+# This amd automounter script is called when remote host should be
+# (un)mounted under /shfs directory. Feel free to modify this script
+# to satisfy your needs (e.g add special options to shfsmount,
+# restrict mount to some users, etc.).
+#
+# mount user-id key dir
+# umount dir
+
+umask 022
+
+case `basename $0` in
+ "mount")
+ ID="$1"; KEY="$2"; DIR="$3"
+ if [ -z "$ID" -o -z "$KEY" -o -z "$DIR" ]; then
+ echo "Invalid usage."
+ exit 2
+ fi
+
+ RUSER=`echo "$KEY" | cut -d"%" -f1`
+ RHOST=`echo "$KEY" | cut -d"%" -f2-`
+
+ SSH_AGENT_PID=`ps -C ssh-agent -opid=,uid= | sed -n "s/^[ \t]\{1,\}\([0-9]\{1,\}\)\{1,\}[ \t]\{1,\}$ID\$/\1/p" | tail -1`
+ SSH_AUTH_SOCK=`find /tmp -follow -maxdepth 4 -type s -user "$ID" | grep ssh | grep agent | tail -1`
+
+ if [ ! -z "$SSH_AGENT_PID" -a ! -z "$SSH_AUTH_SOCK" ]; then
+ export SSH_AGENT_PID SSH_AUTH_SOCK
+ fi
+
+ IDG=`grep "^[^:]*:[^:]*:$ID:.*$" /etc/passwd | cut -d":" -f4`
+
+ mkdir -p $DIR
+ shfsmount -u "$ID" -O "-o BatchMode=yes" "$RUSER@$RHOST" "$DIR" -o uid="$ID",gid="$IDG" >/dev/null 2>&1
+
+ if [ $? -ne 0 ]; then
+ rmdir $DIR
+ exit 2
+ else
+ exit 0
+ fi
+ ;;
+
+ umount)
+ DIR="$1"
+ if [ -z "$DIR" ]; then
+ echo "Invalid usage."
+ exit 2
+ fi
+
+ if umount "$DIR" >/dev/null 2>&1; then
+ rmdir "$DIR" >/dev/null 2>&1
+ exit 0;
+ fi
+ exit 2
+ ;;
+
+ *)
+ echo "Invalid usage."
+ exit 2
+esac
diff --git a/net-fs/shfs/shfs-0.31.ebuild b/net-fs/shfs/shfs-0.31.ebuild
new file mode 100644
index 000000000000..f7a90cf408fd
--- /dev/null
+++ b/net-fs/shfs/shfs-0.31.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+
+IUSE="amd doc"
+
+MY_P=${P}-1
+S=${WORKDIR}/${MY_P}
+DESCRIPTION="Secure Shell File System"
+HOMEPAGE="http://shfs.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="x86 ppc"
+DEPEND="virtual/linux-sources
+ net-misc/openssh
+ amd? ( net-fs/am-utils )"
+
+src_compile() {
+ epatch ${FILESDIR}/shfs-gentoo-${PV}-makefile-root.diff
+ use ppc && epatch ${FILESDIR}/shfs-gentoo-${PV}-ppc.diff
+ emake || die
+}
+
+src_install() {
+ # Install kernel module
+ cd ${S}/shfs
+ mv Makefile Makefile.old
+ cat Makefile.old | grep -v depmod > Makefile
+ einfo " Installing kernel module..."
+ make MODULESDIR=${D}/lib/modules/${KV} install || die
+
+ # Install binaries
+ cd ${S}/shfsmount
+ dobin shfsmount
+ dobin shfsumount
+
+ # Allows users to mount/umount
+ einfo " Setting suid bit on /usr/bin executables..."
+ fperms 4755 /usr/bin/shfsmount
+ fperms 4755 /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 [ -n "`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
+}