Gentoo Archives: gentoo-commits

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