Gentoo Archives: gentoo-dev

From: Alexey Shvetsov <alexxy@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Re: gentoo-x86 commit in sys-cluster/torque: metadata.xml ChangeLog torque-2.5.6-r1.ebuild
Date: Tue, 05 Jul 2011 19:28:04
Message-Id: ce4924e55f73492e4e94ac99ed4d76c6@omrb.pnpi.spb.ru
In Reply to: [gentoo-dev] Re: gentoo-x86 commit in sys-cluster/torque: metadata.xml ChangeLog torque-2.5.6-r1.ebuild by Justin Bronder
1 On Tue, 5 Jul 2011 13:09:13 -0400, Justin Bronder wrote:
2 > On 03/07/11 23:37 +0000, Alexey Shvetsov (alexxy) wrote:
3 >> alexxy 11/07/03 23:37:20
4 >>
5 >> Modified: metadata.xml ChangeLog
6 >> Added: torque-2.5.6-r1.ebuild
7 >> Log:
8 >> Add blocker to slurm and add maui scheduler to rdepend
9 >
10 > USE=maui doesn't change anything on the users system aside from
11 > adding
12 > another package they do not need in order to use Torque. I'd rather
13 > users
14 > install maui by themselves if they want to replace pbs_sched.
15 >
16 > Unless you feel strongly, I'm going to back out that part of this
17 > changeset.
18 >
19
20 Well its a good way to indicate that torque need maui with pbs use flag
21 if it want to use it.
22
23 > Thanks,
24 >
25 >>
26 >> (Portage version: 2.2.0_alpha43/cvs/Linux x86_64)
27 >>
28 >> Revision Changes Path
29 >> 1.8 sys-cluster/torque/metadata.xml
30 >>
31 >> file :
32 >> http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-cluster/torque/metadata.xml?rev=1.8&view=markup
33 >> plain:
34 >> http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-cluster/torque/metadata.xml?rev=1.8&content-type=text/plain
35 >> diff :
36 >> http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-cluster/torque/metadata.xml?r1=1.7&r2=1.8
37 >>
38 >> Index: metadata.xml
39 >> ===================================================================
40 >> RCS file: /var/cvsroot/gentoo-x86/sys-cluster/torque/metadata.xml,v
41 >> retrieving revision 1.7
42 >> retrieving revision 1.8
43 >> diff -u -r1.7 -r1.8
44 >> --- metadata.xml 26 Jun 2011 00:47:16 -0000 1.7
45 >> +++ metadata.xml 3 Jul 2011 23:37:20 -0000 1.8
46 >> @@ -6,9 +6,10 @@
47 >> <email>jsbronder@g.o</email>
48 >> </maintainer>
49 >> <use>
50 >> - <flag name='cpusets'>Enable pbs_mom to utilize linux cpusets if
51 >> available.</flag>
52 >> - <flag name='drmaa'>Enable the Distributed Resource Management
53 >> Application API.</flag>
54 >> - <flag name='munge'>Enable authentication via munge.</flag>
55 >> - <flag name='server'>Enable compilation of pbs_server and
56 >> pbs_sched.</flag>
57 >> + <flag name='cpusets'>Enable pbs_mom to utilize linux cpusets if
58 >> available</flag>
59 >> + <flag name='drmaa'>Enable the Distributed Resource Management
60 >> Application API</flag>
61 >> + <flag name='maui'>Enable maui scheduler support</flag>
62 >> + <flag name='munge'>Enable authentication via munge</flag>
63 >> + <flag name='server'>Enable compilation of pbs_server and
64 >> pbs_sched</flag>
65 >> </use>
66 >> </pkgmetadata>
67 >>
68 >>
69 >>
70 >> 1.118 sys-cluster/torque/ChangeLog
71 >>
72 >> file :
73 >> http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-cluster/torque/ChangeLog?rev=1.118&view=markup
74 >> plain:
75 >> http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-cluster/torque/ChangeLog?rev=1.118&content-type=text/plain
76 >> diff :
77 >> http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-cluster/torque/ChangeLog?r1=1.117&r2=1.118
78 >>
79 >> Index: ChangeLog
80 >> ===================================================================
81 >> RCS file: /var/cvsroot/gentoo-x86/sys-cluster/torque/ChangeLog,v
82 >> retrieving revision 1.117
83 >> retrieving revision 1.118
84 >> diff -u -r1.117 -r1.118
85 >> --- ChangeLog 2 Jul 2011 18:12:32 -0000 1.117
86 >> +++ ChangeLog 3 Jul 2011 23:37:20 -0000 1.118
87 >> @@ -1,6 +1,12 @@
88 >> # ChangeLog for sys-cluster/torque
89 >> # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL
90 >> v2
91 >> -# $Header: /var/cvsroot/gentoo-x86/sys-cluster/torque/ChangeLog,v
92 >> 1.117 2011/07/02 18:12:32 armin76 Exp $
93 >> +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/torque/ChangeLog,v
94 >> 1.118 2011/07/03 23:37:20 alexxy Exp $
95 >> +
96 >> +*torque-2.5.6-r1 (03 Jul 2011)
97 >> +
98 >> + 03 Jul 2011; Alexey Shvetsov <alexxy@g.o>
99 >> +torque-2.5.6-r1.ebuild,
100 >> + metadata.xml:
101 >> + Add blocker to slurm and add maui scheduler to rdepend
102 >>
103 >> 02 Jul 2011; Raúl Porcel <armin76@g.o>
104 >> torque-2.4.14.ebuild:
105 >> alpha/ia64/sparc stable wrt #372959
106 >>
107 >>
108 >>
109 >> 1.1 sys-cluster/torque/torque-2.5.6-r1.ebuild
110 >>
111 >> file :
112 >> http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-cluster/torque/torque-2.5.6-r1.ebuild?rev=1.1&view=markup
113 >> plain:
114 >> http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-cluster/torque/torque-2.5.6-r1.ebuild?rev=1.1&content-type=text/plain
115 >>
116 >> Index: torque-2.5.6-r1.ebuild
117 >> ===================================================================
118 >> # Copyright 1999-2011 Gentoo Foundation
119 >> # Distributed under the terms of the GNU General Public License v2
120 >> # $Header:
121 >> /var/cvsroot/gentoo-x86/sys-cluster/torque/torque-2.5.6-r1.ebuild,v
122 >> 1.1 2011/07/03 23:37:20 alexxy Exp $
123 >>
124 >> EAPI=2
125 >> inherit flag-o-matic eutils linux-info
126 >>
127 >> DESCRIPTION="Resource manager and queuing system based on OpenPBS"
128 >> HOMEPAGE="http://www.clusterresources.com/products/torque/"
129 >>
130 >> SRC_URI="http://www.clusterresources.com/downloads/${PN}/${P}.tar.gz"
131 >>
132 >> LICENSE="torque-2.5"
133 >>
134 >> SLOT="0"
135 >> KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
136 >> IUSE="cpusets +crypt doc drmaa kernel_linux maui munge server
137 >> +syslog threads tk xml"
138 >>
139 >> # ed is used by makedepend-sh
140 >> DEPEND_COMMON="sys-libs/ncurses
141 >> sys-libs/readline
142 >> munge? ( sys-auth/munge )
143 >> tk? ( dev-lang/tk )
144 >> syslog? ( virtual/logger )
145 >> !games-util/qstat"
146 >>
147 >> DEPEND="${DEPEND_COMMON}
148 >> sys-apps/ed
149 >> !sys-cluster/slurm"
150 >>
151 >> RDEPEND="${DEPEND_COMMON}
152 >> crypt? ( net-misc/openssh )
153 >> !crypt? ( net-misc/netkit-rsh )
154 >> maui? ( sys-cluster/maui[pbs] )"
155 >>
156 >> pkg_setup() {
157 >> PBS_SERVER_HOME="${PBS_SERVER_HOME:-/var/spool/torque}"
158 >>
159 >> # Find a Torque server to use. Check environment, then
160 >> # current setup (if any), and fall back on current hostname.
161 >> if [ -z "${PBS_SERVER_NAME}" ]; then
162 >> if [ -f "${ROOT}${PBS_SERVER_HOME}/server_name" ]; then
163 >> PBS_SERVER_NAME="$(<${ROOT}${PBS_SERVER_HOME}/server_name)"
164 >> else
165 >> PBS_SERVER_NAME=$(hostname -f)
166 >> fi
167 >> fi
168 >>
169 >> USE_CPUSETS="--disable-cpusets"
170 >> if use cpusets; then
171 >> if ! use kernel_linux; then
172 >> einfo
173 >> elog " Torque currently only has support for cpusets in
174 >> linux."
175 >> elog "Assuming you didn't really want this USE flag."
176 >> einfo
177 >> else
178 >> linux-info_pkg_setup
179 >> einfo
180 >> elog " Torque support for cpusets is still in development, you
181 >> may"
182 >> elog "wish to disable it for production use."
183 >> einfo
184 >> if ! linux_config_exists || ! linux_chkconfig_present CPUSETS;
185 >> then
186 >> einfo
187 >> elog " Torque support for cpusets will require that you
188 >> recompile"
189 >> elog "your kernel with CONFIG_CPUSETS enabled."
190 >> einfo
191 >> fi
192 >> USE_CPUSETS="--enable-cpusets"
193 >> fi
194 >> fi
195 >> }
196 >>
197 >> src_configure() {
198 >> local myconf="--with-rcp=mom_rcp"
199 >>
200 >> use crypt && myconf="--with-rcp=scp"
201 >>
202 >> econf \
203 >> $(use_enable tk gui) \
204 >> $(use_enable syslog) \
205 >> $(use_enable server) \
206 >> $(use_enable drmaa) \
207 >> $(use_enable threads high-availability) \
208 >> $(use_enable xml server-xml) \
209 >> $(use_enable munge munge-auth) \
210 >> --with-server-home=${PBS_SERVER_HOME} \
211 >> --with-environ=/etc/pbs_environment \
212 >> --with-default-server=${PBS_SERVER_NAME} \
213 >> --disable-gcc-warnings \
214 >> --with-tcp-retry-limit=2 \
215 >> ${USE_CPUSETS} \
216 >> ${myconf} \
217 >> || die "econf failed"
218 >> }
219 >>
220 >> # WARNING
221 >> # OpenPBS is extremely stubborn about directory permissions.
222 >> Sometimes it will
223 >> # just fall over with the error message, but in some spots it will
224 >> just ignore
225 >> # you and fail strangely. Likewise it also barfs on our .keep files!
226 >> pbs_createspool() {
227 >> local root="$1"
228 >> local s="$(dirname "${PBS_SERVER_HOME}")"
229 >> local h="${PBS_SERVER_HOME}"
230 >> local sp="${h}/server_priv"
231 >> einfo "Building spool directory under ${D}${h}"
232 >> local a d m
233 >> local dir_spec="
234 >> 0755:${h}/aux 0700:${h}/checkpoint
235 >> 0755:${h}/mom_logs 0751:${h}/mom_priv 0751:${h}/mom_priv/jobs
236 >> 1777:${h}/spool 1777:${h}/undelivered"
237 >>
238 >> if use server; then
239 >> dir_spec="${dir_spec} 0755:${h}/sched_logs
240 >> 0755:${h}/sched_priv/accounting 0755:${h}/server_logs
241 >> 0750:${h}/server_priv 0755:${h}/server_priv/accounting
242 >> 0750:${h}/server_priv/acl_groups 0750:${h}/server_priv/acl_hosts
243 >> 0750:${h}/server_priv/acl_svr 0750:${h}/server_priv/acl_users
244 >> 0750:${h}/server_priv/jobs 0750:${h}/server_priv/queues"
245 >> fi
246 >>
247 >> for a in ${dir_spec}; do
248 >> d="${a/*:}"
249 >> m="${a/:*}"
250 >> if [[ ! -d "${root}${d}" ]]; then
251 >> install -d -m${m} "${root}${d}"
252 >> else
253 >> chmod ${m} "${root}${d}"
254 >> fi
255 >> # (#149226) If we're running in src_*, then keepdir
256 >> if [[ "${root}" = "${D}" ]]; then
257 >> keepdir ${d}
258 >> fi
259 >> done
260 >> }
261 >>
262 >> src_install() {
263 >> # Make directories first
264 >> pbs_createspool "${D}"
265 >>
266 >> make DESTDIR="${D}" install || die "make install failed"
267 >>
268 >> dodoc CHANGELOG README.* Release_Notes || die "dodoc failed"
269 >> if use doc; then
270 >> dodoc doc/admin_guide.ps doc/*.pdf || die "dodoc failed"
271 >> fi
272 >>
273 >> # The build script isn't alternative install location friendly,
274 >> # So we have to fix some hard-coded paths in tclIndex for xpbs* to
275 >> work
276 >> for file in `find "${D}" -iname tclIndex`; do
277 >> sed -e "s/${D//\// }/ /" "${file}" > "${file}.new"
278 >> mv "${file}.new" "${file}"
279 >> done
280 >>
281 >> if use server; then
282 >> newinitd "${FILESDIR}"/pbs_server-init.d-munge pbs_server
283 >> newinitd "${FILESDIR}"/pbs_sched-init.d pbs_sched
284 >> fi
285 >> newinitd "${FILESDIR}"/pbs_mom-init.d-munge pbs_mom
286 >> newconfd "${FILESDIR}"/torque-conf.d-munge torque
287 >> newenvd "${FILESDIR}"/torque-env.d 25torque
288 >> }
289 >>
290 >> pkg_preinst() {
291 >> if [[ -f "${ROOT}etc/pbs_environment" ]]; then
292 >> cp "${ROOT}etc/pbs_environment" "${D}"/etc/pbs_environment
293 >> fi
294 >>
295 >> echo "${PBS_SERVER_NAME}" > "${D}${PBS_SERVER_HOME}/server_name"
296 >>
297 >> # Fix up the env.d file to use our set server home.
298 >> sed -i "s:/var/spool/torque:${PBS_SERVER_HOME}:g"
299 >> "${D}"/etc/env.d/25torque
300 >>
301 >> if use munge; then
302 >> sed -i 's,\(PBS_USE_MUNGE=\).*,\11,' "${D}"etc/conf.d/torque ||
303 >> die
304 >> fi
305 >> }
306 >>
307 >> pkg_postinst() {
308 >> pbs_createspool "${ROOT}"
309 >> elog " If this is the first time torque has been installed, then
310 >> you are not"
311 >> elog "ready to start the server. Please refer to the documentation
312 >> located at:"
313 >> elog
314 >> "http://www.clusterresources.com/wiki/doku.php?id=torque:torque_wiki"
315 >>
316 >> elog " For a basic setup, you may use emerge --config ${PN}"
317 >>
318 >> }
319 >>
320 >> # root will be setup as the primary operator/manager, the local
321 >> machine
322 >> # will be added as a node and we'll create a simple queue, batch.
323 >> pkg_config() {
324 >> local h="$(echo "${ROOT}/${PBS_SERVER_HOME}" | sed 's:///*:/:g')"
325 >> local rc=0
326 >>
327 >> ebegin "Configuring Torque"
328 >> einfo "Using ${h} as the pbs homedir"
329 >> einfo "Using ${PBS_SERVER_NAME} as the pbs_server"
330 >>
331 >> # Check for previous configuration and bail if found.
332 >> if [ -e "${h}/server_priv/acl_svr/operators" ] \
333 >> || [ -e "${h}/server_priv/nodes" ] \
334 >> || [ -e "${h}/mom_priv/config" ]; then
335 >> ewarn "Previous Torque configuration detected. Press any key to"
336 >> ewarn "continue or press Control-C to abort now"
337 >> read
338 >> fi
339 >>
340 >> # pbs_mom configuration.
341 >> echo "\$pbsserver ${PBS_SERVER_NAME}" > "${h}/mom_priv/config"
342 >> echo "\$logevent 255" >> "${h}/mom_priv/config"
343 >>
344 >> if use server; then
345 >> local qmgr="${ROOT}/usr/bin/qmgr -c"
346 >> # pbs_server bails on repeated backslashes.
347 >> if ! echo "y" | "${ROOT}"/usr/sbin/pbs_server -d "${h}" -t create;
348 >> then
349 >> eerror "Failed to start pbs_server"
350 >> rc=1
351 >> else
352 >> ${qmgr} "set server operators = root@$(hostname -f)"
353 >> ${PBS_SERVER_NAME}
354 >> ${qmgr} "create queue batch" ${PBS_SERVER_NAME}
355 >> ${qmgr} "set queue batch queue_type = Execution"
356 >> ${PBS_SERVER_NAME}
357 >> ${qmgr} "set queue batch started = True" ${PBS_SERVER_NAME}
358 >> ${qmgr} "set queue batch enabled = True" ${PBS_SERVER_NAME}
359 >> ${qmgr} "set server default_queue = batch" ${PBS_SERVER_NAME}
360 >> ${qmgr} "set server resources_default.nodes = 1"
361 >> ${PBS_SERVER_NAME}
362 >> ${qmgr} "set server scheduling = True" ${PBS_SERVER_NAME}
363 >>
364 >> "${ROOT}"/usr/bin/qterm -t quick ${PBS_SERVER_NAME} || rc=1
365 >>
366 >> # Add the local machine as a node.
367 >> echo "$(hostname -f) np=1" > "${h}/server_priv/nodes"
368 >> fi
369 >> fi
370 >> eend ${rc}
371 >> }
372 >>
373 >>
374 >>
375 >>
376 >>
377
378 --
379 Best Regards,
380 Alexey 'Alexxy' Shvetsov
381 Petersburg Nuclear Physics Institute, Russia
382 Department of Molecular and Radiation Biophysics
383 Gentoo Team Ru
384 Gentoo Linux Dev
385 mailto:alexxyum@×××××.com
386 mailto:alexxy@g.o
387 mailto:alexxy@×××××××××××××.ru