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