summaryrefslogtreecommitdiffstats
path: root/source/n/samba
diff options
context:
space:
mode:
Diffstat (limited to 'source/n/samba')
-rw-r--r--source/n/samba/doinst.sh1
-rwxr-xr-xsource/n/samba/prune-samba.sh33
-rw-r--r--source/n/samba/pytalloc-util.pc11
-rwxr-xr-xsource/n/samba/samba.SlackBuild152
-rw-r--r--source/n/samba/smb.conf.default70
-rw-r--r--source/n/samba/smb.conf.default.orig70
-rw-r--r--source/n/samba/smb.conf.diff8
-rw-r--r--source/n/samba/talloc.pc6
8 files changed, 139 insertions, 212 deletions
diff --git a/source/n/samba/doinst.sh b/source/n/samba/doinst.sh
index c7b358ed1..eb2b0b58c 100644
--- a/source/n/samba/doinst.sh
+++ b/source/n/samba/doinst.sh
@@ -11,6 +11,7 @@ config() {
# Otherwise, we leave the .new copy for the admin to consider...
}
config etc/rc.d/rc.samba.new
+config etc/samba/lmhosts.new
# This won't be needed. The point here is to preserve the permissions of the existing
# file, if there is one. I don't see major new development happening in rc.samba... ;-)
rm -f etc/rc.d/rc.samba.new
diff --git a/source/n/samba/prune-samba.sh b/source/n/samba/prune-samba.sh
deleted file mode 100755
index a6106df33..000000000
--- a/source/n/samba/prune-samba.sh
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/sh
-
-# Copyright 2010 Patrick J. Volkerding, Sebeka, Minnesota, USA
-# All rights reserved.
-#
-# Redistribution and use of this script, with or without modification, is
-# permitted provided that the following conditions are met:
-#
-# 1. Redistributions of this script must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
-# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
-# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-# Pare down the Samba sources to just Samba3 for now, and drop redundant docs.
-# This script expects the samba sources to be unpacked in the current
-# directory. It will then "pare" them. You'll be expected to repack them
-# afterwards.
-
-cd samba-?.?.? || cd samba-?.?.?? || exit 1
-
-rm --verbose WHATSNEW4.txt howto-ol-backend-s4.txt howto4.txt prog_guide4.txt
-rm -r --verbose docs-xml packaging4 source4 swat2*
-rm --verbose docs/*.pdf
-
diff --git a/source/n/samba/pytalloc-util.pc b/source/n/samba/pytalloc-util.pc
new file mode 100644
index 000000000..800a9a815
--- /dev/null
+++ b/source/n/samba/pytalloc-util.pc
@@ -0,0 +1,11 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${prefix}/lib
+includedir=${prefix}/include
+
+Name: pytalloc-util
+Description: Utility functions for using talloc objects with Python
+Version: 2.0.8
+Libs: -L${libdir} -lpytalloc-util
+Cflags: -Wl,-rpath,/usr/lib -I${includedir}
+URL: http://talloc.samba.org/
diff --git a/source/n/samba/samba.SlackBuild b/source/n/samba/samba.SlackBuild
index 16db23417..2257abb82 100755
--- a/source/n/samba/samba.SlackBuild
+++ b/source/n/samba/samba.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2008, 2009, 2010, 2012 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2008, 2009, 2010, 2012, 2013 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -20,26 +20,62 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# Modified 2012 by Eric Hameleers <alien at slackware.com> for ARM port.
+
VERSION=${VERSION:-$(echo samba-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-1}
-
-# Automatically determine the architecture we're building on:
-if [ -z "$ARCH" ]; then
- case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
- arm*) export ARCH=arm ;;
- # Unless $ARCH is already set, use uname -m for all other archs:
- *) export ARCH=$( uname -m ) ;;
- esac
+BUILD=${BUILD:-2}
+
+if [ -e $CWD/machine.conf ]; then
+ . $CWD/machine.conf ]
+elif [ -e /etc/slackbuild/machine.conf ]; then
+ . /etc/slackbuild/machine.conf ]
+else
+ # Automatically determine the architecture we're building on:
+ if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+ fi
+ # Set CFLAGS/CXXFLAGS and LIBDIRSUFFIX:
+ if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+ elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+ elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+ else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+ fi
fi
+case "$ARCH" in
+ arm*) TARGET=$ARCH-slackware-linux-gnueabi ;;
+ *) TARGET=$ARCH-slackware-linux ;;
+esac
+
CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-samba
rm -rf $PKG
mkdir -p $TMP $PKG
+if [ -r /usr/lib${LIBDIRSUFFIX}/libtalloc.so.? -a ! -r /var/log/packages/talloc* ]; then
+ echo "The Samba package needs to be removed before building to ensure that"
+ echo "talloc (and possibly other bundled libraries) are included in the build."
+ echo
+ echo "Removing the Samba package in 15 seconds, and then continuing with the build."
+ sleep 15
+ removepkg samba
+fi
+
cd $TMP
rm -rf samba-$VERSION
tar xvf $CWD/samba-$VERSION.tar.xz || exit 1
@@ -59,21 +95,6 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-cd source3
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "s390" ]; then
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-fi
-
# Some of these options could be auto-detected, but declaring them
# here doesn't hurt and helps document what features we're trying to
# build in.
@@ -82,8 +103,10 @@ fi
LDFLAGS="-Wl,--no-as-needed" \
CFLAGS="$SLKCFLAGS" \
./configure \
+ --enable-fhs \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
+ --includedir=/usr/include \
--bindir=/usr/bin \
--sbindir=/usr/sbin \
--mandir=/usr/man \
@@ -91,28 +114,30 @@ CFLAGS="$SLKCFLAGS" \
--with-configdir=/etc/samba \
--with-piddir=/var/run \
--with-privatedir=/etc/samba/private \
- --localstatedir=/var \
+ --with-privatelibdir=/usr/lib${LIBDIRSUFFIX} \
+ --with-modulesdir=/usr/lib${LIBDIRSUFFIX} \
--with-lockdir=/var/cache/samba \
- --with-swatdir=/usr/share/swat \
--with-logfilebase=/var/log/samba \
+ --localstatedir=/var \
--enable-cups \
- --enable-external-libtalloc=no \
- --enable-static=no \
- --enable-shared=yes \
- --with-acl-support=yes \
+ --with-acl-support \
--with-automount \
--with-quotas \
--with-syslog \
--with-utmp \
- --with-libsmbclient \
--with-winbind \
--with-ldap \
- --build=$ARCH-slackware-linux
- # Using with-fhs overrides our libdir, and besides we are already hard-coding
- # directories. So, now we define them all explicitly...
- #--with-fhs \
+ --with-ads \
+ --without-pam \
+ --build=$TARGET
+ # Gives errors:
+ #--builtin-libraries=replace,ccan \
+ #--bundled-libraries=heimdal \
# -j options don't seem to work...
+JOBS=6
+MAXJOBS=6
+export JOBS MAXJOBS
make || exit 1
mkdir -p \
@@ -124,30 +149,52 @@ mkdir -p \
chmod 700 $PKG/etc/samba/private
chmod 1777 $PKG/var/spool/samba
-make install-everything DESTDIR=$PKG || exit 1
-
-# Install libnss_win* libraries:
-mkdir -p $PKG/lib${LIBDIRSUFFIX}
-cp -a ../nsswitch/libnss_winbind.so $PKG/lib${LIBDIRSUFFIX}/libnss_winbind.so.2
-cp -a ../nsswitch/libnss_wins.so $PKG/lib${LIBDIRSUFFIX}/libnss_wins.so.2
-( cd $PKG/lib${LIBDIRSUFFIX}
- ln -sf libnss_winbind.so.2 libnss_winbind.so
- ln -sf libnss_wins.so.2 libnss_wins.so
-)
+make install DESTDIR=$PKG || exit 1
# Install pkgconfig files:
mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig
-cp -a pkgconfig/*.pc $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig
if [ ! -r $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig/talloc.pc ]; then
cat $CWD/talloc.pc | sed -e "s/\/lib/\/lib${LIBDIRSUFFIX}/" > $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig/talloc.pc
fi
+if [ ! -r $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig/pytalloc-util.pc ]; then
+ cat $CWD/pytalloc-util.pc | sed -e "s/\/lib/\/lib${LIBDIRSUFFIX}/" > $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig/pytalloc-util.pc
+fi
+
+# Install talloc.h:
+if [ ! -r $PKG/usr/include/talloc.h ]; then
+ cp -a lib/talloc/talloc.h $PKG/usr/include
+ chown root:root $PKG/usr/include/talloc.h
+ chmod 644 $PKG/usr/include/talloc.h
+fi
+
+# Make symlink for pytalloc.h in /usr/include:
+if [ ! -r $PKG/usr/include/pytalloc.h ]; then
+ if [ -r $PKG/usr/include/samba-4.0/pytalloc.h ]; then
+ ( cd $PKG/usr/include ; ln -sf samba-4.0/pytalloc.h . )
+ fi
+fi
+
+# Make symlink for libtalloc.so:
+if [ ! -r $PKG/usr/lib${LIBDIRSUFFIX}/libtalloc.so -a -r $PKG/usr/lib${LIBDIRSUFFIX}/libtalloc.so.? ]; then
+ ( cd $PKG/usr/lib${LIBDIRSUFFIX} ; ln -sf libtalloc.so.? libtalloc.so )
+fi
+
+# Make symlink for libpytalloc-util.so:
+if [ ! -r $PKG/usr/lib${LIBDIRSUFFIX}/libpytalloc-util.so -a -r $PKG/usr/lib${LIBDIRSUFFIX}/libpytalloc-util.so.? ]; then
+ ( cd $PKG/usr/lib${LIBDIRSUFFIX} ; ln -sf libpytalloc-util.so.? libpytalloc-util.so )
+fi
+
+# Install the smbprint script:
+install -m0744 packaging/printing/smbprint $PKG/usr/bin/smbprint
# Add a sample config file:
cat $CWD/smb.conf.default > $PKG/etc/samba/smb.conf-sample
+# Setup a default lmhosts file:
+echo "127.0.0.1 localhost" > $PKG/etc/samba/lmhosts.new
+
if [ ! -r $PKG/usr/bin/smbget ]; then
rm -f $PKG/usr/share/man/man1/smbget.1
- rm -f $PKG/usr/share/swat/help/smbget.1.html
fi
# We'll add rc.samba to the init directory, but chmod 644 so that it doesn't
@@ -166,7 +213,6 @@ find $PKG | xargs file | grep -e "executable" -e "shared object" \
rm -r $PKG/usr/share/locale
rm -f $PKG/usr/man/man8/pam*
-cd ..
cp -a \
COPYING* MAINTAINERS Manifest PFIF.txt README* \
Read-Manifest-Now Roadmap WHATSNEW.txt docs examples \
@@ -174,10 +220,8 @@ cp -a \
# These are installed elsewhere:
rm -rf $PKG/usr/doc/samba-$VERSION/docs/htmldocs \
$PKG/usr/doc/samba-$VERSION/docs/manpages
-mkdir -p $PKG/usr/doc/samba-$VERSION/docs
-( cd $PKG/usr/doc/samba-$VERSION/docs
- ln -sf /usr/share/swat/help htmldocs
-)
+# Empty now?
+rmdir $PKG/usr/doc/samba-$VERSION/docs 2> /dev/null
# I'm sorry, but when all this info is included in HTML, adding 7MB worth of
# PDF files just to have extra artwork is more fluff than I'll agree to.
rm -f $PKG/usr/doc/samba-$VERSION/docs/*.pdf
diff --git a/source/n/samba/smb.conf.default b/source/n/samba/smb.conf.default
index 44ba134f6..c41cfff60 100644
--- a/source/n/samba/smb.conf.default
+++ b/source/n/samba/smb.conf.default
@@ -28,10 +28,16 @@
# server string is the equivalent of the NT Description field
server string = Samba Server
-# Security mode. Defines in which mode Samba will operate. Possible
-# values are share, user, server, domain and ads. Most people will want
-# user level security. See the Samba-HOWTO-Collection for details.
- security = user
+# Server role. Defines in which mode Samba will operate. Possible
+# values are "standalone server", "member server", "classic primary
+# domain controller", "classic backup domain controller", "active
+# directory domain controller".
+#
+# Most people will want "standalone sever" or "member server".
+# Running as "active directory domain controller" will require first
+# running "samba-tool domain provision" to wipe databases and create a
+# new domain.
+ server role = standalone server
# This option is important for security. It allows you to restrict
# connections to machines which are on your local network. The
@@ -40,23 +46,6 @@
# the smb.conf man page
; hosts allow = 192.168.1. 192.168.2. 127.
-# If you want to automatically load your printer list rather
-# than setting them up individually then you'll need this
- load printers = yes
-
-# you may wish to override the location of the printcap file
-; printcap name = /etc/printcap
-
-# on SystemV system setting printcap name to lpstat should allow
-# you to automatically obtain a printer list from the SystemV spool
-# system
-; printcap name = lpstat
-
-# It should not be necessary to specify the print system type unless
-# it is non-standard. Currently supported print systems include:
-# bsd, cups, sysv, plp, lprng, aix, hpux, qnx
-; printing = cups
-
# Uncomment this if you want a guest account, you must add this to /etc/passwd
# otherwise the user "nobody" is used
; guest account = pcguest
@@ -68,15 +57,7 @@
# Put a capping on the size of the log files (in Kb).
max log size = 50
-# Use password server option only with security = server
-# The argument list may include:
-# password server = My_PDC_Name [My_BDC_Name] [My_Next_BDC_Name]
-# or to auto-locate the domain controller/s
-# password server = *
-; password server = <NT-Server-Name>
-
-# Use the realm option only with security = ads
-# Specifies the Active Directory realm the host is part of
+# Specifies the Kerberos or Active Directory realm the host is part of
; realm = MY_REALM
# Backend to store user information in. New installations should
@@ -96,35 +77,6 @@
# here. See the man page for details.
; interfaces = 192.168.12.2/24 192.168.13.2/24
-# Browser Control Options:
-# set local master to no if you don't want Samba to become a master
-# browser on your network. Otherwise the normal election rules apply
-; local master = no
-
-# OS Level determines the precedence of this server in master browser
-# elections. The default value should be reasonable
-; os level = 33
-
-# Domain Master specifies Samba to be the Domain Master Browser. This
-# allows Samba to collate browse lists between subnets. Don't use this
-# if you already have a Windows NT domain controller doing this job
-; domain master = yes
-
-# Preferred Master causes Samba to force a local browser election on startup
-# and gives it a slightly higher chance of winning the election
-; preferred master = yes
-
-# Enable this if you want Samba to be a domain logon server for
-# Windows95 workstations.
-; domain logons = yes
-
-# if you enable domain logons then you may want a per-machine or
-# per user logon script
-# run a specific logon batch file per workstation (machine)
-; logon script = %m.bat
-# run a specific logon batch file per username
-; logon script = %U.bat
-
# Where to store roving profiles (only for Win95 and WinNT)
# %L substitutes for this servers netbios name, %U is username
# You must uncomment the [Profiles] share below
diff --git a/source/n/samba/smb.conf.default.orig b/source/n/samba/smb.conf.default.orig
index b4e3d63e0..bb9c2e25e 100644
--- a/source/n/samba/smb.conf.default.orig
+++ b/source/n/samba/smb.conf.default.orig
@@ -28,10 +28,16 @@
# server string is the equivalent of the NT Description field
server string = Samba Server
-# Security mode. Defines in which mode Samba will operate. Possible
-# values are share, user, server, domain and ads. Most people will want
-# user level security. See the Samba-HOWTO-Collection for details.
- security = user
+# Server role. Defines in which mode Samba will operate. Possible
+# values are "standalone server", "member server", "classic primary
+# domain controller", "classic backup domain controller", "active
+# directory domain controller".
+#
+# Most people will want "standalone sever" or "member server".
+# Running as "active directory domain controller" will require first
+# running "samba-tool domain provision" to wipe databases and create a
+# new domain.
+ server role = standalone server
# This option is important for security. It allows you to restrict
# connections to machines which are on your local network. The
@@ -40,23 +46,6 @@
# the smb.conf man page
; hosts allow = 192.168.1. 192.168.2. 127.
-# If you want to automatically load your printer list rather
-# than setting them up individually then you'll need this
- load printers = yes
-
-# you may wish to override the location of the printcap file
-; printcap name = /etc/printcap
-
-# on SystemV system setting printcap name to lpstat should allow
-# you to automatically obtain a printer list from the SystemV spool
-# system
-; printcap name = lpstat
-
-# It should not be necessary to specify the print system type unless
-# it is non-standard. Currently supported print systems include:
-# bsd, cups, sysv, plp, lprng, aix, hpux, qnx
-; printing = cups
-
# Uncomment this if you want a guest account, you must add this to /etc/passwd
# otherwise the user "nobody" is used
; guest account = pcguest
@@ -68,15 +57,7 @@
# Put a capping on the size of the log files (in Kb).
max log size = 50
-# Use password server option only with security = server
-# The argument list may include:
-# password server = My_PDC_Name [My_BDC_Name] [My_Next_BDC_Name]
-# or to auto-locate the domain controller/s
-# password server = *
-; password server = <NT-Server-Name>
-
-# Use the realm option only with security = ads
-# Specifies the Active Directory realm the host is part of
+# Specifies the Kerberos or Active Directory realm the host is part of
; realm = MY_REALM
# Backend to store user information in. New installations should
@@ -96,35 +77,6 @@
# here. See the man page for details.
; interfaces = 192.168.12.2/24 192.168.13.2/24
-# Browser Control Options:
-# set local master to no if you don't want Samba to become a master
-# browser on your network. Otherwise the normal election rules apply
-; local master = no
-
-# OS Level determines the precedence of this server in master browser
-# elections. The default value should be reasonable
-; os level = 33
-
-# Domain Master specifies Samba to be the Domain Master Browser. This
-# allows Samba to collate browse lists between subnets. Don't use this
-# if you already have a Windows NT domain controller doing this job
-; domain master = yes
-
-# Preferred Master causes Samba to force a local browser election on startup
-# and gives it a slightly higher chance of winning the election
-; preferred master = yes
-
-# Enable this if you want Samba to be a domain logon server for
-# Windows95 workstations.
-; domain logons = yes
-
-# if you enable domain logons then you may want a per-machine or
-# per user logon script
-# run a specific logon batch file per workstation (machine)
-; logon script = %m.bat
-# run a specific logon batch file per username
-; logon script = %U.bat
-
# Where to store roving profiles (only for Win95 and WinNT)
# %L substitutes for this servers netbios name, %U is username
# You must uncomment the [Profiles] share below
diff --git a/source/n/samba/smb.conf.diff b/source/n/samba/smb.conf.diff
index 3573a8f0b..b08d2b12d 100644
--- a/source/n/samba/smb.conf.diff
+++ b/source/n/samba/smb.conf.diff
@@ -1,5 +1,5 @@
---- smb.conf.default.orig 2009-09-30 07:17:40.000000000 -0500
-+++ smb.conf.default 2009-10-03 15:59:26.000000000 -0500
+--- smb.conf.default.orig 2013-06-13 04:21:02.000000000 -0500
++++ smb.conf.default 2013-10-15 20:02:31.684043875 -0500
@@ -22,7 +22,7 @@
#======================= Global Settings =====================================
[global]
@@ -9,7 +9,7 @@
workgroup = MYGROUP
# server string is the equivalent of the NT Description field
-@@ -63,7 +63,7 @@
+@@ -52,7 +52,7 @@
# this tells Samba to use a separate log file for each machine
# that connects
@@ -18,7 +18,7 @@
# Put a capping on the size of the log files (in Kb).
max log size = 50
-@@ -184,7 +184,7 @@
+@@ -136,7 +136,7 @@
# specifically define each individual printer
[printers]
comment = All Printers
diff --git a/source/n/samba/talloc.pc b/source/n/samba/talloc.pc
index 7a23835ce..125977d19 100644
--- a/source/n/samba/talloc.pc
+++ b/source/n/samba/talloc.pc
@@ -1,11 +1,11 @@
prefix=/usr
exec_prefix=${prefix}
-libdir=${exec_prefix}/lib
+libdir=${prefix}/lib
includedir=${prefix}/include
Name: talloc
Description: A hierarchical pool based memory system with destructors
-Version: 2.0.1
-Libs: -L${libdir} -ltalloc
+Version: 2.0.8
+Libs: -Wl,-rpath,/usr/lib -L${libdir} -ltalloc
Cflags: -I${includedir}
URL: http://talloc.samba.org/