summaryrefslogtreecommitdiffstats
path: root/abs/core/samba
diff options
context:
space:
mode:
authorCecil Hugh Watson <knoppmyth@gmail.com>2009-09-26 01:57:08 (GMT)
committerCecil Hugh Watson <knoppmyth@gmail.com>2009-09-26 01:57:08 (GMT)
commit7b29169fff9e7c624890c5edffe85def8a293136 (patch)
tree47753889faa3a2063b66d1c7e7681e703eb1b39a /abs/core/samba
parentc491dea779dac29afff3578bf8245943817c2339 (diff)
downloadlinhes_pkgbuild-7b29169fff9e7c624890c5edffe85def8a293136.zip
linhes_pkgbuild-7b29169fff9e7c624890c5edffe85def8a293136.tar.gz
linhes_pkgbuild-7b29169fff9e7c624890c5edffe85def8a293136.tar.bz2
LinHES 6.01.00
Diffstat (limited to 'abs/core/samba')
-rw-r--r--abs/core/samba/PKGBUILD88
-rw-r--r--abs/core/samba/__changelog1
-rw-r--r--abs/core/samba/heimdal.patch33
-rw-r--r--abs/core/samba/no-clients.patch31
-rwxr-xr-xabs/core/samba/samba51
-rw-r--r--abs/core/samba/samba-3.0.21a-ntlmssp.patch13
-rw-r--r--abs/core/samba/samba.conf.d7
-rw-r--r--abs/core/samba/samba.logrotate9
-rw-r--r--abs/core/samba/samba.pam3
-rw-r--r--abs/core/samba/swat.xinetd10
10 files changed, 246 insertions, 0 deletions
diff --git a/abs/core/samba/PKGBUILD b/abs/core/samba/PKGBUILD
new file mode 100644
index 0000000..24b2dba
--- /dev/null
+++ b/abs/core/samba/PKGBUILD
@@ -0,0 +1,88 @@
+# $Id: PKGBUILD 37517 2009-05-02 16:35:12Z tpowa $
+# Maintainer: judd <jvinet@zeroflux.org>
+pkgname=samba
+pkgver=3.3.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.3.4
+pkgrel=1
+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.3.4' 'libcap>=2.16' 'heimdal>=1.2-1' 'pam' 'gnutls>=2.4.1' 'tdb=3.3.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 ${srcdir}/${pkgname}-${_realver}/source
+ patch -Np2 -i ${srcdir}/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 \
+ --with-syslog --with-pam_smbpass \
+ --localstatedir=/var --disable-dnssd \
+ --disable-avahi --libdir=/usr/lib/samba --without-fam
+ make || return 1
+ mkdir -p ${pkgdir}/var/log/samba
+ mkdir -p ${pkgdir}/etc/samba/private
+ chmod 700 ${pkgdir}/etc/samba/private
+ make DESTDIR=$startdir/pkg install
+ chmod 644 ${pkgdir}/usr/include/*.h
+ rm -rf ${pkgdir}/usr/var
+ (cd script; cp installbin.sh i; cat i | sed 's/\/sbin\///' > installbin.sh)
+ install -D -m755 ../../samba ${pkgdir}/etc/rc.d/samba
+ install -D -m644 ../../samba.conf.d ${pkgdir}/etc/conf.d/samba
+ mkdir -p ${pkgdir}/etc/samba
+ cat ../examples/smb.conf.default | \
+ sed 's|log file = .*$|log file = /var/log/samba/log.%m|g' >${pkgdir}/etc/samba/smb.conf.default
+ install -D -m644 ../../samba.logrotate ${pkgdir}/etc/logrotate.d/samba
+ install -D -m644 ../../swat.xinetd ${pkgdir}/etc/xinetd.d/swat
+ install -D -m644 ../../samba.pam ${pkgdir}/etc/pam.d/samba
+ # symlink libs
+ for i in ${pkgdir}/usr/lib/samba/libsmbshare*; do
+ ln -sf samba/$(basename $i) ${pkgdir}/usr/lib/$(basename $i)
+ done
+ # spool directory
+ install -d -m1777 ${pkgdir}/var/spool/samba
+ sed -i 's|/usr/spool/samba|/var/spool/samba|g' ${pkgdir}/etc/samba/smb.conf.default
+ # fix logrotate
+ sed -i -e 's|log.%m|%m.log|g' ${pkgdir}/etc/samba/smb.conf.default
+ # nsswitch libraries
+ install -D -m755 nsswitch/libnss_wins.so ${pkgdir}/lib/libnss_wins.so
+ ln -s libnss_wins.so ${pkgdir}/lib/libnss_wins.so.2
+ install -D -m755 nsswitch/libnss_winbind.so ${pkgdir}/lib/libnss_winbind.so
+ install -D -m755 bin/pam_winbind.so ${pkgdir}/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 ${pkgdir}/usr/share/man/man8/${man}.8
+ done
+ for i in libnetapi* libtdb* libtalloc* libwbclient*; do
+ rm -f ${pkgdir}/usr/lib/samba/$i
+ done
+ rm -f ${pkgdir}/usr/bin/tdbbackup
+ rm -f ${pkgdir}/usr/include/{tdb.h,talloc.h,netapi.h}
+ for man in rpcclient smbcacls smbclient smbcquotas \
+ smbtree smbtar nmblookup smbget; do
+ rm -f ${pkgdir}/usr/share/man/man1/${man}.1
+ done
+ rm -f ${pkgdir}/usr/share/man/man7/libsmbclient.7
+
+ rm -f ${pkgdir}/usr/include/libsmbclient.h
+ # copy ldap example
+ install -D -m644 ${srcdir}/${pkgname}-${_realver}/examples/LDAP/samba.schema ${pkgdir}/usr/share/doc/samba/examples/LDAP/samba.schema
+}
+md5sums=('1443165edb7cb3f56f1e77aec1ee3266'
+ 'ce3d88336ade7522e9a8f59bb306accd'
+ 'e93533fa2296c07c1f645dfdd373657f'
+ '5697da77590ec092cc8a883bae06093c'
+ 'a4bbfa39fee95bba2e7ad6b535fae7e6'
+ '96f82c38f3f540b53f3e5144900acf17'
+ 'f2f2e348acd1ccb566e95fa8a561b828')
diff --git a/abs/core/samba/__changelog b/abs/core/samba/__changelog
new file mode 100644
index 0000000..8af7e88
--- /dev/null
+++ b/abs/core/samba/__changelog
@@ -0,0 +1 @@
+remove fam support \ No newline at end of file
diff --git a/abs/core/samba/heimdal.patch b/abs/core/samba/heimdal.patch
new file mode 100644
index 0000000..5338c37
--- /dev/null
+++ b/abs/core/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/samba/no-clients.patch b/abs/core/samba/no-clients.patch
new file mode 100644
index 0000000..e06da8d
--- /dev/null
+++ b/abs/core/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/sharesec@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@ bin/ldbrename@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/samba/samba b/abs/core/samba/samba
new file mode 100755
index 0000000..bc7d527
--- /dev/null
+++ b/abs/core/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/samba/samba-3.0.21a-ntlmssp.patch b/abs/core/samba/samba-3.0.21a-ntlmssp.patch
new file mode 100644
index 0000000..6b65449
--- /dev/null
+++ b/abs/core/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/samba/samba.conf.d b/abs/core/samba/samba.conf.d
new file mode 100644
index 0000000..8721f95
--- /dev/null
+++ b/abs/core/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/samba/samba.logrotate b/abs/core/samba/samba.logrotate
new file mode 100644
index 0000000..581f4c3
--- /dev/null
+++ b/abs/core/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/samba/samba.pam b/abs/core/samba/samba.pam
new file mode 100644
index 0000000..53724d1
--- /dev/null
+++ b/abs/core/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/samba/swat.xinetd b/abs/core/samba/swat.xinetd
new file mode 100644
index 0000000..2e62a82
--- /dev/null
+++ b/abs/core/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
+}