Gentoo Archives: gentoo-commits

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