diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2013-10-31 19:00:30 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2013-11-01 08:42:43 +0000 |
commit | 10d822b36efb98cdf117e71ee302c53573c9015b (patch) | |
tree | 23c40b4221362ce6afb07a29c42680344f7ed724 /main/samba | |
parent | 2dcd1f62c3a2f73c982a2e0952ea0099a088b82d (diff) | |
download | aports-10d822b36efb98cdf117e71ee302c53573c9015b.tar.bz2 aports-10d822b36efb98cdf117e71ee302c53573c9015b.tar.xz |
main/samba: upgrade to 4.1
Diffstat (limited to 'main/samba')
-rw-r--r-- | main/samba/APKBUILD | 240 | ||||
-rw-r--r-- | main/samba/ld_library_path.patch | 18 | ||||
-rw-r--r--[-rwxr-xr-x] | main/samba/samba.initd | 10 |
3 files changed, 194 insertions, 74 deletions
diff --git a/main/samba/APKBUILD b/main/samba/APKBUILD index 86577e0e4..ccbaa316c 100644 --- a/main/samba/APKBUILD +++ b/main/samba/APKBUILD @@ -1,27 +1,33 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=samba -pkgver=3.6.19 +pkgver=4.1.0 pkgrel=1 pkgdesc="Tools to access a server's filespace and printers via SMB" url="http://www.samba.org" arch="all" license="GPL3" -subpackages="$pkgname-dev $pkgname-doc winbind $pkgname-common - $pkgname-initscript tdb libsmbclient $pkgname-client $pkgname-lang" -depends="samba-initscript samba-client" +subpackages="$pkgname-dev $pkgname-doc $pkgname-common $pkgname-initscript + libsmbclient $pkgname-client + $pkgname-dc $pkgname-dc-libs:_dc_libs + $pkgname-winbind libwbclient $pkgname-winbind-clients:_winbind_clients + $pkgname-winbind-krb5-locator:_winbind_krb5_locator + $pkgname-pidl py-$pkgname:_py $pkgname-test:_test + $pkgname-libs" +depends="$pkgname-initscript $pkgname-client" +# note that heimdal is required (over mit krb5) for AD DC functionality makedepends="popt-dev ncurses-dev openldap-dev heimdal-dev e2fsprogs-dev - libiconv-dev talloc-dev tevent-dev cups-dev perl" -source="http://us1.$pkgname.org/$pkgname/ftp/stable/$pkgname-$pkgver.tar.gz + libiconv-dev talloc-dev tdb-dev ldb-dev cups-dev python-dev libcap-dev + tevent-dev iniparser-dev perl subunit-dev" +source="http://us1.samba.org/samba/ftp/stable/samba-$pkgver.tar.gz samba.initd samba.confd samba.logrotate " pkggroups="winbind" -_builddir="$srcdir"/$pkgname-$pkgver +_builddir="$srcdir"/samba-$pkgver prepare() { cd "$_builddir" - update_config_sub || return 1 for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; @@ -30,42 +36,42 @@ prepare() { } build() { - cd "$_builddir"/source3 - ./configure \ - --build=$CBUILD \ - --host=$CHOST \ - --prefix=/usr \ + cd "$_builddir" + local _jobs=$JOBS + if [ -z "$_jobs" ]; then + _jobs=$(awk '/^core id/ {n++} END{print n}' /proc/cpuinfo) + fi + ./configure --prefix=/usr \ + --jobs=${_jobs:-2} \ --sysconfdir=/etc/samba \ --with-configdir=/etc/samba \ --localstatedir=/var \ - --with-fhs \ + --enable-fhs \ --with-lockdir=/var/cache/samba \ --with-piddir=/var/run/samba \ --with-logfilebase=/var/log/samba \ --without-pam \ --with-ads \ - --with-krb5 \ - --with-libsmbclient \ - --with-shared-modules=idmap_rid,imap_ad \ + --with-shared-modules=idmap_ad,idmap_rid,idmap_adex,idmap_hash,idmap_tdb2,pdb_tdbsam,pdb_ldap,pdb_ads,pdb_smbpasswd,pdb_wbc_sam,pdb_samba4,auth_unix,auth_wbc,auth_server,auth_netlogond,auth_script,auth_samba4 \ --enable-cups \ - --enable-external-libtalloc \ - --disable-nss-wrapper \ - --disable-dnssd \ - --disable-swat \ + --without-gettext \ + --bundled-libraries=NONE,ntdb \ || return 1 make || return 1 } package() { - cd "$_builddir"/source3 + cd "$_builddir" make DESTDIR="$pkgdir" install install -d "$pkgdir"/var/log/samba \ - "$pkgdir"/usr/share/doc/samba - cd "$srcdir"/$pkgname-$pkgver - cp -r examples "$pkgdir"/usr/share/doc/samba/ - install -D packaging/RHEL/setup/smbusers "$pkgdir"/etc/samba/smbusers - install -Dm644 ../samba.logrotate "$pkgdir"/etc/logrotate.d/samba + "$pkgdir"/usr/share/doc/samba \ + || return 1 + install -D packaging/RHEL/setup/smbusers "$pkgdir"/etc/samba/smbusers \ + || return 1 + install -m 0744 packaging/printing/smbprint "$pkgdir"/usr/bin/smbprint \ + || return 1 + install -Dm644 "$srcdir"/samba.logrotate "$pkgdir"/etc/logrotate.d/samba } initscript() { @@ -83,48 +89,25 @@ _mv_files() { done } -winbind() { - pkgdesc="Samba user and group resolver" - depends= - install="winbind.pre-install winbind.pre-upgrade winbind.post-install - winbind.post-upgrade" - replaces="samba" - cd "$pkgdir" - _mv_files \ - usr/bin/wbinfo \ - usr/bin/ntlm_auth \ - usr/sbin/winbindd \ - usr/lib/samba/idmap - install -d -g winbind -m 750 \ - "$subpkgdir"/var/cache/samba/winbindd_privileged -} - common() { pkgdesc="Samba common files for both client an servers" depends= - # we have moved libwbclient and libnetapi to samba-common + # we have moved libnetapi to samba-common replaces="winbind samba" cd "$pkgdir" _mv_files \ usr/bin/net \ - usr/bin/nmblookup \ - usr/bin/smbpasswd \ + usr/bin/pdbedit \ + usr/bin/profiles \ + usr/bin/smbcontrol \ usr/bin/testparm \ - usr/lib/samba/*.dat \ + usr/share/samba/codepages \ usr/lib/libnetapi.so.* \ - usr/lib/libwbclient* \ var/run/samba \ var/cache/samba \ - var/log/samba -} - -tdb() { - pkgdesc="Trivial database" - depends= - cd "$pkgdir" - _mv_files \ - usr/lib/libtdb* \ - usr/bin/tdb* + var/log/samba \ + || return 1 + install -d -m 700 "$subpkgdir"/var/lib/samba/private } libsmbclient() { @@ -144,29 +127,152 @@ client() { depends= cd "$pkgdir" _mv_files \ + usr/bin/cifsdd \ + usr/bin/dbwrap_tool \ + usr/bin/nmblookup \ + usr/bin/nmblookup4 \ + usr/bin/oLschema2ldif \ + usr/bin/regdiff \ + usr/bin/regpatch \ + usr/bin/regshell \ + usr/bin/regtree \ usr/bin/rpcclient \ + usr/bin/sharesec \ usr/bin/smbcacls \ - usr/bin/findsmb \ - usr/bin/smbget \ usr/bin/smbclient \ + usr/bin/smbclient4 \ usr/bin/smbcquotas \ + usr/bin/smbget \ + usr/bin/smbpasswd \ + usr/bin/smbprint \ usr/bin/smbspool \ + usr/bin/smbta-util \ usr/bin/smbtar \ usr/bin/smbtree \ - usr/bin/sharesec \ || return 1 } +dc() { + pkgdesc="Samba AD Domain Controller" + cd "$pkgdir" + _mv_files \ + usr/bin/samba-tool \ + usr/sbin/samba* \ + usr/lib/samba/ldb \ + usr/lib/samba/libpac.so \ + usr/lib/samba/gensec \ + usr/lib/samba/bind9/dlz_bind9.so \ + usr/lib/mit_samba.so \ + || return 1 + install -d -m 0755 "$subpkgdir"/var/lib/samba/sysvol || return 1 +} + +_dc_libs() { + pkgdesc="Samba AD Domain Controller libraries" + cd "$pkgdir" + _mv_files \ + usr/lib/samba/bind9/dlz_bind9_9.so \ + usr/lib/samba/libprocess_model.so \ + usr/lib/samba/libservice.so \ + usr/lib/samba/service \ + usr/lib/samba/libdsdb-module.so \ + usr/lib/samba/libntvfs.so \ + usr/lib/samba/libposix_eadb.so \ + usr/lib/libdcerpc-server.so.* \ + || return 1 +} + +winbind() { + pkgdesc="Samba user and group resolver" + depends= + install="winbind.pre-install winbind.pre-upgrade winbind.post-install + winbind.post-upgrade" + replaces="winbind" + cd "$pkgdir" + _mv_files \ + usr/sbin/winbindd \ + usr/lib/samba/idmap \ + usr/lib/samba/nss_info \ + usr/lib/samba/libidmap.so \ + || return 1 + install -d -g winbind -m 750 \ + "$subpkgdir"/var/cache/samba/winbindd_privileged +} + +libwbclient() { + pkgdesc="Samba winbind client libraries" + # we have moved libwbclient from samba-common + replaces="samba-common winbind" + cd "$pkgdir" + _mv_files \ + usr/lib/libwbclient.so.* \ + usr/lib/samba/libwinbind-client.so \ + || return 1 +} + +_winbind_clients() { + pkgdesc="Samba winbind clients" + replaces="winbind" + cd "$pkgdir" + _mv_files \ + usr/bin/ntlm_auth \ + usr/bin/wbinfo \ + usr/lib/libnss_winbind.so* \ + usr/lib/libnss_wins.so* \ + || return 1 +} + +_winbind_krb5_locator() { + pkgdesc="Samba winbind krb5 locator" + cd "$pkgdir" + _mv_files \ + usr/lib/winbind_krb5_locator.so \ + || return 1 +} + +pidl() { + pkgdesc="Perl IDL compiler" + mkdir -p "$subpkgdir"/usr/share + mv "$pkgdir"/usr/share/perl* "$subpkgdir"/usr/share/ +} + +_py() { + pkgdesc="Samba python libraries" + mkdir -p "$subpkgdir"/usr/lib + mv "$pkgdir"/usr/lib/python* "$subpkgdir"/usr/lib/ +} + +_test() { + pkgdesc="Samba server and client testing tools" + mkdir -p "$subpkgdir"/usr/bin "$subpkgdir"/usr/lib/samba + mv "$pkgdir"/usr/bin/*test \ + "$pkgdir"/usr/bin/ndrdump \ + "$pkgdir"/usr/bin/smbtorture \ + "$subpkgdir"/usr/bin/ || return 1 + mv "$pkgdir"/usr/lib/libtorture.so.* \ + "$subpkgdir"/usr/lib/ || return 1 + mv "$pkgdir"/usr/lib/samba/*torture* \ + "$subpkgdir"/usr/lib/samba/ || return 1 +} + +libs() { + pkgdesc="Samba libraries" + cd "$pkgdir" + _mv_files \ + usr/lib/lib*.so.* \ + usr/lib/samba/lib* \ + || return 1 +} -md5sums="afe9c7c590f3093555cd6e870d2532e1 samba-3.6.19.tar.gz -0379191dd9f4e4ff07d520c53778ac04 samba.initd +md5sums="f448d18ae678c72afb72e0510cd69710 samba-4.1.0.tar.gz +044c756d3c33c2d610c40bcd76cfb75c samba.initd c150433426e18261e6e3eed3930e1a76 samba.confd b7cafabfb4fa5b3ab5f2e857d8d1c733 samba.logrotate" -sha256sums="addecc6acb05d3ffd0934f7f91d8e83852705b9e858e13c506e51c297259a92e samba-3.6.19.tar.gz -779feccabc7f2d6d421fc82ab07a2c1757877d54069084bea95fbfe715f6632d samba.initd +sha256sums="ca56ed4fc34cea8198d79ebbfe9ca555eedd884ed24da9348f439910c28c5f12 samba-4.1.0.tar.gz +86646cb845aababd9e8655994379526f03327a2cc33b489c3a7dea83ab689c8f samba.initd 1d12f98a7727967b04eb123109b34cfffef320822dc0e8059286b6e3394c3fc0 samba.confd 4c2b7d529126b2fc4f62fb09d99e49a87632d723a2d9d289a61e37dd84145be1 samba.logrotate" -sha512sums="5d1fcb4b178536061e7ae7a61befbb84c5fce0dba805345a25ad3d393f04068f0ade719aaed42844d4541e64d6cbed28a06b0793e1c74431a4ad5a2cba6bdcc5 samba-3.6.19.tar.gz -9c00cf3965fbecfb82925828c8d76221e508dd5c8caf524016833d27bd1e6a1f032e652227b9b67b0a4f48bcc81f4e2fe66febc84f5e7e3e90f83a54c3ddf3f5 samba.initd +sha512sums="f03f40641a7ec9f20b88bef6c3d4b84184690599a34c9b1522e21ab590bf8924ed501cd5aef24565d9b019ef101fc8a78fe2e87ed74352c3c1c95374728aaaf0 samba-4.1.0.tar.gz +59d05252b8ebbe6ba6a419edc86b66b9541d0bac9dbe810cccb20e64f6044e2900cc6c0979e077741ed00fbbf2d51f9184c83715013299782707b44e39aa99b1 samba.initd 4faf581ecef3ec38319e3c4ab6d3995c51fd7ba83180dc5553a2ff4dfb92efadb43030c543292130c4ed0c281dc0972c6973d52d48062c5edb39bb1c4bbb6dd6 samba.confd f88ebe59ca3a9e9b77dd5993c13ef3e73a838efb8ed858088b464a330132d662f33e25c27819e38835389dee23057a3951de11bae1eef55db8ff5e1ec6760053 samba.logrotate" diff --git a/main/samba/ld_library_path.patch b/main/samba/ld_library_path.patch new file mode 100644 index 000000000..2f0b8b981 --- /dev/null +++ b/main/samba/ld_library_path.patch @@ -0,0 +1,18 @@ +uclibc dpes not seem to handle a leading ':' in LD_LIBRARY_PATH. +Eg. LD_LIBRARY_PATH=":/path" + +--- ./buildtools/wafsamba/samba_utils.py.orig 2013-08-01 13:16:13.425790642 +0000 ++++ ./buildtools/wafsamba/samba_utils.py 2013-08-01 13:17:52.063543307 +0000 +@@ -54,10 +54,9 @@ + def ADD_LD_LIBRARY_PATH(path): + '''add something to LD_LIBRARY_PATH''' + if 'LD_LIBRARY_PATH' in os.environ: +- oldpath = os.environ['LD_LIBRARY_PATH'] ++ newpath = os.environ['LD_LIBRARY_PATH'].split(':') + else: +- oldpath = '' +- newpath = oldpath.split(':') ++ newpath = [] + if not path in newpath: + newpath.append(path) + os.environ['LD_LIBRARY_PATH'] = ':'.join(newpath) diff --git a/main/samba/samba.initd b/main/samba/samba.initd index b7bef10e7..c352f4304 100755..100644 --- a/main/samba/samba.initd +++ b/main/samba/samba.initd @@ -7,8 +7,6 @@ if [ "$DAEMON" != "samba" ]; then daemon_list=$DAEMON fi -PIDDIR=/var/run/samba - depend() { need net after firewall @@ -20,7 +18,7 @@ start_smbd() { } stop_smbd() { - start-stop-daemon --stop --quiet --pidfile ${PIDDIR}/smbd.pid + start-stop-daemon --stop --quiet --pidfile /var/run/samba/smbd.pid } start_nmbd() { @@ -29,7 +27,7 @@ start_nmbd() { } stop_nmbd() { - start-stop-daemon --stop --quiet --pidfile ${PIDDIR}/nmbd.pid + start-stop-daemon --stop --quiet --pidfile /var/run/samba/nmbd.pid } start_winbindd() { @@ -38,12 +36,10 @@ start_winbindd() { } stop_winbindd() { - start-stop-daemon --stop --quiet --pidfile ${PIDDIR}/winbindd.pid + start-stop-daemon --stop --quiet --pidfile /var/run/samba/winbindd.pid } start() { - checkpath --directory --owner root:root \ - --mode 755 "$PIDDIR" for i in $daemon_list; do ebegin "Starting $i" start_$i |