This repository has been archived by the owner on Jan 8, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
condor-job-hooks.spec.in
246 lines (196 loc) · 7.86 KB
/
condor-job-hooks.spec.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%if (0%{?fedora} == 0 && 0%{?rhel} <= 5)
%global building_for_el5 1
%else
%global building_for_el5 0
%endif
Summary: HTCondor Job Hooks
Name: condor-job-hooks
Version: #VERSION#
Release: #RELEASE#%{?dist}
License: ASL 2.0
Group: Applications/System
URL: http://git.fedorahosted.org/git/grid/job_hooks.git
Source0: https://fedorahosted.org/releases/g/r/grid/%{name}-%{version}.tar.gz
#PATCHES#
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-XXXXXX)
BuildArch: noarch
Requires: python >= 2.3
Requires: condor >= 7.0.2-4
Requires: python-condorutils = %{version}-%{release}
%description
This package provides HTCondor job hooks that communicate with a translation
daemon which interfaces with job delivery protocols outside of HTCondor's
native job delivery protocol.
%package -n python-condorutils
Summary: Common functions/utilities for HTCondor job hooks
Group: Applications/System
BuildRequires: python-devel >= 2.3
Requires: python >= 2.3
Obsoletes: condor-job-hooks-common
Obsoletes: python-condor-job-hooks-common
%description -n python-condorutils
Common functions and utilities used by HTCondor features.
%prep
%setup -q
#APPLY_PATCHES#
%build
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}/%_libexecdir/condor/hooks
mkdir -p %{buildroot}/%{python_sitelib}/condorutils
mkdir -p %{buildroot}/%_sysconfdir/condor
cp -f hooks/hook*.py %{buildroot}/%_libexecdir/condor/hooks
rm -f %{buildroot}/%_libexecdir/condor/hooks/hook_evict_claim.*
cp -f module/*.py %{buildroot}/%{python_sitelib}/condorutils
%post
%if 0%{?fedora} == 0
if [[ -f /etc/opt/grid/job-hooks.conf ]]; then
mv -f /etc/opt/grid/job-hooks.conf /etc/condor
rmdir --ignore-fail-on-non-empty -p /etc/opt/grid
fi
%endif
exit 0
%if %{building_for_el5}
%clean
rm -rf %{buildroot}
%endif
%files
%if %{building_for_el5}
%defattr(-,root,root,-)
%endif
%doc LICENSE-2.0.txt CONFIG
%defattr(0755,root,root,-)
%_libexecdir/condor/hooks/hook_fetch_work.py*
%_libexecdir/condor/hooks/hook_job_exit.py*
%_libexecdir/condor/hooks/hook_prepare_job.py*
%_libexecdir/condor/hooks/hook_reply_fetch.py*
%_libexecdir/condor/hooks/hook_update_job_status.py*
%files -n python-condorutils
%if %{building_for_el5}
%defattr(-,root,root,-)
%endif
%doc LICENSE-2.0.txt
%{python_sitelib}/condorutils/__init__.py*
%{python_sitelib}/condorutils/log.py*
%{python_sitelib}/condorutils/osutil.py*
%{python_sitelib}/condorutils/readconfig.py*
%{python_sitelib}/condorutils/socketutil.py*
%{python_sitelib}/condorutils/workfetch.py*
%changelog
* Wed Nov 7 2012 <rrati@redhat> - 1.5-6
- Updated for branding change to HTCondor
* Mon Jan 16 2012 <rrati@redhat> - 1.5-5
- Packaging improvements
- Renamed INSTALL file to CONFIG
* Wed Jul 22 2011 <rrati@redhat> - 1.5-4
- Added optional arg to read_condor_config to control lookup of param without
subsystem
- Fixed error message raised from read_condor_config if a param with a
subsystem is not found
* Wed Apr 27 2011 <rrati@redhat> - 1.5-3
- Fixed param lookup issues in read_condor_config
* Mon Mar 14 2011 <rrati@redhat> - 1.5-2
- Fixed issue with run_cmd parsing args on windows
* Tue Feb 8 2011 <rrati@redhat> - 1.5-1
- Append the PATH from the environment of the caller to the predefined path in
run_cmd
- Changed the workings of read_condor_config
- Updated hooks to use new read_condor_config
* Mon Jan 3 2011 <rrati@redhat> - 1.4-7
- Update source URL
* Wed Nov 10 2010 <rrati@redhat> - 1.4-6
- If zip does not include permissions info, do not explicitly set and leave
to umask
* Mon Aug 23 2010 <rrati@redhat> - 1.4-5
- Fixed typo in status hook
* Thu Aug 12 2010 <rrati@redhat> - 1.4-4
- update, exit, and status hooks all log to syslog
* Mon Aug 02 2010 <rrati@redhat> - 1.4-3
- Fixed issue with run_cmd causing a deadlock when commands returned
a large amount of data on python2.3
* Fri Jul 23 2010 <rrati@redhat> - 1.4-2
- Fixed output of run_cmd on python2.3 when using popen2
- Fixed resetting of environment variables when run on python2.3
* Mon Jun 28 2010 <rrati@redhat> - 1.4-1
- Updated dependecy versions
* Fri Jun 11 2010 <rrati@redhat> - 1.4-0.6
- The prepare hook only logs on non-windows machines
* Fri Jun 11 2010 <rrati@redhat> - 1.4-0.5
- Additional logging
- Prepare hook will log to syslog
* Thu Jun 03 2010 <rrati@redhat> - 1.4-0.4
- Fix setting of PATH on non-Unix machines in run_cmd
- Better handle errors when running commands in run_cmd
* Wed Apr 14 2010 <rrati@redhat> - 1.4-0.3
- Added optional environ param to read_condor_config
* Wed Apr 14 2010 <rrati@redhat> - 1.4-0.2
- Fixed issue setting/reseting environment variables when popen2 is used.
Any params set by the caller were not getting reset by the time run_cmd
was exiting, so the environment was permanently modified.
* Thu Apr 8 2010 <rrati@redhat> - 1.4-0.1
- Added option param to run_cmd (inter). This will allow commands to be
run that require user interaction
- Fixed setting of environment before executing the command. PATH is
always overriden and defined as a trusted set of directories.
- Updated usage of run_cmd
* Mon Mar 29 2010 <rrati@redhat> - 1.3-0.1
- Changed Exception names
- Changed log_messages to log
- Renamed python module to condorutils
- Removed functions.py and moved to separate modules
- Improved error handling for when calling close_socket and pickle.loads
- log_messages no long takes an exception, but a list of strings to print
* Thu Mar 11 2010 <rrati@redhat> - 1.2-0.2
- Added importing of logging module into common functions
* Tue Mar 09 2010 <rrati@redhat> - 1.2-0.1
- Changed log_messages to use native logging module rather than syslog
- Changed general_execption to GeneralError
- Exception no longer takes a level
- log_messages now requires a level passed to it
- Changed run_cmd to return 3 values rather than a list of 3 values
- Fixed read_config_config to be able to handle 1 word params (ie LOG)
- log_messages takes an optional 3rd arg that specifies the name of a
logging subsystem to use. If none is given, the base logger is used
* Thu Mar 04 2010 <rrati@redhat> - 1.1-0.1
- run_cmd takes an optional 3rd arg that specifies environment vars to set
* Mon Jan 26 2010 <rrati@redhat> - 1.0-14
- Fixed handling of multiple args using Popen in run_cmd
- Added comments to a few methods
- Fixed type in run_cmd when using the popen2 module
* Fri Sep 11 2009 <rrati@redhat> - 1.0-13
- Use popen2 module instead of subprocess on python versions that don't
have the subprocess module (BZ522467)
* Tue Aug 18 2009 <rrati@redhat> - 1.0-12
- Job hooks use JOB_HOOK as keyword instead of LL_HOOK
- Fixed version numbering
* Tue Aug 18 2009 <rrati@redhat> - 1.0-11
- Split documentation into two files, one for carod and one for
the job-hooks
* Mon Aug 17 2009 <rrati@redhat> - 1.0-10
- Minor cleanup in common functions
* Mon Jul 27 2009 <rrati@redhat> - 1.0-9
- Renamed condor-job-hooks-common to python-condor-job-hooks-common to
conform to packaging guidelines since the package installs in
python sitelib.
* Mon Jul 27 2009 <rrati@redhat> - 1.0-8
- Fix rpmlint/packaging issues
* Wed Jun 24 2009 <rrati@redhat> - 1.0-7
- Hooks will first look for their configuration in condor's configuration
files, then fall back to their config file
- The config file has moved from /etc/opt/grid to /etc/condor
* Tue Jun 2 2009 <rrati@redhat> - 1.0-6
- Fixed an exception condition in the prepare hook that wasn't handled
correctly
* Fri Feb 13 2009 <rrati@redhat> - 1.0-5
- Change source tarball name
* Fri Dec 5 2008 <rrati@redhat> - 1.0-4
- Cleaned up socket close code to provide cleaner shutdown
* Wed Dec 3 2008 <rrati@redhat> - 1.0-3
- Fixed python dependency issue with RHEL4
- Fixed issues running on python 2.3
* Fri Nov 4 2008 <rrati@redhat> - 1.0-2
- Add changelog
- Fix rpmlint issues
* Fri Nov 4 2008 <rrati@redhat> - 1.0-1
- Initial packaging