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