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: ChangeLog samba-3.5.7.ebuild
Date: Wed, 02 Mar 2011 10:57:12
Message-Id: 20110302105659.C76C120054@flycatcher.gentoo.org
1 patrick 11/03/02 10:56:59
2
3 Modified: ChangeLog
4 Added: samba-3.5.7.ebuild
5 Log:
6 Bump for #356917
7
8 (Portage version: 2.2.0_alpha26/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.458 net-fs/samba/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-fs/samba/ChangeLog?rev=1.458&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-fs/samba/ChangeLog?rev=1.458&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-fs/samba/ChangeLog?r1=1.457&r2=1.458
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/net-fs/samba/ChangeLog,v
20 retrieving revision 1.457
21 retrieving revision 1.458
22 diff -u -r1.457 -r1.458
23 --- ChangeLog 28 Jan 2011 15:23:12 -0000 1.457
24 +++ ChangeLog 2 Mar 2011 10:56:59 -0000 1.458
25 @@ -1,6 +1,11 @@
26 # ChangeLog for net-fs/samba
27 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/ChangeLog,v 1.457 2011/01/28 15:23:12 vostorga Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/ChangeLog,v 1.458 2011/03/02 10:56:59 patrick Exp $
30 +
31 +*samba-3.5.7 (02 Mar 2011)
32 +
33 + 02 Mar 2011; Patrick Lauer <patrick@g.o> +samba-3.5.7.ebuild:
34 + Bump for #356917
35
36 28 Jan 2011; VĂ­ctor Ostorga <vostorga@g.o> samba-3.4.9.ebuild,
37 samba-3.5.6.ebuild:
38
39
40
41 1.1 net-fs/samba/samba-3.5.7.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-fs/samba/samba-3.5.7.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-fs/samba/samba-3.5.7.ebuild?rev=1.1&content-type=text/plain
45
46 Index: samba-3.5.7.ebuild
47 ===================================================================
48 # Copyright 1999-2011 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/net-fs/samba/samba-3.5.7.ebuild,v 1.1 2011/03/02 10:56:59 patrick Exp $
51
52 EAPI="2"
53
54 inherit pam confutils versionator multilib eutils
55
56 MY_PV=${PV/_/}
57 MY_P="${PN}-${MY_PV}"
58
59 DESCRIPTION="Library bits of the samba network filesystem"
60 HOMEPAGE="http://www.samba.org/"
61 SRC_URI="mirror://samba/${P}.tar.gz"
62 LICENSE="GPL-3"
63 SLOT="0"
64 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
65 IUSE="acl addns ads aio avahi caps +client cluster cups debug doc examples fam
66 ldap ldb +netapi pam quota +readline +server +smbclient smbsharemodes swat
67 syslog winbind "
68
69 DEPEND="dev-libs/popt
70 !net-fs/samba-client
71 !net-fs/samba-libs
72 !net-fs/samba-server
73 !net-fs/cifs-utils
74 sys-libs/talloc
75 sys-libs/tdb
76 virtual/libiconv
77 ads? ( virtual/krb5 sys-fs/e2fsprogs
78 client? ( sys-apps/keyutils ) )
79 avahi? ( net-dns/avahi )
80 caps? ( sys-libs/libcap )
81 client? ( !net-fs/mount-cifs
82 dev-libs/iniparser )
83 cluster? ( >=dev-db/ctdb-1.0.114_p1 )
84 cups? ( net-print/cups )
85 debug? ( dev-libs/dmalloc )
86 fam? ( virtual/fam )
87 ldap? ( net-nds/openldap )
88 pam? ( virtual/pam
89 winbind? ( dev-libs/iniparser ) )
90 readline? ( >=sys-libs/readline-5.2 )
91 syslog? ( virtual/logger )"
92
93 RDEPEND="${DEPEND}"
94
95 # Disable tests since we don't want to build that much here
96 RESTRICT="test"
97
98 SBINPROGS=""
99 BINPROGS=""
100 KRBPLUGIN=""
101 PLUGINEXT=".so"
102 SHAREDMODS=""
103
104 S="${WORKDIR}/${MY_P}/source3"
105
106 # TODO:
107 # - enable iPrint on Prefix/OSX and Darwin?
108 # - selftest-prefix? selftest?
109 # - AFS?
110
111 CONFDIR="${FILESDIR}/$(get_version_component_range 1-2)"
112
113 pkg_setup() {
114 if use server ; then
115 SBINPROGS="${SBINPROGS} bin/smbd bin/nmbd"
116 BINPROGS="${BINPROGS} bin/testparm bin/smbstatus bin/smbcontrol bin/pdbedit
117 bin/profiles bin/sharesec bin/eventlogadm"
118
119 use swat && SBINPROGS="${SBINPROGS} bin/swat"
120 use winbind && SBINPROGS="${SBINPROGS} bin/winbindd"
121 use ads && use winbind && KRBPLUGIN="${KRBPLUGIN} bin/winbind_krb5_locator"
122 fi
123
124 if use client ; then
125 BINPROGS="${BINPROGS} bin/smbclient bin/net bin/smbget bin/smbtree
126 bin/nmblookup bin/smbpasswd bin/rpcclient bin/smbcacls bin/smbcquotas
127 bin/ntlm_auth"
128
129 use ads && SBINPROGS="${SBINPROGS} bin/cifs.upcall"
130 fi
131
132 use cups && BINPROGS="${BINPROGS} bin/smbspool"
133 use ldb && BINPROGS="${BINPROGS} bin/ldbedit bin/ldbsearch bin/ldbadd bin/ldbdel bin/ldbmodify bin/ldbrename";
134
135 if use winbind ; then
136 BINPROGS="${BINPROGS} bin/wbinfo"
137 SHAREDMODS="${SHAREDMODS}idmap_rid,idmap_hash"
138 use ads && SHAREDMODS="${SHAREDMODS},idmap_ad"
139 use ldap && SHAREDMODS="${SHAREDMODS},idmap_ldap,idmap_adex"
140 fi
141
142 if use winbind &&
143 [[ $(tc-getCC)$ == *gcc* ]] &&
144 [[ $(gcc-major-version)$(gcc-minor-version) -lt 43 ]]
145 then
146 eerror "It is a known issue that ${P} will not build with "
147 eerror "winbind use flag enabled when using gcc < 4.3 ."
148 eerror "Please use at least the latest stable gcc version."
149 die "Using sys-devel/gcc < 4.3 with winbind use flag."
150 fi
151
152 confutils_use_depend_all ads ldap
153 confutils_use_depend_all swat server
154 }
155
156 src_prepare() {
157 cp "${FILESDIR}/samba-3.4.2-lib.tevent.python.mk" "../lib/tevent/python.mk"
158
159 # ensure that winbind has correct ldflags (QA notice)
160 sed -i \
161 -e 's|LDSHFLAGS="|LDSHFLAGS="\\${LDFLAGS} |g' \
162 configure || die "sed failed"
163
164 epatch "${CONFDIR}"/${PN}-3.5.6-kerberos-dummy.patch
165 }
166
167 src_configure() {
168 local myconf
169
170 # Filter out -fPIE
171 [[ ${CHOST} == *-*bsd* ]] || use hppa && myconf="${myconf} --disable-pie"
172
173 # Upstream refuses to make this configurable
174 use caps && export ac_cv_header_sys_capability_h=yes || export ac_cv_header_sys_capability_h=no
175
176 # use_with doesn't accept 2 USE-flags
177 if use client && use ads ; then
178 myconf="${myconf} --with-cifsupcall"
179 else
180 myconf="${myconf} --without-cifsupcall"
181 fi
182
183 # Notes:
184 # - automount is only needed in conjunction with NIS and we don't have that
185 # anymore => LDAP?
186 # - --without-dce-dfs and --without-nisplus-home can't be passed to configure but are disabled by default
187 econf ${myconf} \
188 --with-piddir=/var/run/samba \
189 --sysconfdir=/etc/samba \
190 --localstatedir=/var \
191 $(use_enable debug developer) \
192 --enable-largefile \
193 --enable-socket-wrapper \
194 --enable-nss-wrapper \
195 $(use_enable swat) \
196 $(use_enable debug dmalloc) \
197 $(use_enable cups) \
198 --disable-iprint \
199 $(use_enable fam) \
200 --enable-shared-libs \
201 --disable-dnssd \
202 $(use_enable avahi) \
203 --with-fhs \
204 --with-privatedir=/var/lib/samba/private \
205 --with-rootsbindir=/var/cache/samba \
206 --with-lockdir=/var/cache/samba \
207 --with-swatdir=/usr/share/doc/${PF}/swat \
208 --with-configdir=/etc/samba \
209 --with-logfilebase=/var/log/samba \
210 --with-pammodulesdir=$(getpam_mod_dir) \
211 --without-afs \
212 --without-fake-kaserver \
213 --without-vfs-afsacl \
214 $(use_with ldap) \
215 $(use_with ads) \
216 $(use_with ads krb5 /usr) \
217 $(use_with ads dnsupdate) \
218 --without-automount \
219 $(use_with client cifsmount) \
220 $(use_with client cifsumount) \
221 $(use_with pam) \
222 $(use_with pam pam_smbpass) \
223 $(use_with syslog) \
224 $(use_with quota quotas) \
225 $(use_with quota sys-quotas) \
226 --without-utmp \
227 --without-lib{talloc,tdb} \
228 $(use_with netapi libnetapi) \
229 $(use_with smbclient libsmbclient) \
230 $(use_with smbsharemodes libsmbsharemodes) \
231 $(use_with addns libaddns) \
232 $(use_with cluster ctdb /usr) \
233 $(use_with cluster cluster-support) \
234 $(use_with acl acl-support) \
235 $(use_with aio aio-support) \
236 --with-sendfile-support \
237 $(use_with winbind) \
238 --with-shared-modules=${SHAREDMODS} \
239 --without-included-popt \
240 --without-included-iniparser
241 }
242
243 src_compile() {
244 # compile libs
245 if use addns ; then
246 einfo "make addns library"
247 emake libaddns || die "emake libaddns failed"
248 fi
249 if use netapi ; then
250 einfo "make netapi library"
251 emake libnetapi || die "emake libnetapi failed"
252 fi
253 if use smbclient ; then
254 einfo "make smbclient library"
255 emake libsmbclient || die "emake libsmbclient failed"
256 fi
257 if use smbsharemodes ; then
258 einfo "make smbsharemodes library"
259 emake libsmbsharemodes || die "emake libsmbsharemodes failed"
260 fi
261
262 # compile modules
263 emake modules || die "building modules failed"
264
265 # compile pam moudles
266 if use pam ; then
267 einfo "make pam modules"
268 emake pam_modules || die "emake pam_modules failed";
269 fi
270
271 # compile winbind nss modules
272 if use winbind ; then
273 einfo "make nss modules"
274 emake nss_modules || die "emake nss_modules failed";
275 fi
276
277 # compile utilities
278 if [ -n "${BINPROGS}" ] ; then
279 einfo "make binprogs"
280 emake ${BINPROGS} || die "emake binprogs failed";
281 fi
282 if [ -n "${SBINPROGS}" ] ; then
283 einfo "make sbinprogs"
284 emake ${SBINPROGS} || die "emake sbinprogs failed";
285 fi
286
287 if [ -n "${KRBPLUGIN}" ] ; then
288 einfo "make krbplugin"
289 emake ${KRBPLUGIN}${PLUGINEXT} || die "emake krbplugin failed";
290 fi
291
292 if use client ; then
293 einfo "make {,u}mount.cifs"
294 emake bin/{,u}mount.cifs || die "emake {,u}mount.cifs failed"
295 fi
296 }
297
298 src_install() {
299 # install libs
300 if use addns ; then
301 einfo "install addns library"
302 emake installlibaddns DESTDIR="${D}" || die "emake install libaddns failed"
303 fi
304 if use netapi ; then
305 einfo "install netapi library"
306 emake installlibnetapi DESTDIR="${D}" || die "emake install libnetapi failed"
307 fi
308 if use smbclient ; then
309 einfo "install smbclient library"
310 emake installlibsmbclient DESTDIR="${D}" || die "emake install libsmbclient failed"
311 fi
312 if use smbsharemodes ; then
313 einfo "install smbsharemodes library"
314 emake installlibsmbsharemodes DESTDIR="${D}" || die "emake install libsmbsharemodes failed"
315 fi
316
317 # install modules
318 emake installmodules DESTDIR="${D}" || die "installing modules failed"
319
320 if use pam ; then
321 einfo "install pam modules"
322 emake installpammodules DESTDIR="${D}" || die "emake installpammodules failed"
323
324 if use winbind ; then
325 newpamd "${CONFDIR}/system-auth-winbind.pam" system-auth-winbind
326 doman ../docs/manpages/pam_winbind.8
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}" || die "emake installlibwbclient failed"
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} || die "installing ${prog} failed"
357 doman ../docs/manpages/${prog/bin\/}* || die "doman failed"
358 done
359
360 for prog in ${BINPROGS} ; do
361 dobin ${prog} || die "installing ${prog} failed"
362 doman ../docs/manpages/${prog/bin\/}* || die "doman failed"
363 done
364
365 # install krbplugin
366 if [ -n "${KRBPLUGIN}" ] ; then
367 if has_version app-crypt/mit-krb5 ; then
368 insinto /usr/$(get_libdir)/krb5/plugins/libkrb5
369 doins ${KRBPLUGIN}${PLUGINEXT} || die "installing
370 ${KRBPLUGIN}${PLUGINEXT} failed"
371 elif has_version app-crypt/heimdal ; then
372 insinto /usr/$(get_libdir)/plugin/krb5
373 doins ${KRBPLUGIN}${PLUGINEXT} || die "installing
374 ${KRBPLUGIN}${PLUGINEXT} failed"
375 fi
376 insinto /usr
377 for prog in ${KRBPLUGIN} ; do
378 doman ../docs/manpages/${prog/bin\/}* || die "doman failed"
379 done
380 fi
381
382 # install server components
383 if use server ; then
384 doman ../docs/manpages/vfs* ../docs/manpages/samba.7
385
386 diropts -m0700
387 keepdir /var/lib/samba/private
388
389 diropts -m1777
390 keepdir /var/spool/samba
391
392 diropts -m0755
393 keepdir /var/{cache,log}/samba
394 keepdir /var/lib/samba/{netlogon,profiles}
395 keepdir /var/lib/samba/printers/{W32X86,WIN40,W32ALPHA,W32MIPS,W32PPC,X64,IA64,COLOR}
396 keepdir /usr/$(get_libdir)/samba/{auth,pdb,rpc,idmap,nss_info,gpext}
397
398 newconfd "${CONFDIR}/samba.confd" samba
399 newinitd "${CONFDIR}/samba.initd" samba
400
401 insinto /etc/samba
402 doins "${CONFDIR}"/{smbusers,lmhosts}
403
404 if use ldap ; then
405 insinto /etc/openldap/schema
406 doins ../examples/LDAP/samba.schema
407 fi
408
409 if use swat ; then
410 insinto /etc/xinetd.d
411 newins "${CONFDIR}/swat.xinetd" swat
412 script/installswat.sh "${D}" "${ROOT}/usr/share/doc/${PF}/swat" "${S}" \
413 || die "installing swat failed"
414 fi
415
416 dodoc ../MAINTAINERS ../README* ../Roadmap ../WHATSNEW.txt ../docs/THANKS
417 fi
418
419 # install client files ({u,}mount.cifs into /)
420 if use client ; then
421 into /
422 dosbin bin/{u,}mount.cifs || die "u/mount.cifs not around"
423 doman ../docs/manpages/{u,}mount.cifs.8 || die "can't create man pages"
424 fi
425
426 # install the spooler to cups
427 if use cups ; then
428 dosym /usr/bin/smbspool $(cups-config --serverbin)/backend/smb
429 fi
430
431 # install misc files
432 insinto /etc/samba
433 doins "${CONFDIR}"/smb.conf.default
434 doman ../docs/manpages/smb.conf.5
435
436 insinto /usr/"$(get_libdir)"/samba
437 doins ../codepages/{valid.dat,upcase.dat,lowcase.dat}
438
439 # install docs
440 if use doc ; then
441 dohtml -r ../docs/htmldocs/*
442 dodoc ../docs/*.pdf
443 fi
444
445 # install examples
446 if use examples ; then
447 insinto /usr/share/doc/${PF}/examples
448
449 if use smbclient ; then
450 doins -r ../examples/libsmbclient
451 fi
452
453 if use winbind ; then
454 doins -r ../examples/pam_winbind ../examples/nss
455 fi
456
457 if use server ; then
458 cd ../examples
459 doins -r auth autofs dce-dfs LDAP logon misc pdb \
460 perfcounter printer-accounting printing scripts tridge \
461 validchars VFS
462 fi
463 fi
464
465 # Remove empty installation directories
466 rmdir --ignore-fail-on-non-empty \
467 "${D}/usr/$(get_libdir)/samba" \
468 "${D}/usr"/{sbin,bin} \
469 "${D}/usr/share"/{man,locale,} \
470 "${D}/var"/{run,lib/samba/private,lib/samba,lib,cache/samba,cache,} \
471 # || die "tried to remove non-empty dirs, this seems like a bug in the ebuild"
472 }
473
474 pkg_postinst() {
475 elog "The default value of 'wide links' has been changed to 'no' in samba 3.5"
476 elog "to avoid an insecure default configuration"
477 elog "('wide links = yes' and 'unix extensions = yes'). For more details,"
478 elog "please see http://www.samba.org/samba/news/symlink_attack.html ."
479 elog ""
480 elog "An EXPERIMENTAL implementation of the SMB2 protocol has been added."
481 elog "SMB2 can be enabled by setting 'max protocol = smb2'. SMB2 is a new "
482 elog "implementation of the SMB protocol used by Windows Vista and higher"
483 elog ""
484 elog "For further information make sure to read the release notes at"
485 elog "http://samba.org/samba/history/${P}.html and "
486 elog "http://samba.org/samba/history/${PN}-3.5.0.html"
487 }