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