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.28a-r1.ebuild
Date: Thu, 29 May 2008 06:37:26
Message-Id: E1K1blI-0007Qe-8I@stork.gentoo.org
1 dev-zero 08/05/29 06:37:20
2
3 Modified: ChangeLog
4 Added: samba-3.0.28a-r1.ebuild
5 Log:
6 Revision bump for security bug #222299
7 (Portage version: 2.1.5_rc7, RepoMan options: --force)
8
9 Revision Changes Path
10 1.334 net-fs/samba/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-fs/samba/ChangeLog?rev=1.334&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-fs/samba/ChangeLog?rev=1.334&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-fs/samba/ChangeLog?r1=1.333&r2=1.334
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/net-fs/samba/ChangeLog,v
19 retrieving revision 1.333
20 retrieving revision 1.334
21 diff -u -r1.333 -r1.334
22 --- ChangeLog 17 May 2008 12:33:00 -0000 1.333
23 +++ ChangeLog 29 May 2008 06:37:19 -0000 1.334
24 @@ -1,6 +1,12 @@
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.333 2008/05/17 12:33:00 dev-zero Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/ChangeLog,v 1.334 2008/05/29 06:37:19 dev-zero Exp $
29 +
30 +*samba-3.0.28a-r1 (29 May 2008)
31 +
32 + 29 May 2008; Tiziano Müller <dev-zero@g.o>
33 + +files/3.0.28a-CVE-2008-1105.patch, +samba-3.0.28a-r1.ebuild:
34 + Revision bump for security bug #222299
35
36 17 May 2008; Tiziano Müller <dev-zero@g.o>
37 +files/3.0.28a-wrong_python_ldflags.patch, samba-3.0.28a.ebuild:
38
39
40
41 1.1 net-fs/samba/samba-3.0.28a-r1.ebuild
42
43 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-fs/samba/samba-3.0.28a-r1.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-fs/samba/samba-3.0.28a-r1.ebuild?rev=1.1&content-type=text/plain
45
46 Index: samba-3.0.28a-r1.ebuild
47 ===================================================================
48 # Copyright 1999-2008 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.0.28a-r1.ebuild,v 1.1 2008/05/29 06:37:19 dev-zero Exp $
51
52 inherit autotools eutils pam python multilib versionator confutils
53
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 LICENSE="GPL-2"
61 SLOT="0"
62 KEYWORDS="alpha amd64 ~arm hppa ~ia64 ~mips ppc ppc64 ~s390 ~sh sparc ~sparc-fbsd x86 ~x86-fbsd"
63 IUSE_LINGUAS="linguas_ja linguas_pl"
64 IUSE="${IUSE_LINGUAS} acl ads async automount caps cups doc examples ipv6 kernel_linux ldap fam
65 pam python quotas readline selinux swat syslog winbind"
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-libcap_detection.patch" \
106 "${FILESDIR}/3.0.28-fix_broken_readdir_detection.patch" \
107 "${FILESDIR}/3.0.28-autoconf-2.62-fix.patch" \
108 "${FILESDIR}/${PV}-wrong_python_ldflags.patch" \
109 "${FILESDIR}/${PV}-CVE-2008-1105.patch"
110
111 eautoconf -I. -Ilib/replace
112
113 # Ok, agreed, this is ugly. But it avoids a patch we
114 # need for every samba version and we don't need autotools
115 sed -i \
116 -e 's|"lib32" ||' \
117 -e 's|if test -d "$i/$l" ;|if test -d "$i/$l" -o -L "$i/$l";|' \
118 configure || die "sed failed"
119
120 rm "${S}/docs/manpages"/{mount,umount}.cifs.8
121
122 }
123
124 src_compile() {
125 cd "${S}/source"
126
127 local myconf
128 local mylangs
129 local mymod_shared
130
131 python_version
132 myconf="--with-python=no"
133 use python && myconf="--with-python=${python}"
134
135 mylangs="--with-manpages-langs=en"
136 use linguas_ja && mylangs="${mylangs},ja"
137 use linguas_pl && mylangs="${mylangs},pl"
138
139 use winbind && mymod_shared="--with-shared-modules=idmap_rid"
140 if use ldap ; then
141 myconf="${myconf} $(use_with ads)"
142 use winbind && mymod_shared="${mymod_shared},idmap_ad"
143 fi
144
145 [[ ${CHOST} == *-*bsd* ]] && myconf="${myconf} --disable-pie"
146 use hppa && myconf="${myconf} --disable-pie"
147
148 use caps && export ac_cv_header_sys_capability_h=yes || export ac_cv_header_sys_capability_h=no
149
150 # Otherwise we get the whole swat stuff installed
151 if ! use swat ; then
152 sed -i \
153 -e 's/^\(install:.*\)installswat \(.*\)/\1\2/' \
154 Makefile.in || die "sed failed"
155 fi
156
157 econf \
158 --with-fhs \
159 --sysconfdir=/etc/samba \
160 --localstatedir=/var \
161 --with-configdir=/etc/samba \
162 --with-libdir=/usr/$(get_libdir)/samba \
163 --with-pammodulesdir=$(getpam_mod_dir) \
164 --with-swatdir=/usr/share/doc/${PF}/swat \
165 --with-piddir=/var/run/samba \
166 --with-lockdir=/var/cache/samba \
167 --with-logfilebase=/var/log/samba \
168 --with-privatedir=${PRIVATE_DST} \
169 --with-libsmbclient \
170 --without-spinlocks \
171 --enable-socket-wrapper \
172 --with-cifsmount=no \
173 $(use_with acl acl-support) \
174 $(use_with async aio-support) \
175 $(use_with automount) \
176 $(use_enable cups) \
177 $(use_enable fam) \
178 $(use_with ads krb5) \
179 $(use_with ldap) \
180 $(use_with pam) $(use_with pam pam_smbpass) \
181 $(use_with quotas) $(use_with quotas sys-quotas) \
182 $(use_with readline) \
183 $(use_with kernel_linux smbmount) \
184 $(use_with syslog) \
185 $(use_with winbind) \
186 ${myconf} ${mylangs} ${mymod_shared} || die "econf failed"
187
188 emake proto || die "emake proto failed"
189 emake everything || die "emake everything failed"
190
191 if use python ; then
192 emake python_ext || die "emake python_ext failed"
193 fi
194 }
195
196 src_test() {
197 cd "${S}/source"
198 emake test || die "tests failed"
199 }
200
201 src_install() {
202 cd "${S}/source"
203
204 emake DESTDIR="${D}" install-everything || die "emake install-everything failed"
205
206 # Extra rpctorture progs
207 local extra_bins="rpctorture"
208 for i in ${extra_bins} ; do
209 [[ -x "${S}/bin/${i}" ]] && dobin "${S}/bin/${i}"
210 done
211
212 # remove .old stuff from /usr/bin:
213 rm -f "${D}"/usr/bin/*.old
214
215 # Removing executable bits from header-files
216 fperms 644 /usr/include/lib{msrpc,smbclient}.h
217
218 # Nsswitch extensions. Make link for wins and winbind resolvers
219 if use winbind ; then
220 dolib.so nsswitch/libnss_wins.so
221 dosym libnss_wins.so /usr/$(get_libdir)/libnss_wins.so.2
222 dolib.so nsswitch/libnss_winbind.so
223 dosym libnss_winbind.so /usr/$(get_libdir)/libnss_winbind.so.2
224 fi
225
226 if use kernel_linux ; then
227 # Warning: this can byte you if /usr is
228 # on a separate volume and you have to mount
229 # a smb volume before the local mount
230 dosym ../usr/bin/smbmount /sbin/mount.smbfs
231 fperms 4755 /usr/bin/smbmnt
232 fperms 4755 /usr/bin/smbumount
233 fi
234
235 # bug #46389: samba doesn't create symlink anymore
236 # beaviour seems to be changed in 3.0.6, see bug #61046
237 dosym samba/libsmbclient.so /usr/$(get_libdir)/libsmbclient.so.0
238 dosym samba/libsmbclient.so /usr/$(get_libdir)/libsmbclient.so
239
240 # make the smb backend symlink for cups printing support (bug #133133)
241 if use cups ; then
242 dodir $(cups-config --serverbin)/backend
243 dosym /usr/bin/smbspool $(cups-config --serverbin)/backend/smb
244 fi
245
246 if use python ; then
247 emake DESTDIR="${D}" python_install || die "emake installpython failed"
248 # We're doing that manually
249 find "${D}/usr/$(get_libdir)/python${PYVER}/site-packages" -iname "*.pyc" -delete
250 fi
251
252 cd "${S}/source"
253
254 # General config files
255 insinto /etc/samba
256 doins "${CONFDIR}"/{smbusers,lmhosts}
257 newins "${CONFDIR}/smb.conf.example-samba3" smb.conf.example
258
259 newpamd "${CONFDIR}/samba.pam" samba
260 use winbind && dopamd "${CONFDIR}/system-auth-winbind"
261 if use swat ; then
262 insinto /etc/xinetd.d
263 newins "${CONFDIR}/swat.xinetd" swat
264 else
265 rm -f "${D}/usr/sbin/swat"
266 rm -f "${D}/usr/share/man/man8/swat.8"
267 fi
268
269 newinitd "${FILESDIR}/samba-init" samba
270 newconfd "${FILESDIR}/samba-conf" samba
271
272 if use ldap ; then
273 insinto /etc/openldap/schema
274 doins "${S}/examples/LDAP/samba.schema"
275 fi
276
277 if use ipv6 ; then
278 insinto /etc/xinetd.d
279 newins "${FILESDIR}/samba-xinetd" smb
280 fi
281
282 # dirs
283 diropts -m0700 ; keepdir "${PRIVATE_DST}"
284 diropts -m1777 ; keepdir /var/spool/samba
285
286 diropts -m0755
287 keepdir /var/{log,run,cache}/samba
288 keepdir /var/lib/samba/{netlogon,profiles}
289 keepdir /var/lib/samba/printers/{W32X86,WIN40,W32ALPHA,W32MIPS,W32PPC,X64,IA64,COLOR}
290 keepdir /usr/$(get_libdir)/samba/{rpc,idmap,auth}
291
292 # docs
293 dodoc "${FILESDIR}/README.gentoo"
294 dodoc "${S}"/{MAINTAINERS,README,Roadmap,WHATSNEW.txt}
295 dodoc "${CONFDIR}/nsswitch.conf-wins"
296 use winbind && dodoc "${CONFDIR}/nsswitch.conf-winbind"
297
298 if use examples ; then
299 insinto /usr/share/doc/${PF}
300 doins -r "${S}/examples/"
301 find "${D}/usr/share/doc/${PF}" -type d -print0 | xargs -0 chmod 755
302 find "${D}/usr/share/doc/${PF}/examples" ! -type d -print0 | xargs -0 chmod 644
303 if use python ; then
304 insinto /usr/share/doc/${PF}/python
305 doins -r "${S}/source/python/examples"
306 fi
307 fi
308
309 if ! use doc ; then
310 if ! use swat ; then
311 rm -rf "${D}/usr/share/doc/${PF}/swat"
312 else
313 rm -rf "${D}/usr/share/doc/${PF}/swat/help"/{guide,howto,devel}
314 rm -rf "${D}/usr/share/doc/${PF}/swat/using_samba"
315 fi
316 fi
317
318 }
319
320 pkg_preinst() {
321 local PRIVATE_SRC=/etc/samba/private
322 if [[ ! -r "${ROOT}/${PRIVATE_DST}/secrets.tdb" \
323 && -r "${ROOT}/${PRIVATE_SRC}/secrets.tdb" ]] ; then
324 ebegin "Copying ${ROOT}/${PRIVATE_SRC}/* to ${ROOT}/${PRIVATE_DST}/"
325 mkdir -p "${D}/${PRIVATE_DST}"
326 cp -pPRf "${ROOT}/${PRIVATE_SRC}"/* "${D}/${PRIVATE_DST}/"
327 eend $?
328 fi
329
330 if [[ ! -f "${ROOT}/etc/samba/smb.conf" ]] ; then
331 touch "${D}/etc/samba/smb.conf"
332 fi
333 }
334
335 pkg_postinst() {
336 if use python ; then
337 python_version
338 python_mod_optimize /usr/$(get_libdir)/python${PYVER}/site-packages/samba
339 fi
340
341 if use swat ; then
342 einfo "swat must be enabled by xinetd:"
343 einfo " change the /etc/xinetd.d/swat configuration"
344 fi
345
346 if use ipv6 ; then
347 einfo "ipv6 support must be enabled by xinetd:"
348 einfo " change the /etc/xinetd.d/smb configuration"
349 fi
350
351 elog "It is possible to start/stop daemons separately:"
352 elog " Create a symlink from /etc/init.d/samba.{smbd,nmbd,winbind} to"
353 elog " /etc/init.d/samba. Calling /etc/init.d/samba directly will start"
354 elog " the daemons configured in /etc/conf.d/samba"
355
356 elog "The mount/umount.cifs helper applications are not included anymore."
357 elog "Please install net-fs/mount-cifs instead."
358
359 ewarn "If you're upgrading from 3.0.24 or earlier, please make sure to"
360 ewarn "restart your clients to clear any cached information about the server."
361 ewarn "Otherwise they might not be able to connect to the volumes."
362 }
363
364 pkg_postrm() {
365 if use python ; then
366 python_version
367 python_mod_cleanup /usr/$(get_libdir)/python${PYVER}/site-packages/samba
368 fi
369 }
370
371
372
373 --
374 gentoo-commits@l.g.o mailing list