summaryrefslogtreecommitdiff
path: root/net-fs
diff options
context:
space:
mode:
authorDonny Davies <woodchip@gentoo.org>2002-01-28 23:00:57 +0000
committerDonny Davies <woodchip@gentoo.org>2002-01-28 23:00:57 +0000
commit9610ad98359fc9f04342503850ecec4907817d79 (patch)
treed9bbcf4dceb44c6c97b10ebf93739fd87e40365c /net-fs
parentTweaked concept of JDK/JRE duality, removed outdated ebuilds (diff)
downloadgentoo-2-9610ad98359fc9f04342503850ecec4907817d79.tar.gz
gentoo-2-9610ad98359fc9f04342503850ecec4907817d79.tar.bz2
gentoo-2-9610ad98359fc9f04342503850ecec4907817d79.zip
Lots of changes, upgrade reccomended.
- added network recycle bin patch (you have to enable in smb.conf) - added patch for xfs quotas support - added PAM support; configured to authenticate against smbpasswd - added fix for kerberos include file collision - added configure options, notably --with-syslog, --with-quotas (fix typo) - added -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE to the CFLAGS renamed the patches to nicer names. removed some older ebuilds.
Diffstat (limited to 'net-fs')
-rw-r--r--net-fs/samba/files/digest-samba-2.0.101
-rw-r--r--net-fs/samba/files/digest-samba-2.2.21
-rw-r--r--net-fs/samba/files/digest-samba-2.2.2-r61
-rw-r--r--net-fs/samba/files/digest-samba-2.2.2-r74
-rw-r--r--net-fs/samba/files/samba-2.2.1a-afs.diff (renamed from net-fs/samba/files/patch.221a.10)0
-rw-r--r--net-fs/samba/files/samba-2.2.2-XFS-quota.diff88
-rw-r--r--net-fs/samba/files/samba-2.2.2-smbmount.diff (renamed from net-fs/samba/files/patch-smbmount-2.2.2)0
-rw-r--r--net-fs/samba/files/samba.pam6
-rw-r--r--net-fs/samba/files/samba.rc531
-rw-r--r--net-fs/samba/files/samba.rc611
-rw-r--r--net-fs/samba/files/samba.svc.rc542
-rw-r--r--net-fs/samba/samba-2.0.10.ebuild120
-rw-r--r--net-fs/samba/samba-2.2.2-r6.ebuild148
-rw-r--r--net-fs/samba/samba-2.2.2-r7.ebuild158
-rw-r--r--net-fs/samba/samba-2.2.2.ebuild125
15 files changed, 257 insertions, 479 deletions
diff --git a/net-fs/samba/files/digest-samba-2.0.10 b/net-fs/samba/files/digest-samba-2.0.10
deleted file mode 100644
index d2ffd0d0441e..000000000000
--- a/net-fs/samba/files/digest-samba-2.0.10
+++ /dev/null
@@ -1 +0,0 @@
-MD5 54870482fe036b7e69dd48c90661eec6 samba-2.0.10.tar.gz 3497984
diff --git a/net-fs/samba/files/digest-samba-2.2.2 b/net-fs/samba/files/digest-samba-2.2.2
deleted file mode 100644
index 163148a81772..000000000000
--- a/net-fs/samba/files/digest-samba-2.2.2
+++ /dev/null
@@ -1 +0,0 @@
-MD5 d0aba688a1b6189f09f3ba0b44b1da8e samba-2.2.2.tar.gz 6623232
diff --git a/net-fs/samba/files/digest-samba-2.2.2-r6 b/net-fs/samba/files/digest-samba-2.2.2-r6
deleted file mode 100644
index 163148a81772..000000000000
--- a/net-fs/samba/files/digest-samba-2.2.2-r6
+++ /dev/null
@@ -1 +0,0 @@
-MD5 d0aba688a1b6189f09f3ba0b44b1da8e samba-2.2.2.tar.gz 6623232
diff --git a/net-fs/samba/files/digest-samba-2.2.2-r7 b/net-fs/samba/files/digest-samba-2.2.2-r7
new file mode 100644
index 000000000000..895097676cd1
--- /dev/null
+++ b/net-fs/samba/files/digest-samba-2.2.2-r7
@@ -0,0 +1,4 @@
+MD5 df642726476af756df8a2e6c0537eb0d loadparm.c.patch 4096
+MD5 b8b577540c1de5202e70584a402c2d74 proto.h.patch 4096
+MD5 fcc861e805f74ec610ba44ab5cc9f1b7 reply.c.patch 4096
+MD5 d0aba688a1b6189f09f3ba0b44b1da8e samba-2.2.2.tar.gz 6623232
diff --git a/net-fs/samba/files/patch.221a.10 b/net-fs/samba/files/samba-2.2.1a-afs.diff
index ef1f1b45904b..ef1f1b45904b 100644
--- a/net-fs/samba/files/patch.221a.10
+++ b/net-fs/samba/files/samba-2.2.1a-afs.diff
diff --git a/net-fs/samba/files/samba-2.2.2-XFS-quota.diff b/net-fs/samba/files/samba-2.2.2-XFS-quota.diff
new file mode 100644
index 000000000000..3ec42b033429
--- /dev/null
+++ b/net-fs/samba/files/samba-2.2.2-XFS-quota.diff
@@ -0,0 +1,88 @@
+diff -aur samba-2.2.2/source/configure.in samba-2.2.2-xfs/source/configure.in
+--- samba-2.2.2/source/configure.in Sat Oct 13 23:09:16 2001
++++ samba-2.2.2-xfs/source/configure.in Fri Oct 26 00:17:49 2001
+@@ -383,6 +383,9 @@
+ # For quotas on Veritas VxFS filesystems
+ AC_CHECK_HEADERS(sys/fs/vx_quota.h)
+
++# For quotas on Linux XFS filesystems
++AC_CHECK_HEADERS(xfs/xqm.h)
++
+ AC_CHECK_SIZEOF(int,cross)
+ AC_CHECK_SIZEOF(long,cross)
+ AC_CHECK_SIZEOF(short,cross)
+diff -aur samba-2.2.2/source/include/config.h.in samba-2.2.2-xfs/source/include/config.h.in
+--- samba-2.2.2/source/include/config.h.in Sat Oct 13 23:09:21 2001
++++ samba-2.2.2-xfs/source/include/config.h.in Fri Oct 26 00:17:49 2001
+@@ -903,6 +903,9 @@
+ /* Define if you have the <sys/fs/vx_quota.h> header file. */
+ #undef HAVE_SYS_FS_VX_QUOTA_H
+
++/* Define if you have the <xfs/xqm.h> header file. */
++#undef HAVE_LINUX_XQM_H
++
+ /* Define if you have the <sys/id.h> header file. */
+ #undef HAVE_SYS_ID_H
+
+diff -aur samba-2.2.2/source/smbd/quotas.c samba-2.2.2-xfs/source/smbd/quotas.c
+--- samba-2.2.2/source/smbd/quotas.c Sat Oct 13 23:09:41 2001
++++ samba-2.2.2-xfs/source/smbd/quotas.c Fri Oct 26 00:21:18 2001
+@@ -57,6 +57,9 @@
+ */
+
+ #include <linux/quota.h>
++#ifdef HAVE_LINUX_XQM_H
++#include <xfs/xqm.h>
++#endif
+
+ #include <mntent.h>
+ #include <linux/unistd.h>
+@@ -75,10 +78,35 @@
+ } LINUX_SMB_DISK_QUOTA;
+
+ /****************************************************************************
++ Abstract out the XFS Quota Manager quota get call.
++****************************************************************************/
++
++static int get_smb_linux_xfs_quota(char *path, uid_t euser_id, LINUX_SMB_DISK_QUOTA *dp)
++{
++ int ret = -1;
++#ifdef HAVE_LINUX_XQM_H
++ struct fs_disk_quota D;
++ ZERO_STRUCT(D);
++
++ if ((ret = quotactl(QCMD(Q_XGETQUOTA,USRQUOTA), path, euser_id, (caddr_t)&D)))
++ return ret;
++
++ dp->bsize = (SMB_BIG_UINT)512;
++ dp->softlimit = (SMB_BIG_UINT)D.d_blk_softlimit;
++ dp->hardlimit = (SMB_BIG_UINT)D.d_blk_hardlimit;
++ dp->ihardlimit = (SMB_BIG_UINT)D.d_ino_hardlimit;
++ dp->isoftlimit = (SMB_BIG_UINT)D.d_ino_softlimit;
++ dp->curinodes = (SMB_BIG_UINT)D.d_icount;
++ dp->curblocks = (SMB_BIG_UINT)D.d_bcount;
++#endif
++ return ret;
++}
++
++/****************************************************************************
+ Abstract out the old and new Linux quota get calls.
+ ****************************************************************************/
+
+-static int get_smb_linux_quota(char *path, uid_t euser_id, LINUX_SMB_DISK_QUOTA *dp)
++static int get_smb_linux_vfs_quota(char *path, uid_t euser_id, LINUX_SMB_DISK_QUOTA *dp)
+ {
+ int ret;
+ #ifdef LINUX_QUOTAS_1
+@@ -156,7 +184,10 @@
+
+ save_re_uid();
+ set_effective_uid(0);
+- r=get_smb_linux_quota(mnt->mnt_fsname, euser_id, &D);
++ if (strcmp(mnt->mnt_type, "xfs") == 0)
++ r=get_smb_linux_xfs_quota(mnt->mnt_fsname, euser_id, &D);
++ else
++ r=get_smb_linux_vfs_quota(mnt->mnt_fsname, euser_id, &D);
+ restore_re_uid();
+
+ /* Use softlimit to determine disk space, except when it has been exceeded */
diff --git a/net-fs/samba/files/patch-smbmount-2.2.2 b/net-fs/samba/files/samba-2.2.2-smbmount.diff
index 0c7f87f9d964..0c7f87f9d964 100644
--- a/net-fs/samba/files/patch-smbmount-2.2.2
+++ b/net-fs/samba/files/samba-2.2.2-smbmount.diff
diff --git a/net-fs/samba/files/samba.pam b/net-fs/samba/files/samba.pam
new file mode 100644
index 000000000000..3a6e4e57fc22
--- /dev/null
+++ b/net-fs/samba/files/samba.pam
@@ -0,0 +1,6 @@
+#%PAM-1.0
+# pam_smbpass.so authenticates against the smbpasswd file
+auth required pam_smbpass.so nodelay
+account required pam_pwdb.so audit nodelay
+session required pam_pwdb.so nodelay
+password required pam_smbpass.so nodelay smbconf=/etc/smb/smb.conf
diff --git a/net-fs/samba/files/samba.rc5 b/net-fs/samba/files/samba.rc5
deleted file mode 100644
index 3c52dbc2784c..000000000000
--- a/net-fs/samba/files/samba.rc5
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/sh
-#RCUPDATE:3 4:76:This line is required for script management
-
-. /etc/rc.d/config/functions
-
-SERVICE=samba
-opts="start stop"
-
-EXE0=/usr/sbin/nmbd
-EXE1=/usr/sbin/smbd
-
-start() {
- ebegin "Starting $SERVICE"
- start-stop-daemon --start --quiet --exec $EXE0
- result=$?
- start-stop-daemon --start --quiet --exec $EXE1
- result=$(( $result + $? ))
- eend $result
-}
-
-stop() {
- ebegin "Stopping $SERVICE"
- start-stop-daemon --stop --quiet --exec $EXE0
- result=$?
- start-stop-daemon --stop --quiet --exec $EXE1
- result=$(( $result + $? ))
- eend $result
-}
-
-doservice ${@}
-
diff --git a/net-fs/samba/files/samba.rc6 b/net-fs/samba/files/samba.rc6
index 1166ffd3b22d..dadb66050a0c 100644
--- a/net-fs/samba/files/samba.rc6
+++ b/net-fs/samba/files/samba.rc6
@@ -1,22 +1,13 @@
#!/sbin/runscript
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
-# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/files/samba.rc6,v 1.4 2001/12/06 20:17:02 azarah Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/files/samba.rc6,v 1.5 2002/01/28 23:00:56 woodchip Exp $
depend() {
need net
}
-checkconfig() {
- if [ ! -e /etc/smb/smb.conf ] ; then
- eerror "You need an /etc/smb/smb.conf file first"
- eerror "There is a sample in /usr/share/doc/samba"
- return 1
- fi
-}
-
start() {
- checkconfig || return 1
ebegin "Starting samba"
start-stop-daemon --start --quiet --exec /usr/sbin/nmbd
result=$?
diff --git a/net-fs/samba/files/samba.svc.rc5 b/net-fs/samba/files/samba.svc.rc5
deleted file mode 100644
index 88b56684170a..000000000000
--- a/net-fs/samba/files/samba.svc.rc5
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/bin/sh
-#RCUPDATE:3 4:76:This line is required for script management
-
-. /etc/rc.d/config/functions
-
-SERVICE=svc-samba
-opts="start stop"
-
-start() {
- ebegin "Starting $SERVICE"
- if [ ! -e ${SVCDIR}/control/smbd ]
- then
- ln -sf ../services/smbd ${SVCDIR}/control/smbd
- fi
- if [ ! -e ${SVCDIR}/control/nmbd ]
- then
- ln -sf ../services/nmbd ${SVCDIR}/control/nmbd
- fi
- /usr/bin/svc -u ${SVCDIR}/control/smbd
- /usr/bin/svc -u ${SVCDIR}/control/nmbd
- eend $?
-}
-
-stop() {
- ebegin "Stopping $SERVICE"
- if [ -e ${SVCDIR}/control/smbd ]
- then
- /usr/bin/svc -dx ${SVCDIR}/control/smbd/log
- /usr/bin/svc -dx ${SVCDIR}/control/smbd
-# rm ${SVCDIR}/control/smbd
- fi
- if [ -e ${SVCDIR}/control/nmbd ]
- then
- /usr/bin/svc -dx ${SVCDIR}/control/nmbd/log
- /usr/bin/svc -dx ${SVCDIR}/control/nmbd
-# rm ${SVCDIR}/control/nmbd
- fi
- eend $?
-}
-
-doservice ${@}
-
diff --git a/net-fs/samba/samba-2.0.10.ebuild b/net-fs/samba/samba-2.0.10.ebuild
deleted file mode 100644
index 9b466cc19857..000000000000
--- a/net-fs/samba/samba-2.0.10.ebuild
+++ /dev/null
@@ -1,120 +0,0 @@
-# Copyright 1999-2000 Gentoo Technologies, Inc.
-# Distributed under the terms of the GNU General Public License, v2 or later
-# Author Achim Gottinger <achim@gentoo.org>
-# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/samba-2.0.10.ebuild,v 1.4 2001/09/02 11:21:31 woodchip Exp $
-
-A=${P}.tar.gz
-S=${WORKDIR}/${P}
-DESCRIPTION="Samba"
-SRC_URI="http://us1.samba.org/samba/ftp/${A}"
-HOMEPAGE="http://www.samba.org"
-
-DEPEND="virtual/glibc
- >=sys-libs/pam-0.72"
- #ssl support removed -- it doesn't work...
-
-
-src_compile() {
-
- cd ${S}/source
- ./configure --prefix=/usr --sysconfdir=/etc/smb --localstatedir=/var/log \
- --libdir=/etc/smb --sbindir=/usr/sbin --with-automount --with-utmp \
- --without-sambabook --with-netatalk --with-smbmount --with-profile \
- --with-pam --with-privatedir=/etc/smb/private --with-lockdir=/var/run/smb \
- --with-swatdir=/usr/share/swat
- assert
- make || die
-}
-
-
-src_install() {
-
- cd ${S}/source
- dodir /usr
- dodir /etc/smb
- dodir /usr/share/swat
- dodir /usr/doc/${P}/html/book
- dodir /var/log
- dodir /var/run/smb
-
- make install prefix=${D}/usr BASEDIR=${D}/usr LIBDIR=${D}/etc/smb VARDIR=${D}/var/log \
- PRIVATEDIR=${D}/etc/smb/private SWATDIR=${D}/usr/share/swat \
- LOCKDIR=${D}/var/lock SBINDIR=${D}/usr/sbin
- assert
-
- # we specified PRIVATEDIR=/etc/smb/private
- rm -rf ${D}/usr/private
- diropts -m0700
- dodir /etc/smb/private
-
- # move smbmount from /usr/sbin to /sbin, and rename it to mount.smbfs
- # which allows it to work transparently with standard 'mount' command
- diropts -m 0755 ; dodir /sbin
- mv ${D}/usr/bin/smbmount ${D}/sbin/mount.smbfs
-
- cd ${S}/source/script
- exeinto /usr/sbin
- doexe convert_smbpasswd mknissmbpasswd.sh mknissmbpwdtbl.sh mksmbpasswd.sh smbtar
-
- prepman
- into /usr
- cd ${S}
- cp -a examples ${D}/usr/doc/${PF}
- cp examples/smb.conf.default ${D}/etc/smb/smb.conf.example
- dodoc COPYING Manifest README README-smbmount Roadmap WHATSNEW.txt
- cd ${S}/docs
- dodoc announce history NT4-Locking.reg NT4-Locking.txt NT4_PlainPassword.reg
- dodoc samba.lsm THANKS Win*
- docinto html
- dodoc htmldocs/*.html
- docinto html/book
- dodoc htmldocs/using_samba/*.html
- docinto html/book/gifs
- dodoc htmldocs/using_samba/gifs/*
- docinto html/book/figs
- dodoc htmldocs/using_samba/figs/*
- docinto faq
- dodoc faq/*.txt
- docinto html/faq
- dodoc faq/*.html
- docinto textdocs
- dodoc textdocs/*
-
- # install a standard, standalone-type init script
- exeinto /etc/rc.d/init.d
- newexe ${FILESDIR}/samba.rc5 samba
-}
-
-
-pkg_preinst() {
-
- if [ "$ROOT" = "/" ] && [ -e /etc/rc.d/init.d/samba ] ; then
- /etc/rc.d/init.d/samba stop
- fi
- return 0
-}
-
-
-pkg_postinst() {
-
- # we touch ${D}/etc/smb/smb.conf so that people installing samba just to mount smb shares
- # don't get annoying warnings all the time.
- if [ ! -e ${ROOT}etc/smb/smb.conf ] ; then
- touch ${ROOT}etc/smb/smb.conf
- fi
-
- echo " #"
- echo " To configure samba (the server) to start on boot, type:"
- echo " % rc-update add samba [ for normal standalone samba ]"
- echo
- echo " If you had samba running earlier, you'll need to start it again. Also, please note"
- echo " that you must configure /etc/smb/smb.conf before samba (the server) will work properly."
- echo " Mounting smb shares and the smbclient program should work immediately. To accomplish"
- echo " this there is an empty /etc/smb/smb.conf file installed."
- echo
- echo " To mount smb shares, type something like this. You will need kernel SMB support first:"
- echo " % mount -t smbfs -o username=drobbins,password=foo,ip=192.168.1.1 //mybox/drobbins /mnt/foo"
- echo " If you wish to allow normal users to mount smb shares, type the following as root:"
- echo " % chmod u+s /usr/bin/smbmnt"
- echo " #"
-}
diff --git a/net-fs/samba/samba-2.2.2-r6.ebuild b/net-fs/samba/samba-2.2.2-r6.ebuild
deleted file mode 100644
index ded65ccd5920..000000000000
--- a/net-fs/samba/samba-2.2.2-r6.ebuild
+++ /dev/null
@@ -1,148 +0,0 @@
-# Copyright 1999-2000 Gentoo Technologies, Inc.
-# Distributed under the terms of the GNU General Public License, v2 or later
-# Author Achim Gottinger <achim@gentoo.org>
-# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/samba-2.2.2-r6.ebuild,v 1.2 2001/12/14 15:09:35 gbevin Exp $
-
-S=${WORKDIR}/${P}
-DESCRIPTION="Samba :)"
-SRC_URI="http://us1.samba.org/samba/ftp/${P}.tar.gz"
-HOMEPAGE="http://www.samba.org"
-
-DEPEND="virtual/glibc
- sys-devel/autoconf
- cups? ( net-print/cups )
- pam? ( >=sys-libs/pam-0.72 )
- tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
- ssl? ( >=dev-libs/openssl-0.9.6 )"
-
-RDEPEND="virtual/glibc
- cups? ( net-print/cups )
- pam? ( >=sys-libs/pam-0.72 )
- ssl? ( >=dev-libs/openssl-0.9.6 )"
-
-src_unpack() {
-
- unpack ${A}
-
- if [ "`use afs`" ] ; then
- cd ${S}
- patch -p0 < ${FILESDIR}/patch.221a.10 || die
- fi
-
- cd ${S}
- patch -p0 < ${FILESDIR}/patch-smbmount-2.2.2 || die
-
- if [ ! "`use cups`" ] ; then
- cd ${S}/source
- cp configure.in configure.in.orig
- sed -e "s:AC_CHECK_LIB(cups,httpConnect)::" configure.in.orig > configure.in
- autoconf || die
- fi
-}
-
-src_compile() {
-
- local myconf
- use afs && myconf="${myconf} --with-afs"
-
- # PAM support can cause lots of problems. There is a mailing list thread on
- # samba-devel that's about 40 posts long about this
- myconf="${myconf} --without-pam"
-
- # Samba doesn't seem to work well with ssl support
- myconf="${myconf} --without-ssl"
-
- cd ${S}/source
- # Disabled automout support, because it failed
- ./configure --prefix=/usr --sysconfdir=/etc/smb --localstatedir=/var/log \
- --libdir=/etc/smb --sbindir=/usr/sbin --without-automount --with-utmp \
- --without-sambabook --with-netatalk --with-privatedir=/etc/smb/private \
- --with-smbmount --with-msdfs --with-vfs --with-spinlocks \
- --with-lockdir=/var/run/smb --with-swatdir=/usr/share/swat \
- --with-mandir=/usr/share/man --with-profile ${myconf}
- assert "bad configure"
-
- make || die "compile problem"
-}
-
-
-src_install() {
-
- cd ${S}/source
- dodir /sbin
- dodir /usr
- dodir /etc/smb
- dodir /usr/share/swat
- dodir /var/log
- dodir /var/run/smb
-
- make install prefix=${D}/usr BASEDIR=${D}/usr PRIVATEDIR=${D}/etc/smb/private \
- LIBDIR=${D}/etc/smb VARDIR=${D}/var/log SWATDIR=${D}/usr/share/swat \
- LOCKDIR=${D}/var/lock SBINDIR=${D}/usr/sbin MANDIR=${D}/usr/share/man
- assert "install problem"
-
- # we specified PRIVATEDIR=/etc/smb/private
- rm -rf ${D}/usr/private
- diropts -m 0700 ; dodir /etc/smb/private
-
- # link /usr/bin/smbmount to /sbin/mount.smbfs
- # which allows it to work transparently with standard 'mount' command
- dosym /usr/bin/smbmount /sbin/mount.smbfs
-
- cd ${S}/source/script
- exeinto /usr/sbin
- doexe convert_smbpasswd mknissmbpasswd.sh mknissmbpwdtbl.sh mksmbpasswd.sh smbtar
-
- # docs -- lots and lots.
- cd ${S}
- dodoc COPYING Manifest README Roadmap WHATSNEW.txt
- docinto full_docs
- cp -a docs/* ${D}/usr/share/doc/${PF}/full_docs
- docinto examples
- cp -a examples/* ${D}/usr/share/doc/${PF}/examples
- prepalldocs
-
- insinto /etc/smb ; newins examples/smb.conf.default smb.conf.example
- exeinto /etc/init.d ; newexe ${FILESDIR}/samba.rc6 samba
-}
-
-pkg_preinst() {
-
- if [ "$ROOT" = "/" ] && [ -e /etc/init.d/samba ] ; then
- if [ -e /dev/shm/.init.d/started/samba ] ; then
- /etc/init.d/samba stop
- fi
- fi
- return # dont fail
-}
-
-pkg_prerm() {
-
- if [ "$ROOT" = "/" ] && [ -e /etc/init.d/samba ] ; then
- if [ -e /dev/shm/.init.d/started/samba ] ; then
- /etc/init.d/samba stop
- fi
- fi
- return # dont fail
-}
-
-pkg_postinst() {
-
- # we touch ${D}/etc/smb/smb.conf so that people installing samba just to mount smb shares
- # don't get annoying warnings all the time.
- if [ ! -e ${ROOT}etc/smb/smb.conf ] ; then
- touch ${ROOT}etc/smb/smb.conf
- fi
-
- echo " #"
- echo " If you had samba running earlier, you'll need to start it again. Also, please note"
- echo " that you must configure /etc/smb/smb.conf before samba (the server) will work properly."
- echo " Mounting smb shares and the smbclient program should work immediately. To accomplish"
- echo " this there is an empty /etc/smb/smb.conf file installed."
- echo
- echo " To mount smb shares, type something like this. You will need kernel SMB support first:"
- echo " % mount -t smbfs -o username=drobbins,password=foo,ip=192.168.1.1 //mybox/drobbins /mnt/foo"
- echo " If you wish to allow normal users to mount smb shares, type the following as root:"
- echo " % chmod u+s /usr/bin/smbmnt"
- echo " #"
-}
diff --git a/net-fs/samba/samba-2.2.2-r7.ebuild b/net-fs/samba/samba-2.2.2-r7.ebuild
new file mode 100644
index 000000000000..4cd6863152fe
--- /dev/null
+++ b/net-fs/samba/samba-2.2.2-r7.ebuild
@@ -0,0 +1,158 @@
+# Copyright 1999-2002 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# Maintainer: Donny Davies <woodchip@gentoo.org>
+# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/samba-2.2.2-r7.ebuild,v 1.1 2002/01/28 23:00:55 woodchip Exp $
+
+DESCRIPTION="SAMBA is a suite of SMB and CIFS client/server programs for UNIX"
+HOMEPAGE="http://samba.org http://www.amherst.edu/~bbstone/howto/samba.html"
+
+S=${WORKDIR}/${P}
+SRC_URI="http://us1.samba.org/samba/ftp/${P}.tar.gz
+ http://www.amherst.edu/~bbstone/recycle_bin/2.2.2/loadparm.c.patch
+ http://www.amherst.edu/~bbstone/recycle_bin/2.2.2/proto.h.patch
+ http://www.amherst.edu/~bbstone/recycle_bin/2.2.2/reply.c.patch"
+
+RDEPEND="virtual/glibc cups? ( net-print/cups ) pam? ( >=sys-libs/pam-0.72 ) ssl? ( >=dev-libs/openssl-0.9.6 )"
+DEPEND="${RDEPEND} tcpd? ( >=sys-apps/tcp-wrappers-7.6 ) sys-devel/autoconf"
+
+src_unpack() {
+
+ unpack ${P}.tar.gz ; cd ${S}
+ use afs && ( patch -p0 < ${FILESDIR}/samba-2.2.1a-afs.diff || die )
+ patch -p0 < ${FILESDIR}/samba-2.2.2-smbmount.diff || die
+ patch -p1 < ${FILESDIR}/samba-2.2.2-XFS-quota.diff || die
+
+ #network recycle bin must be enabled in your smb.conf per share
+ cd ${S}/source
+ patch -p0 < ${DISTDIR}/loadparm.c.patch || die
+ patch -p0 < ${DISTDIR}/proto.h.patch || die
+ patch -p0 < ${DISTDIR}/reply.c.patch || die
+
+ #makes cups not absolutely required
+ if [ ! "`use cups`" ] ; then
+ cd ${S}/source
+ cp configure.in configure.in.orig
+ sed -e "s:AC_CHECK_LIB(cups,httpConnect)::" configure.in.orig > configure.in
+ autoconf || die
+ fi
+
+ #fix kerberos include file collision. from Paul de Vrieze.
+ cd ${S}/source/include
+ mv profile.h smbprofile.h
+ sed -e "s:profile\.h:smbprofile.h:" includes.h > includes.h.new
+ mv includes.h.new includes.h
+}
+
+src_compile() {
+
+ local myconf
+ use afs && myconf="--with-afs"
+ use pam && myconf="${myconf} --with-pam --with-pam_smbpass"
+ use acl && myconf="${myconf} --with-acl-support"
+ #ssl needs testing.. anybody feel like trying and reporting back?
+ myconf="${myconf} --without-ssl"
+
+ export CFLAGS="${CFLAGS} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE"
+ cd ${S}/source
+ ./configure \
+ --prefix=/usr \
+ --libdir=/etc/smb \
+ --sbindir=/usr/sbin \
+ --sysconfdir=/etc/smb \
+ --localstatedir=/var/log \
+ --with-lockdir=/var/run/smb \
+ --with-mandir=/usr/share/man \
+ --with-swatdir=/usr/share/swat \
+ --with-privatedir=/etc/smb/private \
+ --without-sambabook \
+ --without-automount \
+ --with-spinlocks \
+ --with-netatalk \
+ --with-smbmount \
+ --with-profile \
+ --with-quotas \
+ --with-syslog \
+ --with-msdfs \
+ --with-utmp \
+ --with-vfs \
+ --host=${CHOST} ${myconf} || die "bad ./configure"
+
+ emake || die "compile problem"
+}
+
+src_install() {
+
+ cd ${S}/source
+ dodir /sbin /etc/smb /usr/share/swat /var/log /var/run/smb /lib/security
+
+ make install \
+ prefix=${D}/usr \
+ BASEDIR=${D}/usr \
+ LIBDIR=${D}/etc/smb \
+ VARDIR=${D}/var/log \
+ LOCKDIR=${D}/var/lock \
+ SBINDIR=${D}/usr/sbin \
+ MANDIR=${D}/usr/share/man \
+ SWATDIR=${D}/usr/share/swat \
+ PRIVATEDIR=${D}/etc/smb/private || die
+
+ #we specified PRIVATEDIR=/etc/smb/private
+ rm -rf ${D}/usr/private
+ diropts -m 0700 ; dodir /etc/smb/private
+
+ #link /usr/bin/smbmount to /sbin/mount.smbfs which allows it
+ #to work transparently with standard 'mount' command
+ dosym /usr/bin/smbmount /sbin/mount.smbfs
+
+ #handy scripts for user management
+ cd ${S}/source/script
+ exeinto /usr/sbin
+ doexe convert_smbpasswd mknissmbpasswd.sh mknissmbpwdtbl.sh mksmbpasswd.sh
+
+ #place this correctly
+ mv ${D}/usr/bin/pam_smbpass.so ${D}/lib/security/pam_smbpass.so
+
+ #too many docs to sort through. install 'em all :>
+ cd ${S}
+ dodoc COPYING Manifest README Roadmap WHATSNEW.txt
+ docinto full_docs ; cp -a docs/* ${D}/usr/share/doc/${PF}/full_docs
+ docinto examples ; cp -a examples/* ${D}/usr/share/doc/${PF}/examples
+ prepalldocs
+
+ insinto /etc/pam.d ; newins ${FILESDIR}/samba.pam samba
+ insinto /etc/smb ; newins examples/smb.conf.default smb.conf.example
+ exeinto /etc/init.d ; newexe ${FILESDIR}/samba.rc6 samba
+}
+
+pkg_preinst() {
+ if [ "$ROOT" = "/" ] && [ -e /dev/shm/.init.d/started/samba ] ; then
+ /etc/init.d/samba stop
+ fi
+}
+
+pkg_prerm() {
+ if [ "$ROOT" = "/" ] && [ -e /dev/shm/.init.d/started/samba ] ; then
+ /etc/init.d/samba stop
+ fi
+}
+
+pkg_postinst() {
+
+ #we touch ${D}/etc/smb/smb.conf so that people installing samba
+ #just to mount smb shares don't get annoying warnings all the time.
+ if [ ! -e ${ROOT}etc/smb/smb.conf ] ; then
+ touch ${ROOT}etc/smb/smb.conf
+ fi
+
+ echo "##"
+ echo " If you had samba running earlier, you'll need to start it again. Also, please note"
+ echo " that you must configure /etc/smb/smb.conf before samba (the server) will work properly."
+ echo " Mounting smb shares and the smbclient program should work immediately. To accomplish"
+ echo " this there is an empty /etc/smb/smb.conf file installed."
+ echo
+ echo " To mount smb shares, type something like this. You will need kernel SMB support first:"
+ echo " % mount -t smbfs -o username=drobbins,password=foo,ip=192.168.1.1 //mybox/drobbins /mnt/foo"
+ echo " If you wish to allow normal users to mount smb shares, type the following as root:"
+ echo " % chmod u+s /usr/bin/smbmnt"
+ echo "##"
+}
diff --git a/net-fs/samba/samba-2.2.2.ebuild b/net-fs/samba/samba-2.2.2.ebuild
deleted file mode 100644
index 6c1f8da4ed59..000000000000
--- a/net-fs/samba/samba-2.2.2.ebuild
+++ /dev/null
@@ -1,125 +0,0 @@
-# Copyright 1999-2000 Gentoo Technologies, Inc.
-# Distributed under the terms of the GNU General Public License, v2 or later
-# Author Achim Gottinger <achim@gentoo.org>
-# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/samba-2.2.2.ebuild,v 1.1 2001/10/17 06:02:52 woodchip Exp $
-
-S=${WORKDIR}/${P}
-DESCRIPTION="Samba :)"
-SRC_URI="http://us1.samba.org/samba/ftp/${P}.tar.gz"
-HOMEPAGE="http://www.samba.org"
-
-DEPEND="virtual/glibc
- sys-devel/autoconf
- cups? ( net-print/cups )
- pam? ( >=sys-libs/pam-0.72 )
- tcpd? ( >=sys-apps/tcp-wrappers-7.6 )
- ssl? ( >=dev-libs/openssl-0.9.6 )"
-
-RDEPEND="virtual/glibc
- cups? ( net-print/cups )
- pam? ( >=sys-libs/pam-0.72 )
- ssl? ( >=dev-libs/openssl-0.9.6 )"
-
-src_unpack() {
-
- unpack ${A}
-
- if [ "`use afs`" ] ; then
- cd ${S}
- patch -p0 < ${FILESDIR}/patch.221a.10 || die
- fi
-
- if [ ! "`use cups`" ] ; then
- cd ${S}/source
- cp configure.in configure.in.orig
- sed -e "s:AC_CHECK_LIB(cups,httpConnect)::" configure.in.orig > configure.in
- autoconf || die
- fi
-}
-
-src_compile() {
-
- local myconf
- use afs && myconf="${myconf} --with-afs"
-
- # PAM support can cause lots of problems. There is a mailing list thread on
- # samba-devel that's about 40 posts long about this
- myconf="${myconf} --without-pam"
-
- # Samba doesn't seem to work well with ssl support
- myconf="${myconf} --without-ssl"
-
- cd ${S}/source
- # Disabled automout support, because it failed
- ./configure --prefix=/usr --sysconfdir=/etc/smb --localstatedir=/var/log \
- --libdir=/etc/smb --sbindir=/usr/sbin --without-automount --with-utmp \
- --without-sambabook --with-netatalk --with-privatedir=/etc/smb/private \
- --with-smbmount --with-msdfs --with-vfs --with-spinlocks \
- --with-lockdir=/var/run/smb --with-swatdir=/usr/share/swat \
- --with-mandir=/usr/share/man --with-profile ${myconf}
- assert "bad configure"
-
- make || die "compile problem"
-}
-
-
-src_install() {
-
- cd ${S}/source
- dodir /sbin
- dodir /usr
- dodir /etc/smb
- dodir /usr/share/swat
- dodir /var/log
- dodir /var/run/smb
-
- make install prefix=${D}/usr BASEDIR=${D}/usr PRIVATEDIR=${D}/etc/smb/private \
- LIBDIR=${D}/etc/smb VARDIR=${D}/var/log SWATDIR=${D}/usr/share/swat \
- LOCKDIR=${D}/var/lock SBINDIR=${D}/usr/sbin MANDIR=${D}/usr/share/man
- assert "install problem"
-
- # we specified PRIVATEDIR=/etc/smb/private
- rm -rf ${D}/usr/private
- diropts -m 0700 ; dodir /etc/smb/private
-
- # move smbmount from /usr/sbin to /sbin, and rename it to mount.smbfs
- # which allows it to work transparently with standard 'mount' command
- mv ${D}/usr/bin/smbmount ${D}/sbin/mount.smbfs
-
- cd ${S}/source/script
- exeinto /usr/sbin
- doexe convert_smbpasswd mknissmbpasswd.sh mknissmbpwdtbl.sh mksmbpasswd.sh smbtar
-
- # docs -- lots and lots.
- cd ${S}
- dodoc COPYING Manifest README Roadmap WHATSNEW.txt
- docinto full_docs
- cp -a docs/* ${D}/usr/share/doc/${PF}/full_docs
- docinto examples
- cp -a examples/* ${D}/usr/share/doc/${PF}/examples
- prepalldocs
-
- insinto /etc/smb ; newins examples/smb.conf.default smb.conf.example
- exeinto /etc/rc.d/init.d ; newexe ${FILESDIR}/samba.rc5 samba
-}
-
-pkg_postinst() {
-
- # we touch ${D}/etc/smb/smb.conf so that people installing samba just to mount smb shares
- # don't get annoying warnings all the time.
- if [ ! -e ${ROOT}etc/smb/smb.conf ] ; then
- touch ${ROOT}etc/smb/smb.conf
- fi
-
- echo " #"
- echo " If you had samba running earlier, you'll need to start it again. Also, please note"
- echo " that you must configure /etc/smb/smb.conf before samba (the server) will work properly."
- echo " Mounting smb shares and the smbclient program should work immediately. To accomplish"
- echo " this there is an empty /etc/smb/smb.conf file installed."
- echo
- echo " To mount smb shares, type something like this. You will need kernel SMB support first:"
- echo " % mount -t smbfs -o username=drobbins,password=foo,ip=192.168.1.1 //mybox/drobbins /mnt/foo"
- echo " If you wish to allow normal users to mount smb shares, type the following as root:"
- echo " % chmod u+s /usr/bin/smbmnt"
- echo " #"
-}