diff options
author | Donny Davies <woodchip@gentoo.org> | 2002-10-24 22:26:41 +0000 |
---|---|---|
committer | Donny Davies <woodchip@gentoo.org> | 2002-10-24 22:26:41 +0000 |
commit | 7e1f8b5faf2a6a4863acd230820100a2855ba536 (patch) | |
tree | f0c59720e3b04e423c440a9583af2d5f4fad3667 /net-fs/samba | |
parent | initial ebuild (diff) | |
download | historical-7e1f8b5faf2a6a4863acd230820100a2855ba536.tar.gz historical-7e1f8b5faf2a6a4863acd230820100a2855ba536.tar.bz2 historical-7e1f8b5faf2a6a4863acd230820100a2855ba536.zip |
add vfs plugins, vscan plugins, additional ldap support, extra docs, more scripts. upgrade ;)
Diffstat (limited to 'net-fs/samba')
-rw-r--r-- | net-fs/samba/ChangeLog | 25 | ||||
-rw-r--r-- | net-fs/samba/files/digest-samba-2.2.6 | 2 | ||||
-rw-r--r-- | net-fs/samba/files/recycle.conf | 17 | ||||
-rw-r--r-- | net-fs/samba/files/samba-2.2.5-gp-reloc-fix.patch | 13 | ||||
-rw-r--r-- | net-fs/samba/files/samba-2.2.6-smbumount_lazy.patch | 191 | ||||
-rw-r--r-- | net-fs/samba/files/samba-slapd-include.conf | 14 | ||||
-rw-r--r-- | net-fs/samba/files/smbldap_conf.pm | 250 | ||||
-rw-r--r-- | net-fs/samba/samba-2.2.6.ebuild | 390 |
8 files changed, 888 insertions, 14 deletions
diff --git a/net-fs/samba/ChangeLog b/net-fs/samba/ChangeLog index d1d5da7fb015..514d62cf7bbc 100644 --- a/net-fs/samba/ChangeLog +++ b/net-fs/samba/ChangeLog @@ -1,6 +1,14 @@ # 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.14 2002/10/21 02:56:13 mjc Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/ChangeLog,v 1.15 2002/10/24 22:26:41 woodchip Exp $ + +*samba-2.2.6 (Oct 24 2002) + + 24 Oct 2002; Donny Davies <woodchip@gentoo.org> : + Chase latest release. New local USE vscan flag for building the + openantivirus project plugins. Added several more ldap files + and scripts. Now builds the bundled VFS plugins. Added more docs + and findsmb script. Added lazy smbumount and VFS plugins reloc patches. *samba-2.2.5-r1 (Aug 27 2002) @@ -10,7 +18,6 @@ 27 Aug 2002; Donny Davies <woodchip@gentoo.org> samba-2.2.5-r1.ebuid, smb.conf.example : - Fix #6936; thanks shadow@ines.ro. Fix #7133, thanks klebermass@limtec.de. *samba-2.2.5 (23 Jun 2002) @@ -22,14 +29,12 @@ Added ppc keyword 23 Jun 2002; Donny Davies <woodchip@gentoo.org> : - Update to latest; samba-2.2.5. Please see the samba WHATSNEW.txt file in /usr/doc/samba for the detailed fixes. *samba-2.2.4-r1 (13 May 2002) 13 May 2002; Donny Davies <woodchip@gentoo.org> : - Install smbmnt and smbumount suid root, close #2635. Pass --bindir to ./configure, close #2515. Add a few more codepages. @@ -39,7 +44,6 @@ 6 May 2002; Donny Davies <woodchip@gentoo.org> samba-2.2.4.ebuild, smb.conf.example, system-auth-winbind, samba-svc, winbind-init, lmhosts, samba-init, nsswitch.conf-winbind, nsswitch.conf-wins : - Added a much better smb.conf.example. Added smbwrapper (smbsh). Added libnss_winbind (see /etc/nsswitch.conf-winbind). Added libnss_wins (see /etc/nsswitch.conf-wins). Added libsmbclient. Added USE ssl and @@ -52,15 +56,13 @@ *samba-2.2.3a-r3 (3 May 2002) - 3 May 2002; Donny Davies <woodchip@gentoo.org> : - + 3 May 2002; Donny Davies <woodchip@gentoo.org> : Added LICENSE, SLOT, $Headers. *samba-2.2.3a-r2 (27 March 2002) 27 March 2002; Donny Davies <woodchip@gentoo.org> samba-2.2.3a-r2.ebuild, swat.xinetd, smbusers, samba.rc6, samba-2.2.3a-srv_spoolss_nt.patch : - /etc/smb has moved to the better-suited /etc/samba directory. Simply move your /etc/smb/* to /etc/samba. Then delete the /etc/samba/codepages directory. These files are now in /var/lib/samba/codepages. /var/run/smb @@ -71,7 +73,6 @@ Added a patch to fix changing printer properties from Windows NT. 10 March 2002; Donny Davies <woodchip@gentoo.org> files/samba.rc6 : - Tweak initscript to kill the daemons via pidfile. *samba-2.2.3a-r1 (5 March 2002) @@ -79,7 +80,6 @@ 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. @@ -89,7 +89,6 @@ 4 March 2002; Donny Davies <woodchip@gentoo.org> samba-2.2.3a.ebuild, files/samba-2.2.3a-cli_spoolss_notify.diff, files/samba-2.2.3a-pam_smbpass.diff, files/samba-2.2.2-XFS-quota.diff : - Added acl USE flag support, patch to fix pam_smbpass compilation, patch for Win2k printing and removed XFS quota patch -- its merged upstream. Updated to latest network recycle bin patches. If you get md5 checksum errors with the recycle bin @@ -100,13 +99,11 @@ *samba-2.2.2-r9 (2 March 2002) 2 March 2002; M.Schlemmer <azarah@gentoo.org> samba-2.2.2-r9.ebuild : - Added creation of symlink for supporting cups printing. *samba-2.2.2-r8 (1 Feb 2002) - 1 Feb 2002; G.Bevin <gbevin@gentoo.org> ChangeLog : - + 1 Feb 2002; G.Bevin <gbevin@gentoo.org> ChangeLog : Added initial ChangeLog which should be updated whenever the package is updated in any way. This changelog is targetted to users. This means that the comments should well explained and written in clean English. The details about diff --git a/net-fs/samba/files/digest-samba-2.2.6 b/net-fs/samba/files/digest-samba-2.2.6 new file mode 100644 index 000000000000..ca9fb0ac43f1 --- /dev/null +++ b/net-fs/samba/files/digest-samba-2.2.6 @@ -0,0 +1,2 @@ +MD5 66c83e899d3be1bdc80b8ae2a1d20957 samba-vscan-0.2.5e.tar.gz 100072 +MD5 147efc95ecd4ca69ec679c73f246e5de samba-2.2.6.tar.bz2 4390352 diff --git a/net-fs/samba/files/recycle.conf b/net-fs/samba/files/recycle.conf new file mode 100644 index 000000000000..00cc79821241 --- /dev/null +++ b/net-fs/samba/files/recycle.conf @@ -0,0 +1,17 @@ +# name of the recycle bin at root level of share +name = .recycle +# mode : +# KEEP_DIRECTORIES = retain directory hierarchy of deleted file, +# i.e. recreate all directories in recycle bin +# VERSIONS = create copies in case of identical file names in recycle bin +# TOUCH = touch access date of files moved into the recycle bin +mode = KEEP_DIRECTORIES|VERSIONS|TOUCH +# maximum file size to be moved to the recycle bin (0 means any size) +maxsize = 0 +# exclude file names with the following extensions: +exclude = *.tmp|*.temp|*.o|*.obj|~$* +# exclude directories: +excludedir = /tmp|/temp|/cache +# Add file extensions of files where no versioning is wanted (i.e. copy # 1...) +# only valid when mode=VERSIONS is set +noversions = *.doc|*.xls|*.ppt diff --git a/net-fs/samba/files/samba-2.2.5-gp-reloc-fix.patch b/net-fs/samba/files/samba-2.2.5-gp-reloc-fix.patch new file mode 100644 index 000000000000..894c4e701484 --- /dev/null +++ b/net-fs/samba/files/samba-2.2.5-gp-reloc-fix.patch @@ -0,0 +1,13 @@ +diff -ur samba-2.2.5.orig/examples/VFS/Makefile.in samba-2.2.5/examples/VFS/Makefile.in +--- samba-2.2.5.orig/examples/VFS/Makefile.in 2002-06-17 20:35:09.000000000 +0200 ++++ samba-2.2.5/examples/VFS/Makefile.in 2002-06-30 16:43:15.000000000 +0200 +@@ -4,7 +4,7 @@ + + CC=@CC@ + LIBTOOL=@LIBTOOL@ +-CFLAGS=@CFLAGS@ ++CFLAGS=@CFLAGS@ -DPIC -fPIC + LDFLAGS=@LDFLAGS@ + + VFS_OBJS=audit.so skel.so block/block.so recycle/recycle.so + diff --git a/net-fs/samba/files/samba-2.2.6-smbumount_lazy.patch b/net-fs/samba/files/samba-2.2.6-smbumount_lazy.patch new file mode 100644 index 000000000000..5a6089bd9eb5 --- /dev/null +++ b/net-fs/samba/files/samba-2.2.6-smbumount_lazy.patch @@ -0,0 +1,191 @@ +--- smbumount.c Wed Oct 9 16:27:21 2002 ++++ smbumount.c.wc Thu Oct 24 17:18:19 2002 +@@ -15,6 +15,10 @@ + #include <linux/smb_mount.h> + #include <linux/smb_fs.h> + ++#include <unistd.h> ++#include <string.h> ++#include <errno.h> ++ + /* This is a (hopefully) temporary hack due to the fact that + sizeof( uid_t ) != sizeof( __kernel_uid_t ) under glibc. + This may change in the future and smb.h may get fixed in the +@@ -43,9 +47,9 @@ + __kernel_uid_t mount_uid; + + if (fid == -1) { +- fprintf(stderr, "Could not open %s: %s\n", +- mount_point, strerror(errno)); +- return -1; ++ /* fprintf(stderr, "Could not open %s: %s\n", ++ mount_point, strerror(errno)); */ ++ return 1; /* maybe try again */ + } + + if (ioctl(fid, SMB_IOC_GETMOUNTUID, &mount_uid) != 0) { +@@ -65,6 +69,92 @@ + return 0; + } + ++#define MAX_READLINKS 32 ++/* myrealpath from mount, it could get REAL path under a broken connection */ ++char *myrealpath(const char *path, char *resolved_path, int maxreslth) ++{ ++ int readlinks = 0,m,n; ++ char *npath,*buf; ++ char link_path[PATH_MAX + 1]; ++ ++ npath = resolved_path; ++ ++ if(*path != '/') ++ { ++ if(!getcwd(npath, maxreslth - 2)) ++ return NULL; ++ npath += strlen(npath); ++ if(npath[-1] != '/') ++ *(npath++) = '/'; ++ else ++ { ++ *npath++ = '/'; ++ path++; ++ } ++ } ++ ++ while(*path != '\0') ++ { ++ if(*path == '/') ++ { ++ path++; ++ continue; ++ } ++ if(*path == '.' && (path[1] == '\0' || path[1] == '/')) ++ { ++ path++; ++ continue; ++ } ++ if(*path == '.' && path[1] == '.' && ++ (path[2] == '\0' || path[2] == '/')) ++ { ++ path += 2; ++ while(npath > resolved_path + 1 && ++ (--npath)[-1] != '/'); ++ continue; ++ } ++ while(*path != '\0' && *path != '/') ++ { ++ if(npath-resolved_path > maxreslth - 2) ++ return NULL; ++ *npath++ = *path++; ++ } ++ if(readlinks++ > MAX_READLINKS) ++ return NULL; ++ *npath = '\0'; ++ n = readlink(resolved_path, link_path, PATH_MAX); ++ if(n < 0) ++ { ++ if(errno != EINVAL) return NULL; ++ } ++ else ++ { ++ link_path[n] = '\0'; ++ if(*link_path == '/') ++ npath = resolved_path; ++ else while(*(--npath) != '/'); ++ m = strlen(path); ++ if((buf = malloc(m + n + 1)) == NULL) ++ { ++ fprintf(stderr,"Not enough memory.\n"); ++ return NULL; ++ } ++ memcpy(buf, link_path, n); ++ memcpy(buf + n, path, m + 1); ++ path = buf; ++ } ++ *npath++ = '/'; ++ } ++ if(npath != resolved_path + 1) ++ { ++ while(npath > resolved_path && npath[-1] == '/') ++ npath--; ++ if(npath == resolved_path) return NULL; ++ } ++ *npath = '\0'; ++ return resolved_path; ++} ++ + /* Make a canonical pathname from PATH. Returns a freshly malloced string. + It is up the *caller* to ensure that the PATH is sensible. i.e. + canonicalize ("/dev/fd0/.") returns "/dev/fd0" even though ``/dev/fd0/.'' +@@ -73,7 +163,8 @@ + static char * + canonicalize (char *path) + { +- char *canonical = malloc (PATH_MAX + 1); ++ char *npath,*canonical = malloc (PATH_MAX + 1); ++ int i; + + if (!canonical) { + fprintf(stderr, "Error! Not enough memory!\n"); +@@ -87,11 +178,18 @@ + + if (path == NULL) + return NULL; +- +- if (realpath (path, canonical)) ++ ++/* if (realpath (path, canonical)) */ ++ if(myrealpath(path, canonical, PATH_MAX)) + return canonical; + + pstrcpy (canonical, path); ++ if((i = strlen(canonical)) > 1 && i <= PATH_MAX) ++ { ++ path = canonical + i; ++ while(*(--path) == '/') ++ *path = '\0'; ++ } + return canonical; + } + +@@ -122,14 +220,35 @@ + exit(1); + } + +- if (umount_ok(mount_point) != 0) { +- exit(1); ++ if ((fd = umount_ok(mount_point)) != 0) { ++ if(fd == 1) ++ { ++ if((fd = umount_ok(mount_point)) != 0) ++ { ++ if(fd == 1) ++ { ++ fprintf(stderr, "Could not open %s: %s\n", ++ mount_point, strerror(errno)); ++ } ++ exit(1); ++ } ++ } ++ else exit(1); + } + ++#if !defined(MNT_DETACH) ++ #define MNT_DETACH 2 ++#endif ++ + if (umount(mount_point) != 0) { +- fprintf(stderr, "Could not umount %s: %s\n", +- mount_point, strerror(errno)); +- exit(1); ++ /* fprintf(stderr, "Could not umount %s: %s\n,Trying lazy umount.\n", ++ mount_point, strerror(errno)); */ ++ if(umount2(mount_point,MNT_DETACH) != 0) ++ { ++ fprintf(stderr, "Lazy umount failed.\n"); ++ return 1; ++ ++ } + } + + if ((fd = open(MOUNTED"~", O_RDWR|O_CREAT|O_EXCL, 0600)) == -1) diff --git a/net-fs/samba/files/samba-slapd-include.conf b/net-fs/samba/files/samba-slapd-include.conf new file mode 100644 index 000000000000..33c219414859 --- /dev/null +++ b/net-fs/samba/files/samba-slapd-include.conf @@ -0,0 +1,14 @@ +# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/files/samba-slapd-include.conf,v 1.1 2002/10/24 22:26:41 woodchip Exp $ +# +# You should either include this file into your /etc/openldap/slapd.conf, or +# add the contents (after editing), inside the db definition your samba +# server will use. + +# Index the rid for samba: +index rid eq + +# Basic samba acl: +access to attrs=lmPassword,ntPassword + by dn="cn=root,dc=mydomain,dc=com" write + by dn="uid=root,ou=People,dc=mydomain,dc=com" write + by * none diff --git a/net-fs/samba/files/smbldap_conf.pm b/net-fs/samba/files/smbldap_conf.pm new file mode 100644 index 000000000000..151a0dc1786a --- /dev/null +++ b/net-fs/samba/files/smbldap_conf.pm @@ -0,0 +1,250 @@ +#!/usr/bin/perl +use strict; +package smbldap_conf; + +# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/files/smbldap_conf.pm,v 1.1 2002/10/24 22:26:41 woodchip Exp $ +# smbldap-tools.conf : Q & D configuration file for smbldap-tools + +# This code was developped by IDEALX (http://IDEALX.org/) and +# contributors (their names can be found in the CONTRIBUTORS file). +# +# Copyright (C) 2001-2002 IDEALX +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, +# USA. + +# Purpose : +# . be the configuration file for all smbldap-tools scripts + +use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS +$UID_START $GID_START $smbpasswd $slaveLDAP $masterLDAP +$with_smbpasswd $mk_ntpasswd +$ldap_path $ldap_opts $ldapsearch $ldapsearchnobind +$ldapmodify $ldappasswd $ldapadd $ldapdelete $ldapmodrdn +$suffix $usersdn $computersdn +$groupsdn $scope $binddn $bindpasswd +$slaveDN $slavePw $masterDN $masterPw +$_userLoginShell $_userHomePrefix $_userGecos +$_defaultUserGid $_defaultComputerGid +$_skeletonDir $_userSmbHome +$_userProfile $_userHomeDrive +$_userScript $usersou $computersou $groupsou +); + +use Exporter; +$VERSION = 1.00; +@ISA = qw(Exporter); + +@EXPORT = qw( +$UID_START $GID_START $smbpasswd $slaveLDAP $masterLDAP +$with_smbpasswd $mk_ntpasswd +$ldap_path $ldap_opts $ldapsearch $ldapsearchnobind $ldapmodify $ldappasswd +$ldapadd $ldapdelete $ldapmodrdn $suffix $usersdn +$computersdn $groupsdn $scope $binddn $bindpasswd +$slaveDN $slavePw $masterDN $masterPw +$_userLoginShell $_userHomePrefix $_userGecos +$_defaultUserGid $_defaultComputerGid $_skeletonDir +$_userSmbHome $_userProfile $_userHomeDrive $_userScript +$usersou $computersou $groupsou +); + + +############################################################################## +# +# General Configuration +# +############################################################################## + +# +# UID and GID starting at... +# + +$UID_START = 1000; +$GID_START = 1000; + +############################################################################## +# +# LDAP Configuration +# +############################################################################## + +# Notes: to use to dual ldap servers backend for Samba, you must patch +# Samba with the dual-head patch from IDEALX. If not using this patch +# just use the same server for slaveLDAP and masterLDAP. +# +# Slave LDAP : needed for read operations +# +# Ex: $slaveLDAP = "127.0.0.1"; +$slaveLDAP = "_SLAVELDAP_"; + +# +# Master LDAP : needed for write operations +# +# Ex: $masterLDAP = "127.0.0.1"; +$masterLDAP = "_MASTERLDAP_"; + +# +# LDAP Suffix +# +# Ex: $suffix = "dc=IDEALX,dc=ORG"; +$suffix = "_SUFFIX_"; + +# +# Where are stored Users +# +# Ex: $usersdn = "ou=Users,$suffix"; for ou=Users,dc=IDEALX,dc=ORG +$usersou = q(_USERS_); + +$usersdn = "ou=$usersou,$suffix"; + +# +# Where are stored Computers +# +# Ex: $computersdn = "ou=Computers,$suffix"; for ou=Computers,dc=IDEALX,dc=ORG +$computersou = q(_COMPUTERS_); + +$computersdn = "ou=$computersou,$suffix"; + +# +# Where are stored Groups +# +# Ex $groupsdn = "ou=Groups,$suffix"; for ou=Groups,dc=IDEALX,dc=ORG +$groupsou = q(_GROUPS_); + +$groupsdn = "ou=$groupsou,$suffix"; + +# +# Default scope Used +# +$scope = "sub"; + +# +# Credential Configuration +# +# Bind DN used +# Ex: $binddn = "cn=Manager,$suffix"; for cn=Manager,dc=IDEALX,dc=org +$binddn = "_BINDDN_"; +# +# Bind DN passwd used +# Ex: $bindpasswd = 'secret'; for 'secret' +$bindpasswd = "_BINDPW_"; + +# +# Notes: if using dual ldap patch, you can specify to different configuration +# By default, we will use the same DN (so it will work for standard Samba +# release) +# +$slaveDN = $binddn; +$slavePw = $bindpasswd; +$masterDN = $binddn; +$masterPw = $bindpasswd; + +############################################################################## +# +# Unix Accounts Configuration +# +############################################################################## + +# Login defs +# +# Default Login Shell +# +# Ex: $_userLoginShell = q(/bin/bash); +$_userLoginShell = q(_LOGINSHELL_); + +# +# Home directory prefix (without username) +# +#Ex: $_userHomePrefix = q(/home/); +$_userHomePrefix = q(_USERHOMEPREFIX_); + +# +# Gecos +# +$_userGecos = q(System User); + +# +# Default User (POSIX and Samba) GID +# +$_defaultUserGid = 100; + +# +# Default Computer (Samba) GID +# +$_defaultComputerGid = 553; + +# +# Skel dir +# +$_skeletonDir = q(/etc/skel); + +############################################################################## +# +# SAMBA Configuration +# +############################################################################## + +# +# The UNC path to home drives location without the username last extension +# (will be dynamically prepended) +# Ex: q(\\\\My-PDC-netbios-name\\homes) for \\My-PDC-netbios-name\homes +$_userSmbHome = q(\\\\_PDCNAME_\\homes); + +# +# The UNC path to profiles locations without the username last extension +# (will be dynamically prepended) +# Ex: q(\\\\My-PDC-netbios-name\\profiles) for \\My-PDC-netbios-name\profiles +$_userProfile = q(\\\\_PDCNAME_\\profiles\\); + +# +# The default Home Drive Letter mapping +# (will be automatically mapped at logon time if home directory exist) +# Ex: q(U:) for U: +$_userHomeDrive = q(_HOMEDRIVE_:); + +# +# The default user netlogon script name +# if not used, will be automatically username.cmd +# +#$_userScript = q(startup.cmd); # make sure script file is edited under dos + + +############################################################################## +# +# SMBLDAP-TOOLS Configuration (default are ok for a RedHat) +# +############################################################################## + +# Allows not to use smbpasswd (if $with_smbpasswd == 0 in smbldap_conf.pm) but +# prefer mkntpwd... most of the time, it's a wise choice :-) +$with_smbpasswd = 0; +$smbpasswd = "/usr/bin/smbpasswd"; +$mk_ntpasswd = "/usr/local/sbin/mkntpwd"; + +$ldap_path = "/usr/bin"; +$ldap_opts = "-x"; +$ldapsearch = "$ldap_path/ldapsearch $ldap_opts -h $slaveLDAP -D '$slaveDN' -w '$slavePw'"; +$ldapsearchnobind = "$ldap_path/ldapsearch $ldap_opts -h $slaveLDAP"; +$ldapmodify = "$ldap_path/ldapmodify $ldap_opts -h $masterLDAP -D '$masterDN' -w '$masterPw'"; +$ldappasswd = "$ldap_path/ldappasswd $ldap_opts -h $masterLDAP -D '$masterDN' -w '$masterPw'"; +$ldapadd = "$ldap_path/ldapadd $ldap_opts -h $masterLDAP -D '$masterDN' -w '$masterPw'"; +$ldapdelete = "$ldap_path/ldapdelete $ldap_opts -h $masterLDAP -D '$masterDN' -w '$masterPw'"; +$ldapmodrdn = "$ldap_path/ldapmodrdn $ldap_opts -h $masterLDAP -D '$masterDN' -w '$masterPw'"; + + + +1; + +# - The End diff --git a/net-fs/samba/samba-2.2.6.ebuild b/net-fs/samba/samba-2.2.6.ebuild new file mode 100644 index 000000000000..7e3d382b73dc --- /dev/null +++ b/net-fs/samba/samba-2.2.6.ebuild @@ -0,0 +1,390 @@ +# Copyright 1999-2002 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/samba-2.2.6.ebuild,v 1.1 2002/10/24 22:26:41 woodchip Exp $ + +IUSE="tcpd ldap cups ssl acl vscan" + +inherit perl-module + +# please test/report your experiences with these new VFS plugins. +# you should add vscan to USE to do this... +# +VSCAN_VER=0.2.5e +VSCAN_MODS="fprot mks openantivirus" #kaspersky sophos symantec trend +#need libs/headers/extra support for these ones^^ + +DESCRIPTION="SAMBA is a suite of SMB and CIFS client/server programs for UNIX" +HOMEPAGE="http://www.samba.org" + +S=${WORKDIR}/${P} +SRC_URI="vscan? mirror://sourceforge/openantivirus/${PN}-vscan-${VSCAN_VER}.tar.gz + http://us2.samba.org/samba/ftp/${P}.tar.bz2" + +DEPEND=">=sys-libs/pam-0.72 + acl? ( sys-apps/acl ) + cups? ( net-print/cups ) + ldap? ( =net-nds/openldap-2* ) + ssl? ( >=dev-libs/openssl-0.9.6 ) + tcpd? ( >=sys-apps/tcp-wrappers-7.6 ) + vscan? ( >=dev-libs/popt-1.6.3 )" +KEYWORDS="~x86 ~ppc ~sparc64" +LICENSE="GPL-2" +SLOT="0" + +src_unpack() { + local i + unpack ${A} || die + cd ${S} || die + + patch -p0 < ${FILESDIR}/samba-2.2.2-smbmount.diff || die + patch -p1 < ${FILESDIR}/samba-2.2.5-gp-reloc-fix.patch || die + cd source/client; patch -p0 < ${FILESDIR}/samba-2.2.6-smbumount_lazy.patch || die + + if use portldap; then + cd ${S}/source + patch -p0 < $FILESDIR/nonroot-bind.diff || die + cd ${S} + 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 + + # for clean docs packaging sake, make a copy.. + cp -a ${S}/examples ${S}/examples.bin + if use vscan; then + # prep source for selected vscan plugin modules.. + for i in ${VSCAN_MODS} + do + cp -a ${WORKDIR}/${PN}-vscan-${VSCAN_VER}/$i \ + ${S}/examples.bin/VFS + done + fi + + cd ${S}/source + autoconf || die +} + +src_compile() { + local i myconf + use acl && myconf="${myconf} --with-acl-support" || myconf="${myconf} --without-acl-support" + use ssl && myconf="${myconf} --with-ssl" || myconf="${myconf} --without-ssl" + use cups && myconf="${myconf} --enable-cups" || myconf="${myconf} --disable-cups" + use ldap && myconf="${myconf} --with-ldapsam" || myconf="${myconf} --without-ldapsam" + + cd ${S}/source + ./configure \ + --prefix=/usr \ + --bindir=/usr/sbin \ + --libdir=/etc/samba \ + --sbindir=/usr/sbin \ + --sysconfdir=/etc/samba \ + --localstatedir=/var/log \ + --with-configdir=/etc/samba \ + --with-mandir=/usr/share/man \ + --with-piddir=/var/run/samba \ + --with-lockdir=/var/run/samba \ + --with-swatdir=/usr/share/swat \ + --with-privatedir=/etc/samba/private \ + --with-codepagedir=/var/lib/samba/codepages \ + --with-pam --with-pam_smbpass \ + --without-sambabook \ + --without-automount \ + --without-spinlocks \ + --with-libsmbclient \ + --with-smbwrapper \ + --with-netatalk \ + --with-smbmount \ + --with-profile \ + --with-quotas \ + --with-syslog \ + --with-msdfs \ + --with-utmp \ + --with-vfs \ + --host=${CHOST} ${myconf} || die "bad ./configure" + + # compile samba.. + make all smbfilter smbwrapper smbcacls pam_smbpass \ + nsswitch nsswitch/libnss_wins.so debug2html + assert "samba compile problem" + + # compile the bundled vfs modules.. + cd ${S}/examples.bin/VFS + ./configure \ + --prefix=/usr \ + --mandir=/usr/share/man || die "bad ./configure" + make || die "VFS modules compile problem" + + # compile mkntpasswd in examples/LDAP/ for smbldaptools.. + if use ldap; then + cd ${S}/examples.bin/LDAP/smbldap-tools/mkntpwd + make || die "mkntpwd compile problem" + fi + + # compile the selected antivirus vfs plugins.. + if use vscan; then + for i in ${VSCAN_MODS} + do + cd ${S}/examples.bin/VFS/$i && make + assert "problem building $i vscan module" + done + fi +} + +src_install() { + local i + + # we may as well do this all manually since it was starting + # to get out of control and samba _does_ have some rather + # silly installation quirks ;) much of this was adapted + # from mandrake's .spec file.. + # + # // woodchip - 5 May 2002 + + + # install standard binary files.. + for i in nmblookup smbclient smbpasswd smbstatus testparm testprns \ + make_smbcodepage make_unicodemap make_printerdef rpcclient \ + smbspool smbcacls smbclient smbmount smbumount smbsh wbinfo + do + exeinto /usr/bin + doexe source/bin/${i} + done + # make users lives easier.. + fperms 4755 /usr/bin/smbumount + + + # libraries.. + exeinto /usr/lib + doexe source/bin/smbwrapper.so + doexe source/bin/libsmbclient.so + insinto /usr/lib + doins source/bin/libsmbclient.a + exeinto /lib/security + doexe source/bin/pam_smbpass.so + doexe source/nsswitch/pam_winbind.so + + + # vfs modules.. + exeinto /usr/lib/samba/vfs + doexe examples.bin/VFS/audit.so + doexe examples.bin/VFS/block/block.so + doexe examples.bin/VFS/recycle/recycle.so + use vscan && doexe examples.bin/VFS/*/vscan-*.so + + + # some utility scripts.. + for i in mksmbpasswd.sh smbtar convert_smbpasswd + do + exeinto /usr/bin + doexe source/script/${i} + done + # and this handy one.. + doexe packaging/Mandrake/findsmb + + + # secure binary files.. + for i in smbd nmbd swat smbfilter debug2html smbmnt smbcontrol winbindd + do + exeinto /usr/sbin + doexe source/bin/${i} + done + # make users lives easier.. + fperms 4755 /usr/sbin/smbmnt + + + # man pages.. + doman docs/manpages/* + + + # codepage source files + for i in 437 737 775 850 852 857 861 862 866 932 936 949 950 1125 1251 + do + insinto /var/lib/samba/codepages/src + doins source/codepages/codepage_def.${i} + done + for i in 437 737 775 850 852 857 861 862 866 932 936 949 950 1125 1251 \ + ISO8859-1 ISO8859-2 ISO8859-5 ISO8859-7 \ + ISO8859-9 ISO8859-13 ISO8859-15 KOI8-R KOI8-U + do + insinto /var/lib/samba/codepages/src + doins source/codepages/CP${i}.TXT + done + + + # build codepage load files.. + for i in 437 737 775 850 852 857 861 862 866 932 936 949 950 1125 1251 + do + ${D}/usr/bin/make_smbcodepage c ${i} \ + ${D}/var/lib/samba/codepages/src/codepage_def.${i} \ + ${D}/var/lib/samba/codepages/codepage.${i} + done + + + # build unicode load files.. + for i in 437 737 775 850 852 857 861 862 866 932 936 949 950 1125 1251 \ + ISO8859-1 ISO8859-2 ISO8859-5 ISO8859-7 \ + ISO8859-9 ISO8859-13 ISO8859-15 KOI8-R KOI8-U + do + ${D}/usr/bin/make_unicodemap ${i} \ + ${D}/var/lib/samba/codepages/src/CP${i}.TXT \ + ${D}/var/lib/samba/codepages/unicode_map.${i} + done + rm -rf ${D}/var/lib/samba/codepages/src + + + # install the nsswitch library extension files.. + for i in wins winbind + do + exeinto /lib + doexe source/nsswitch/libnss_${i}.so + done + # make link for wins and winbind resolvers.. + ( cd ${D}/lib ; ln -s libnss_wins.so libnss_wins.so.2 ) + ( cd ${D}/lib ; ln -s libnss_winbind.so libnss_winbind.so.2 ) + + + # install SWAT helper files.. + for i in swat/help/*.html docs/htmldocs/*.html + do + insinto /usr/share/swat/help + doins ${i} + done + for i in swat/images/*.gif + do + insinto /usr/share/swat/images + doins ${i} + done + for i in swat/include/*.html + do + insinto /usr/share/swat/include + doins ${i} + done + + + # install the O'Reilly "Using Samba" book.. + for i in docs/htmldocs/using_samba/*.html + do + insinto /usr/share/swat/using_samba + doins ${i} + done + for i in docs/htmldocs/using_samba/gifs/*.gif + do + insinto /usr/share/swat/using_samba/gifs + doins ${i} + done + for i in docs/htmldocs/using_samba/figs/*.gif + do + insinto /usr/share/swat/using_samba/figs + doins ${i} + done + + + # install the utilities from LDAP/smbldap-tools + if use ldap; then + exeinto /usr/share/samba/smbldap-tools + doexe examples/LDAP/smbldap-tools/*.pl + doexe examples/LDAP/smbldap-tools/smbldap_tools.pm + doexe examples/LDAP/{import,export}_smbpasswd.pl + chmod 0700 ${D}/usr/share/samba/smbldap-tools/{import,export}_smbpasswd.pl + exeinto /usr/sbin + doexe examples.bin/LDAP/smbldap-tools/mkntpwd/mkntpwd + #dodir /usr/lib/perl5/site_perl/5.6.1 + eval `perl '-V:installarchlib'` + dodir ${installarchlib} + dosym /etc/samba/smbldap_conf.pm ${installarchlib} + dosym /usr/share/samba/smbldap-tools/smbldap_tools.pm ${installarchlib} + fi + + + # we don't want two copies of the book or manpages + rm -rf docs/htmldocs/using_samba docs/manpages + # attempt to install all the docs as easily as possible :/ + 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 + # keep this next line *after* prepalldocs! + dosym /usr/share/swat/using_samba /usr/share/doc/${PF}/using_samba + # and we should unzip the html docs.. + gunzip ${D}/usr/share/doc/${PF}/full_docs/faq/* + gunzip ${D}/usr/share/doc/${PF}/full_docs/htmldocs/* + if use vscan; then + docinto vscan-modules + cd ${WORKDIR}/${PN}-vscan-${VSCAN_VER} + dodoc AUTHORS COPYING ChangeLog FAQ INSTALL NEWS README TODO + for i in ${VSCAN_MODS} + do + docinto vscan-modules/$i + dodoc $i/INSTALL + done + fi + cd ${S} # hyaah; thems a lotta docs! + + + # link /usr/bin/smbmount to /sbin/mount.smbfs which allows it + # to work transparently with the standard 'mount' command.. + dodir /sbin + dosym /usr/bin/smbmount /sbin/mount.smbfs + + + # make the smb backend symlink for cups printing support.. + if use cups; then + dodir /usr/lib/cups/backend + dosym /usr/bin/smbspool /usr/lib/cups/backend/smb + fi + + + # make a symlink on /usr/lib/smbwrapper.so in /usr/sbin + # to fix smbsh problem. #6936 + dosym /usr/lib/smbwrapper.so /usr/sbin/smbwrapper.so + + + # now the config files.. + insinto /etc + doins ${FILESDIR}/nsswitch.conf-winbind + doins ${FILESDIR}/nsswitch.conf-wins + + insinto /etc/samba + doins ${FILESDIR}/smbusers + doins ${FILESDIR}/smb.conf.example + doins ${FILESDIR}/lmhosts + doins ${FILESDIR}/recycle.conf + if use ldap; then + doins ${FILESDIR}/smbldap_conf.pm + doins ${FILESDIR}/samba-slapd-include.conf + fi + + insinto /etc/pam.d + newins ${FILESDIR}/samba.pam samba + doins ${FILESDIR}/system-auth-winbind + + exeinto /etc/init.d + newexe ${FILESDIR}/samba-init samba + newexe ${FILESDIR}/winbind-init winbind + + insinto /etc/xinetd.d + newins ${FILESDIR}/swat.xinetd swat +} + +pkg_postinst() { + # touch /etc/samba/smb.conf so that people installing samba just + # to mount smb shares don't get annoying warnings all the time.. + if [ ! -e ${ROOT}/etc/samba/smb.conf ] ; then + touch ${ROOT}/etc/samba/smb.conf + fi + + + # empty dirs.. + install -m0700 -o root -g root -d ${ROOT}/etc/samba/private + install -m1777 -o root -g root -d ${ROOT}/var/spool/samba + install -m0755 -o root -g root -d ${ROOT}/var/log/samba + install -m0755 -o root -g root -d ${ROOT}/var/run/samba + install -m0755 -o root -g root -d ${ROOT}/var/lib/samba/{netlogon,profiles} + install -m0755 -o root -g root -d \ + ${ROOT}/var/lib/samba/printers/{W32X86,WIN40,W32ALPHA,W32MIPS,W32PPC} +} |