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