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