ports/143651: net/samba34 pkg does not create directories
Spil
spil.oss at gmail.com
Sun Feb 7 16:30:04 UTC 2010
>Number: 143651
>Category: ports
>Synopsis: net/samba34 pkg does not create directories
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sun Feb 07 16:30:03 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator: Spil
>Release: FreeBSD-8.0-p2
>Organization:
>Environment:
FreeBSD smb.example.org 8.0-RELEASE-p2 FreeBSD 8.0-RELEASE-p2 #1: Thu Jan 14 16:35:41 UTC 2010 root@:/usr/obj/usr/src/sys/SAMBA i386
>Description:
Maintainer (Timur) is aware of this via ports@ and requested a PR.
Just built net/samba34 (only ACL, AIO, FAM, SYSLOG and POPT enabled)
and created a package samba34-3.4.5.tbz in my build jail.
Installed the package in a different jail and couldn't start samba.
First error was the pid-files related to /var/run/samba34 not existing
Second error
"initialise_wins: failed to open wins.tdb. Error was No such file or directory"
Solved by tempory disabling wins support in smb.conf. After fixing
third error I re-enabled it and it lives in /var/lib/samba as well
Third error
"write_browse_list: Can't open file /var/lib/samba/browse.dat"
1. /var/run/samba34 was not created by the package (was created in the
build jail)
2. /var/lib/samba was not created
smbd -b | grep DIR revealed all directories that must exist when starting samba
Upgrading info is a bit meager, no UPGRADING file and the doc contains
only a reference to the smbpasswd deprecation.
Checked some more, and it seems that STATEDIR and CACHEDIR are new
build variables as I haven't found these in the 3.3.9 build. These two
variables were /var/lib/samba by default causing my error.
Changelog contains the following changes
--with-statedir=DIR Where to put persistent state files
--with-cachedir=DIR Where to put temporary cache files
Guess these should point to /var/db/samba34 rather than /var/lib/samba
This is the +INSTALL from the package, no reference to /var/lib/samba or /var/run/samba34 in the install script nor in the +CONTENTS
#! /bin/sh
#
PATH=/bin:/usr/sbin:/usr/bin:/usr/sbin
EXAMPLESDIR="/usr/local/share/examples/samba34"
SAMBA_CONFIG="smb.conf"
SAMBA_CONFDIR="/usr/local/etc"
SAMBA_SPOOL="/var/spool/samba34"
SAMBA_LOGDIR="/var/log/samba34"
SAMBA_LOCKDIR="/var/db/samba34"
SAMBA_PRIVATEDIR="/usr/local/etc/samba34"
SAMBA_OWNER=root
SAMBA_GROUP=wheel
INSTALL_DATA="install -c -m 0444"
MKDIR="mkdir -p"
CHMOD="chmod"
CHOWN="chown"
post-install() {
${MKDIR} ${SAMBA_SPOOL} && ${CHMOD} 1777 ${SAMBA_SPOOL}
${MKDIR} ${SAMBA_LOGDIR} && ${CHMOD} 0755 ${SAMBA_LOGDIR}
${MKDIR} ${SAMBA_LOCKDIR} && ${CHMOD} 0755 ${SAMBA_LOCKDIR}
${MKDIR} ${SAMBA_PRIVATEDIR} && ${CHMOD} 0700 ${SAMBA_PRIVATEDIR}
if [ $(id -u) -eq 0 ]; then
INSTALL_DATA="${INSTALL_DATA} -o ${SAMBA_OWNER} -g ${SAMBA_GROUP}"
${CHOWN} ${SAMBA_OWNER}:${SAMBA_GROUP} ${SAMBA_SPOOL}
${CHOWN} ${SAMBA_OWNER}:${SAMBA_GROUP} ${SAMBA_LOGDIR}
${CHOWN} ${SAMBA_OWNER}:${SAMBA_GROUP} ${SAMBA_LOCKDIR}
${CHOWN} ${SAMBA_OWNER}:${SAMBA_GROUP} ${SAMBA_PRIVATEDIR}
fi
${INSTALL_DATA} ${EXAMPLESDIR}/${SAMBA_CONFIG}.sample ${SAMBA_CONFDIR}
if [ ! -f ${SAMBA_CONFDIR}/${SAMBA_CONFIG} ]; then
${INSTALL_DATA} ${EXAMPLESDIR}/${SAMBA_CONFIG}.sample ${SAMBA_CONFDIR}/${SAMBA_CONFIG}
fi
}
case $2 in
POST-INSTALL)
post-install
;;
esac
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list