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