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-4.2.9-r3.ebuild torque-4.2.9-r2.ebuild
Date: Thu, 30 Apr 2015 18:07:36
Message-Id: 20150430180730.723CB99C@oystercatcher.gentoo.org
1 jsbronder 15/04/30 18:07:29
2
3 Modified: ChangeLog
4 Added: torque-4.2.9-r3.ebuild
5 Removed: torque-4.2.9-r2.ebuild
6 Log:
7 Fix munge configure argument (#543894)
8
9 (Portage version: 2.2.14/cvs/Linux x86_64, signed Manifest commit with key 4D7043C9)
10
11 Revision Changes Path
12 1.185 sys-cluster/torque/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-cluster/torque/ChangeLog?rev=1.185&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-cluster/torque/ChangeLog?rev=1.185&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-cluster/torque/ChangeLog?r1=1.184&r2=1.185
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/sys-cluster/torque/ChangeLog,v
21 retrieving revision 1.184
22 retrieving revision 1.185
23 diff -u -r1.184 -r1.185
24 --- ChangeLog 26 Dec 2014 16:06:44 -0000 1.184
25 +++ ChangeLog 30 Apr 2015 18:07:29 -0000 1.185
26 @@ -1,6 +1,12 @@
27 # ChangeLog for sys-cluster/torque
28 -# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/sys-cluster/torque/ChangeLog,v 1.184 2014/12/26 16:06:44 xarthisius Exp $
30 +# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
31 +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/torque/ChangeLog,v 1.185 2015/04/30 18:07:29 jsbronder Exp $
32 +
33 +*torque-4.2.9-r3 (30 Apr 2015)
34 +
35 + 30 Apr 2015; Justin Bronder <jsbronder@g.o> -torque-4.2.9-r2.ebuild,
36 + +torque-4.2.9-r3.ebuild:
37 + Fix munge configure argument (#543894)
38
39 26 Dec 2014; Kacper Kowalik <xarthisius@g.o> -torque-2.5.12-r1.ebuild,
40 -torque-4.1.5.1-r1.ebuild:
41
42
43
44 1.1 sys-cluster/torque/torque-4.2.9-r3.ebuild
45
46 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-cluster/torque/torque-4.2.9-r3.ebuild?rev=1.1&view=markup
47 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-cluster/torque/torque-4.2.9-r3.ebuild?rev=1.1&content-type=text/plain
48
49 Index: torque-4.2.9-r3.ebuild
50 ===================================================================
51 # Copyright 1999-2015 Gentoo Foundation
52 # Distributed under the terms of the GNU General Public License v2
53 # $Header: /var/cvsroot/gentoo-x86/sys-cluster/torque/torque-4.2.9-r3.ebuild,v 1.1 2015/04/30 18:07:29 jsbronder Exp $
54
55 EAPI=5
56
57 inherit flag-o-matic eutils linux-info
58
59 DESCRIPTION="Resource manager and queuing system based on OpenPBS"
60 HOMEPAGE="http://www.adaptivecomputing.com/products/open-source/torque"
61 # TODO: hopefully moving to github tags soon
62 # http://www.supercluster.org/pipermail/torquedev/2013-May/004519.html
63 SRC_URI="http://www.adaptivecomputing.com/index.php?wpfb_dl=2849 -> ${P}.tar.gz"
64
65 LICENSE="torque-2.5"
66 SLOT="0"
67 KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
68 IUSE="cpusets +crypt doc drmaa kernel_linux munge nvidia server +syslog tk"
69
70 DEPEND_COMMON="
71 sys-libs/ncurses
72 sys-libs/readline
73 cpusets? ( sys-apps/hwloc )
74 munge? ( sys-auth/munge )
75 nvidia? ( >=x11-drivers/nvidia-drivers-275 )
76 tk? ( dev-lang/tk )
77 syslog? ( virtual/logger )
78 !games-util/qstat"
79
80 DEPEND="${DEPEND_COMMON}
81 !sys-cluster/slurm"
82
83 RDEPEND="${DEPEND_COMMON}
84 crypt? ( net-misc/openssh )
85 !crypt? ( net-misc/netkit-rsh )
86 !dev-libs/uthash"
87
88 # Torque should depend on dev-libs/uthash but that's pretty much impossible
89 # to patch in as they ship with a broken configure such that files referenced
90 # by the configure.ac and Makefile.am are missing.
91 # http://www.supercluster.org/pipermail/torquedev/2014-October/004773.html
92
93 pkg_setup() {
94 PBS_SERVER_HOME="${PBS_SERVER_HOME:-/var/spool/${PN}}"
95
96 # Find a Torque server to use. Check environment, then
97 # current setup (if any), and fall back on current hostname.
98 if [ -z "${PBS_SERVER_NAME}" ]; then
99 if [ -f "${ROOT}${PBS_SERVER_HOME}/server_name" ]; then
100 PBS_SERVER_NAME="$(<${ROOT}${PBS_SERVER_HOME}/server_name)"
101 else
102 PBS_SERVER_NAME=$(hostname -f)
103 fi
104 fi
105
106 USE_CPUSETS="--disable-cpuset"
107 if use cpusets; then
108 if ! use kernel_linux; then
109 einfo
110 elog " Torque currently only has support for cpusets in linux."
111 elog "Assuming you didn't really want this USE flag."
112 einfo
113 else
114 linux-info_pkg_setup
115 if ! linux_config_exists || ! linux_chkconfig_present CPUSETS; then
116 einfo
117 elog " Torque support for cpusets will require that you recompile"
118 elog "your kernel with CONFIG_CPUSETS enabled."
119 einfo
120 fi
121 USE_CPUSETS="--enable-cpuset"
122 fi
123 fi
124 }
125
126 src_prepare() {
127 # Unused and causes breakage when switching from glibc to tirpc.
128 # https://github.com/adaptivecomputing/torque/pull/148
129 sed -i '/rpc\/rpc\.h/d' src/lib/Libnet/net_client.c || die
130
131 # We install to a valid location, no need to muck with ld.so.conf
132 # --without-loadlibfile is supposed to do this for us...
133 sed -i '/mk_default_ld_lib_file || return 1/d' buildutils/pbs_mkdirs.in || die
134
135 epatch "${FILESDIR}"/${P}-tcl8.6.patch
136
137 # 524362
138 epatch "${FILESDIR}"/TRQ-2885-limit-tm_adopt-to-only-adopt-a-session-id-t.patch
139 }
140
141 src_configure() {
142 local myconf="--with-rcp=mom_rcp"
143
144 use crypt && myconf="--with-rcp=scp"
145
146 econf \
147 $(use_enable tk gui) \
148 $(use_enable syslog) \
149 $(use_enable server) \
150 $(use_enable drmaa) \
151 $(use_enable munge munge-auth) \
152 $(use_enable nvidia nvidia-gpus) \
153 --with-server-home=${PBS_SERVER_HOME} \
154 --with-environ=/etc/pbs_environment \
155 --with-default-server=${PBS_SERVER_NAME} \
156 --disable-gcc-warnings \
157 --with-tcp-retry-limit=2 \
158 --without-loadlibfile \
159 ${USE_CPUSETS} \
160 ${myconf}
161 }
162
163 src_install() {
164 local dir
165
166 DOCS=( CHANGELOG README.* Release_Notes )
167 use doc && DOCS+=( doc/admin_guide.ps doc/*.pdf )
168
169 default
170
171 # The build script isn't alternative install location friendly,
172 # So we have to fix some hard-coded paths in tclIndex for xpbs* to work
173 for file in $(find "${ED}" -iname tclIndex); do
174 sed \
175 -e "s/${ED//\// }/ /" \
176 -i "${file}" || die
177 done
178
179 for dir in $(find "${ED}/${PBS_SERVER_HOME}" -type d); do
180 keepdir "${dir#${ED}}"
181 done
182
183 if use server; then
184 newinitd "${FILESDIR}"/pbs_server-init.d-munge pbs_server
185 newinitd "${FILESDIR}"/pbs_sched-init.d pbs_sched
186 fi
187 newinitd "${FILESDIR}"/pbs_mom-init.d-munge pbs_mom
188 newconfd "${FILESDIR}"/${PN}-conf.d-munge ${PN}
189 newinitd "${FILESDIR}"/trqauthd-init.d trqauthd
190 newenvd "${FILESDIR}"/${PN}-env.d 25${PN}
191 }
192
193 pkg_preinst() {
194 if [[ -f "${ROOT}etc/pbs_environment" ]]; then
195 cp "${ROOT}etc/pbs_environment" "${ED}"/etc/pbs_environment || die
196 fi
197
198 if use server && [[ -f "${ROOT}${PBS_SERVER_HOME}/server_priv/nodes" ]]; then
199 cp \
200 "${EROOT}${PBS_SERVER_HOME}/server_priv/nodes" \
201 "${ED}/${PBS_SERVER_HOME}/server_priv/nodes" || die
202 fi
203
204 echo "${PBS_SERVER_NAME}" > "${ED}${PBS_SERVER_HOME}/server_name" || die
205
206 # Fix up the env.d file to use our set server home.
207 sed \
208 -e "s:/var/spool/${PN}:${PBS_SERVER_HOME}:g" \
209 -i "${ED}"/etc/env.d/25${PN} || die
210
211 if use munge; then
212 sed -i 's,\(PBS_USE_MUNGE=\).*,\11,' "${ED}"/etc/conf.d/${PN} || die
213 fi
214 }
215
216 pkg_postinst() {
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 echo ""
221 elog " For a basic setup, you may use emerge --config ${PN}"
222 echo ""
223 if [[ -z "${REPLACING_VERSIONS}" ]] || [[ ${REPLACING_VERSIONS} < 4 ]]; then
224 elog "Important 4.0+ updates"
225 elog " - The on-wire protocol version has been changed."
226 elog " Versions of Torque before 4.0.0 are no longer able to communicate."
227 elog " - pbs_iff has been replaced by trqauthd, you will now need to add"
228 elog " trqauthd to your default runlevel."
229 fi
230 }
231
232 # root will be setup as the primary operator/manager, the local machine
233 # will be added as a node and we'll create a simple queue, batch.
234 pkg_config() {
235 local h="$(echo "${ROOT}/${PBS_SERVER_HOME}" | sed 's:///*:/:g')"
236 local rc=0
237
238 ebegin "Configuring Torque"
239 einfo "Using ${h} as the pbs homedir"
240 einfo "Using ${PBS_SERVER_NAME} as the pbs_server"
241
242 # Check for previous configuration and bail if found.
243 if [ -e "${h}/server_priv/acl_svr/operators" ] \
244 || [ -e "${h}/server_priv/nodes" ] \
245 || [ -e "${h}/mom_priv/config" ]; then
246 ewarn "Previous Torque configuration detected. Press Enter to"
247 ewarn "continue or Control-C to abort now"
248 read
249 fi
250
251 # pbs_mom configuration.
252 echo "\$pbsserver ${PBS_SERVER_NAME}" > "${h}/mom_priv/config" || die
253 echo "\$logevent 255" >> "${h}/mom_priv/config" || die
254
255 if use server; then
256 local qmgr="${EROOT}/usr/bin/qmgr -c"
257 # pbs_server bails on repeated backslashes.
258 if ! "${EROOT}"/usr/sbin/pbs_server -f -d "${h}" -t create; then
259 eerror "Failed to start pbs_server"
260 rc=1
261 else
262 ${qmgr} "set server operators = root@$(hostname -f)" ${PBS_SERVER_NAME} \
263 && ${qmgr} "create queue batch" ${PBS_SERVER_NAME} \
264 && ${qmgr} "set queue batch queue_type = Execution" ${PBS_SERVER_NAME} \
265 && ${qmgr} "set queue batch started = True" ${PBS_SERVER_NAME} \
266 && ${qmgr} "set queue batch enabled = True" ${PBS_SERVER_NAME} \
267 && ${qmgr} "set server default_queue = batch" ${PBS_SERVER_NAME} \
268 && ${qmgr} "set server resources_default.nodes = 1" ${PBS_SERVER_NAME} \
269 && ${qmgr} "set server scheduling = True" ${PBS_SERVER_NAME} \
270 || die
271
272 "${EROOT}"/usr/bin/qterm -t quick ${PBS_SERVER_NAME} || rc=1
273
274 # Add the local machine as a node.
275 echo "$(hostname -f) np=1" > "${h}/server_priv/nodes" || die
276 fi
277 fi
278 eend ${rc}
279 }