Gentoo Archives: gentoo-commits

From: "Patrick Lauer (patrick)" <patrick@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-fs/samba: ChangeLog samba-3.2.11.ebuild
Date: Thu, 23 Apr 2009 14:12:54
Message-Id: E1LwzfY-0004VG-QC@stork.gentoo.org
1 patrick 09/04/23 14:12:52
2
3 Modified: ChangeLog
4 Added: samba-3.2.11.ebuild
5 Log:
6 Adding samba-3.2.11 ebuild based on the 3.2.8 ebuild from bug #231273. Thanks to Steffen Stollfuß and all the other people who worked on it and tested it.
7 (Portage version: 2.2_rc31/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.354 net-fs/samba/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-fs/samba/ChangeLog?rev=1.354&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-fs/samba/ChangeLog?rev=1.354&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-fs/samba/ChangeLog?r1=1.353&r2=1.354
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/net-fs/samba/ChangeLog,v
19 retrieving revision 1.353
20 retrieving revision 1.354
21 diff -u -r1.353 -r1.354
22 --- ChangeLog 29 Mar 2009 16:49:58 -0000 1.353
23 +++ ChangeLog 23 Apr 2009 14:12:52 -0000 1.354
24 @@ -1,6 +1,13 @@
25 # ChangeLog for net-fs/samba
26 # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/ChangeLog,v 1.353 2009/03/29 16:49:58 patrick Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/ChangeLog,v 1.354 2009/04/23 14:12:52 patrick Exp $
29 +
30 +*samba-3.2.11 (23 Apr 2009)
31 +
32 + 23 Apr 2009; Patrick Lauer <patrick@g.o> +samba-3.2.11.ebuild:
33 + Adding samba-3.2.11 ebuild based on the 3.2.8 ebuild from bug #231273.
34 + Thanks to Steffen Stollfuss and all the other people who worked on it and
35 + tested it.
36
37 *samba-3.0.34 (29 Mar 2009)
38
39
40
41
42 1.1 net-fs/samba/samba-3.2.11.ebuild
43
44 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-fs/samba/samba-3.2.11.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-fs/samba/samba-3.2.11.ebuild?rev=1.1&content-type=text/plain
46
47 Index: samba-3.2.11.ebuild
48 ===================================================================
49 # Copyright 1999-2009 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.2.11.ebuild,v 1.1 2009/04/23 14:12:52 patrick Exp $
52
53 inherit eutils pam multilib versionator confutils
54
55 MY_P=${PN}-${PV/_/}
56
57 DESCRIPTION="A suite of SMB and CIFS client/server programs for UNIX"
58 HOMEPAGE="http://www.samba.org/"
59 SRC_URI="mirror://samba/${MY_P}.tar.gz"
60 LICENSE="GPL-3"
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 quotas readline selinux swat syslog winbind"
66
67 RDEPEND="dev-libs/popt
68 dev-libs/iniparser
69 virtual/libiconv
70 acl? ( kernel_linux? ( sys-apps/acl ) )
71 cups? ( net-print/cups )
72 ipv6? ( sys-apps/xinetd )
73 ads? ( virtual/krb5 sys-fs/e2fsprogs )
74 ldap? ( net-nds/openldap )
75 pam? ( virtual/pam )
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 S="${WORKDIR}/${MY_P}"
85 CONFDIR="${FILESDIR}/config-3.2"
86 PRIVATE_DST=/var/lib/samba/private
87
88 # Tests are currently broken due to hardcoded paths (due to --with-fhs)
89 # The problem is that --without-fhs lets samba use lockdir (which can be changed in smb.conf)
90 # which is wrong as well.
91 RESTRICT="test"
92
93 pkg_setup() {
94 confutils_use_depend_all ads ldap
95 }
96
97 src_unpack() {
98 unpack ${A}
99 cd "${S}/source"
100
101 # Ok, agreed, this is ugly. But it avoids a patch we
102 # need for every samba version and we don't need autotools
103 sed -i \
104 -e 's|"lib32" ||' \
105 -e 's|if test -d "$i/$l" ;|if test -d "$i/$l" -o -L "$i/$l";|' \
106 configure || die "sed failed"
107
108 rm "${S}/docs/manpages"/{mount,umount}.cifs.8
109
110 sed -i \
111 -e 's|tdbsam|tdbsam:${PRIVATEDIR}/passdb.tdb|' \
112 "${S}/source/script/tests/selftest.sh" || die "sed failed"
113 }
114
115 src_compile() {
116 cd "${S}/source"
117
118 local myconf
119 local mylangs
120 local mymod_shared
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-pammodulesdir=$(getpam_mod_dir) \
151 --with-swatdir=/usr/share/doc/${PF}/swat \
152 --with-piddir=/var/run/samba \
153 --with-lockdir=/var/cache/samba \
154 --with-logfilebase=/var/log/samba \
155 --with-privatedir=${PRIVATE_DST} \
156 --with-libsmbclient \
157 --without-spinlocks \
158 --enable-socket-wrapper \
159 --enable-nss-wrapper \
160 --with-cifsmount=no \
161 $(use_with acl acl-support) \
162 $(use_with async aio-support) \
163 $(use_with automount) \
164 --without-cifsupcall \
165 $(use_enable cups) \
166 $(use_enable fam) \
167 $(use_with ads krb5) \
168 $(use_with ads dnsupdate) \
169 $(use_with ldap) \
170 $(use_with pam) $(use_with pam pam_smbpass) \
171 $(use_with quotas) $(use_with quotas sys-quotas) \
172 $(use_with readline) \
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 }
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 # Removing executable bits from header-files
202 fperms 644 /usr/include/libsmbclient.h
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 # bug #46389: samba doesn't create symlink anymore
213 # beaviour seems to be changed in 3.0.6, see bug #61046
214 dosym samba/libsmbclient.so /usr/$(get_libdir)/libsmbclient.so
215 dosym samba/libsmbclient.so.0 /usr/$(get_libdir)/libsmbclient.so.0
216 dosym samba/libtalloc.so /usr/$(get_libdir)/libtalloc.so
217 dosym samba/libtalloc.so.1 /usr/$(get_libdir)/libtalloc.so.1
218 dosym samba/libtdb.so /usr/$(get_libdir)/libtdb.so
219 dosym samba/libtdb.so.1 /usr/$(get_libdir)/libtdb.so.1
220
221 # make the smb backend symlink for cups printing support (bug #133133)
222 if use cups ; then
223 dodir $(cups-config --serverbin)/backend
224 dosym /usr/bin/smbspool $(cups-config --serverbin)/backend/smb
225 fi
226
227 cd "${S}/source"
228
229 # General config files
230 insinto /etc/samba
231 doins "${CONFDIR}"/{smbusers,lmhosts}
232 newins "${CONFDIR}/smb.conf.example-samba3" smb.conf.example
233
234 newpamd "${CONFDIR}/samba.pam" samba
235 use winbind && dopamd "${CONFDIR}/system-auth-winbind"
236 if use swat ; then
237 insinto /etc/xinetd.d
238 newins "${CONFDIR}/swat.xinetd" swat
239 else
240 rm -f "${D}/usr/sbin/swat"
241 rm -f "${D}/usr/share/man/man8/swat.8"
242 fi
243
244 newinitd "${FILESDIR}/samba-init" samba
245 newconfd "${FILESDIR}/samba-conf" samba
246
247 if use ldap ; then
248 insinto /etc/openldap/schema
249 doins "${S}/examples/LDAP/samba.schema"
250 fi
251
252 if use ipv6 ; then
253 insinto /etc/xinetd.d
254 newins "${FILESDIR}/samba-xinetd" smb
255 fi
256
257 # dirs
258 diropts -m0700 ; keepdir "${PRIVATE_DST}"
259 diropts -m1777 ; keepdir /var/spool/samba
260
261 diropts -m0755
262 keepdir /var/{log,run,cache}/samba
263 keepdir /var/lib/samba/{netlogon,profiles}
264 keepdir /var/lib/samba/printers/{W32X86,WIN40,W32ALPHA,W32MIPS,W32PPC,X64,IA64,COLOR}
265 keepdir /usr/$(get_libdir)/samba/{rpc,idmap,auth}
266
267 # docs
268 dodoc "${FILESDIR}/README.gentoo"
269 dodoc "${S}"/{MAINTAINERS,README,Roadmap,WHATSNEW.txt}
270 dodoc "${CONFDIR}/nsswitch.conf-wins"
271 use winbind && dodoc "${CONFDIR}/nsswitch.conf-winbind"
272
273 if use examples ; then
274 insinto /usr/share/doc/${PF}
275 doins -r "${S}/examples/"
276 find "${D}/usr/share/doc/${PF}" -type d -print0 | xargs -0 chmod 755
277 find "${D}/usr/share/doc/${PF}/examples" ! -type d -print0 | xargs -0 chmod 644
278 fi
279
280 if ! use doc ; then
281 if ! use swat ; then
282 rm -rf "${D}/usr/share/doc/${PF}/swat"
283 else
284 rm -rf "${D}/usr/share/doc/${PF}/swat/help"/{guide,howto,devel}
285 rm -rf "${D}/usr/share/doc/${PF}/swat/using_samba"
286 fi
287 fi
288
289 }
290
291 pkg_preinst() {
292 local PRIVATE_SRC=/etc/samba/private
293 if [[ ! -r "${ROOT}/${PRIVATE_DST}/secrets.tdb" \
294 && -r "${ROOT}/${PRIVATE_SRC}/secrets.tdb" ]] ; then
295 ebegin "Copying ${ROOT}/${PRIVATE_SRC}/* to ${ROOT}/${PRIVATE_DST}/"
296 mkdir -p "${D}/${PRIVATE_DST}"
297 cp -pPRf "${ROOT}/${PRIVATE_SRC}"/* "${D}/${PRIVATE_DST}/"
298 eend $?
299 fi
300
301 if [[ ! -f "${ROOT}/etc/samba/smb.conf" ]] ; then
302 touch "${D}/etc/samba/smb.conf"
303 fi
304 }
305
306 pkg_postinst() {
307 if use swat ; then
308 einfo "swat must be enabled by xinetd:"
309 einfo " change the /etc/xinetd.d/swat configuration"
310 fi
311
312 if use ipv6 ; then
313 einfo "ipv6 support must be enabled by xinetd:"
314 einfo " change the /etc/xinetd.d/smb configuration"
315 fi
316
317 elog "It is possible to start/stop daemons separately:"
318 elog " Create a symlink from /etc/init.d/samba.{smbd,nmbd,winbind} to"
319 elog " /etc/init.d/samba. Calling /etc/init.d/samba directly will start"
320 elog " the daemons configured in /etc/conf.d/samba"
321
322 elog "The mount/umount.cifs helper applications are not included anymore."
323 elog "Please install net-fs/mount-cifs instead."
324
325 ewarn "If you're upgrading from 3.0.24 or earlier, please make sure to"
326 ewarn "restart your clients to clear any cached information about the server."
327 ewarn "Otherwise they might not be able to connect to the volumes."
328 }