summaryrefslogtreecommitdiff
path: root/net-fs
diff options
context:
space:
mode:
authorRobert Piasek <dagger@gentoo.org>2011-06-30 15:50:28 +0000
committerRobert Piasek <dagger@gentoo.org>2011-06-30 15:50:28 +0000
commitb1a7b01bce5e0358238de8eecfaac71224e0fc98 (patch)
tree664b6391c0789b27a6f223d751714d8c16ac57a4 /net-fs
parentAdd files/3.6 directory in preparation for samba 3.6 ebuild (diff)
downloadhistorical-b1a7b01bce5e0358238de8eecfaac71224e0fc98.tar.gz
historical-b1a7b01bce5e0358238de8eecfaac71224e0fc98.tar.bz2
historical-b1a7b01bce5e0358238de8eecfaac71224e0fc98.zip
add RC2 of Samba 3.6
Package-Manager: portage-2.1.10.3/cvs/Linux x86_64
Diffstat (limited to 'net-fs')
-rw-r--r--net-fs/samba/Manifest10
-rw-r--r--net-fs/samba/files/3.6/lmhosts2
-rw-r--r--net-fs/samba/files/3.6/samba.confd28
-rw-r--r--net-fs/samba/files/3.6/samba.initd59
-rw-r--r--net-fs/samba/files/3.6/samba.pam8
-rw-r--r--net-fs/samba/files/3.6/smb.conf.default.patch68
-rw-r--r--net-fs/samba/files/3.6/smbusers7
-rw-r--r--net-fs/samba/files/3.6/swat.xinetd17
-rw-r--r--net-fs/samba/files/3.6/system-auth-winbind.pam18
-rw-r--r--net-fs/samba/samba-3.6.0_rc2.ebuild419
10 files changed, 636 insertions, 0 deletions
diff --git a/net-fs/samba/Manifest b/net-fs/samba/Manifest
index 34938061303d..63f229876e4c 100644
--- a/net-fs/samba/Manifest
+++ b/net-fs/samba/Manifest
@@ -22,12 +22,21 @@ AUX 3.5/smb.conf.default.patch 2873 RMD160 f0e7ae6a41959dacdf9f71a14e3c9477f07bb
AUX 3.5/smbusers 218 RMD160 a94e0928466c0ed7cfd3edd3ac88dd1c8725a987 SHA1 84518d8768048e497724c72f89c00e6223c6cdb6 SHA256 ed24f121813aff4b8e79c99317f4f9dfde9246d150d7718f0fa60babb8b9dca1
AUX 3.5/swat.xinetd 527 RMD160 8b2364e6fda8cecc75feef8129347ebc545ecc43 SHA1 98f94bc638ffb68d6fb35745aebbf0c63d4135ce SHA256 7919926945c9a7a28446280ea477aed2d7d3506372a03cbea96b446a8fa39aa4
AUX 3.5/system-auth-winbind.pam 705 RMD160 666533e99283449d60a97fd4fcd704d72212b871 SHA1 a1fe11d7a4f7501c938c03121e4ad950c515f75e SHA256 eca81593dc1b3e2be19bba7a128d71474243216a7783ed788320ca51cf6ea6c7
+AUX 3.6/lmhosts 125 RMD160 352d66c815ec164196bc9daf70b08b36d1447972 SHA1 ee122d2e006c8dc1e1f0a72db76bb6b3c326d849 SHA256 0bcbc9c3cfb44e31ccdc0930a1bcacc4e2b0fd96e5d38a56234a5133707a1826
+AUX 3.6/samba.confd 1219 RMD160 88949f00ea94f14af751e53cf870b6481dc3770d SHA1 a92a63dbbf9f7079e9d7cf0e2e3d608594fe5d42 SHA256 a83004571c4bc37eeaeec8efa0fef4a20d9fc12ec30f2eb9dcc6098251205314
+AUX 3.6/samba.initd 1226 RMD160 6e4b32fe49d319dd8e80c6695bd2111c9c51622d SHA1 19ddcec9155a5408a5233e0bed3571ee622859a3 SHA256 9ca1ca4d2af609675f049f296f1573746481c91a522a505c1b2ee80eb5726d9b
+AUX 3.6/samba.pam 397 RMD160 8f64b09e17e0c458a8156db3cc92a0413513e4fc SHA1 f39d48e07be8069885b51253c5b891a856b7b41e SHA256 86634f2d541370518d0958a73c04776ed5df2a3716ef128ff384459acce9cd38
+AUX 3.6/smb.conf.default.patch 2385 RMD160 807cc1e9d18e41d4f15fec2ef675bc8bbbdeab92 SHA1 d3244cf26702945fb686a0fbf75be8adc161f379 SHA256 2140436e553e5dfc0b472e3a09a597de61f15847f23e8f92b9f561a6b9164034
+AUX 3.6/smbusers 217 RMD160 3dd2a60bbaf206ad7343ea80509b44a84459a72a SHA1 a8114a2ff5b03e3c8f23104a9bd28381044ce413 SHA256 c4e808dc0d0a397e777225c6f2b4008d52979b2a4969ceee3211a8bd9d58703f
+AUX 3.6/swat.xinetd 526 RMD160 2a407763cfacfbe9b31c0901e43b4d227ea02a12 SHA1 88c6db599a1463dfd4c69392fc7374453c50ad00 SHA256 59dbb1e4669cfd5c72dacc8d8aed269f169e827338e6d6e92fa2a8e445a3ceac
+AUX 3.6/system-auth-winbind.pam 704 RMD160 4b9220ea16830f6ccb3afbcd2bef9b074c02f749 SHA1 d8ab709fb750300bcf642064015fddd1a9c3ed23 SHA256 42c80d953da2472d789c3de1311045285428a15562f7ad2371ef214d8ea7bf56
AUX samba-3.4.2-lib.tevent.python.mk 177 RMD160 3ed0264790f5ce15106528cd485c83611f6ebeb5 SHA1 ab048fb7ba236621d82cc305ce85d129d38d32a8 SHA256 3eab52d42a0cbc070d011a131f9a56f4b3da10b2791fec514948fd8d2d013153
AUX samba4.initd 634 RMD160 0d1028c3520102a7a2c4a7dd73723b66295db740 SHA1 cf2e0bcdb1783f1fb2ed256442f051b98ad70d64 SHA256 df553df5cfb8d8305566accd62bff23dac4772ad4a2eb7d3b1328a5651113cad
DIST samba-3.4.12.tar.gz 34842685 RMD160 b78ae82371fce179cddb8dfd508d8075788082d0 SHA1 89c18711cf585de415c4e7e50e83596dc583cc3e SHA256 89c0862a683d1c5f0b8710df1ae6f628aa4530bbe5cbb11cf7415b1b0446f028
DIST samba-3.4.13.tar.gz 34805783 RMD160 da4cdb57bec225fa35b1a6e889f1c49beaaf5089 SHA1 1318670371c55fe7383d583c5d184cbef7c6e5ea SHA256 f2725e66f6d4e0120c44ba22bc4461654a4222ae9881d04157dcc1faccbbffe4
DIST samba-3.5.8.tar.gz 30721269 RMD160 02703bbaf7d7e7b9786a2228fe6085143c99251a SHA1 ffb71de38442eee14aafb44f819671354dc5cce9 SHA256 331e3f2806edcad853b48f4b1e653367ad9a6ce1ab5ed486c03a6bf614882796
DIST samba-3.5.9.tar.gz 30750297 RMD160 c48b3d0ecf0b4cde2764cebdde5f8513320cd966 SHA1 77da3dff05032950fa1943057182d16894591a05 SHA256 8af8dccbb87a70a71f795180d873102b5cccba7012d66f2620cea8b87174380a
+DIST samba-3.6.0rc2.tar.gz 29002281 RMD160 83fe9890abf71d168b771c9c460084ba4e50a367 SHA1 da78a83b95c042a7be00b5737fb5d8f3a36a0fce SHA256 4124a70f0815c798f53176e4eb086d69c06ee5af0bd74f116cd905f64b12dc74
DIST samba-4.0.0alpha11.tar.gz 13917363 RMD160 3ec5597de6a2c80eaa426712101777fa92786b5c SHA1 8ed2befbbd45f6501d9e6036bcdfb332431a7b4f SHA256 ec9f4a9153b9e2c233420642ee98a8b944322e8b39a9b6912430fb24e88b81b9
DIST smb_traffic_analyzer_v2.diff.bz2 12226 RMD160 82f6d443d289253a184e5f5dda17d865cb79b2b5 SHA1 1dd5100447cb827aacb8bb18bf88b7b10955a38c SHA256 1bae7eafbe8ac2382313d5ab9d43d73ba64b63a714f0f588516952d476fb868d
EBUILD samba-3.4.12.ebuild 11868 RMD160 f4a947beec3cceb95e1241991a827e673913aee3 SHA1 76ef9617d3604eb6941a13bae2f92e2816bdc223 SHA256 b72494103bf6f78691ec952bd878687b56671a1914e305a56a4728d22a410bb1
@@ -35,6 +44,7 @@ EBUILD samba-3.4.13.ebuild 11879 RMD160 d8fe5d3ad76b26f653f4c2f8a62d57e748fb113f
EBUILD samba-3.5.8-r1.ebuild 11968 RMD160 0b559c0d46a4e6493971616a765053e2ce216be3 SHA1 13b3686487563435be413ece26de403ebe59f8f1 SHA256 964102b971bf1c3db52b0673363f89250561f335601a9a33f3df1f2483c74917
EBUILD samba-3.5.8.ebuild 12734 RMD160 3d4145c2be91bb05498adbbd507ced25df9aff91 SHA1 f30d7d7e16e365d421ef79a90efc20d1729b7e0f SHA256 cf6f724a69d82644ad4a4be64aed243775c44d55fbf7d69acf443d175c91b110
EBUILD samba-3.5.9.ebuild 12008 RMD160 d4053610ac661eb0e3ea485f587dd4b4032ffc05 SHA1 6b3114748e010c7b5f3a2e42c689e6f4432c615a SHA256 bd4aa352db979cace6634c8df1221c6e0393da8678de64e92c1cacf716adc4b7
+EBUILD samba-3.6.0_rc2.ebuild 11243 RMD160 bb1b4fd2ec6f6a4c416c6cf1989057f267d849ab SHA1 51c064989d922581606f604a8357d7de729b9008 SHA256 569c3e00c35cf8cf747e843ef41b1d746e03c59b234728eaee12643e22f6df2f
EBUILD samba-4.0.0_alpha11.ebuild 4231 RMD160 efebbeed51868bf0cf51f6151b531f3e65834db2 SHA1 49169a33b69d1a69ecc102d8010c7b11f9256117 SHA256 02427fccf34de0f6aea8960d664b85a51fb80cce7bd107bc53111df386fb0660
MISC ChangeLog 79322 RMD160 d50ef929b48ba4c815b26b40565b5ed361d2da25 SHA1 d46d03b6cb4e493feb8584474b08f6d195979c99 SHA256 b1635fbbed41e841cdd3fe20aa571dd797017962aacd3c8c093148e22df08fb9
MISC metadata.xml 1435 RMD160 cbeae62707473b88127daa6170e8ca58861ef38b SHA1 32ff9e4f94646cc85bca64f208ea19faae1e2075 SHA256 bdff2271efdf94275d1a6096c48407c0372e088b10f85f19b989b18d50c2a5f0
diff --git a/net-fs/samba/files/3.6/lmhosts b/net-fs/samba/files/3.6/lmhosts
new file mode 100644
index 000000000000..3e3428e535a2
--- /dev/null
+++ b/net-fs/samba/files/3.6/lmhosts
@@ -0,0 +1,2 @@
+# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/files/3.6/lmhosts,v 1.1 2011/06/30 15:50:28 dagger Exp $
+127.0.0.1 localhost
diff --git a/net-fs/samba/files/3.6/samba.confd b/net-fs/samba/files/3.6/samba.confd
new file mode 100644
index 000000000000..8ef8d7351a27
--- /dev/null
+++ b/net-fs/samba/files/3.6/samba.confd
@@ -0,0 +1,28 @@
+#add "winbind" to the daemon_list if you also want winbind to start
+daemon_list="smbd nmbd"
+
+#----------------------------------------------------------------------------
+# Daemons calls: <daemon_name>_<command_option>
+#----------------------------------------------------------------------------
+my_service_name="samba"
+my_service_PRE="unset TMP TMPDIR"
+my_service_POST=""
+
+#----------------------------------------------------------------------------
+# Daemons calls: <daemon_name>_<command_option>
+#----------------------------------------------------------------------------
+smbd_start_options="-D"
+smbd_start="start-stop-daemon --start --exec /usr/sbin/smbd -- ${smbd_start_options}"
+smbd_stop="start-stop-daemon --stop --exec /usr/sbin/smbd"
+smbd_reload="killall -HUP smbd"
+
+nmbd_start_options="-D"
+nmbd_start="start-stop-daemon --start --exec /usr/sbin/nmbd -- ${nmbd_start_options}"
+nmbd_stop="start-stop-daemon --stop --exec /usr/sbin/nmbd"
+nmbd_reload="killall -HUP nmbd"
+
+winbind_start_options=""
+winbind_start="start-stop-daemon --start --exec /usr/sbin/winbindd -- ${winbind_start_options}"
+winbind_stop="start-stop-daemon --stop --oknodo --exec /usr/sbin/winbindd"
+winbind_reload="killall -HUP winbindd"
+
diff --git a/net-fs/samba/files/3.6/samba.initd b/net-fs/samba/files/3.6/samba.initd
new file mode 100644
index 000000000000..10bc4d4b2f93
--- /dev/null
+++ b/net-fs/samba/files/3.6/samba.initd
@@ -0,0 +1,59 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/files/3.6/samba.initd,v 1.1 2011/06/30 15:50:28 dagger Exp $
+
+opts="reload"
+
+depend() {
+ after slapd
+ need net
+ use cupsd
+}
+
+DAEMONNAME="${SVCNAME##samba.}"
+[ "${DAEMONNAME}" != "samba" ] && daemon_list=${DAEMONNAME}
+
+signal_do() {
+ local signal="$1"
+ [ -z "${signal}" ] && return 0
+
+ local result=0 last_result=0 daemon= cmd_exec=
+ for daemon in ${daemon_list} ; do
+ eval cmd_exec=\$${daemon}_${signal}
+ if [ -n "${cmd_exec}" ]; then
+ ebegin "${my_service_name} -> ${signal}: ${daemon}"
+ #echo ${cmd} '->' ${!cmd}
+ ${cmd_exec} > /dev/null
+ last_result=$?
+ eend ${last_result}
+ fi
+ result=$(( ${result} + ${last_result} ))
+ done
+ return ${result}
+}
+
+mkdir_sambadirs() {
+ [ -d /var/run/samba ] || mkdir -p /var/run/samba
+}
+
+start() {
+ ${my_service_PRE}
+ mkdir_sambadirs
+ signal_do start && return 0
+
+ eerror "Error: starting services (see system logs)"
+ signal_do stop
+ return 1
+}
+stop() {
+ ${my_service_PRE}
+ if signal_do stop ; then
+ ${my_service_POST}
+ return 0
+ fi
+}
+reload() {
+ ${my_service_PRE}
+ signal_do reload
+}
diff --git a/net-fs/samba/files/3.6/samba.pam b/net-fs/samba/files/3.6/samba.pam
new file mode 100644
index 000000000000..91beadd478a4
--- /dev/null
+++ b/net-fs/samba/files/3.6/samba.pam
@@ -0,0 +1,8 @@
+#%PAM-1.0
+# * pam_smbpass.so authenticates against the smbpasswd file
+# * changed Redhat's 'pam_stack' with 'include' for *BSD compatibility
+# (Diego "Flameeyes" Petteno'): enable with pam>=0.78 only
+auth required pam_smbpass.so nodelay
+account include system-auth
+session include system-auth
+password required pam_smbpass.so nodelay smbconf=/etc/samba/smb.conf
diff --git a/net-fs/samba/files/3.6/smb.conf.default.patch b/net-fs/samba/files/3.6/smb.conf.default.patch
new file mode 100644
index 000000000000..c2a9a72cedad
--- /dev/null
+++ b/net-fs/samba/files/3.6/smb.conf.default.patch
@@ -0,0 +1,68 @@
+--- samba-3.6.0rc2/examples/smb.conf.default~ 2011-06-07 19:13:47.000000000 +0100
++++ samba-3.6.0rc2/examples/smb.conf.default 2011-06-30 16:12:42.388102480 +0100
+@@ -63,7 +63,7 @@
+
+ # this tells Samba to use a separate log file for each machine
+ # that connects
+- log file = /usr/local/samba/var/log.%m
++ log file = /var/log/samba/log.%m
+
+ # Put a capping on the size of the log files (in Kb).
+ max log size = 50
+@@ -81,7 +81,10 @@
+
+ # Backend to store user information in. New installations should
+ # use either tdbsam or ldapsam. smbpasswd is available for backwards
+-# compatibility. tdbsam requires no further configuration.
++# compatibility. tdbsam requires no further configuration. If you're
++# migrating from < samba 3.4, you'll have to convert your old user
++# passwords to the new backend with the command:
++# pdbedit -i smbpasswd:/var/lib/samba/private/smbpasswd -e
+ ; passdb backend = tdbsam
+
+ # Using the following line enables you to customise your configuration
+@@ -89,7 +92,7 @@
+ # of the machine that is connecting.
+ # Note: Consider carefully the location in the configuration file of
+ # this line. The included file is read at that point.
+-; include = /usr/local/samba/lib/smb.conf.%m
++; include = /etc/samba/smb.conf.%m
+
+ # Configure Samba to use multiple interfaces
+ # If you have multiple network interfaces then you must list them
+@@ -166,7 +169,7 @@
+ # Un-comment the following and create the netlogon directory for Domain Logons
+ ; [netlogon]
+ ; comment = Network Logon Service
+-; path = /usr/local/samba/lib/netlogon
++; path = /var/lib/samba/netlogon
+ ; guest ok = yes
+ ; writable = no
+ ; share modes = no
+@@ -175,7 +178,7 @@
+ # Un-comment the following to provide a specific roving profile share
+ # the default is to use the user's home directory
+ ;[Profiles]
+-; path = /usr/local/samba/profiles
++; path = /var/lib/samba/profiles
+ ; browseable = no
+ ; guest ok = yes
+
+@@ -184,7 +187,7 @@
+ # specifically define each individual printer
+ [printers]
+ comment = All Printers
+- path = /usr/spool/samba
++ path = /var/spool/samba
+ browseable = no
+ # Set public = yes to allow user 'guest account' to print
+ guest ok = no
+@@ -204,7 +207,7 @@
+ ; comment = Public Stuff
+ ; path = /home/samba
+ ; public = yes
+-; writable = no
++; writable = yes
+ ; printable = no
+ ; write list = @staff
+
diff --git a/net-fs/samba/files/3.6/smbusers b/net-fs/samba/files/3.6/smbusers
new file mode 100644
index 000000000000..b3c59f2e0550
--- /dev/null
+++ b/net-fs/samba/files/3.6/smbusers
@@ -0,0 +1,7 @@
+# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/files/3.6/smbusers,v 1.1 2011/06/30 15:50:28 dagger Exp $
+
+# Syntax:
+# Unix_name = SMB_name1 SMB_name2 ...
+
+root = Administrator admin
+nobody = guest pcguest smbguest
diff --git a/net-fs/samba/files/3.6/swat.xinetd b/net-fs/samba/files/3.6/swat.xinetd
new file mode 100644
index 000000000000..55c7cffe8b0e
--- /dev/null
+++ b/net-fs/samba/files/3.6/swat.xinetd
@@ -0,0 +1,17 @@
+# default: off
+# description: SWAT is the Samba Web Admin Tool. Use swat \
+# to configure your Samba server. To use SWAT, \
+# connect to port 901 with your favorite web browser.
+# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/files/3.6/swat.xinetd,v 1.1 2011/06/30 15:50:28 dagger Exp $
+
+service swat
+{
+ port = 901
+ socket_type = stream
+ wait = no
+ only_from = localhost
+ user = root
+ server = /usr/sbin/swat
+ log_on_failure += USERID
+ disable = yes
+}
diff --git a/net-fs/samba/files/3.6/system-auth-winbind.pam b/net-fs/samba/files/3.6/system-auth-winbind.pam
new file mode 100644
index 000000000000..454b94d61a6b
--- /dev/null
+++ b/net-fs/samba/files/3.6/system-auth-winbind.pam
@@ -0,0 +1,18 @@
+#%PAM-1.0
+# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/files/3.6/system-auth-winbind.pam,v 1.1 2011/06/30 15:50:28 dagger Exp $
+
+auth required pam_env.so
+auth sufficient pam_winbind.so
+auth sufficient pam_unix.so likeauth nullok use_first_pass
+auth required pam_deny.so
+
+account sufficient pam_winbind.so
+account required pam_unix.so
+
+password required pam_cracklib.so retry=3
+password sufficient pam_unix.so nullok use_authtok md5 shadow
+password required pam_deny.so
+
+session required pam_mkhomedir.so skel=/etc/skel/ umask=0022
+session required pam_limits.so
+session required pam_unix.so
diff --git a/net-fs/samba/samba-3.6.0_rc2.ebuild b/net-fs/samba/samba-3.6.0_rc2.ebuild
new file mode 100644
index 000000000000..ee627b5c050e
--- /dev/null
+++ b/net-fs/samba/samba-3.6.0_rc2.ebuild
@@ -0,0 +1,419 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/samba-3.6.0_rc2.ebuild,v 1.1 2011/06/30 15:50:28 dagger Exp $
+
+EAPI=4
+
+inherit pam versionator multilib eutils
+
+MY_PV=${PV/_/}
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="Library bits of the samba network filesystem"
+HOMEPAGE="http://www.samba.org/"
+SRC_URI="mirror://samba/rc/${MY_P}.tar.gz"
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="acl addns ads +aio avahi caps +client cluster cups debug doc examples fam
+ ldap ldb +netapi pam quota +readline +server +smbclient smbsharemodes
+ swat syslog winbind"
+
+DEPEND="dev-libs/popt
+ !net-fs/samba-client
+ !net-fs/samba-libs
+ !net-fs/samba-server
+ >=sys-libs/talloc-2.0.5
+ >=sys-libs/tdb-1.2.9
+ virtual/libiconv
+ ads? ( virtual/krb5 sys-fs/e2fsprogs
+ client? ( sys-apps/keyutils
+ net-fs/cifs-utils[ads] ) )
+ avahi? ( net-dns/avahi[dbus] )
+ caps? ( sys-libs/libcap )
+ client? ( !net-fs/mount-cifs
+ dev-libs/iniparser
+ net-fs/cifs-utils )
+ cluster? ( >=dev-db/ctdb-1.0.114_p1 )
+ cups? ( net-print/cups )
+ debug? ( dev-libs/dmalloc )
+ fam? ( virtual/fam )
+ ldap? ( net-nds/openldap )
+ pam? ( virtual/pam
+ winbind? ( dev-libs/iniparser )
+ )
+ readline? ( >=sys-libs/readline-5.2 )
+ syslog? ( virtual/logger )"
+
+RDEPEND="${DEPEND}"
+
+# Disable tests since we don't want to build that much here
+RESTRICT="test"
+
+SBINPROGS=""
+BINPROGS=""
+KRBPLUGIN=""
+PLUGINEXT=".so"
+SHAREDMODS=""
+
+S="${WORKDIR}/${MY_P}/source3"
+
+# TODO:
+# - enable iPrint on Prefix/OSX and Darwin?
+# - selftest-prefix? selftest?
+# - AFS?
+
+CONFDIR="${FILESDIR}/$(get_version_component_range 1-2)"
+
+REQUIRED_USE="
+ ads? ( ldap )
+ swat? ( server )
+"
+
+pkg_setup() {
+ if use server ; then
+ SBINPROGS="${SBINPROGS} bin/smbd bin/nmbd"
+ BINPROGS="${BINPROGS} bin/testparm bin/smbstatus bin/smbcontrol bin/pdbedit
+ bin/profiles bin/sharesec bin/eventlogadm bin/smbta-util"
+
+ use swat && SBINPROGS="${SBINPROGS} bin/swat"
+ use winbind && SBINPROGS="${SBINPROGS} bin/winbindd"
+ use ads && use winbind && KRBPLUGIN="${KRBPLUGIN} bin/winbind_krb5_locator"
+ fi
+
+ if use client ; then
+ BINPROGS="${BINPROGS} bin/smbclient bin/net bin/smbget bin/smbtree
+ bin/nmblookup bin/smbpasswd bin/rpcclient bin/smbcacls bin/smbcquotas
+ bin/ntlm_auth"
+
+ fi
+
+ use cups && BINPROGS="${BINPROGS} bin/smbspool"
+ use ldb && BINPROGS="${BINPROGS} bin/ldbedit bin/ldbsearch bin/ldbadd bin/ldbdel bin/ldbmodify bin/ldbrename";
+
+ if use winbind ; then
+ BINPROGS="${BINPROGS} bin/wbinfo"
+ SHAREDMODS="${SHAREDMODS}idmap_rid,idmap_hash"
+ use ads && SHAREDMODS="${SHAREDMODS},idmap_ad"
+ use ldap && SHAREDMODS="${SHAREDMODS},idmap_ldap,idmap_adex"
+ fi
+
+ if use winbind &&
+ [[ $(tc-getCC)$ == *gcc* ]] &&
+ [[ $(gcc-major-version)$(gcc-minor-version) -lt 43 ]]
+ then
+ eerror "It is a known issue that ${P} will not build with "
+ eerror "winbind use flag enabled when using gcc < 4.3 ."
+ eerror "Please use at least the latest stable gcc version."
+ die "Using sys-devel/gcc < 4.3 with winbind use flag."
+ fi
+}
+
+src_prepare() {
+ cp "${FILESDIR}/samba-3.4.2-lib.tevent.python.mk" "../lib/tevent/python.mk"
+
+ # ensure that winbind has correct ldflags (QA notice)
+ sed -i \
+ -e 's|LDSHFLAGS="|LDSHFLAGS="\\${LDFLAGS} |g' \
+ configure || die "sed failed"
+ cd "${WORKDIR}/${MY_P}" && epatch "${CONFDIR}"/smb.conf.default.patch
+}
+
+src_configure() {
+ local myconf
+
+ # Filter out -fPIE
+ [[ ${CHOST} == *-*bsd* ]] && myconf+=" --disable-pie"
+
+ # Upstream refuses to make this configurable
+ use caps && export ac_cv_header_sys_capability_h=yes || export ac_cv_header_sys_capability_h=no
+
+ # Notes:
+ # - automount is only needed in conjunction with NIS and we don't have that
+ # anymore => LDAP?
+ # - --without-dce-dfs and --without-nisplus-home can't be passed to configure but are disabled by default
+ econf ${myconf} \
+ --with-piddir=/var/run/samba \
+ --sysconfdir=/etc/samba \
+ --localstatedir=/var \
+ $(use_enable debug developer) \
+ --enable-largefile \
+ --enable-socket-wrapper \
+ --enable-nss-wrapper \
+ $(use_enable swat) \
+ $(use_enable debug dmalloc) \
+ $(use_enable cups) \
+ --disable-iprint \
+ $(use_enable fam) \
+ --enable-shared-libs \
+ --disable-dnssd \
+ $(use_enable avahi) \
+ --with-fhs \
+ --with-privatedir=/var/lib/samba/private \
+ --with-rootsbindir=/var/cache/samba \
+ --with-lockdir=/var/cache/samba \
+ --with-swatdir=/usr/share/doc/${PF}/swat \
+ --with-configdir=/etc/samba \
+ --with-logfilebase=/var/log/samba \
+ --with-pammodulesdir=$(getpam_mod_dir) \
+ --without-afs \
+ --without-fake-kaserver \
+ --without-vfs-afsacl \
+ $(use_with ldap) \
+ $(use_with ads) \
+ $(use_with ads krb5 /usr) \
+ $(use_with ads dnsupdate) \
+ --without-automount \
+ $(use_with pam) \
+ $(use_with pam pam_smbpass) \
+ $(use_with syslog) \
+ $(use_with quota quotas) \
+ $(use_with quota sys-quotas) \
+ --without-utmp \
+ --without-lib{talloc,tdb} \
+ $(use_with netapi libnetapi) \
+ $(use_with smbclient libsmbclient) \
+ $(use_with smbsharemodes libsmbsharemodes) \
+ $(use_with addns libaddns) \
+ $(use_with cluster ctdb /usr) \
+ $(use_with cluster cluster-support) \
+ $(use_with acl acl-support) \
+ $(use_with aio aio-support) \
+ --with-sendfile-support \
+ $(use_with winbind) \
+ --with-shared-modules=${SHAREDMODS} \
+ --without-included-popt \
+ --without-included-iniparser
+}
+
+src_compile() {
+ # compile libs
+ if use addns ; then
+ einfo "make addns library"
+ emake libaddns
+ fi
+ if use netapi ; then
+ einfo "make netapi library"
+ emake libnetapi
+ fi
+ if use smbclient ; then
+ einfo "make smbclient library"
+ emake libsmbclient
+ fi
+ if use smbsharemodes ; then
+ einfo "make smbsharemodes library"
+ emake libsmbsharemodes
+ fi
+
+ # compile modules
+ emake modules
+
+ # compile pam moudles
+ if use pam ; then
+ einfo "make pam modules"
+ emake pam_modules
+ fi
+
+ # compile winbind nss modules
+ if use winbind ; then
+ einfo "make nss modules"
+ emake nss_modules
+ fi
+
+ # compile utilities
+ if [ -n "${BINPROGS}" ] ; then
+ einfo "make binprogs"
+ emake ${BINPROGS}
+ fi
+ if [ -n "${SBINPROGS}" ] ; then
+ einfo "make sbinprogs"
+ emake ${SBINPROGS}
+ fi
+
+ if [ -n "${KRBPLUGIN}" ] ; then
+ einfo "make krbplugin"
+ emake ${KRBPLUGIN}${PLUGINEXT}
+ fi
+
+}
+
+src_install() {
+ # install libs
+ if use addns ; then
+ einfo "install addns library"
+ emake installlibaddns DESTDIR="${D}"
+ fi
+ if use netapi ; then
+ einfo "install netapi library"
+ emake installlibnetapi DESTDIR="${D}"
+ fi
+ if use smbclient ; then
+ einfo "install smbclient library"
+ emake installlibsmbclient DESTDIR="${D}"
+ fi
+ if use smbsharemodes ; then
+ einfo "install smbsharemodes library"
+ emake installlibsmbsharemodes DESTDIR="${D}"
+ fi
+
+ # install modules
+ emake installmodules DESTDIR="${D}"
+
+ if use pam ; then
+ einfo "install pam modules"
+ emake installpammodules DESTDIR="${D}"
+
+ if use winbind ; then
+ newpamd "${CONFDIR}/system-auth-winbind.pam" system-auth-winbind
+ doman ../docs/manpages/pam_winbind.8
+ fi
+
+ newpamd "${CONFDIR}/samba.pam" samba
+ dodoc pam_smbpass/README
+ fi
+
+ # Nsswitch extensions. Make link for wins and winbind resolvers
+ if use winbind ; then
+ einfo "install libwbclient"
+ emake installlibwbclient DESTDIR="${D}"
+ dolib.so ../nsswitch/libnss_wins.so
+ dosym libnss_wins.so /usr/$(get_libdir)/libnss_wins.so.2
+ dolib.so ../nsswitch/libnss_winbind.so
+ dosym libnss_winbind.so /usr/$(get_libdir)/libnss_winbind.so.2
+ einfo "install libwbclient related manpages"
+ doman ../docs/manpages/idmap_rid.8
+ doman ../docs/manpages/idmap_hash.8
+ if use ldap ; then
+ doman ../docs/manpages/idmap_adex.8
+ doman ../docs/manpages/idmap_ldap.8
+ fi
+ if use ads ; then
+ doman ../docs/manpages/idmap_ad.8
+ fi
+ fi
+
+ # install binaries
+ insinto /usr
+ for prog in ${SBINPROGS} ; do
+ dosbin ${prog}
+ doman ../docs/manpages/${prog/bin\/}*
+ done
+
+ for prog in ${BINPROGS} ; do
+ dobin ${prog}
+ doman ../docs/manpages/${prog/bin\/}*
+ done
+
+ # install krbplugin
+ if [ -n "${KRBPLUGIN}" ] ; then
+ if has_version app-crypt/mit-krb5 ; then
+ insinto /usr/$(get_libdir)/krb5/plugins/libkrb5
+ doins ${KRBPLUGIN}${PLUGINEXT}
+ elif has_version app-crypt/heimdal ; then
+ insinto /usr/$(get_libdir)/plugin/krb5
+ doins ${KRBPLUGIN}${PLUGINEXT}
+ fi
+ insinto /usr
+ for prog in ${KRBPLUGIN} ; do
+ doman ../docs/manpages/${prog/bin\/}*
+ done
+ fi
+
+ # install server components
+ if use server ; then
+ doman ../docs/manpages/vfs* ../docs/manpages/samba.7
+
+ diropts -m0700
+ keepdir /var/lib/samba/private
+
+ diropts -m1777
+ keepdir /var/spool/samba
+
+ diropts -m0755
+ keepdir /var/{cache,log}/samba
+ keepdir /var/lib/samba/{netlogon,profiles}
+ keepdir /var/lib/samba/printers/{W32X86,WIN40,W32ALPHA,W32MIPS,W32PPC,X64,IA64,COLOR}
+ keepdir /usr/$(get_libdir)/samba/{auth,pdb,rpc,idmap,nss_info,gpext}
+
+ newconfd "${CONFDIR}/samba.confd" samba
+ newinitd "${CONFDIR}/samba.initd" samba
+
+ insinto /etc/samba
+ doins "${CONFDIR}"/{smbusers,lmhosts}
+
+ if use ldap ; then
+ insinto /etc/openldap/schema
+ doins ../examples/LDAP/samba.schema
+ fi
+
+ if use swat ; then
+ insinto /etc/xinetd.d
+ newins "${CONFDIR}/swat.xinetd" swat
+ script/installswat.sh "${D}" "${ROOT}/usr/share/doc/${PF}/swat" "${S}"
+ fi
+
+ dodoc ../MAINTAINERS.txt ../README* ../Roadmap ../WHATSNEW.txt ../docs/THANKS
+ fi
+
+ # install the spooler to cups
+ if use cups ; then
+ dosym /usr/bin/smbspool $(cups-config --serverbin)/backend/smb
+ fi
+
+ # install misc files
+ insinto /etc/samba
+ doins ../examples/smb.conf.default
+ doman ../docs/manpages/smb.conf.5
+
+ insinto /usr/"$(get_libdir)"/samba
+ doins ../codepages/{valid.dat,upcase.dat,lowcase.dat}
+
+ # install docs
+ if use doc ; then
+ dohtml -r ../docs/htmldocs/*
+ dodoc ../docs/*.pdf
+ fi
+
+ # install examples
+ if use examples ; then
+ insinto /usr/share/doc/${PF}/examples
+
+ if use smbclient ; then
+ doins -r ../examples/libsmbclient
+ fi
+
+ if use winbind ; then
+ doins -r ../examples/pam_winbind ../examples/nss
+ fi
+
+ if use server ; then
+ cd ../examples
+ doins -r auth autofs dce-dfs LDAP logon misc pdb \
+ perfcounter printer-accounting printing scripts tridge \
+ validchars VFS
+ fi
+ fi
+
+ # Remove empty installation directories
+ rmdir --ignore-fail-on-non-empty \
+ "${D}/usr/$(get_libdir)/samba" \
+ "${D}/usr"/{sbin,bin} \
+ "${D}/usr/share"/{man,locale,} \
+ "${D}/var"/{run,lib/samba/private,lib/samba,lib,cache/samba,cache,} \
+ # || die "tried to remove non-empty dirs, this seems like a bug in the ebuild"
+}
+
+pkg_postinst() {
+ elog "The default value of 'wide links' has been changed to 'no' in samba 3.5"
+ elog "to avoid an insecure default configuration"
+ elog "('wide links = yes' and 'unix extensions = yes'). For more details,"
+ elog "please see http://www.samba.org/samba/news/symlink_attack.html ."
+ elog ""
+ elog "An EXPERIMENTAL implementation of the SMB2 protocol has been added."
+ elog "SMB2 can be enabled by setting 'max protocol = smb2'. SMB2 is a new "
+ elog "implementation of the SMB protocol used by Windows Vista and higher"
+ elog ""
+ elog "For further information make sure to read the release notes at"
+ elog "http://samba.org/samba/history/${P}.html and "
+ elog "http://samba.org/samba/history/${PN}-3.5.0.html"
+}