Gentoo Archives: gentoo-commits

From: Andrew Savchenko <bircoph@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/sci:master commit in: sci-physics/xrootd/files/, sci-physics/xrootd/, licenses/
Date: Sun, 04 Dec 2011 00:29:43
Message-Id: 3cc3760632e9d976465085159a98b01b613b2fdc.bircoph@gentoo
1 commit: 3cc3760632e9d976465085159a98b01b613b2fdc
2 Author: Andrew Savchenko <bircoph <AT> gmail <DOT> com>
3 AuthorDate: Sat Dec 3 23:40:33 2011 +0000
4 Commit: Andrew Savchenko <bircoph <AT> gmail <DOT> com>
5 CommitDate: Sat Dec 3 23:40:33 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=3cc37606
7
8 sci-physics/xrootd: unbundled package from ROOT
9
10 This package was earlier bundled in sci-physics/root, it is
11 requeried for xrootd support in >=root-5.32.
12 It has free Standford license (saved as licenses/xrootd).
13 XRootD was tested to compile and work with very simple things on
14 ~x86 and ~amd64. See ChangeLog for details.
15
16 ---
17 licenses/xrootd | 28 +++++++++
18 sci-physics/xrootd/ChangeLog | 26 ++++++++
19 sci-physics/xrootd/files/cmsd.initd | 30 +++++++++
20 sci-physics/xrootd/files/frm_purged.initd | 30 +++++++++
21 sci-physics/xrootd/files/frm_xfrd.initd | 30 +++++++++
22 sci-physics/xrootd/files/xrootd.confd | 21 ++++++
23 sci-physics/xrootd/files/xrootd.initd | 28 +++++++++
24 sci-physics/xrootd/metadata.xml | 15 +++++
25 sci-physics/xrootd/xrootd-3.1.0.ebuild | 95 +++++++++++++++++++++++++++++
26 9 files changed, 303 insertions(+), 0 deletions(-)
27
28 diff --git a/licenses/xrootd b/licenses/xrootd
29 new file mode 100644
30 index 0000000..74566ee
31 --- /dev/null
32 +++ b/licenses/xrootd
33 @@ -0,0 +1,28 @@
34 +"Copyright (c) 2005-2010, Board of Trustees of the Leland Stanford, Jr. University.\n"
35 +"Produced under contract DE-AC02-76-SF00515 with the US Department of Energy. \n"
36 +"All rights reserved. \n"
37 +" Conditions of Use \n"
38 +"Redistribution and use in source and binary forms, with or without modification, \n"
39 +"are permitted provided that the following conditions are met: \n"
40 +"a. Redistributions of source code must retain the above copyright notice, this \n"
41 +" list of conditions and the following disclaimer. \n"
42 +"b. Redistributions in binary form must reproduce the above copyright notice, \n"
43 +" this list of conditions and the following disclaimer in the documentation \n"
44 +" and/or other materials provided with the distribution. \n"
45 +"c. Neither the name of the Leland Stanford, Jr. University nor the names of its \n"
46 +" contributors may be used to endorse or promote products derived from this \n"
47 +" software without specific prior written permission. \n"
48 +"d. Products derived from this software that do not adhere to the xrootd or cmsd \n"
49 +" protocol specifications may not use the acronyms 'cmsd', 'Scalla', 'xroot', \n"
50 +" and 'xrootd', regardless of capitalization, to describe such derivative works. \n"
51 +" DISCLAIMER \n"
52 +"THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND \n"
53 +"ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \n"
54 +"WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n"
55 +"IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \n"
56 +"INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, \n"
57 +"BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, \n"
58 +"DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF \n"
59 +"LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE \n"
60 +"OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED \n"
61 +"OF THE POSSIBILITY OF SUCH DAMAGE. \n"
62
63 diff --git a/sci-physics/xrootd/ChangeLog b/sci-physics/xrootd/ChangeLog
64 new file mode 100644
65 index 0000000..127144e
66 --- /dev/null
67 +++ b/sci-physics/xrootd/ChangeLog
68 @@ -0,0 +1,26 @@
69 +# ChangeLog for sci-physics/xrootd
70 +# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
71 +# $Header: $
72 +
73 +*xrootd-3.1.0 (03 Dec 2011)
74 +
75 + 03 Dec 2011; Andrew Savchenko <bircoph@×××××.com> +xrootd-3.1.0.ebuild,
76 + +files/cmsd.initd, +files/frm_purged.initd, +files/frm_xfrd.initd,
77 + +files/xrootd.confd, +files/xrootd.initd, +metadata.xml:
78 + XRootD isn't really a new program in this overlay. It was
79 + previously bundled within sci-physics/root, but now it is unbundled
80 + upstream and needs to be installed as a separate package in order
81 + to be used from ROOT.
82 +
83 + Aside from standard xrootd distribution, this ebuild may install
84 + useful pdf documentation from the official web site.
85 +
86 + Program was tested on ~x86 and ~amd64 with some basic setup, though
87 + no real production tests were done. Please note, that xrootd and
88 + accompany daemons do not work with root privileges any longer, so
89 + special xrootd user was used.
90 +
91 + Another note: all daemons MUST use the same config (-c
92 + /etc/xrootd/your._config), that's why there is only one conf.d file
93 + for all four daemons.
94 +
95
96 diff --git a/sci-physics/xrootd/files/cmsd.initd b/sci-physics/xrootd/files/cmsd.initd
97 new file mode 100644
98 index 0000000..105bd55
99 --- /dev/null
100 +++ b/sci-physics/xrootd/files/cmsd.initd
101 @@ -0,0 +1,30 @@
102 +#!/sbin/runscript
103 +# Copyright 1999-2011 Gentoo Foundation
104 +# Distributed under the terms of the GNU General Public License v2
105 +# $Header: $
106 +
107 +source /etc/conf.d/xrootd
108 +
109 +depend() {
110 + need net
111 + use logger dns
112 + provide root-file-server
113 +}
114 +
115 +start() {
116 + ebegin "Starting Cluster Management Service daemon"
117 + start-stop-daemon --start --quiet --user ${XROOTD_USER} \
118 + --make-pidfile --pidfile /var/run/${RC_SVCNAME}.pid \
119 + --exec /usr/bin/${RC_SVCNAME} --background -- \
120 + -c ${XROOTD_CONF} -l ${XROOTD_LOGDIR}/${RC_SVCNAME}.log \
121 + ${CMSD_OPTS}
122 + eend $?
123 +}
124 +
125 +stop() {
126 + ebegin "Stopping Cluster Management Service daemon"
127 + start-stop-daemon --stop --quiet \
128 + --pidfile /var/run/${RC_SVCNAME}.pid \
129 + --exec /usr/bin/${RC_SVCNAME}
130 + eend $?
131 +}
132
133 diff --git a/sci-physics/xrootd/files/frm_purged.initd b/sci-physics/xrootd/files/frm_purged.initd
134 new file mode 100644
135 index 0000000..1e1f2c8
136 --- /dev/null
137 +++ b/sci-physics/xrootd/files/frm_purged.initd
138 @@ -0,0 +1,30 @@
139 +#!/sbin/runscript
140 +# Copyright 1999-2011 Gentoo Foundation
141 +# Distributed under the terms of the GNU General Public License v2
142 +# $Header: $
143 +
144 +source /etc/conf.d/xrootd
145 +
146 +depend() {
147 + need net
148 + use logger dns
149 + provide root-file-server
150 +}
151 +
152 +start() {
153 + ebegin "Starting File Residency Manager purge daemon"
154 + start-stop-daemon --start --quiet --user ${XROOTD_USER} \
155 + --make-pidfile --pidfile /var/run/${RC_SVCNAME}.pid \
156 + --exec /usr/bin/${RC_SVCNAME} --background -- \
157 + -c ${XROOTD_CONF} -l ${XROOTD_LOGDIR}/${RC_SVCNAME}.log \
158 + ${FRM_PURGED_OPTS}
159 + eend $?
160 +}
161 +
162 +stop() {
163 + ebegin "Stopping File Residency Manager purge daemon"
164 + start-stop-daemon --stop --quiet \
165 + --pidfile /var/run/${RC_SVCNAME}.pid \
166 + --exec /usr/bin/${RC_SVCNAME}
167 + eend $?
168 +}
169
170 diff --git a/sci-physics/xrootd/files/frm_xfrd.initd b/sci-physics/xrootd/files/frm_xfrd.initd
171 new file mode 100644
172 index 0000000..68da1cb
173 --- /dev/null
174 +++ b/sci-physics/xrootd/files/frm_xfrd.initd
175 @@ -0,0 +1,30 @@
176 +#!/sbin/runscript
177 +# Copyright 1999-2011 Gentoo Foundation
178 +# Distributed under the terms of the GNU General Public License v2
179 +# $Header: $
180 +
181 +source /etc/conf.d/xrootd
182 +
183 +depend() {
184 + need net
185 + use logger dns
186 + provide root-file-server
187 +}
188 +
189 +start() {
190 + ebegin "Starting File Residency Manager transfer daemon"
191 + start-stop-daemon --start --quiet --user ${XROOTD_USER} \
192 + --make-pidfile --pidfile /var/run/${RC_SVCNAME}.pid \
193 + --exec /usr/bin/${RC_SVCNAME} --background -- \
194 + -c ${XROOTD_CONF} -l ${XROOTD_LOGDIR}/${RC_SVCNAME}.log \
195 + ${FRM_XFRD_OPTS}
196 + eend $?
197 +}
198 +
199 +stop() {
200 + ebegin "Stopping File Residency Manager transfer daemon"
201 + start-stop-daemon --stop --quiet \
202 + --pidfile /var/run/${RC_SVCNAME}.pid \
203 + --exec /usr/bin/${RC_SVCNAME}
204 + eend $?
205 +}
206
207 diff --git a/sci-physics/xrootd/files/xrootd.confd b/sci-physics/xrootd/files/xrootd.confd
208 new file mode 100644
209 index 0000000..0e847e5
210 --- /dev/null
211 +++ b/sci-physics/xrootd/files/xrootd.confd
212 @@ -0,0 +1,21 @@
213 +# conf.d file for xroot, cmsd, frm_purged, frm_xfrd daemons
214 +
215 +# User to run as, please note that:
216 +# 1) daemons will refuse to run as root;
217 +# 2) several dirs must be created with an appropriate permissions
218 +# and ownership, so be careful when changing default 'xrootd' user.
219 +XROOTD_USER="xrootd"
220 +
221 +# Configuration file MUST be the same for all four daemons.
222 +# See /etc/xrootd for available simple defaults.
223 +XROOTD_CONF="/etc/xrootd/xrootd-clustered.cfg"
224 +
225 +# Logdir for all daemons
226 +XROOTD_LOGDIR="/var/log/xrootd"
227 +
228 +# Additional options for each daemon, please refer to their
229 +# documentation for details
230 +XROOTD_OPTS=""
231 +CMSD_OPTS=""
232 +FRM_PURGED=""
233 +FRM_XFRD=""
234
235 diff --git a/sci-physics/xrootd/files/xrootd.initd b/sci-physics/xrootd/files/xrootd.initd
236 new file mode 100644
237 index 0000000..64992b7
238 --- /dev/null
239 +++ b/sci-physics/xrootd/files/xrootd.initd
240 @@ -0,0 +1,28 @@
241 +#!/sbin/runscript
242 +# Copyright 1999-2011 Gentoo Foundation
243 +# Distributed under the terms of the GNU General Public License v2
244 +# $Header: $
245 +
246 +depend() {
247 + need net
248 + use logger dns
249 + provide root-file-server
250 +}
251 +
252 +start() {
253 + ebegin "Starting extended ROOTD file server"
254 + start-stop-daemon --start --quiet --user ${XROOTD_USER} \
255 + --make-pidfile --pidfile /var/run/${RC_SVCNAME}.pid \
256 + --exec /usr/bin/${RC_SVCNAME} --background -- \
257 + -c ${XROOTD_CONF} -l ${XROOTD_LOGDIR}/${RC_SVCNAME}.log \
258 + ${XROOTD_OPTS}
259 + eend $?
260 +}
261 +
262 +stop() {
263 + ebegin "Stopping extended ROOTD file server"
264 + start-stop-daemon --stop --quiet \
265 + --pidfile /var/run/${RC_SVCNAME}.pid \
266 + --exec /usr/bin/${RC_SVCNAME}
267 + eend $?
268 +}
269
270 diff --git a/sci-physics/xrootd/metadata.xml b/sci-physics/xrootd/metadata.xml
271 new file mode 100644
272 index 0000000..fbfe13f
273 --- /dev/null
274 +++ b/sci-physics/xrootd/metadata.xml
275 @@ -0,0 +1,15 @@
276 +<?xml version="1.0" encoding="UTF-8"?>
277 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
278 +<pkgmetadata>
279 + <herd>sci-physics</herd>
280 + <longdescription lang="en">
281 + XROOTD software framework is a fully generic suite for fast, low latency and
282 + scalable data access, which can serve natively any kind of data, organized as
283 + a hierarchical filesystem-like namespace, based on the concept of directory.
284 + It is usually used with <pkg>sci-physics/root</pkg> and its PROOF facilities
285 + for cluster computing in high energy physics.
286 + </longdescription>
287 + <use>
288 + <flag name="fuse">Enable the <pkg>sys-fs/fuse</pkg> filesystem driver</flag>
289 + </use>
290 +</pkgmetadata>
291
292 diff --git a/sci-physics/xrootd/xrootd-3.1.0.ebuild b/sci-physics/xrootd/xrootd-3.1.0.ebuild
293 new file mode 100644
294 index 0000000..405697f
295 --- /dev/null
296 +++ b/sci-physics/xrootd/xrootd-3.1.0.ebuild
297 @@ -0,0 +1,95 @@
298 +# Copyright 1999-2011 Gentoo Foundation
299 +# Distributed under the terms of the GNU General Public License v2
300 +# $Header: $
301 +
302 +EAPI=4
303 +
304 +inherit cmake-utils eutils
305 +
306 +DURI="http://xrootd.slac.stanford.edu/doc/prod"
307 +
308 +DESCRIPTION="XRootD is a scalable ROOT remote file server"
309 +HOMEPAGE="http://xrootd.slac.stanford.edu/index.html"
310 +SRC_URI="http://xrootd.slac.stanford.edu/download/v${PV}/${P}.tar.gz
311 + doc? (
312 + ${DURI}/Syntax_config.pdf
313 + ${DURI}/xrd_config.pdf
314 + ${DURI}/ofs_config.pdf
315 + ${DURI}/cms_config.pdf
316 + ${DURI}/sec_config.pdf
317 + ${DURI}/xrd_monitoring.pdf
318 + ${DURI}/frm_config.pdf
319 + ${DURI}/XRdv297.pdf
320 + )"
321 +
322 +LICENSE="xrootd"
323 +SLOT="0"
324 +KEYWORDS="~amd64 ~x86"
325 +IUSE="doc fuse kerberos perl readline ssl"
326 +
327 +RDEPEND="
328 + !<sci-physics/root-5.32
329 + sys-libs/zlib
330 + fuse? ( sys-fs/fuse )
331 + kerberos? ( virtual/krb5 )
332 + perl? (
333 + dev-lang/perl
334 + readline? ( dev-perl/Term-ReadLine-Perl )
335 + )
336 + readline? ( sys-libs/readline )
337 + ssl? ( dev-libs/openssl )
338 +"
339 +DEPEND="${RDEPEND}
340 + perl? ( dev-lang/swig )"
341 +
342 +pkg_setup() {
343 + enewgroup xrootd
344 + enewuser xrootd -1 -1 "${EPREFIX}"/var/spool/xrootd xrootd
345 +}
346 +
347 +src_configure() {
348 + mycmakeargs=(
349 + "-DCMAKE_BUILD_TYPE=Release"
350 + $(cmake-utils_use_enable fuse)
351 + $(cmake-utils_use_enable kerberos KRB5)
352 + $(cmake-utils_use_enable perl)
353 + $(cmake-utils_use_enable readline)
354 + $(cmake-utils_use_enable ssl CRYPTO)
355 + )
356 + cmake-utils_src_configure
357 +}
358 +
359 +src_install() {
360 + cmake-utils_src_install
361 +
362 + # base configs
363 + insinto /etc/xrootd
364 + doins "${S}"/packaging/common/*.cfg
365 +
366 + # create aux dirs and correct permissions so that xrootd
367 + # will be happy as a non-priviledged user
368 + fowners root:xrootd "${EPREFIX}"/etc/xrootd
369 + keepdir "${EPREFIX}"/var/log/xrootd
370 + keepdir "${EPREFIX}"/var/run/xrootd
371 + keepdir "${EPREFIX}"/var/spool/xrootd
372 + fowners xrootd:xrootd "${EPREFIX}"/var/{log,run,spool}/xrootd
373 +
374 + for i in cmsd frm_purged frm_xfrd xrootd; do
375 + newinitd "${FILESDIR}"/${i}.initd ${i}
376 + done
377 + # all daemons MUST use single master config file
378 + newconfd "${FILESDIR}"/xrootd.confd xrootd
379 +
380 + dodoc README docs/ReleaseNotes.txt
381 + if use doc; then
382 + dodoc \
383 + "${DISTDIR}"/Syntax_config.pdf \
384 + "${DISTDIR}"/xrd_config.pdf \
385 + "${DISTDIR}"/ofs_config.pdf \
386 + "${DISTDIR}"/cms_config.pdf \
387 + "${DISTDIR}"/sec_config.pdf \
388 + "${DISTDIR}"/xrd_monitoring.pdf \
389 + "${DISTDIR}"/frm_config.pdf \
390 + "${DISTDIR}"/XRdv297.pdf
391 + fi
392 +}