(1) Change Samba's "lockdir" from /var/run/samba to /var/db/samba.
(2) Add "piddir" as /var/run and "pidfile dir" and "pidfile directory" statement for smb.conf. (3) Some fix for password synchronization but it isn't tested much and it is almost useless under "encrypt passwords = yes" environment. Changes for INSTALL and part of Makefile are provided by "Johnny C. Lam" <jlam@netbsd.org> and (2) and (3) are got from FreeBSD ports. Bump revision to 1; samba-2.2.3nb1 now.
This commit is contained in:
parent
bf2e995df2
commit
64194abfc3
11 changed files with 278 additions and 11 deletions
|
@ -1,7 +1,8 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: INSTALL,v 1.2 2001/11/21 16:44:17 jlam Exp $
|
||||
# $NetBSD: INSTALL,v 1.3 2002/02/05 00:36:25 taca Exp $
|
||||
|
||||
SAMBA_LOCKDIR="@SAMBA_LOCKDIR@"
|
||||
SAMBA_PRIVATE="@SAMBA_PRIVATE@"
|
||||
|
||||
case ${STAGE} in
|
||||
|
@ -17,5 +18,19 @@ POST-INSTALL)
|
|||
${CHMOD} 500 ${SAMBA_PRIVATE}
|
||||
echo "done."
|
||||
fi
|
||||
|
||||
# Check for files in old "lock" directory.
|
||||
if [ -e /var/run/samba ]
|
||||
then
|
||||
${CAT} << EOF
|
||||
===========================================================================
|
||||
|
||||
The location of the Samba cache directory has moved to ${SAMBA_LOCKDIR}.
|
||||
If you have any files under /var/run/samba, please move them into
|
||||
${SAMBA_LOCKDIR} and restart the SMB and NMB servers.
|
||||
|
||||
===========================================================================
|
||||
EOF
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
# $NetBSD: Makefile,v 1.77 2002/02/04 21:33:19 tron Exp $
|
||||
# $NetBSD: Makefile,v 1.78 2002/02/05 00:36:25 taca Exp $
|
||||
|
||||
DISTNAME= samba-2.2.3
|
||||
PKGREVISION= 1
|
||||
WRKSRC= ${WRKDIR}/${DISTNAME}/source
|
||||
CATEGORIES= net
|
||||
MASTER_SITES= ftp://ftp.samba.org/pub/samba/ \
|
||||
|
@ -25,21 +26,24 @@ USE_GNU_READLINE= # uses rl_event_hook interface to GNU readline
|
|||
|
||||
PKG_SYSCONFSUBDIR?= samba
|
||||
|
||||
SAMBA_LOGDIR?= /var/log
|
||||
SAMBA_LOCKDIR?= /var/run/samba
|
||||
VARDIR?= /var
|
||||
SAMBA_ETCDIR?= ${PKG_SYSCONFDIR}
|
||||
SAMBA_PRIVATE?= ${SAMBA_ETCDIR}/private
|
||||
SAMBA_DATADIR= ${PREFIX}/share
|
||||
SAMBA_LOCKDIR?= ${VARDIR}/db/samba
|
||||
SAMBA_LOGDIR?= ${VARDIR}/log
|
||||
SAMBA_PIDDIR?= ${VARDIR}/run
|
||||
SAMBA_PRIVATE?= ${SAMBA_ETCDIR}/private
|
||||
|
||||
MAKE_ENV+= ETCDIR=${SAMBA_ETCDIR}
|
||||
MAKE_ENV+= LOGDIR=${SAMBA_LOGDIR}
|
||||
|
||||
CONFIGURE_ARGS+= --localstatedir=${SAMBA_LOGDIR}
|
||||
CONFIGURE_ARGS+= --localstatedir=${VARDIR}
|
||||
CONFIGURE_ARGS+= --sbindir=${PREFIX}/sbin
|
||||
CONFIGURE_ARGS+= --with-configdir=${SAMBA_ETCDIR}
|
||||
CONFIGURE_ARGS+= --with-codepagedir=${SAMBA_DATADIR}/samba/codepages
|
||||
CONFIGURE_ARGS+= --with-datadir=${SAMBA_DATADIR}
|
||||
CONFIGURE_ARGS+= --with-lockdir=${SAMBA_LOCKDIR}
|
||||
CONFIGURE_ARGS+= --with-piddir=${SAMBA_PIDDIR}
|
||||
CONFIGURE_ARGS+= --with-privatedir=${SAMBA_PRIVATE}
|
||||
CONFIGURE_ARGS+= --with-swatdir=${SAMBA_DATADIR}/samba/swat
|
||||
|
||||
|
@ -86,8 +90,7 @@ MESSAGE_SUBST+= ETCDIR=${SAMBA_ETCDIR}
|
|||
|
||||
CONF_FILES= ${EXAMPLESDIR}/smb.conf.sample ${SAMBA_ETCDIR}/smb.conf
|
||||
RCD_SCRIPTS= samba nmbd smbd
|
||||
MAKE_DIRS= ${SAMBA_LOCKDIR}
|
||||
OWN_DIRS= ${SAMBA_ETCDIR} ${SAMBA_PRIVATE}
|
||||
OWN_DIRS= ${SAMBA_ETCDIR} ${SAMBA_PRIVATE} ${SAMBA_LOCKDIR}
|
||||
|
||||
INSTALL_EXTRA_TMPL= ${PKGDIR}/INSTALL
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
@comment $NetBSD: PLIST,v 1.4 2002/02/04 10:31:49 martti Exp $
|
||||
@comment $NetBSD: PLIST,v 1.5 2002/02/05 00:36:26 taca Exp $
|
||||
bin/make_printerdef
|
||||
bin/make_smbcodepage
|
||||
bin/make_unicodemap
|
||||
|
@ -152,9 +152,9 @@ share/examples/samba/printer-accounting/hp5-redir
|
|||
share/examples/samba/printer-accounting/lp-acct
|
||||
share/examples/samba/printer-accounting/printcap
|
||||
share/examples/samba/printing/smbprint
|
||||
share/examples/samba/printing/smbprint-new.sh
|
||||
share/examples/samba/printing/smbprint.newer
|
||||
share/examples/samba/printing/smbprint.sysv
|
||||
share/examples/samba/printing/smbprint-new.sh
|
||||
share/examples/samba/simple/README
|
||||
share/examples/samba/simple/smb.conf
|
||||
share/examples/samba/smb.conf.default
|
||||
|
|
|
@ -1,9 +1,16 @@
|
|||
$NetBSD: distinfo,v 1.14 2002/02/04 08:09:03 martti Exp $
|
||||
$NetBSD: distinfo,v 1.15 2002/02/05 00:36:26 taca Exp $
|
||||
|
||||
SHA1 (samba-2.2.3.tar.gz) = df469c3cbe15cd8379d47487ad749ef4407aa405
|
||||
Size (samba-2.2.3.tar.gz) = 7138400 bytes
|
||||
SHA1 (patch-aa) = 10a0f8f0f92b2ceae89eb4307ea5e60b6364b425
|
||||
SHA1 (patch-ab) = 92e8d3721ff137d90ae2e2fcf6d5c6820a90273e
|
||||
SHA1 (patch-ac) = a055bcc69e1a40124ada075ac836d1061ecfcd15
|
||||
SHA1 (patch-ag) = 256a7e1edb961985398a94c0b738fd96fe781f9c
|
||||
SHA1 (patch-ah) = e87f2e393db68acc7028fe20d4772455379ad7aa
|
||||
SHA1 (patch-ai) = cc31eb9cfb2ee650400c18ceaaa9ec1a3626260f
|
||||
SHA1 (patch-aj) = e2c5f7580a8c701b6bf35d0d3004f714f2c810cb
|
||||
SHA1 (patch-ak) = 110a676a911867b64bc319fceaf5e1dc1d7ecb26
|
||||
SHA1 (patch-al) = 368c7f88c5538fcaa32d7263ba98d138ba179859
|
||||
SHA1 (patch-am) = 82ea8411d7988aa4b49bf98825d368339bbc25ec
|
||||
SHA1 (patch-an) = 74ce033913cc6ba19b1d98640a9f1a554286a9d7
|
||||
SHA1 (patch-ao) = b1fd0c8c73d88a4d53ca4f0f8b969f0744301ce7
|
||||
|
|
52
net/samba/patches/patch-aa
Normal file
52
net/samba/patches/patch-aa
Normal file
|
@ -0,0 +1,52 @@
|
|||
$NetBSD: patch-aa,v 1.17 2002/02/05 00:36:26 taca Exp $
|
||||
|
||||
--- configure.in.orig Sun Feb 3 09:46:35 2002
|
||||
+++ configure.in
|
||||
@@ -13,13 +13,15 @@
|
||||
codepagedir="\$(DATADIR)/samba/codepages"
|
||||
configdir="${sysconfdir}/samba"
|
||||
lockdir="\${VARDIR}/cache/samba"
|
||||
+ piddir="\$(VARDIR)/run"
|
||||
logfilebase="\${VARDIR}/log/samba"
|
||||
privatedir="\${CONFIGDIR}/private"
|
||||
swatdir="\${DATADIR}/samba/swat",
|
||||
codepagedir="\$(LIBDIR)/codepages"
|
||||
configdir="\$(LIBDIR)"
|
||||
lockdir="\$(VARDIR)/locks"
|
||||
- logfilebase="\$(VARDIR)"
|
||||
+ piddir="\${VARDIR}/run"
|
||||
+ logfilebase="\$(VARDIR)/log"
|
||||
privatedir="\${prefix}/private"
|
||||
swatdir="\${prefix}/swat")
|
||||
|
||||
@@ -56,6 +58,22 @@
|
||||
esac])
|
||||
|
||||
#################################################
|
||||
+# set pid directory location
|
||||
+AC_ARG_WITH(piddir,
|
||||
+[ --with-piddir=DIR Where to put lock files (\${VARDIR}/run)],
|
||||
+[ case "$withval" in
|
||||
+ yes|no)
|
||||
+ #
|
||||
+ # Just in case anybody calls it without argument
|
||||
+ #
|
||||
+ AC_MSG_WARN([--with-piddir called without argument - will use default])
|
||||
+ ;;
|
||||
+ * )
|
||||
+ piddir="$withval"
|
||||
+ ;;
|
||||
+ esac])
|
||||
+
|
||||
+#################################################
|
||||
# set SWAT directory location
|
||||
AC_ARG_WITH(swatdir,
|
||||
[ --with-swatdir=DIR Where to put SWAT files ($ac_default_prefix/swat)],
|
||||
@@ -123,6 +141,7 @@
|
||||
AC_SUBST(configdir)
|
||||
AC_SUBST(lockdir)
|
||||
AC_SUBST(logfilebase)
|
||||
+AC_SUBST(piddir)
|
||||
AC_SUBST(privatedir)
|
||||
AC_SUBST(swatdir)
|
||||
AC_SUBST(bindir)
|
65
net/samba/patches/patch-ab
Normal file
65
net/samba/patches/patch-ab
Normal file
|
@ -0,0 +1,65 @@
|
|||
$NetBSD: patch-ab,v 1.13 2002/02/05 00:36:26 taca Exp $
|
||||
|
||||
--- configure.orig Sun Feb 3 09:46:35 2002
|
||||
+++ configure
|
||||
@@ -19,6 +19,8 @@
|
||||
ac_help="$ac_help
|
||||
--with-lockdir=DIR Where to put lock files ($ac_default_prefix/var/locks)"
|
||||
ac_help="$ac_help
|
||||
+ --with-piddir=DIR Where to put lock files (\${VARDIR}/run)"
|
||||
+ac_help="$ac_help
|
||||
--with-swatdir=DIR Where to put SWAT files ($ac_default_prefix/swat)"
|
||||
ac_help="$ac_help
|
||||
--with-configdir=DIR Where to put configuration files (\$libdir)"
|
||||
@@ -604,6 +606,7 @@
|
||||
codepagedir="\$(DATADIR)/samba/codepages"
|
||||
configdir="${sysconfdir}/samba"
|
||||
lockdir="\${VARDIR}/cache/samba"
|
||||
+ piddir="\$(VARDIR)/run"
|
||||
logfilebase="\${VARDIR}/log/samba"
|
||||
privatedir="\${CONFIGDIR}/private"
|
||||
swatdir="\${DATADIR}/samba/swat"
|
||||
@@ -611,7 +614,8 @@
|
||||
codepagedir="\$(LIBDIR)/codepages"
|
||||
configdir="\$(LIBDIR)"
|
||||
lockdir="\$(VARDIR)/locks"
|
||||
- logfilebase="\$(VARDIR)"
|
||||
+ piddir="\${VARDIR}/run"
|
||||
+ logfilebase="\$(VARDIR)/log"
|
||||
privatedir="\${prefix}/private"
|
||||
swatdir="\${prefix}/swat"
|
||||
fi
|
||||
@@ -656,6 +660,25 @@
|
||||
|
||||
|
||||
#################################################
|
||||
+# set pid directory location
|
||||
+# Check whether --with-piddir or --without-piddir was given.
|
||||
+if test "${with_piddir+set}" = set; then
|
||||
+ withval="$with_piddir"
|
||||
+ case "$withval" in
|
||||
+ yes|no)
|
||||
+ #
|
||||
+ # Just in case anybody calls it without argument
|
||||
+ #
|
||||
+ echo "configure: warning: --with-piddir called without argument - will use default" 1>&2
|
||||
+ ;;
|
||||
+ * )
|
||||
+ piddir="$withval"
|
||||
+ ;;
|
||||
+ esac
|
||||
+fi
|
||||
+
|
||||
+
|
||||
+#################################################
|
||||
# set SWAT directory location
|
||||
# Check whether --with-swatdir or --without-swatdir was given.
|
||||
if test "${with_swatdir+set}" = set; then
|
||||
@@ -13167,6 +13190,7 @@
|
||||
s%@configdir@%$configdir%g
|
||||
s%@lockdir@%$lockdir%g
|
||||
s%@logfilebase@%$logfilebase%g
|
||||
+s%@piddir@%$piddir%g
|
||||
s%@privatedir@%$privatedir%g
|
||||
s%@swatdir@%$swatdir%g
|
||||
s%@RUNPROG@%$RUNPROG%g
|
37
net/samba/patches/patch-ak
Normal file
37
net/samba/patches/patch-ak
Normal file
|
@ -0,0 +1,37 @@
|
|||
$NetBSD: patch-ak,v 1.1 2002/02/05 00:36:27 taca Exp $
|
||||
|
||||
--- Makefile.in.orig Sun Feb 3 09:46:05 2002
|
||||
+++ Makefile.in
|
||||
@@ -46,11 +46,11 @@
|
||||
# set these to where to find various files
|
||||
# These can be overridden by command line switches (see smbd(8))
|
||||
# or in smb.conf (see smb.conf(5))
|
||||
-LOGFILEBASE = @logfilebase@
|
||||
+LOGFILEBASE = $(VARDIR)/log
|
||||
CONFIGFILE = $(CONFIGDIR)/smb.conf
|
||||
LMHOSTSFILE = $(CONFIGDIR)/lmhosts
|
||||
DRIVERFILE = $(CONFIGDIR)/printers.def
|
||||
-PASSWD_PROGRAM = /bin/passwd
|
||||
+PASSWD_PROGRAM = /usr/bin/passwd
|
||||
# This is where smbpasswd et al go
|
||||
PRIVATEDIR = @privatedir@
|
||||
|
||||
@@ -63,6 +63,9 @@
|
||||
# the directory where lock files go
|
||||
LOCKDIR = @lockdir@
|
||||
|
||||
+# the directory where pid files go
|
||||
+PIDFILEDIR = /var/run
|
||||
+
|
||||
# libsmbclient support here
|
||||
BLDSHARED = @BLDSHARED@
|
||||
LIBSMBCLIENT_MAJOR=0
|
||||
@@ -78,7 +81,7 @@
|
||||
PASSWD_FLAGS = -DPASSWD_PROGRAM=\"$(PASSWD_PROGRAM)\" -DSMB_PASSWD_FILE=\"$(SMB_PASSWD_FILE)\" -DTDB_PASSWD_FILE=\"$(TDB_PASSWD_FILE)\"
|
||||
FLAGS1 = $(CFLAGS) -Iinclude -I$(srcdir)/include -I$(srcdir)/ubiqx -I$(srcdir)/smbwrapper $(CPPFLAGS) -DLOGFILEBASE=\"$(LOGFILEBASE)\"
|
||||
FLAGS2 = -DCONFIGFILE=\"$(CONFIGFILE)\" -DLMHOSTSFILE=\"$(LMHOSTSFILE)\"
|
||||
-FLAGS3 = -DSWATDIR=\"$(SWATDIR)\" -DSBINDIR=\"$(SBINDIR)\" -DLOCKDIR=\"$(LOCKDIR)\" -DCODEPAGEDIR=\"$(CODEPAGEDIR)\"
|
||||
+FLAGS3 = -DSWATDIR=\"$(SWATDIR)\" -DSBINDIR=\"$(SBINDIR)\" -DLOCKDIR=\"$(LOCKDIR)\" -DPIDFILEDIR=\"$(PIDFILEDIR)\" -DSMBRUN=\"$(SMBRUN)\" -DCODEPAGEDIR=\"$(CODEPAGEDIR)\"
|
||||
FLAGS4 = -DDRIVERFILE=\"$(DRIVERFILE)\" -DBINDIR=\"$(BINDIR)\"
|
||||
FLAGS5 = $(FLAGS1) $(FLAGS2) $(FLAGS3) $(FLAGS4) -DHAVE_INCLUDES_H
|
||||
FLAGS = $(ISA) $(FLAGS5) $(PASSWD_FLAGS)
|
17
net/samba/patches/patch-al
Normal file
17
net/samba/patches/patch-al
Normal file
|
@ -0,0 +1,17 @@
|
|||
$NetBSD: patch-al,v 1.1 2002/02/05 00:36:27 taca Exp $
|
||||
|
||||
--- include/local.h.orig Sun Feb 3 09:46:39 2002
|
||||
+++ include/local.h
|
||||
@@ -170,10 +170,10 @@
|
||||
* Default passwd chat script.
|
||||
*/
|
||||
|
||||
-#define DEFAULT_PASSWD_CHAT "*new*password* %n\\n *new*password* %n\\n *changed*"
|
||||
+#define DEFAULT_PASSWD_CHAT "*\\n*ew\\spassword* %n\\n *ew\\spassword* %n\\n *updating\\sthe\\sdatabase...\\npasswd:\\sdone\\n"
|
||||
|
||||
/* Minimum length of allowed password when changing UNIX password. */
|
||||
-#define MINPASSWDLENGTH 5
|
||||
+#define MINPASSWDLENGTH 6
|
||||
|
||||
/* maximum ID number used for session control. This cannot be larger
|
||||
than 62*62 for the current code */
|
12
net/samba/patches/patch-am
Normal file
12
net/samba/patches/patch-am
Normal file
|
@ -0,0 +1,12 @@
|
|||
$NetBSD: patch-am,v 1.1 2002/02/05 00:36:27 taca Exp $
|
||||
|
||||
--- include/proto.h.orig Sun Feb 3 09:46:40 2002
|
||||
+++ include/proto.h
|
||||
@@ -1813,6 +1813,7 @@
|
||||
char *lp_deleteprinter_cmd(void);
|
||||
char *lp_os2_driver_map(void);
|
||||
char *lp_lockdir(void);
|
||||
+char *lp_piddir(void);
|
||||
char *lp_utmpdir(void);
|
||||
char *lp_wtmpdir(void);
|
||||
BOOL lp_utmp(void);
|
22
net/samba/patches/patch-an
Normal file
22
net/samba/patches/patch-an
Normal file
|
@ -0,0 +1,22 @@
|
|||
$NetBSD: patch-an,v 1.1 2002/02/05 00:36:27 taca Exp $
|
||||
|
||||
--- lib/pidfile.c.orig Sun Feb 3 09:46:42 2002
|
||||
+++ lib/pidfile.c
|
||||
@@ -37,7 +37,7 @@
|
||||
unsigned ret;
|
||||
pstring pidFile;
|
||||
|
||||
- slprintf(pidFile, sizeof(pidFile)-1, "%s/%s.pid", lp_lockdir(), name);
|
||||
+ slprintf(pidFile, sizeof(pidFile)-1, "%s/%s.pid", lp_piddir(), name);
|
||||
|
||||
fd = sys_open(pidFile, O_NONBLOCK | O_RDONLY, 0644);
|
||||
if (fd == -1) {
|
||||
@@ -78,7 +78,7 @@
|
||||
pstring pidFile;
|
||||
pid_t pid;
|
||||
|
||||
- slprintf(pidFile, sizeof(pidFile)-1, "%s/%s.pid", lp_lockdir(), name);
|
||||
+ slprintf(pidFile, sizeof(pidFile)-1, "%s/%s.pid", lp_piddir(), name);
|
||||
|
||||
pid = pidfile_pid(name);
|
||||
if (pid != 0) {
|
37
net/samba/patches/patch-ao
Normal file
37
net/samba/patches/patch-ao
Normal file
|
@ -0,0 +1,37 @@
|
|||
$NetBSD: patch-ao,v 1.1 2002/02/05 00:36:27 taca Exp $
|
||||
|
||||
--- param/loadparm.c.orig Sun Feb 3 09:46:46 2002
|
||||
+++ param/loadparm.c
|
||||
@@ -108,6 +108,7 @@
|
||||
char *szDeletePrinterCommand;
|
||||
char *szOs2DriverMap;
|
||||
char *szLockDir;
|
||||
+ char *szPidDir;
|
||||
char *szRootdir;
|
||||
char *szDefaultService;
|
||||
char *szDfree;
|
||||
@@ -997,6 +998,8 @@
|
||||
{"auto services", P_STRING, P_GLOBAL, &Globals.szAutoServices, NULL, NULL, FLAG_DOS_STRING},
|
||||
{"lock dir", P_STRING, P_GLOBAL, &Globals.szLockDir, NULL, NULL, 0},
|
||||
{"lock directory", P_STRING, P_GLOBAL, &Globals.szLockDir, NULL, NULL, 0},
|
||||
+ {"pidfile dir", P_STRING, P_GLOBAL, &Globals.szPidDir, NULL, NULL, 0},
|
||||
+ {"pidfile directory", P_STRING, P_GLOBAL, &Globals.szPidDir, NULL, NULL, 0},
|
||||
#ifdef WITH_UTMP
|
||||
{"utmp directory", P_STRING, P_GLOBAL, &Globals.szUtmpDir, NULL, NULL, 0},
|
||||
{"wtmp directory", P_STRING, P_GLOBAL, &Globals.szWtmpDir, NULL, NULL, 0},
|
||||
@@ -1231,6 +1234,7 @@
|
||||
string_set(&Globals.szPasswdProgram, PASSWD_PROGRAM);
|
||||
string_set(&Globals.szPrintcapname, PRINTCAP_NAME);
|
||||
string_set(&Globals.szLockDir, LOCKDIR);
|
||||
+ string_set(&Globals.szPidDir, PIDFILEDIR);
|
||||
#ifdef WITH_UTMP
|
||||
string_set(&Globals.szUtmpDir, "");
|
||||
string_set(&Globals.szWtmpDir, "");
|
||||
@@ -1481,6 +1485,7 @@
|
||||
FN_GLOBAL_STRING(lp_deleteprinter_cmd, &Globals.szDeletePrinterCommand)
|
||||
FN_GLOBAL_STRING(lp_os2_driver_map, &Globals.szOs2DriverMap)
|
||||
FN_GLOBAL_STRING(lp_lockdir, &Globals.szLockDir)
|
||||
+FN_GLOBAL_STRING(lp_piddir, &Globals.szPidDir)
|
||||
#ifdef WITH_UTMP
|
||||
FN_GLOBAL_STRING(lp_utmpdir, &Globals.szUtmpDir)
|
||||
FN_GLOBAL_STRING(lp_wtmpdir, &Globals.szWtmpDir)
|
Loading…
Reference in a new issue