Skip to contentSkip to conversation

svn commit: trunk/buildroot/package/samba

Buildroot egtvedt at uclibc.org 1 participant 1 message Dec 12, 2008

lore
Share & tools
lore
#0 lore raw

Author: egtvedt
Date: 2008-12-12 01:09:51 -0800 (Fri, 12 Dec 2008) New Revision: 24389

Log:
samba: bump version to 3.2.5

This patch bumps Samba version to 3.2.5. In the process Samba now depends on libiconv. This dependency is needed because Samba wants to use various formats when talking to the different parts of the system.

Two new patches are introduced, one to double check if BSD functions are available, and one to skip checking for glibc version. The use unsigned enum patch could be removed since this can be supplied with a autoconf variable.

Added:
trunk/buildroot/package/samba/samba-add-check-for-__use_bsd.patch trunk/buildroot/package/samba/samba-do-not-check-glibc-version.patch

Modified:
trunk/buildroot/package/samba/Config.in trunk/buildroot/package/samba/samba-getgrouplist.patch trunk/buildroot/package/samba/samba-remove-legacy-index.patch trunk/buildroot/package/samba/samba.mk

Changeset:
Modified: trunk/buildroot/package/samba/Config.in
===================================================================

buildroot/package/samba/Config.in +1 -0
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_SAMBA
 	bool "samba"
+	select BR2_PACKAGE_LIBICONV
 	help
 	  Provides print services to all manner of SMB/CIFS clients,
 	  including the numerous versions of Microsoft Windows

Added: trunk/buildroot/package/samba/samba-add-check-for-__use_bsd.patch
===================================================================

buildroot/package/samba/samba-add-check-for-__use_bsd.patch +18 -0
@@ -0,0 +1,18 @@
+--- a/source/client/mount.cifs.c
++++ b/source/client/mount.cifs.c
+@@ -91,6 +91,7 @@ char * prefixpath = NULL;
+ 
+ /* glibc doesn't have strlcpy, strlcat. Ensure we do. JRA. We
+  * don't link to libreplace so need them here. */
++#if defined(__GLIBC__) && !(defined(__UCLIBC__) && defined(__USE_BSD))
+ 
+ /* like strncpy but does not 0 fill the buffer and always null
+  *    terminates. bufsize is the size of the destination buffer */
+@@ -126,6 +127,7 @@ static size_t strlcat(char *d, const cha
+ 	}
+ 	return ret;
+ }
++#endif /* __GLIBC__ && !(__UCLIBC__ && __USE_BSD) */
+ 
+ /* BB finish BB
+ 

Added: trunk/buildroot/package/samba/samba-do-not-check-glibc-version.patch
===================================================================

buildroot/package/samba/samba-do-not-check-glibc-version.patch +99 -0

99 lines not on this page · raw message

Modified: trunk/buildroot/package/samba/samba-getgrouplist.patch
===================================================================

buildroot/package/samba/samba-getgrouplist.patch +3 -4
@@ -1,7 +1,6 @@
-diff -ur samba-3.0.25a/source/configure.in samba-3.0.25a-patched/source/configure.in
---- samba-3.0.25a/source/configure.in	2007-05-23 10:29:20.000000000 -0500
-+++ samba-3.0.25a-patched/source/configure.in	2007-06-19 11:38:21.000000000 -0500
-@@ -1370,38 +1370,6 @@
+--- a/source/configure.in
++++ b/source/configure.in
+@@ -1182,38 +1182,6 @@ AC_TRY_COMPILE([
  AC_DEFINE(HAVE_PRCTL, 1, [Whether prctl is available]),[])
  
  #

Modified: trunk/buildroot/package/samba/samba-remove-legacy-index.patch
===================================================================

buildroot/package/samba/samba-remove-legacy-index.patch +3 -4
@@ -1,7 +1,6 @@
-diff -ur samba-3.0.25a/source/registry/reg_perfcount.c samba-3.0.25a-patched/source/registry/reg_perfcount.c
---- samba-3.0.25a/source/registry/reg_perfcount.c	2007-02-28 22:55:05.000000000 -0600
-+++ samba-3.0.25a-patched/source/registry/reg_perfcount.c	2007-06-19 11:40:01.000000000 -0500
-@@ -615,14 +615,14 @@
+--- a/source/registry/reg_perfcount.c
++++ b/source/registry/reg_perfcount.c
+@@ -616,14 +616,14 @@ static bool _reg_perfcount_add_counter(P
  	obj = NULL;
  	memset(buf, 0, PERFCOUNT_MAX_LEN);
  	memcpy(buf, data.dptr, data.dsize);

Modified: trunk/buildroot/package/samba/samba.mk
===================================================================

buildroot/package/samba/samba.mk +23 -9
@@ -3,7 +3,7 @@
 # samba
 #
 #############################################################
-SAMBA_VERSION:=3.0.33
+SAMBA_VERSION:=3.2.5
 SAMBA_SOURCE:=samba-$(SAMBA_VERSION).tar.gz
 SAMBA_SITE:=http://samba.org/samba/ftp/stable/
 SAMBA_DIR:=$(BUILD_DIR)/samba-$(SAMBA_VERSION)/source
@@ -32,8 +32,9 @@
 		samba_cv_HAVE_MMAP=yes \
 		samba_cv_HAVE_FCNTL_LOCK=yes \
 		samba_cv_HAVE_SECURE_MKSTEMP=yes \
+		samba_cv_HAVE_NATIVE_ICONV=no \
+		samba_cv_CC_NEGATIVE_ENUM_VALUES=yes \
 		samba_cv_fpie=no \
-		SMB_BUILD_CC_NEGATIVE_ENUM_VALUES=yes \
 		./configure \
 		--target=$(GNU_TARGET_NAME) \
 		--host=$(GNU_TARGET_NAME) \
@@ -45,17 +46,21 @@
 		--with-privatedir=/etc/samba \
 		--with-logfilebase=/var/log/samba \
 		--with-configdir=/etc/samba \
+		--with-libiconv=$(STAGING_DIR) \
 		--without-ldap \
-		--without-libaddns \
+		--without-ads \
+		--without-acl \
 		--with-included-popt \
 		--with-included-iniparser \
+		--disable-shared-libs \
+		--disable-static \
 		--disable-cups \
-		--disable-static \
+		$(BR2_LARGEFILE) \
 	)
 	touch $@
 
 $(SAMBA_DIR)/$(SAMBA_BINARY): $(SAMBA_DIR)/.configured
-	$(MAKE1) $(TARGET_CONFIGURE_OPTS) -C $(SAMBA_DIR)
+	$(MAKE1) -C $(SAMBA_DIR)
 
 SAMBA_TARGETS_ :=
 SAMBA_TARGETS_y :=
@@ -98,13 +103,22 @@
 		PRIVATEDIR="${TARGET_DIR}/etc/samba" \
 		CONFIGDIR="${TARGET_DIR}/etc/samba" \
 		VARDIR="${TARGET_DIR}/var/log/samba" \
-		-C $(SAMBA_DIR) installservers installbin installcifsmount installscripts
+		-C $(SAMBA_DIR) installlibs installservers installbin installcifsmount installscripts
+	# Do not install the LDAP-like embedded database tools
+	rm -f $(addprefix $(TARGET_DIR)/usr/bin/ldb, add del edit modify search)
+	# Remove not used library by Samba binaries
+	rm -f $(TARGET_DIR)/usr/lib/libnetapi*
+	rm -f $(TARGET_DIR)/usr/lib/libsmbclient*
+	rm -f $(TARGET_DIR)/usr/lib/libtalloc*
+	rm -f $(TARGET_DIR)/usr/lib/libtdb*
+	# Remove not wanted Samba binaries
 	for file in $(SAMBA_TARGETS_); do \
 		rm -f $(TARGET_DIR)/$$file; \
 	done
-	$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/$(SAMBA_TARGET_BINARY)
+	# Strip the wanted Samba binaries
+	$(STRIPCMD) $(STRIP_STRIP_ALL) $(TARGET_DIR)/$(SAMBA_TARGET_BINARY)
 	for file in $(SAMBA_TARGETS_y); do \
-		$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/$$file; \
+		$(STRIPCMD) $(STRIP_STRIP_ALL) $(TARGET_DIR)/$$file; \
 	done
 ifeq ($(BR2_PACKAGE_SAMBA_SWAT),y)
 	cp -dpfr $(SAMBA_DIR)/../swat $(TARGET_DIR)/usr/
@@ -116,7 +130,7 @@
 	rm -rf $(TARGET_DIR)/var/cache/samba
 	rm -rf $(TARGET_DIR)/var/lib/samba
 
-samba: uclibc $(TARGET_DIR)/$(SAMBA_TARGET_BINARY)
+samba: libiconv $(TARGET_DIR)/$(SAMBA_TARGET_BINARY)
 
 samba-source: $(DL_DIR)/$(SAMBA_SOURCE)