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