Gentoo Archives: gentoo-commits

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