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