I'm having a problem getting Samba 3.0.26b to start. I've attached the Makefile below.
It builds, but fails to start with:
[2008/01/03 10:54:26, 0] smbd/server.c:main(944)
smbd version 3.0.26a started.
Copyright Andrew Tridgell and the Samba Team 1992-2007
[2008/01/03 10:54:26, 0] passdb/secrets.c:secrets_init(67)
Failed to open /data/home/yan/openwrt/trunk/build_dir/mipsel/samba-3.0.26a/ipk
g-install/etc/samba/secrets.tdb
[2008/01/03 10:54:26, 0] smbd/server.c:main(986)
standard input is not a socket, assuming -D option
[2008/01/03 10:54:26, 0] lib/messages.c:message_init(132)
ERROR: Failed to initialise messages database
For some reason it's trying to use the build path and not the --with-configdir path.... Can someone shed some light on this?
Thanks,
--Yan
--------------------CUT HERE TO END---------------------
#
# Copyright (C) 2007 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
# $Id$
include $(TOPDIR)/rules.mk
PKG_NAME:=samba
PKG_VERSION:=3.0.26a
PKG_RELEASE:=1
PKG_SOURCE_URL:=ftp://se.samba.org/pub/samba/stable \
ftp://ftp.easynet.be/samba/stable \
http://us1.samba.org/samba/ftp/stable
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_MD5SUM:=16b47e6add332e5ac4523fc88c381d06
include $(INCLUDE_DIR)/package.mk
define Package/samba3
SECTION:=net
CATEGORY:=Network
SUBMENU:=samba3 - NetBIOS/SMB implementation
TITLE:=samba - NetBIOS/SMB implementation
URL:=http://www.samba.org/
endef
define Package/samba3/description
The Samba software suite is a collection of programs that implements the SMB protocol for unix systems, allowing you to serve files and printers to Windows, NT, OS/2 and DOS clients. This protocol is sometimes also referred to as the LanManager or Netbios protocol.
endef
define Package/samba3-common
$(call Package/samba3)
TITLE:=NetBIOS/SMB server and client shared files
DEPENDS:=+libgcc
endef
define Package/samba3-server
$(call Package/samba3)
TITLE:=NetBIOS/SMB file and print server
DEPENDS:=samba3-common
endef
define Package/samba3-client
$(call Package/samba3)
TITLE:=NetBIOS/SMB simple client
DEPENDS:=samba3-common
endef
define Package/samba3-smbmount
$(call Package/samba3)
TITLE:=NetBIOS/SMB old smbmount
DEPENDS:=kmod-fs-smbfs
endef
define Package/samba3-cifsmount
$(call Package/samba3)
TITLE:=NetBIOS/SMB new cifsmount
DEPENDS:=kmod-fs-cifs
endef
define Package/samba3-libs
$(call Package/samba3)
TITLE:=NetBIOS/SMB libraries for client programs
DEPENDS:=+libgcc
endef
define Package/samba3-scan
$(call Package/samba3)
TITLE:=Automount for samba shares
DEPENDS:=nmap samba3-common samba3-client endef
define Build/Compile
(cd $(PKG_BUILD_DIR)/source; rm -rf config.{cache,status}; \
./autogen.sh; \
$(TARGET_CONFIGURE_OPTS) \
$(TARGET_CONFIGURE_ARGS) \
samba_cv_HAVE_GETTIMEOFDAY_TZ=yes \
samba_cv_USE_SETREUID=yes \
samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes \
samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=no \
SMB_BUILD_CC_NEGATIVE_ENUM_VALUES=yes \
libreplace_cv_READDIR_GETDIRENTRIES=no \
libreplace_cv_READDIR_GETDENTS=no \
linux_getgrouplist_ok=no \
samba_cv_REPLACE_READDIR=no \
samba_cv_HAVE_WRFILE_KEYTAB=no \
./configure \
--target=$(GNU_TARGET_NAME) \
--host=$(GNU_TARGET_NAME) \
--build=$(GNU_HOST_NAME) \
--with-lockdir=/var/cache/samba \
--with-piddir=/var/run \
--with-privatedir=/etc/samba \
--with-logfilebase=/var/log/samba \
--with-configdir=/etc/samba \
--without-ldap \
--without-libaddns \
--with-included-popt \
--with-included-iniparser \
--with-smbmount \
--disable-cups \
--disable-static \
);
mkdir -p $(PKG_INSTALL_DIR)/usr/share/samba
mkdir -p $(PKG_INSTALL_DIR)/var/log
$(MAKE) -C $(PKG_BUILD_DIR)/source \
prefix="$(PKG_INSTALL_DIR)/usr" \
BASEDIR="$(PKG_INSTALL_DIR)/usr" \
BINDIR="$(PKG_INSTALL_DIR)/usr/bin" \
SBINDIR="$(PKG_INSTALL_DIR)/usr/bin" \
LIBDIR="$(PKG_INSTALL_DIR)/usr/lib" \
VARDIR="$(PKG_INSTALL_DIR)/var/log/samba" \
MANDIR="$(PKG_INSTALL_DIR)/usr/share/man" \
PRIVATEDIR="$(PKG_INSTALL_DIR)/etc/samba" \
SWATDIR="$(PKG_INSTALL_DIR)/usr/swat" \
LOCKDIR="$(PKG_INSTALL_DIR)/var/run/samba" \
SAMBABOOK="$(PKG_INSTALL_DIR)/usr/swat/using_samba" \
CODEPAGEDIR="$(PKG_INSTALL_DIR)/usr/share/samba" \
installservers installbin installcifsmount
# CONFIGDIR="$(PKG_INSTALL_DIR)/etc/samba" \
endef
define Package/samba3-common/install
$(INSTALL_DIR) $(1)/etc/samba
$(INSTALL_DATA) ./files/smb.conf $(1)/etc/samba/smb.conf endef
define Package/samba3-libs/install
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_BIN) $(PKG_BUILD_DIR)/source/bin/libmsrpc.so $(1)/usr/lib
$(INSTALL_BIN) $(PKG_BUILD_DIR)/source/bin/libsmbclient.so $(1)/usr/lib
$(INSTALL_BIN) $(PKG_BUILD_DIR)/source/bin/libsmbsharemodes.so $(1)/usr/lib endef
define Package/samba3-server/install
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/samba.init $(1)/etc/init.d/samba
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/source/bin/smbpasswd $(1)/usr/bin/smbpasswd
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/source/bin/nmbd $(1)/usr/sbin/nmbd
$(INSTALL_BIN) $(PKG_BUILD_DIR)/source/bin/smbd $(1)/usr/sbin/smbd endef
define Package/samba3-client/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/smbclient $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nmblookup $(1)/usr/bin endef
define Package/samba3-smbmount/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/smbmount $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/smbmnt $(1)/usr/bin endef
define Package/samba3-cifsmount/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mount.cifs $(1)/usr/bin endef
define Package/samba3-scan/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) ./files/scan $(1)/usr/bin
$(INSTALL_BIN) ./files/unscan $(1)/usr/bin endef
$(eval $(call BuildPackage,samba3-common)) $(eval $(call BuildPackage,samba3-server)) $(eval $(call BuildPackage,samba3-client)) $(eval $(call BuildPackage,samba3-libs)) $(eval $(call BuildPackage,samba3-smbmount)) $(eval $(call BuildPackage,samba3-cifsmount)) $(eval $(call BuildPackage,samba3-scan))