[Armadeus-commitlog] SF.net SVN: armadeus: [571] trunk
Brought to you by:
sszy
|
From: <ca...@us...> - 2007-02-18 16:41:46
|
Revision: 571
http://armadeus.svn.sourceforge.net/armadeus/?rev=571&view=rev
Author: carbure
Date: 2007-02-18 08:41:41 -0800 (Sun, 18 Feb 2007)
Log Message:
-----------
Add Samba services smbmount, nmbd and smbd
Modified Paths:
--------------
trunk/buildroot/target/device/armadeus/rootfs/skel.tar.gz
Added Paths:
-----------
trunk/buildroot/package/samba/
trunk/buildroot/package/samba/Config.in
trunk/buildroot/package/samba/S81smb
trunk/buildroot/package/samba/samba-001.patch
trunk/buildroot/package/samba/samba.mk
trunk/buildroot/package/samba/smb.conf
trunk/buildroot/package/samba/smbpasswd
trunk/patches/014-buildroot-samba.diff
Removed Paths:
-------------
trunk/target/packages/samba/
Added: trunk/buildroot/package/samba/Config.in
===================================================================
--- trunk/buildroot/package/samba/Config.in (rev 0)
+++ trunk/buildroot/package/samba/Config.in 2007-02-18 16:41:41 UTC (rev 571)
@@ -0,0 +1,38 @@
+config BR2_PACKAGE_SAMBA
+ bool "samba"
+ default n
+ help
+ Samba allows the interoperability between Linux/Unix servers
+ and Windows-based clients.
+ http://www.samba.org/
+
+config BR2_PACKAGE_SMBMOUNT
+ bool "smbmount (660 Kb) service in target"
+ default y
+ depends on BR2_PACKAGE_SAMBA
+ help
+ Put smbmount & smbumount service in the target.
+ IMPORTANT:
+ Needs the mount command from utils-linux package (not mount from the busybox)
+
+config BR2_PACKAGE_SMBD
+ bool "nmbd & smbd (3.1 Mb) service in target"
+ default n
+ depends on BR2_PACKAGE_SAMBA
+ help
+ Put nmbd & smbd service in the target.
+
+config BR2_PACKAGE_SMB_START
+ bool "add samba init script"
+ default y
+ depends on BR2_PACKAGE_SMBD
+ help
+ Put smbd & nmbd intialization script in /etc/init.d.
+
+config BR2_PACKAGE_SMBPASSWD
+ bool "smbpasswd (1.2 Mb) service in target"
+ default n
+ depends on BR2_PACKAGE_SAMBA
+ help
+ Put smbpasswd service in the target.
+
Added: trunk/buildroot/package/samba/S81smb
===================================================================
--- trunk/buildroot/package/samba/S81smb (rev 0)
+++ trunk/buildroot/package/samba/S81smb 2007-02-18 16:41:41 UTC (rev 571)
@@ -0,0 +1,67 @@
+#!/bin/sh
+#
+# start/stop samba services
+
+
+test -f /usr/sbin/smbd || exit 0
+test -f /usr/sbin/nmbd || exit 0
+
+[ -f /etc/samba/smb.conf ] || exit 0
+
+
+start() {
+ echo "Starting smbd services"
+ mkdir -p /var/log/samba/
+ /usr/sbin/smbd -D
+ RETVAL=$?
+ echo "Starting nmbd services"
+ /usr/sbin/nmbd -D
+ RETVAL2=$?
+ if [ $RETVAL -ne 0 ] ; then
+ return 1
+ fi
+ if [ $RETVAL2 -ne 0 ] ; then
+ return 1
+ fi
+ return 0
+}
+
+stop() {
+ echo "Shutting down smbd services"
+ killall smbd
+ RETVAL=$?
+ echo "Shutting down nmbd services"
+ killall nmbd
+ RETVAL2=$?
+
+ if [ $RETVAL -ne 0 ] ; then
+ return 1
+ fi
+ if [ $RETVAL2 -ne 0 ] ; then
+ return 1
+ fi
+ return 0
+}
+
+restart() {
+ stop
+ start
+}
+
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart|reload)
+ restart
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop|restart}"
+ exit 1
+esac
+
+exit $?
+
Added: trunk/buildroot/package/samba/samba-001.patch
===================================================================
--- trunk/buildroot/package/samba/samba-001.patch (rev 0)
+++ trunk/buildroot/package/samba/samba-001.patch 2007-02-18 16:41:41 UTC (rev 571)
@@ -0,0 +1,11 @@
+--- samba-3.0.20/source/configure.org 2007-01-28 11:11:41.000000000 +0100
++++ samba-3.0.20/source/configure 2007-01-28 11:45:04.000000000 +0100
+@@ -18730,7 +18730,7 @@
+ case "$host_os" in
+ *linux*)
+ # glibc <= 2.3.2 has a broken getgrouplist
+- if test "$cross_compiling" = yes; then
++ if test "$cross_compiling" = no; then
+ { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+ See \`config.log' for more details." >&5
+ echo "$as_me: error: cannot run test program while cross compiling
Added: trunk/buildroot/package/samba/samba.mk
===================================================================
--- trunk/buildroot/package/samba/samba.mk (rev 0)
+++ trunk/buildroot/package/samba/samba.mk 2007-02-18 16:41:41 UTC (rev 571)
@@ -0,0 +1,129 @@
+#############################################################
+#
+# samba
+#
+#############################################################
+
+# TARGETS
+SAMBA_VER:=3.0.20
+SAMBA_SITE:=http://us3.samba.org/samba/ftp/old-versions/
+SAMBA_PUBLICKEY_SITE:=http://us4.samba.org/samba/ftp/
+SAMBA_SOURCE:=samba-$(SAMBA_VER).tar.gz
+SAMBA_SOURCE_KEY:=samba-$(SAMBA_VER).tar.asc
+SAMBA_PUBLICKEY:=samba-pubkey.asc
+SAMBA_SIGNATURE:=samba-$(SAMBA_VER).tar.gz.asc
+SAMBA_DIR:=$(BUILD_DIR)/samba-$(SAMBA_VER)
+SAMBA_SRC_DIR:=$(SAMBA_DIR)/source
+SAMBA_BIN_DIR:=$(SAMBA_SRC_DIR)/bin
+SAMBA_PREFIX:=/etc/samba
+
+# remove the previous one
+removeoldsamba:
+ rm -f $(TARGET_DIR)/usr/bin/smbmount $(TARGET_DIR)/usr/bin/smbumount $(TARGET_DIR)/usr/bin/smbmnt
+ rm -f $(TARGET_DIR)/usr/sbin/nmbd
+ rm -f $(TARGET_DIR)/usr/sbin/smbd
+ rm -f $(TARGET_DIR)/usr/bin/smbpasswd
+ rm -Rf $(TARGET_DIR)$(SAMBA_PREFIX)
+ rm -f $(TARGET_DIR)/etc/init.d/S81smb
+
+
+$(DL_DIR)/$(SAMBA_SOURCE):
+ $(WGET) -P $(DL_DIR) $(SAMBA_SITE)/$(SAMBA_SOURCE)
+
+$(DL_DIR)/$(SAMBA_SOURCE_KEY):
+ $(WGET) -P $(DL_DIR) $(SAMBA_SITE)/$(SAMBA_SOURCE_KEY)
+
+$(DL_DIR)/$(SAMBA_PUBLICKEY):
+ $(WGET) -P $(DL_DIR) $(SAMBA_PUBLICKEY_SITE)/$(SAMBA_PUBLICKEY)
+
+
+$(SAMBA_DIR)/.unpacked: $(DL_DIR)/$(SAMBA_SOURCE)
+ gunzip -c $(DL_DIR)/$(SAMBA_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
+ toolchain/patch-kernel.sh $(SAMBA_DIR) package/samba/ samba\*.patch
+ touch $(SAMBA_DIR)/.unpacked
+
+# NOTES: --> disable cups (compiling problem) cups is not necessary
+# --> add option --enable-debug if necessary!!
+# --host="arm-armadeus-linux-uclibc" force cross compilation and means
+# host_cpu='arm'
+# host_os='linux-uclibc'
+# host_vendor='armadeus'
+# use -DHAVE_GETTIMEOFDAY_TZ because of gettimeofday() use a second argument
+# (obsolete but defined TZ)
+# PIE (Periodic Interrupt Enable) must be disabled (not available on Armadeus)
+
+$(SAMBA_SRC_DIR)/.configured: $(SAMBA_DIR)/.unpacked
+ cd $(SAMBA_SRC_DIR) ;\
+ ./configure --host="arm-armadeus-linux-uclibc" --prefix=$(SAMBA_PREFIX) \
+ --with-logfilebase=/var/log/samba --with-piddir=/var/lock --with-configdir=$(SAMBA_PREFIX)\
+ --disable-cups --disable-pie --with-smbmount --with-automount --disable-xmltest \
+ CC=arm-linux-gcc \
+ CFLAGS="-Wall -Wstrict-prototypes -Os -fomit-frame-pointer -DHAVE_GETTIMEOFDAY_TZ \
+ -DHAVE_IFACE_IFCONF -DUSE_SETEUID -DHAVE_STRUCT_TIMESPEC "
+ touch $(SAMBA_SRC_DIR)/.configured
+
+
+$(SAMBA_SRC_DIR)/Makefile: $(SAMBA_SRC_DIR)/.configured
+ cd $(SAMBA_SRC_DIR) ;\
+ $(MAKE) proto ; \
+ $(MAKE)
+ $(STRIP) $(SAMBA_BIN_DIR)/*
+
+samba: $(SAMBA_SRC_DIR)/Makefile
+ mkdir -p $(TARGET_DIR)$(SAMBA_PREFIX)
+ mkdir -p $(TARGET_DIR)$(SAMBA_PREFIX)/private
+ mkdir -p $(TARGET_DIR)$(SAMBA_PREFIX)/var/locks
+ $(INSTALL) -m 0644 -D package/samba/smb.conf $(TARGET_DIR)$(SAMBA_PREFIX)/smb.conf
+ $(INSTALL) -m 0600 -D package/samba/smbpasswd $(TARGET_DIR)$(SAMBA_PREFIX)/private/smbpasswd
+
+smbautostart:
+ mkdir -p $(TARGET_DIR)/etc/init.d
+ $(INSTALL) -m 0775 -D package/samba/S81smb $(TARGET_DIR)/etc/init.d/S81smb
+
+smbmount:
+ mkdir -p $(TARGET_DIR)/usr/bin
+ cp -dpf $(SAMBA_BIN_DIR)/smbmount $(TARGET_DIR)/usr/bin/
+ cp -dpf $(SAMBA_BIN_DIR)/smbumount $(TARGET_DIR)/usr/bin/
+ cp -dpf $(SAMBA_BIN_DIR)/smbmnt $(TARGET_DIR)/usr/bin/
+
+smbd:
+ mkdir -p $(TARGET_DIR)/usr/sbin
+ cp -dpf $(SAMBA_BIN_DIR)/smbd $(TARGET_DIR)/usr/sbin/
+ cp -dpf $(SAMBA_BIN_DIR)/nmbd $(TARGET_DIR)/usr/sbin/
+
+smbpasswd:
+ mkdir -p $(TARGET_DIR)/usr/sbin
+ cp -dpf $(SAMBA_BIN_DIR)/smbpasswd $(TARGET_DIR)/usr/bin/
+
+samba-dirclean:
+ rm -rf $(SAMBA_DIR)
+
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+
+TARGETS+=removeoldsamba
+
+ifeq ($(strip $(BR2_PACKAGE_SAMBA)),y)
+TARGETS+=samba
+endif
+
+ifeq ($(strip $(BR2_PACKAGE_SMBMOUNT)),y)
+TARGETS+=smbmount
+endif
+
+ifeq ($(strip $(BR2_PACKAGE_SMBD)),y)
+TARGETS+=smbd
+endif
+
+ifeq ($(strip $(BR2_PACKAGE_SMBPASSWD)),y)
+TARGETS+=smbpasswd
+endif
+
+ifeq ($(strip $(BR2_PACKAGE_SMB_START)),y)
+TARGETS+=smbautostart
+endif
+
+
Added: trunk/buildroot/package/samba/smb.conf
===================================================================
--- trunk/buildroot/package/samba/smb.conf (rev 0)
+++ trunk/buildroot/package/samba/smb.conf 2007-02-18 16:41:41 UTC (rev 571)
@@ -0,0 +1,77 @@
+# This is the main Samba configuration file. You should read the
+# smb.conf(5) manual page in order to understand the options listed
+# here. Samba has a huge number of configurable options (perhaps too
+# many!) most of which are not shown in this example
+#
+# Any line which starts with a ; (semi-colon) or a # (hash)
+# is a comment and is ignored. In this example we will use a #
+# for commentry and a ; for parts of the config file that you
+# may wish to enable
+#
+# NOTE: Whenever you modify this file you should run the command "testparm"
+# to check that you have not made any basic syntactic errors.
+#
+#======================= Global Settings =====================================
+[global]
+
+# workgroup = NT-Domain-Name or Workgroup-Name
+ workgroup = LINUXGROUP
+ netbios name = apf9328
+
+# server string is the equivalent of the NT Description field
+ server string = Apf9328 Samba Server
+
+
+# This option is important for security. It allows you to restrict
+# connections to machines which are on your local network. The
+# following example restricts access to two C class networks and
+# the "loopback" interface. For more examples of the syntax see
+# the smb.conf man page
+; hosts allow = 192.168.1. 192.168.2. 127.
+hosts allow = 192.168. 127.
+
+
+# this tells Samba to use a separate log file for each machine
+# that connects
+# log file = /var/log/samba/%m.log
+# all log information in one file
+ log file = /var/log/samba/log.smbd
+
+# Put a capping on the size of the log files (in Kb).
+ max log size = 50
+
+# Security mode. Most people will want user level security. See
+# security_level.txt for details.
+ security = user
+ socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
+
+
+ dns proxy = no
+
+
+#============================ Share Definitions ==============================
+ idmap uid = 16777216-33554431
+ idmap gid = 16777216-33554431
+ template shell = /bin/false
+ winbind use default domain = no
+ username map = /etc/samba/smbusers
+ guest ok = yes
+ guest account = default
+ security = user
+ encrypt passwords = yes
+# This one is useful for people to share files
+
+[tmp]
+ path = /tmp
+ public = yes
+ writable = yes
+ printable = no
+ browsable = yes
+
+[default]
+ path = /home/default
+ valid users = default
+ writable = yes
+ printable = no
+ browsable = yes
+
Added: trunk/buildroot/package/samba/smbpasswd
===================================================================
--- trunk/buildroot/package/samba/smbpasswd (rev 0)
+++ trunk/buildroot/package/samba/smbpasswd 2007-02-18 16:41:41 UTC (rev 571)
@@ -0,0 +1 @@
+default:1000:AAD3B435B51404EEAAD3B435B51404EE:31D6CFE0D16AE931B73C59D7E0C089C0:[U ]:LCT-0000007A:
Property changes on: trunk/buildroot/package/samba/smbpasswd
___________________________________________________________________
Name: svn:executable
+ *
Modified: trunk/buildroot/target/device/armadeus/rootfs/skel.tar.gz
===================================================================
(Binary files differ)
Added: trunk/patches/014-buildroot-samba.diff
===================================================================
--- trunk/patches/014-buildroot-samba.diff (rev 0)
+++ trunk/patches/014-buildroot-samba.diff 2007-02-18 16:41:41 UTC (rev 571)
@@ -0,0 +1,10 @@
+--- buildrootref/package/Config.in 2007-01-21 23:30:06.000000000 +0100
++++ buildroot/package/Config.in 2007-02-12 16:32:53.000000000 +0100
+@@ -126,6 +126,7 @@ source "package/readline/Config.in"
+ source "package/rsync/Config.in"
+ source "package/ruby/Config.in"
+ source "package/rxvt/Config.in"
++source "package/samba/Config.in"
+ source "package/sdl/Config.in"
+ source "package/sfdisk/Config.in"
+ source "package/slang/Config.in"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|