View | Details | Raw Unified | Return to bug 37888
Collapse All | Expand All

(-)Makefile (+48 lines)
Lines 7-12 Link Here
7
7
8
PORTNAME=	samba
8
PORTNAME=	samba
9
PORTVERSION=	2.2.4
9
PORTVERSION=	2.2.4
10
PORTREVISION=   1
10
CATEGORIES=	net
11
CATEGORIES=	net
11
MASTER_SITES=	ftp://ftp.samba.org/pub/samba/%SUBDIR%/ \
12
MASTER_SITES=	ftp://ftp.samba.org/pub/samba/%SUBDIR%/ \
12
		ftp://samba.anu.edu.au/pub/samba/%SUBDIR%/ \
13
		ftp://samba.anu.edu.au/pub/samba/%SUBDIR%/ \
Lines 19-30 Link Here
19
20
20
USE_BZIP2=	YES
21
USE_BZIP2=	YES
21
22
23
.if defined(WITH_AUDIT) || defined(WITH_RECYCLE)
24
USE_GMAKE=	YES
25
.endif
26
27
AUDIT=		"@comment "
28
RECYCLE=	"@comment "
29
LIBSAMBA=	"@comment "
30
31
.if defined(WITH_AUDIT)
32
AUDIT=		""
33
LIBSAMBA=	""
34
.endif
35
36
.if defined(WITH_RECYCLE)
37
RECYCLE=	""
38
LIBSAMBA=	""
39
.endif
40
22
# directories
41
# directories
23
VARDIR=		/var
42
VARDIR=		/var
24
SAMBA_SPOOL=	${VARDIR}/spool/samba
43
SAMBA_SPOOL=	${VARDIR}/spool/samba
25
SAMBA_LOGDIR=	${VARDIR}/log
44
SAMBA_LOGDIR=	${VARDIR}/log
26
SAMBA_PRIVATE=	${PREFIX}/private
45
SAMBA_PRIVATE=	${PREFIX}/private
27
SAMBA_CONFDIR=	${PREFIX}/etc
46
SAMBA_CONFDIR=	${PREFIX}/etc
47
SAMBA_VFSDIR=	${PREFIX}/lib/samba
48
28
# sample files
49
# sample files
29
STARTUP_SCRIPT=	${PREFIX}/etc/rc.d/samba.sh.sample
50
STARTUP_SCRIPT=	${PREFIX}/etc/rc.d/samba.sh.sample
30
SAMPLE_CONFIG=	${SAMBA_CONFDIR}/smb.conf.default
51
SAMPLE_CONFIG=	${SAMBA_CONFDIR}/smb.conf.default
Lines 89-94 Link Here
89
.endif
110
.endif
90
111
91
WRKSRC=		${WRKDIR}/${DISTNAME}/source
112
WRKSRC=		${WRKDIR}/${DISTNAME}/source
113
PATCH_WRKSRC=   ${WRKDIR}/${DISTNAME}
92
114
93
MAN1=		findsmb.1 make_smbcodepage.1 rpcclient.1 make_unicodemap.1 \
115
MAN1=		findsmb.1 make_smbcodepage.1 rpcclient.1 make_unicodemap.1 \
94
		nmblookup.1 smbcacls.1 smbclient.1 smbcontrol.1 \
116
		nmblookup.1 smbcacls.1 smbclient.1 smbcontrol.1 \
Lines 101-109 Link Here
101
123
102
SED_PLIST=	${SED} -e 's!${PREFIX}!%D!g'
124
SED_PLIST=	${SED} -e 's!${PREFIX}!%D!g'
103
125
126
PLIST_SUB=      AUDIT=${AUDIT} \
127
		RECYCLE=${RECYCLE} \
128
		LIBSAMBA=${LIBSAMBA}
129
130
.if defined(WITH_RECYCLE) || defined(WITH_AUDIT)
131
post-build:
132
	cd ${WRKDIR}/${DISTNAME}/examples/VFS; \
133
		${GMAKE}
134
.endif
135
104
post-install:
136
post-install:
137
.if defined(WITH_AUDIT) || defined(WITH_RECYCLE)
138
	@test -d ${SAMBA_VFSDIR} || ${MKDIR} ${SAMBA_VFSDIR}
139
.if defined(WITH_AUDIT)
140
	${INSTALL_PROGRAM) ${WRKDIR}/${DISTNAME}/examples/VFS/audit.so ${SAMBA_VFSDIR}
141
.endif
142
.if defined(WITH_RECYCLE)
143
	${INSTALL_PROGRAM} ${WRKDIR}/${DISTNAME}/examples/VFS/recycle.so ${SAMBA_VFSDIR}
144
.endif
145
.endif
105
	${MKDIR} ${PREFIX}/share/examples/samba
146
	${MKDIR} ${PREFIX}/share/examples/samba
106
	${CP} -rp ${WRKDIR}/${DISTNAME}/examples/* ${PREFIX}/share/examples/samba
147
	${CP} -rp ${WRKDIR}/${DISTNAME}/examples/* ${PREFIX}/share/examples/samba
148
.if defined(WITH_AUDIT) || defined(WITH_RECYCLE)
149
	@${RM} -rf ${PREFIX}/share/examples/samba/VFS/.libs
150
	@for file in Makefile.orig audit.o audit.so recycle.o recycle.so skel.o skel.so ; do \
151
		${RM} ${PREFIX}/share/examples/samba/VFS/$${file} ; \
152
	done
153
.endif
107
	@if [ ! -f ${STARTUP_SCRIPT} ]; then				\
154
	@if [ ! -f ${STARTUP_SCRIPT} ]; then				\
108
		${ECHO} "Installing ${STARTUP_SCRIPT} startup file." ;	\
155
		${ECHO} "Installing ${STARTUP_SCRIPT} startup file." ;	\
109
		${INSTALL_SCRIPT} ${FILESDIR}/samba.sh.sample 		\
156
		${INSTALL_SCRIPT} ${FILESDIR}/samba.sh.sample 		\
Lines 114-119 Link Here
114
		${SED} -e 's!%%SAMBA_SPOOL%%!${SAMBA_SPOOL}!'		\
161
		${SED} -e 's!%%SAMBA_SPOOL%%!${SAMBA_SPOOL}!'		\
115
			-e 's!%%SAMBA_LOGDIR%%!${SAMBA_LOGDIR}!'	\
162
			-e 's!%%SAMBA_LOGDIR%%!${SAMBA_LOGDIR}!'	\
116
			-e 's!%%SAMBA_CONFDIR%%!${SAMBA_CONFDIR}!'	\
163
			-e 's!%%SAMBA_CONFDIR%%!${SAMBA_CONFDIR}!'	\
164
			-e 's!%%SAMBA_VFSDIR%%!${SAMBA_VFSDIR}!'	\
117
			${FILESDIR}/smb.conf.default			\
165
			${FILESDIR}/smb.conf.default			\
118
			> ${SAMPLE_CONFIG} ;				\
166
			> ${SAMPLE_CONFIG} ;				\
119
	fi
167
	fi
(-)pkg-plist (+3 lines)
Lines 49-54 Link Here
49
etc/codepages/unicode_map.KOI8-R
49
etc/codepages/unicode_map.KOI8-R
50
etc/rc.d/samba.sh.sample
50
etc/rc.d/samba.sh.sample
51
etc/smb.conf.default
51
etc/smb.conf.default
52
%%AUDIT%%lib/samba/audit.so
53
%%RECYCLE%%lib/samba/recycle.so
52
sbin/nmbd
54
sbin/nmbd
53
sbin/smbd
55
sbin/smbd
54
sbin/swat
56
sbin/swat
Lines 480-482 Link Here
480
%%PORTDOCS%%@dirrm share/doc/samba/faq
482
%%PORTDOCS%%@dirrm share/doc/samba/faq
481
%%PORTDOCS%%@dirrm share/doc/samba
483
%%PORTDOCS%%@dirrm share/doc/samba
482
@dirrm etc/codepages
484
@dirrm etc/codepages
485
%%LIBSAMBA%%@dirrm lib/samba
(-)files/README.FreeBSD (-7 / +5 lines)
Lines 10-21 Link Here
10
10
11
FreeBSD Samba ports for localization and encrypt passwords support are no
11
FreeBSD Samba ports for localization and encrypt passwords support are no
12
longer provided because these supports have been integrated into the
12
longer provided because these supports have been integrated into the
13
original distribution since 1.9.18.  If you're Western European or Japanese
13
original distribution since 1.9.18.  If you're Western European, Japanese,
14
Windows users, please set "client code page" parameter in smb.conf (1.9.18
14
or Chinese Windows users, please set "client code page" parameter in smb.conf.
15
does not support Chinese Windows. If you want to use Chinese samba, please
15
See smb.conf.sample for details.  If you want to use NT4+SP3 or Win95+updates
16
use chinese/samba port).  See smb.conf.sample for details.  If you want to
16
clients, set "encrypt passwords" parameter to yes and use smbpasswd [username]
17
use NT4+SP3 or Win95+updates clients, set "encrypt passwords" parameter to
17
to use /usr/local/private/smbpasswd for authentication.
18
yes and use smbpasswd [username] to use /usr/local/private/smbpasswd for
19
authentication.
20
18
21
FreeBSD SAMBA ports maintainer: Tatsumi Hosokawa <hosokawa@jp.FreeBSD.org>
19
FreeBSD SAMBA ports maintainer: Tatsumi Hosokawa <hosokawa@jp.FreeBSD.org>
(-)files/patch-aa (-2 / +2 lines)
Lines 1-5 Link Here
1
--- Makefile.in.orig	Thu May  2 20:02:26 2002
1
--- source/Makefile.in.orig	Thu May  2 20:02:26 2002
2
+++ Makefile.in	Fri May  3 10:04:22 2002
2
+++ source/Makefile.in	Fri May  3 10:04:22 2002
3
@@ -51,7 +51,7 @@
3
@@ -51,7 +51,7 @@
4
 CONFIGFILE = $(CONFIGDIR)/smb.conf
4
 CONFIGFILE = $(CONFIGDIR)/smb.conf
5
 LMHOSTSFILE = $(CONFIGDIR)/lmhosts
5
 LMHOSTSFILE = $(CONFIGDIR)/lmhosts
(-)files/patch-ae (-2 / +2 lines)
Lines 1-5 Link Here
1
--- script/convert_smbpasswd.orig	Thu Nov  5 02:50:17 1998
1
--- source/script/convert_smbpasswd.orig	Thu Nov  5 02:50:17 1998
2
+++ script/convert_smbpasswd	Tue Oct 16 17:19:10 2001
2
+++ source/script/convert_smbpasswd	Tue Oct 16 17:19:10 2001
3
@@ -7,7 +7,7 @@
3
@@ -7,7 +7,7 @@
4
 # with trying to work out how to get the seconds since 1970
4
 # with trying to work out how to get the seconds since 1970
5
 # in awk or the shell. JRA.
5
 # in awk or the shell. JRA.
(-)files/patch-aj (-2 / +2 lines)
Lines 1-5 Link Here
1
--- include/local.h.orig	Fri Jul  6 03:01:26 2001
1
--- source/include/local.h.orig	Fri Jul  6 03:01:26 2001
2
+++ include/local.h	Tue Oct 16 17:20:36 2001
2
+++ source/include/local.h	Tue Oct 16 17:20:36 2001
3
@@ -176,10 +176,10 @@
3
@@ -176,10 +176,10 @@
4
  * Default passwd chat script.
4
  * Default passwd chat script.
5
  */
5
  */
(-)files/patch-ba (-4 / +38 lines)
Lines 1-6 Link Here
1
--- configure.in.orig	Wed Feb  6 20:56:47 2002
1
--- source/configure.in.orig	Thu May  2 20:02:46 2002
2
+++ configure.in	Wed Mar 13 12:42:20 2002
2
+++ source/configure.in	Thu May  9 02:29:20 2002
3
@@ -1792,7 +1792,7 @@
3
@@ -498,9 +498,23 @@
4
 ############################################
5
 # we need dlopen/dlclose/dlsym/dlerror for PAM, the password database plugins and the new VFS code
6
 AC_CHECK_FUNCS(dlopen)
7
+case "$host_os" in
8
+	*bsd*)
9
+		AC_CHECK_LIB(c, dlopen, [LIBS="$LIBS -lc";
10
+		AC_DEFINE(HAVE_DLOPEN)])
11
+		;;
12
+esac
13
 if test x"$ac_cv_func_dlopen" = x"no"; then
14
-	AC_CHECK_LIB(dl, dlopen, [LIBS="$LIBS -ldl";
15
-	AC_DEFINE(HAVE_DLOPEN)])
16
+	case "$host_os" in
17
+	 *bsd*)
18
+		AC_CHECK_LIB(c, dlopen, [LIBS="$LIBS -lc";
19
+		AC_DEFINE(HAVE_DLOPEN)])
20
+		;;
21
+	     *)
22
+		AC_CHECK_LIB(dl, dlopen, [LIBS="$LIBS -ldl";
23
+		AC_DEFINE(HAVE_DLOPEN)])
24
+		;;
25
+	esac
26
 fi
27
 # dlopen/dlclose/dlsym/dlerror will be checked again later and defines will be set then
28
 
29
@@ -870,6 +884,7 @@
30
 		;;
31
 		*bsd*)  BLDSHARED="true"
32
 			LDSHFLAGS="-shared"
33
+			DYNEXP="-Wl,--export-dynamic"
34
 			SONAMEFLAG="-Wl,-soname,"
35
 			PICFLAG="-fPIC"
36
 			AC_DEFINE(STAT_ST_BLOCKSIZE,512)
37
@@ -1868,7 +1883,7 @@
4
   yes)
38
   yes)
5
     AC_MSG_RESULT(yes)
39
     AC_MSG_RESULT(yes)
6
     AC_DEFINE(KRB5_AUTH)
40
     AC_DEFINE(KRB5_AUTH)
Lines 9-15 Link Here
9
     CFLAGS="$CFLAGS -I$withval/include"
43
     CFLAGS="$CFLAGS -I$withval/include"
10
     LDFLAGS="$LDFLAGS -L$withval/lib"
44
     LDFLAGS="$LDFLAGS -L$withval/lib"
11
     ;;
45
     ;;
12
@@ -1966,7 +1966,7 @@
46
@@ -2042,7 +2057,7 @@
13
   yes)
47
   yes)
14
     AC_MSG_RESULT(yes)
48
     AC_MSG_RESULT(yes)
15
     AC_DEFINE(WITH_LDAP_SAM)
49
     AC_DEFINE(WITH_LDAP_SAM)
(-)files/patch-examples-VFS-Makefile (+14 lines)
Added Link Here
1
--- examples/VFS/Makefile.orig	Tue May  7 11:17:58 2002
2
+++ examples/VFS/Makefile	Tue May  7 11:19:31 2002
3
@@ -10,9 +10,10 @@
4
 
5
 SAMBA_SRC = ../../source
6
 SAMBA_INCL = ../../source/include
7
+POPT_INCL = ../../source/popt
8
 UBIQX_SRC = ../../source/ubiqx
9
 SMBWR_SRC = ../../source/smbwrapper
10
-CFLAGS = -I$(SAMBA_SRC) -I$(SAMBA_INCL) -I$(UBIQX_SRC) -I$(SMBWR_SRC) -Wall -g
11
+CFLAGS = -I$(SAMBA_SRC) -I$(SAMBA_INCL) -I$(UBIQX_SRC) -I$(SMBWR_SRC) -I${POPT_INCL} -Wall -g
12
 VFS_OBJS = audit.so skel.so recycle.so
13
 
14
 # Default target
(-)files/patch-examples-VFS-recycle.c (+37 lines)
Added Link Here
1
--- examples/VFS/recycle.c.orig	Wed May  8 21:30:11 2002
2
+++ examples/VFS/recycle.c	Thu May  9 02:19:32 2002
3
@@ -238,15 +238,18 @@
4
 		return default_vfs_ops.unlink(conn,fname);
5
 	}
6
 
7
-	base = strrchr(fname, '/') + 1;
8
-	if(base == (char*)1)
9
-		ext = strrchr(fname, '.');
10
-	else
11
-		ext = strrchr(base, '.');
12
-
13
+	base = strrchr(fname, '/');
14
 	pstrcpy(bin, recycle_bin);
15
 	pstrcat(bin, "/");
16
-	pstrcat(bin, base);
17
+
18
+	if(base == NULL) {
19
+		ext = strrchr(fname, '.');
20
+		pstrcat(bin, fname);
21
+	} else {
22
+		ext = strrchr(base, '.');
23
+		pstrcat(bin, base+1);
24
+	}
25
+	DEBUG(3, ("recycle bin: base %s, ext %s, fname %s, bin %s\n", base, ext, fname, bin));
26
 
27
 	if(strcmp(fname,bin) == 0) {
28
 		DEBUG(3, ("recycle bin: file %s exists, purging...\n", fname));
29
@@ -254,6 +257,8 @@
30
 	}
31
 
32
 	len = strlen(bin);
33
+	if ( ext != NULL)
34
+		len = len - strlen(ext);
35
 	addlen = sizeof(pstring)-len-1;
36
 	while(recycle_file_exist(conn,bin)) {
37
 		slprintf(bin+len, addlen, " (Copy #%d)", i++);
(-)files/patch-include-includes.h (-14 lines)
Removed Link Here
1
--- include/includes.h.orig	Sat Oct 13 17:09:21 2001
2
+++ include/includes.h	Fri Jan 11 22:12:06 2002
3
@@ -27,6 +27,11 @@
4
 
5
 #include "local.h"
6
 
7
+#ifdef __FreeBSD__
8
+#define DEFAULT_PRINTING PRINT_BSD
9
+#define PRINTCAP_NAME "/etc/printcap"
10
+#endif /* __FreeBSD__ */
11
+
12
 #ifdef AIX
13
 #define DEFAULT_PRINTING PRINT_AIX
14
 #define PRINTCAP_NAME "/etc/qconfig"
(-)files/patch-source-include-includes.h (+14 lines)
Added Link Here
1
--- source/include/includes.h.orig	Sat Oct 13 17:09:21 2001
2
+++ source/include/includes.h	Fri Jan 11 22:12:06 2002
3
@@ -27,6 +27,11 @@
4
 
5
 #include "local.h"
6
 
7
+#ifdef __FreeBSD__
8
+#define DEFAULT_PRINTING PRINT_BSD
9
+#define PRINTCAP_NAME "/etc/printcap"
10
+#endif /* __FreeBSD__ */
11
+
12
 #ifdef AIX
13
 #define DEFAULT_PRINTING PRINT_AIX
14
 #define PRINTCAP_NAME "/etc/qconfig"
(-)files/smb.conf.default (-6 / +17 lines)
Lines 58-66 Link Here
58
# Security mode. Most people will want user level security. See
58
# Security mode. Most people will want user level security. See
59
# security_level.txt for details.
59
# security_level.txt for details.
60
   security = user
60
   security = user
61
61
# Use password server option only with security = server
62
# Use password server option only with security = server
63
# The argument list may include:
64
#   password server = My_PDC_Name [My_BDC_Name] [My_Next_BDC_Name]
65
# or to auto-locate the domain controller/s
66
#   password server = *
62
;   password server = <NT-Server-Name>
67
;   password server = <NT-Server-Name>
63
68
69
# Note: Do NOT use the now deprecated option of "domain controller"
70
# This option is no longer implemented.
71
64
# You may wish to use password encryption. Please read
72
# You may wish to use password encryption. Please read
65
# ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation.
73
# ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation.
66
# Do not enable this option unless you have read those documents
74
# Do not enable this option unless you have read those documents
Lines 73-78 Link Here
73
81
74
# Most people will find that this option gives better performance.
82
# Most people will find that this option gives better performance.
75
# See speed.txt and the manual pages for details
83
# See speed.txt and the manual pages for details
84
# You may want to add the following on a Linux system:
85
#         SO_RCVBUF=8192 SO_SNDBUF=8192
76
   socket options = TCP_NODELAY 
86
   socket options = TCP_NODELAY 
77
87
78
# Configure Samba to use multiple interfaces
88
# Configure Samba to use multiple interfaces
Lines 98-107 Link Here
98
# and gives it a slightly higher chance of winning the election
108
# and gives it a slightly higher chance of winning the election
99
;   preferred master = yes
109
;   preferred master = yes
100
110
101
# Use only if you have an NT server on your network that has been
102
# configured at install time to be a primary domain controller.
103
;   domain controller = <NT-Domain-Controller-SMBName>
104
105
# Enable this if you want Samba to be a domain logon server for 
111
# Enable this if you want Samba to be a domain logon server for 
106
# Windows95 workstations. 
112
# Windows95 workstations. 
107
;   domain logons = yes
113
;   domain logons = yes
Lines 174-179 Link Here
174
   comment = Home Directories
180
   comment = Home Directories
175
   browseable = no
181
   browseable = no
176
   writeable = yes
182
   writeable = yes
183
# Un-comment the following two lines to add a recycle bin facility to a samba share
184
# NOTE: It currently doesn't work with the [homes] virtual share, use a regular share instead
185
;  vfs object = %%SAMBA_VFSDIR%%/recycle.so
186
;  vfs options= recycle=.recycle
177
187
178
# Un-comment the following and create the netlogon directory for Domain Logons
188
# Un-comment the following and create the netlogon directory for Domain Logons
179
; [netlogon]
189
; [netlogon]
Lines 265-270 Link Here
265
;   only guest = yes
275
;   only guest = yes
266
;   writeable = yes
276
;   writeable = yes
267
;   printable = no
277
;   printable = no
278
# Un-comment the following two lines to add a recycle bin facility to a samba share
279
;  vfs object = %%SAMBA_VFSDIR%%/recycle.so
280
;  vfs options= recycle=.recycle
268
281
269
# The following two entries demonstrate how to share a directory so that two
282
# The following two entries demonstrate how to share a directory so that two
270
# users can place files there that will be owned by the specific users. In this
283
# users can place files there that will be owned by the specific users. In this
271
 
272

Return to bug 37888