summaryrefslogtreecommitdiff
path: root/net-fs
diff options
context:
space:
mode:
authorChristian Andreetta <satya@gentoo.org>2004-07-23 17:53:15 +0000
committerChristian Andreetta <satya@gentoo.org>2004-07-23 17:53:15 +0000
commit83699a3bb45c256dcab49a21b192f877286771f5 (patch)
tree3eafe6c3e727bf4a5182de662fb074e4f0a64dd3 /net-fs
parentstable on ppc64, bug #57624 (diff)
downloadhistorical-83699a3bb45c256dcab49a21b192f877286771f5.tar.gz
historical-83699a3bb45c256dcab49a21b192f877286771f5.tar.bz2
historical-83699a3bb45c256dcab49a21b192f877286771f5.zip
vfs, ldap, extra tools better integration
Diffstat (limited to 'net-fs')
-rw-r--r--net-fs/samba/ChangeLog10
-rw-r--r--net-fs/samba/Manifest11
-rw-r--r--net-fs/samba/files/digest-samba-3.0.5-r13
-rw-r--r--net-fs/samba/files/samba-3.0.x-python-setup.patch31
-rw-r--r--net-fs/samba/files/samba-3.0.x-smbumount-uid32.patch11
-rw-r--r--net-fs/samba/files/samba-3.0.x.patch223
-rw-r--r--net-fs/samba/metadata.xml2
-rw-r--r--net-fs/samba/samba-3.0.5-r1.ebuild381
-rw-r--r--net-fs/samba/samba-3.0.5.ebuild4
9 files changed, 669 insertions, 7 deletions
diff --git a/net-fs/samba/ChangeLog b/net-fs/samba/ChangeLog
index c69aeeb7e8aa..41b8f8e223b0 100644
--- a/net-fs/samba/ChangeLog
+++ b/net-fs/samba/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for net-fs/samba
# Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/ChangeLog,v 1.90 2004/07/22 14:46:42 mglauche Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/ChangeLog,v 1.91 2004/07/23 17:53:14 satya Exp $
+
+*samba-3.0.5-r1 (23 Jul 2004)
+
+ 23 Jul 2004; Christian Andreetta <satya@gentoo.org> metadata.xml,
+ +files/samba-3.0.x-python-setup.patch,
+ +files/samba-3.0.x-smbumount-uid32.patch, +files/samba-3.0.x.patch,
+ +samba-3.0.5-r1.ebuild, samba-3.0.5.ebuild:
+ Various contributors (see comments in ebuild): development traced in bug #58090
*samba-3.0.5 (22 Jul 2004)
diff --git a/net-fs/samba/Manifest b/net-fs/samba/Manifest
index e5f4e0d4c2ec..ddb6acf4cdce 100644
--- a/net-fs/samba/Manifest
+++ b/net-fs/samba/Manifest
@@ -1,9 +1,10 @@
MD5 7d7c900829bc2bdf39895d5890a0d20d samba-3.0.4-r1.ebuild 11146
+MD5 d01a684f8594579cef050f9f646c3654 samba-3.0.5-r1.ebuild 14128
MD5 633511d04d7a7d7702c17089c85ba697 samba-3.0.1-r1.ebuild 11333
MD5 df4f73693b725799675e37ba3f90643f samba-3.0.2a-r2.ebuild 12249
-MD5 2f1e0fb8c339d77eb6d02d2dd736d486 ChangeLog 17621
-MD5 63bc25b07c7404f26d602e69ddad747e metadata.xml 458
-MD5 df85655b2e290c92aae00898f8a41642 samba-3.0.5.ebuild 11143
+MD5 e7d852e970baa7b5bcb441a7ae1821c9 ChangeLog 17957
+MD5 41299f246433a1a55c8fccc77ccd709e metadata.xml 491
+MD5 4d7587136bbd68c1ccd4df12e4325492 samba-3.0.5.ebuild 11141
MD5 ccc96fcdc7493be42da52364061c6c17 files/winbind-init 484
MD5 fcebd975211fecf647f6cecf26ba5c96 files/samba-3.0.4.patch 8086
MD5 e89b19f1e62e257cbaa23a44a0362a58 files/swat.xinetd 527
@@ -18,12 +19,15 @@ MD5 f402c2c4103f4c13ac3cc5fa165940db files/nonroot-bind.diff 757
MD5 5d3129a0f6bcbec6ec91d217881a34e1 files/nsswitch.conf-winbind 298
MD5 519576a9448b86f1a7baab18204533a5 files/lmhosts 126
MD5 516ca38dfc67b7cd7356f93ad2cf75b9 files/samba-3.0.0-python-setup.patch 767
+MD5 de43ff30dd5f1431590fd62a997e71b4 files/samba-3.0.x-python-setup.patch 833
MD5 1eec486ab39a239e25a76b16a6fcd460 files/smb.conf.example 16183
MD5 6b6683448cdc01d013bd2c61b4ed8e1e files/samba-slapd-include.conf 499
MD5 60e527174c1b2c53126dbbedb3cae0f7 files/samba-2.2.8-statfs.patch 209
MD5 43a38a5331805a2fa61e899f18413ccd files/digest-samba-3.0.5 203
+MD5 8ea7b443dd580aaaaf7e9e896eba54f2 files/samba-3.0.x-smbumount-uid32.patch 425
MD5 f3a4b3b0a8162ae87779846d7e6adbbf files/digest-samba-3.0.1-r1 202
MD5 a86336201c2eced7a6e5a5138514e2f7 files/digest-samba-3.0.4-r1 203
+MD5 4356a18128f7107bb7a2270bea78b3aa files/digest-samba-3.0.5-r1 203
MD5 8c1f1e3655e12b85102ce257f3efad62 files/smb.conf.example-samba3 20762
MD5 9560b7e29d3a65db029fc1800e84abcc files/samba-pdb_ldap-exop.patch 3921
MD5 3685eadb817d185b06476eca6c0c15c4 files/smbusers 204
@@ -33,4 +37,5 @@ MD5 6acf6a5e92ff2cfc5f09b88f5d01b63e files/samba-svc 975
MD5 b6cdc1468e45f92f19873e0c6c5b6e94 files/samba.pam 332
MD5 81931e1d9764390841dec0d0f327a114 files/digest-samba-3.0.2a-r2 204
MD5 de43ff30dd5f1431590fd62a997e71b4 files/samba-3.0.4-python-setup.patch 833
+MD5 fcebd975211fecf647f6cecf26ba5c96 files/samba-3.0.x.patch 8086
MD5 8289eda694b35875eec6df5cc3f50c86 files/samba-2.2.6-libresolv.patch 540
diff --git a/net-fs/samba/files/digest-samba-3.0.5-r1 b/net-fs/samba/files/digest-samba-3.0.5-r1
new file mode 100644
index 000000000000..2ce3b447798e
--- /dev/null
+++ b/net-fs/samba/files/digest-samba-3.0.5-r1
@@ -0,0 +1,3 @@
+MD5 5896ad33676e3c26efaab5dcd897c466 samba-3.0.5.tar.gz 15076996
+MD5 5f173d549014985d681478897135915b samba-vscan-0.3.5.tar.bz2 161982
+MD5 4bfa0e5328b8420b98d91a046117b7c5 smbldap-tools-0.8.5.tgz 269327
diff --git a/net-fs/samba/files/samba-3.0.x-python-setup.patch b/net-fs/samba/files/samba-3.0.x-python-setup.patch
new file mode 100644
index 000000000000..55de92bb585a
--- /dev/null
+++ b/net-fs/samba/files/samba-3.0.x-python-setup.patch
@@ -0,0 +1,31 @@
+--- source/python/setup.py 2004-04-04 09:37:15.000000000 +0200
++++ source/python/setup.py.new 2004-05-09 12:38:43.196926688 +0200
+@@ -50,16 +50,25 @@
+ libraries = []
+ library_dirs = []
+
++next_is_path = 0
+ for lib in string.split(samba_libs):
+- if lib[0:2] == "-l":
++ if next_is_path <> 0:
++ library_dirs.append(lib);
++ next_is_path = 0;
++ continue
++ if lib == "-Wl,-rpath":
++ next_is_path = 1;
++ continue
++ elif lib[0:2] == "-l":
+ libraries.append(lib[2:])
+ continue
+- if lib[0:2] == "-L":
++ elif lib[0:2] == "-L":
+ library_dirs.append(lib[2:])
+ continue
+- if lib[0:2] == "-W":
++ elif lib[0:2] == "-W":
+ # Skip linker flags
+ continue
++
+ print "Unknown entry '%s' in $LIBS variable passed to setup.py" % lib
+ sys.exit(1)
+
diff --git a/net-fs/samba/files/samba-3.0.x-smbumount-uid32.patch b/net-fs/samba/files/samba-3.0.x-smbumount-uid32.patch
new file mode 100644
index 000000000000..9e6454d69e03
--- /dev/null
+++ b/net-fs/samba/files/samba-3.0.x-smbumount-uid32.patch
@@ -0,0 +1,11 @@
+--- source/client/smbumount.c.orig 2004-07-14 18:54:00.098852152 +0200
++++ source/client/smbumount.c 2004-07-14 18:54:24.417155208 +0200
+@@ -21,7 +21,7 @@
+ future. In the mean time, it's ugly hack time - get over it.
+ */
+ #undef SMB_IOC_GETMOUNTUID
+-#define SMB_IOC_GETMOUNTUID _IOR('u', 1, __kernel_uid_t)
++#define SMB_IOC_GETMOUNTUID _IOR('u', 3, __kernel_uid32_t)
+
+ #ifndef O_NOFOLLOW
+ #define O_NOFOLLOW 0400000
diff --git a/net-fs/samba/files/samba-3.0.x.patch b/net-fs/samba/files/samba-3.0.x.patch
new file mode 100644
index 000000000000..8d67df280e16
--- /dev/null
+++ b/net-fs/samba/files/samba-3.0.x.patch
@@ -0,0 +1,223 @@
+##################################################################
+# Recommended patchset for Samba 3.0.4
+#
+# This patchset fixes the following bugs:
+# * BUG 1315 - wbinfo -t unsuccessful on 3.0.4
+# * BUG 1319 - Cannot write to a share with write-list users
+# * BUG 1345 - Macromedia Homesite cannot connect anymore
+# after upgrade to 3.0.4
+#
+# Please refer to https://bugzilla.samba.org/ for specific
+# details regarding the actual bug reports.
+##################################################################
+
+
+Index: source/rpc_client/cli_pipe.c
+===================================================================
+--- source/rpc_client/cli_pipe.c (revision 842)
++++ source/rpc_client/cli_pipe.c (working copy)
+@@ -332,13 +332,24 @@
+ if (cli->pipe_auth_flags & AUTH_PIPE_NETSEC) {
+ RPC_AUTH_NETSEC_CHK chk;
+
+- if (auth_len != RPC_AUTH_NETSEC_CHK_LEN) {
++ if ( (auth_len != RPC_AUTH_NETSEC_SIGN_OR_SEAL_CHK_LEN)
++ && (auth_len != RPC_AUTH_NETSEC_SIGN_ONLY_CHK_LEN) )
++ {
+ DEBUG(0,("rpc_auth_pipe: wrong schannel auth len %d\n", auth_len));
+ return False;
+ }
+
+- if (!smb_io_rpc_auth_netsec_chk("schannel_auth_sign",
+- &chk, &auth_verf, 0)) {
++ /* can't seal with no nonce */
++ if ( (cli->pipe_auth_flags & AUTH_PIPE_SEAL)
++ && (auth_len != RPC_AUTH_NETSEC_SIGN_OR_SEAL_CHK_LEN) )
++ {
++ DEBUG(0,("rpc_auth_pipe: sealing not supported with schannel auth len %d\n", auth_len));
++ return False;
++ }
++
++
++ if (!smb_io_rpc_auth_netsec_chk("schannel_auth_sign", auth_len, &chk, &auth_verf, 0))
++ {
+ DEBUG(0, ("rpc_auth_pipe: schannel unmarshalling "
+ "RPC_AUTH_NETSECK_CHK failed\n"));
+ return False;
+@@ -918,7 +929,7 @@
+ auth_len = RPC_AUTH_NTLMSSP_CHK_LEN;
+ }
+ if (cli->pipe_auth_flags & AUTH_PIPE_NETSEC) {
+- auth_len = RPC_AUTH_NETSEC_CHK_LEN;
++ auth_len = RPC_AUTH_NETSEC_SIGN_OR_SEAL_CHK_LEN;
+ }
+ auth_hdr_len = RPC_HDR_AUTH_LEN;
+ }
+@@ -1034,8 +1045,9 @@
+ /* write auth footer onto the packet */
+
+ parse_offset_marker = prs_offset(&sec_blob);
+- if (!smb_io_rpc_auth_netsec_chk("", &verf,
+- &sec_blob, 0)) {
++ if (!smb_io_rpc_auth_netsec_chk("", RPC_AUTH_NETSEC_SIGN_OR_SEAL_CHK_LEN,
++ &verf, &sec_blob, 0))
++ {
+ prs_mem_free(&sec_blob);
+ return False;
+ }
+Index: source/smbd/filename.c
+===================================================================
+--- source/smbd/filename.c (revision 842)
++++ source/smbd/filename.c (working copy)
+@@ -137,6 +137,10 @@
+ if (!*name) {
+ name[0] = '.';
+ name[1] = '\0';
++ if (SMB_VFS_STAT(conn,name,&st) == 0) {
++ *pst = st;
++ }
++ DEBUG(5,("conversion finished %s -> %s\n",orig_path, name));
+ return(True);
+ }
+
+Index: source/smbd/uid.c
+===================================================================
+--- source/smbd/uid.c (revision 842)
++++ source/smbd/uid.c (working copy)
+@@ -189,20 +189,26 @@
+
+ snum = SNUM(conn);
+
++ if ((vuser) && !check_user_ok(conn, vuser, snum)) {
++ DEBUG(2,("change_to_user: SMB user %s (unix user %s, vuid %d) not permitted access to share %s.\n",
++ vuser->user.smb_name, vuser->user.unix_name, vuid, lp_servicename(snum)));
++ return False;
++ }
++
+ if (conn->force_user) /* security = share sets this too */ {
+ uid = conn->uid;
+ gid = conn->gid;
+ current_user.groups = conn->groups;
+ current_user.ngroups = conn->ngroups;
+ token = conn->nt_user_token;
+- } else if ((vuser) && check_user_ok(conn, vuser, snum)) {
++ } else if (vuser) {
+ uid = conn->admin_user ? 0 : vuser->uid;
+ gid = vuser->gid;
+ current_user.ngroups = vuser->n_groups;
+ current_user.groups = vuser->groups;
+ token = vuser->nt_user_token;
+ } else {
+- DEBUG(2,("change_to_user: Invalid vuid used %d or vuid not permitted access to share.\n",vuid));
++ DEBUG(2,("change_to_user: Invalid vuid used %d in accessing share %s.\n",vuid, lp_servicename(snum) ));
+ return False;
+ }
+
+Index: source/rpc_server/srv_pipe.c
+===================================================================
+--- source/rpc_server/srv_pipe.c (revision 842)
++++ source/rpc_server/srv_pipe.c (working copy)
+@@ -124,7 +124,7 @@
+ if(p->ntlmssp_auth_validated) {
+ data_space_available -= (RPC_HDR_AUTH_LEN + RPC_AUTH_NTLMSSP_CHK_LEN);
+ } else if(p->netsec_auth_validated) {
+- data_space_available -= (RPC_HDR_AUTH_LEN + RPC_AUTH_NETSEC_CHK_LEN);
++ data_space_available -= (RPC_HDR_AUTH_LEN + RPC_AUTH_NETSEC_SIGN_OR_SEAL_CHK_LEN);
+ }
+
+ /*
+@@ -177,8 +177,8 @@
+ } else if (p->netsec_auth_validated) {
+ p->hdr.frag_len = RPC_HEADER_LEN + RPC_HDR_RESP_LEN +
+ data_len + ss_padding_len +
+- RPC_HDR_AUTH_LEN + RPC_AUTH_NETSEC_CHK_LEN;
+- p->hdr.auth_len = RPC_AUTH_NETSEC_CHK_LEN;
++ RPC_HDR_AUTH_LEN + RPC_AUTH_NETSEC_SIGN_OR_SEAL_CHK_LEN;
++ p->hdr.auth_len = RPC_AUTH_NETSEC_SIGN_OR_SEAL_CHK_LEN;
+ } else {
+ p->hdr.frag_len = RPC_HEADER_LEN + RPC_HDR_RESP_LEN + data_len;
+ p->hdr.auth_len = 0;
+@@ -309,7 +309,8 @@
+ SENDER_IS_ACCEPTOR,
+ &verf, data, data_len + ss_padding_len);
+
+- smb_io_rpc_auth_netsec_chk("", &verf, &outgoing_pdu, 0);
++ smb_io_rpc_auth_netsec_chk("", RPC_AUTH_NETSEC_SIGN_OR_SEAL_CHK_LEN,
++ &verf, &outgoing_pdu, 0);
+
+ p->netsec_auth.seq_num++;
+ }
+@@ -1339,7 +1340,7 @@
+
+ auth_len = p->hdr.auth_len;
+
+- if (auth_len != RPC_AUTH_NETSEC_CHK_LEN) {
++ if (auth_len != RPC_AUTH_NETSEC_SIGN_OR_SEAL_CHK_LEN) {
+ DEBUG(0,("Incorrect auth_len %d.\n", auth_len ));
+ return False;
+ }
+@@ -1384,7 +1385,9 @@
+ return False;
+ }
+
+- if(!smb_io_rpc_auth_netsec_chk("", &netsec_chk, rpc_in, 0)) {
++ if(!smb_io_rpc_auth_netsec_chk("", RPC_AUTH_NETSEC_SIGN_OR_SEAL_CHK_LEN,
++ &netsec_chk, rpc_in, 0))
++ {
+ DEBUG(0,("failed to unmarshal RPC_AUTH_NETSEC_CHK.\n"));
+ return False;
+ }
+Index: source/rpc_parse/parse_rpc.c
+===================================================================
+--- source/rpc_parse/parse_rpc.c (revision 842)
++++ source/rpc_parse/parse_rpc.c (working copy)
+@@ -1189,7 +1189,8 @@
+ /*******************************************************************
+ reads or writes an RPC_AUTH_NETSEC_CHK structure.
+ ********************************************************************/
+-BOOL smb_io_rpc_auth_netsec_chk(const char *desc, RPC_AUTH_NETSEC_CHK * chk,
++BOOL smb_io_rpc_auth_netsec_chk(const char *desc, int auth_len,
++ RPC_AUTH_NETSEC_CHK * chk,
+ prs_struct *ps, int depth)
+ {
+ if (chk == NULL)
+@@ -1198,10 +1199,19 @@
+ prs_debug(ps, depth, desc, "smb_io_rpc_auth_netsec_chk");
+ depth++;
+
+- prs_uint8s(False, "sig ", ps, depth, chk->sig, sizeof(chk->sig));
+- prs_uint8s(False, "seq_num", ps, depth, chk->seq_num, sizeof(chk->seq_num));
+- prs_uint8s(False, "packet_digest", ps, depth, chk->packet_digest, sizeof(chk->packet_digest));
+- prs_uint8s(False, "confounder", ps, depth, chk->confounder, sizeof(chk->confounder));
++ if ( !prs_uint8s(False, "sig ", ps, depth, chk->sig, sizeof(chk->sig)) )
++ return False;
++
++ if ( !prs_uint8s(False, "seq_num", ps, depth, chk->seq_num, sizeof(chk->seq_num)) )
++ return False;
++
++ if ( !prs_uint8s(False, "packet_digest", ps, depth, chk->packet_digest, sizeof(chk->packet_digest)) )
++ return False;
++
++ if ( auth_len == RPC_AUTH_NETSEC_SIGN_OR_SEAL_CHK_LEN ) {
++ if ( !prs_uint8s(False, "confounder", ps, depth, chk->confounder, sizeof(chk->confounder)) )
++ return False;
++ }
+
+ return True;
+ }
+Index: source/include/rpc_dce.h
+===================================================================
+--- source/include/rpc_dce.h (revision 842)
++++ source/include/rpc_dce.h (working copy)
+@@ -63,8 +63,10 @@
+ #define NETSEC_AUTH_TYPE 0x44
+ #define NETSEC_SIGN_SIGNATURE { 0x77, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00 }
+ #define NETSEC_SEAL_SIGNATURE { 0x77, 0x00, 0x7a, 0x00, 0xff, 0xff, 0x00, 0x00 }
+-#define RPC_AUTH_NETSEC_CHK_LEN 0x20
+
++#define RPC_AUTH_NETSEC_SIGN_OR_SEAL_CHK_LEN 0x20
++#define RPC_AUTH_NETSEC_SIGN_ONLY_CHK_LEN 0x18
++
+ /* The 7 here seems to be required to get Win2k not to downgrade us
+ to NT4. Actually, anything other than 1ff would seem to do... */
+ #define NETLOGON_NEG_AUTH2_FLAGS 0x000701ff
diff --git a/net-fs/samba/metadata.xml b/net-fs/samba/metadata.xml
index f6ad214971de..7802fb8b4b45 100644
--- a/net-fs/samba/metadata.xml
+++ b/net-fs/samba/metadata.xml
@@ -7,6 +7,6 @@
<name>Samba Team</name>
</maintainer>
<longdescription>
-Samba is an Open Source/Free Software suite that provides seamless file and print services to SMB/CIFS clients. Samba is freely available under the GNU General Public License.
+Samba is an Open Source/Free Software suite that provides seamless file and print services to SMB/CIFS clients. Integration with various accounting and antivirus backends. License: GNU General Public License.
</longdescription>
</pkgmetadata>
diff --git a/net-fs/samba/samba-3.0.5-r1.ebuild b/net-fs/samba/samba-3.0.5-r1.ebuild
new file mode 100644
index 000000000000..0eccc230a7d0
--- /dev/null
+++ b/net-fs/samba/samba-3.0.5-r1.ebuild
@@ -0,0 +1,381 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/samba-3.0.5-r1.ebuild,v 1.1 2004/07/23 17:53:14 satya Exp $
+
+inherit eutils flag-o-matic
+
+IUSE="kerberos mysql postgres xml xml2 acl cups ldap pam readline python doc"
+IUSE="${IUSE} oav"
+
+DESCRIPTION="SAMBA is a suite of SMB and CIFS client/server programs for UNIX"
+HOMEPAGE="http://www.samba.org/
+ http://www.openantivirus.org/projects.php
+ http://samba.idealx.org"
+
+SMBLDAP_TOOLS_VER=0.8.5
+VSCAN_VER=0.3.5
+# all vscan modules are being installed
+#VSCAN_MODS="oav sophos fprotd fsav trend icap mksd kavp clamav nai"
+
+_CVS="-${PV/_/}"
+S=${WORKDIR}/${PN}${_CVS}
+
+SRC_URI="mirror://samba/${PN}${_CVS}.tar.gz
+ oav? mirror://sourceforge/openantivirus/${PN}-vscan-${VSCAN_VER}.tar.bz2
+ ldap? http://samba.idealx.org/dist/smbldap-tools-${SMBLDAP_TOOLS_VER}.tgz"
+
+_COMMON_DEPS="dev-libs/popt
+ readline? sys-libs/readline
+ ldap? ( kerberos? ( virtual/krb5 ) )
+ mysql? ( dev-db/mysql sys-libs/zlib )
+ postgres? ( dev-db/postgresql sys-libs/zlib )
+ xml? ( dev-libs/libxml2 sys-libs/zlib )
+ xml2? ( dev-libs/libxml2 sys-libs/zlib )
+ acl? sys-apps/acl
+ cups? net-print/cups
+ ldap? ( net-nds/openldap dev-perl/Crypt-SmbHash )
+ pam? sys-libs/pam
+ python? dev-lang/python"
+DEPEND="sys-devel/autoconf
+ >=sys-apps/sed-4
+ ${_COMMON_DEPS}"
+#IDEALX scripts are now using Net::LDAP
+RDEPEND="ldap? dev-perl/perl-ldap ${_COMMON_DEPS}"
+
+# some archs are removed due to dependency tree integrity for ldap and
+# dev-perl/Crypt-SmbHash flags
+#KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+KEYWORDS="~sparc ~x86"
+LICENSE="GPL-2"
+SLOT="0"
+
+src_unpack() {
+ local i
+ unpack ${A} || die
+ cd ${S} || die
+ # Clean up CVS ---------------------------------------------------------
+ find . -name .cvsignore | xargs rm -f
+ find . -name CVS | xargs rm -rf
+ # Add patch(es) --------------------------------------------------------
+ # This patchset fixes Samba bugs #1315, #1319 and #1345
+ # courtesy of Gerald Carter (jerry@samba.org)
+ epatch ${FILESDIR}/samba-3.0.x.patch
+ #Next one is from eger@cc.gatech.edu
+ epatch ${FILESDIR}/samba-3.0.x-python-setup.patch || die
+ #bug #44743 ------------------------------------------------------------
+ for tmp_arch in "ppc" "ppc64" "~ppc" "~ppc64"; do
+ if [ "${ARCH}" = "${tmp_arch}" ]; then
+ cd ${S} && epatch ${FILESDIR}/samba-3.0.x-smbumount-uid32.patch
+ break
+ fi
+ done
+ #Fix for bug #27858 ----------------------------------------------------
+ for tmp_arch in "sparc" "~sparc" "ppc" "ppc64" "~ppc" "~ppc64"; do
+ if [ "${ARCH}" = "${tmp_arch}" ]; then
+ cd ${S}/source/include
+ epatch ${FILESDIR}/samba-2.2.8-statfs.patch
+ break
+ fi
+ done
+ #Bug #36200; sys-kernel/linux-headers dependent ------------------------
+ sed -i -e 's:#define LINUX_QUOTAS_2:#define LINUX_QUOTAS_1:' \
+ -e 's:<linux/quota.h>:<sys/quota.h>:' \
+ ${S}/source/smbd/quotas.c
+ # examples: to be copied as docs ---------------------------------------
+ rm -rf ${S}/examples.ORIG
+ cp -a ${S}/examples ${S}/examples.ORIG
+ # Prep samba-vscan source.
+ use oav && cp -a ${WORKDIR}/${PN}-vscan-${VSCAN_VER} ${S}/examples/VFS
+ #-----------------------------------------------------------------------
+ cd ${S}/source
+ echo "Running autoconf ..."
+ autoconf || die
+}
+
+src_compile() {
+ local i
+ local myconf
+ local mymods
+ #mymods="nisplussam" #this is deprecated...
+ #-----------------------------------------------------------------------
+ use xml || use xml2 && mymods="xml,${mymods}"
+ use mysql && mymods="mysql,${mymods}"
+ use postgres && mymods="pgsql,${mymods}"
+ [ -n "${mymods}" ] && myconf="--with-expsam=${mymods}"
+ use acl \
+ && myconf="${myconf} --with-acl-support" \
+ || myconf="${myconf} --without-acl-support"
+ use pam \
+ && myconf="${myconf} --with-pam --with-pam_smbpass" \
+ || myconf="${myconf} --without-pam --without-pam_smbpass"
+ use cups \
+ && myconf="${myconf} --enable-cups" \
+ || myconf="${myconf} --disable-cups"
+ use ldap \
+ && myconf="${myconf} --with-ldap" \
+ || myconf="${myconf} --without-ldap"
+ #this is for old samba 2.x compat
+ #myconf="${myconf} --with-ldapsam"
+ myconf="${myconf} --without-ldapsam"
+ use python \
+ && myconf="${myconf} --with-python=yes" \
+ || myconf="${myconf} --with-python=no"
+ use readline \
+ && myconf="${myconf} --with-readline" \
+ || myconf="${myconf} --without-readline"
+ #Fix #57063 ------------------------------------------------------------
+ strip-flags
+ replace-flags -O? -O1
+ for tmp_arch in "ppc" "ppc64" "~ppc" "~ppc64"; do
+ if [ "${ARCH}" = "${tmp_arch}" ]; then
+ replace-flags -O? -O1
+ break
+ fi
+ done
+ if [ "${ARCH}" != "amd64" ]; then
+ use kerberos && use ldap \
+ && myconf="${myconf} --with-ads" \
+ || myconf="${myconf} --without-ads"
+ else
+ myconf="${myconf} --without-ads"
+ fi
+ #-----------------------------------------------------------------------
+ #default_{static,shared}_modules|source/configure
+ #/usr/lib/samba/auth/............. AUTH_MODULES
+ #/usr/lib/samba/charset/ CHARSET_MODULES
+ #/usr/lib/samba/pdb/.............. PDB_MODULES
+ #/usr/lib/samba/rpc/ RPC_MODULES
+ #/usr/lib/samba/vfs/.............. VFS_MODULES|source/Makefile
+ #/usr/lib/samba/lowcase.dat
+ #/usr/lib/samba/upcase.dat
+ #/usr/lib/samba/valid.dat
+ #-----------------------------------------------------------------------
+ for info_var in myconf CFLAGS CFLAGS; do
+ einfo "${info_var} is: ${!info_var}"
+ done
+ cd ${S}/source
+ ./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib/samba \
+ --with-libdir=/usr/lib/samba \
+ --with-swatdir=/usr/share/doc/${PF}/swat \
+ --localstatedir=/var \
+ --with-piddir=/var/run/samba \
+ --with-lockdir=/var/cache/samba \
+ --with-logfilebase=/var/log/samba \
+ --sysconfdir=/etc/samba \
+ --with-configdir=/etc/samba \
+ --with-privatedir=/etc/samba/private \
+ \
+ --enable-static \
+ --enable-shared \
+ --with-manpages-langs=en \
+ --without-spinlocks \
+ --with-libsmbclient \
+ --with-automount \
+ --with-smbmount \
+ --with-winbind \
+ --with-quotas \
+ --with-syslog \
+ --with-idmap \
+ --host=${CHOST} \
+ ${myconf} || die
+ # Show install dirs ----------------------------------------------------
+ einfo "Dir conf:"
+ make showlayout
+ # serialized headers make ----------------------------------------------
+ make proto
+ # Compile main SAMBA pieces --------------------------------------------
+ einfo "make everything" && emake everything || die "SAMBA make everything error"
+ einfo "make rpctorture" && emake rpctorture || ewarn "rpctorture didn't build"
+ # Build mount.cifs -----------------------------------------------------
+ einfo "mount.cifs"
+ cd ${S}/source
+ gcc ${CFLAGS} client/mount.cifs.c -o bin/mount.cifs
+ assert "mount.cifs compile problem"
+ # build smbget ---------------------------------------------------------
+ einfo "smbget"
+ emake bin/smbget; assert "smbget compile error"
+ # Build selected samba-vscan plugins -----------------------------------
+ if use oav; then
+ cd ${S}/examples/VFS/${PN}-vscan-${VSCAN_VER}
+ ./configure --prefix=/usr --libdir=/usr/lib/samba
+ assert "bad ${PN}-vscan-${VSCAN_VER} ./configure"
+ emake #${VSCAN_MODS}
+ fi
+ # Build mkntpasswd from the smbldap-tools ------------------------------
+ # Attention: use of dev-perl/Crypt-SmbHash for smbldap-tool > 0.8.5
+ if use ldap; then
+ cd ${WORKDIR}/smbldap-tools-${SMBLDAP_TOOLS_VER}
+ if [ -f mkntpwd.tar.gz]; then
+ tar --no-same-owner -zxf mkntpwd.tar.gz
+ cd mkntpwd
+ VISUAL="" make || die "mkntpwd compile problem"
+ fi
+ fi
+}
+
+src_install() {
+ local extra_bins="debug2html smbfilter talloctort mount.cifs smbget"
+ #smbsh editreg
+ extra_bins="${extra_bins} smbtorture msgtest masktest locktest \
+ locktest2 nsstest vfstest rpctorture"
+ # ----------------------------------------------------------------------
+ cd ${S}/source
+ make DESTDIR=${D} install-everything
+ # Extra binary files, testing/torture progs ----------------------------
+ exeinto /usr/bin
+ for i in ${extra_bins}; do
+ [ -x ${S}/source/bin/${i} ] && doexe ${S}/source/bin/${i} && \
+ einfo "Extra binaries: ${i}"
+ done
+ # Installing these setuid-root allows users to (un)mount smbfs/cifs ----
+ for i in /usr/bin/smbumount /usr/bin/smbmnt /usr/bin/mount.cifs; do
+ fperms 4111 ${i} || die "No perms: ${i}"
+ einfo "suid: ${i}"
+ done
+ # Nsswitch extensions. Make link for wins and winbind resolvers --------
+ exeinto /lib
+ for i in wins winbind; do
+ doexe ${S}/source/nsswitch/libnss_${i}.so
+ ( cd ${D}/lib; ln -s libnss_${i}.so libnss_${i}.so.2 )
+ done
+ exeinto /lib/security
+ doexe ${S}/source/nsswitch/pam_winbind.so
+ use pam && doexe ${S}/source/bin/pam_smbpass.so
+ # mount backend --------------------------------------------------------
+ dodir /sbin
+ dosym ../usr/bin/smbmount /sbin/mount.smbfs
+ dosym ../usr/bin/mount.cifs /sbin/mount.cifs
+ # bug #46389: samba doesn't create symlink anymore
+ dosym ./libsmbclient.so /usr/lib/libsmbclient.so.0
+ # 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
+ # Install IDEALX scripts for LDAP backend administration ---------------
+ if use ldap; then
+ # corrections as per bug #41796
+ cd ${WORKDIR}/smbldap-tools-${SMBLDAP_TOOLS_VER}
+ exeinto /usr/share/samba/scripts; doexe smbldap-*
+ exeinto /etc/samba ; doexe smbldap_tools.pm
+ insinto /etc/smbldap-tools ; doins *.conf
+ fperms 644 /etc/smbldap-tools/smbldap.conf
+ fperms 600 /etc/smbldap-tools/smbldap_bind.conf
+ eval `perl '-V:installarchlib'`
+ dodir ${installarchlib}
+ #dosym /etc/samba/smbldap_conf.pm ${installarchlib}
+ #dosym /etc/samba/smbldap_conf.pm /usr/share/samba/scripts
+ dosym /etc/samba/smbldap_tools.pm ${installarchlib}
+ dosym /etc/samba/smbldap_tools.pm /usr/share/samba/scripts
+ if [ -f mkntpwd/mkntpwd ]; then
+ exeinto /usr/sbin ; doexe mkntpwd/mkntpwd
+ fi
+ fi
+ # VFS plugin modules ---------------------------------------------------
+ if use oav; then
+ #exeinto /usr/lib/samba/vfs
+ #doexe ${S}/examples/VFS/${PN}-vscan-${VSCAN_VER}/vscan-*.so
+ cd ${S}/examples/VFS/${PN}-vscan-${VSCAN_VER}
+ make install DESTDIR=${D} || die "VFS: vscan error"
+ insinto /etc/samba
+ doins ${S}/examples/VFS/${PN}-vscan-${VSCAN_VER}/openantivirus/*conf
+ fi
+ # Python extensions ----------------------------------------------------
+ if use python; then
+ cd ${S}/source
+ python python/setup.py install --root=${D} || die
+ fi
+ # General config files -------------------------------------------------
+ insinto /etc/samba
+ touch ${D}/etc/samba/smb.conf
+ doins ${FILESDIR}/smbusers
+ newins ${FILESDIR}/smb.conf.example-samba3 smb.conf.example
+ doins ${FILESDIR}/lmhosts
+ doins ${FILESDIR}/recycle.conf
+ insinto /etc/pam.d
+ newins ${FILESDIR}/samba.pam samba
+ doins ${FILESDIR}/system-auth-winbind
+ insinto /etc/xinetd.d
+ newins ${FILESDIR}/swat.xinetd swat
+ exeinto /etc/init.d; newexe ${FILESDIR}/samba-init samba
+ insinto /etc/conf.d; newins ${FILESDIR}/samba-conf samba
+ if use ldap; then
+ insinto /etc/openldap/schema
+ doins ${S}/examples/LDAP/samba.schema
+ fi
+ # dirs -----------------------------------------------------------------
+ diropts -m0700
+ dodir /etc/samba/private
+ diropts -m1777
+ dodir /var/spool/samba
+ diropts -m0755
+ dodir /var/{log,run,cache}/samba
+ dodir /var/lib/samba/{netlogon,profiles}
+ dodir /var/lib/samba/printers/{W32X86,WIN40,W32ALPHA,W32MIPS,W32PPC}
+ # docs -----------------------------------------------------------------
+ docinto ""
+ dodoc ${S}/COPYING ${S}/Manifest ${S}/README ${S}/Roadmap ${S}/WHATSNEW.txt
+ docinto examples
+ dodoc ${FILESDIR}/nsswitch.conf-{wins,winbind}
+ cp -a ${S}/examples.ORIG/* ${D}/usr/share/doc/${PF}/examples
+ if use oav; then
+ docinto ${PN}-vscan-${VSCAN_VER}
+ cd ${WORKDIR}/${PN}-vscan-${VSCAN_VER}
+ dodoc AUTHORS COPYING ChangeLog FAQ INSTALL NEWS README TODO
+ dodoc */*.conf
+ fi
+ if use ldap; then
+ docinto smbldap-tools-${SMBLDAP_TOOLS_VER}
+ cd ${WORKDIR}/smbldap-tools-${SMBLDAP_TOOLS_VER}
+ dodoc CONTRIBUTORS COPYING ChangeLog FILES INFRA INSTALL README TODO
+ fi
+ if ! use doc; then
+ rm -rf ${D}/usr/share/doc/${PF}/swat/help/{guide,howto,devel}
+ rm -rf ${D}/usr/share/doc/${PF}/swat/using_samba
+ fi
+ chown -R root:root ${D}/usr/share/doc/${PF}
+ # moving manpages ------------------------------------------------------
+ mv ${D}/usr/man ${D}/usr/share/man
+ # moving libs ----------------------------------------------------------
+ #dodir ${D}/usr/lib/samba
+ #mv ${D}/usr/lib/vfs ${D}/usr/lib/samba
+}
+
+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..
+ #[ ! -e ${ROOT}/etc/samba/smb.conf ] && touch ${ROOT}/etc/samba/smb.conf
+
+ ### 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/log/samba3
+ ##install -m0755 -o root -g root -d ${ROOT}/var/run/samba
+ ##install -m0755 -o root -g root -d ${ROOT}/var/cache/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}
+
+ ewarn ""
+ ewarn "If you are upgrading from a Samba version prior to 3.0.2, and you"
+ ewarn "use Samba's password database, you must run the following command:"
+ ewarn ""
+ ewarn " pdbedit --force-initialized-passwords"
+ ewarn ""
+ ewarn "LIBs location change: /usr/lib/samba/*"
+ ewarn " (due to ldap/vfs external tools assumptions)"
+ ewarn ""
+ if use ldap; then
+ ewarn "If you are upgrading from prior to 3.0.2, and you are using LDAP"
+ ewarn " for Samba authentication, you must check the sambaPwdLastSet"
+ ewarn " attribute on all accounts, and ensure it is not 0."
+ einfo "WARNING: smbldap-tools changes"
+ einfo " smbldap-tools conf changed to /etc/smbldap-tools"
+ einfo " /usr/shared/samba/scripts: some script names changed"
+ einfo " dev-perl/Crypt-SmbHash: new pwd hash validation/conversion system"
+ einfo ""
+ fi
+}
diff --git a/net-fs/samba/samba-3.0.5.ebuild b/net-fs/samba/samba-3.0.5.ebuild
index 526a9caad24a..0b5b5adbecd7 100644
--- a/net-fs/samba/samba-3.0.5.ebuild
+++ b/net-fs/samba/samba-3.0.5.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2004 Gentoo Foudation
+# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/samba-3.0.5.ebuild,v 1.1 2004/07/22 14:46:42 mglauche Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/samba-3.0.5.ebuild,v 1.2 2004/07/23 17:53:14 satya Exp $
inherit eutils