Gentoo Archives: gentoo-commits

From: "Tiziano Mueller (dev-zero)" <dev-zero@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-fs/samba: ChangeLog samba-3.0.32.ebuild
Date: Fri, 29 Aug 2008 12:35:21
Message-Id: E1KZ3CA-00031c-4V@stork.gentoo.org
1 dev-zero 08/08/29 12:35:18
2
3 Modified: ChangeLog
4 Added: samba-3.0.32.ebuild
5 Log:
6 Version bump (bug #236110)
7 (Portage version: 2.2_rc8/cvs/Linux 2.6.27-rc4 x86_64)
8
9 Revision Changes Path
10 1.339 net-fs/samba/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-fs/samba/ChangeLog?rev=1.339&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-fs/samba/ChangeLog?rev=1.339&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-fs/samba/ChangeLog?r1=1.338&r2=1.339
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/net-fs/samba/ChangeLog,v
19 retrieving revision 1.338
20 retrieving revision 1.339
21 diff -u -r1.338 -r1.339
22 --- ChangeLog 8 Aug 2008 15:36:41 -0000 1.338
23 +++ ChangeLog 29 Aug 2008 12:35:17 -0000 1.339
24 @@ -1,6 +1,11 @@
25 # ChangeLog for net-fs/samba
26 # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/ChangeLog,v 1.338 2008/08/08 15:36:41 dev-zero Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/ChangeLog,v 1.339 2008/08/29 12:35:17 dev-zero Exp $
29 +
30 +*samba-3.0.32 (29 Aug 2008)
31 +
32 + 29 Aug 2008; Tiziano Müller <dev-zero@g.o> +samba-3.0.32.ebuild:
33 + Version bump (bug #236110)
34
35 *samba-3.0.31 (08 Aug 2008)
36
37
38
39
40 1.1 net-fs/samba/samba-3.0.32.ebuild
41
42 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-fs/samba/samba-3.0.32.ebuild?rev=1.1&view=markup
43 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-fs/samba/samba-3.0.32.ebuild?rev=1.1&content-type=text/plain
44
45 Index: samba-3.0.32.ebuild
46 ===================================================================
47 # Copyright 1999-2008 Gentoo Foundation
48 # Distributed under the terms of the GNU General Public License v2
49 # $Header: /var/cvsroot/gentoo-x86/net-fs/samba/samba-3.0.32.ebuild,v 1.1 2008/08/29 12:35:17 dev-zero Exp $
50
51 inherit autotools eutils pam python multilib versionator confutils
52
53 VSCAN_P="samba-vscan-0.3.6c-beta5"
54 MY_P=${PN}-${PV/_/}
55
56 DESCRIPTION="A suite of SMB and CIFS client/server programs for UNIX"
57 HOMEPAGE="http://www.samba.org/"
58 SRC_URI="mirror://samba/${MY_P}.tar.gz
59 mirror://samba/old-versions/${MY_P}.tar.gz
60 oav? ( http://www.openantivirus.org/download/${VSCAN_P}.tar.gz )"
61 LICENSE="GPL-3 oav? ( GPL-2 LGPL-2.1 )"
62 SLOT="0"
63 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
64 IUSE="acl ads async automount caps cups debug doc examples ipv6 kernel_linux ldap fam
65 pam python quotas readline selinux swat syslog winbind oav"
66
67 RDEPEND="dev-libs/popt
68 virtual/libiconv
69 acl? ( kernel_linux? ( sys-apps/acl ) )
70 cups? ( net-print/cups )
71 ipv6? ( sys-apps/xinetd )
72 ads? ( virtual/krb5 )
73 ldap? ( net-nds/openldap )
74 pam? ( virtual/pam )
75 python? ( dev-lang/python )
76 readline? ( sys-libs/readline )
77 selinux? ( sec-policy/selinux-samba )
78 swat? ( sys-apps/xinetd )
79 syslog? ( virtual/logger )
80 fam? ( virtual/fam )
81 caps? ( sys-libs/libcap )"
82 DEPEND="${RDEPEND}"
83
84 # Tests are broken now :-(
85 RESTRICT="test"
86
87 S=${WORKDIR}/${MY_P}
88 CONFDIR=${FILESDIR}/config
89 PRIVATE_DST=/var/lib/samba/private
90
91 pkg_setup() {
92 confutils_use_depend_all ads ldap
93 }
94
95 src_unpack() {
96 unpack ${A}
97 cd "${S}/source"
98
99 # lazyldflags.patch: adds "-Wl,-z,now" to smb{mnt,umount}
100 # invalid-free-fix.patch: Bug #196015 (upstream: #5021)
101
102 epatch \
103 "${FILESDIR}/3.0.26a-lazyldflags.patch" \
104 "${FILESDIR}/3.0.26a-invalid-free-fix.patch" \
105 "${FILESDIR}/3.0.28-fix_broken_readdir_detection.patch" \
106 "${FILESDIR}/3.0.28-autoconf-2.62-fix.patch" \
107 "${FILESDIR}/3.0.28a-wrong_python_ldflags.patch"
108
109 eautoconf -I. -Ilib/replace
110
111 # Ok, agreed, this is ugly. But it avoids a patch we
112 # need for every samba version and we don't need autotools
113 sed -i \
114 -e 's|"lib32" ||' \
115 -e 's|if test -d "$i/$l" ;|if test -d "$i/$l" -o -L "$i/$l";|' \
116 configure || die "sed failed"
117
118 rm "${S}/docs/manpages"/{mount,umount}.cifs.8
119
120 }
121
122 src_compile() {
123 cd "${S}/source"
124
125 local myconf
126 local mylangs
127 local mymod_shared
128
129 python_version
130 myconf="--with-python=no"
131 use python && myconf="--with-python=${python}"
132
133 use winbind && mymod_shared="--with-shared-modules=idmap_rid"
134 if use ldap ; then
135 myconf="${myconf} $(use_with ads)"
136 use winbind && mymod_shared="${mymod_shared},idmap_ad"
137 fi
138
139 [[ ${CHOST} == *-*bsd* ]] && myconf="${myconf} --disable-pie"
140 use hppa && myconf="${myconf} --disable-pie"
141
142 use caps && export ac_cv_header_sys_capability_h=yes || export ac_cv_header_sys_capability_h=no
143
144 # Otherwise we get the whole swat stuff installed
145 if ! use swat ; then
146 sed -i \
147 -e 's/^\(install:.*\)installswat \(.*\)/\1\2/' \
148 Makefile.in || die "sed failed"
149 fi
150
151 econf \
152 --with-fhs \
153 --sysconfdir=/etc/samba \
154 --localstatedir=/var \
155 --with-configdir=/etc/samba \
156 --with-libdir=/usr/$(get_libdir)/samba \
157 --with-pammodulesdir=$(getpam_mod_dir) \
158 --with-swatdir=/usr/share/doc/${PF}/swat \
159 --with-piddir=/var/run/samba \
160 --with-lockdir=/var/cache/samba \
161 --with-logfilebase=/var/log/samba \
162 --with-privatedir=${PRIVATE_DST} \
163 --with-libsmbclient \
164 --enable-socket-wrapper \
165 --with-cifsmount=no \
166 $(use_with acl acl-support) \
167 $(use_with async aio-support) \
168 $(use_with automount) \
169 $(use_enable cups) \
170 $(use_enable debug) \
171 $(use_enable fam) \
172 $(use_with ads krb5) \
173 $(use_with ldap) \
174 $(use_with pam) $(use_with pam pam_smbpass) \
175 $(use_with quotas) $(use_with quotas sys-quotas) \
176 $(use_with readline) \
177 $(use_with kernel_linux smbmount) \
178 $(use_with syslog) \
179 $(use_with winbind) \
180 ${myconf} ${mylangs} ${mymod_shared}
181
182 emake proto || die "emake proto failed"
183 emake everything || die "emake everything failed"
184
185 if use python ; then
186 emake python_ext || die "emake python_ext failed"
187 fi
188
189 if use oav ; then
190 # maintainer-info:
191 # - there are no known releases of mks or kavdc,
192 # setting to builtin to disable auto-detection
193 cd "${WORKDIR}/${VSCAN_P}"
194 econf \
195 --with-fhs \
196 --with-samba-source="${S}/source" \
197 --with-libmksd-builtin \
198 --with-libkavdc-builtin \
199 --without-symantec \
200 --with-filetype \
201 --with-fileregexp \
202 $(use_enable debug)
203 emake || die "emake oav plugins failed"
204 fi
205 }
206
207 src_test() {
208 cd "${S}/source"
209 emake test || die "tests failed"
210 }
211
212 src_install() {
213 cd "${S}/source"
214
215 emake DESTDIR="${D}" install-everything || die "emake install-everything failed"
216
217 # Extra rpctorture progs
218 local extra_bins="rpctorture"
219 for i in ${extra_bins} ; do
220 [[ -x "${S}/bin/${i}" ]] && dobin "${S}/bin/${i}"
221 done
222
223 # remove .old stuff from /usr/bin:
224 rm -f "${D}"/usr/bin/*.old
225
226 # Removing executable bits from header-files
227 fperms 644 /usr/include/lib{msrpc,smbclient}.h
228
229 # Nsswitch extensions. Make link for wins and winbind resolvers
230 if use winbind ; then
231 dolib.so nsswitch/libnss_wins.so
232 dosym libnss_wins.so /usr/$(get_libdir)/libnss_wins.so.2
233 dolib.so nsswitch/libnss_winbind.so
234 dosym libnss_winbind.so /usr/$(get_libdir)/libnss_winbind.so.2
235 fi
236
237 if use kernel_linux ; then
238 # Warning: this can byte you if /usr is
239 # on a separate volume and you have to mount
240 # a smb volume before the local mount
241 dosym ../usr/bin/smbmount /sbin/mount.smbfs
242 fperms 4755 /usr/bin/smbmnt
243 fperms 4755 /usr/bin/smbumount
244 fi
245
246 # bug #46389: samba doesn't create symlink anymore
247 # beaviour seems to be changed in 3.0.6, see bug #61046
248 dosym samba/libsmbclient.so /usr/$(get_libdir)/libsmbclient.so.0
249 dosym samba/libsmbclient.so /usr/$(get_libdir)/libsmbclient.so
250
251 # make the smb backend symlink for cups printing support (bug #133133)
252 if use cups ; then
253 dodir $(cups-config --serverbin)/backend
254 dosym /usr/bin/smbspool $(cups-config --serverbin)/backend/smb
255 fi
256
257 if use python ; then
258 emake DESTDIR="${D}" python_install || die "emake installpython failed"
259 # We're doing that manually
260 find "${D}/usr/$(get_libdir)/python${PYVER}/site-packages" -iname "*.pyc" -delete
261 fi
262
263 cd "${S}/source"
264
265 # General config files
266 insinto /etc/samba
267 doins "${CONFDIR}"/{smbusers,lmhosts}
268 newins "${CONFDIR}/smb.conf.example-samba3" smb.conf.example
269
270 newpamd "${CONFDIR}/samba.pam" samba
271 use winbind && dopamd "${CONFDIR}/system-auth-winbind"
272 if use swat ; then
273 insinto /etc/xinetd.d
274 newins "${CONFDIR}/swat.xinetd" swat
275 else
276 rm -f "${D}/usr/sbin/swat"
277 rm -f "${D}/usr/share/man/man8/swat.8"
278 fi
279
280 newinitd "${FILESDIR}/samba-init" samba
281 newconfd "${FILESDIR}/samba-conf" samba
282
283 if use ldap ; then
284 insinto /etc/openldap/schema
285 doins "${S}/examples/LDAP/samba.schema"
286 fi
287
288 if use ipv6 ; then
289 insinto /etc/xinetd.d
290 newins "${FILESDIR}/samba-xinetd" smb
291 fi
292
293 # dirs
294 diropts -m0700 ; keepdir "${PRIVATE_DST}"
295 diropts -m1777 ; keepdir /var/spool/samba
296
297 diropts -m0755
298 keepdir /var/{log,run,cache}/samba
299 keepdir /var/lib/samba/{netlogon,profiles}
300 keepdir /var/lib/samba/printers/{W32X86,WIN40,W32ALPHA,W32MIPS,W32PPC,X64,IA64,COLOR}
301 keepdir /usr/$(get_libdir)/samba/{rpc,idmap,auth}
302
303 # docs
304 dodoc "${FILESDIR}/README.gentoo"
305 dodoc "${S}"/{MAINTAINERS,README,Roadmap,WHATSNEW.txt}
306 dodoc "${CONFDIR}/nsswitch.conf-wins"
307 use winbind && dodoc "${CONFDIR}/nsswitch.conf-winbind"
308
309 if use examples ; then
310 insinto /usr/share/doc/${PF}
311 doins -r "${S}/examples/"
312 find "${D}/usr/share/doc/${PF}" -type d -print0 | xargs -0 chmod 755
313 find "${D}/usr/share/doc/${PF}/examples" ! -type d -print0 | xargs -0 chmod 644
314 if use python ; then
315 insinto /usr/share/doc/${PF}/python
316 doins -r "${S}/source/python/examples"
317 fi
318 fi
319
320 if ! use doc ; then
321 if ! use swat ; then
322 rm -rf "${D}/usr/share/doc/${PF}/swat"
323 else
324 rm -rf "${D}/usr/share/doc/${PF}/swat/help"/{guide,howto,devel}
325 rm -rf "${D}/usr/share/doc/${PF}/swat/using_samba"
326 fi
327 else
328 cd "${S}/docs"
329 insinto /usr/share/doc/${PF}
330 doins *.pdf
331 doins -r registry
332 dohtml -r htmldocs/*
333 fi
334
335 if use oav ; then
336 cd "${WORKDIR}/${VSCAN_P}"
337 emake DESTDIR="${D}" install || die "emake install oav plugins failed"
338 docinto samba-vscan
339 dodoc AUTHORS ChangeLog FAQ INSTALL NEWS README TODO
340 find . -iname "*.conf" -print0 | xargs -0 dodoc
341 fi
342 }
343
344 pkg_preinst() {
345 local PRIVATE_SRC=/etc/samba/private
346 if [[ ! -r "${ROOT}/${PRIVATE_DST}/secrets.tdb" \
347 && -r "${ROOT}/${PRIVATE_SRC}/secrets.tdb" ]] ; then
348 ebegin "Copying ${ROOT}/${PRIVATE_SRC}/* to ${ROOT}/${PRIVATE_DST}/"
349 mkdir -p "${D}/${PRIVATE_DST}"
350 cp -pPRf "${ROOT}/${PRIVATE_SRC}"/* "${D}/${PRIVATE_DST}/"
351 eend $?
352 fi
353
354 if [[ ! -f "${ROOT}/etc/samba/smb.conf" ]] ; then
355 touch "${D}/etc/samba/smb.conf"
356 fi
357 }
358
359 pkg_postinst() {
360 if use python ; then
361 python_version
362 python_mod_optimize /usr/$(get_libdir)/python${PYVER}/site-packages/samba
363 fi
364
365 if use swat ; then
366 einfo "swat must be enabled by xinetd:"
367 einfo " change the /etc/xinetd.d/swat configuration"
368 fi
369
370 if use ipv6 ; then
371 einfo "ipv6 support must be enabled by xinetd:"
372 einfo " change the /etc/xinetd.d/smb configuration"
373 fi
374
375 elog "It is possible to start/stop daemons separately:"
376 elog " Create a symlink from /etc/init.d/samba.{smbd,nmbd,winbind} to"
377 elog " /etc/init.d/samba. Calling /etc/init.d/samba directly will start"
378 elog " the daemons configured in /etc/conf.d/samba"
379
380 elog "The mount/umount.cifs helper applications are not included anymore."
381 elog "Please install net-fs/mount-cifs instead."
382
383 if use oav ; then
384 elog "The configure snippets for various antivirus plugins are available here:"
385 elog " /usr/share/doc/${PF}/samba-vscan"
386 fi
387
388 ewarn "If you're upgrading from 3.0.24 or earlier, please make sure to"
389 ewarn "restart your clients to clear any cached information about the server."
390 ewarn "Otherwise they might not be able to connect to the volumes."
391 }
392
393 pkg_postrm() {
394 if use python ; then
395 python_version
396 python_mod_cleanup /usr/$(get_libdir)/python${PYVER}/site-packages/samba
397 fi
398 }