-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathc3-4.0.spec
202 lines (145 loc) · 6.7 KB
/
c3-4.0.spec
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
# $Id: c3-4.0.spec,v 1.2 2003/06/24 20:24:50 zbml1 Exp $
%define name c3
%define ver 4.0
%define rel 1
%define prefix /opt/c3-4
%define profiled /etc/profile.d
Summary: Cluster Command and Control (C3) - command line tool suite
Name: %{name}
Version: %{ver}
Release: %{rel}
Copyright: freely distributable
Group: Application/System
Source0: %{name}-%{ver}.tar.gz
Packager: Thomas Naughton <[email protected]>
URL: http://www.csm.ornl.gov/torc/C3/
AutoReqProv: no
Requires: rsync
Requires: perl
Requires: /usr/bin/python2
BuildRoot: %{_tmppath}/%{name}-%{ver}-root
%description
The Cluster Command and Control (C3) tool suite offers a command line
interface for system and user administration tasks on a cluster.
%package ckillnode
Summary: Cluster Command and Control (C3) - ckillnode
Group: Application/System
%description ckillnode
The Cluster Command and Control (C3) - 'ckillnode' command used
on client nodes in conjunction with 'ckill' from headnode.
NOTE: Only needed on client nodes.
%package profiled
Summary: Cluster Command and Control (C3) - profile.d scripts
Group: Application/System
Requires: c3 >= 4
%description profiled
The Cluster Command and Control (C3) tool suite offers a command line
interface for system and user administration tasks on a cluster.
Scripts for PATHing information placed in the '/etc/profile.d/' area.
#---------------------------------------------------------------------
# Prep install section
#---------------------------------------------------------------------
%prep
# Get rid of any previously built stuff that might cause problems.
# (only worried about things in RPM-land '/usr/src/redhat/' here)
%__rm -rf $RPM_BUILD_ROOT
# Actually do the untar/gzip stuff
%setup -n %{name}-%{ver}
#---------------------------------------------------------------------
# Build section
#---------------------------------------------------------------------
%build
# Copy the build distribution to target install dir. The files must
# exist in the desired location (path) when RPM checks the filelist. This
# is greatly simplified by using the BuildRoot (chroot sort of thing) method.
%__mkdir -p $RPM_BUILD_ROOT/%{prefix}
%__mkdir -p $RPM_BUILD_ROOT/%{profiled}
%__cp -Rf $RPM_BUILD_DIR/%{name}-%{ver}/* \
$RPM_BUILD_ROOT/%{prefix}
%__cp -Rf $RPM_BUILD_DIR/%{name}-%{ver}/c3.sh \
$RPM_BUILD_ROOT/%{profiled}
%__cp -Rf $RPM_BUILD_DIR/%{name}-%{ver}/c3.csh \
$RPM_BUILD_ROOT/%{profiled}
#---------------------------------------------------------------------
# Clean section
#---------------------------------------------------------------------
%clean
# Get rid of any tmp files in RPM land, ie. '/usr/src/redhat/BUILD/...'
%__rm -rf $RPM_BUILD_DIR/%{name}-%{ver}
%__rm -rf $RPM_BUILD_ROOT
#---------------------------------------------------------------------
# Pre-un(install) section
#---------------------------------------------------------------------
%preun
%__rm -f %{prefix}/*.pyc
#---------------------------------------------------------------------
# Post-un(install) section
#---------------------------------------------------------------------
%postun
#---------------------------------------------------------------------
# Files section
#
# List all files that will make it to the target machine here. Note,
# that listing the entire dir, gets all the files withing. The %doc
# files are treated special and copied into the system doc area (eg. share).
#---------------------------------------------------------------------
%files
%defattr(-,root,root)
%doc INSTALL KNOWN_BUGS README CHANGELOG
%{prefix}
%files ckillnode
%defattr(-,root,root)
%{prefix}/ckillnode
%files profiled
%defattr(-,root,root)
%{profiled}
#---------------------------------------------------------------------
# ChangeLog section
#---------------------------------------------------------------------
%changelog
* Wed Dec 04 2002 01:36:38AM Thomas Naughton <[email protected]>
- (3.1-3) Overhaul the RPM spec stuffo.
Consolidate 'c3, -profiled, -ckillnode' RPMs into a single SPEC file.
- Fix path for ckillnode, change to also be '/opt/c3-3'.
- Additionally, this is using the newer version of 'ckillnode' that was
in the 3.1.1 tarball.
* Wed May 29 2002 11:15:18AM Thomas Naughton <[email protected]>
- (3.1-2) Changed the pre-reqs to be '/usr/bin/python2' to work better
w/ OSCAR and non-RedHat based systems that don't use the "Python" (1.x)
and "Python2" (2.x) RPM naming for co-existence.
* Thu May 16 2002 21:00:32PM modified by: tjn <[email protected]>
- Upgraded to c3-3.1 (BRANCH-TAG=branch-c3-3-1, rel=1)
- LAM/MPI rocks (http://www.lam-mpi.org/) THANKS JEFF! :)
Jeff Squyres fixed things up to use BuildRoot, which fixed lots!
- Added the %preun to get rid of the *.pyc files (pre-compiled bytecode).
- Moved the 'profile.d' stuff to a seperate RPM "c3-profiled". This
cleans things up here and also allows for use of switcher only w/o
the profile.d/ scripts (partially OSCAR related).
- Fixed the '-U' & '-e' errors for similarly named files.
- Cleaning things up, everything stays in '/opt/c3-3' (ie. %{prefix} )
including the Man pages, Brian moved mans to the more std man/manN/ form.
- Removed the postun stuff that breaks stuff! Bad tjn...
- Misc clean ups and added *many* more comments.
- Generate these as noarch.
- Generate these w/ Python2 deps
* Tue May 14 2002 10:25:23AM modified by: tjn <[email protected]>
- Adding this to a CVS repository...not changing the rel# (2.7.2-4)
* Mon Apr 01 2002 10:21:34AM modified by: tjn <[email protected]>
- Using RPM provided macros for cat, cp & rm until I upgrade the entire RPM
see also: /usr/lib/rpm/macros
- Also removed echo to STDOUT, assume users can edit c3.conf and created
a 'c3-ckillnode-2.7.2-X' RPM for use on client nodes.
- On a related note, I created a c3-ckillnode RPM for use on clients.
* Thu Dec 13 2001 09:35:50AM modified by: tjn <[email protected]>
- Changed the c3.conf stuff to only create a new if one doesn't exist.
* Wed Dec 12 2001 11:18:02AM modified by: tjn <[email protected]>
- removed some of the extra stuff printed upon 'rpm -ivh' & added 'Requires:'.
* Tue Dec 11 2001 13:28:32PM modified by: tjn <[email protected]>
- fixed problem related to only c3.1 man page being install.
* Fri Aug 24 2001 10:25:55AM modified by: tjn <[email protected]>
- changed the name for the Source1 & Source2 to be specific to version
* Tue Jul 31 2001 14:06:02PM modified by: tjn <[email protected]>
- check for exiting defs on the /etc/profile.d/ files
(this also required me to change the echo of the contents to actual a copy!)
* Tue Jun 19 2001 Thomas Naughton <[email protected]>
- Creation of initial c3-2.7.2 rpm