1 |
jsbronder 13/05/30 00:47:06 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: torque-4.1.5.1.ebuild |
5 |
Log: |
6 |
Bump re #414623. Added trqauthd daemon init script which needs to be run before any of the various pbs_* services |
7 |
|
8 |
(Portage version: 2.1.11.30/cvs/Linux x86_64, signed Manifest commit with key 4D7043C9) |
9 |
|
10 |
Revision Changes Path |
11 |
1.151 sys-cluster/torque/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-cluster/torque/ChangeLog?rev=1.151&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-cluster/torque/ChangeLog?rev=1.151&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-cluster/torque/ChangeLog?r1=1.150&r2=1.151 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/sys-cluster/torque/ChangeLog,v |
20 |
retrieving revision 1.150 |
21 |
retrieving revision 1.151 |
22 |
diff -u -r1.150 -r1.151 |
23 |
--- ChangeLog 8 Mar 2013 05:02:15 -0000 1.150 |
24 |
+++ ChangeLog 30 May 2013 00:47:06 -0000 1.151 |
25 |
@@ -1,6 +1,13 @@ |
26 |
# ChangeLog for sys-cluster/torque |
27 |
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/sys-cluster/torque/ChangeLog,v 1.150 2013/03/08 05:02:15 jsbronder Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/torque/ChangeLog,v 1.151 2013/05/30 00:47:06 jsbronder Exp $ |
30 |
+ |
31 |
+*torque-4.1.5.1 (30 May 2013) |
32 |
+ |
33 |
+ 30 May 2013; Justin Bronder <jsbronder@g.o> +torque-4.1.5.1.ebuild, |
34 |
+ +files/trqauthd-init.d: |
35 |
+ Bump re #414623. Added trqauthd daemon init script which needs to be run |
36 |
+ before any of the various pbs_* services |
37 |
|
38 |
08 Mar 2013; Justin Bronder <jsbronder@g.o> +files/tcl8.6.patch, |
39 |
torque-2.5.9-r1.ebuild, -files/torque-2.5.9-tcl8.6.patch, |
40 |
|
41 |
|
42 |
|
43 |
1.1 sys-cluster/torque/torque-4.1.5.1.ebuild |
44 |
|
45 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-cluster/torque/torque-4.1.5.1.ebuild?rev=1.1&view=markup |
46 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-cluster/torque/torque-4.1.5.1.ebuild?rev=1.1&content-type=text/plain |
47 |
|
48 |
Index: torque-4.1.5.1.ebuild |
49 |
=================================================================== |
50 |
# Copyright 1999-2013 Gentoo Foundation |
51 |
# Distributed under the terms of the GNU General Public License v2 |
52 |
# $Header: /var/cvsroot/gentoo-x86/sys-cluster/torque/torque-4.1.5.1.ebuild,v 1.1 2013/05/30 00:47:06 jsbronder Exp $ |
53 |
|
54 |
EAPI=2 |
55 |
inherit flag-o-matic eutils linux-info |
56 |
|
57 |
DESCRIPTION="Resource manager and queuing system based on OpenPBS" |
58 |
HOMEPAGE="http://www.adaptivecomputing.com/products/torque.php" |
59 |
# TODO: hopefully moving to github tags soon |
60 |
# http://www.supercluster.org/pipermail/torquedev/2013-May/004519.html |
61 |
SRC_URI="http://www.adaptivecomputing.com/index.php?wpfb_dl=1058 -> ${P}.tar.gz" |
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 nvidia server +syslog tk" |
67 |
|
68 |
DEPEND_COMMON="sys-libs/ncurses |
69 |
sys-libs/readline |
70 |
cpusets? ( sys-apps/hwloc ) |
71 |
munge? ( sys-auth/munge ) |
72 |
nvidia? ( >=x11-drivers/nvidia-drivers-275 ) |
73 |
tk? ( dev-lang/tk ) |
74 |
syslog? ( virtual/logger ) |
75 |
!games-util/qstat" |
76 |
|
77 |
DEPEND="${DEPEND_COMMON} |
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-cpuset" |
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 |
if ! linux_config_exists || ! linux_chkconfig_present CPUSETS; then |
107 |
einfo |
108 |
elog " Torque support for cpusets will require that you recompile" |
109 |
elog "your kernel with CONFIG_CPUSETS enabled." |
110 |
einfo |
111 |
fi |
112 |
USE_CPUSETS="--enable-cpuset" |
113 |
fi |
114 |
fi |
115 |
} |
116 |
|
117 |
src_prepare() { |
118 |
# We install to a valid location, no need to muck with ld.so.conf |
119 |
# --without-loadlibfile is supposed to do this for us... |
120 |
sed -i '/mk_default_ld_lib_file || return 1/d' buildutils/pbs_mkdirs.in || die |
121 |
} |
122 |
|
123 |
src_configure() { |
124 |
local myconf="--with-rcp=mom_rcp" |
125 |
|
126 |
use crypt && myconf="--with-rcp=scp" |
127 |
|
128 |
econf \ |
129 |
$(use_enable tk gui) \ |
130 |
$(use_enable syslog) \ |
131 |
$(use_enable server) \ |
132 |
$(use_enable drmaa) \ |
133 |
$(use_enable munge munge-auth) \ |
134 |
$(use_enable nvidia nvidia-gpus) \ |
135 |
--with-server-home=${PBS_SERVER_HOME} \ |
136 |
--with-environ=/etc/pbs_environment \ |
137 |
--with-default-server=${PBS_SERVER_NAME} \ |
138 |
--disable-gcc-warnings \ |
139 |
--with-tcp-retry-limit=2 \ |
140 |
--without-loadlibfile \ |
141 |
${USE_CPUSETS} \ |
142 |
${myconf} |
143 |
} |
144 |
|
145 |
src_install() { |
146 |
local dir |
147 |
|
148 |
emake DESTDIR="${D}" install || die "make install failed" |
149 |
|
150 |
dodoc CHANGELOG README.* Release_Notes || die "dodoc failed" |
151 |
if use doc; then |
152 |
dodoc doc/admin_guide.ps doc/*.pdf || die "dodoc failed" |
153 |
fi |
154 |
|
155 |
# The build script isn't alternative install location friendly, |
156 |
# So we have to fix some hard-coded paths in tclIndex for xpbs* to work |
157 |
for file in `find "${D}" -iname tclIndex`; do |
158 |
sed -e "s/${D//\// }/ /" "${file}" > "${file}.new" |
159 |
mv "${file}.new" "${file}" || die |
160 |
done |
161 |
|
162 |
for dir in $(find "${D}/${PBS_SERVER_HOME}" -type d); do |
163 |
keepdir "${dir#${D}}" |
164 |
done |
165 |
|
166 |
if use server; then |
167 |
newinitd "${FILESDIR}"/pbs_server-init.d-munge pbs_server || die |
168 |
newinitd "${FILESDIR}"/pbs_sched-init.d pbs_sched || die |
169 |
fi |
170 |
newinitd "${FILESDIR}"/pbs_mom-init.d-munge pbs_mom || die |
171 |
newconfd "${FILESDIR}"/torque-conf.d-munge torque || die |
172 |
newinitd "${FILESDIR}"/trqauthd-init.d trqauthd || die |
173 |
newenvd "${FILESDIR}"/torque-env.d 25torque || die |
174 |
} |
175 |
|
176 |
pkg_preinst() { |
177 |
if [[ -f "${ROOT}etc/pbs_environment" ]]; then |
178 |
cp "${ROOT}etc/pbs_environment" "${D}"/etc/pbs_environment || die |
179 |
fi |
180 |
|
181 |
if [[ -f "${ROOT}${PBS_SERVER_HOME}/server_priv/nodes" ]]; then |
182 |
cp "${ROOT}${PBS_SERVER_HOME}/server_priv/nodes" \ |
183 |
"${D}"/${PBS_SERVER_HOME}/server_priv/nodes || die |
184 |
fi |
185 |
|
186 |
echo "${PBS_SERVER_NAME}" > "${D}${PBS_SERVER_HOME}/server_name" || die |
187 |
|
188 |
# Fix up the env.d file to use our set server home. |
189 |
sed -i \ |
190 |
"s:/var/spool/torque:${PBS_SERVER_HOME}:g" "${D}"/etc/env.d/25torque \ |
191 |
|| die |
192 |
|
193 |
if use munge; then |
194 |
sed -i 's,\(PBS_USE_MUNGE=\).*,\11,' "${D}"etc/conf.d/torque || die |
195 |
fi |
196 |
} |
197 |
|
198 |
pkg_postinst() { |
199 |
elog " If this is the first time torque has been installed, then you are not" |
200 |
elog "ready to start the server. Please refer to the documentation located at:" |
201 |
elog "http://www.clusterresources.com/wiki/doku.php?id=torque:torque_wiki" |
202 |
|
203 |
elog " For a basic setup, you may use emerge --config ${PN}" |
204 |
|
205 |
elog "Important 4.0+ updates" |
206 |
elog " - The on-wire protocol version has been changed." |
207 |
elog " Versions of Torque before 4.0.0 are no longer able to communicate." |
208 |
elog " - pbs_iff has been replaced by trqauthd, you will now need to add" |
209 |
elog " trqauthd to your default runlevel." |
210 |
} |
211 |
|
212 |
# root will be setup as the primary operator/manager, the local machine |
213 |
# will be added as a node and we'll create a simple queue, batch. |
214 |
pkg_config() { |
215 |
local h="$(echo "${ROOT}/${PBS_SERVER_HOME}" | sed 's:///*:/:g')" |
216 |
local rc=0 |
217 |
|
218 |
ebegin "Configuring Torque" |
219 |
einfo "Using ${h} as the pbs homedir" |
220 |
einfo "Using ${PBS_SERVER_NAME} as the pbs_server" |
221 |
|
222 |
# Check for previous configuration and bail if found. |
223 |
if [ -e "${h}/server_priv/acl_svr/operators" ] \ |
224 |
|| [ -e "${h}/server_priv/nodes" ] \ |
225 |
|| [ -e "${h}/mom_priv/config" ]; then |
226 |
ewarn "Previous Torque configuration detected. Press Enter to" |
227 |
ewarn "continue or Control-C to abort now" |
228 |
read |
229 |
fi |
230 |
|
231 |
# pbs_mom configuration. |
232 |
echo "\$pbsserver ${PBS_SERVER_NAME}" > "${h}/mom_priv/config" || die |
233 |
echo "\$logevent 255" >> "${h}/mom_priv/config" || die |
234 |
|
235 |
if use server; then |
236 |
local qmgr="${ROOT}/usr/bin/qmgr -c" |
237 |
# pbs_server bails on repeated backslashes. |
238 |
if ! "${ROOT}"/usr/sbin/pbs_server -f -d "${h}" -t create; then |
239 |
eerror "Failed to start pbs_server" |
240 |
rc=1 |
241 |
else |
242 |
${qmgr} "set server operators = root@$(hostname -f)" ${PBS_SERVER_NAME} \ |
243 |
&& ${qmgr} "create queue batch" ${PBS_SERVER_NAME} \ |
244 |
&& ${qmgr} "set queue batch queue_type = Execution" ${PBS_SERVER_NAME} \ |
245 |
&& ${qmgr} "set queue batch started = True" ${PBS_SERVER_NAME} \ |
246 |
&& ${qmgr} "set queue batch enabled = True" ${PBS_SERVER_NAME} \ |
247 |
&& ${qmgr} "set server default_queue = batch" ${PBS_SERVER_NAME} \ |
248 |
&& ${qmgr} "set server resources_default.nodes = 1" ${PBS_SERVER_NAME} \ |
249 |
&& ${qmgr} "set server scheduling = True" ${PBS_SERVER_NAME} \ |
250 |
|| die |
251 |
|
252 |
"${ROOT}"/usr/bin/qterm -t quick ${PBS_SERVER_NAME} || rc=1 |
253 |
|
254 |
# Add the local machine as a node. |
255 |
echo "$(hostname -f) np=1" > "${h}/server_priv/nodes" || die |
256 |
fi |
257 |
fi |
258 |
eend ${rc} |
259 |
} |