All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 0/4] Samba4 package
@ 2014-02-07 20:52 Gustavo Zacarias
  2014-02-07 20:52 ` [Buildroot] [PATCH 1/4] python: fixup python-config script Gustavo Zacarias
                   ` (4 more replies)
  0 siblings, 5 replies; 15+ messages in thread
From: Gustavo Zacarias @ 2014-02-07 20:52 UTC (permalink / raw)
  To: buildroot

This patchset adds a samba 4.1.x package to buildroot.

Samba 4.1.x uses the waf build system which isn't very cross-compile
friendly, and also some tests are formulated in a way that isn't
cross-build friendly either by needing to run them.

For this reason the samba4 build system includes a way to define
answers for many of the tests, but this support isn't complete
and some tests still want to be executed.

Samba 3.6.x is being kept because 4.1.x has a bigger footprint, changes
usage in some tools (swat has been dropped for example), has more
toolchain dependencies and there may be validation issues for users
as well.
Samba 4.1.x also requires a proper answers file for each architecture,
and at the moment i've only tested for ARM and PowerPC so only those
architectures are supported to begin with. To add support for another
architecture basically copy one of the cache files to the proper name,
enable it in Config.in and adjust endianess and all of the "size of"
answers. I'm in the process of automating the sizeof and endianess
answers within the samba build system to make them cross friendly
to simplify the answers file to just one generic linux variant.
The 3.6.x branch is still security supported for the forseeable future.

I'm currently working with samba upstream to solve many of these
issues but this will probably happen with the yet unreleased
4.2 branch only.

The python patch is a backport from the 3.4 branch to avoid using
a runtime python for python-config (a pure shell implementation).

Heimdal patches are all upstream.

Gustavo Zacarias (4):
  python: fixup python-config script
  heimdal: new package
  samba: convert to choice package
  samba4: new package

 .../heimdal/heimdal-0001-add-roken-h-process.patch | 195 ++++++++++++++
 package/heimdal/heimdal-0002-use-Getopt-Std.patch  |  30 +++
 package/heimdal/heimdal-0003-vendor.patch          |  19 ++
 package/heimdal/heimdal-0004-compile_et.patch      |  28 ++
 package/heimdal/heimdal.mk                         |  30 +++
 .../python/python-2.7-017-fix-python-config.patch  | 205 +++++++++++++++
 package/samba/Config.in                            | 285 +++------------------
 package/samba/samba.mk                             | 179 +------------
 package/samba/{ => samba3}/Config.in               |  99 +++----
 package/samba/{ => samba3}/S91smb                  |   0
 .../samba3-0001-fix-smbd-libs-avahi.patch}         |   0
 .../samba3-0002-getaddrinfo.patch}                 |   0
 package/samba/samba3/samba3.mk                     | 181 +++++++++++++
 package/samba/{ => samba3}/simple.conf             |   0
 package/samba/{ => samba4}/S91smb                  |  42 +--
 package/samba/samba4/arm-cache.txt                 |  65 +++++
 package/samba/samba4/powerpc-cache.txt             |  65 +++++
 ...-0001-build-don-t-execute-tests-summary.c.patch |  67 +++++
 ...ld-don-t-execute-statfs-and-f_fsid-checks.patch |  31 +++
 ...003-build-find-FILE_OFFSET_BITS-via-array.patch |  54 ++++
 ...uild-allow-some-python-variable-overrides.patch |  45 ++++
 ...amba4-0005-builtin-heimdal-external-tools.patch |  42 +++
 package/samba/samba4/samba4.mk                     | 111 ++++++++
 23 files changed, 1251 insertions(+), 522 deletions(-)
 create mode 100644 package/heimdal/heimdal-0001-add-roken-h-process.patch
 create mode 100644 package/heimdal/heimdal-0002-use-Getopt-Std.patch
 create mode 100644 package/heimdal/heimdal-0003-vendor.patch
 create mode 100644 package/heimdal/heimdal-0004-compile_et.patch
 create mode 100644 package/heimdal/heimdal.mk
 create mode 100644 package/python/python-2.7-017-fix-python-config.patch
 copy package/samba/{ => samba3}/Config.in (67%)
 copy package/samba/{ => samba3}/S91smb (100%)
 rename package/samba/{samba-fix-smbd-libs-avahi.patch => samba3/samba3-0001-fix-smbd-libs-avahi.patch} (100%)
 rename package/samba/{samba-getaddrinfo.patch => samba3/samba3-0002-getaddrinfo.patch} (100%)
 create mode 100644 package/samba/samba3/samba3.mk
 rename package/samba/{ => samba3}/simple.conf (100%)
 rename package/samba/{ => samba4}/S91smb (52%)
 mode change 100755 => 100644
 create mode 100644 package/samba/samba4/arm-cache.txt
 create mode 100644 package/samba/samba4/powerpc-cache.txt
 create mode 100644 package/samba/samba4/samba4-0001-build-don-t-execute-tests-summary.c.patch
 create mode 100644 package/samba/samba4/samba4-0002-build-don-t-execute-statfs-and-f_fsid-checks.patch
 create mode 100644 package/samba/samba4/samba4-0003-build-find-FILE_OFFSET_BITS-via-array.patch
 create mode 100644 package/samba/samba4/samba4-0004-build-allow-some-python-variable-overrides.patch
 create mode 100644 package/samba/samba4/samba4-0005-builtin-heimdal-external-tools.patch
 create mode 100644 package/samba/samba4/samba4.mk

-- 
1.8.3.2

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH 1/4] python: fixup python-config script
  2014-02-07 20:52 [Buildroot] [PATCH 0/4] Samba4 package Gustavo Zacarias
@ 2014-02-07 20:52 ` Gustavo Zacarias
  2014-02-07 20:52 ` [Buildroot] [PATCH 2/4] heimdal: new package Gustavo Zacarias
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 15+ messages in thread
From: Gustavo Zacarias @ 2014-02-07 20:52 UTC (permalink / raw)
  To: buildroot

From: Gustavo Zacarias <gustavo.zacarias@free-electrons.com>

The original version uses sysconfig from the python interpreter
(normally host-python) which isn't really suited to provide information
of the target python.
Use the pure shell preprocessed backport from the upcoming python 3.4

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
 .../python/python-2.7-017-fix-python-config.patch  | 205 +++++++++++++++++++++
 1 file changed, 205 insertions(+)
 create mode 100644 package/python/python-2.7-017-fix-python-config.patch

diff --git a/package/python/python-2.7-017-fix-python-config.patch b/package/python/python-2.7-017-fix-python-config.patch
new file mode 100644
index 0000000..7f923b9
--- /dev/null
+++ b/package/python/python-2.7-017-fix-python-config.patch
@@ -0,0 +1,205 @@
+Add a backport of http://bugs.python.org/issue16235 so we can use
+python-config for cross builds.
+This basically replaces the python version of python-config with a pure-shell
+version that's already preprocessed when installed and doesn't depend
+on the sysconfig import that usually leads to bad data/results.
+
+Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
+
+diff -Nura Python-2.7.3.orig/configure.in Python-2.7.3/configure.in
+--- Python-2.7.3.orig/configure.in	2013-12-13 14:43:39.793541435 -0300
++++ Python-2.7.3/configure.in	2013-12-13 17:52:54.759489901 -0300
+@@ -764,6 +764,7 @@
+ 
+ # Other platforms follow
+ if test $enable_shared = "yes"; then
++  PY_ENABLE_SHARED=1
+   AC_DEFINE(Py_ENABLE_SHARED, 1, [Defined if Python is built as a shared library.])
+   case $ac_sys_system in
+     BeOS*)
+@@ -824,6 +825,7 @@
+ 
+   esac
+ else # shared is disabled
++  PY_ENABLE_SHARED=0
+   case $ac_sys_system in
+     CYGWIN*)
+           BLDLIBRARY='$(LIBRARY)'
+@@ -1747,6 +1749,9 @@
+ AC_SUBST(BLDSHARED)
+ AC_SUBST(CCSHARED)
+ AC_SUBST(LINKFORSHARED)
++AC_SUBST(PY_ENABLE_SHARED)
++LIBPL="${prefix}/lib/python${VERSION}/config"
++AC_SUBST(LIBPL)
+ # SO is the extension of shared libraries `(including the dot!)
+ # -- usually .so, .sl on HP-UX, .dll on Cygwin
+ AC_MSG_CHECKING(SO)
+@@ -4320,7 +4325,7 @@
+ AC_MSG_RESULT(done)
+ 
+ # generate output files
+-AC_CONFIG_FILES(Makefile.pre Modules/Setup.config Misc/python.pc)
++AC_CONFIG_FILES(Makefile.pre Modules/Setup.config Misc/python.pc Misc/python-config.sh)
+ AC_CONFIG_FILES([Modules/ld_so_aix], [chmod +x Modules/ld_so_aix])
+ AC_OUTPUT
+ 
+diff -Nura Python-2.7.3.orig/Makefile.pre.in Python-2.7.3/Makefile.pre.in
+--- Python-2.7.3.orig/Makefile.pre.in	2013-12-13 14:43:39.401528527 -0300
++++ Python-2.7.3/Makefile.pre.in	2013-12-12 15:15:34.828640321 -0300
+@@ -152,7 +152,7 @@
+ SUBDIRSTOO=	Include Lib Misc Demo
+ 
+ # Files and directories to be distributed
+-CONFIGFILES=	configure configure.in acconfig.h pyconfig.h.in Makefile.pre.in
++CONFIGFILES=	configure configure.in acconfig.h pyconfig.h.in Makefile.pre.in Misc/python-config.sh
+ DISTFILES=	README ChangeLog $(CONFIGFILES)
+ DISTDIRS=	$(SUBDIRS) $(SUBDIRSTOO) Ext-dummy
+ DIST=		$(DISTFILES) $(DISTDIRS)
+@@ -366,7 +366,7 @@
+ 
+ # Default target
+ all:		build_all
+-build_all:	$(BUILDPYTHON) oldsharedmods sharedmods gdbhooks
++build_all:	$(BUILDPYTHON) oldsharedmods sharedmods gdbhooks python-config
+ 
+ # Compile a binary with gcc profile guided optimization.
+ profile-opt:
+@@ -969,10 +969,12 @@
+ 	export EXE; EXE="$(BUILDEXE)"; \
+ 	cd $(srcdir)/Lib/$(PLATDIR); $(RUNSHARED) ./regen
+ 
+-python-config: $(srcdir)/Misc/python-config.in
++python-config: $(srcdir)/Misc/python-config.in Misc/python-config.sh
+ 	# Substitution happens here, as the completely-expanded BINDIR
+ 	# is not available in configure
+-	sed -e "s, at EXENAME@,$(BINDIR)/python$(VERSION)$(EXE)," < $(srcdir)/Misc/python-config.in >python-config
++	sed -e "s, at EXENAME@,$(BINDIR)/python$(VERSION)$(EXE)," < $(srcdir)/Misc/python-config.in >python-config.py
++	# Replace makefile compat. variable references with shell script compat. ones; $(VAR) -> ${VAR}
++	sed -e 's,\$$(\([A-Za-z0-9_]*\)),\$$\{\1\},g' Misc/python-config.sh >python-config
+ 
+ # Install the include files
+ INCLDIRSTOMAKE=$(INCLUDEDIR) $(CONFINCLUDEDIR) $(INCLUDEPY) $(CONFINCLUDEPY)
+@@ -1031,7 +1033,7 @@
+ 	$(INSTALL_SCRIPT) $(srcdir)/Modules/makesetup $(DESTDIR)$(LIBPL)/makesetup
+ 	$(INSTALL_SCRIPT) $(srcdir)/install-sh $(DESTDIR)$(LIBPL)/install-sh
+ 	$(INSTALL_SCRIPT) python-config $(DESTDIR)$(BINDIR)/python$(VERSION)-config
+-	rm python-config
++	$(INSTALL_SCRIPT) python-config.py $(DESTDIR)$(LIBPL)/python-config.py
+ 	@if [ -s Modules/python.exp -a \
+ 		"`echo $(MACHDEP) | sed 's/^\(...\).*/\1/'`" = "aix" ]; then \
+ 		echo; echo "Installing support files for building shared extension modules on AIX:"; \
+@@ -1206,6 +1208,7 @@
+ 		config.cache config.log pyconfig.h Modules/config.c
+ 	-rm -rf build platform
+ 	-rm -rf $(PYTHONFRAMEWORKDIR)
++	-rm -f python-config.py python-config
+ 
+ # Make things extra clean, before making a distribution:
+ # remove all generated files, even Makefile[.pre]
+diff -Nura Python-2.7.3.orig/Misc/python-config.sh.in Python-2.7.3/Misc/python-config.sh.in
+--- Python-2.7.3.orig/Misc/python-config.sh.in	1969-12-31 21:00:00.000000000 -0300
++++ Python-2.7.3/Misc/python-config.sh.in	2013-12-13 17:53:07.752918023 -0300
+@@ -0,0 +1,102 @@
++#!/bin/sh
++
++exit_with_usage ()
++{
++	echo "Usage: $0 --prefix|--exec-prefix|--includes|--libs|--cflags|--ldflags|--extension-suffix|--help|--configdir"
++	exit $1
++}
++
++if [ "$1" = "" ] ; then
++	exit_with_usage 1
++fi
++
++# Returns the actual prefix where this script was installed to.
++installed_prefix ()
++{
++	RESULT=$(dirname $(cd $(dirname "$1") && pwd -P))
++	if which readlink >/dev/null 2>&1 ; then
++	RESULT=$(readlink -f "$RESULT")
++	fi
++	echo $RESULT
++}
++
++prefix_build="@prefix@"
++prefix_real=$(installed_prefix "$0")
++
++# Use sed to fix paths from their built to locations to their installed to locations.
++prefix=$(echo "$prefix_build" | sed "s#$prefix_build#$prefix_real#")
++exec_prefix_build="@exec_prefix@"
++exec_prefix=$(echo "$exec_prefix_build" | sed "s#$exec_prefix_build#$prefix_real#")
++includedir=$(echo "@includedir@")
++libdir=$(echo "@libdir@" | sed "s#$prefix_build#$prefix_real#")
++CFLAGS=$(echo "@CFLAGS@" | sed "s#$prefix_build#$prefix_real#")
++VERSION="@VERSION@"
++LIBM="@LIBM@"
++LIBC="@LIBC@"
++SYSLIBS="$LIBM $LIBC"
++LIBS="@LIBS@ $SYSLIBS -lpython${VERSION}"
++BASECFLAGS="@BASECFLAGS@"
++LDLIBRARY="@LDLIBRARY@"
++LINKFORSHARED="@LINKFORSHARED@"
++OPT="@OPT@"
++PY_ENABLE_SHARED="@PY_ENABLE_SHARED@"
++LDVERSION="@LDVERSION@"
++LIBDEST=${prefix}/lib/python${VERSION}
++LIBPL=$(echo "@LIBPL@" | sed "s#$prefix_build#$prefix_real#")
++SO="@SO@"
++PYTHONFRAMEWORK="@PYTHONFRAMEWORK@"
++INCDIR="-I$includedir/python${VERSION}"
++PLATINCDIR="-I$includedir/python${VERSION}"
++
++# Scan for --help or unknown argument.
++for ARG in $*
++do
++	case $ARG in
++	--help)
++		exit_with_usage 0
++	;;
++	--prefix|--exec-prefix|--includes|--libs|--cflags|--ldflags|--extension-suffix|--abiflags|--configdir)
++	;;
++	*)
++		exit_with_usage 1
++	;;
++esac
++done
++
++for ARG in "$@"
++do
++	case "$ARG" in
++	--prefix)
++		echo "$prefix"
++	;;
++	--exec-prefix)
++		echo "$exec_prefix"
++	;;
++	--includes)
++		 echo "$INCDIR $PLATINCDIR"
++	;;
++	--cflags)
++		echo "$INCDIR $PLATINCDIR $BASECFLAGS $CFLAGS $OPT"
++	;;
++	--libs)
++		echo "$LIBS"
++	;;
++	--ldflags)
++		LINKFORSHAREDUSED=
++		if [ -z "$PYTHONFRAMEWORK" ] ; then
++			LINKFORSHAREDUSED=$LINKFORSHARED
++		fi
++		LIBPLUSED=
++		if [ "$PY_ENABLE_SHARED" = "0" ] ; then
++			LIBPLUSED="-L$LIBPL"
++		fi
++		echo "$LIBPLUSED -L$libdir $LIBS $LINKFORSHAREDUSED"
++	;;
++	--extension-suffix)
++		echo "$SO"
++	;;
++	--configdir)
++		echo "$LIBPL"
++	;;
++esac
++done
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH 2/4] heimdal: new package
  2014-02-07 20:52 [Buildroot] [PATCH 0/4] Samba4 package Gustavo Zacarias
  2014-02-07 20:52 ` [Buildroot] [PATCH 1/4] python: fixup python-config script Gustavo Zacarias
@ 2014-02-07 20:52 ` Gustavo Zacarias
  2014-02-07 20:52 ` [Buildroot] [PATCH 3/4] samba: convert to choice package Gustavo Zacarias
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 15+ messages in thread
From: Gustavo Zacarias @ 2014-02-07 20:52 UTC (permalink / raw)
  To: buildroot

host-heimdal is required for samba 4.1.x since it can't (yet) link
with an external heimdal implementation and can't cross-compile the
internal tools.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
 .../heimdal/heimdal-0001-add-roken-h-process.patch | 195 +++++++++++++++++++++
 package/heimdal/heimdal-0002-use-Getopt-Std.patch  |  30 ++++
 package/heimdal/heimdal-0003-vendor.patch          |  19 ++
 package/heimdal/heimdal-0004-compile_et.patch      |  28 +++
 package/heimdal/heimdal.mk                         |  30 ++++
 5 files changed, 302 insertions(+)
 create mode 100644 package/heimdal/heimdal-0001-add-roken-h-process.patch
 create mode 100644 package/heimdal/heimdal-0002-use-Getopt-Std.patch
 create mode 100644 package/heimdal/heimdal-0003-vendor.patch
 create mode 100644 package/heimdal/heimdal-0004-compile_et.patch
 create mode 100644 package/heimdal/heimdal.mk

diff --git a/package/heimdal/heimdal-0001-add-roken-h-process.patch b/package/heimdal/heimdal-0001-add-roken-h-process.patch
new file mode 100644
index 0000000..b8fbd2a
--- /dev/null
+++ b/package/heimdal/heimdal-0001-add-roken-h-process.patch
@@ -0,0 +1,195 @@
+Add roken-h-process.pl from:
+https://raw.github.com/heimdal/heimdal/master/cf/roken-h-process.pl
+It's required for cross-compiling and missing from release tarballs:
+http://kerberos.996246.n3.nabble.com/Missing-roken-h-process-pl-when-cross-compiling-v1-5-2-td38806.html
+
+Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
+
+diff -Nura heimdal-1.5.3.orig/cf/roken-h-process.pl heimdal-1.5.3/cf/roken-h-process.pl
+--- heimdal-1.5.3.orig/cf/roken-h-process.pl	1969-12-31 21:00:00.000000000 -0300
++++ heimdal-1.5.3/cf/roken-h-process.pl	2013-12-18 11:32:38.157625167 -0300
+@@ -0,0 +1,184 @@
++#!/usr/bin/perl
++
++require 'getopts.pl';
++
++my $debug = 0;
++
++Getopts('dc:p:o:') || die "foo";
++
++if ($opt_d) {
++    $debug = 1;
++}
++
++die "missing arg" if (!defined $opt_c || !defined $opt_p || !defined $opt_o);
++
++my %defines;
++my $IN;
++my $OUT;
++
++print "parse config.h\n" if ($debug);
++
++open IN, $opt_c || die "failed open ${opt_c}";
++
++my @nesting;
++
++push @nesting, 1;
++
++while (<IN>) {
++    if (m/\s*#ifdef\s+(.*)/) {
++	my $var = $1;
++	if (defined $defines{$var}) {
++	    push @nesting, 1;
++	} else {
++	    push @nesting, 0;
++	}
++	next;
++    } elsif (m/\s*#ifndef\s+(.*)/) {
++	my $var = $1;
++	if (defined $defines{$var}) {
++	    push @nesting, 0;
++	} else {
++	    push @nesting, 1;
++	}
++	next;
++    } elsif (m/\s*#else/) {
++	my $var = pop @nesting;
++	$var = !$var;
++	push @nesting, $var;
++	next;
++    } elsif ($nesting[$#nesting] and m/\s*#define\s+(\w+)\s+(\S+)/) {
++	my $res = $2;
++	$res = 1 if (!defined $res);
++	$defines{$1} = $res;
++    }
++}
++
++close IN;
++
++if ($debug) {
++    foreach my $i (keys %defines) {
++	print "k: $i v: $defines{$i}\n";
++    }
++}
++
++open IN, "$opt_p" || die "failed open ${opt_p}";
++open OUT, ">$opt_o" || die "failed open ${opt_o}";
++
++print "parse roken.h.in\n" if ($debug);
++
++print OUT "/* This is an OS dependent, generated file */\n";
++print OUT "\n";
++print OUT "\n";
++print OUT "#ifndef __ROKEN_H__\n";
++print OUT "#define __ROKEN_H__\n";
++print OUT "\n";
++
++ at nesting = (1);
++
++while (<IN>) {
++    if (m/\s*#ifdef\s+(.*)/) {
++	my $var = $1;
++	if (defined $defines{$var}) {
++	    push @nesting, 1;
++	} else {
++	    push @nesting, 0;
++	}
++	next;
++    } elsif (m/\s*#ifndef\s+(.*)/) {
++	my $var = $1;
++	if (defined $defines{$var}) {
++	    push @nesting, 0;
++	} else {
++	    push @nesting, 1;
++	}
++	next;
++    } elsif (m/\s*#if\s+(.*)/) {
++	my $res = parse_if($1);
++	print "line = $res: $1\n" if ($debug);
++	push @nesting, $res;
++	next;
++    } elsif (m/\s*#elif\s+(.*)/) {
++	my $res = pop @nesting;
++	if ($res gt 0) {
++	    $res = -1;
++	} else {
++	    my $res = parse_if($1);
++	}
++	push @nesting, $res;
++	next;
++    } elsif (m/\s*#else/) {
++	my $var = pop @nesting;
++	$var = !$var;
++	push @nesting, $var;
++	next;
++    } elsif (m/\s*#endif/) {
++	pop @nesting;
++	next;
++    }
++    print "line: $_\n"  if ($debug);
++    print "nesting dep $#{nesting}\n"  if ($debug);
++    my $i = 0, $t = 1;
++    while ($i le $#nesting) {
++	$t = 0 if ($nesting[$i] le 0);
++	print "nesting $i val $nesting[$i] -> $t\n" if ($debug);
++	$i++;
++    }
++    if ($t) {
++	print OUT;
++    }
++}
++
++print OUT "\n";
++print OUT "#endif /* __ROKEN_H__ */\n";
++
++
++close IN;
++
++exit 0;
++
++sub parse_if
++{
++    my ($neg, $var);
++
++    $_ = shift;
++
++    if (m/^\s*$/) {
++	print "end $_\n" if ($debug);
++	return 1;
++    } elsif (m/^([^&]+)\&\&(.*)$/) {
++	print "$1 and $2\n" if ($debug);
++	return parse_if($1) and parse_if($2);
++    } elsif (m/^\(([^&]+)\&\&(.*)$/) {
++	print "$1 and $2\n" if ($debug);
++	return parse_if($1) and parse_if($2);
++    } elsif (m/^([^\|]+)\|\|(.*)$/) {
++	print "$1 or $2\n" if ($debug);
++	return parse_if($1) or parse_if($2);
++    } elsif (m/^\s*(\!)?\s*defined\((\w+)\)/) {
++	($neg, $var) = ($1, $2);
++	print "def: ${neg}-defined(${var})\n" if ($debug);
++	my $res = defined $defines{$var};
++	if ($neg eq "!") {
++	    if ($res) {
++		$res = 0;
++	    } else {
++		$res = 1;
++	    }
++	}
++	print "res: $res\n" if ($debug);
++	return $res;
++    } elsif (m/^\s*(\!)?(\w+)/) {
++	($neg, $var) = ($1, $2);
++	print "var: $neg $var\n" if ($debug);
++	my $res;
++	if (defined $defines{$var}) {
++	    $res = $defines{$var};
++	} else {
++	    $res = 0;
++	}
++	$res = ! $res if ($neg =~ m/!/);
++	print "res: $res\n" if ($debug);
++	return $res;
++    }
++    die "failed parse: $_\n";
++}
diff --git a/package/heimdal/heimdal-0002-use-Getopt-Std.patch b/package/heimdal/heimdal-0002-use-Getopt-Std.patch
new file mode 100644
index 0000000..134b888
--- /dev/null
+++ b/package/heimdal/heimdal-0002-use-Getopt-Std.patch
@@ -0,0 +1,30 @@
+From 6080c0b229c6e332d7dd609d9435ac9baeeea443 Mon Sep 17 00:00:00 2001
+From: Gustavo Zacarias <gustavo@zacarias.com.ar>
+Date: Thu, 30 Jan 2014 16:33:02 -0300
+Subject: [PATCH] roken-h-process: use Getopt::Std, getopts.pl is deprecated
+
+Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
+---
+ cf/roken-h-process.pl | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/cf/roken-h-process.pl b/cf/roken-h-process.pl
+index 153a35c..72d3bd3 100644
+--- a/cf/roken-h-process.pl
++++ b/cf/roken-h-process.pl
+@@ -1,10 +1,10 @@
+ #!/usr/bin/perl
+ 
+-require 'getopts.pl';
++use Getopt::Std;
+ 
+ my $debug = 0;
+ 
+-Getopts('dc:p:o:') || die "foo";
++getopts('dc:p:o:') || die "foo";
+ 
+ if ($opt_d) {
+     $debug = 1;
+-- 
+1.8.3.2
+
diff --git a/package/heimdal/heimdal-0003-vendor.patch b/package/heimdal/heimdal-0003-vendor.patch
new file mode 100644
index 0000000..1ccd629
--- /dev/null
+++ b/package/heimdal/heimdal-0003-vendor.patch
@@ -0,0 +1,19 @@
+Add --vendor option to krb5-config, required by samba 4.
+Status: Backport from upstream git.
+
+Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
+
+diff -Nura heimdal-1.5.3.orig/tools/krb5-config.in heimdal-1.5.3.vendor/tools/krb5-config.in
+--- heimdal-1.5.3.orig/tools/krb5-config.in	2012-12-09 19:06:44.000000000 -0300
++++ heimdal-1.5.3.vendor/tools/krb5-config.in	2013-12-18 15:49:45.283986300 -0300
+@@ -50,6 +50,10 @@
+     do_usage=yes
+     usage_exit=0
+     ;;
++  --vendor)
++    echo "Heimdal";
++    exit 0
++    ;;
+   --version)
+     echo "@PACKAGE@ @VERSION@"
+     exit 0
diff --git a/package/heimdal/heimdal-0004-compile_et.patch b/package/heimdal/heimdal-0004-compile_et.patch
new file mode 100644
index 0000000..6bdec6f
--- /dev/null
+++ b/package/heimdal/heimdal-0004-compile_et.patch
@@ -0,0 +1,28 @@
+Use compile_et from e2fsprogs rather than building the native and useless one
+from heimdal.
+
+Idea from:
+http://comments.gmane.org/gmane.comp.encryption.kerberos.heimdal.general/6572
+
+Status: Backport from upstream git.
+
+Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
+
+diff -Nura heimdal-1.5.3.orig/cf/check-compile-et.m4 heimdal-1.5.3.et/cf/check-compile-et.m4
+--- heimdal-1.5.3.orig/cf/check-compile-et.m4	2012-12-09 19:06:44.000000000 -0300
++++ heimdal-1.5.3.et/cf/check-compile-et.m4	2013-12-18 14:20:04.025925879 -0300
+@@ -3,12 +3,12 @@
+ dnl CHECK_COMPILE_ET
+ AC_DEFUN([CHECK_COMPILE_ET], [
+ 
+-AC_CHECK_PROG(COMPILE_ET, compile_et, [compile_et])
++AC_CHECK_PROG(COMPILE_ET, compile_et, [compile_et], [no])
+ 
+ krb_cv_compile_et="no"
+ krb_cv_com_err_need_r=""
+ krb_cv_compile_et_cross=no
+-if test "${COMPILE_ET}" = "compile_et"; then
++if test "$COMPILE_ET" != "no"; then
+ 
+ dnl We have compile_et.  Now let's see if it supports `prefix' and `index'.
+ AC_MSG_CHECKING(whether compile_et has the features we need)
diff --git a/package/heimdal/heimdal.mk b/package/heimdal/heimdal.mk
new file mode 100644
index 0000000..c73b33e
--- /dev/null
+++ b/package/heimdal/heimdal.mk
@@ -0,0 +1,30 @@
+################################################################################
+#
+# heimdal
+#
+################################################################################
+
+HEIMDAL_VERSION = 1.5.3
+HEIMDAL_SITE = http://www.h5l.org/dist/src
+HEIMDAL_DEPENDENCIES = host-e2fsprogs host-pkgconf
+HEIMDAL_INSTALL_STAGING = YES
+# static because of -fPIC issues with e2fsprogs on x86_64 host
+HOST_HEIMDAL_CONF_OPT = --with-x=no --disable-shared --enable-static
+HOST_HEIMDAL_CONF_ENV = MAKEINFO=true
+HEIMDAL_MAKE = $(MAKE1)
+# For heimdal-0004-compile_et.patch
+HEIMDAL_AUTORECONF = YES
+HEIMDAL_LICENSE = BSD-3c
+HEIMDAL_LICENSE_FILES = LICENSE
+
+# We need asn1_compile in the PATH for samba4
+define HOST_HEIMDAL_MAKE_SYMLINK
+	ln -sf $(HOST_DIR)/usr/libexec/heimdal/asn1_compile \
+		$(HOST_DIR)/usr/bin/asn1_compile
+	ln -sf $(HOST_DIR)/usr/bin/compile_et \
+		$(HOST_DIR)/usr/libexec/heimdal/compile_et
+endef
+
+HOST_HEIMDAL_POST_INSTALL_HOOKS += HOST_HEIMDAL_MAKE_SYMLINK
+
+$(eval $(host-autotools-package))
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH 3/4] samba: convert to choice package
  2014-02-07 20:52 [Buildroot] [PATCH 0/4] Samba4 package Gustavo Zacarias
  2014-02-07 20:52 ` [Buildroot] [PATCH 1/4] python: fixup python-config script Gustavo Zacarias
  2014-02-07 20:52 ` [Buildroot] [PATCH 2/4] heimdal: new package Gustavo Zacarias
@ 2014-02-07 20:52 ` Gustavo Zacarias
  2014-02-07 22:20   ` Samuel Martin
  2014-02-10  6:48   ` Arnout Vandecappelle
  2014-02-07 20:52 ` [Buildroot] [PATCH 4/4] samba4: new package Gustavo Zacarias
  2014-02-08 14:30 ` [Buildroot] [PATCH 0/4] Samba4 package Christophe Vu-Brugier
  4 siblings, 2 replies; 15+ messages in thread
From: Gustavo Zacarias @ 2014-02-07 20:52 UTC (permalink / raw)
  To: buildroot

Convert the classic samba package to a choice and move it to samba3 in
preparation for the samba4 package.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
 package/samba/Config.in                            | 274 ++-------------------
 package/samba/samba.mk                             | 179 +-------------
 package/samba/{ => samba3}/Config.in               |  99 +++-----
 package/samba/{ => samba3}/S91smb                  |   0
 .../samba3-0001-fix-smbd-libs-avahi.patch}         |   0
 .../samba3-0002-getaddrinfo.patch}                 |   0
 package/samba/samba3/samba3.mk                     | 181 ++++++++++++++
 package/samba/{ => samba3}/simple.conf             |   0
 8 files changed, 240 insertions(+), 493 deletions(-)
 copy package/samba/{ => samba3}/Config.in (67%)
 rename package/samba/{ => samba3}/S91smb (100%)
 rename package/samba/{samba-fix-smbd-libs-avahi.patch => samba3/samba3-0001-fix-smbd-libs-avahi.patch} (100%)
 rename package/samba/{samba-getaddrinfo.patch => samba3/samba3-0002-getaddrinfo.patch} (100%)
 create mode 100644 package/samba/samba3/samba3.mk
 rename package/samba/{ => samba3}/simple.conf (100%)

diff --git a/package/samba/Config.in b/package/samba/Config.in
index 1469075..d11401f 100644
--- a/package/samba/Config.in
+++ b/package/samba/Config.in
@@ -1,270 +1,32 @@
+comment "samba needs a toolchain w/ threads"
+	depends on BR2_USE_MMU
+	depends on !BR2_TOOLCHAIN_HAS_THREADS
+
 config BR2_PACKAGE_SAMBA
 	bool "samba"
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	depends on BR2_USE_MMU # fork()
-	select BR2_PACKAGE_POPT
 	help
-	  Provides print services to all manner of SMB/CIFS clients,
-	  including the numerous versions of Microsoft Windows
-	  operating systems.
-
-	  http://www.samba.org/
-
-	  NOTE: A complete Samba install takes over 50MB of space,
-		so choose only the components you need.
-
-comment "samba needs a toolchain w/ threads"
-	depends on BR2_USE_MMU
-	depends on !BR2_TOOLCHAIN_HAS_THREADS
+	  Provides secure, stable and fast file and print services
+	  for all clients using the SMB/CIFS protocol, such as all versions
+	  of DOS and Windows, OS/2, Linux and many others.
 
 if BR2_PACKAGE_SAMBA
 
-config BR2_PACKAGE_SAMBA_MAX_DEBUGLEVEL
-	int "Maximum level of compiled-in debug messages"
-	range -1 10000
-	default -1
-	help
-	  Define the level of compiled-in debug messages.
-	  This allows for big space savings, -1 being the lowest (none).
-
-config BR2_PACKAGE_SAMBA_LIBICONV
-	bool "extended encodings (libiconv)"
-	depends on !BR2_ENABLE_LOCALE
-	select BR2_PACKAGE_LIBICONV
-	help
-	  Include libiconv support for extended conversion of filename
-	  enconding. Samba has built-in support for UTF-8, ISO-8859-1
-	  and ASCII, so this is only required if you want to support
-	  other encodings.
-
-menu "Samba tools selection"
-
-config BR2_PACKAGE_SAMBA_EVENTLOGADM
-	bool "eventlogadm"
-	default y
-	help
-	  Write Eventlog records to a tdb or perform other eventlog functions
-
-config BR2_PACKAGE_SAMBA_FINDSMB
-	bool "findsmb"
-	default y
-	depends on BR2_PACKAGE_SAMBA_SMBCLIENT
-	depends on BR2_PACKAGE_SAMBA_NMBLOOKUP
-	depends on BR2_PACKAGE_PERL
-	help
-	  Script to browse network
-
-comment "findsmb       - disabled (requires nmblookup, smbclient and perl)"
-	depends on !BR2_PACKAGE_SAMBA_SMBCLIENT || !BR2_PACKAGE_SAMBA_NMBLOOKUP || !BR2_PACKAGE_PERL
-
-config BR2_PACKAGE_SAMBA_NET
-	bool "net"
-	default y
-	help
-	  Distributed SMB/CIFS Server Management Utility
-
-config BR2_PACKAGE_SAMBA_NMBD
-	bool "nmbd"
-	default y
-	help
-	  NetBIOS name server to provide NetBIOS over IP naming services
-	  to clients
-
-config BR2_PACKAGE_SAMBA_NMBLOOKUP
-	bool "nmblookup"
-	default y
-	help
-	  Query NetBIOS names and map them to IP addresses in a network
-	  using NetBIOS over TCP/IP queries
-
-config BR2_PACKAGE_SAMBA_NTLM_AUTH
-	bool "ntlm_auth"
-	default y
-	help
-	  Helper utility that authenticates users using NT/LM authentication
-
-config BR2_PACKAGE_SAMBA_PDBEDIT
-	bool "pdbedit"
-	default y
-	help
-	  Manage the SAM database (Database of Samba Users)
-
-config BR2_PACKAGE_SAMBA_PROFILES
-	bool "profiles"
-	default y
-	help
-	  Utility that reports and changes SIDs in Windows NT registry files
-
-config BR2_PACKAGE_SAMBA_RPCCLIENT
-	bool "rpcclient"
-	select BR2_PACKAGE_READLINE
-	default y
+choice
+	prompt "Samba version"
+	default BR2_PACKAGE_SAMBA3
 	help
-	  Tool for executing client side MS-RPC functions using RPC
-	  calls from a UNIX workstation.
+	  Select the desired samba version.
 
-config BR2_PACKAGE_SAMBA_SMBCACLS
-	bool "smbcacls"
-	default y
-	help
-	  Set or get ACLs on an NT file or directory names
-
-config BR2_PACKAGE_SAMBA_SMBCLIENT
-	bool "smbclient"
-	select BR2_PACKAGE_READLINE
-	default y
-	help
-	  ftp-like client to access SMB/CIFS resources on servers
-
-config BR2_PACKAGE_SAMBA_SMBCONTROL
-	bool "smbcontrol"
-	default y
-	help
-	  Send messages to smbd, nmbd or winbindd processes
-
-config BR2_PACKAGE_SAMBA_SMBCQUOTAS
-	bool "smbcquotas"
-	default y
-	help
-	  Set or get QUOTAs of NTFS 5 shares
-
-config BR2_PACKAGE_SAMBA_SMBD
-	bool "smbd"
-	default y
-	help
-	  The server daemon that provides filesharing and printing services
-
-config BR2_PACKAGE_SAMBA_SMBGET
-	bool "smbget"
-	default y
-	help
-	  wget-like utility for download files over SMB
-
-config BR2_PACKAGE_SAMBA_SMBLDBTOOLS
-	bool "smbldbtools"
-	default y
-	help
-	  ldbadd ldbdel ldbedit ldbmodify ldbrename ldbsearch tools
-
-config BR2_PACKAGE_SAMBA_SMBPASSWD
-	bool "smbpasswd"
-	default y
-	help
-	  Change a user's SMB passwd
-
-config BR2_PACKAGE_SAMBA_SMBSHARESEC
-	bool "smbsharesec"
-	default y
-	help
-	  Manipulate share permissions on SMB file shares
-
-config BR2_PACKAGE_SAMBA_SMBSPOOL
-	bool "smbspool"
-	default y
-	help
-	  Send a print file to an SMB printer
-
-config BR2_PACKAGE_SAMBA_SMBSTATUS
-	bool "smbstatus"
-	default y
-	help
-	  Report on current Samba connections
-
-config BR2_PACKAGE_SAMBA_SMBTREE
-	bool "smbtree"
-	default y
-	help
-	  A text based smb network browser
-
-config BR2_PACKAGE_SAMBA_SWAT
-	bool "swat"
-	default y
-	help
-	  Samba Web Administration Tool
-
-config BR2_PACKAGE_SAMBA_SMBTA_UTIL
-	bool "smbta-util"
-	default y
-	help
-	  Tool to ease the configuration of the vfs_smb_traffic_analyzer
-	  module regarding data encryption.
-
-config BR2_PACKAGE_SAMBA_SMBTAR
-	bool "smbtar"
-	default y
-	depends on BR2_PACKAGE_SAMBA_SMBCLIENT
-	help
-	  tar-like script that wraps smbclient
-
-comment "smbtar        - disabled (requires smbclient)"
-	depends on !BR2_PACKAGE_SAMBA_SMBCLIENT
-
-config BR2_PACKAGE_SAMBA_TDB
-	bool "tdb"
-	default y
-	help
-	  Tools to operate on the .tdb database files
-
-config BR2_PACKAGE_SAMBA_TESTPARM
-	bool "testparm"
-	default y
-	help
-	  Check an smb.conf configuration file for internal correctness
-
-config BR2_PACKAGE_SAMBA_WINBINDD
-	bool "winbindd"
-	default y
-	help
-	  Name Service Switch daemon for resolving names from NT servers
-
-config BR2_PACKAGE_SAMBA_WBINFO
-	bool "wbinfo"
-	default y
-	depends on BR2_PACKAGE_SAMBA_WINBINDD
-	help
-	  Query information from winbind daemon
-
-endmenu
-
-
-menu "Samba libraries selection"
-
-config BR2_PACKAGE_SAMBA_LIBSMBCLIENT
-	bool "libsmbclient"
-	help
-	  libsmbclient is a library toolset that permits applications
-	  to manipulate CIFS/SMB network resources using many of the
-	  standards POSIX functions available for manipulating local
-	  files.
-
-endmenu
-
-
-menu "Samba support selection"
-
-config BR2_PACKAGE_SAMBA_AVAHI
-	bool "support avahi"
-	default y
-	depends on BR2_PACKAGE_AVAHI_DAEMON
-	depends on BR2_USE_MMU # dbus
-	select BR2_PACKAGE_DBUS
-	help
-	  Include support for avahi
-
-comment "support avahi - disabled (requires avahi-daemon)"
-	depends on BR2_USE_MMU
-	depends on !BR2_PACKAGE_AVAHI_DAEMON
-
-config BR2_PACKAGE_SAMBA_GAMIN
-	bool "support gamin"
-	default y
-	depends on BR2_PACKAGE_GAMIN
+	config BR2_PACKAGE_SAMBA3
+	bool "3.6.x"
+	select BR2_PACKAGE_POPT
 	help
-	  Include support for gamin
+	  The well-tested legacy branch.
 
-comment "support gamin - disabled (requires gamin)"
-	depends on !BR2_PACKAGE_GAMIN
-
-endmenu
+endchoice
 
 endif
+
+source "package/samba/samba3/Config.in"
diff --git a/package/samba/samba.mk b/package/samba/samba.mk
index a7b452c..33a0660 100644
--- a/package/samba/samba.mk
+++ b/package/samba/samba.mk
@@ -1,178 +1 @@
-################################################################################
-#
-# samba
-#
-################################################################################
-
-SAMBA_VERSION = 3.6.22
-SAMBA_SITE = http://ftp.samba.org/pub/samba/stable
-SAMBA_SUBDIR = source3
-SAMBA_INSTALL_STAGING = YES
-SAMBA_LICENSE = GPLv3+
-SAMBA_LICENSE_FILES = COPYING
-
-SAMBA_DEPENDENCIES = popt \
-	$(if $(BR2_PACKAGE_SAMBA_RPCCLIENT),readline) \
-	$(if $(BR2_PACKAGE_SAMBA_SMBCLIENT),readline) \
-	$(if $(BR2_PACKAGE_SAMBA_AVAHI),avahi) \
-	$(if $(BR2_PACKAGE_SAMBA_GAMIN),gamin)
-
-SAMBA_CONF_ENV = \
-	ac_cv_file__proc_sys_kernel_core_pattern=yes \
-	samba_cv_HAVE_GETTIMEOFDAY_TZ=yes \
-	samba_cv_USE_SETREUID=yes \
-	samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes \
-	samba_cv_HAVE_IFACE_IFCONF=yes \
-	samba_cv_HAVE_MMAP=yes \
-	samba_cv_HAVE_FCNTL_LOCK=yes \
-	samba_cv_HAVE_SECURE_MKSTEMP=yes \
-	samba_cv_CC_NEGATIVE_ENUM_VALUES=yes \
-	samba_cv_fpie=no \
-	libreplace_cv_HAVE_IPV6=$(if $(BR2_INET_IPV6),yes,no) \
-	$(if $(BR2_PACKAGE_SAMBA_AVAHI),AVAHI_LIBS=-pthread)
-
-SAMBA_CONF_OPT = \
-	--localstatedir=/var \
-	--with-piddir=/var/run \
-	--with-lockdir=/var/lock \
-	--with-logfilebase=/var/log \
-	--with-configdir=/etc/samba \
-	--with-privatedir=/etc/samba \
-	\
-	--disable-cups \
-	--enable-shared-libs \
-	--disable-pie \
-	--disable-relro \
-	--disable-dnssd \
-	\
-	$(if $(BR2_PACKAGE_SAMBA_AVAHI),--enable-avahi,--disable-avahi) \
-	$(if $(BR2_PACKAGE_SAMBA_GAMIN),--enable-fam,--disable-fam) \
-	$(if $(BR2_PACKAGE_SAMBA_SWAT),--enable-swat,--disable-swat) \
-	\
-	--without-cluster-support \
-	--without-dnsupdate \
-	--with-sys-quotas \
-	--without-ads \
-	--without-ldap \
-	--with-included-iniparser \
-	\
-	$(if $(BR2_PACKAGE_SAMBA_RPCCLIENT),--with-readline=$(STAGING_DIR)) \
-	$(if $(BR2_PACKAGE_SAMBA_SMBCLIENT),--with-readline=$(STAGING_DIR)) \
-	$(if $(BR2_PACKAGE_SAMBA_WINBINDD),--with-winbind,--without-winbind)
-
-SAMBA_INSTALL_TARGET_OPT = \
-	DESTDIR=$(TARGET_DIR) -C $(SAMBA_DIR)/$(SAMBA_SUBDIR) \
-	installlibs installservers installbin installscripts \
-	$(if $(BR2_PACKAGE_SAMBA_SWAT),installswat)
-
-# binaries to keep
-SAMBA_BINTARGETS_y = \
-	usr/sbin/smbd \
-	usr/lib/libtalloc.so \
-	usr/lib/libtdb.so
-
-# binaries to remove
-SAMBA_BINTARGETS_ = \
-	usr/lib/libnetapi.so* \
-	usr/lib/libsmbsharemodes.so*
-
-# binaries to keep or remove
-SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_EVENTLOGADM) += usr/bin/eventlogadm
-SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_NET) += usr/bin/net
-SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_NMBD) += usr/sbin/nmbd
-SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_NMBLOOKUP) += usr/bin/nmblookup
-SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_NTLM_AUTH) += usr/bin/ntlm_auth
-SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_PDBEDIT) += usr/bin/pdbedit
-SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_PROFILES) += usr/bin/profiles
-SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_RPCCLIENT) += usr/bin/rpcclient
-SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBCACLS) += usr/bin/smbcacls
-SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBCLIENT) += usr/bin/smbclient
-SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBCONTROL) += usr/bin/smbcontrol
-SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBCQUOTAS) += usr/bin/smbcquotas
-SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBD) += usr/sbin/smbd
-SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBGET) += usr/bin/smbget
-SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBLDBTOOLS) += usr/bin/ldbadd
-SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBLDBTOOLS) += usr/bin/ldbdel
-SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBLDBTOOLS) += usr/bin/ldbedit
-SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBLDBTOOLS) += usr/bin/ldbmodify
-SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBLDBTOOLS) += usr/bin/ldbrename
-SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBLDBTOOLS) += usr/bin/ldbsearch
-SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBPASSWD) += usr/bin/smbpasswd
-SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBSHARESEC) += usr/bin/sharesec
-SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBSPOOL) += usr/bin/smbspool
-SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBSTATUS) += usr/bin/smbstatus
-SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBTA_UTIL) += usr/bin/smbta-util
-SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SMBTREE) += usr/bin/smbtree
-SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_SWAT) += usr/sbin/swat
-SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_TDB) += usr/bin/tdbbackup
-SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_TDB) += usr/bin/tdbdump
-SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_TDB) += usr/bin/tdbtool
-SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_TESTPARM) += usr/bin/testparm
-SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_WINBINDD) += usr/sbin/winbindd
-SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_WBINFO) += usr/bin/wbinfo
-
-# libraries to keep or remove
-SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_WINBINDD) += usr/lib/libwbclient.so*
-SAMBA_BINTARGETS_$(BR2_PACKAGE_SAMBA_LIBSMBCLIENT) += usr/lib/libsmbclient.so*
-
-# non-binaries to remove
-SAMBA_TXTTARGETS_ = \
-	usr/include/libsmbclient.h \
-	usr/include/netapi.h \
-	usr/include/smb_share_modes.h \
-	usr/include/talloc.h \
-	usr/include/tdb.h \
-	usr/include/wbclient.h
-
-# non-binaries to keep or remove
-SAMBA_TXTTARGETS_$(BR2_PACKAGE_SAMBA_FINDSMB) += usr/bin/findsmb
-SAMBA_TXTTARGETS_$(BR2_PACKAGE_SAMBA_SMBTAR) += usr/bin/smbtar
-
-define SAMBA_REMOVE_UNNEEDED_BINARIES
-	rm -f $(addprefix $(TARGET_DIR)/, $(SAMBA_BINTARGETS_))
-	rm -f $(addprefix $(TARGET_DIR)/, $(SAMBA_TXTTARGETS_))
-endef
-
-SAMBA_POST_INSTALL_TARGET_HOOKS += SAMBA_REMOVE_UNNEEDED_BINARIES
-
-define SAMBA_REMOVE_SWAT_DOCUMENTATION
-	# Remove the documentation
-	rm -rf $(TARGET_DIR)/usr/swat/help/manpages
-	rm -rf $(TARGET_DIR)/usr/swat/help/Samba3*
-	rm -rf $(TARGET_DIR)/usr/swat/using_samba/
-	# Removing the welcome.html file will make swat default to
-	# welcome-no-samba-doc.html
-	rm -rf $(TARGET_DIR)/usr/swat/help/welcome.html
-endef
-
-# --with-libiconv="" is to avoid detecting host libiconv and build failure
-ifeq ($(BR2_PACKAGE_SAMBA_LIBICONV),y)
-SAMBA_DEPENDENCIES += libiconv
-SAMBA_CONF_OPT += --with-libiconv=$(STAGING_DIR)
-else
-SAMBA_CONF_OPT += --with-libiconv=""
-endif
-
-# Compiled debug messages by level
-SAMBA_CONF_OPT += CFLAGS="$(TARGET_CFLAGS) -DMAX_DEBUG_LEVEL=$(BR2_PACKAGE_SAMBA_MAX_DEBUGLEVEL)"
-
-ifeq ($(BR2_PACKAGE_SAMBA_SWAT),y)
-ifneq ($(BR2_HAVE_DOCUMENTATION),y)
-SAMBA_POST_INSTALL_TARGET_HOOKS += SAMBA_REMOVE_SWAT_DOCUMENTATION
-endif
-endif
-
-define SAMBA_INSTALL_INITSCRIPTS_CONFIG
-	# install start/stop script
-	@if [ ! -f $(TARGET_DIR)/etc/init.d/S91smb ]; then \
-		$(INSTALL) -m 0755 -D package/samba/S91smb $(TARGET_DIR)/etc/init.d/S91smb; \
-	fi
-	# install config
-	@if [ ! -f $(TARGET_DIR)/etc/samba/smb.conf ]; then \
-		$(INSTALL) -m 0755 -D package/samba/simple.conf $(TARGET_DIR)/etc/samba/smb.conf; \
-	fi
-endef
-
-SAMBA_POST_INSTALL_TARGET_HOOKS += SAMBA_INSTALL_INITSCRIPTS_CONFIG
-
-$(eval $(autotools-package))
+include $(sort $(wildcard package/samba/*/*.mk))
diff --git a/package/samba/Config.in b/package/samba/samba3/Config.in
similarity index 67%
copy from package/samba/Config.in
copy to package/samba/samba3/Config.in
index 1469075..74a60a3 100644
--- a/package/samba/Config.in
+++ b/package/samba/samba3/Config.in
@@ -1,25 +1,6 @@
-config BR2_PACKAGE_SAMBA
-	bool "samba"
-	depends on BR2_TOOLCHAIN_HAS_THREADS
-	depends on BR2_USE_MMU # fork()
-	select BR2_PACKAGE_POPT
-	help
-	  Provides print services to all manner of SMB/CIFS clients,
-	  including the numerous versions of Microsoft Windows
-	  operating systems.
-
-	  http://www.samba.org/
-
-	  NOTE: A complete Samba install takes over 50MB of space,
-		so choose only the components you need.
-
-comment "samba needs a toolchain w/ threads"
-	depends on BR2_USE_MMU
-	depends on !BR2_TOOLCHAIN_HAS_THREADS
-
-if BR2_PACKAGE_SAMBA
+if BR2_PACKAGE_SAMBA3
 
-config BR2_PACKAGE_SAMBA_MAX_DEBUGLEVEL
+config BR2_PACKAGE_SAMBA3_MAX_DEBUGLEVEL
 	int "Maximum level of compiled-in debug messages"
 	range -1 10000
 	default -1
@@ -27,7 +8,7 @@ config BR2_PACKAGE_SAMBA_MAX_DEBUGLEVEL
 	  Define the level of compiled-in debug messages.
 	  This allows for big space savings, -1 being the lowest (none).
 
-config BR2_PACKAGE_SAMBA_LIBICONV
+config BR2_PACKAGE_SAMBA3_LIBICONV
 	bool "extended encodings (libiconv)"
 	depends on !BR2_ENABLE_LOCALE
 	select BR2_PACKAGE_LIBICONV
@@ -39,63 +20,63 @@ config BR2_PACKAGE_SAMBA_LIBICONV
 
 menu "Samba tools selection"
 
-config BR2_PACKAGE_SAMBA_EVENTLOGADM
+config BR2_PACKAGE_SAMBA3_EVENTLOGADM
 	bool "eventlogadm"
 	default y
 	help
 	  Write Eventlog records to a tdb or perform other eventlog functions
 
-config BR2_PACKAGE_SAMBA_FINDSMB
+config BR2_PACKAGE_SAMBA3_FINDSMB
 	bool "findsmb"
 	default y
-	depends on BR2_PACKAGE_SAMBA_SMBCLIENT
-	depends on BR2_PACKAGE_SAMBA_NMBLOOKUP
+	depends on BR2_PACKAGE_SAMBA3_SMBCLIENT
+	depends on BR2_PACKAGE_SAMBA3_NMBLOOKUP
 	depends on BR2_PACKAGE_PERL
 	help
 	  Script to browse network
 
 comment "findsmb       - disabled (requires nmblookup, smbclient and perl)"
-	depends on !BR2_PACKAGE_SAMBA_SMBCLIENT || !BR2_PACKAGE_SAMBA_NMBLOOKUP || !BR2_PACKAGE_PERL
+	depends on !BR2_PACKAGE_SAMBA3_SMBCLIENT || !BR2_PACKAGE_SAMBA3_NMBLOOKUP || !BR2_PACKAGE_PERL
 
-config BR2_PACKAGE_SAMBA_NET
+config BR2_PACKAGE_SAMBA3_NET
 	bool "net"
 	default y
 	help
 	  Distributed SMB/CIFS Server Management Utility
 
-config BR2_PACKAGE_SAMBA_NMBD
+config BR2_PACKAGE_SAMBA3_NMBD
 	bool "nmbd"
 	default y
 	help
 	  NetBIOS name server to provide NetBIOS over IP naming services
 	  to clients
 
-config BR2_PACKAGE_SAMBA_NMBLOOKUP
+config BR2_PACKAGE_SAMBA3_NMBLOOKUP
 	bool "nmblookup"
 	default y
 	help
 	  Query NetBIOS names and map them to IP addresses in a network
 	  using NetBIOS over TCP/IP queries
 
-config BR2_PACKAGE_SAMBA_NTLM_AUTH
+config BR2_PACKAGE_SAMBA3_NTLM_AUTH
 	bool "ntlm_auth"
 	default y
 	help
 	  Helper utility that authenticates users using NT/LM authentication
 
-config BR2_PACKAGE_SAMBA_PDBEDIT
+config BR2_PACKAGE_SAMBA3_PDBEDIT
 	bool "pdbedit"
 	default y
 	help
 	  Manage the SAM database (Database of Samba Users)
 
-config BR2_PACKAGE_SAMBA_PROFILES
+config BR2_PACKAGE_SAMBA3_PROFILES
 	bool "profiles"
 	default y
 	help
 	  Utility that reports and changes SIDs in Windows NT registry files
 
-config BR2_PACKAGE_SAMBA_RPCCLIENT
+config BR2_PACKAGE_SAMBA3_RPCCLIENT
 	bool "rpcclient"
 	select BR2_PACKAGE_READLINE
 	default y
@@ -103,124 +84,124 @@ config BR2_PACKAGE_SAMBA_RPCCLIENT
 	  Tool for executing client side MS-RPC functions using RPC
 	  calls from a UNIX workstation.
 
-config BR2_PACKAGE_SAMBA_SMBCACLS
+config BR2_PACKAGE_SAMBA3_SMBCACLS
 	bool "smbcacls"
 	default y
 	help
 	  Set or get ACLs on an NT file or directory names
 
-config BR2_PACKAGE_SAMBA_SMBCLIENT
+config BR2_PACKAGE_SAMBA3_SMBCLIENT
 	bool "smbclient"
 	select BR2_PACKAGE_READLINE
 	default y
 	help
 	  ftp-like client to access SMB/CIFS resources on servers
 
-config BR2_PACKAGE_SAMBA_SMBCONTROL
+config BR2_PACKAGE_SAMBA3_SMBCONTROL
 	bool "smbcontrol"
 	default y
 	help
 	  Send messages to smbd, nmbd or winbindd processes
 
-config BR2_PACKAGE_SAMBA_SMBCQUOTAS
+config BR2_PACKAGE_SAMBA3_SMBCQUOTAS
 	bool "smbcquotas"
 	default y
 	help
 	  Set or get QUOTAs of NTFS 5 shares
 
-config BR2_PACKAGE_SAMBA_SMBD
+config BR2_PACKAGE_SAMBA3_SMBD
 	bool "smbd"
 	default y
 	help
 	  The server daemon that provides filesharing and printing services
 
-config BR2_PACKAGE_SAMBA_SMBGET
+config BR2_PACKAGE_SAMBA3_SMBGET
 	bool "smbget"
 	default y
 	help
 	  wget-like utility for download files over SMB
 
-config BR2_PACKAGE_SAMBA_SMBLDBTOOLS
+config BR2_PACKAGE_SAMBA3_SMBLDBTOOLS
 	bool "smbldbtools"
 	default y
 	help
 	  ldbadd ldbdel ldbedit ldbmodify ldbrename ldbsearch tools
 
-config BR2_PACKAGE_SAMBA_SMBPASSWD
+config BR2_PACKAGE_SAMBA3_SMBPASSWD
 	bool "smbpasswd"
 	default y
 	help
 	  Change a user's SMB passwd
 
-config BR2_PACKAGE_SAMBA_SMBSHARESEC
+config BR2_PACKAGE_SAMBA3_SMBSHARESEC
 	bool "smbsharesec"
 	default y
 	help
 	  Manipulate share permissions on SMB file shares
 
-config BR2_PACKAGE_SAMBA_SMBSPOOL
+config BR2_PACKAGE_SAMBA3_SMBSPOOL
 	bool "smbspool"
 	default y
 	help
 	  Send a print file to an SMB printer
 
-config BR2_PACKAGE_SAMBA_SMBSTATUS
+config BR2_PACKAGE_SAMBA3_SMBSTATUS
 	bool "smbstatus"
 	default y
 	help
 	  Report on current Samba connections
 
-config BR2_PACKAGE_SAMBA_SMBTREE
+config BR2_PACKAGE_SAMBA3_SMBTREE
 	bool "smbtree"
 	default y
 	help
 	  A text based smb network browser
 
-config BR2_PACKAGE_SAMBA_SWAT
+config BR2_PACKAGE_SAMBA3_SWAT
 	bool "swat"
 	default y
 	help
 	  Samba Web Administration Tool
 
-config BR2_PACKAGE_SAMBA_SMBTA_UTIL
+config BR2_PACKAGE_SAMBA3_SMBTA_UTIL
 	bool "smbta-util"
 	default y
 	help
 	  Tool to ease the configuration of the vfs_smb_traffic_analyzer
 	  module regarding data encryption.
 
-config BR2_PACKAGE_SAMBA_SMBTAR
+config BR2_PACKAGE_SAMBA3_SMBTAR
 	bool "smbtar"
 	default y
-	depends on BR2_PACKAGE_SAMBA_SMBCLIENT
+	depends on BR2_PACKAGE_SAMBA3_SMBCLIENT
 	help
 	  tar-like script that wraps smbclient
 
 comment "smbtar        - disabled (requires smbclient)"
-	depends on !BR2_PACKAGE_SAMBA_SMBCLIENT
+	depends on !BR2_PACKAGE_SAMBA3_SMBCLIENT
 
-config BR2_PACKAGE_SAMBA_TDB
+config BR2_PACKAGE_SAMBA3_TDB
 	bool "tdb"
 	default y
 	help
 	  Tools to operate on the .tdb database files
 
-config BR2_PACKAGE_SAMBA_TESTPARM
+config BR2_PACKAGE_SAMBA3_TESTPARM
 	bool "testparm"
 	default y
 	help
 	  Check an smb.conf configuration file for internal correctness
 
-config BR2_PACKAGE_SAMBA_WINBINDD
+config BR2_PACKAGE_SAMBA3_WINBINDD
 	bool "winbindd"
 	default y
 	help
 	  Name Service Switch daemon for resolving names from NT servers
 
-config BR2_PACKAGE_SAMBA_WBINFO
+config BR2_PACKAGE_SAMBA3_WBINFO
 	bool "wbinfo"
 	default y
-	depends on BR2_PACKAGE_SAMBA_WINBINDD
+	depends on BR2_PACKAGE_SAMBA3_WINBINDD
 	help
 	  Query information from winbind daemon
 
@@ -229,7 +210,7 @@ endmenu
 
 menu "Samba libraries selection"
 
-config BR2_PACKAGE_SAMBA_LIBSMBCLIENT
+config BR2_PACKAGE_SAMBA3_LIBSMBCLIENT
 	bool "libsmbclient"
 	help
 	  libsmbclient is a library toolset that permits applications
@@ -242,7 +223,7 @@ endmenu
 
 menu "Samba support selection"
 
-config BR2_PACKAGE_SAMBA_AVAHI
+config BR2_PACKAGE_SAMBA3_AVAHI
 	bool "support avahi"
 	default y
 	depends on BR2_PACKAGE_AVAHI_DAEMON
@@ -255,7 +236,7 @@ comment "support avahi - disabled (requires avahi-daemon)"
 	depends on BR2_USE_MMU
 	depends on !BR2_PACKAGE_AVAHI_DAEMON
 
-config BR2_PACKAGE_SAMBA_GAMIN
+config BR2_PACKAGE_SAMBA3_GAMIN
 	bool "support gamin"
 	default y
 	depends on BR2_PACKAGE_GAMIN
diff --git a/package/samba/S91smb b/package/samba/samba3/S91smb
similarity index 100%
rename from package/samba/S91smb
rename to package/samba/samba3/S91smb
diff --git a/package/samba/samba-fix-smbd-libs-avahi.patch b/package/samba/samba3/samba3-0001-fix-smbd-libs-avahi.patch
similarity index 100%
rename from package/samba/samba-fix-smbd-libs-avahi.patch
rename to package/samba/samba3/samba3-0001-fix-smbd-libs-avahi.patch
diff --git a/package/samba/samba-getaddrinfo.patch b/package/samba/samba3/samba3-0002-getaddrinfo.patch
similarity index 100%
rename from package/samba/samba-getaddrinfo.patch
rename to package/samba/samba3/samba3-0002-getaddrinfo.patch
diff --git a/package/samba/samba3/samba3.mk b/package/samba/samba3/samba3.mk
new file mode 100644
index 0000000..673d737
--- /dev/null
+++ b/package/samba/samba3/samba3.mk
@@ -0,0 +1,181 @@
+################################################################################
+#
+# samba3
+#
+################################################################################
+
+SAMBA3_VERSION = 3.6.22
+SAMBA3_SITE = http://ftp.samba.org/pub/samba/stable
+SAMBA3_SOURCE = samba-$(SAMBA3_VERSION).tar.gz
+SAMBA3_SUBDIR = source3
+SAMBA3_INSTALL_STAGING = YES
+SAMBA3_LICENSE = GPLv3+
+SAMBA3_LICENSE_FILES = COPYING
+
+SAMBA3_DEPENDENCIES = popt \
+	$(if $(BR2_PACKAGE_SAMBA3_RPCCLIENT),readline) \
+	$(if $(BR2_PACKAGE_SAMBA3_SMBCLIENT),readline) \
+	$(if $(BR2_PACKAGE_SAMBA3_AVAHI),avahi) \
+	$(if $(BR2_PACKAGE_SAMBA3_GAMIN),gamin)
+
+SAMBA3_CONF_ENV = \
+	ac_cv_file__proc_sys_kernel_core_pattern=yes \
+	samba_cv_HAVE_GETTIMEOFDAY_TZ=yes \
+	samba_cv_USE_SETREUID=yes \
+	samba_cv_HAVE_KERNEL_OPLOCKS_LINUX=yes \
+	samba_cv_HAVE_IFACE_IFCONF=yes \
+	samba_cv_HAVE_MMAP=yes \
+	samba_cv_HAVE_FCNTL_LOCK=yes \
+	samba_cv_HAVE_SECURE_MKSTEMP=yes \
+	samba_cv_CC_NEGATIVE_ENUM_VALUES=yes \
+	samba_cv_fpie=no \
+	libreplace_cv_HAVE_IPV6=$(if $(BR2_INET_IPV6),yes,no) \
+	$(if $(BR2_PACKAGE_SAMBA3_AVAHI),AVAHI_LIBS=-pthread)
+
+SAMBA3_CONF_OPT = \
+	--localstatedir=/var \
+	--with-piddir=/var/run \
+	--with-lockdir=/var/lock \
+	--with-logfilebase=/var/log \
+	--with-configdir=/etc/samba \
+	--with-privatedir=/etc/samba \
+	\
+	--disable-cups \
+	--enable-shared-libs \
+	--disable-pie \
+	--disable-relro \
+	--disable-dnssd \
+	\
+	$(if $(BR2_PACKAGE_SAMBA3_AVAHI),--enable-avahi,--disable-avahi) \
+	$(if $(BR2_PACKAGE_SAMBA3_GAMIN),--enable-fam,--disable-fam) \
+	$(if $(BR2_PACKAGE_SAMBA3_SWAT),--enable-swat,--disable-swat) \
+	\
+	--without-cluster-support \
+	--without-dnsupdate \
+	--with-sys-quotas \
+	--without-ads \
+	--without-ldap \
+	--with-included-iniparser \
+	\
+	$(if $(BR2_PACKAGE_SAMBA3_RPCCLIENT),--with-readline=$(STAGING_DIR)) \
+	$(if $(BR2_PACKAGE_SAMBA3_SMBCLIENT),--with-readline=$(STAGING_DIR)) \
+	$(if $(BR2_PACKAGE_SAMBA3_WINBINDD),--with-winbind,--without-winbind)
+
+SAMBA3_INSTALL_TARGET_OPT = \
+	DESTDIR=$(TARGET_DIR) -C $(SAMBA3_DIR)/$(SAMBA3_SUBDIR) \
+	installlibs installservers installbin installscripts \
+	$(if $(BR2_PACKAGE_SAMBA3_SWAT),installswat)
+
+# binaries to keep
+SAMBA3_BINTARGETS_y = \
+	usr/sbin/smbd \
+	usr/lib/libtalloc.so \
+	usr/lib/libtdb.so
+
+# binaries to remove
+SAMBA3_BINTARGETS_ = \
+	usr/lib/libnetapi.so* \
+	usr/lib/libsmbsharemodes.so*
+
+# binaries to keep or remove
+SAMBA3_BINTARGETS_$(BR2_PACKAGE_SAMBA3_EVENTLOGADM) += usr/bin/eventlogadm
+SAMBA3_BINTARGETS_$(BR2_PACKAGE_SAMBA3_NET) += usr/bin/net
+SAMBA3_BINTARGETS_$(BR2_PACKAGE_SAMBA3_NMBD) += usr/sbin/nmbd
+SAMBA3_BINTARGETS_$(BR2_PACKAGE_SAMBA3_NMBLOOKUP) += usr/bin/nmblookup
+SAMBA3_BINTARGETS_$(BR2_PACKAGE_SAMBA3_NTLM_AUTH) += usr/bin/ntlm_auth
+SAMBA3_BINTARGETS_$(BR2_PACKAGE_SAMBA3_PDBEDIT) += usr/bin/pdbedit
+SAMBA3_BINTARGETS_$(BR2_PACKAGE_SAMBA3_PROFILES) += usr/bin/profiles
+SAMBA3_BINTARGETS_$(BR2_PACKAGE_SAMBA3_RPCCLIENT) += usr/bin/rpcclient
+SAMBA3_BINTARGETS_$(BR2_PACKAGE_SAMBA3_SMBCACLS) += usr/bin/smbcacls
+SAMBA3_BINTARGETS_$(BR2_PACKAGE_SAMBA3_SMBCLIENT) += usr/bin/smbclient
+SAMBA3_BINTARGETS_$(BR2_PACKAGE_SAMBA3_SMBCONTROL) += usr/bin/smbcontrol
+SAMBA3_BINTARGETS_$(BR2_PACKAGE_SAMBA3_SMBCQUOTAS) += usr/bin/smbcquotas
+SAMBA3_BINTARGETS_$(BR2_PACKAGE_SAMBA3_SMBD) += usr/sbin/smbd
+SAMBA3_BINTARGETS_$(BR2_PACKAGE_SAMBA3_SMBGET) += usr/bin/smbget
+SAMBA3_BINTARGETS_$(BR2_PACKAGE_SAMBA3_SMBLDBTOOLS) += usr/bin/ldbadd
+SAMBA3_BINTARGETS_$(BR2_PACKAGE_SAMBA3_SMBLDBTOOLS) += usr/bin/ldbdel
+SAMBA3_BINTARGETS_$(BR2_PACKAGE_SAMBA3_SMBLDBTOOLS) += usr/bin/ldbedit
+SAMBA3_BINTARGETS_$(BR2_PACKAGE_SAMBA3_SMBLDBTOOLS) += usr/bin/ldbmodify
+SAMBA3_BINTARGETS_$(BR2_PACKAGE_SAMBA3_SMBLDBTOOLS) += usr/bin/ldbrename
+SAMBA3_BINTARGETS_$(BR2_PACKAGE_SAMBA3_SMBLDBTOOLS) += usr/bin/ldbsearch
+SAMBA3_BINTARGETS_$(BR2_PACKAGE_SAMBA3_SMBPASSWD) += usr/bin/smbpasswd
+SAMBA3_BINTARGETS_$(BR2_PACKAGE_SAMBA3_SMBSHARESEC) += usr/bin/sharesec
+SAMBA3_BINTARGETS_$(BR2_PACKAGE_SAMBA3_SMBSPOOL) += usr/bin/smbspool
+SAMBA3_BINTARGETS_$(BR2_PACKAGE_SAMBA3_SMBSTATUS) += usr/bin/smbstatus
+SAMBA3_BINTARGETS_$(BR2_PACKAGE_SAMBA3_SMBTA_UTIL) += usr/bin/smbta-util
+SAMBA3_BINTARGETS_$(BR2_PACKAGE_SAMBA3_SMBTREE) += usr/bin/smbtree
+SAMBA3_BINTARGETS_$(BR2_PACKAGE_SAMBA3_SWAT) += usr/sbin/swat
+SAMBA3_BINTARGETS_$(BR2_PACKAGE_SAMBA3_TDB) += usr/bin/tdbbackup
+SAMBA3_BINTARGETS_$(BR2_PACKAGE_SAMBA3_TDB) += usr/bin/tdbdump
+SAMBA3_BINTARGETS_$(BR2_PACKAGE_SAMBA3_TDB) += usr/bin/tdbtool
+SAMBA3_BINTARGETS_$(BR2_PACKAGE_SAMBA3_TESTPARM) += usr/bin/testparm
+SAMBA3_BINTARGETS_$(BR2_PACKAGE_SAMBA3_WINBINDD) += usr/sbin/winbindd
+SAMBA3_BINTARGETS_$(BR2_PACKAGE_SAMBA3_WBINFO) += usr/bin/wbinfo
+
+# libraries to keep or remove
+SAMBA3_BINTARGETS_$(BR2_PACKAGE_SAMBA3_WINBINDD) += usr/lib/libwbclient.so*
+SAMBA3_BINTARGETS_$(BR2_PACKAGE_SAMBA3_LIBSMBCLIENT) += usr/lib/libsmbclient.so*
+
+# non-binaries to remove
+SAMBA3_TXTTARGETS_ = \
+	usr/include/libsmbclient.h \
+	usr/include/netapi.h \
+	usr/include/smb_share_modes.h \
+	usr/include/talloc.h \
+	usr/include/tdb.h \
+	usr/include/wbclient.h
+
+# non-binaries to keep or remove
+SAMBA3_TXTTARGETS_$(BR2_PACKAGE_SAMBA3_FINDSMB) += usr/bin/findsmb
+SAMBA3_TXTTARGETS_$(BR2_PACKAGE_SAMBA3_SMBTAR) += usr/bin/smbtar
+
+define SAMBA3_REMOVE_UNNEEDED_BINARIES
+	rm -f $(addprefix $(TARGET_DIR)/, $(SAMBA3_BINTARGETS_))
+	rm -f $(addprefix $(TARGET_DIR)/, $(SAMBA3_TXTTARGETS_))
+endef
+
+SAMBA3_POST_INSTALL_TARGET_HOOKS += SAMBA3_REMOVE_UNNEEDED_BINARIES
+
+define SAMBA3_REMOVE_SWAT_DOCUMENTATION
+	# Remove the documentation
+	rm -rf $(TARGET_DIR)/usr/swat/help/manpages
+	rm -rf $(TARGET_DIR)/usr/swat/help/Samba3*
+	rm -rf $(TARGET_DIR)/usr/swat/using_samba/
+	# Removing the welcome.html file will make swat default to
+	# welcome-no-samba-doc.html
+	rm -rf $(TARGET_DIR)/usr/swat/help/welcome.html
+endef
+
+# --with-libiconv="" is to avoid detecting host libiconv and build failure
+ifeq ($(BR2_PACKAGE_SAMBA3_LIBICONV),y)
+SAMBA3_DEPENDENCIES += libiconv
+SAMBA3_CONF_OPT += --with-libiconv=$(STAGING_DIR)
+else
+SAMBA3_CONF_OPT += --with-libiconv=""
+endif
+
+# Compiled debug messages by level
+SAMBA3_CONF_OPT += CFLAGS="$(TARGET_CFLAGS) -DMAX_DEBUG_LEVEL=$(BR2_PACKAGE_SAMBA3_MAX_DEBUGLEVEL)"
+
+ifeq ($(BR2_PACKAGE_SAMBA3_SWAT),y)
+ifneq ($(BR2_HAVE_DOCUMENTATION),y)
+SAMBA3_POST_INSTALL_TARGET_HOOKS += SAMBA3_REMOVE_SWAT_DOCUMENTATION
+endif
+endif
+
+define SAMBA3_INSTALL_INITSCRIPTS_CONFIG
+	# install start/stop script
+	@if [ ! -f $(TARGET_DIR)/etc/init.d/S91smb ]; then \
+		$(INSTALL) -m 0755 -D package/samba/samba3/S91smb \
+			$(TARGET_DIR)/etc/init.d/S91smb; \
+	fi
+	# install config
+	@if [ ! -f $(TARGET_DIR)/etc/samba/smb.conf ]; then \
+		$(INSTALL) -m 0755 -D package/samba/samba3/simple.conf \
+			$(TARGET_DIR)/etc/samba/smb.conf; \
+	fi
+endef
+
+SAMBA3_POST_INSTALL_TARGET_HOOKS += SAMBA3_INSTALL_INITSCRIPTS_CONFIG
+
+$(eval $(autotools-package))
diff --git a/package/samba/simple.conf b/package/samba/samba3/simple.conf
similarity index 100%
rename from package/samba/simple.conf
rename to package/samba/samba3/simple.conf
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH 4/4] samba4: new package
  2014-02-07 20:52 [Buildroot] [PATCH 0/4] Samba4 package Gustavo Zacarias
                   ` (2 preceding siblings ...)
  2014-02-07 20:52 ` [Buildroot] [PATCH 3/4] samba: convert to choice package Gustavo Zacarias
@ 2014-02-07 20:52 ` Gustavo Zacarias
  2014-02-07 22:29   ` Samuel Martin
  2014-02-08 14:30 ` [Buildroot] [PATCH 0/4] Samba4 package Christophe Vu-Brugier
  4 siblings, 1 reply; 15+ messages in thread
From: Gustavo Zacarias @ 2014-02-07 20:52 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
 package/samba/Config.in                            |  19 ++++
 package/samba/samba4/S91smb                        |  56 +++++++++++
 package/samba/samba4/arm-cache.txt                 |  65 ++++++++++++
 package/samba/samba4/powerpc-cache.txt             |  65 ++++++++++++
 ...-0001-build-don-t-execute-tests-summary.c.patch |  67 +++++++++++++
 ...ld-don-t-execute-statfs-and-f_fsid-checks.patch |  31 ++++++
 ...003-build-find-FILE_OFFSET_BITS-via-array.patch |  54 ++++++++++
 ...uild-allow-some-python-variable-overrides.patch |  45 +++++++++
 ...amba4-0005-builtin-heimdal-external-tools.patch |  42 ++++++++
 package/samba/samba4/samba4.mk                     | 111 +++++++++++++++++++++
 10 files changed, 555 insertions(+)
 create mode 100644 package/samba/samba4/S91smb
 create mode 100644 package/samba/samba4/arm-cache.txt
 create mode 100644 package/samba/samba4/powerpc-cache.txt
 create mode 100644 package/samba/samba4/samba4-0001-build-don-t-execute-tests-summary.c.patch
 create mode 100644 package/samba/samba4/samba4-0002-build-don-t-execute-statfs-and-f_fsid-checks.patch
 create mode 100644 package/samba/samba4/samba4-0003-build-find-FILE_OFFSET_BITS-via-array.patch
 create mode 100644 package/samba/samba4/samba4-0004-build-allow-some-python-variable-overrides.patch
 create mode 100644 package/samba/samba4/samba4-0005-builtin-heimdal-external-tools.patch
 create mode 100644 package/samba/samba4/samba4.mk

diff --git a/package/samba/Config.in b/package/samba/Config.in
index d11401f..e037dd9 100644
--- a/package/samba/Config.in
+++ b/package/samba/Config.in
@@ -25,8 +25,27 @@ choice
 	help
 	  The well-tested legacy branch.
 
+	config BR2_PACKAGE_SAMBA4
+	bool "4.1.x"
+	depends on BR2_INET_IPV6
+	depends on BR2_USE_WCHAR # e2fsprogs
+	depends on BR2_LARGEFILE
+	# Supported architectures only limited by the cached answers
+	depends on BR2_arm || BR2_powerpc
+	select BR2_PACKAGE_E2FSPROGS
+	select BR2_PACKAGE_POPT
+	select BR2_PACKAGE_PYTHON
+	select BR2_PACKAGE_ZLIB
+	help
+	  The new branch with support for the SMB3 protocol.
+
 endchoice
 
 endif
 
 source "package/samba/samba3/Config.in"
+
+comment "samba4 needs a toolchain w/ IPv6, wchar, largfile, threads"
+	depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_LARGEFILE || \
+		!BR2_USE_WCHAR || !BR2_INET_IPV6
+	depends on BR2_USE_MMU
diff --git a/package/samba/samba4/S91smb b/package/samba/samba4/S91smb
new file mode 100644
index 0000000..0cd0057
--- /dev/null
+++ b/package/samba/samba4/S91smb
@@ -0,0 +1,56 @@
+#!/bin/sh
+
+[ -f /etc/samba/smb.conf ] || exit 0
+
+mkdir -p /var/log/samba
+
+start() {
+	echo -n "Starting SMB services: "
+	smbd -D
+	[ $? == 0 ] && echo "OK" || echo "FAIL"
+
+	echo -n "Starting NMB services: "
+	nmbd -D
+	[ $? == 0 ] && echo "OK" || echo "FAIL"
+}
+
+stop() {
+	echo -n "Shutting down SMB services: "
+	kill -9 `pidof smbd`
+	[ $? == 0 ] && echo "OK" || echo "FAIL"
+
+	echo -n "Shutting down NMB services: "
+	kill -9 `pidof nmbd`
+	[ $? == 0 ] && echo "OK" || echo "FAIL"
+}
+
+restart() {
+	stop
+	start
+}
+
+reload() {
+        echo -n "Reloading smb.conf file: "
+	kill -HUP `pidof smbd`
+	[ $? == 0 ] && echo "OK" || echo "FAIL"
+}
+
+case "$1" in
+  start)
+  	start
+	;;
+  stop)
+  	stop
+	;;
+  restart)
+  	restart
+	;;
+  reload)
+  	reload
+	;;
+  *)
+	echo "Usage: $0 {start|stop|restart|reload}"
+	exit 1
+esac
+
+exit $?
diff --git a/package/samba/samba4/arm-cache.txt b/package/samba/samba4/arm-cache.txt
new file mode 100644
index 0000000..70b19e3
--- /dev/null
+++ b/package/samba/samba4/arm-cache.txt
@@ -0,0 +1,65 @@
+Checking simple C program: OK
+rpath library support: OK
+-Wl,--version-script support: OK
+Checking getconf LFS_CFLAGS: NO
+Checking for large file support without additional flags: OK
+Checking for -D_LARGE_FILES: OK
+Checking correct behavior of strtoll: NO
+Checking for working strptime: OK
+Checking for C99 vsnprintf: OK
+Checking for HAVE_SHARED_MMAP: OK
+Checking for HAVE_MREMAP: OK
+Checking for HAVE_INCOHERENT_MMAP: NO
+Checking for HAVE_SECURE_MKSTEMP: OK
+Checking for HAVE_IFACE_GETIFADDRS: OK
+Checking for HAVE_LITTLE_ENDIAN - runtime: OK
+Checking for HAVE_BIG_ENDIAN - runtime: NO
+Checking for kernel change notify support: OK
+Checking for Linux kernel oplocks: OK
+Checking for kernel share modes: OK
+Checking whether blkcnt_t is 32 bit: NO
+Checking whether blkcnt_t is 64 bit: OK
+Checking if can we convert from CP850 to UCS-2LE: OK
+Checking if can we convert from UTF-8 to UCS-2LE: OK
+Checking whether we can use Linux thread-specific credentials with 32-bit system calls: OK
+Checking whether we can use Linux thread-specific credentials: OK
+Checking whether setreuid is available: OK
+Checking whether setresuid is available: OK
+Checking whether seteuid is available: OK
+Checking whether fcntl locking is available: OK
+Checking for the maximum value of the 'time_t' type: OK
+Checking whether the realpath function allows a NULL argument: OK
+Checking whether POSIX capabilities are available: OK
+Checking for ftruncate extend: OK
+getcwd takes a NULL argument: OK
+Checking uname sysname type: "Linux"
+Checking uname machine type: "arm"
+Checking uname release type: "3.0.0"
+Checking uname version type: "#1 Tue Nov 1 12:34:56 UTC 2013"
+Checking for WORDS_BIGENDIAN: NO
+Checking size of bool: "1"
+Checking size of char: "1"
+Checking size of int: "4"
+Checking size of long long: "8"
+Checking size of long: "4"
+Checking size of short: "2"
+Checking size of size_t: "4"
+Checking size of ssize_t: "4"
+Checking size of int8_t: "1"
+Checking size of uint8_t: "1"
+Checking size of int16_t: "2"
+Checking size of uint16_t: "2"
+Checking size of int32_t: "4"
+Checking size of uint32_t: "4"
+Checking size of int64_t: "8"
+Checking size of uint64_t: "8"
+Checking size of void*: "4"
+Checking size of off_t: "8"
+Checking size of dev_t: "8"
+Checking size of ino_t: "8"
+Checking size of time_t: "4"
+Checking size of ((struct utmp *)NULL)->ut_line: "32"
+Checking value of NSIG: "65"
+Checking value of _NSIG: "65"
+Checking value of SIGRTMAX: "64"
+Checking value of SIGRTMIN: "34"
diff --git a/package/samba/samba4/powerpc-cache.txt b/package/samba/samba4/powerpc-cache.txt
new file mode 100644
index 0000000..2872d1d
--- /dev/null
+++ b/package/samba/samba4/powerpc-cache.txt
@@ -0,0 +1,65 @@
+Checking simple C program: OK
+rpath library support: OK
+-Wl,--version-script support: OK
+Checking getconf LFS_CFLAGS: NO
+Checking for large file support without additional flags: OK
+Checking for -D_LARGE_FILES: OK
+Checking correct behavior of strtoll: NO
+Checking for working strptime: OK
+Checking for C99 vsnprintf: OK
+Checking for HAVE_SHARED_MMAP: OK
+Checking for HAVE_MREMAP: OK
+Checking for HAVE_INCOHERENT_MMAP: NO
+Checking for HAVE_SECURE_MKSTEMP: OK
+Checking for HAVE_IFACE_GETIFADDRS: OK
+Checking for HAVE_LITTLE_ENDIAN - runtime: NO
+Checking for HAVE_BIG_ENDIAN - runtime: OK
+Checking for kernel change notify support: OK
+Checking for Linux kernel oplocks: OK
+Checking for kernel share modes: OK
+Checking whether blkcnt_t is 32 bit: NO
+Checking whether blkcnt_t is 64 bit: OK
+Checking if can we convert from CP850 to UCS-2LE: OK
+Checking if can we convert from UTF-8 to UCS-2LE: OK
+Checking whether we can use Linux thread-specific credentials with 32-bit system calls: OK
+Checking whether we can use Linux thread-specific credentials: OK
+Checking whether setreuid is available: OK
+Checking whether setresuid is available: OK
+Checking whether seteuid is available: OK
+Checking whether fcntl locking is available: OK
+Checking for the maximum value of the 'time_t' type: OK
+Checking whether the realpath function allows a NULL argument: OK
+Checking whether POSIX capabilities are available: OK
+Checking for ftruncate extend: OK
+getcwd takes a NULL argument: OK
+Checking uname sysname type: "Linux"
+Checking uname machine type: "powerpc"
+Checking uname release type: "3.0.0"
+Checking uname version type: "#1 Tue Nov 1 12:34:56 UTC 2013"
+Checking for WORDS_BIGENDIAN: OK
+Checking size of bool: "1"
+Checking size of char: "1"
+Checking size of int: "4"
+Checking size of long long: "8"
+Checking size of long: "4"
+Checking size of short: "2"
+Checking size of size_t: "4"
+Checking size of ssize_t: "4"
+Checking size of int8_t: "1"
+Checking size of uint8_t: "1"
+Checking size of int16_t: "2"
+Checking size of uint16_t: "2"
+Checking size of int32_t: "4"
+Checking size of uint32_t: "4"
+Checking size of int64_t: "8"
+Checking size of uint64_t: "8"
+Checking size of void*: "4"
+Checking size of off_t: "8"
+Checking size of dev_t: "8"
+Checking size of ino_t: "8"
+Checking size of time_t: "4"
+Checking size of ((struct utmp *)NULL)->ut_line: "32"
+Checking value of NSIG: "65"
+Checking value of _NSIG: "65"
+Checking value of SIGRTMAX: "64"
+Checking value of SIGRTMIN: "34"
diff --git a/package/samba/samba4/samba4-0001-build-don-t-execute-tests-summary.c.patch b/package/samba/samba4/samba4-0001-build-don-t-execute-tests-summary.c.patch
new file mode 100644
index 0000000..ee9a46f
--- /dev/null
+++ b/package/samba/samba4/samba4-0001-build-don-t-execute-tests-summary.c.patch
@@ -0,0 +1,67 @@
+From 960d710ee5410a5c03815a5ce6837203be00d218 Mon Sep 17 00:00:00 2001
+From: Gustavo Zacarias <gustavo@zacarias.com.ar>
+Date: Thu, 30 Jan 2014 11:14:27 -0300
+Subject: [PATCH 1/3] build: don't execute tests/summary.c
+
+tests/summary.c will never be able to be executed when cross compiling.
+Use #error and #warning directives to fail or warn accordingly when
+compiling it.
+
+Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
+---
+ tests/summary.c | 14 +++++---------
+ wscript         |  1 -
+ 2 files changed, 5 insertions(+), 10 deletions(-)
+
+diff --git a/tests/summary.c b/tests/summary.c
+index 27f7d4d..0843ee2 100644
+--- a/tests/summary.c
++++ b/tests/summary.c
+@@ -5,27 +5,23 @@ void exit(int);
+ int main()
+ {
+ #if !defined(HAVE_FCNTL_LOCK)
+-	printf("ERROR: No locking available. Running Samba would be unsafe\n");
+-	exit(1);
++#error "ERROR: No locking available. Running Samba would be unsafe"
+ #endif
+ 
+ #if !(defined(HAVE_IFACE_GETIFADDRS) || defined(HAVE_IFACE_IFCONF) || defined(HAVE_IFACE_IFREQ) || defined(HAVE_IFACE_AIX))
+-	printf("WARNING: No automated network interface determination\n");
++#warning "WARNING: No automated network interface determination"
+ #endif
+ 
+ #if !(defined(USE_SETEUID) || defined(USE_SETREUID) || defined(USE_SETRESUID) || defined(USE_SETUIDX) || defined(USE_LINUX_THREAD_CREDENTIALS))
+-	printf("ERROR: no seteuid method available\n");
+-	exit(1);
++#error "ERROR: no seteuid method available"
+ #endif
+ 
+ #if !(defined(STAT_STATVFS) || defined(STAT_STATFS3_OSF1) || defined(STAT_STATFS2_BSIZE) || defined(STAT_STATFS4) || defined(STAT_STATFS2_FSIZE) || defined(STAT_STATFS2_FS_DATA))
+-	printf("ERROR: No disk free routine!\n");
+-	exit(1);
++#error "ERROR: No disk free routine!"
+ #endif
+ 
+ #if !((defined(HAVE_RANDOM) || defined(HAVE_RAND)) && (defined(HAVE_SRANDOM) || defined(HAVE_SRAND)))
+-    printf("ERROR: No random or srandom routine!\n");
+-    exit(1);
++#error "ERROR: No random or srandom routine!"
+ #endif
+ 
+ 	exit(0);
+diff --git a/wscript b/wscript
+index 47b7b50..26431a4 100644
+--- a/wscript
++++ b/wscript
+@@ -170,7 +170,6 @@ def configure(conf):
+     if not conf.CHECK_CODE('#include "tests/summary.c"',
+                            define='SUMMARY_PASSES',
+                            addmain=False,
+-                           execute=True,
+                            msg='Checking configure summary'):
+         raise Utils.WafError('configure summary failed')
+     
+-- 
+1.8.3.2
+
diff --git a/package/samba/samba4/samba4-0002-build-don-t-execute-statfs-and-f_fsid-checks.patch b/package/samba/samba4/samba4-0002-build-don-t-execute-statfs-and-f_fsid-checks.patch
new file mode 100644
index 0000000..ea8ead8
--- /dev/null
+++ b/package/samba/samba4/samba4-0002-build-don-t-execute-statfs-and-f_fsid-checks.patch
@@ -0,0 +1,31 @@
+From 3c16a171c008b584ed427988dde73c1d9a9de4ad Mon Sep 17 00:00:00 2001
+From: Gustavo Zacarias <gustavo@zacarias.com.ar>
+Date: Mon, 20 Jan 2014 10:17:19 -0300
+Subject: [PATCH 2/3] build: don't execute statfs and f_fsid checks
+
+There's no need to execute the statfs and statfs.f_fsid checks, the
+return value is of no consequence since it's undefined in some
+platforms and prevents cross-compiling.
+
+Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
+---
+ source3/wscript | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/source3/wscript b/source3/wscript
+index 501707b..2d0a62e 100644
+--- a/source3/wscript
++++ b/source3/wscript
+@@ -468,8 +468,7 @@ return acl_get_perm_np(permset_d, perm);
+     conf.CHECK_CODE('struct statfs fsd; fsid_t fsid = fsd.f_fsid; return statfs(".", &fsd);',
+                     'HAVE_STATFS_F_FSID',
+                     msg="vfs_fileid: checking for statfs() and struct statfs.f_fsid",
+-                    headers='sys/types.h sys/statfs.h',
+-                    execute=True)
++                    headers='sys/types.h sys/statfs.h')
+ 
+     if conf.CONFIG_SET('HAVE_FALLOCATE'):
+         conf.CHECK_CODE('''
+-- 
+1.8.3.2
+
diff --git a/package/samba/samba4/samba4-0003-build-find-FILE_OFFSET_BITS-via-array.patch b/package/samba/samba4/samba4-0003-build-find-FILE_OFFSET_BITS-via-array.patch
new file mode 100644
index 0000000..49875eb
--- /dev/null
+++ b/package/samba/samba4/samba4-0003-build-find-FILE_OFFSET_BITS-via-array.patch
@@ -0,0 +1,54 @@
+From 16d88e7813a7739c070a7a1cf6388fd4f236fd99 Mon Sep 17 00:00:00 2001
+From: Gustavo Zacarias <gustavo@zacarias.com.ar>
+Date: Fri, 31 Jan 2014 06:45:18 -0300
+Subject: [PATCHv2] build: find FILE_OFFSET_BITS via array
+
+This makes cross-compiling happy, use a trick similar to autoconf's
+AC_CHECK_SIZEOF macro.
+Basically we make an array:
+
+static int array[1 - 2 * !(((long int)(sizeof(off_t))) < 8)];
+
+This gives -1 multiplied by the negation of the condition
+(sizeof(off_t) < 8) cast to a long int.
+So if the condition is true it gives array[(-1 * 0)] (remember the
+condition is cast and negated) thus passing a build test with a 0-sized
+array.
+If it's false it gives array[(-1 * 1)] thus failing with a
+negative-sized array.
+
+Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
+---
+ lib/ccan/wscript | 11 +++++++----
+ 1 file changed, 7 insertions(+), 4 deletions(-)
+
+diff --git a/lib/ccan/wscript b/lib/ccan/wscript
+index 59b8205..81039d0 100644
+--- a/lib/ccan/wscript
++++ b/lib/ccan/wscript
+@@ -127,15 +127,18 @@ def configure(conf):
+     # Only check for FILE_OFFSET_BITS=64 if off_t is normally small:
+     # use raw routines because wrappers include previous _GNU_SOURCE
+     # or _FILE_OFFSET_BITS defines.
++    # The math for these tests is:
++    # array[-1 * !((int)(condition)) ] (condition is true) = array[0] = builds
++    # array[-1 * !((int)(condition)) ] (condition is false) = array[-1] = fails
+     conf.check(fragment="""#include <sys/types.h>
+-               int main(void) { return !(sizeof(off_t) < 8); }""",
+-               execute=True, msg='Checking for small off_t',
++               int main(void) { static int test_array[1 - 2 * !(((long int)(sizeof(off_t))) < 8)]; }""",
++               msg='Checking for small off_t',
+                define_name='SMALL_OFF_T')
+     # Unreliable return value above, hence use define.
+     if conf.CONFIG_SET('SMALL_OFF_T'):
+         conf.check(fragment="""#include <sys/types.h>
+-                   int main(void) { return !(sizeof(off_t) >= 8); }""",
+-                   execute=True, msg='Checking for -D_FILE_OFFSET_BITS=64',
++		   int main(void) { static int test_array[1 - 2 * !(((long int)(sizeof(off_t))) >= 8)]; }""",
++                   msg='Checking for -D_FILE_OFFSET_BITS=64',
+                    ccflags='-D_FILE_OFFSET_BITS=64',
+                    define_name='HAVE_FILE_OFFSET_BITS')
+ 
+-- 
+1.8.3.2
+
diff --git a/package/samba/samba4/samba4-0004-build-allow-some-python-variable-overrides.patch b/package/samba/samba4/samba4-0004-build-allow-some-python-variable-overrides.patch
new file mode 100644
index 0000000..21e6b78
--- /dev/null
+++ b/package/samba/samba4/samba4-0004-build-allow-some-python-variable-overrides.patch
@@ -0,0 +1,45 @@
+From fdbdf04a9ab3f3a204e95106c4f8f6729d0bab1a Mon Sep 17 00:00:00 2001
+From: Gustavo Zacarias <gustavo@zacarias.com.ar>
+Date: Tue, 4 Feb 2014 14:11:52 -0300
+Subject: [PATCH] build: allow some python variable overrides
+
+The python variables (settings) are fetched from a running python
+interpreter which usually isn't the target one when cross compiling,
+hence libraries and flags aren't the same and can pollute the target
+build.
+Allow some of these variables to be redefined via environment variables
+in order to aid cross-compiling.
+According to testing python_LDFLAGS and python_LIBDIR should be enough.
+
+Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
+---
+ buildtools/wafadmin/Tools/python.py | 13 +++++++++++++
+ 1 file changed, 13 insertions(+)
+
+diff --git a/buildtools/wafadmin/Tools/python.py b/buildtools/wafadmin/Tools/python.py
+index ab1e817..35c61c2 100644
+--- a/buildtools/wafadmin/Tools/python.py
++++ b/buildtools/wafadmin/Tools/python.py
+@@ -193,6 +193,19 @@ MACOSX_DEPLOYMENT_TARGET = %r
+ """ % (python, python_prefix, python_SO, python_SYSLIBS, python_LDFLAGS, python_SHLIBS,
+ 	python_LIBDIR, python_LIBPL, INCLUDEPY, Py_ENABLE_SHARED, python_MACOSX_DEPLOYMENT_TARGET))
+ 
++	# Allow some python overrides from env vars for cross-compiling
++	os_env = dict(os.environ)
++
++	override_python_LDFLAGS = os_env.get('python_LDFLAGS', None)
++	if override_python_LDFLAGS is not None:
++		conf.log.write("python_LDFLAGS override from environment = %r\n" % (override_python_LDFLAGS))
++		python_LDFLAGS = override_python_LDFLAGS
++
++	override_python_LIBDIR = os_env.get('python_LIBDIR', None)
++	if override_python_LIBDIR is not None:
++		conf.log.write("python_LIBDIR override from environment = %r\n" % (override_python_LIBDIR))
++		python_LIBDIR = override_python_LIBDIR
++
+ 	if python_MACOSX_DEPLOYMENT_TARGET:
+ 		conf.env['MACOSX_DEPLOYMENT_TARGET'] = python_MACOSX_DEPLOYMENT_TARGET
+ 		conf.environ['MACOSX_DEPLOYMENT_TARGET'] = python_MACOSX_DEPLOYMENT_TARGET
+-- 
+1.8.3.2
+
diff --git a/package/samba/samba4/samba4-0005-builtin-heimdal-external-tools.patch b/package/samba/samba4/samba4-0005-builtin-heimdal-external-tools.patch
new file mode 100644
index 0000000..bf0a715
--- /dev/null
+++ b/package/samba/samba4/samba4-0005-builtin-heimdal-external-tools.patch
@@ -0,0 +1,42 @@
+Force external asn1_compile and compile_et binaries.
+At the moment the samba bundled heimdal fails to build the tools for the host
+when cross-compiling, and it can't link to an external heimdal either.
+
+Status: working with samba upstream on a proper way to cross-compile
+the bundled heimdal.
+
+Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
+
+diff -Nura samba-4.1.3.orig/source4/heimdal_build/wscript_build samba-4.1.3.heimdal.cross/source4/heimdal_build/wscript_build
+--- samba-4.1.3.orig/source4/heimdal_build/wscript_build	2013-12-12 16:45:46.951965484 -0300
++++ samba-4.1.3.heimdal.cross/source4/heimdal_build/wscript_build	2013-12-18 22:01:24.323429945 -0300
+@@ -925,6 +925,8 @@
+         install=False
+     )
+     bld.env['ASN1_COMPILE'] = os.path.join(bld.env['BUILD_DIRECTORY'], 'asn1_compile')
++else:
++    bld.env['ASN1_COMPILE'] = 'asn1_compile'
+ 
+ 
+ if not bld.CONFIG_SET('USING_SYSTEM_COMPILE_ET'):
+@@ -939,6 +941,8 @@
+         install=False
+         )
+     bld.env['COMPILE_ET'] = os.path.join(bld.env['BUILD_DIRECTORY'], 'compile_et')
++else:
++    bld.env['COMPILE_ET'] = 'compile_et'
+ 
+ HEIMDAL_BINARY('samba4kinit',
+     'kuser/kinit.c',
+diff -Nura samba-4.1.3.orig/source4/heimdal_build/wscript_configure samba-4.1.3.heimdal.cross/source4/heimdal_build/wscript_configure
+--- samba-4.1.3.orig/source4/heimdal_build/wscript_configure	2013-12-12 16:45:46.951965484 -0300
++++ samba-4.1.3.heimdal.cross/source4/heimdal_build/wscript_configure	2013-12-18 21:55:08.813653187 -0300
+@@ -162,6 +162,8 @@
+ conf.define('HAVE_KRB5_PRINCIPAL_GET_NUM_COMP', 1)
+ conf.define('HAVE_GSSAPI_GSSAPI_SPNEGO_H', 1)
+ conf.define('HAVE_FLAGS_IN_KRB5_CREDS', 1)
++conf.define('USING_SYSTEM_ASN1_COMPILE', 1)
++conf.define('USING_SYSTEM_COMPILE_ET', 1)
+ 
+ heimdal_includedirs = []
+ heimdal_libdirs = []
diff --git a/package/samba/samba4/samba4.mk b/package/samba/samba4/samba4.mk
new file mode 100644
index 0000000..994f24b
--- /dev/null
+++ b/package/samba/samba4/samba4.mk
@@ -0,0 +1,111 @@
+################################################################################
+#
+# samba4
+#
+################################################################################
+
+SAMBA4_VERSION = 4.1.4
+SAMBA4_SITE = http://ftp.samba.org/pub/samba/stable
+SAMBA4_SOURCE = samba-$(SAMBA4_VERSION).tar.gz
+SAMBA4_LICENSE = GPLv3+
+SAMBA4_LICENSE_FILES = COPYING
+SAMBA4_DEPENDENCIES = host-e2fsprogs host-heimdal e2fsprogs popt python zlib \
+	$(if $(BR2_PACKAGE_LIBCAP),libcap)
+
+ifeq ($(BR2_PACKAGE_ACL),y)
+	SAMBA4_CONF_OPT += --with-acl-support
+	SAMBA4_DEPENDENCIES += acl
+else
+	SAMBA4_CONF_OPT += --without-acl-support
+endif
+
+ifeq ($(BR2_PACKAGE_LIBAIO),y)
+	SAMBA4_CONF_OPT += --with-aio-support
+	SAMBA4_DEPENDENCIES += libaio
+else
+	SAMBA4_CONF_OPT += --without-aio-support
+endif
+
+ifeq ($(BR2_PACKAGE_DBUS)$(BR2_PACKAGE_AVAHI_DAEMON),yy)
+	SAMBA4_CONF_OPT += --enable-avahi
+	SAMBA4_DEPENDENCIES += avahi
+else
+	SAMBA4_CONF_OPT += --disable-avahi
+endif
+
+ifeq ($(BR2_PACKAGE_GAMIN),y)
+	SAMBA4_CONF_OPT += --with-fam
+	SAMBA4_DEPENDENCIES += gamin
+else
+	SAMBA4_CONF_OPT += --without-fam
+endif
+
+ifeq ($(BR2_PACKAGE_GETTEXT),)
+	SAMBA4_DEPDENDENCIES += --without-gettext
+endif
+
+ifeq ($(BR2_PACKAGE_GNUTLS),y)
+	SAMBA4_CONF_OPT += --enable-gnutls
+	SAMBA4_DEPENDENCIES += gnutls
+else
+	SAMBA4_CONF_OPT += --disable-gnutls
+endif
+
+ifeq ($(BR2_PACKAGE_NCURSES_TARGET_FORM)$(BR2_PACKAGE_NCURSES_TARGET_MENU)$(BR2_PACKAGE_NCURSES_TARGET_PANEL),yyy)
+	SAMBA4_DEPENDENCIES += ncurses
+else
+	SAMBA4_CONF_OPT += --without-regedit
+endif
+
+define SAMBA4_CONFIGURE_CMDS
+	cp package/samba/samba4/$(call qstrip,$(BR2_ARCH))-cache.txt $(@D)/cache.txt;
+	(cd $(@D); \
+		PYTHON_CONFIG="$(STAGING_DIR)/usr/bin/python-config" \
+		python_LDFLAGS="" \
+		python_LIBDIR="" \
+		$(TARGET_CONFIGURE_OPTS) \
+		./buildtools/bin/waf configure \
+			--prefix=/usr \
+			--sysconfdir=/etc \
+			--localstatedir=/var \
+			--with-libiconv=$(STAGING_DIR)/usr \
+			--enable-fhs \
+			--cross-compile \
+			--cross-answers=$(@D)/cache.txt \
+			--hostcc=gcc \
+			--disable-rpath \
+			--disable-rpath-install \
+			--disable-cups \
+			--disable-iprint \
+			--without-pam \
+			--without-dmapi \
+			--without-gettext \
+			--disable-glusterfs \
+			--without-ldap \
+			--without-cluster-support \
+			--without-ads \
+			$(SAMBA4_CONF_OPT) \
+	)
+endef
+
+define SAMBA4_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
+endef
+
+define SAMBA4_INSTALL_TARGET_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install
+endef
+
+define SAMBA4_INSTALL_INIT_SYSV
+	$(INSTALL) -m 0755 -D package/samba/samba4/S91smb \
+		$(TARGET_DIR)/etc/init.d/S91smb
+endef
+
+# uClibc-based builds don't like libtalloc in /usr/lib/samba
+define SAMBA4_MOVE_TALLOC
+	mv -f $(TARGET_DIR)/usr/lib/samba/libtalloc* $(TARGET_DIR)/usr/lib
+endef
+
+SAMBA4_POST_INSTALL_TARGET_HOOKS += SAMBA4_MOVE_TALLOC
+
+$(eval $(generic-package))
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH 3/4] samba: convert to choice package
  2014-02-07 20:52 ` [Buildroot] [PATCH 3/4] samba: convert to choice package Gustavo Zacarias
@ 2014-02-07 22:20   ` Samuel Martin
  2014-02-10  6:48   ` Arnout Vandecappelle
  1 sibling, 0 replies; 15+ messages in thread
From: Samuel Martin @ 2014-02-07 22:20 UTC (permalink / raw)
  To: buildroot

Hi Gustavo,

On Fri, Feb 7, 2014 at 9:52 PM, Gustavo Zacarias
<gustavo@zacarias.com.ar> wrote:

[...]

> diff --git a/package/samba/Config.in b/package/samba/Config.in
> index 1469075..d11401f 100644
> --- a/package/samba/Config.in
> +++ b/package/samba/Config.in
> @@ -1,270 +1,32 @@
> +comment "samba needs a toolchain w/ threads"
> +       depends on BR2_USE_MMU
> +       depends on !BR2_TOOLCHAIN_HAS_THREADS
> +
>  config BR2_PACKAGE_SAMBA
>         bool "samba"
>         depends on BR2_TOOLCHAIN_HAS_THREADS
>         depends on BR2_USE_MMU # fork()
> -       select BR2_PACKAGE_POPT
>         help
> -         Provides print services to all manner of SMB/CIFS clients,
> -         including the numerous versions of Microsoft Windows
> -         operating systems.
> -
> -         http://www.samba.org/
> -
> -         NOTE: A complete Samba install takes over 50MB of space,
> -               so choose only the components you need.
> -
> -comment "samba needs a toolchain w/ threads"
> -       depends on BR2_USE_MMU
> -       depends on !BR2_TOOLCHAIN_HAS_THREADS
> +         Provides secure, stable and fast file and print services
> +         for all clients using the SMB/CIFS protocol, such as all versions
> +         of DOS and Windows, OS/2, Linux and many others.
>
>  if BR2_PACKAGE_SAMBA
>

[...]

> +choice
> +       prompt "Samba version"
> +       default BR2_PACKAGE_SAMBA3
>         help
> -         Tool for executing client side MS-RPC functions using RPC
> -         calls from a UNIX workstation.
> +         Select the desired samba version.
>

[...]

> +       config BR2_PACKAGE_SAMBA3
> +       bool "3.6.x"

Indentation is weird here, no?

> +       select BR2_PACKAGE_POPT
>         help
> -         Include support for gamin
> +         The well-tested legacy branch.
>
> -comment "support gamin - disabled (requires gamin)"
> -       depends on !BR2_PACKAGE_GAMIN
> -
> -endmenu
> +endchoice
>
>  endif


Regards,


-- 
Samuel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH 4/4] samba4: new package
  2014-02-07 20:52 ` [Buildroot] [PATCH 4/4] samba4: new package Gustavo Zacarias
@ 2014-02-07 22:29   ` Samuel Martin
  2014-02-08  0:00     ` Gustavo Zacarias
  0 siblings, 1 reply; 15+ messages in thread
From: Samuel Martin @ 2014-02-07 22:29 UTC (permalink / raw)
  To: buildroot

Hi Gustavo,

It would be great if you could repeat here some of the explanations about samba4
given in the cover letter, so they will appear in the commit log.

On Fri, Feb 7, 2014 at 9:52 PM, Gustavo Zacarias
<gustavo@zacarias.com.ar> wrote:
> Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
> ---
>  package/samba/Config.in                            |  19 ++++
>  package/samba/samba4/S91smb                        |  56 +++++++++++
>  package/samba/samba4/arm-cache.txt                 |  65 ++++++++++++
>  package/samba/samba4/powerpc-cache.txt             |  65 ++++++++++++
>  ...-0001-build-don-t-execute-tests-summary.c.patch |  67 +++++++++++++
>  ...ld-don-t-execute-statfs-and-f_fsid-checks.patch |  31 ++++++
>  ...003-build-find-FILE_OFFSET_BITS-via-array.patch |  54 ++++++++++
>  ...uild-allow-some-python-variable-overrides.patch |  45 +++++++++
>  ...amba4-0005-builtin-heimdal-external-tools.patch |  42 ++++++++
>  package/samba/samba4/samba4.mk                     | 111 +++++++++++++++++++++
>  10 files changed, 555 insertions(+)
>  create mode 100644 package/samba/samba4/S91smb
>  create mode 100644 package/samba/samba4/arm-cache.txt
>  create mode 100644 package/samba/samba4/powerpc-cache.txt
>  create mode 100644 package/samba/samba4/samba4-0001-build-don-t-execute-tests-summary.c.patch
>  create mode 100644 package/samba/samba4/samba4-0002-build-don-t-execute-statfs-and-f_fsid-checks.patch
>  create mode 100644 package/samba/samba4/samba4-0003-build-find-FILE_OFFSET_BITS-via-array.patch
>  create mode 100644 package/samba/samba4/samba4-0004-build-allow-some-python-variable-overrides.patch
>  create mode 100644 package/samba/samba4/samba4-0005-builtin-heimdal-external-tools.patch
>  create mode 100644 package/samba/samba4/samba4.mk
>
> diff --git a/package/samba/Config.in b/package/samba/Config.in
> index d11401f..e037dd9 100644
> --- a/package/samba/Config.in
> +++ b/package/samba/Config.in
> @@ -25,8 +25,27 @@ choice
>         help
>           The well-tested legacy branch.
>
> +       config BR2_PACKAGE_SAMBA4
> +       bool "4.1.x"

Indentation is weird here, no?

> +       depends on BR2_INET_IPV6
> +       depends on BR2_USE_WCHAR # e2fsprogs
> +       depends on BR2_LARGEFILE

Does not samba4 depend on !BR2_PREFER_STATIC_LIB too?
Last time I try to build/link statically a waf project (libtalloc
which is under the
samba umbrella IIRC), it was impossible because of waf build-system. :-/

> +       # Supported architectures only limited by the cached answers
> +       depends on BR2_arm || BR2_powerpc
> +       select BR2_PACKAGE_E2FSPROGS
> +       select BR2_PACKAGE_POPT
> +       select BR2_PACKAGE_PYTHON
> +       select BR2_PACKAGE_ZLIB
> +       help
> +         The new branch with support for the SMB3 protocol.
> +
>  endchoice
>
>  endif
>
>  source "package/samba/samba3/Config.in"
> +
> +comment "samba4 needs a toolchain w/ IPv6, wchar, largfile, threads"
> +       depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_LARGEFILE || \
> +               !BR2_USE_WCHAR || !BR2_INET_IPV6
> +       depends on BR2_USE_MMU

[...]

Regards,


-- 
Samuel

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH 4/4] samba4: new package
  2014-02-07 22:29   ` Samuel Martin
@ 2014-02-08  0:00     ` Gustavo Zacarias
  0 siblings, 0 replies; 15+ messages in thread
From: Gustavo Zacarias @ 2014-02-08  0:00 UTC (permalink / raw)
  To: buildroot

On 02/07/2014 07:29 PM, Samuel Martin wrote:

Hi Samuel.

> Indentation is weird here, no?

D'oh, happened when juggling things around to make them look good in the
menu itself. I'll fix it for V2.

> Does not samba4 depend on !BR2_PREFER_STATIC_LIB too?
> Last time I try to build/link statically a waf project (libtalloc
> which is under the
> samba umbrella IIRC), it was impossible because of waf build-system. :-/

Frankly, i don't know, the build fails before in some of the deps
(e2fsprogs like
http://autobuild.buildroot.net/results/284/284f2a161d110d4c561cf89c052ce531b4edc173/build-end.log)
libtalloc can be split out of samba, it's a separate project that both
samba3 & 4 can use.
There are other bits that could be split out as well such as tdb and
tevent, but since both samba versions can't live side by side and there
aren't any other packages that use them it's not very useful at the moment.
Regards.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH 0/4] Samba4 package
  2014-02-07 20:52 [Buildroot] [PATCH 0/4] Samba4 package Gustavo Zacarias
                   ` (3 preceding siblings ...)
  2014-02-07 20:52 ` [Buildroot] [PATCH 4/4] samba4: new package Gustavo Zacarias
@ 2014-02-08 14:30 ` Christophe Vu-Brugier
  2014-02-10 12:34   ` Thomas Petazzoni
  2014-02-11 11:59   ` Gustavo Zacarias
  4 siblings, 2 replies; 15+ messages in thread
From: Christophe Vu-Brugier @ 2014-02-08 14:30 UTC (permalink / raw)
  To: buildroot

Dear Gustavo Zacarias,

On Fri,  7 Feb 2014 17:52:30 -0300, Gustavo Zacarias wrote :
> This patchset adds a samba 4.1.x package to buildroot.

This is really great! Works well on ARM and on x86_64 with the
appropriate cross answers file.

Thanks!

-- 
Christophe Vu-Brugier

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH 3/4] samba: convert to choice package
  2014-02-07 20:52 ` [Buildroot] [PATCH 3/4] samba: convert to choice package Gustavo Zacarias
  2014-02-07 22:20   ` Samuel Martin
@ 2014-02-10  6:48   ` Arnout Vandecappelle
  2014-02-10 12:33     ` Thomas Petazzoni
  1 sibling, 1 reply; 15+ messages in thread
From: Arnout Vandecappelle @ 2014-02-10  6:48 UTC (permalink / raw)
  To: buildroot

On 02/07/14 21:52, Gustavo Zacarias wrote:
> Convert the classic samba package to a choice and move it to samba3 in
> preparation for the samba4 package.
> 
> Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>

 I don't like this rename. Why not keep the old samba package and add
samba4 to it? If side-by-side installation is not possible, make samba4
depend on !samba, like is done for qt5.

 If you do keep this rename, there are a few things you forgot:

- gvfs has a condition on BR2_PACKAGE_SAMBA_LIBSMBCLIENT;

- you need legacy options for all the samba suboptions.


 Regards,
 Arnout

-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH 3/4] samba: convert to choice package
  2014-02-10  6:48   ` Arnout Vandecappelle
@ 2014-02-10 12:33     ` Thomas Petazzoni
  0 siblings, 0 replies; 15+ messages in thread
From: Thomas Petazzoni @ 2014-02-10 12:33 UTC (permalink / raw)
  To: buildroot

Arnout, Gustavo,

On Mon, 10 Feb 2014 07:48:37 +0100, Arnout Vandecappelle wrote:
> On 02/07/14 21:52, Gustavo Zacarias wrote:
> > Convert the classic samba package to a choice and move it to samba3 in
> > preparation for the samba4 package.
> > 
> > Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
> 
>  I don't like this rename. Why not keep the old samba package and add
> samba4 to it? If side-by-side installation is not possible, make samba4
> depend on !samba, like is done for qt5.

Yes, I would also prefer to keep the Samba package named as it is
today, and introduce Samba 4.x as a separate package, without touching
the existing Samba 3.x support (except maybe changing the short
description, and adding the depends on !samba as suggested by Arnout).

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH 0/4] Samba4 package
  2014-02-08 14:30 ` [Buildroot] [PATCH 0/4] Samba4 package Christophe Vu-Brugier
@ 2014-02-10 12:34   ` Thomas Petazzoni
  2014-02-10 15:01     ` Christophe Vu-Brugier
  2014-02-11 11:59   ` Gustavo Zacarias
  1 sibling, 1 reply; 15+ messages in thread
From: Thomas Petazzoni @ 2014-02-10 12:34 UTC (permalink / raw)
  To: buildroot

Dear Christophe Vu-Brugier,

On Sat, 8 Feb 2014 15:30:54 +0100, Christophe Vu-Brugier wrote:

> On Fri,  7 Feb 2014 17:52:30 -0300, Gustavo Zacarias wrote :
> > This patchset adds a samba 4.1.x package to buildroot.
> 
> This is really great! Works well on ARM and on x86_64 with the
> appropriate cross answers file.

Can you share your cross answers file for x86-64 ? Gustavo patches only
support ARM and PowerPC, so it would be great to also support x86-64.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH 0/4] Samba4 package
  2014-02-10 12:34   ` Thomas Petazzoni
@ 2014-02-10 15:01     ` Christophe Vu-Brugier
  2014-02-10 15:05       ` Thomas Petazzoni
  0 siblings, 1 reply; 15+ messages in thread
From: Christophe Vu-Brugier @ 2014-02-10 15:01 UTC (permalink / raw)
  To: buildroot

Dear Thomas,

On Mon, 10 Feb 2014 13:34:32 +0100, Thomas Petazzoni wrote :
> Can you share your cross answers file for x86-64 ? Gustavo patches only
> support ARM and PowerPC, so it would be great to also support x86-64.

I sent the patch to the list, but not as a reply to Gustavo Zacarias'
patchset. The subject of the mail that contains the patch is:

  [PATCH] samba4: add cross answers for x86_64

Best regards,

-- 
Christophe Vu-Brugier

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH 0/4] Samba4 package
  2014-02-10 15:01     ` Christophe Vu-Brugier
@ 2014-02-10 15:05       ` Thomas Petazzoni
  0 siblings, 0 replies; 15+ messages in thread
From: Thomas Petazzoni @ 2014-02-10 15:05 UTC (permalink / raw)
  To: buildroot

Dear Christophe Vu-Brugier,

On Mon, 10 Feb 2014 16:01:49 +0100, Christophe Vu-Brugier wrote:

> On Mon, 10 Feb 2014 13:34:32 +0100, Thomas Petazzoni wrote :
> > Can you share your cross answers file for x86-64 ? Gustavo patches only
> > support ARM and PowerPC, so it would be great to also support x86-64.
> 
> I sent the patch to the list, but not as a reply to Gustavo Zacarias'
> patchset. The subject of the mail that contains the patch is:
> 
>   [PATCH] samba4: add cross answers for x86_64

Yep, sorry. Seen your patch after sending mine. As usual, this is a
problem with my somewhat FIFO policy when handling the backlog of
e-mail: I might make a comment that has already been fixed or addressed
in a future version of the patch series.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH 0/4] Samba4 package
  2014-02-08 14:30 ` [Buildroot] [PATCH 0/4] Samba4 package Christophe Vu-Brugier
  2014-02-10 12:34   ` Thomas Petazzoni
@ 2014-02-11 11:59   ` Gustavo Zacarias
  1 sibling, 0 replies; 15+ messages in thread
From: Gustavo Zacarias @ 2014-02-11 11:59 UTC (permalink / raw)
  To: buildroot

On 02/08/2014 11:30 AM, Christophe Vu-Brugier wrote:

> This is really great! Works well on ARM and on x86_64 with the
> appropriate cross answers file.

Thanks, i've sent a v2 patchset with some slight changes based on feedback.
Since the samba4 directory moved you'll need to rebase the patch to
enable x86_64 support, care to send an updated one?
Thanks!
Regards.

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2014-02-11 11:59 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-07 20:52 [Buildroot] [PATCH 0/4] Samba4 package Gustavo Zacarias
2014-02-07 20:52 ` [Buildroot] [PATCH 1/4] python: fixup python-config script Gustavo Zacarias
2014-02-07 20:52 ` [Buildroot] [PATCH 2/4] heimdal: new package Gustavo Zacarias
2014-02-07 20:52 ` [Buildroot] [PATCH 3/4] samba: convert to choice package Gustavo Zacarias
2014-02-07 22:20   ` Samuel Martin
2014-02-10  6:48   ` Arnout Vandecappelle
2014-02-10 12:33     ` Thomas Petazzoni
2014-02-07 20:52 ` [Buildroot] [PATCH 4/4] samba4: new package Gustavo Zacarias
2014-02-07 22:29   ` Samuel Martin
2014-02-08  0:00     ` Gustavo Zacarias
2014-02-08 14:30 ` [Buildroot] [PATCH 0/4] Samba4 package Christophe Vu-Brugier
2014-02-10 12:34   ` Thomas Petazzoni
2014-02-10 15:01     ` Christophe Vu-Brugier
2014-02-10 15:05       ` Thomas Petazzoni
2014-02-11 11:59   ` Gustavo Zacarias

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.