summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/samba
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2008-10-28 21:10:31 (GMT)
committerJames Meyer <james.meyer@operamail.com>2008-10-28 21:10:31 (GMT)
commite65efe930ec0f86eb207fabf8a5502d23af566a2 (patch)
treee86be0c30dc17e08ac25358dfafe47055e377291 /abs/core-testing/samba
parent9f392cc1b6e39b4cde757e18aa8259f2724e41fe (diff)
downloadlinhes_pkgbuild-e65efe930ec0f86eb207fabf8a5502d23af566a2.zip
linhes_pkgbuild-e65efe930ec0f86eb207fabf8a5502d23af566a2.tar.gz
linhes_pkgbuild-e65efe930ec0f86eb207fabf8a5502d23af566a2.tar.bz2
add samba & update smb-client
Diffstat (limited to 'abs/core-testing/samba')
-rw-r--r--abs/core-testing/samba/PKGBUILD77
-rw-r--r--abs/core-testing/samba/heimdal.patch33
-rw-r--r--abs/core-testing/samba/no-clients.patch31
-rwxr-xr-xabs/core-testing/samba/samba51
-rw-r--r--abs/core-testing/samba/samba-3.0.21a-ntlmssp.patch13
-rw-r--r--abs/core-testing/samba/samba.conf.d7
-rw-r--r--abs/core-testing/samba/samba.logrotate9
-rw-r--r--abs/core-testing/samba/samba.pam3
-rw-r--r--abs/core-testing/samba/swat.xinetd10
9 files changed, 234 insertions, 0 deletions
diff --git a/abs/core-testing/samba/PKGBUILD b/abs/core-testing/samba/PKGBUILD
new file mode 100644
index 0000000..b3ea7ca
--- /dev/null
+++ b/abs/core-testing/samba/PKGBUILD
@@ -0,0 +1,77 @@
+# $Id: PKGBUILD 14140 2008-10-04 09:43:47Z tpowa $
+# Maintainer: judd <jvinet@zeroflux.org>
+pkgname=samba
+pkgver=3.2.4
+# We use the 'A' to fake out pacman's version comparators. Samba chooses
+# to append 'a','b',etc to their subsequent releases, which pamcan
+# misconstrues as alpha, beta, etc. Bad samba!
+_realver=3.2.4
+pkgrel=3
+pkgdesc="Tools to access a server's filespace and printers via SMB"
+arch=(i686 x86_64)
+url="http://www.samba.org"
+license=('GPL3')
+backup=(etc/logrotate.d/samba etc/pam.d/samba etc/samba/smb.conf etc/xinetd.d/swat etc/conf.d/samba)
+depends=('db>=4.7' 'popt' 'libcups' 'acl' 'libldap' 'smbclient=3.2.4' 'libcap' 'heimdal>=1.2-1' 'pam' 'fam' 'gnutls>=2.4.1' 'tdb=3.2.4')
+options=(!makeflags)
+source=(http://us1.samba.org/samba/ftp/stable/${pkgname}-${_realver}.tar.gz \
+ no-clients.patch samba samba.logrotate swat.xinetd samba.pam samba.conf.d)
+
+build() {
+ cd ${startdir}/src/${pkgname}-${_realver}/source
+ patch -Np2 -i ${startdir}/src/no-clients.patch || return 1
+
+ ./configure --prefix=/usr --with-configdir=/etc/samba \
+ --with-lockdir=/var/cache/samba \
+ --with-piddir=/var/run/samba \
+ --with-fhs --with-pam --with-ads --with-acl-support \
+ --without-cifsmount --without-libsmbclient \
+ --localstatedir=/var --disable-dnssd --libdir=/usr/lib/samba
+ make || return 1
+ mkdir -p $startdir/pkg/var/log/samba
+ mkdir -p $startdir/pkg/etc/samba/private
+ chmod 700 $startdir/pkg/etc/samba/private
+ make DESTDIR=$startdir/pkg install
+ chmod 644 $startdir/pkg/usr/include/*.h
+ rm -rf $startdir/pkg/usr/var
+ (cd script; cp installbin.sh i; cat i | sed 's/\/sbin\///' > installbin.sh)
+ install -D -m755 ../../samba $startdir/pkg/etc/rc.d/samba
+ install -D -m644 ../../samba.conf.d $startdir/pkg/etc/conf.d/samba
+ mkdir -p $startdir/pkg/etc/samba
+ cat ../examples/smb.conf.default | \
+ sed 's|log file = .*$|log file = /var/log/samba/log.%m|g' >$startdir/pkg/etc/samba/smb.conf.default
+ install -D -m644 ../../samba.logrotate $startdir/pkg/etc/logrotate.d/samba
+ install -D -m644 ../../swat.xinetd $startdir/pkg/etc/xinetd.d/swat
+ install -D -m644 ../../samba.pam $startdir/pkg/etc/pam.d/samba
+ # symlink libs
+ for i in ${startdir}/pkg/usr/lib/samba/libsmbshare*; do
+ ln -sf samba/$(basename $i) ${startdir}/pkg/usr/lib/$(basename $i)
+ done
+ # spool directory
+ install -d -m1777 $startdir/pkg/var/spool/samba
+ sed -i 's|/usr/spool/samba|/var/spool/samba|g' $startdir/pkg/etc/samba/smb.conf.default
+ # fix logrotate
+ sed -i -e 's|log.%m|%m.log|g' $startdir/pkg/etc/samba/smb.conf.default
+ # nsswitch libraries
+ install -D -m755 nsswitch/libnss_wins.so $startdir/pkg/lib/libnss_wins.so
+ ln -s libnss_wins.so $startdir/pkg/lib/libnss_wins.so.2
+ install -D -m755 nsswitch/libnss_winbind.so $startdir/pkg/lib/libnss_winbind.so
+ install -D -m755 bin/pam_winbind.so $startdir/pkg/lib/security/pam_winbind.so
+ # remove conflict files of smbclient and tdb
+ for man in libsmbclient smbspool \
+ umount.cifs mount.cifs net; do
+ rm -f ${startdir}/pkg/usr/share/man/man8/${man}.8
+ done
+ for i in libnetapi* libtdb* libtalloc* libwbclient*; do
+ rm -f ${startdir}/pkg/usr/lib/samba/$i
+ done
+ rm -f ${startdir}/pkg/usr/bin/tdbbackup
+ rm -f ${startdir}/pkg/usr/include/{tdb.h,talloc.h,netapi.h}
+ for man in rpcclient smbcacls smbclient smbcquotas \
+ smbtree smbtar nmblookup smbget; do
+ rm -f ${startdir}/pkg/usr/share/man/man1/${man}.1
+ done
+ rm -f ${startdir}/pkg/usr/share/man/man7/libsmbclient.7
+
+ rm -f ${startdir}/pkg/usr/include/libsmbclient.h
+}
diff --git a/abs/core-testing/samba/heimdal.patch b/abs/core-testing/samba/heimdal.patch
new file mode 100644
index 0000000..5338c37
--- /dev/null
+++ b/abs/core-testing/samba/heimdal.patch
@@ -0,0 +1,33 @@
+Submitted By: Randy McMurchy <randy_at_linuxfromscratch_dot_org>
+Date: 2005-09-21
+Initial Package Version: 3.0.20
+Upstream Status: Not submitted (it is not an upstream Samba issue)
+Origin: Randy McMurchy
+Description: Fixes an issue if you have Heimdal installed as
+ Heimdal uses reserved C++ words and the Samba headers
+ now look for these conflicts. This patch comments out
+ the check for C++ reserved words. Heimdal is aware of
+ the issue
+
+$LastChangedBy: randy $
+$Date: 2005/09/29 18:25:12 $
+
+
+--- samba-3.0.20-orig/source/include/includes.h 2005-07-28 13:19:49.000000000 +0000
++++ samba-3.0.20/source/include/includes.h 2005-09-04 13:45:01.000000000 +0000
+@@ -25,6 +25,7 @@
+ #include "config.h"
+ #endif
+
++/*
+ #ifndef __cplusplus
+ #define class #error DONT_USE_CPLUSPLUS_RESERVED_NAMES
+ #define private #error DONT_USE_CPLUSPLUS_RESERVED_NAMES
+@@ -36,6 +37,7 @@
+ #define delete #error DONT_USE_CPLUSPLUS_RESERVED_NAMES
+ #define friend #error DONT_USE_CPLUSPLUS_RESERVED_NAMES
+ #endif
++*/
+
+ #include "local.h"
+
diff --git a/abs/core-testing/samba/no-clients.patch b/abs/core-testing/samba/no-clients.patch
new file mode 100644
index 0000000..61e4e5c
--- /dev/null
+++ b/abs/core-testing/samba/no-clients.patch
@@ -0,0 +1,31 @@
+diff -Naur samba-3.0.23-orig/source/Makefile.in samba-3.0.23/source/Makefile.in
+--- samba-3.0.23-orig/source/Makefile.in 2006-07-10 09:27:55.000000000 -0700
++++ samba-3.0.23/source/Makefile.in 2006-07-11 14:34:39.000000000 -0700
+@@ -138,14 +138,10 @@
+
+ ROOT_SBIN_PROGS = @CIFSMOUNT_PROGS@
+
+-BIN_PROGS1 = bin/smbclient@EXEEXT@ bin/net@EXEEXT@ bin/smbspool@EXEEXT@ \
+- bin/testparm@EXEEXT@ bin/smbstatus@EXEEXT@ bin/smbget@EXEEXT@
+-BIN_PROGS2 = bin/smbcontrol@EXEEXT@ bin/smbtree@EXEEXT@ bin/tdbbackup@EXEEXT@ \
+- bin/nmblookup@EXEEXT@ bin/pdbedit@EXEEXT@ bin/tdbdump@EXEEXT@ \
+- bin/tdbtool@EXEEXT@
+-BIN_PROGS3 = bin/smbpasswd@EXEEXT@ bin/rpcclient@EXEEXT@ bin/smbcacls@EXEEXT@ \
+- bin/profiles@EXEEXT@ bin/ntlm_auth@EXEEXT@ \
+- bin/smbcquotas@EXEEXT@ bin/eventlogadm@EXEEXT@
++BIN_PROGS1 = bin/testparm@EXEEXT@ bin/smbstatus@EXEEXT@
++BIN_PROGS2 = bin/smbcontrol@EXEEXT@ bin/tdbbackup@EXEEXT@ bin/pdbedit@EXEEXT@
++BIN_PROGS3 = bin/smbpasswd@EXEEXT@ bin/profiles@EXEEXT@ bin/ntlm_auth@EXEEXT@ \
++ bin/eventlogadm@EXEEXT@
+ BIN_PROGS4 = bin/ldbedit@EXEEXT@ bin/ldbsearch@EXEEXT@ bin/ldbadd@EXEEXT@ \
+ bin/ldbdel@EXEEXT@ bin/ldbmodify@EXEEXT@
+
+@@ -160,7 +156,7 @@
+
+ PAM_MODULES = @PAM_MODULES@
+
+-SCRIPTS = $(srcdir)/script/smbtar $(builddir)/script/findsmb
++SCRIPTS = $(builddir)/script/findsmb
+
+ VFS_MODULES = @VFS_MODULES@
+ PDB_MODULES = @PDB_MODULES@
diff --git a/abs/core-testing/samba/samba b/abs/core-testing/samba/samba
new file mode 100755
index 0000000..bc7d527
--- /dev/null
+++ b/abs/core-testing/samba/samba
@@ -0,0 +1,51 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+[ -f /etc/conf.d/samba ] && . /etc/conf.d/samba
+
+[ -z "$SAMBA_DAEMONS" ] && SAMBA_DAEMONS=(smbd nmbd)
+
+case "$1" in
+ start)
+ rc=0
+ stat_busy "Starting Samba Server"
+ for d in ${SAMBA_DAEMONS[@]}; do
+ PID=`pidof -o %PPID /usr/sbin/$d`
+ [ -z "$PID" ] && /usr/sbin/$d -D
+ rc=$(($rc+$?))
+ done
+ if [ $rc -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon samba
+ stat_done
+ fi
+ ;;
+ stop)
+ rc=0
+ stat_busy "Stopping Samba Server"
+ for d in ${SAMBA_DAEMONS[@]}; do
+ PID=`pidof -o %PPID /usr/sbin/$d`
+ [ -z "$PID" ] || kill $PID &> /dev/null
+ rc=$(($rc+$?))
+ done
+ if [ $rc -gt 0 ]; then
+ stat_fail
+ else
+ rm /var/run/samba/smbd.pid &>/dev/null
+ rm /var/run/samba/nmbd.pid &>/dev/null
+ rm /var/run/samba/winbindd.pid &>/dev/null
+ rm_daemon samba
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/abs/core-testing/samba/samba-3.0.21a-ntlmssp.patch b/abs/core-testing/samba/samba-3.0.21a-ntlmssp.patch
new file mode 100644
index 0000000..6b65449
--- /dev/null
+++ b/abs/core-testing/samba/samba-3.0.21a-ntlmssp.patch
@@ -0,0 +1,13 @@
+--- ntlmssp.c.old Fri Jan 13 15:33:50 2006
++++ ntlmssp.c Fri Jan 13 15:33:16 2006
+@@ -399,8 +399,9 @@
+ ntlmssp_state->session_key.data[6] = 0x38;
+ ntlmssp_state->session_key.data[7] = 0xb0;
+ }
+- ntlmssp_state->session_key.length = 8;
++ /* ntlmssp_state->session_key.length = 8; */
+ }
++
+ }
+
+ /**
diff --git a/abs/core-testing/samba/samba.conf.d b/abs/core-testing/samba/samba.conf.d
new file mode 100644
index 0000000..8721f95
--- /dev/null
+++ b/abs/core-testing/samba/samba.conf.d
@@ -0,0 +1,7 @@
+#
+# Configuration for the samba init script
+#
+
+# space separated list of daemons to launch
+SAMBA_DAEMONS=(smbd nmbd)
+#SAMBA_DAEMONS=(smbd nmbd winbindd)
diff --git a/abs/core-testing/samba/samba.logrotate b/abs/core-testing/samba/samba.logrotate
new file mode 100644
index 0000000..581f4c3
--- /dev/null
+++ b/abs/core-testing/samba/samba.logrotate
@@ -0,0 +1,9 @@
+/var/log/samba/log.smbd /var/log/samba/log.nmbd /var/log/samba/*.log {
+ notifempty
+ missingok
+ sharedscripts
+ copytruncate
+ postrotate
+ /bin/kill -HUP `cat /var/run/samba/*.pid 2>/dev/null` 2>/dev/null || true
+ endscript
+}
diff --git a/abs/core-testing/samba/samba.pam b/abs/core-testing/samba/samba.pam
new file mode 100644
index 0000000..53724d1
--- /dev/null
+++ b/abs/core-testing/samba/samba.pam
@@ -0,0 +1,3 @@
+auth required pam_unix.so
+account required pam_unix.so
+session required pam_unix.so
diff --git a/abs/core-testing/samba/swat.xinetd b/abs/core-testing/samba/swat.xinetd
new file mode 100644
index 0000000..2e62a82
--- /dev/null
+++ b/abs/core-testing/samba/swat.xinetd
@@ -0,0 +1,10 @@
+service swat
+{
+ socket_type = stream
+ wait = no
+ user = root
+ server = /usr/sbin/swat
+ log_on_success += HOST DURATION
+ log_on_failure += HOST
+ disable = yes
+}