diff options
author | Martin Schlemmer <azarah@gentoo.org> | 2002-03-05 15:22:58 +0000 |
---|---|---|
committer | Martin Schlemmer <azarah@gentoo.org> | 2002-03-05 15:22:58 +0000 |
commit | 0a42aeefd44e523538fabb86c10322123815ee94 (patch) | |
tree | e58fcf57db2794ddf2820bf463ef76673159cd61 /net-fs | |
parent | new _pre18 release of Portage (diff) | |
download | gentoo-2-0a42aeefd44e523538fabb86c10322123815ee94.tar.gz gentoo-2-0a42aeefd44e523538fabb86c10322123815ee94.tar.bz2 gentoo-2-0a42aeefd44e523538fabb86c10322123815ee94.zip |
fix digest problem
Diffstat (limited to 'net-fs')
-rw-r--r-- | net-fs/samba/ChangeLog | 13 | ||||
-rw-r--r-- | net-fs/samba/files/digest-samba-2.2.3a-r1 | 1 | ||||
-rw-r--r-- | net-fs/samba/files/samba-2.2.3a-loadparm.c.patch | 34 | ||||
-rw-r--r-- | net-fs/samba/files/samba-2.2.3a-proto.h.patch | 10 | ||||
-rw-r--r-- | net-fs/samba/files/samba-2.2.3a-reply.c.patch | 102 | ||||
-rw-r--r-- | net-fs/samba/samba-2.2.3a-r1.ebuild | 173 |
6 files changed, 332 insertions, 1 deletions
diff --git a/net-fs/samba/ChangeLog b/net-fs/samba/ChangeLog index 4a78f757511d..a3fd622ca5e6 100644 --- a/net-fs/samba/ChangeLog +++ b/net-fs/samba/ChangeLog @@ -1,6 +1,17 @@ # ChangeLog for net-fs/samba # Copyright 2002 Gentoo Technologies, Inc.; Distributed under the GPL -# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/ChangeLog,v 1.3 2002/03/05 03:04:54 woodchip Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/ChangeLog,v 1.4 2002/03/05 15:22:58 azarah Exp $ + +*samba-2.2.3a-r1 (5 March 2002) + + 5 March 2002; M.Schlemmer <azarah@gentoo.org> samba-2.2.3a-r1.ebuild, + samba-2.2.3a-loadparm.c.patch, + samba-2.2.3a-proto.c.patch, + samba-2.2.3a-reply.h.patch + + Move the patches to ${FILESDIR}, as they have the same names as those for + 2.2.2, but is not the same, thus ibiblio do not cache the new ones, and + we get digest errors. *samba-2.2.3a (4 March 2002) diff --git a/net-fs/samba/files/digest-samba-2.2.3a-r1 b/net-fs/samba/files/digest-samba-2.2.3a-r1 new file mode 100644 index 000000000000..4ec219f76d0d --- /dev/null +++ b/net-fs/samba/files/digest-samba-2.2.3a-r1 @@ -0,0 +1 @@ +MD5 b6ec2f076af69331535a82b586f55254 samba-2.2.3a.tar.gz 5460531 diff --git a/net-fs/samba/files/samba-2.2.3a-loadparm.c.patch b/net-fs/samba/files/samba-2.2.3a-loadparm.c.patch new file mode 100644 index 000000000000..8ccd2136db7c --- /dev/null +++ b/net-fs/samba/files/samba-2.2.3a-loadparm.c.patch @@ -0,0 +1,34 @@ +--- param/loadparm.c.orig Sun Feb 3 00:46:46 2002 ++++ param/loadparm.c Mon Feb 4 12:19:30 2002 +@@ -334,6 +334,7 @@ + char *printer_admin; + char *volume; + char *fstype; ++ char *recycle_bin; + char *szVfsObjectFile; + char *szVfsOptions; + int iMinPrintSpace; +@@ -451,6 +452,7 @@ + NULL, /* printer admin */ + NULL, /* volume */ + NULL, /* fstype */ ++ NULL, /* recycle_bin */ + NULL, /* vfs object */ + NULL, /* vfs options */ + 0, /* iMinPrintSpace */ +@@ -1045,6 +1047,7 @@ + {"panic action", P_STRING, P_GLOBAL, &Globals.szPanicAction, NULL, NULL, 0}, + {"hide local users", P_BOOL, P_GLOBAL, &Globals.bHideLocalUsers, NULL, + NULL, 0}, ++ {"recycle bin", P_STRING, P_LOCAL, &sDefault.recycle_bin, NULL, NULL, FLAG_SHARE}, + + {"VFS options", P_SEP, P_SEPARATOR}, + +@@ -1671,6 +1674,7 @@ + FN_LOCAL_STRING(lp_hide_files, szHideFiles) + FN_LOCAL_STRING(lp_veto_oplocks, szVetoOplockFiles) + FN_LOCAL_STRING(lp_driverlocation, szPrinterDriverLocation) ++FN_LOCAL_STRING(lp_recyclebin,recycle_bin) + FN_LOCAL_BOOL(lp_msdfs_root, bMSDfsRoot) + FN_LOCAL_BOOL(lp_autoloaded, autoloaded) + FN_LOCAL_BOOL(lp_preexec_close, bPreexecClose) diff --git a/net-fs/samba/files/samba-2.2.3a-proto.h.patch b/net-fs/samba/files/samba-2.2.3a-proto.h.patch new file mode 100644 index 000000000000..3d69b02c0fa4 --- /dev/null +++ b/net-fs/samba/files/samba-2.2.3a-proto.h.patch @@ -0,0 +1,10 @@ +--- include/proto.h.orig Sun Feb 3 00:46:40 2002 ++++ include/proto.h Mon Feb 4 12:19:20 2002 +@@ -1988,6 +1988,7 @@ + char *lp_hide_files(int ); + char *lp_veto_oplocks(int ); + char *lp_driverlocation(int ); ++char *lp_recyclebin(int ); + BOOL lp_msdfs_root(int ); + BOOL lp_autoloaded(int ); + BOOL lp_preexec_close(int ); diff --git a/net-fs/samba/files/samba-2.2.3a-reply.c.patch b/net-fs/samba/files/samba-2.2.3a-reply.c.patch new file mode 100644 index 000000000000..6f6a7c3b7513 --- /dev/null +++ b/net-fs/samba/files/samba-2.2.3a-reply.c.patch @@ -0,0 +1,102 @@ +--- smbd/reply.c.orig Sun Feb 3 00:46:56 2002 ++++ smbd/reply.c Mon Feb 4 12:19:40 2002 +@@ -1918,6 +1918,64 @@ + return NT_STATUS_OK; + } + ++/******************************************************************** ++check if file should be recycled ++*********************************************************************/ ++static int recycle(connection_struct *conn, char *fname, char *recycle_bin) ++{ ++ char *base, *ext; ++ pstring bin; ++ int i=1, len, addlen; ++ int dir_mask=0700; ++ ++ SMB_BIG_UINT dfree,dsize,bsize; ++ ++ if(!recycle_bin || !*recycle_bin) { ++ DEBUG(3, ("recycle bin: share parameter not set, purging %s...\n", fname)); ++ return vfs_unlink(conn,fname); ++ } ++ ++ if(get_file_size(fname) == 0) { ++ DEBUG(3, ("recycle bin: file %s is empty, purging...\n", fname)); ++ return vfs_unlink(conn,fname); ++ } ++ ++ base = strrchr(fname, '/') + 1; ++ if(base == (char*)1) base = fname; ++ ++ ext = strrchr(base, '.'); ++ ++ pstrcpy(bin, recycle_bin); ++ pstrcat(bin, "/"); ++ pstrcat(bin, base); ++ ++ if(strcmp(fname,bin) == 0) { ++ DEBUG(3, ("recycle bin: file %s exists, purging...\n", fname)); ++ return vfs_unlink(conn,fname); ++ } ++ ++ len = strlen(bin); ++ addlen = sizeof(pstring)-len-1; ++ while(vfs_file_exist(conn,bin, NULL)) { ++ slprintf(bin+len, addlen, " (Copy #%d)", i++); ++ pstrcat(bin, ext); ++ } ++ ++ DEBUG(3, ("recycle bin: moving source=%s to dest=%s\n", fname, bin)); ++ sys_disk_free(".",True,&bsize,&dfree,&dsize); ++ if((unsigned int)dfree > 0) { ++ if(!directory_exist(recycle_bin,NULL)) { ++ DEBUG(3, ("recycle bin: directory %s nonexistant, creating...\n", recycle_bin)); ++ vfs_mkdir(conn,recycle_bin,dir_mask); ++ } ++ DEBUG(3, ("recycle bin: move successful\n")); ++ return vfswrap_rename(conn, fname, bin); ++ } else { ++ DEBUG(3, ("recycle bin: move failed, purging...\n")); ++ return vfs_unlink(conn,fname); ++ } ++} ++ + /**************************************************************************** + The guts of the unlink command, split out so it may be called by the NT SMB + code. +@@ -1928,6 +1986,7 @@ + pstring directory; + pstring mask; + char *p; ++ char *recycle_bin = lp_recyclebin(SNUM(conn)); + int count=0; + NTSTATUS error = NT_STATUS_OK; + BOOL has_wild; +@@ -1940,6 +1999,8 @@ + + rc = unix_convert(name,conn,0,&bad_path,&sbuf); + ++ standard_sub_conn(conn,recycle_bin); ++ + p = strrchr(name,'/'); + if (!p) { + pstrcpy(directory,"./"); +@@ -1970,7 +2031,7 @@ + error = can_delete(directory,conn,dirtype); + if (!NT_STATUS_IS_OK(error)) return error; + +- if (vfs_unlink(conn,directory) == 0) { ++ if (recycle(conn,directory,recycle_bin) == 0) { + count++; + } + if (!count) +@@ -2002,7 +2063,7 @@ + slprintf(fname,sizeof(fname)-1, "%s/%s",directory,dname); + error = can_delete(fname,conn,dirtype); + if (!NT_STATUS_IS_OK(error)) continue; +- if (vfs_unlink(conn,fname) == 0) count++; ++ if (recycle(conn,fname,recycle_bin) == 0) count++; + DEBUG(3,("unlink_internals: succesful unlink [%s]\n",fname)); + } + CloseDir(dirptr); diff --git a/net-fs/samba/samba-2.2.3a-r1.ebuild b/net-fs/samba/samba-2.2.3a-r1.ebuild new file mode 100644 index 000000000000..814c281c4f7d --- /dev/null +++ b/net-fs/samba/samba-2.2.3a-r1.ebuild @@ -0,0 +1,173 @@ +# 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.3a-r1.ebuild,v 1.1 2002/03/05 15:22:58 azarah 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/${PV/a/}/loadparm.c.patch +# http://www.amherst.edu/~bbstone/recycle_bin/${PV/a/}/proto.h.patch +# http://www.amherst.edu/~bbstone/recycle_bin/${PV/a/}/reply.c.patch" + +RDEPEND="virtual/glibc + >=sys-libs/pam-0.72 + acl? ( sys-apps/acl ) + cups? ( net-print/cups )" + # needs testing -- ssl? ( >=dev-libs/openssl-0.9.6 ) +DEPEND="${RDEPEND} + sys-devel/autoconf + tcpd? ( >=sys-apps/tcp-wrappers-7.6 )" + +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.3a-pam_smbpass.diff || die + patch -p1 < ${FILESDIR}/samba-2.2.3a-cli_spoolss_notify.diff || die + + # network recycle bin must be enabled in your smb.conf per share + cd ${S}/source + patch -p0 < ${FILESDIR}/samba-2.2.3a-loadparm.c.patch || die + patch -p0 < ${FILESDIR}/samba-2.2.3a-proto.h.patch || die + patch -p0 < ${FILESDIR}/samba-2.2.3a-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 + fi + + # fix kerberos include file collision + 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 + + cd ${S}/source + autoconf || die +} + +src_compile() { + + local myconf + use afs && myconf="${myconf} --with-afs" + use acl && myconf="${myconf} --with-acl-support" + # ssl needs testing... + 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 \ + --with-pam --with-pam_smbpass \ + --without-sambabook \ + --without-automount \ + --without-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 + + # make the smb backend symlink for smb printing support with cups + if [ "`use cups`" ] ; then + dodir /usr/lib/cups/backend + dosym /usr/bin/smbspool /usr/lib/cups/backend/smb + fi + + # too many docs to sort through -- install them 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 "##" +} |