From 4de7a65edf46f54a7b40dd323562459a7be082a0 Mon Sep 17 00:00:00 2001 From: Pav Lucistnik Date: Tue, 20 Apr 2004 16:15:05 +0000 Subject: [PATCH] - Fix wrong location of lockdir from revision 1.105. This broked printing. PR: ports/65818 Submitted by: Timur Bakeyev (maintainer) --- net/samba-devel/Makefile | 75 +++++++++++++++++---------- net/samba-devel/files/samba.sh.sample | 10 ++-- net/samba-devel/pkg-plist | 12 +---- net/samba3/Makefile | 75 +++++++++++++++++---------- net/samba3/files/samba.sh.sample | 10 ++-- net/samba3/pkg-plist | 12 +---- 6 files changed, 110 insertions(+), 84 deletions(-) diff --git a/net/samba-devel/Makefile b/net/samba-devel/Makefile index e242fd1bfbbd..d880b79fd326 100644 --- a/net/samba-devel/Makefile +++ b/net/samba-devel/Makefile @@ -7,7 +7,7 @@ PORTNAME= samba PORTVERSION= 3.0.3.p2 -PORTREVISION?= 0 +PORTREVISION?= 1 PORTEPOCH?= 1 CATEGORIES?= net MASTER_SITES= ${MASTER_SITE_SAMBA} @@ -26,6 +26,7 @@ VARDIR= ${DESTDIR}/var SAMBA_SPOOL?= ${VARDIR}/spool/samba SAMBA_LOGDIR= ${VARDIR}/log/samba SAMBA_RUNDIR= ${VARDIR}/run +SAMBA_LOCKDIR= ${SAMBA_RUNDIR}/samba SAMBA_PRIVATE?= ${PREFIX}/private SAMBA_CONFDIR?= ${PREFIX}/etc SAMBA_SWATDIR= ${PREFIX}/share/swat @@ -41,7 +42,7 @@ CONFIGURE_ARGS+=--exec-prefix=${PREFIX} \ --with-configdir=${SAMBA_CONFDIR} \ --with-libdir=${SAMBA_LIBDIR}/samba \ --with-swatdir=${SAMBA_SWATDIR} \ - --with-lockdir=${SAMBA_SPOOL} --with-piddir=${SAMBA_RUNDIR} \ + --with-piddir=${SAMBA_RUNDIR} --with-lockdir=${SAMBA_LOCKDIR} \ --with-privatedir=${SAMBA_PRIVATE} \ --with-logfilebase=${SAMBA_LOGDIR} \ --with-manpages-langs=en @@ -271,22 +272,27 @@ WINBIND_FILTER= ${GREP} -v '^%%WINBIND%%' .endif PLIST_SUB+= RC_DIR=${RC_DIR} \ - SAMBA_SPOOL=${SAMBA_SPOOL} \ - SAMBA_LOGDIR=${SAMBA_LOGDIR} + SAMBA_LOGDIR=${SAMBA_LOGDIR} \ + SAMBA_LOCKDIR=${SAMBA_LOCKDIR} RC_SCRIPTS_SUB= PREFIX=${PREFIX} \ - RC_SUBR=${RC_SUBR} \ - RC_DIR=${RC_DIR} \ CUPS=${CUPS} \ + RC_SUBR=${RC_SUBR} \ + SAMBA_CONFDIR=${SAMBA_CONFDIR} \ SAMBA_CONFIG=${SAMBA_CONFIG} \ - SAMBA_SPOOL=${SAMBA_SPOOL} \ - SAMBA_RUNDIR=${SAMBA_RUNDIR} + SAMBA_LOGDIR=${SAMBA_LOGDIR} \ + SAMBA_RUNDIR=${SAMBA_RUNDIR} \ + SAMBA_LOCKDIR=${SAMBA_LOCKDIR} \ + SAMBA_SPOOL=${SAMBA_SPOOL} pre-fetch: @${ECHO_MSG} "===> -------------------------------------------" @${ECHO_MSG} "===> Run 'make config' to (re)configure the port" @${ECHO_MSG} "===> -------------------------------------------" +post-patch: + @${FIND} ${WRKSRC} -name CVS -o -name .cvsignore | ${XARGS} ${RM} + post-install: .for sect in 1 5 7 8 @${MKDIR} ${MAN${sect}PREFIX}/man/man${sect} @@ -306,29 +312,46 @@ post-install: @${MKDIR} ${EXAMPLESDIR}/python @${CP} -Rp ${WRKSRC}/python/examples/* ${EXAMPLESDIR}/python .endif - @${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \ + @${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \ ${FILESDIR}/samba.sh.sample | ${WINBIND_FILTER} > ${WRKDIR}/samba.sh ${INSTALL_SCRIPT} ${WRKDIR}/samba.sh ${RC_DIR}/samba.sh - @test -d ${SAMBA_SPOOL} || ${MKDIR} ${SAMBA_SPOOL} && ${CHMOD} 0755 ${SAMBA_SPOOL} - @test -d ${SAMBA_LOGDIR} || ${MKDIR} ${SAMBA_LOGDIR} - ${SED} -e 's!%%SAMBA_SPOOL%%!${SAMBA_SPOOL}!' \ - -e 's!%%SAMBA_LOGDIR%%!${SAMBA_LOGDIR}!' \ - -e 's!%%SAMBA_CONFDIR%%!${SAMBA_CONFDIR}!' \ - ${FILESDIR}/smb.conf.default \ - > ${SAMBA_CONFIG}.default ; \ + @${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \ + ${FILESDIR}/smb.conf.default > ${WRKDIR}/smb.conf.default + ${INSTALL_DATA} ${WRKDIR}/smb.conf.default ${SAMBA_CONFIG}.default ${INSTALL_SCRIPT} ${WRKSRC}/script/mksmbpasswd.sh ${PREFIX}/bin/make_smbpasswd - if [ ! -d ${SAMBA_PRIVATE} ] ; then \ - ${MKDIR} ${SAMBA_PRIVATE} ; \ - ${CHOWN} root:wheel ${SAMBA_PRIVATE} ; \ - fi - ${CHMOD} 700 ${SAMBA_PRIVATE} -.if defined(PACKAGE_BUILDING) + # Spool + @test -d ${SAMBA_SPOOL} || ${MKDIR} ${SAMBA_SPOOL} && \ + ${CHMOD} 1777 ${SAMBA_SPOOL} && ${CHOWN} root:wheel ${SAMBA_SPOOL} + @${ECHO_CMD} "@exec ${MKDIR} ${SAMBA_SPOOL} 2>/dev/null || true" >> ${TMPPLIST} + @${ECHO_CMD} "@exec ${CHMOD} 1777 ${SAMBA_SPOOL}" >> ${TMPPLIST} + @${ECHO_CMD} "@exec ${CHOWN} root:wheel ${SAMBA_SPOOL}" >> ${TMPPLIST} + @${ECHO_CMD} "@unexec ${RM} -rf ${SAMBA_SPOOL}" >> ${TMPPLIST} + # Logdir + @test -d ${SAMBA_LOGDIR} || ${MKDIR} ${SAMBA_LOGDIR} && \ + ${CHMOD} 0755 ${SAMBA_LOGDIR} && ${CHOWN} root:wheel ${SAMBA_LOGDIR} + @${ECHO_CMD} "@exec ${MKDIR} ${SAMBA_LOGDIR} 2>/dev/null || true" >> ${TMPPLIST} + @${ECHO_CMD} "@exec ${CHMOD} 0755 ${SAMBA_LOGDIR}" >> ${TMPPLIST} + @${ECHO_CMD} "@exec ${CHOWN} root:wheel ${SAMBA_LOGDIR}" >> ${TMPPLIST} + @${ECHO_CMD} "@unexec ${RMDIR} ${SAMBA_LOGDIR} 2>/dev/null || true" >> ${TMPPLIST} + @${ECHO_CMD} "@unexec ${ECHO_CMD} \"Warning: If you will *NOT* use this package anymore, please remove ${SAMBA_LOGDIR}/* manually.\"" >> ${TMPPLIST} + # Lockdir + @test -d ${SAMBA_LOCKDIR} || ${MKDIR} ${SAMBA_LOCKDIR} && \ + ${CHMOD} 0755 ${SAMBA_LOCKDIR} && ${CHOWN} root:wheel ${SAMBA_LOCKDIR} + @${ECHO_CMD} "@exec ${MKDIR} ${SAMBA_LOCKDIR} 2>/dev/null || true" >> ${TMPPLIST} + @${ECHO_CMD} "@exec ${CHMOD} 0755 ${SAMBA_LOCKDIR}" >> ${TMPPLIST} + @${ECHO_CMD} "@exec ${CHOWN} root:wheel ${SAMBA_LOCKDIR}" >> ${TMPPLIST} + @${ECHO_CMD} "@unexec ${RM} -rf ${SAMBA_LOCKDIR}/printing" >> ${TMPPLIST} + @${ECHO_CMD} "@unexec for file in `${LS} ${SAMBA_LOCKDIR} | ${GREP} -v '^winbindd_'`; do ${RM} -rf ${SAMBA_LOCKDIR}/${file}; done" >> ${TMPPLIST} + @${ECHO_CMD} "@unexec ${RMDIR} ${SAMBA_LOCKDIR} 2>/dev/null || true" >> ${TMPPLIST} + @${ECHO_CMD} "@unexec ${ECHO_CMD} \"Warning: If you will *NOT* use this package anymore, please remove ${SAMBA_LOCKDIR}/* manually.\"" >> ${TMPPLIST} + # Private + @test -d ${SAMBA_PRIVATE} || ${MKDIR} ${SAMBA_PRIVATE} && \ + ${CHMOD} 700 ${SAMBA_PRIVATE} && ${CHOWN} root:wheel ${SAMBA_PRIVATE} @${ECHO_CMD} "@exec ${MKDIR} ${SAMBA_PRIVATE} 2>/dev/null || true" >> ${TMPPLIST} @${ECHO_CMD} "@exec ${CHMOD} 700 ${SAMBA_PRIVATE}" >> ${TMPPLIST} - @${ECHO_CMD} "@unexec ${RM} -rf ${SAMBA_PRIVATE}" >> ${TMPPLIST} -.else - @${ECHO_CMD} "@unexec ${ECHO_CMD} \"Warning: If you will *NOT* use this package anymore, please remove %D/private/* manually.\"" >> ${TMPPLIST} -.endif + @${ECHO_CMD} "@exec ${CHOWN} root:wheel ${SAMBA_PRIVATE}" >> ${TMPPLIST} + @${ECHO_CMD} "@unexec ${RMDIR} ${SAMBA_PRIVATE} 2>/dev/null || true" >> ${TMPPLIST} + @${ECHO_CMD} "@unexec ${ECHO_CMD} \"Warning: If you will *NOT* use this package anymore, please remove ${SAMBA_PRIVATE}/* manually.\"" >> ${TMPPLIST} .if !defined(WITHOUT_WINBIND) .if defined(WITH_WINBIND_NSS) ${INSTALL_PROGRAM} ${WRKSRC}/nsswitch/nss_winbind.so ${SAMBA_LIBDIR}/nss_winbind.so.1 diff --git a/net/samba-devel/files/samba.sh.sample b/net/samba-devel/files/samba.sh.sample index 016467524cde..c37ba55de080 100644 --- a/net/samba-devel/files/samba.sh.sample +++ b/net/samba-devel/files/samba.sh.sample @@ -38,7 +38,7 @@ if [ ! -r ${samba_config} ]; then esac fi -if test -n ${samba_enable:-} && checkyesno samba_enable; then +if test -n ${samba_enable:-""} && checkyesno samba_enable; then nmbd_enable=${nmbd_enable:-"YES"} smbd_enable=${smbd_enable:-"YES"} %%WINBIND%% winbindd_enable=${winbindd_enable:-"YES"} @@ -64,13 +64,13 @@ samba_stop() { nmbd_precmd() { # XXX: Never delete winbindd_idmap.tdb and winbindd_cache.tdb - if [ -d "%%SAMBA_SPOOL%%" ]; then + if [ -d "%%SAMBA_LOCKDIR%%" ]; then echo "Starting SAMBA: removing stale tdbs :" for file in connections.tdb locking.tdb messages.tdb \ sessionid.tdb unexpected.tdb brlock.tdb \ namelist.debug do - rm -vf "%%SAMBA_SPOOL%%/$file" + rm -vf "%%SAMBA_LOCKDIR%%/$file" done fi } @@ -79,7 +79,7 @@ nmbd_precmd() { name=nmbd rcvar=`set_rcvar` command="%%PREFIX%%/sbin/${name}" -required_dirs="%%SAMBA_SPOOL%%" +required_dirs="%%SAMBA_LOCKDIR%%" pidfile=%%SAMBA_RUNDIR%%/${name}.pid start_precmd="nmbd_precmd" stop_cmd="samba_stop" @@ -110,7 +110,7 @@ run_rc_command "$1" %%WINBIND%%name=winbindd %%WINBIND%%rcvar=`set_rcvar` %%WINBIND%%command="%%PREFIX%%/sbin/${name}" -%%WINBIND%%required_dirs="%%SAMBA_SPOOL%%" +%%WINBIND%%required_dirs="%%SAMBA_LOCKDIR%%" %%WINBIND%%pidfile=%%SAMBA_RUNDIR%%/${name}.pid %%WINBIND%%start_precmd=":" %%WINBIND%%stop_cmd="samba_stop" diff --git a/net/samba-devel/pkg-plist b/net/samba-devel/pkg-plist index 7c0c8525276a..d4bb1f250d2d 100644 --- a/net/samba-devel/pkg-plist +++ b/net/samba-devel/pkg-plist @@ -231,7 +231,6 @@ lib/libsmbclient.so.0 %%SMBPASS%%%%EXAMPLESDIR%%/pam_smbpass/password-mature %%SMBPASS%%%%EXAMPLESDIR%%/pam_smbpass/password-migration %%SMBPASS%%%%EXAMPLESDIR%%/pam_smbpass/password-sync -%%PYTHON%%%%EXAMPLESDIR%%/python/tdbpack/.cvsignore %%PYTHON%%%%EXAMPLESDIR%%/python/tdbpack/oldtdbutil.py %%PYTHON%%%%EXAMPLESDIR%%/python/tdbpack/tdbtimetrial.py %%PYTHON%%%%EXAMPLESDIR%%/python/tdbpack/test_tdbpack.py @@ -719,18 +718,9 @@ share/swat/using_samba/samba2_xs.gif @dirrm lib/samba/charset @dirrm lib/samba/auth @dirrm lib/samba -%%PYTHON%%@unexec rmdir -p %D/lib/%%PYTHON_VERSION%%/site-packages/samba 2>/dev/null || true +%%PYTHON%%@unexec rmdir -p %D/lib/%%PYTHON_VERSION%%/site-packages/samba/. 2>/dev/null || true %%PORTDOCS%%@dirrm %%DOCSDIR%%/Registry %%PORTDOCS%%@dirrm %%DOCSDIR%%/htmldocs/images %%PORTDOCS%%@dirrm %%DOCSDIR%%/htmldocs %%PORTDOCS%%@dirrm %%DOCSDIR%%/faq %%PORTDOCS%%@dirrm %%DOCSDIR%% -@exec mkdir -p %%SAMBA_SPOOL%% || true -@exec chmod 0755 %%SAMBA_SPOOL%% -@unexec rm -fr %%SAMBA_SPOOL%%/printing -@unexec for file in `ls %%SAMBA_SPOOL%% | grep -v '^winbindd_'`; do rm -fr %%SAMBA_SPOOL%%/$file; done -@unexec rmdir %%SAMBA_SPOOL%% 2>/dev/null || true -@unexec echo "Warning: If you will *NOT* use this package anymore, please remove %%SAMBA_SPOOL%%/*.tdb manually." -@exec mkdir -p %%SAMBA_LOGDIR%% || true -@unexec rmdir %%SAMBA_LOGDIR%% 2>/dev/null || true -@unexec echo "Warning: If you will *NOT* use this package anymore, please remove %%SAMBA_LOGDIR%% manually." diff --git a/net/samba3/Makefile b/net/samba3/Makefile index e242fd1bfbbd..d880b79fd326 100644 --- a/net/samba3/Makefile +++ b/net/samba3/Makefile @@ -7,7 +7,7 @@ PORTNAME= samba PORTVERSION= 3.0.3.p2 -PORTREVISION?= 0 +PORTREVISION?= 1 PORTEPOCH?= 1 CATEGORIES?= net MASTER_SITES= ${MASTER_SITE_SAMBA} @@ -26,6 +26,7 @@ VARDIR= ${DESTDIR}/var SAMBA_SPOOL?= ${VARDIR}/spool/samba SAMBA_LOGDIR= ${VARDIR}/log/samba SAMBA_RUNDIR= ${VARDIR}/run +SAMBA_LOCKDIR= ${SAMBA_RUNDIR}/samba SAMBA_PRIVATE?= ${PREFIX}/private SAMBA_CONFDIR?= ${PREFIX}/etc SAMBA_SWATDIR= ${PREFIX}/share/swat @@ -41,7 +42,7 @@ CONFIGURE_ARGS+=--exec-prefix=${PREFIX} \ --with-configdir=${SAMBA_CONFDIR} \ --with-libdir=${SAMBA_LIBDIR}/samba \ --with-swatdir=${SAMBA_SWATDIR} \ - --with-lockdir=${SAMBA_SPOOL} --with-piddir=${SAMBA_RUNDIR} \ + --with-piddir=${SAMBA_RUNDIR} --with-lockdir=${SAMBA_LOCKDIR} \ --with-privatedir=${SAMBA_PRIVATE} \ --with-logfilebase=${SAMBA_LOGDIR} \ --with-manpages-langs=en @@ -271,22 +272,27 @@ WINBIND_FILTER= ${GREP} -v '^%%WINBIND%%' .endif PLIST_SUB+= RC_DIR=${RC_DIR} \ - SAMBA_SPOOL=${SAMBA_SPOOL} \ - SAMBA_LOGDIR=${SAMBA_LOGDIR} + SAMBA_LOGDIR=${SAMBA_LOGDIR} \ + SAMBA_LOCKDIR=${SAMBA_LOCKDIR} RC_SCRIPTS_SUB= PREFIX=${PREFIX} \ - RC_SUBR=${RC_SUBR} \ - RC_DIR=${RC_DIR} \ CUPS=${CUPS} \ + RC_SUBR=${RC_SUBR} \ + SAMBA_CONFDIR=${SAMBA_CONFDIR} \ SAMBA_CONFIG=${SAMBA_CONFIG} \ - SAMBA_SPOOL=${SAMBA_SPOOL} \ - SAMBA_RUNDIR=${SAMBA_RUNDIR} + SAMBA_LOGDIR=${SAMBA_LOGDIR} \ + SAMBA_RUNDIR=${SAMBA_RUNDIR} \ + SAMBA_LOCKDIR=${SAMBA_LOCKDIR} \ + SAMBA_SPOOL=${SAMBA_SPOOL} pre-fetch: @${ECHO_MSG} "===> -------------------------------------------" @${ECHO_MSG} "===> Run 'make config' to (re)configure the port" @${ECHO_MSG} "===> -------------------------------------------" +post-patch: + @${FIND} ${WRKSRC} -name CVS -o -name .cvsignore | ${XARGS} ${RM} + post-install: .for sect in 1 5 7 8 @${MKDIR} ${MAN${sect}PREFIX}/man/man${sect} @@ -306,29 +312,46 @@ post-install: @${MKDIR} ${EXAMPLESDIR}/python @${CP} -Rp ${WRKSRC}/python/examples/* ${EXAMPLESDIR}/python .endif - @${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \ + @${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \ ${FILESDIR}/samba.sh.sample | ${WINBIND_FILTER} > ${WRKDIR}/samba.sh ${INSTALL_SCRIPT} ${WRKDIR}/samba.sh ${RC_DIR}/samba.sh - @test -d ${SAMBA_SPOOL} || ${MKDIR} ${SAMBA_SPOOL} && ${CHMOD} 0755 ${SAMBA_SPOOL} - @test -d ${SAMBA_LOGDIR} || ${MKDIR} ${SAMBA_LOGDIR} - ${SED} -e 's!%%SAMBA_SPOOL%%!${SAMBA_SPOOL}!' \ - -e 's!%%SAMBA_LOGDIR%%!${SAMBA_LOGDIR}!' \ - -e 's!%%SAMBA_CONFDIR%%!${SAMBA_CONFDIR}!' \ - ${FILESDIR}/smb.conf.default \ - > ${SAMBA_CONFIG}.default ; \ + @${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \ + ${FILESDIR}/smb.conf.default > ${WRKDIR}/smb.conf.default + ${INSTALL_DATA} ${WRKDIR}/smb.conf.default ${SAMBA_CONFIG}.default ${INSTALL_SCRIPT} ${WRKSRC}/script/mksmbpasswd.sh ${PREFIX}/bin/make_smbpasswd - if [ ! -d ${SAMBA_PRIVATE} ] ; then \ - ${MKDIR} ${SAMBA_PRIVATE} ; \ - ${CHOWN} root:wheel ${SAMBA_PRIVATE} ; \ - fi - ${CHMOD} 700 ${SAMBA_PRIVATE} -.if defined(PACKAGE_BUILDING) + # Spool + @test -d ${SAMBA_SPOOL} || ${MKDIR} ${SAMBA_SPOOL} && \ + ${CHMOD} 1777 ${SAMBA_SPOOL} && ${CHOWN} root:wheel ${SAMBA_SPOOL} + @${ECHO_CMD} "@exec ${MKDIR} ${SAMBA_SPOOL} 2>/dev/null || true" >> ${TMPPLIST} + @${ECHO_CMD} "@exec ${CHMOD} 1777 ${SAMBA_SPOOL}" >> ${TMPPLIST} + @${ECHO_CMD} "@exec ${CHOWN} root:wheel ${SAMBA_SPOOL}" >> ${TMPPLIST} + @${ECHO_CMD} "@unexec ${RM} -rf ${SAMBA_SPOOL}" >> ${TMPPLIST} + # Logdir + @test -d ${SAMBA_LOGDIR} || ${MKDIR} ${SAMBA_LOGDIR} && \ + ${CHMOD} 0755 ${SAMBA_LOGDIR} && ${CHOWN} root:wheel ${SAMBA_LOGDIR} + @${ECHO_CMD} "@exec ${MKDIR} ${SAMBA_LOGDIR} 2>/dev/null || true" >> ${TMPPLIST} + @${ECHO_CMD} "@exec ${CHMOD} 0755 ${SAMBA_LOGDIR}" >> ${TMPPLIST} + @${ECHO_CMD} "@exec ${CHOWN} root:wheel ${SAMBA_LOGDIR}" >> ${TMPPLIST} + @${ECHO_CMD} "@unexec ${RMDIR} ${SAMBA_LOGDIR} 2>/dev/null || true" >> ${TMPPLIST} + @${ECHO_CMD} "@unexec ${ECHO_CMD} \"Warning: If you will *NOT* use this package anymore, please remove ${SAMBA_LOGDIR}/* manually.\"" >> ${TMPPLIST} + # Lockdir + @test -d ${SAMBA_LOCKDIR} || ${MKDIR} ${SAMBA_LOCKDIR} && \ + ${CHMOD} 0755 ${SAMBA_LOCKDIR} && ${CHOWN} root:wheel ${SAMBA_LOCKDIR} + @${ECHO_CMD} "@exec ${MKDIR} ${SAMBA_LOCKDIR} 2>/dev/null || true" >> ${TMPPLIST} + @${ECHO_CMD} "@exec ${CHMOD} 0755 ${SAMBA_LOCKDIR}" >> ${TMPPLIST} + @${ECHO_CMD} "@exec ${CHOWN} root:wheel ${SAMBA_LOCKDIR}" >> ${TMPPLIST} + @${ECHO_CMD} "@unexec ${RM} -rf ${SAMBA_LOCKDIR}/printing" >> ${TMPPLIST} + @${ECHO_CMD} "@unexec for file in `${LS} ${SAMBA_LOCKDIR} | ${GREP} -v '^winbindd_'`; do ${RM} -rf ${SAMBA_LOCKDIR}/${file}; done" >> ${TMPPLIST} + @${ECHO_CMD} "@unexec ${RMDIR} ${SAMBA_LOCKDIR} 2>/dev/null || true" >> ${TMPPLIST} + @${ECHO_CMD} "@unexec ${ECHO_CMD} \"Warning: If you will *NOT* use this package anymore, please remove ${SAMBA_LOCKDIR}/* manually.\"" >> ${TMPPLIST} + # Private + @test -d ${SAMBA_PRIVATE} || ${MKDIR} ${SAMBA_PRIVATE} && \ + ${CHMOD} 700 ${SAMBA_PRIVATE} && ${CHOWN} root:wheel ${SAMBA_PRIVATE} @${ECHO_CMD} "@exec ${MKDIR} ${SAMBA_PRIVATE} 2>/dev/null || true" >> ${TMPPLIST} @${ECHO_CMD} "@exec ${CHMOD} 700 ${SAMBA_PRIVATE}" >> ${TMPPLIST} - @${ECHO_CMD} "@unexec ${RM} -rf ${SAMBA_PRIVATE}" >> ${TMPPLIST} -.else - @${ECHO_CMD} "@unexec ${ECHO_CMD} \"Warning: If you will *NOT* use this package anymore, please remove %D/private/* manually.\"" >> ${TMPPLIST} -.endif + @${ECHO_CMD} "@exec ${CHOWN} root:wheel ${SAMBA_PRIVATE}" >> ${TMPPLIST} + @${ECHO_CMD} "@unexec ${RMDIR} ${SAMBA_PRIVATE} 2>/dev/null || true" >> ${TMPPLIST} + @${ECHO_CMD} "@unexec ${ECHO_CMD} \"Warning: If you will *NOT* use this package anymore, please remove ${SAMBA_PRIVATE}/* manually.\"" >> ${TMPPLIST} .if !defined(WITHOUT_WINBIND) .if defined(WITH_WINBIND_NSS) ${INSTALL_PROGRAM} ${WRKSRC}/nsswitch/nss_winbind.so ${SAMBA_LIBDIR}/nss_winbind.so.1 diff --git a/net/samba3/files/samba.sh.sample b/net/samba3/files/samba.sh.sample index 016467524cde..c37ba55de080 100644 --- a/net/samba3/files/samba.sh.sample +++ b/net/samba3/files/samba.sh.sample @@ -38,7 +38,7 @@ if [ ! -r ${samba_config} ]; then esac fi -if test -n ${samba_enable:-} && checkyesno samba_enable; then +if test -n ${samba_enable:-""} && checkyesno samba_enable; then nmbd_enable=${nmbd_enable:-"YES"} smbd_enable=${smbd_enable:-"YES"} %%WINBIND%% winbindd_enable=${winbindd_enable:-"YES"} @@ -64,13 +64,13 @@ samba_stop() { nmbd_precmd() { # XXX: Never delete winbindd_idmap.tdb and winbindd_cache.tdb - if [ -d "%%SAMBA_SPOOL%%" ]; then + if [ -d "%%SAMBA_LOCKDIR%%" ]; then echo "Starting SAMBA: removing stale tdbs :" for file in connections.tdb locking.tdb messages.tdb \ sessionid.tdb unexpected.tdb brlock.tdb \ namelist.debug do - rm -vf "%%SAMBA_SPOOL%%/$file" + rm -vf "%%SAMBA_LOCKDIR%%/$file" done fi } @@ -79,7 +79,7 @@ nmbd_precmd() { name=nmbd rcvar=`set_rcvar` command="%%PREFIX%%/sbin/${name}" -required_dirs="%%SAMBA_SPOOL%%" +required_dirs="%%SAMBA_LOCKDIR%%" pidfile=%%SAMBA_RUNDIR%%/${name}.pid start_precmd="nmbd_precmd" stop_cmd="samba_stop" @@ -110,7 +110,7 @@ run_rc_command "$1" %%WINBIND%%name=winbindd %%WINBIND%%rcvar=`set_rcvar` %%WINBIND%%command="%%PREFIX%%/sbin/${name}" -%%WINBIND%%required_dirs="%%SAMBA_SPOOL%%" +%%WINBIND%%required_dirs="%%SAMBA_LOCKDIR%%" %%WINBIND%%pidfile=%%SAMBA_RUNDIR%%/${name}.pid %%WINBIND%%start_precmd=":" %%WINBIND%%stop_cmd="samba_stop" diff --git a/net/samba3/pkg-plist b/net/samba3/pkg-plist index 7c0c8525276a..d4bb1f250d2d 100644 --- a/net/samba3/pkg-plist +++ b/net/samba3/pkg-plist @@ -231,7 +231,6 @@ lib/libsmbclient.so.0 %%SMBPASS%%%%EXAMPLESDIR%%/pam_smbpass/password-mature %%SMBPASS%%%%EXAMPLESDIR%%/pam_smbpass/password-migration %%SMBPASS%%%%EXAMPLESDIR%%/pam_smbpass/password-sync -%%PYTHON%%%%EXAMPLESDIR%%/python/tdbpack/.cvsignore %%PYTHON%%%%EXAMPLESDIR%%/python/tdbpack/oldtdbutil.py %%PYTHON%%%%EXAMPLESDIR%%/python/tdbpack/tdbtimetrial.py %%PYTHON%%%%EXAMPLESDIR%%/python/tdbpack/test_tdbpack.py @@ -719,18 +718,9 @@ share/swat/using_samba/samba2_xs.gif @dirrm lib/samba/charset @dirrm lib/samba/auth @dirrm lib/samba -%%PYTHON%%@unexec rmdir -p %D/lib/%%PYTHON_VERSION%%/site-packages/samba 2>/dev/null || true +%%PYTHON%%@unexec rmdir -p %D/lib/%%PYTHON_VERSION%%/site-packages/samba/. 2>/dev/null || true %%PORTDOCS%%@dirrm %%DOCSDIR%%/Registry %%PORTDOCS%%@dirrm %%DOCSDIR%%/htmldocs/images %%PORTDOCS%%@dirrm %%DOCSDIR%%/htmldocs %%PORTDOCS%%@dirrm %%DOCSDIR%%/faq %%PORTDOCS%%@dirrm %%DOCSDIR%% -@exec mkdir -p %%SAMBA_SPOOL%% || true -@exec chmod 0755 %%SAMBA_SPOOL%% -@unexec rm -fr %%SAMBA_SPOOL%%/printing -@unexec for file in `ls %%SAMBA_SPOOL%% | grep -v '^winbindd_'`; do rm -fr %%SAMBA_SPOOL%%/$file; done -@unexec rmdir %%SAMBA_SPOOL%% 2>/dev/null || true -@unexec echo "Warning: If you will *NOT* use this package anymore, please remove %%SAMBA_SPOOL%%/*.tdb manually." -@exec mkdir -p %%SAMBA_LOGDIR%% || true -@unexec rmdir %%SAMBA_LOGDIR%% 2>/dev/null || true -@unexec echo "Warning: If you will *NOT* use this package anymore, please remove %%SAMBA_LOGDIR%% manually."