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