Date: Sunday, January 27, 2013 @ 13:37:46 Author: tpowa Revision: 176101
archrelease: copy trunk to extra-i686, extra-x86_64 Added: samba/repos/extra-i686/PKGBUILD (from rev 176100, samba/trunk/PKGBUILD) samba/repos/extra-i686/nmbd.service (from rev 176100, samba/trunk/nmbd.service) samba/repos/extra-i686/samba (from rev 176100, samba/trunk/samba) samba/repos/extra-i686/samba.conf (from rev 176100, samba/trunk/samba.conf) samba/repos/extra-i686/samba.conf.d (from rev 176100, samba/trunk/samba.conf.d) samba/repos/extra-i686/samba.install (from rev 176100, samba/trunk/samba.install) samba/repos/extra-i686/samba.logrotate (from rev 176100, samba/trunk/samba.logrotate) samba/repos/extra-i686/samba.pam (from rev 176100, samba/trunk/samba.pam) samba/repos/extra-i686/smbd.service (from rev 176100, samba/trunk/smbd.service) samba/repos/extra-i686/smbd.socket (from rev 176100, samba/trunk/smbd.socket) samba/repos/extra-i686/smbd@.service (from rev 176100, samba/trunk/smbd@.service) samba/repos/extra-i686/swat.socket (from rev 176100, samba/trunk/swat.socket) samba/repos/extra-i686/swat.xinetd (from rev 176100, samba/trunk/swat.xinetd) samba/repos/extra-i686/swat@.service (from rev 176100, samba/trunk/swat@.service) samba/repos/extra-i686/winbindd.service (from rev 176100, samba/trunk/winbindd.service) samba/repos/extra-x86_64/PKGBUILD (from rev 176100, samba/trunk/PKGBUILD) samba/repos/extra-x86_64/nmbd.service (from rev 176100, samba/trunk/nmbd.service) samba/repos/extra-x86_64/samba (from rev 176100, samba/trunk/samba) samba/repos/extra-x86_64/samba.conf (from rev 176100, samba/trunk/samba.conf) samba/repos/extra-x86_64/samba.conf.d (from rev 176100, samba/trunk/samba.conf.d) samba/repos/extra-x86_64/samba.install (from rev 176100, samba/trunk/samba.install) samba/repos/extra-x86_64/samba.logrotate (from rev 176100, samba/trunk/samba.logrotate) samba/repos/extra-x86_64/samba.pam (from rev 176100, samba/trunk/samba.pam) samba/repos/extra-x86_64/smbd.service (from rev 176100, samba/trunk/smbd.service) samba/repos/extra-x86_64/smbd.socket (from rev 176100, samba/trunk/smbd.socket) samba/repos/extra-x86_64/smbd@.service (from rev 176100, samba/trunk/smbd@.service) samba/repos/extra-x86_64/swat.socket (from rev 176100, samba/trunk/swat.socket) samba/repos/extra-x86_64/swat.xinetd (from rev 176100, samba/trunk/swat.xinetd) samba/repos/extra-x86_64/swat@.service (from rev 176100, samba/trunk/swat@.service) samba/repos/extra-x86_64/winbindd.service (from rev 176100, samba/trunk/winbindd.service) Deleted: samba/repos/extra-i686/smbd.socket samba/repos/extra-i686/smbd@.service samba/repos/extra-i686/swat.socket samba/repos/extra-i686/swat@.service samba/repos/extra-x86_64/smbd.socket samba/repos/extra-x86_64/smbd@.service samba/repos/extra-x86_64/swat.socket samba/repos/extra-x86_64/swat@.service -------------------------------+ extra-i686/PKGBUILD | 177 ++++++++++++++++++++++++++++++++++++++++ extra-i686/nmbd.service | 12 ++ extra-i686/samba | 54 ++++++++++++ extra-i686/samba.conf | 2 extra-i686/samba.conf.d | 7 + extra-i686/samba.install | 7 + extra-i686/samba.logrotate | 9 ++ extra-i686/samba.pam | 3 extra-i686/smbd.service | 12 ++ extra-i686/smbd.socket | 18 ++-- extra-i686/smbd@.service | 18 ++-- extra-i686/swat.socket | 18 ++-- extra-i686/swat.xinetd | 10 ++ extra-i686/swat@.service | 14 +-- extra-i686/winbindd.service | 12 ++ extra-x86_64/PKGBUILD | 177 ++++++++++++++++++++++++++++++++++++++++ extra-x86_64/nmbd.service | 12 ++ extra-x86_64/samba | 54 ++++++++++++ extra-x86_64/samba.conf | 2 extra-x86_64/samba.conf.d | 7 + extra-x86_64/samba.install | 7 + extra-x86_64/samba.logrotate | 9 ++ extra-x86_64/samba.pam | 3 extra-x86_64/smbd.service | 12 ++ extra-x86_64/smbd.socket | 18 ++-- extra-x86_64/smbd@.service | 18 ++-- extra-x86_64/swat.socket | 18 ++-- extra-x86_64/swat.xinetd | 10 ++ extra-x86_64/swat@.service | 14 +-- extra-x86_64/winbindd.service | 12 ++ 30 files changed, 678 insertions(+), 68 deletions(-) Copied: samba/repos/extra-i686/PKGBUILD (from rev 176100, samba/trunk/PKGBUILD) =================================================================== --- extra-i686/PKGBUILD (rev 0) +++ extra-i686/PKGBUILD 2013-01-27 12:37:46 UTC (rev 176101) @@ -0,0 +1,177 @@ +# $Id$ +# Maintainer: Tobias Powalowski <tp...@archlinux.org> +# Contributor: judd <jvi...@zeroflux.org> +pkgbase=samba +pkgname=('libwbclient' 'smbclient' 'samba') +pkgver=3.6.11 +# 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.6.11 +pkgrel=2 +arch=(i686 x86_64) +url="http://www.samba.org" +license=('GPL3') +makedepends=('db' 'popt' 'libcups' 'acl' 'libldap' 'libcap' 'krb5' 'pam' 'gamin' 'gnutls>=2.4.1' 'talloc' 'tdb') +source=(http://us1.samba.org/samba/ftp/stable/${pkgbase}-${_realver}.tar.gz + samba.logrotate + swat.xinetd + samba.pam + smbd.service + smbd.socket + smbd@.service + nmbd.service + swat.socket + swat@.service + winbindd.service + samba.conf) +### UNINSTALL dmapi package before building!!! + +build() { + cd ${srcdir}/${pkgbase}-${_realver}/source3 + ./configure --prefix=/usr \ + --libdir=/usr/lib/ \ + --localstatedir=/var \ + --with-configdir=/etc/samba \ + --with-lockdir=/var/cache/samba \ + --with-piddir=/var/run/samba \ + --with-fhs \ + --with-pam \ + --with-pam_smbpass \ + --with-pammodulesdir=/usr/lib/security \ + --with-dnsupdate \ + --with-automount \ + --with-quotas \ + --with-ads \ + --with-acl-support \ + --with-libsmbclient \ + --with-syslog \ + --enable-external-libtalloc \ + --disable-dnssd \ + --disable-avahi \ + --with-shared-modules=idmap_ad,idmap_adex,idmap_rid,idmap_hash,idmap_tdb2 \ + --enable-external-libtdb + make +} + +package_libwbclient () { +pkgdesc="Samba winbind client library" +depends=('glibc') + cd ${srcdir}/${pkgbase}-${_realver}/source3 + mkdir -p ${pkgdir}/usr/lib + for i in libwbclient*; do + cp -a bin/${i}*.so* ${pkgdir}/usr/lib/ + done + install -D -m644 pkgconfig/wbclient.pc ${pkgdir}/usr/lib/pkgconfig/wbclient.pc + install -D -m644 ../nsswitch/libwbclient/wbclient.h ${pkgdir}/usr/include/wbclient.h +} + +package_smbclient () { +pkgdesc="Tools to access a server's filespace and printers via SMB" +depends=('readline' 'popt' 'libldap' 'cifs-utils' 'libcap' 'krb5' 'db' 'e2fsprogs' 'tdb' 'talloc' 'libwbclient') + cd ${srcdir}/${pkgbase}-${_realver}/source3 + mkdir -p ${pkgdir}/usr/bin ${pkgdir}/usr/lib + install -m755 bin/{smbclient,rpcclient,smbspool,smbtree,smbcacls,smbcquotas,smbget,net,nmblookup} ${pkgdir}/usr/bin/ + for i in libnetapi* libsmbclient*;do + cp -a bin/${i}*.so* ${pkgdir}/usr/lib/ + done + install -m755 script/smbtar ${pkgdir}/usr/bin/ + mkdir -p ${pkgdir}/usr/lib/cups/backend + ln -sf /usr/bin/smbspool ${pkgdir}/usr/lib/cups/backend/smb + mkdir -p ${pkgdir}/usr/include + install -m644 include/libsmbclient.h ${pkgdir}/usr/include/ + install -m644 lib/netapi/netapi.h ${pkgdir}/usr/include/ + mkdir -p ${pkgdir}/usr/share/man/man{1,7} + for man in rpcclient smbcacls smbclient smbcquotas smbget \ + smbtree smbtar nmblookup; do + install -m644 ../docs/manpages/${man}.1 ${pkgdir}/usr/share/man/man1/ + done + install -m644 ../docs/manpages/libsmbclient.7 ${pkgdir}/usr/share/man/man7/ +} + +package_samba () { +pkgdesc="Tools to access a server's filespace and printers via SMB" +backup=(etc/logrotate.d/samba + etc/pam.d/samba + etc/samba/smb.conf + etc/xinetd.d/swat + etc/conf.d/samba) +depends=('db' 'popt' 'libcups' 'acl' 'libldap' "smbclient>=$pkgver" 'libcap' 'krb5' 'pam' 'gamin' 'gnutls' 'e2fsprogs' 'tdb' 'talloc') +install='samba.install' + cd ${srcdir}/samba-${_realver}/source3 + mkdir -p ${pkgdir}/etc/samba/private + chmod 700 ${pkgdir}/etc/samba/private + make DESTDIR=${pkgdir} install + chmod 644 ${pkgdir}/usr/include/*.h + rm -rf ${pkgdir}/usr/var + rm -rf ${pkgdir}/var/run/samba + (cd script; cp installbin.sh i; cat i | sed 's/\/sbin\///' > installbin.sh) + 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 + # 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 ${srcdir}/samba-${_realver}/nsswitch/libnss_wins.so ${pkgdir}/usr/lib/libnss_wins.so + ln -s libnss_wins.so ${pkgdir}/usr/lib/libnss_wins.so.2 + install -D -m755 ${srcdir}/samba-${_realver}/nsswitch/libnss_winbind.so ${pkgdir}/usr/lib/libnss_winbind.so + ln -s libnss_winbind.so ${pkgdir}/usr/lib/libnss_winbind.so.2 + # winbind krb5 locator + mkdir -p ${pkgdir}/usr/lib/krb5/plugins/libkrb5 + install -d -m 0755 ${pkgdir}/usr/lib/krb5/plugins/libkrb5 + install -m 755 bin/winbind_krb5_locator.so ${pkgdir}/usr/lib/krb5/plugins/libkrb5/winbind_krb5_locator.so + # remove conflict files of smbclient + for man in libsmbclient smbspool \ + mount.cifs net cifs.upcall; do + rm -f ${pkgdir}/usr/share/man/man8/${man}.8 + done + for i in libnetapi* libwbclient* libsmbclient* winbind_krb5*;do + rm -f ${pkgdir}/usr/lib/$i + done + for bin in net \ + nmblookup rpcclient smbcacls smbclient \ + smbcquotas smbget smbspool smbtar smbtree; do + rm -f ${pkgdir}/usr/bin/$bin + done + rm -f ${pkgdir}/usr/sbin/cifs.upcall + rm -f ${pkgdir}/usr/include/netapi.h + rm -f ${pkgdir}/usr/include/wbclient.h + for man in rpcclient smbcacls smbclient smbcquotas \ + smbtree smbtar nmblookup smbget; do + rm -f ${pkgdir}/usr/share/man/man1/${man}.1 + done + for man in tdbbackup tdbdump tdbtool; do + rm -f ${pkgdir}/usr/share/man/man8/${man}.8 + done + rm -f ${pkgdir}/usr/share/man/man7/libsmbclient.7 + rm -f ${pkgdir}/usr/include/libsmbclient.h + # copy ldap example + install -D -m644 ${srcdir}/samba-${_realver}/examples/LDAP/samba.schema ${pkgdir}/usr/share/doc/samba/examples/LDAP/samba.schema + # install systemd files + install -d -m755 ${pkgdir}/usr/lib/systemd/system + for i in smbd nmbd swat winbindd; do + install -m644 ${srcdir}/*.service ${pkgdir}/usr/lib/systemd/system/ + install -m644 ${srcdir}/*.socket ${pkgdir}/usr/lib/systemd/system/ + done + # create ephemeral dirs via tmpfiles rather than shipping them in package + install -D -m644 ${srcdir}/samba.conf ${pkgdir}/usr/lib/tmpfiles.d/samba.conf + rm -rf ${pkgdir}/var/run +} +md5sums=('9039e0ab3e4fc632ff0a1a8f2433edb4' + '5697da77590ec092cc8a883bae06093c' + 'a4bbfa39fee95bba2e7ad6b535fae7e6' + '96f82c38f3f540b53f3e5144900acf17' + '5b7496b1b6706cf5a6e91ef879d9be7b' + 'a78b9aa93eb14b0ac445897395693225' + '321afbca6665d8f647c2468906452176' + '9a49f3ee5afd278d21fcdd34776c5da1' + '6db11f3dd2112a4b7a73007b189bef3f' + 'b0de262f9c62acd162e873658f33d063' + 'de93ae37dd76a2cd2cdab6d342e5baf3' + '49abd7b719e3713a3f75a8a50958e381') Copied: samba/repos/extra-i686/nmbd.service (from rev 176100, samba/trunk/nmbd.service) =================================================================== --- extra-i686/nmbd.service (rev 0) +++ extra-i686/nmbd.service 2013-01-27 12:37:46 UTC (rev 176101) @@ -0,0 +1,12 @@ +[Unit] +Description=Samba NetBIOS name server +After=network.target + +[Service] +Type=forking +PIDFile=/var/run/samba/nmbd.pid +ExecStart=/usr/sbin/nmbd -F +ExecReload=/bin/kill -HUP $MAINPID + +[Install] +WantedBy=multi-user.target Copied: samba/repos/extra-i686/samba (from rev 176100, samba/trunk/samba) =================================================================== --- extra-i686/samba (rev 0) +++ extra-i686/samba 2013-01-27 12:37:46 UTC (rev 176101) @@ -0,0 +1,54 @@ +#!/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" + if [ ! -x /var/log/samba ] ; then + install -m755 -d /var/log/samba + fi + 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 /run/samba/smbd.pid &>/dev/null + rm /run/samba/nmbd.pid &>/dev/null + rm /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 Copied: samba/repos/extra-i686/samba.conf (from rev 176100, samba/trunk/samba.conf) =================================================================== --- extra-i686/samba.conf (rev 0) +++ extra-i686/samba.conf 2013-01-27 12:37:46 UTC (rev 176101) @@ -0,0 +1,2 @@ +D /run/samba 0755 - - - +d /var/log/samba 0755 - - - \ No newline at end of file Copied: samba/repos/extra-i686/samba.conf.d (from rev 176100, samba/trunk/samba.conf.d) =================================================================== --- extra-i686/samba.conf.d (rev 0) +++ extra-i686/samba.conf.d 2013-01-27 12:37:46 UTC (rev 176101) @@ -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) Copied: samba/repos/extra-i686/samba.install (from rev 176100, samba/trunk/samba.install) =================================================================== --- extra-i686/samba.install (rev 0) +++ extra-i686/samba.install 2013-01-27 12:37:46 UTC (rev 176101) @@ -0,0 +1,7 @@ +#!/bin/sh + +post_install() { + systemd-tmpfiles --create /usr/lib/tmpfiles.d/samba.conf +} + +# vim:set ts=2 sw=2 et: Copied: samba/repos/extra-i686/samba.logrotate (from rev 176100, samba/trunk/samba.logrotate) =================================================================== --- extra-i686/samba.logrotate (rev 0) +++ extra-i686/samba.logrotate 2013-01-27 12:37:46 UTC (rev 176101) @@ -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 +} Copied: samba/repos/extra-i686/samba.pam (from rev 176100, samba/trunk/samba.pam) =================================================================== --- extra-i686/samba.pam (rev 0) +++ extra-i686/samba.pam 2013-01-27 12:37:46 UTC (rev 176101) @@ -0,0 +1,3 @@ +auth required pam_unix.so +account required pam_unix.so +session required pam_unix.so Copied: samba/repos/extra-i686/smbd.service (from rev 176100, samba/trunk/smbd.service) =================================================================== --- extra-i686/smbd.service (rev 0) +++ extra-i686/smbd.service 2013-01-27 12:37:46 UTC (rev 176101) @@ -0,0 +1,12 @@ +[Unit] +Description=Samba SMB/CIFS server +After=network.target nmbd.service winbindd.service + +[Service] +Type=forking +PIDFile=/var/run/samba/smbd.pid +ExecStart=/usr/sbin/smbd -D +ExecReload=/bin/kill -HUP $MAINPID + +[Install] +WantedBy=multi-user.target Deleted: extra-i686/smbd.socket =================================================================== --- extra-i686/smbd.socket 2013-01-27 12:32:31 UTC (rev 176100) +++ extra-i686/smbd.socket 2013-01-27 12:37:46 UTC (rev 176101) @@ -1,9 +0,0 @@ -[Unit] -Description=Samba SMB/CIFS server socket - -[Socket] -ListenStream=445 -Accept=yes - -[Install] -WantedBy=sockets.target Copied: samba/repos/extra-i686/smbd.socket (from rev 176100, samba/trunk/smbd.socket) =================================================================== --- extra-i686/smbd.socket (rev 0) +++ extra-i686/smbd.socket 2013-01-27 12:37:46 UTC (rev 176101) @@ -0,0 +1,9 @@ +[Unit] +Description=Samba SMB/CIFS server socket + +[Socket] +ListenStream=445 +Accept=yes + +[Install] +WantedBy=sockets.target Deleted: extra-i686/smbd@.service =================================================================== --- extra-i686/smbd@.service 2013-01-27 12:32:31 UTC (rev 176100) +++ extra-i686/smbd@.service 2013-01-27 12:37:46 UTC (rev 176101) @@ -1,9 +0,0 @@ -[Unit] -Description=Samba SMB/CIFS server instance - -[Service] -Type=forking -PIDFile=/var/run/samba/smbd.pid -ExecStart=/usr/sbin/smbd -D -ExecReload=/bin/kill -HUP $MAINPID -StandardInput=socket Copied: samba/repos/extra-i686/smbd@.service (from rev 176100, samba/trunk/smbd@.service) =================================================================== --- extra-i686/smbd@.service (rev 0) +++ extra-i686/smbd@.service 2013-01-27 12:37:46 UTC (rev 176101) @@ -0,0 +1,9 @@ +[Unit] +Description=Samba SMB/CIFS server instance + +[Service] +Type=forking +PIDFile=/var/run/samba/smbd.pid +ExecStart=/usr/sbin/smbd -D +ExecReload=/bin/kill -HUP $MAINPID +StandardInput=socket Deleted: extra-i686/swat.socket =================================================================== --- extra-i686/swat.socket 2013-01-27 12:32:31 UTC (rev 176100) +++ extra-i686/swat.socket 2013-01-27 12:37:46 UTC (rev 176101) @@ -1,9 +0,0 @@ -[Unit] -Description=SWAT Samba Web Admin Tool - -[Socket] -ListenStream=127.0.0.1:901 -Accept=true - -[Install] -WantedBy=sockets.target Copied: samba/repos/extra-i686/swat.socket (from rev 176100, samba/trunk/swat.socket) =================================================================== --- extra-i686/swat.socket (rev 0) +++ extra-i686/swat.socket 2013-01-27 12:37:46 UTC (rev 176101) @@ -0,0 +1,9 @@ +[Unit] +Description=SWAT Samba Web Admin Tool + +[Socket] +ListenStream=127.0.0.1:901 +Accept=true + +[Install] +WantedBy=sockets.target Copied: samba/repos/extra-i686/swat.xinetd (from rev 176100, samba/trunk/swat.xinetd) =================================================================== --- extra-i686/swat.xinetd (rev 0) +++ extra-i686/swat.xinetd 2013-01-27 12:37:46 UTC (rev 176101) @@ -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 +} Deleted: extra-i686/swat@.service =================================================================== --- extra-i686/swat@.service 2013-01-27 12:32:31 UTC (rev 176100) +++ extra-i686/swat@.service 2013-01-27 12:37:46 UTC (rev 176101) @@ -1,7 +0,0 @@ -[Unit] -Description=SWAT Samba Web Admin Tool -After=local-fs.target - -[Service] -ExecStart=/usr/sbin/swat -StandardInput=socket Copied: samba/repos/extra-i686/swat@.service (from rev 176100, samba/trunk/swat@.service) =================================================================== --- extra-i686/swat@.service (rev 0) +++ extra-i686/swat@.service 2013-01-27 12:37:46 UTC (rev 176101) @@ -0,0 +1,7 @@ +[Unit] +Description=SWAT Samba Web Admin Tool +After=local-fs.target + +[Service] +ExecStart=/usr/sbin/swat +StandardInput=socket Copied: samba/repos/extra-i686/winbindd.service (from rev 176100, samba/trunk/winbindd.service) =================================================================== --- extra-i686/winbindd.service (rev 0) +++ extra-i686/winbindd.service 2013-01-27 12:37:46 UTC (rev 176101) @@ -0,0 +1,12 @@ +[Unit] +Description=Samba Winbind daemon +After=network.target nmbd.service + +[Service] +Type=forking +PIDFile=/var/run/samba/winbindd.pid +ExecStart=/usr/sbin/winbindd -F +ExecReload=/bin/kill -HUP $MAINPID + +[Install] +WantedBy=multi-user.target Copied: samba/repos/extra-x86_64/PKGBUILD (from rev 176100, samba/trunk/PKGBUILD) =================================================================== --- extra-x86_64/PKGBUILD (rev 0) +++ extra-x86_64/PKGBUILD 2013-01-27 12:37:46 UTC (rev 176101) @@ -0,0 +1,177 @@ +# $Id$ +# Maintainer: Tobias Powalowski <tp...@archlinux.org> +# Contributor: judd <jvi...@zeroflux.org> +pkgbase=samba +pkgname=('libwbclient' 'smbclient' 'samba') +pkgver=3.6.11 +# 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.6.11 +pkgrel=2 +arch=(i686 x86_64) +url="http://www.samba.org" +license=('GPL3') +makedepends=('db' 'popt' 'libcups' 'acl' 'libldap' 'libcap' 'krb5' 'pam' 'gamin' 'gnutls>=2.4.1' 'talloc' 'tdb') +source=(http://us1.samba.org/samba/ftp/stable/${pkgbase}-${_realver}.tar.gz + samba.logrotate + swat.xinetd + samba.pam + smbd.service + smbd.socket + smbd@.service + nmbd.service + swat.socket + swat@.service + winbindd.service + samba.conf) +### UNINSTALL dmapi package before building!!! + +build() { + cd ${srcdir}/${pkgbase}-${_realver}/source3 + ./configure --prefix=/usr \ + --libdir=/usr/lib/ \ + --localstatedir=/var \ + --with-configdir=/etc/samba \ + --with-lockdir=/var/cache/samba \ + --with-piddir=/var/run/samba \ + --with-fhs \ + --with-pam \ + --with-pam_smbpass \ + --with-pammodulesdir=/usr/lib/security \ + --with-dnsupdate \ + --with-automount \ + --with-quotas \ + --with-ads \ + --with-acl-support \ + --with-libsmbclient \ + --with-syslog \ + --enable-external-libtalloc \ + --disable-dnssd \ + --disable-avahi \ + --with-shared-modules=idmap_ad,idmap_adex,idmap_rid,idmap_hash,idmap_tdb2 \ + --enable-external-libtdb + make +} + +package_libwbclient () { +pkgdesc="Samba winbind client library" +depends=('glibc') + cd ${srcdir}/${pkgbase}-${_realver}/source3 + mkdir -p ${pkgdir}/usr/lib + for i in libwbclient*; do + cp -a bin/${i}*.so* ${pkgdir}/usr/lib/ + done + install -D -m644 pkgconfig/wbclient.pc ${pkgdir}/usr/lib/pkgconfig/wbclient.pc + install -D -m644 ../nsswitch/libwbclient/wbclient.h ${pkgdir}/usr/include/wbclient.h +} + +package_smbclient () { +pkgdesc="Tools to access a server's filespace and printers via SMB" +depends=('readline' 'popt' 'libldap' 'cifs-utils' 'libcap' 'krb5' 'db' 'e2fsprogs' 'tdb' 'talloc' 'libwbclient') + cd ${srcdir}/${pkgbase}-${_realver}/source3 + mkdir -p ${pkgdir}/usr/bin ${pkgdir}/usr/lib + install -m755 bin/{smbclient,rpcclient,smbspool,smbtree,smbcacls,smbcquotas,smbget,net,nmblookup} ${pkgdir}/usr/bin/ + for i in libnetapi* libsmbclient*;do + cp -a bin/${i}*.so* ${pkgdir}/usr/lib/ + done + install -m755 script/smbtar ${pkgdir}/usr/bin/ + mkdir -p ${pkgdir}/usr/lib/cups/backend + ln -sf /usr/bin/smbspool ${pkgdir}/usr/lib/cups/backend/smb + mkdir -p ${pkgdir}/usr/include + install -m644 include/libsmbclient.h ${pkgdir}/usr/include/ + install -m644 lib/netapi/netapi.h ${pkgdir}/usr/include/ + mkdir -p ${pkgdir}/usr/share/man/man{1,7} + for man in rpcclient smbcacls smbclient smbcquotas smbget \ + smbtree smbtar nmblookup; do + install -m644 ../docs/manpages/${man}.1 ${pkgdir}/usr/share/man/man1/ + done + install -m644 ../docs/manpages/libsmbclient.7 ${pkgdir}/usr/share/man/man7/ +} + +package_samba () { +pkgdesc="Tools to access a server's filespace and printers via SMB" +backup=(etc/logrotate.d/samba + etc/pam.d/samba + etc/samba/smb.conf + etc/xinetd.d/swat + etc/conf.d/samba) +depends=('db' 'popt' 'libcups' 'acl' 'libldap' "smbclient>=$pkgver" 'libcap' 'krb5' 'pam' 'gamin' 'gnutls' 'e2fsprogs' 'tdb' 'talloc') +install='samba.install' + cd ${srcdir}/samba-${_realver}/source3 + mkdir -p ${pkgdir}/etc/samba/private + chmod 700 ${pkgdir}/etc/samba/private + make DESTDIR=${pkgdir} install + chmod 644 ${pkgdir}/usr/include/*.h + rm -rf ${pkgdir}/usr/var + rm -rf ${pkgdir}/var/run/samba + (cd script; cp installbin.sh i; cat i | sed 's/\/sbin\///' > installbin.sh) + 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 + # 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 ${srcdir}/samba-${_realver}/nsswitch/libnss_wins.so ${pkgdir}/usr/lib/libnss_wins.so + ln -s libnss_wins.so ${pkgdir}/usr/lib/libnss_wins.so.2 + install -D -m755 ${srcdir}/samba-${_realver}/nsswitch/libnss_winbind.so ${pkgdir}/usr/lib/libnss_winbind.so + ln -s libnss_winbind.so ${pkgdir}/usr/lib/libnss_winbind.so.2 + # winbind krb5 locator + mkdir -p ${pkgdir}/usr/lib/krb5/plugins/libkrb5 + install -d -m 0755 ${pkgdir}/usr/lib/krb5/plugins/libkrb5 + install -m 755 bin/winbind_krb5_locator.so ${pkgdir}/usr/lib/krb5/plugins/libkrb5/winbind_krb5_locator.so + # remove conflict files of smbclient + for man in libsmbclient smbspool \ + mount.cifs net cifs.upcall; do + rm -f ${pkgdir}/usr/share/man/man8/${man}.8 + done + for i in libnetapi* libwbclient* libsmbclient* winbind_krb5*;do + rm -f ${pkgdir}/usr/lib/$i + done + for bin in net \ + nmblookup rpcclient smbcacls smbclient \ + smbcquotas smbget smbspool smbtar smbtree; do + rm -f ${pkgdir}/usr/bin/$bin + done + rm -f ${pkgdir}/usr/sbin/cifs.upcall + rm -f ${pkgdir}/usr/include/netapi.h + rm -f ${pkgdir}/usr/include/wbclient.h + for man in rpcclient smbcacls smbclient smbcquotas \ + smbtree smbtar nmblookup smbget; do + rm -f ${pkgdir}/usr/share/man/man1/${man}.1 + done + for man in tdbbackup tdbdump tdbtool; do + rm -f ${pkgdir}/usr/share/man/man8/${man}.8 + done + rm -f ${pkgdir}/usr/share/man/man7/libsmbclient.7 + rm -f ${pkgdir}/usr/include/libsmbclient.h + # copy ldap example + install -D -m644 ${srcdir}/samba-${_realver}/examples/LDAP/samba.schema ${pkgdir}/usr/share/doc/samba/examples/LDAP/samba.schema + # install systemd files + install -d -m755 ${pkgdir}/usr/lib/systemd/system + for i in smbd nmbd swat winbindd; do + install -m644 ${srcdir}/*.service ${pkgdir}/usr/lib/systemd/system/ + install -m644 ${srcdir}/*.socket ${pkgdir}/usr/lib/systemd/system/ + done + # create ephemeral dirs via tmpfiles rather than shipping them in package + install -D -m644 ${srcdir}/samba.conf ${pkgdir}/usr/lib/tmpfiles.d/samba.conf + rm -rf ${pkgdir}/var/run +} +md5sums=('9039e0ab3e4fc632ff0a1a8f2433edb4' + '5697da77590ec092cc8a883bae06093c' + 'a4bbfa39fee95bba2e7ad6b535fae7e6' + '96f82c38f3f540b53f3e5144900acf17' + '5b7496b1b6706cf5a6e91ef879d9be7b' + 'a78b9aa93eb14b0ac445897395693225' + '321afbca6665d8f647c2468906452176' + '9a49f3ee5afd278d21fcdd34776c5da1' + '6db11f3dd2112a4b7a73007b189bef3f' + 'b0de262f9c62acd162e873658f33d063' + 'de93ae37dd76a2cd2cdab6d342e5baf3' + '49abd7b719e3713a3f75a8a50958e381') Copied: samba/repos/extra-x86_64/nmbd.service (from rev 176100, samba/trunk/nmbd.service) =================================================================== --- extra-x86_64/nmbd.service (rev 0) +++ extra-x86_64/nmbd.service 2013-01-27 12:37:46 UTC (rev 176101) @@ -0,0 +1,12 @@ +[Unit] +Description=Samba NetBIOS name server +After=network.target + +[Service] +Type=forking +PIDFile=/var/run/samba/nmbd.pid +ExecStart=/usr/sbin/nmbd -F +ExecReload=/bin/kill -HUP $MAINPID + +[Install] +WantedBy=multi-user.target Copied: samba/repos/extra-x86_64/samba (from rev 176100, samba/trunk/samba) =================================================================== --- extra-x86_64/samba (rev 0) +++ extra-x86_64/samba 2013-01-27 12:37:46 UTC (rev 176101) @@ -0,0 +1,54 @@ +#!/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" + if [ ! -x /var/log/samba ] ; then + install -m755 -d /var/log/samba + fi + 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 /run/samba/smbd.pid &>/dev/null + rm /run/samba/nmbd.pid &>/dev/null + rm /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 Copied: samba/repos/extra-x86_64/samba.conf (from rev 176100, samba/trunk/samba.conf) =================================================================== --- extra-x86_64/samba.conf (rev 0) +++ extra-x86_64/samba.conf 2013-01-27 12:37:46 UTC (rev 176101) @@ -0,0 +1,2 @@ +D /run/samba 0755 - - - +d /var/log/samba 0755 - - - \ No newline at end of file Copied: samba/repos/extra-x86_64/samba.conf.d (from rev 176100, samba/trunk/samba.conf.d) =================================================================== --- extra-x86_64/samba.conf.d (rev 0) +++ extra-x86_64/samba.conf.d 2013-01-27 12:37:46 UTC (rev 176101) @@ -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) Copied: samba/repos/extra-x86_64/samba.install (from rev 176100, samba/trunk/samba.install) =================================================================== --- extra-x86_64/samba.install (rev 0) +++ extra-x86_64/samba.install 2013-01-27 12:37:46 UTC (rev 176101) @@ -0,0 +1,7 @@ +#!/bin/sh + +post_install() { + systemd-tmpfiles --create /usr/lib/tmpfiles.d/samba.conf +} + +# vim:set ts=2 sw=2 et: Copied: samba/repos/extra-x86_64/samba.logrotate (from rev 176100, samba/trunk/samba.logrotate) =================================================================== --- extra-x86_64/samba.logrotate (rev 0) +++ extra-x86_64/samba.logrotate 2013-01-27 12:37:46 UTC (rev 176101) @@ -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 +} Copied: samba/repos/extra-x86_64/samba.pam (from rev 176100, samba/trunk/samba.pam) =================================================================== --- extra-x86_64/samba.pam (rev 0) +++ extra-x86_64/samba.pam 2013-01-27 12:37:46 UTC (rev 176101) @@ -0,0 +1,3 @@ +auth required pam_unix.so +account required pam_unix.so +session required pam_unix.so Copied: samba/repos/extra-x86_64/smbd.service (from rev 176100, samba/trunk/smbd.service) =================================================================== --- extra-x86_64/smbd.service (rev 0) +++ extra-x86_64/smbd.service 2013-01-27 12:37:46 UTC (rev 176101) @@ -0,0 +1,12 @@ +[Unit] +Description=Samba SMB/CIFS server +After=network.target nmbd.service winbindd.service + +[Service] +Type=forking +PIDFile=/var/run/samba/smbd.pid +ExecStart=/usr/sbin/smbd -D +ExecReload=/bin/kill -HUP $MAINPID + +[Install] +WantedBy=multi-user.target Deleted: extra-x86_64/smbd.socket =================================================================== --- extra-x86_64/smbd.socket 2013-01-27 12:32:31 UTC (rev 176100) +++ extra-x86_64/smbd.socket 2013-01-27 12:37:46 UTC (rev 176101) @@ -1,9 +0,0 @@ -[Unit] -Description=Samba SMB/CIFS server socket - -[Socket] -ListenStream=445 -Accept=yes - -[Install] -WantedBy=sockets.target Copied: samba/repos/extra-x86_64/smbd.socket (from rev 176100, samba/trunk/smbd.socket) =================================================================== --- extra-x86_64/smbd.socket (rev 0) +++ extra-x86_64/smbd.socket 2013-01-27 12:37:46 UTC (rev 176101) @@ -0,0 +1,9 @@ +[Unit] +Description=Samba SMB/CIFS server socket + +[Socket] +ListenStream=445 +Accept=yes + +[Install] +WantedBy=sockets.target Deleted: extra-x86_64/smbd@.service =================================================================== --- extra-x86_64/smbd@.service 2013-01-27 12:32:31 UTC (rev 176100) +++ extra-x86_64/smbd@.service 2013-01-27 12:37:46 UTC (rev 176101) @@ -1,9 +0,0 @@ -[Unit] -Description=Samba SMB/CIFS server instance - -[Service] -Type=forking -PIDFile=/var/run/samba/smbd.pid -ExecStart=/usr/sbin/smbd -D -ExecReload=/bin/kill -HUP $MAINPID -StandardInput=socket Copied: samba/repos/extra-x86_64/smbd@.service (from rev 176100, samba/trunk/smbd@.service) =================================================================== --- extra-x86_64/smbd@.service (rev 0) +++ extra-x86_64/smbd@.service 2013-01-27 12:37:46 UTC (rev 176101) @@ -0,0 +1,9 @@ +[Unit] +Description=Samba SMB/CIFS server instance + +[Service] +Type=forking +PIDFile=/var/run/samba/smbd.pid +ExecStart=/usr/sbin/smbd -D +ExecReload=/bin/kill -HUP $MAINPID +StandardInput=socket Deleted: extra-x86_64/swat.socket =================================================================== --- extra-x86_64/swat.socket 2013-01-27 12:32:31 UTC (rev 176100) +++ extra-x86_64/swat.socket 2013-01-27 12:37:46 UTC (rev 176101) @@ -1,9 +0,0 @@ -[Unit] -Description=SWAT Samba Web Admin Tool - -[Socket] -ListenStream=127.0.0.1:901 -Accept=true - -[Install] -WantedBy=sockets.target Copied: samba/repos/extra-x86_64/swat.socket (from rev 176100, samba/trunk/swat.socket) =================================================================== --- extra-x86_64/swat.socket (rev 0) +++ extra-x86_64/swat.socket 2013-01-27 12:37:46 UTC (rev 176101) @@ -0,0 +1,9 @@ +[Unit] +Description=SWAT Samba Web Admin Tool + +[Socket] +ListenStream=127.0.0.1:901 +Accept=true + +[Install] +WantedBy=sockets.target Copied: samba/repos/extra-x86_64/swat.xinetd (from rev 176100, samba/trunk/swat.xinetd) =================================================================== --- extra-x86_64/swat.xinetd (rev 0) +++ extra-x86_64/swat.xinetd 2013-01-27 12:37:46 UTC (rev 176101) @@ -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 +} Deleted: extra-x86_64/swat@.service =================================================================== --- extra-x86_64/swat@.service 2013-01-27 12:32:31 UTC (rev 176100) +++ extra-x86_64/swat@.service 2013-01-27 12:37:46 UTC (rev 176101) @@ -1,7 +0,0 @@ -[Unit] -Description=SWAT Samba Web Admin Tool -After=local-fs.target - -[Service] -ExecStart=/usr/sbin/swat -StandardInput=socket Copied: samba/repos/extra-x86_64/swat@.service (from rev 176100, samba/trunk/swat@.service) =================================================================== --- extra-x86_64/swat@.service (rev 0) +++ extra-x86_64/swat@.service 2013-01-27 12:37:46 UTC (rev 176101) @@ -0,0 +1,7 @@ +[Unit] +Description=SWAT Samba Web Admin Tool +After=local-fs.target + +[Service] +ExecStart=/usr/sbin/swat +StandardInput=socket Copied: samba/repos/extra-x86_64/winbindd.service (from rev 176100, samba/trunk/winbindd.service) =================================================================== --- extra-x86_64/winbindd.service (rev 0) +++ extra-x86_64/winbindd.service 2013-01-27 12:37:46 UTC (rev 176101) @@ -0,0 +1,12 @@ +[Unit] +Description=Samba Winbind daemon +After=network.target nmbd.service + +[Service] +Type=forking +PIDFile=/var/run/samba/winbindd.pid +ExecStart=/usr/sbin/winbindd -F +ExecReload=/bin/kill -HUP $MAINPID + +[Install] +WantedBy=multi-user.target