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