[oe-commits] acid-burn : add samba-3.0.24

GIT User account git at amethyst.openembedded.net
Mon Dec 1 23:03:34 UTC 2008


Module: openembedded.git
Branch: org.openembedded.dreambox
Commit: b86ca4ec751437da2cbfa3307f38bd4e09c7a4c7
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=b86ca4ec751437da2cbfa3307f38bd4e09c7a4c7

Author: acid-burn <acidburn at opendreambox.org>
Date:   Thu Nov 27 10:02:02 2008 +0100

add samba-3.0.24
fix nmbd startup
cleanup

---

 packages/samba/files/opendreambox/01samba-kill  |    2 +
 packages/samba/files/opendreambox/01samba-start |    2 +-
 packages/samba/files/opendreambox/smb.conf      |    9 +-
 packages/samba/samba-3.0.24/configure.patch     |  170 +++++++++++++++++++++++
 packages/samba/samba_3.0.24.bb                  |   53 +++++++
 5 files changed, 231 insertions(+), 5 deletions(-)

diff --git a/packages/samba/files/opendreambox/01samba-kill b/packages/samba/files/opendreambox/01samba-kill
old mode 100644
new mode 100755
index ce29663..41f7781
--- a/packages/samba/files/opendreambox/01samba-kill
+++ b/packages/samba/files/opendreambox/01samba-kill
@@ -1,3 +1,5 @@
 #!/bin/sh
 killall -9 smbd
+rm -rf /var/log/log.smbd
 killall -9 nmbd
+rm -rf /var/log/log.nmbd
diff --git a/packages/samba/files/opendreambox/01samba-start b/packages/samba/files/opendreambox/01samba-start
old mode 100644
new mode 100755
index 05db22b..ce397ad
--- a/packages/samba/files/opendreambox/01samba-start
+++ b/packages/samba/files/opendreambox/01samba-start
@@ -1,3 +1,3 @@
 #!/bin/sh
-smbd -D
 nmbd -D
+smbd -D
diff --git a/packages/samba/files/opendreambox/smb.conf b/packages/samba/files/opendreambox/smb.conf
old mode 100644
new mode 100755
index 4998615..9aa03d8
--- a/packages/samba/files/opendreambox/smb.conf
+++ b/packages/samba/files/opendreambox/smb.conf
@@ -2,15 +2,16 @@
    load printers = no
    guest account = root
    log file = /tmp/smb.log
+   log level = 1
    security = share
-   server string = DreamBOX network services
+   server string = DreamBOX %h network services
    workgroup = Dream
-   netbios name = DreamBOX
-   client code page=850
-   character set=iso8859-1
+   netbios name = %h
    case sensitive=yes
    preserve case=yes
    short preserve case=yes
+   socket options = TCP_NODELAY
+   preferred master = no ;(These stop the machine being master browser, which means that it doesn't waste time there.)
 
 [Configuration]
   comment = Configuration files - take care!
diff --git a/packages/samba/samba-3.0.24/.mtn2git_empty b/packages/samba/samba-3.0.24/.mtn2git_empty
new file mode 100755
index 0000000..e69de29
diff --git a/packages/samba/samba-3.0.24/configure.patch b/packages/samba/samba-3.0.24/configure.patch
new file mode 100755
index 0000000..0366efb
--- /dev/null
+++ b/packages/samba/samba-3.0.24/configure.patch
@@ -0,0 +1,170 @@
+
+#
+# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
+#
+
+--- source/configure.in~configure	2003-12-14 22:36:25.000000000 -0500
++++ source/configure.in	2004-01-26 14:33:15.000000000 -0500
+@@ -959,7 +959,7 @@
+ #endif
+        exit(0);
+ }
+-], [linux_getgrouplist_ok=yes], [linux_getgrouplist_ok=no])
++], [linux_getgrouplist_ok=yes], [linux_getgrouplist_ok=no], [linux_getgrouplist_ok=cross])
+        if test x"$linux_getgrouplist_ok" = x"yes"; then
+           AC_DEFINE(HAVE_GETGROUPLIST, 1, [Have good getgrouplist])
+        fi
+--- source/aclocal.m4~configure	2004-01-26 14:33:15.000000000 -0500
++++ source/aclocal.m4	2004-01-26 17:34:28.000000000 -0500
+@@ -2,7 +2,7 @@
+ dnl if the cache file is inconsistent with the current host,
+ dnl target and build system types, execute CMD or print a default
+ dnl error message.
+-AC_DEFUN(AC_VALIDATE_CACHE_SYSTEM_TYPE, [
++AC_DEFUN([AC_VALIDATE_CACHE_SYSTEM_TYPE], [
+     AC_REQUIRE([AC_CANONICAL_SYSTEM])
+     AC_MSG_CHECKING([config.cache system type])
+     if { test x"${ac_cv_host_system_type+set}" = x"set" &&
+@@ -24,7 +24,7 @@
+ 
+ 
+ dnl test whether dirent has a d_off member
+-AC_DEFUN(AC_DIRENT_D_OFF,
++AC_DEFUN([AC_DIRENT_D_OFF],
+ [AC_CACHE_CHECK([for d_off in dirent], ac_cv_dirent_d_off,
+ [AC_TRY_COMPILE([
+ #include <unistd.h>
+@@ -38,7 +38,7 @@
+ 
+ dnl Mark specified module as shared
+ dnl SMB_MODULE(name,static_files,shared_files,subsystem,whatif-static,whatif-shared)
+-AC_DEFUN(SMB_MODULE,
++AC_DEFUN([SMB_MODULE],
+ [
+ 	AC_MSG_CHECKING([how to build $1])
+ 	if test "$[MODULE_][$1]"; then
+@@ -68,7 +68,7 @@
+ 	fi
+ ])
+ 
+-AC_DEFUN(SMB_SUBSYSTEM,
++AC_DEFUN([SMB_SUBSYSTEM],
+ [
+ 	AC_SUBST($1_STATIC)
+ 	AC_SUBST($1_MODULES)
+@@ -77,7 +77,7 @@
+ ])
+ 
+ dnl AC_PROG_CC_FLAG(flag)
+-AC_DEFUN(AC_PROG_CC_FLAG,
++AC_DEFUN([AC_PROG_CC_FLAG],
+ [AC_CACHE_CHECK(whether ${CC-cc} accepts -$1, ac_cv_prog_cc_$1,
+ [echo 'void f(){}' > conftest.c
+ if test -z "`${CC-cc} -$1 -c conftest.c 2>&1`"; then
+@@ -91,7 +91,7 @@
+ dnl see if a declaration exists for a function or variable
+ dnl defines HAVE_function_DECL if it exists
+ dnl AC_HAVE_DECL(var, includes)
+-AC_DEFUN(AC_HAVE_DECL,
++AC_DEFUN([AC_HAVE_DECL],
+ [
+  AC_CACHE_CHECK([for $1 declaration],ac_cv_have_$1_decl,[
+     AC_TRY_COMPILE([$2],[int i = (int)$1],
+@@ -223,7 +223,7 @@
+ 
+ dnl Define an AC_DEFINE with ifndef guard.
+ dnl AC_N_DEFINE(VARIABLE [, VALUE])
+-define(AC_N_DEFINE,
++define([AC_N_DEFINE],
+ [cat >> confdefs.h <<\EOF
+ [#ifndef] $1
+ [#define] $1 ifelse($#, 2, [$2], $#, 3, [$2], 1)
+@@ -233,14 +233,14 @@
+ 
+ dnl Add an #include
+ dnl AC_ADD_INCLUDE(VARIABLE)
+-define(AC_ADD_INCLUDE,
++define([AC_ADD_INCLUDE],
+ [cat >> confdefs.h <<\EOF
+ [#include] $1
+ EOF
+ ])
+ 
+ dnl Copied from libtool.m4
+-AC_DEFUN(AC_PROG_LD_GNU,
++AC_DEFUN([AC_PROG_LD_GNU],
+ [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
+ [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
+ if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
+@@ -259,7 +259,7 @@
+ dnl AM_PATH_XML2([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
+ dnl Test for XML, and define XML_CFLAGS and XML_LIBS
+ dnl
+-AC_DEFUN(AM_PATH_XML2,[ 
++AC_DEFUN([AM_PATH_XML2],[ 
+ AC_ARG_WITH(xml-prefix,
+             [  --with-xml-prefix=PFX   Prefix where libxml is installed (optional)],
+             xml_config_prefix="$withval", xml_config_prefix="")
+@@ -443,7 +443,7 @@
+ dnl AM_PATH_MYSQL([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
+ dnl Test for MYSQL, and define MYSQL_CFLAGS and MYSQL_LIBS
+ dnl
+-AC_DEFUN(AM_PATH_MYSQL,
++AC_DEFUN([AM_PATH_MYSQL],
+ [dnl
+ dnl Get the cflags and libraries from the mysql_config script
+ dnl
+@@ -485,7 +485,7 @@
+ ])
+ 
+ dnl Removes -I/usr/include/? from given variable
+-AC_DEFUN(CFLAGS_REMOVE_USR_INCLUDE,[
++AC_DEFUN([CFLAGS_REMOVE_USR_INCLUDE],[
+   ac_new_flags=""
+   for i in [$]$1; do
+     case [$]i in
+@@ -497,7 +497,7 @@
+ ])
+     
+ dnl Removes -L/usr/lib/? from given variable
+-AC_DEFUN(LIB_REMOVE_USR_LIB,[
++AC_DEFUN([LIB_REMOVE_USR_LIB],[
+   ac_new_flags=""
+   for i in [$]$1; do
+     case [$]i in
+@@ -510,7 +510,7 @@
+ 
+ dnl From Bruno Haible.
+ 
+-AC_DEFUN(jm_ICONV,
++AC_DEFUN([jm_ICONV],
+ [
+   dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
+   dnl those with the standalone portable libiconv installed).
+@@ -607,7 +607,7 @@
+   fi
+ ])
+ 
+-AC_DEFUN(rjs_CHARSET,[
++AC_DEFUN([rjs_CHARSET],[
+   dnl Find out if we can convert from $1 to UCS2-LE
+   AC_MSG_CHECKING([can we convert from $1 to UCS2-LE?])
+   AC_TRY_RUN([
+@@ -625,7 +625,7 @@
+ 
+ dnl CFLAGS_ADD_DIR(CFLAGS, $INCDIR)
+ dnl This function doesn't add -I/usr/include into CFLAGS
+-AC_DEFUN(CFLAGS_ADD_DIR,[
++AC_DEFUN([CFLAGS_ADD_DIR],[
+ if test "$2" != "/usr/include" ; then
+     $1="$$1 -I$2"
+ fi
+@@ -633,7 +633,7 @@
+ 
+ dnl LIB_ADD_DIR(LDFLAGS, $LIBDIR)
+ dnl This function doesn't add -L/usr/lib into LDFLAGS
+-AC_DEFUN(LIB_ADD_DIR,[
++AC_DEFUN([LIB_ADD_DIR],[
+ if test "$2" != "/usr/lib" ; then
+     $1="$$1 -L$2"
+ fi
diff --git a/packages/samba/samba_3.0.24.bb b/packages/samba/samba_3.0.24.bb
new file mode 100755
index 0000000..a2cdc00
--- /dev/null
+++ b/packages/samba/samba_3.0.24.bb
@@ -0,0 +1,53 @@
+PR = "r1"
+
+SRC_URI = "http://us2.samba.org/samba/ftp/stable/samba-${PV}.tar.gz \
+	   file://configure.patch;patch=1 \
+	   file://cifs.patch;patch=1 \
+	   file://config-lfs.patch;patch=1 \
+	   file://init \
+           file://quota.patch;patch=1;pnum=0 \
+	   "
+S = ${WORKDIR}/${P}/source
+
+include samba.inc
+inherit update-rc.d
+
+INITSCRIPT_NAME = "samba"
+# No dependencies, goes in at level 20 (NOTE: take care with the
+# level, later levels put the shutdown later too - see the links
+# in rc6.d, the shutdown must precede network shutdown).
+INITSCRIPT_PARAMS = "defaults"
+CONFFILES_sambaserver = "${sysconfdir}/samba/smb.conf"
+
+# The file system settings --foodir=dirfoo and overridden unconditionally
+# in the samba config by --with-foodir=dirfoo - even if the --with is not
+# specified!  Fix that here.  Set the privatedir to /etc/samba/private.
+EXTRA_OECONF += "\
+	samba_cv_struct_timespec=yes \
+	--with-configdir=${sysconfdir}/samba \
+	--with-privatedir=${sysconfdir}/samba/private \
+	--with-lockdir=${localstatedir}/lock \
+	--with-piddir=${localstatedir}/run \
+	--with-logfilebase=${localstatedir}/log \
+	--with-libdir=${libdir} \
+	--with-mandir=${mandir} \
+	--with-swatdir=${datadir}/swat \
+	"
+
+do_install_append() {
+	install -d "${D}${localstatedir}/log"
+	rm -f ${D}/sbin/mount.smbfs
+	ln -sf smbmount ${D}${sbindir}/mount.smbfs
+	install -d "${D}${sysconfdir}/init.d"
+	install -c -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/samba
+	install -d "${D}${sysconfdir}/samba"
+	install -c -m 644 ../examples/smb.conf.default ${D}${sysconfdir}/samba/smb.conf
+}
+
+PACKAGES =+ "swat"
+
+FILES_swat = "${sbindir}/swat ${datadir}/swat ${libdir}/*.msg"
+FILES_${PN} += "${libdir}/vfs/*.so ${libdir}/charset/*.so ${libdir}/*.dat ${libdir}/auth/*.so"
+#
+# bug fix for samba.inc:
+FILES_cifs-doc = "${mandir}/man8/mount.cifs.8"





More information about the Openembedded-commits mailing list