Gentoo Archives: gentoo-dev

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

Replies