Gentoo Archives: gentoo-commits

From: "Patrick Lauer (patrick)" <patrick@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-fs/samba: samba-3.5.15.ebuild samba-3.6.5.ebuild ChangeLog
Date: Wed, 02 May 2012 03:26:22
Message-Id: 20120502032607.559AF2004B@flycatcher.gentoo.org
1 patrick 12/05/02 03:26:07
2
3 Modified: ChangeLog
4 Added: samba-3.5.15.ebuild samba-3.6.5.ebuild
5 Log:
6 Bump for #414319
7
8 (Portage version: 2.2.0_alpha101/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.509 net-fs/samba/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-fs/samba/ChangeLog?rev=1.509&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-fs/samba/ChangeLog?rev=1.509&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-fs/samba/ChangeLog?r1=1.508&r2=1.509
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/net-fs/samba/ChangeLog,v
20 retrieving revision 1.508
21 retrieving revision 1.509
22 diff -u -r1.508 -r1.509
23 --- ChangeLog 17 Apr 2012 21:35:40 -0000 1.508
24 +++ ChangeLog 2 May 2012 03:26:07 -0000 1.509
25 @@ -1,6 +1,13 @@
26 # ChangeLog for net-fs/samba
27 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/ChangeLog,v 1.508 2012/04/17 21:35:40 ranger Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/ChangeLog,v 1.509 2012/05/02 03:26:07 patrick Exp $
30 +
31 +*samba-3.5.15 (02 May 2012)
32 +*samba-3.6.5 (02 May 2012)
33 +
34 + 02 May 2012; Patrick Lauer <patrick@g.o> +samba-3.5.15.ebuild,
35 + +samba-3.6.5.ebuild:
36 + Bump for #414319
37
38 17 Apr 2012; Brent Baude <ranger@g.o> samba-3.5.14.ebuild:
39 Marking samba-3.5.14 ppc64 for bug 411487
40
41
42
43 1.1 net-fs/samba/samba-3.5.15.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-fs/samba/samba-3.5.15.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-fs/samba/samba-3.5.15.ebuild?rev=1.1&content-type=text/plain
47
48 Index: samba-3.5.15.ebuild
49 ===================================================================
50 # Copyright 1999-2012 Gentoo Foundation
51 # Distributed under the terms of the GNU General Public License v2
52 # $Header: /var/cvsroot/gentoo-x86/net-fs/samba/samba-3.5.15.ebuild,v 1.1 2012/05/02 03:26:07 patrick Exp $
53
54 EAPI=4
55
56 inherit pam versionator multilib eutils
57
58 MY_PV=${PV/_/}
59 MY_P="${PN}-${MY_PV}"
60
61 DESCRIPTION="Library bits of the samba network filesystem"
62 HOMEPAGE="http://www.samba.org/"
63 SRC_URI="mirror://samba/${P}.tar.gz
64 http://dev.gentoo.org/~dagger/files/smb_traffic_analyzer_v2.diff.bz2"
65 LICENSE="GPL-3"
66 SLOT="0"
67 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
68 IUSE="acl addns ads +aio avahi caps +client cluster cups debug doc examples fam
69 ldap ldb +netapi pam quota +readline +server +smbclient smbsharemodes smbtav2
70 swat syslog winbind"
71
72 DEPEND="dev-libs/popt
73 !net-fs/samba-client
74 !net-fs/samba-libs
75 !net-fs/samba-server
76 !net-fs/cifs-utils
77 sys-libs/talloc
78 sys-libs/tdb
79 virtual/libiconv
80 ads? ( virtual/krb5 sys-fs/e2fsprogs
81 client? ( sys-apps/keyutils ) )
82 avahi? ( net-dns/avahi[dbus] )
83 caps? ( sys-libs/libcap )
84 client? ( !net-fs/mount-cifs
85 dev-libs/iniparser )
86 cluster? ( >=dev-db/ctdb-1.0.114_p1 )
87 cups? ( net-print/cups )
88 fam? ( virtual/fam )
89 ldap? ( net-nds/openldap )
90 pam? ( virtual/pam
91 winbind? ( dev-libs/iniparser )
92 )
93 readline? ( >=sys-libs/readline-5.2 )
94 syslog? ( virtual/logger )"
95
96 RDEPEND="${DEPEND}"
97
98 # Disable tests since we don't want to build that much here
99 RESTRICT="test"
100
101 SBINPROGS=""
102 BINPROGS=""
103 KRBPLUGIN=""
104 PLUGINEXT=".so"
105 SHAREDMODS=""
106
107 S="${WORKDIR}/${MY_P}/source3"
108
109 # TODO:
110 # - enable iPrint on Prefix/OSX and Darwin?
111 # - selftest-prefix? selftest?
112 # - AFS?
113
114 CONFDIR="${FILESDIR}/$(get_version_component_range 1-2)"
115
116 REQUIRED_USE="
117 ads? ( ldap )
118 swat? ( server )
119 "
120
121 pkg_setup() {
122 if use server ; then
123 SBINPROGS="${SBINPROGS} bin/smbd bin/nmbd"
124 BINPROGS="${BINPROGS} bin/testparm bin/smbstatus bin/smbcontrol bin/pdbedit
125 bin/profiles bin/sharesec bin/eventlogadm"
126
127 use smbtav2 && BINPROGS="${BINPROGS} bin/smbta-util"
128 use swat && SBINPROGS="${SBINPROGS} bin/swat"
129 use winbind && SBINPROGS="${SBINPROGS} bin/winbindd"
130 use ads && use winbind && KRBPLUGIN="${KRBPLUGIN} bin/winbind_krb5_locator"
131 fi
132
133 if use client ; then
134 BINPROGS="${BINPROGS} bin/smbclient bin/net bin/smbget bin/smbtree
135 bin/nmblookup bin/smbpasswd bin/rpcclient bin/smbcacls bin/smbcquotas
136 bin/ntlm_auth"
137
138 use ads && SBINPROGS="${SBINPROGS} bin/cifs.upcall"
139 fi
140
141 use cups && BINPROGS="${BINPROGS} bin/smbspool"
142 use ldb && BINPROGS="${BINPROGS} bin/ldbedit bin/ldbsearch bin/ldbadd bin/ldbdel bin/ldbmodify bin/ldbrename";
143
144 if use winbind ; then
145 BINPROGS="${BINPROGS} bin/wbinfo"
146 SHAREDMODS="${SHAREDMODS}idmap_rid,idmap_hash"
147 use ads && SHAREDMODS="${SHAREDMODS},idmap_ad"
148 use ldap && SHAREDMODS="${SHAREDMODS},idmap_ldap,idmap_adex"
149 fi
150
151 if use winbind &&
152 [[ $(tc-getCC)$ == *gcc* ]] &&
153 [[ $(gcc-major-version)$(gcc-minor-version) -lt 43 ]]
154 then
155 eerror "It is a known issue that ${P} will not build with "
156 eerror "winbind use flag enabled when using gcc < 4.3 ."
157 eerror "Please use at least the latest stable gcc version."
158 die "Using sys-devel/gcc < 4.3 with winbind use flag."
159 fi
160 }
161
162 src_prepare() {
163 cp "${FILESDIR}/samba-3.4.2-lib.tevent.python.mk" "../lib/tevent/python.mk"
164
165 # ensure that winbind has correct ldflags (QA notice)
166 sed -i \
167 -e 's|LDSHFLAGS="|LDSHFLAGS="\\${LDFLAGS} |g' \
168 configure || die "sed failed"
169
170 epatch "${CONFDIR}"/${PN}-3.5.6-kerberos-dummy.patch
171 use smbtav2 && cd "${WORKDIR}/${P}" && epatch "${WORKDIR}"/smb_traffic_analyzer_v2.diff
172 cd "${WORKDIR}/${MY_P}" && epatch "${CONFDIR}"/${PN}-3.5.8-uclib-build.patch
173 epatch "${CONFDIR}"/smb.conf.default.patch
174 }
175
176 src_configure() {
177 local myconf
178
179 # Filter out -fPIE
180 [[ ${CHOST} == *-*bsd* ]] && myconf+=" --disable-pie"
181
182 # Upstream refuses to make this configurable
183 use caps && export ac_cv_header_sys_capability_h=yes || export ac_cv_header_sys_capability_h=no
184
185 # use_with doesn't accept 2 USE-flags
186 if use client && use ads ; then
187 myconf+=" --with-cifsupcall"
188 else
189 myconf+=" --without-cifsupcall"
190 fi
191
192 if use client && use kernel_linux ; then
193 myconf+=" --with-cifsmount --with-cifsumount"
194 else
195 myconf+=" --without-cifsmount --without-cifsumount"
196 fi
197
198 #bug #399141 wrap newer iniparser version
199 has_version ">=dev-libs/iniparser-3.0.0" && \
200 export CPPFLAGS+=" -Diniparser_getstr\(d,i\)=iniparser_getstring\(d,i,NULL\)"
201
202 # Notes:
203 # - automount is only needed in conjunction with NIS and we don't have that
204 # anymore => LDAP?
205 # - --without-dce-dfs and --without-nisplus-home can't be passed to configure but are disabled by default
206 econf ${myconf} \
207 --with-piddir=/var/run/samba \
208 --sysconfdir=/etc/samba \
209 --localstatedir=/var \
210 $(use_enable debug developer) \
211 --enable-largefile \
212 --enable-socket-wrapper \
213 --enable-nss-wrapper \
214 $(use_enable swat) \
215 $(use_enable cups) \
216 --disable-iprint \
217 $(use_enable fam) \
218 --enable-shared-libs \
219 --disable-dnssd \
220 $(use_enable avahi) \
221 --with-fhs \
222 --with-privatedir=/var/lib/samba/private \
223 --with-rootsbindir=/var/cache/samba \
224 --with-lockdir=/var/cache/samba \
225 --with-swatdir=/usr/share/doc/${PF}/swat \
226 --with-configdir=/etc/samba \
227 --with-logfilebase=/var/log/samba \
228 --with-pammodulesdir=$(getpam_mod_dir) \
229 --without-afs \
230 --without-fake-kaserver \
231 --without-vfs-afsacl \
232 $(use_with ldap) \
233 $(use_with ads) \
234 $(use_with ads krb5 /usr) \
235 $(use_with ads dnsupdate) \
236 --without-automount \
237 $(use_with pam) \
238 $(use_with pam pam_smbpass) \
239 $(use_with syslog) \
240 $(use_with quota quotas) \
241 $(use_with quota sys-quotas) \
242 --without-utmp \
243 --without-lib{talloc,tdb} \
244 $(use_with netapi libnetapi) \
245 $(use_with smbclient libsmbclient) \
246 $(use_with smbsharemodes libsmbsharemodes) \
247 $(use_with addns libaddns) \
248 $(use_with cluster ctdb /usr) \
249 $(use_with cluster cluster-support) \
250 $(use_with acl acl-support) \
251 $(use_with aio aio-support) \
252 --with-sendfile-support \
253 $(use_with winbind) \
254 --with-shared-modules=${SHAREDMODS} \
255 --without-included-popt \
256 --without-included-iniparser
257 }
258
259 src_compile() {
260 # compile libs
261 if use addns ; then
262 einfo "make addns library"
263 emake libaddns
264 fi
265 if use netapi ; then
266 einfo "make netapi library"
267 emake libnetapi
268 fi
269 if use smbclient ; then
270 einfo "make smbclient library"
271 emake libsmbclient
272 fi
273 if use smbsharemodes ; then
274 einfo "make smbsharemodes library"
275 emake libsmbsharemodes
276 fi
277
278 # compile modules
279 emake modules
280
281 # compile pam moudles
282 if use pam ; then
283 einfo "make pam modules"
284 emake pam_modules
285 fi
286
287 # compile winbind nss modules
288 if use winbind ; then
289 einfo "make nss modules"
290 emake nss_modules
291 fi
292
293 # compile utilities
294 if [ -n "${BINPROGS}" ] ; then
295 einfo "make binprogs"
296 emake ${BINPROGS}
297 fi
298 if [ -n "${SBINPROGS}" ] ; then
299 einfo "make sbinprogs"
300 emake ${SBINPROGS}
301 fi
302
303 if [ -n "${KRBPLUGIN}" ] ; then
304 einfo "make krbplugin"
305 emake ${KRBPLUGIN}${PLUGINEXT}
306 fi
307
308 if use client && use kernel_linux; then
309 einfo "make {,u}mount.cifs"
310 emake bin/{,u}mount.cifs
311 fi
312 }
313
314 src_install() {
315 # install libs
316 if use addns ; then
317 einfo "install addns library"
318 emake installlibaddns DESTDIR="${D}"
319 fi
320 if use netapi ; then
321 einfo "install netapi library"
322 emake installlibnetapi DESTDIR="${D}"
323 fi
324 if use smbclient ; then
325 einfo "install smbclient library"
326 emake installlibsmbclient DESTDIR="${D}"
327 fi
328 if use smbsharemodes ; then
329 einfo "install smbsharemodes library"
330 emake installlibsmbsharemodes DESTDIR="${D}"
331 fi
332
333 # install modules
334 emake installmodules DESTDIR="${D}"
335
336 if use pam ; then
337 einfo "install pam modules"
338 emake installpammodules DESTDIR="${D}"
339
340 if use winbind ; then
341 newpamd "${CONFDIR}/system-auth-winbind.pam" system-auth-winbind
342 doman ../docs/manpages/pam_winbind.8
343 # bug #376853
344 insinto /etc/security
345 doins ../examples/pam_winbind/pam_winbind.conf || die
346 fi
347
348 newpamd "${CONFDIR}/samba.pam" samba
349 dodoc pam_smbpass/README
350 fi
351
352 # Nsswitch extensions. Make link for wins and winbind resolvers
353 if use winbind ; then
354 einfo "install libwbclient"
355 emake installlibwbclient DESTDIR="${D}"
356 dolib.so ../nsswitch/libnss_wins.so
357 dosym libnss_wins.so /usr/$(get_libdir)/libnss_wins.so.2
358 dolib.so ../nsswitch/libnss_winbind.so
359 dosym libnss_winbind.so /usr/$(get_libdir)/libnss_winbind.so.2
360 einfo "install libwbclient related manpages"
361 doman ../docs/manpages/idmap_rid.8
362 doman ../docs/manpages/idmap_hash.8
363 if use ldap ; then
364 doman ../docs/manpages/idmap_adex.8
365 doman ../docs/manpages/idmap_ldap.8
366 fi
367 if use ads ; then
368 doman ../docs/manpages/idmap_ad.8
369 fi
370 fi
371
372 # install binaries
373 insinto /usr
374 for prog in ${SBINPROGS} ; do
375 dosbin ${prog}
376 doman ../docs/manpages/${prog/bin\/}*
377 done
378
379 for prog in ${BINPROGS} ; do
380 dobin ${prog}
381 doman ../docs/manpages/${prog/bin\/}*
382 done
383
384 # install krbplugin
385 if [ -n "${KRBPLUGIN}" ] ; then
386 if has_version app-crypt/mit-krb5 ; then
387 insinto /usr/$(get_libdir)/krb5/plugins/libkrb5
388 doins ${KRBPLUGIN}${PLUGINEXT}
389 elif has_version app-crypt/heimdal ; then
390 insinto /usr/$(get_libdir)/plugin/krb5
391 doins ${KRBPLUGIN}${PLUGINEXT}
392 fi
393 insinto /usr
394 for prog in ${KRBPLUGIN} ; do
395 doman ../docs/manpages/${prog/bin\/}*
396 done
397 fi
398
399 # install server components
400 if use server ; then
401 doman ../docs/manpages/vfs* ../docs/manpages/samba.7
402
403 diropts -m0700
404 keepdir /var/lib/samba/private
405
406 diropts -m1777
407 keepdir /var/spool/samba
408
409 diropts -m0755
410 keepdir /var/{cache,log}/samba
411 keepdir /var/lib/samba/{netlogon,profiles}
412 keepdir /var/lib/samba/printers/{W32X86,WIN40,W32ALPHA,W32MIPS,W32PPC,X64,IA64,COLOR}
413 keepdir /usr/$(get_libdir)/samba/{auth,pdb,rpc,idmap,nss_info,gpext}
414
415 newconfd "${CONFDIR}/samba.confd" samba
416 newinitd "${CONFDIR}/samba.initd" samba
417
418 insinto /etc/samba
419 doins "${CONFDIR}"/{smbusers,lmhosts}
420
421 if use ldap ; then
422 insinto /etc/openldap/schema
423 doins ../examples/LDAP/samba.schema
424 fi
425
426 if use swat ; then
427 insinto /etc/xinetd.d
428 newins "${CONFDIR}/swat.xinetd" swat
429 script/installswat.sh "${D}" "${ROOT}/usr/share/doc/${PF}/swat" "${S}"
430 fi
431
432 dodoc ../MAINTAINERS ../README* ../Roadmap ../WHATSNEW.txt ../docs/THANKS
433 fi
434
435 # install client files ({u,}mount.cifs into /)
436 if use client && use kernel_linux ; then
437 into /
438 dosbin bin/{u,}mount.cifs
439 doman ../docs/manpages/{u,}mount.cifs.8
440 fi
441
442 # install the spooler to cups
443 if use cups ; then
444 dosym /usr/bin/smbspool $(cups-config --serverbin)/backend/smb
445 fi
446
447 # install misc files
448 insinto /etc/samba
449 doins ../examples/smb.conf.default
450 doman ../docs/manpages/smb.conf.5
451
452 insinto /usr/"$(get_libdir)"/samba
453 doins ../codepages/{valid.dat,upcase.dat,lowcase.dat}
454
455 # install docs
456 if use doc ; then
457 dohtml -r ../docs/htmldocs/*
458 dodoc ../docs/*.pdf
459 fi
460
461 # install examples
462 if use examples ; then
463 insinto /usr/share/doc/${PF}/examples
464
465 if use smbclient ; then
466 doins -r ../examples/libsmbclient
467 fi
468
469 if use winbind ; then
470 doins -r ../examples/pam_winbind ../examples/nss
471 fi
472
473 if use server ; then
474 cd ../examples
475 doins -r auth autofs dce-dfs LDAP logon misc pdb \
476 perfcounter printer-accounting printing scripts tridge \
477 validchars VFS
478 fi
479 fi
480
481 # Remove empty installation directories
482 rmdir --ignore-fail-on-non-empty \
483 "${D}/usr/$(get_libdir)/samba" \
484 "${D}/usr"/{sbin,bin} \
485 "${D}/usr/share"/{man,locale,} \
486 "${D}/var"/{run,lib/samba/private,lib/samba,lib,cache/samba,cache,} \
487 # || die "tried to remove non-empty dirs, this seems like a bug in the ebuild"
488 }
489
490 pkg_postinst() {
491 elog "The default value of 'wide links' has been changed to 'no' in samba 3.5"
492 elog "to avoid an insecure default configuration"
493 elog "('wide links = yes' and 'unix extensions = yes'). For more details,"
494 elog "please see http://www.samba.org/samba/news/symlink_attack.html ."
495 elog ""
496 elog "An EXPERIMENTAL implementation of the SMB2 protocol has been added."
497 elog "SMB2 can be enabled by setting 'max protocol = smb2'. SMB2 is a new "
498 elog "implementation of the SMB protocol used by Windows Vista and higher"
499 elog ""
500 elog "For further information make sure to read the release notes at"
501 elog "http://samba.org/samba/history/${P}.html and "
502 elog "http://samba.org/samba/history/${PN}-3.5.0.html"
503 }
504
505
506
507 1.1 net-fs/samba/samba-3.6.5.ebuild
508
509 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-fs/samba/samba-3.6.5.ebuild?rev=1.1&view=markup
510 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-fs/samba/samba-3.6.5.ebuild?rev=1.1&content-type=text/plain
511
512 Index: samba-3.6.5.ebuild
513 ===================================================================
514 # Copyright 1999-2012 Gentoo Foundation
515 # Distributed under the terms of the GNU General Public License v2
516 # $Header: /var/cvsroot/gentoo-x86/net-fs/samba/samba-3.6.5.ebuild,v 1.1 2012/05/02 03:26:07 patrick Exp $
517
518 EAPI=4
519
520 inherit pam versionator multilib eutils
521
522 MY_PV=${PV/_/}
523 MY_P="${PN}-${MY_PV}"
524
525 DESCRIPTION="Library bits of the samba network filesystem"
526 HOMEPAGE="http://www.samba.org/"
527 SRC_URI="mirror://samba/${MY_P}.tar.gz"
528 LICENSE="GPL-3"
529 SLOT="0"
530 KEYWORDS="~amd64 ~hppa ~x86 ~x86-fbsd"
531 IUSE="acl addns ads +aio avahi caps +client cluster cups debug doc examples fam
532 ldap ldb +netapi pam quota +readline +server +smbclient smbsharemodes
533 swat syslog winbind"
534
535 DEPEND="dev-libs/popt
536 >=sys-libs/talloc-2.0.5
537 >=sys-libs/tdb-1.2.9
538 virtual/libiconv
539 ads? ( virtual/krb5 sys-fs/e2fsprogs
540 client? ( sys-apps/keyutils
541 kernel_linux? ( net-fs/cifs-utils[ads] ) ) )
542 avahi? ( net-dns/avahi[dbus] )
543 caps? ( sys-libs/libcap )
544 client? ( !net-fs/mount-cifs
545 dev-libs/iniparser
546 kernel_linux? ( net-fs/cifs-utils ) )
547 cluster? ( >=dev-db/ctdb-1.13 )
548 cups? ( net-print/cups )
549 debug? ( dev-libs/dmalloc )
550 fam? ( virtual/fam )
551 ldap? ( net-nds/openldap )
552 ldb? ( sys-libs/ldb )
553 pam? ( virtual/pam
554 winbind? ( dev-libs/iniparser )
555 )
556 readline? ( >=sys-libs/readline-5.2 )
557 syslog? ( virtual/logger )"
558
559 RDEPEND="${DEPEND}"
560
561 # Disable tests since we don't want to build that much here
562 RESTRICT="test"
563
564 SBINPROGS=""
565 BINPROGS=""
566 KRBPLUGIN=""
567 PLUGINEXT=".so"
568 SHAREDMODS=""
569
570 S="${WORKDIR}/${MY_P}/source3"
571
572 # TODO:
573 # - enable iPrint on Prefix/OSX and Darwin?
574 # - selftest-prefix? selftest?
575 # - AFS?
576
577 CONFDIR="${FILESDIR}/$(get_version_component_range 1-2)"
578
579 REQUIRED_USE="
580 ads? ( ldap )
581 swat? ( server )
582 "
583
584 pkg_pretend() {
585 if [[ ${MERGE_TYPE} != binary ]]; then
586 if use winbind &&
587 [[ $(tc-getCC)$ == *gcc* ]] &&
588 [[ $(gcc-major-version)$(gcc-minor-version) -lt 43 ]]
589 then
590 eerror "It is a known issue that ${P} will not build with "
591 eerror "winbind use flag enabled when using gcc < 4.3 ."
592 eerror "Please use at least the latest stable gcc version."
593 die "Using sys-devel/gcc < 4.3 with winbind use flag."
594 fi
595 fi
596 }
597
598 pkg_setup() {
599 if use server ; then
600 SBINPROGS="${SBINPROGS} bin/smbd bin/nmbd"
601 BINPROGS="${BINPROGS} bin/testparm bin/smbstatus bin/smbcontrol bin/pdbedit
602 bin/profiles bin/sharesec bin/eventlogadm bin/smbta-util"
603
604 use swat && SBINPROGS="${SBINPROGS} bin/swat"
605 use winbind && SBINPROGS="${SBINPROGS} bin/winbindd"
606 use ads && use winbind && KRBPLUGIN="${KRBPLUGIN} bin/winbind_krb5_locator"
607 fi
608
609 if use client ; then
610 BINPROGS="${BINPROGS} bin/smbclient bin/net bin/smbget bin/smbtree
611 bin/nmblookup bin/smbpasswd bin/rpcclient bin/smbcacls bin/smbcquotas
612 bin/ntlm_auth"
613
614 fi
615
616 use cups && BINPROGS="${BINPROGS} bin/smbspool"
617 # use ldb && BINPROGS="${BINPROGS} bin/ldbedit bin/ldbsearch bin/ldbadd bin/ldbdel bin/ldbmodify bin/ldbrename";
618
619 if use winbind ; then
620 BINPROGS="${BINPROGS} bin/wbinfo"
621 SHAREDMODS="${SHAREDMODS}idmap_rid,idmap_hash"
622 use ads && SHAREDMODS="${SHAREDMODS},idmap_ad"
623 use ldap && SHAREDMODS="${SHAREDMODS},idmap_ldap,idmap_adex"
624 fi
625 }
626
627 src_prepare() {
628 cp "${FILESDIR}/samba-3.4.2-lib.tevent.python.mk" "../lib/tevent/python.mk"
629
630 # ensure that winbind has correct ldflags (QA notice)
631 sed -i \
632 -e 's|LDSHFLAGS="|LDSHFLAGS="\\${LDFLAGS} |g' \
633 configure || die "sed failed"
634 cd "${WORKDIR}/${MY_P}" && epatch "${CONFDIR}"/smb.conf.default.patch
635 }
636
637 src_configure() {
638 local myconf
639
640 # Filter out -fPIE
641 [[ ${CHOST} == *-*bsd* ]] && myconf+=" --disable-pie"
642
643 # Upstream refuses to make this configurable
644 use caps && export ac_cv_header_sys_capability_h=yes || export ac_cv_header_sys_capability_h=no
645
646 #bug #399141 wrap newer iniparser version
647 has_version ">=dev-libs/iniparser-3.0.0" && \
648 export CPPFLAGS+=" -Diniparser_getstr\(d,i\)=iniparser_getstring\(d,i,NULL\)"
649
650 # Notes:
651 # - automount is only needed in conjunction with NIS and we don't have that
652 # anymore => LDAP?
653 # - --without-dce-dfs and --without-nisplus-home can't be passed to configure but are disabled by default
654 econf ${myconf} \
655 --with-piddir=/var/run/samba \
656 --sysconfdir=/etc/samba \
657 --localstatedir=/var \
658 $(use_enable debug developer) \
659 --enable-largefile \
660 --enable-socket-wrapper \
661 --enable-nss-wrapper \
662 $(use_enable swat) \
663 $(use_enable debug dmalloc) \
664 $(use_enable cups) \
665 --disable-iprint \
666 $(use_enable fam) \
667 --enable-shared-libs \
668 --disable-dnssd \
669 $(use_enable avahi) \
670 --with-fhs \
671 --with-privatedir=/var/lib/samba/private \
672 --with-rootsbindir=/var/cache/samba \
673 --with-lockdir=/var/cache/samba \
674 --with-swatdir=/usr/share/doc/${PF}/swat \
675 --with-configdir=/etc/samba \
676 --with-logfilebase=/var/log/samba \
677 --with-pammodulesdir=$(getpam_mod_dir) \
678 --without-afs \
679 --without-fake-kaserver \
680 --without-vfs-afsacl \
681 $(use_with ldap) \
682 $(use_with ads) \
683 $(use_with ads krb5 /usr) \
684 $(use_with ads dnsupdate) \
685 --without-automount \
686 $(use_with pam) \
687 $(use_with pam pam_smbpass) \
688 $(use_with syslog) \
689 $(use_with quota quotas) \
690 $(use_with quota sys-quotas) \
691 --without-utmp \
692 --without-lib{talloc,tdb} \
693 $(use_with netapi libnetapi) \
694 $(use_with smbclient libsmbclient) \
695 $(use_with smbsharemodes libsmbsharemodes) \
696 $(use_with addns libaddns) \
697 $(use_with cluster ctdb /usr) \
698 $(use_with cluster cluster-support) \
699 $(use_with acl acl-support) \
700 $(use_with aio aio-support) \
701 --with-sendfile-support \
702 $(use_with winbind) \
703 --with-shared-modules=${SHAREDMODS} \
704 --without-included-popt \
705 --without-included-iniparser
706 }
707
708 src_compile() {
709 # compile libs
710 if use addns ; then
711 einfo "make addns library"
712 emake libaddns
713 fi
714 if use netapi ; then
715 einfo "make netapi library"
716 emake libnetapi
717 fi
718 if use smbclient ; then
719 einfo "make smbclient library"
720 emake libsmbclient
721 fi
722 if use smbsharemodes ; then
723 einfo "make smbsharemodes library"
724 emake libsmbsharemodes
725 fi
726
727 # compile modules
728 emake modules
729
730 # compile pam moudles
731 if use pam ; then
732 einfo "make pam modules"
733 emake pam_modules
734 fi
735
736 # compile winbind nss modules
737 if use winbind ; then
738 einfo "make nss modules"
739 emake nss_modules
740 fi
741
742 # compile utilities
743 if [ -n "${BINPROGS}" ] ; then
744 einfo "make binprogs"
745 emake ${BINPROGS}
746 fi
747 if [ -n "${SBINPROGS}" ] ; then
748 einfo "make sbinprogs"
749 emake ${SBINPROGS}
750 fi
751
752 if [ -n "${KRBPLUGIN}" ] ; then
753 einfo "make krbplugin"
754 emake ${KRBPLUGIN}${PLUGINEXT}
755 fi
756
757 }
758
759 src_install() {
760 # install libs
761 if use addns ; then
762 einfo "install addns library"
763 emake installlibaddns DESTDIR="${D}"
764 fi
765 if use netapi ; then
766 einfo "install netapi library"
767 emake installlibnetapi DESTDIR="${D}"
768 fi
769 if use smbclient ; then
770 einfo "install smbclient library"
771 emake installlibsmbclient DESTDIR="${D}"
772 fi
773 if use smbsharemodes ; then
774 einfo "install smbsharemodes library"
775 emake installlibsmbsharemodes DESTDIR="${D}"
776 fi
777
778 # install modules
779 emake installmodules DESTDIR="${D}"
780
781 if use pam ; then
782 einfo "install pam modules"
783 emake installpammodules DESTDIR="${D}"
784
785 if use winbind ; then
786 newpamd "${CONFDIR}/system-auth-winbind.pam" system-auth-winbind
787 doman ../docs/manpages/pam_winbind.8
788 # bug #376853
789 insinto /etc/security
790 doins ../examples/pam_winbind/pam_winbind.conf || die
791 fi
792
793 newpamd "${CONFDIR}/samba.pam" samba
794 dodoc pam_smbpass/README
795 fi
796
797 # Nsswitch extensions. Make link for wins and winbind resolvers
798 if use winbind ; then
799 einfo "install libwbclient"
800 emake installlibwbclient DESTDIR="${D}"
801 dolib.so ../nsswitch/libnss_wins.so
802 dosym libnss_wins.so /usr/$(get_libdir)/libnss_wins.so.2
803 dolib.so ../nsswitch/libnss_winbind.so
804 dosym libnss_winbind.so /usr/$(get_libdir)/libnss_winbind.so.2
805 einfo "install libwbclient related manpages"
806 doman ../docs/manpages/idmap_rid.8
807 doman ../docs/manpages/idmap_hash.8
808 if use ldap ; then
809 doman ../docs/manpages/idmap_adex.8
810 doman ../docs/manpages/idmap_ldap.8
811 fi
812 if use ads ; then
813 doman ../docs/manpages/idmap_ad.8
814 fi
815 fi
816
817 # install binaries
818 insinto /usr
819 for prog in ${SBINPROGS} ; do
820 dosbin ${prog}
821 doman ../docs/manpages/${prog/bin\/}*
822 done
823
824 for prog in ${BINPROGS} ; do
825 dobin ${prog}
826 doman ../docs/manpages/${prog/bin\/}*
827 done
828
829 # install scripts
830 if use client ; then
831 dobin script/findsmb
832 doman ../docs/manpages/findsmb.1
833 fi
834
835 # install krbplugin
836 if [ -n "${KRBPLUGIN}" ] ; then
837 if has_version app-crypt/mit-krb5 ; then
838 insinto /usr/$(get_libdir)/krb5/plugins/libkrb5
839 doins ${KRBPLUGIN}${PLUGINEXT}
840 elif has_version app-crypt/heimdal ; then
841 insinto /usr/$(get_libdir)/plugin/krb5
842 doins ${KRBPLUGIN}${PLUGINEXT}
843 fi
844 insinto /usr
845 for prog in ${KRBPLUGIN} ; do
846 doman ../docs/manpages/${prog/bin\/}*
847 done
848 fi
849
850 # install server components
851 if use server ; then
852 doman ../docs/manpages/vfs* ../docs/manpages/samba.7
853
854 diropts -m0700
855 keepdir /var/lib/samba/private
856
857 diropts -m1777
858 keepdir /var/spool/samba
859
860 diropts -m0755
861 keepdir /var/{cache,log}/samba
862 keepdir /var/lib/samba/{netlogon,profiles}
863 keepdir /var/lib/samba/printers/{W32X86,WIN40,W32ALPHA,W32MIPS,W32PPC,X64,IA64,COLOR}
864 keepdir /usr/$(get_libdir)/samba/{auth,pdb,rpc,idmap,nss_info,gpext}
865
866 newconfd "${CONFDIR}/samba.confd" samba
867 newinitd "${CONFDIR}/samba.initd" samba
868
869 insinto /etc/samba
870 doins "${CONFDIR}"/{smbusers,lmhosts}
871
872 if use ldap ; then
873 insinto /etc/openldap/schema
874 doins ../examples/LDAP/samba.schema
875 fi
876
877 if use swat ; then
878 insinto /etc/xinetd.d
879 newins "${CONFDIR}/swat.xinetd" swat
880 script/installswat.sh "${D}" "${ROOT}/usr/share/doc/${PF}/swat" "${S}"
881 fi
882
883 dodoc ../MAINTAINERS.txt ../README* ../Roadmap ../WHATSNEW.txt ../docs/THANKS
884 fi
885
886 # install the spooler to cups
887 if use cups ; then
888 dosym /usr/bin/smbspool $(cups-config --serverbin)/backend/smb
889 fi
890
891 # install misc files
892 insinto /etc/samba
893 doins ../examples/smb.conf.default
894 doman ../docs/manpages/smb.conf.5
895
896 insinto /usr/"$(get_libdir)"/samba
897 doins ../codepages/{valid.dat,upcase.dat,lowcase.dat}
898
899 # install docs
900 if use doc ; then
901 dohtml -r ../docs/htmldocs/*
902 dodoc ../docs/*.pdf
903 fi
904
905 # install examples
906 if use examples ; then
907 insinto /usr/share/doc/${PF}/examples
908
909 if use smbclient ; then
910 doins -r ../examples/libsmbclient
911 fi
912
913 if use winbind ; then
914 doins -r ../examples/pam_winbind ../examples/nss
915 fi
916
917 if use server ; then
918 cd ../examples
919 doins -r auth autofs dce-dfs LDAP logon misc pdb \
920 perfcounter printer-accounting printing scripts tridge \
921 validchars VFS
922 fi
923 fi
924
925 # Remove empty installation directories
926 rmdir --ignore-fail-on-non-empty \
927 "${D}/usr/$(get_libdir)/samba" \
928 "${D}/usr"/{sbin,bin} \
929 "${D}/usr/share"/{man,locale,} \
930 "${D}/var"/{run,lib/samba/private,lib/samba,lib,cache/samba,cache,} \
931 # || die "tried to remove non-empty dirs, this seems like a bug in the ebuild"
932 }
933
934 pkg_postinst() {
935 elog "Samba 3.6 has adopted a number of improved security defaults that"
936 elog "will impact on existing users of Samba."
937 elog " client ntlmv2 auth = yes"
938 elog " client use spnego principal = no"
939 elog " send spnego principal = no"
940 elog ""
941 elog "SMB2 protocol support in 3.6.0 is fully functional and can be "
942 elog "enabled by setting 'max protocol = smb2'. SMB2 is a new "
943 elog "implementation of the SMB protocol used by Windows Vista and higher"
944 elog ""
945 elog "For further information make sure to read the release notes at"
946 elog "http://samba.org/samba/history/${P}.html and "
947 elog "http://samba.org/samba/history/${PN}-3.6.0.html"
948 }