This repository has been archived by the owner on Nov 9, 2023. It is now read-only.
forked from hpcugent/Lmod-UGent
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Lmod-UGent.spec
330 lines (247 loc) · 10.8 KB
/
Lmod-UGent.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
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
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
%global macrosdir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d)
Name: Lmod
Version: 8.7.19
Release: 2.br%{?dist}
Summary: Environmental Modules System in Lua
# Lmod-5.3.2/tools/base64.lua is LGPLv2
License: MIT and LGPLv2
URL: https://www.tacc.utexas.edu/tacc-projects/lmod
Source0: https://github.com/TACC/Lmod/archive/%{version}.tar.gz#/Lmod-%{version}.tar.gz
Source1: macros.%{name}
Source2: SitePackage.lua
Source3: run_lmod_cache.py
Source4: admin.list
Source5: lang.lua
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
# Lmod 8.x ships binaries when configured with --with-fastTCLInterp=yes (which is the default)
# BuildArch: noarch
BuildRequires: gcc
BuildRequires: lua-filesystem
BuildRequires: lua-json
BuildRequires: lua-posix
BuildRequires: lua-term
BuildRequires: lua-devel
BuildRequires: tcl-devel
Requires: lua-filesystem
Requires: lua-json
Requires: lua-posix
Requires: lua-term
Requires: /usr/bin/ps
Conflicts: environment-modules
%description
Lmod is a Lua based module system that easily handles the MODULEPATH
Hierarchical problem. Environment Modules provide a convenient way to
dynamically change the users' environment through modulefiles. This includes
easily adding or removing directories to the PATH environment variable.
Modulefiles for library packages provide environment variables that specify
where the library and header files can be found.
%prep
%setup -q
sed -i -e 's,/usr/bin/env ,/usr/bin/,' src/*.tcl
# Remove bundled lua-term
rm -r pkgs/luafilesystem/ pkgs/term/ tools/json.lua
sed -i -e 's/^spiderCacheSupport: lfs/spiderCacheSupport: /' Makefile.in
# Remove unneeded shbangs
sed -i -e '/^#!/d' init/*.in
%build
%configure --prefix=%{_datadir} PS=/bin/ps \
--with-caseIndependentSorting=yes \
--with-redirect=yes \
--with-autoSwap=no \
--with-disableNameAutoSwap=yes \
--with-shortTime=86400 \
--with-pinVersions=yes \
--with-siteName=VUB_HPC \
--with-siteMsgFile=%{_datadir}/lmod/etc/lang.lua \
--with-extendedDefault=no \
--with-cachedLoads=yes
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
%make_install
# init scripts are sourced
find %{buildroot}%{_datadir}/lmod/%{version}/init/ -type f -print0 | xargs -0 chmod -x
mkdir -p %{buildroot}%{_sysconfdir}/modulefiles
mkdir -p %{buildroot}%{_datadir}/modulefiles
mkdir -p %{buildroot}%{_sysconfdir}/profile.d
# Install profile links to override environment-modules
ln -s %{_datadir}/lmod/lmod/init/bash %{buildroot}%{_sysconfdir}/profile.d/modules.sh
ln -s %{_datadir}/lmod/lmod/init/csh %{buildroot}%{_sysconfdir}/profile.d/modules.csh
# Install the rpm config file
install -Dpm 644 %{SOURCE1} %{buildroot}/%{macrosdir}/macros.%{name}
# Override SitePackage.lua
install -Dpm 644 %{SOURCE2} %{buildroot}%{_datadir}/lmod/%{version}/libexec
# install icinga/nagios wrapper for the cache creation
#install -Dpm 755 %{SOURCE3} %{buildroot}%{_datadir}/lmod/%{version}/libexec
# install admin.list
mkdir -p %{buildroot}%{_datadir}/lmod/etc
install -Dpm 644 %{SOURCE4} %{buildroot}%{_datadir}/lmod/etc
# add lang.lua file
install -Dpm 644 %{SOURCE5} %{buildroot}%{_datadir}/lmod/etc
%clean
rm -rf %{buildroot}
%files
%doc INSTALL License README.md README_lua_modulefiles.txt
%{_sysconfdir}/modulefiles
%{_sysconfdir}/profile.d/modules.csh
%{_sysconfdir}/profile.d/modules.sh
%{_datadir}/lmod
%{_datadir}/modulefiles
%{macrosdir}/macros.%{name}
%changelog
* Mon Feb 20 2023 Ward Poelmans <ward.poelmans@vub.be>
- No longer install run_lmod_cache.py as it comes from Lmod-config
* Tue Jan 24 2023 Samuel Moors <samuel.moors@vub.be>
- fix cached loads config
* Fri Jan 20 2023 Samuel Moors <samuel.moors@vub.be>
- turn on cached loads
* Mon Nov 07 2022 Alex Domingo <alex.domingo.toro@vub.be>
- Hide JupyterHub modules
* Mon Jun 13 2022 Samuel Moors <samuel.moors@vub.be>
- Fix HPC email
* Tue Feb 15 2022 Samuel Moors <samuel.moors@vub.be>
- use lmodmessage rather than warning for old modules
- increase cutoff to 2.5 years, update every 6 months
- add second cutoff at 3.5 years with warning
* Wed Jun 17 2020 Ward Poelmans <ward.poelmans@vub.be>
- Added get_avail_memory function to module sandbox
- Add math.floor to sandbox
- bump to 8.3.15
* Thu Mar 12 2020 Ward Poelmans <ward.poelmans@vub.be>
- Changed dependencies to match reallity
- bump to 8.3.5
* Tue Dec 03 2019 Ward Poelmans <ward.poelmans@vub.be>
- Bump to 8.2.8 from upstream
- Drop patch for hiding cluster modules. It's now done with a hook
- Use the binary tcl interpreter. This makes the rpm binary instead of noarch.
* Thu Aug 08 2019 Ward Poelmans <ward.poelmans@vub.be>
- Switch to upstream 8.1.13
* Thu Jul 4 2019 Ward Poelmans <ward.poelmans@vub.be> - 8.1.7-2.br
- Fix cache script to work in Brussel
* Wed May 22 2019 Ward Poelmans <ward.poelmans@vub.be> - 8.1.5-1.bu
- Update to Lmod 8.1
- Disable extended default for now
- Disable binary tcl to lua interpreter (needs tcl-devel and lua-devel)
* Fri Mar 15 2019 Ward Poelmans <ward.poelmans@vub.be> - 7.8.22-1.bu
- update to Lmod 7.8.22
- sync up with UGent spec file
* Wed Mar 7 2018 Ward Poelmans <ward.poelmans@vub.be> - 7.7.18-1.bu
- update to Lmod 7.7.18
- Adjust to VUB flavour of Lmod (our own special sauce)
* Fri Sep 29 2017 Kenneth Hoste <kenneth.hoste@ugent.be> - 7.7.5-1.ug
- update to Lmod 7.7.5 (faster bash completion)
* Thu Jul 13 2017 Kenneth Hoste <kenneth.hoste@ugent.be> - 7.5.10-7.ug
- add patch to ensure Lmod cache is used when loading cluster modules which include prepend_path($MODULEPATH, ...)
* Fri Jul 7 2017 Kenneth Hoste <kenneth.hoste@ugent.be> - 7.5.10-6.ug
- fix grabbing $MODULEPATH root from Lmod config in run_lmod_cache.py, 'config' was renamed to 'configT' in Lmod 7
* Thu Jul 6 2017 Kenneth Hoste <kenneth.hoste@ugent.be> - 7.5.10-5.ug
- update to Lmod 7.5.10
- fix msg hooks in SitePackage.lua (thanks to Ward Poelmans)
- remove patch for 'module' and 'ml', no longer needed
- add patch to avoid listing hidden cluster modules in output of 'ml spider'
* Mon Nov 28 2016 Ward Poelmans <ward.poelmans@ugent.be> - 6.6-2ug
- Install a admin.list (aka nag file)
* Fri Oct 14 2016 Ward Poelmans <ward.poelmans@ugent.be> - 6.6-1ug
- Use the json config interface of Lmod in cache creation script
* Thu May 19 2016 Ward Poelmans <ward.poelmans@ugent.be> - 6.3.5-2ug
- Add icinga/nagios wrapper for cache creation script
* Wed May 11 2016 Ward Poelmans <ward.poelmans@ugent.be> - 6.3.3-1ug
- Sync to upstream Lmod version
- Drop zsh as build dep (we don't use it)
* Thu Feb 18 2016 Ward Poelmans <ward.poelmans@ugent.be> - 6.1.3-1ug
- Adapt to UGent use
* Thu Feb 11 2016 Orion Poplawski <orion@cora.nwra.com> - 6.1.3-1
- Update to 6.1.3
* Wed Feb 10 2016 Orion Poplawski <orion@cora.nwra.com> - 6.1.2-1
- Update to 6.1.2
* Sat Feb 6 2016 Orion Poplawski <orion@cora.nwra.com> - 6.1-1
- Update to 6.1
* Fri Feb 5 2016 Orion Poplawski <orion@cora.nwra.com> - 6.0.29-1
- Update to 6.0.29
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 6.0.26-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Mon Feb 1 2016 Orion Poplawski <orion@cora.nwra.com> - 6.0.26-1
- Update to 6.0.26
* Tue Jan 12 2016 Orion Poplawski <orion@cora.nwra.com> - 6.0.25-1
- Update to 6.0.25
* Tue Dec 22 2015 Orion Poplawski <orion@cora.nwra.com> - 6.0.24-2
- Add Requires: /usr/bin/ps
* Tue Dec 1 2015 Orion Poplawski <orion@cora.nwra.com> - 6.0.24-1
- Update to 6.0.24
* Wed Nov 25 2015 Orion Poplawski <orion@cora.nwra.com> - 6.0.22-1
- Update to 6.0.22
* Mon Nov 23 2015 Orion Poplawski <orion@cora.nwra.com> - 6.0.21-1
- Update to 6.0.21
* Fri Nov 20 2015 Orion Poplawski <orion@cora.nwra.com> - 6.0.20-1
- Update to 6.0.20
* Wed Nov 18 2015 Orion Poplawski <orion@cora.nwra.com> - 6.0.19-1
- Update to 6.0.19
* Mon Nov 16 2015 Orion Poplawski <orion@cora.nwra.com> - 6.0.18-1
- Update to 6.0.18
* Thu Nov 12 2015 Orion Poplawski <orion@cora.nwra.com> - 6.0.17-1
- Update to 6.0.17
* Wed Nov 11 2015 Orion Poplawski <orion@cora.nwra.com> - 6.0.16-1
- Update to 6.0.16
* Wed Oct 28 2015 Orion Poplawski <orion@cora.nwra.com> - 6.0.15-2
- Set PS path
- Add BR zsh
* Mon Oct 26 2015 Orion Poplawski <orion@cora.nwra.com> - 6.0.15-1
- Update to 6.0.15
* Wed Oct 21 2015 Orion Poplawski <orion@cora.nwra.com> - 6.0.12-2
- Mark 00-modulepath files as config
* Mon Oct 19 2015 Orion Poplawski <orion@cora.nwra.com> - 6.0.12-1
- Update to 6.0.12
- Drop shell patch fixed upstream
* Mon Oct 19 2015 Orion Poplawski <orion@cora.nwra.com> - 6.0.11-2
- Add patch to support generic and non-bash shells
* Tue Oct 6 2015 Orion Poplawski <orion@cora.nwra.com> - 6.0.11-1
- Update to 6.0.11
* Sun Sep 6 2015 Orion Poplawski <orion@cora.nwra.com> - 6.0.10-1
- Update to 6.0.10
* Wed Aug 12 2015 Orion Poplawski <orion@cora.nwra.com> - 6.0.9-1
- Update to 6.0.9
* Tue Jul 14 2015 Orion Poplawski <orion@cora.nwra.com> - 6.0.5-1
- Update to 6.0.5
- Drop tput patch applied upstream
* Mon Jul 13 2015 Orion Poplawski <orion@cora.nwra.com> - 6.0.4-1
- Update to 6.0.4
* Thu Jul 9 2015 Orion Poplawski <orion@cora.nwra.com> - 5.9.4.2-4
- Add patch to suppress tput output
* Tue Jun 16 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.9.4.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Tue May 26 2015 Orion Poplawski <orion@cora.nwra.com> - 5.9.4.2-2
- Fix alternatives script handling
* Tue May 19 2015 Orion Poplawski <orion@cora.nwra.com> - 5.9.4.2-1
- Update to 5.9.4.2
* Wed Apr 8 2015 Orion Poplawski <orion@cora.nwra.com> - 5.9.3-1
- Update to 5.9.3
* Tue Mar 31 2015 Orion Poplawski <orion@cora.nwra.com> - 5.9.2-1.git76a45db
- Update to 5.9.2-1.git76a45db for Lua 5.3 support
* Wed Mar 18 2015 Orion Poplawski <orion@cora.nwra.com> - 5.9-1
- Update to 5.9
* Tue Nov 4 2014 Orion Poplawski <orion@cora.nwra.com> - 5.8-1
- Update to 5.8
* Fri Sep 5 2014 Orion Poplawski <orion@cora.nwra.com> - 5.7.5-1
- Update to 5.7.5
* Wed Aug 20 2014 Orion Poplawski <orion@cora.nwra.com> - 5.7.4-1
- Update to 5.7.4
* Tue Aug 5 2014 Orion Poplawski <orion@cora.nwra.com> - 5.7.1-1
- Update to 5.7.1
* Thu Jun 26 2014 Orion Poplawski <orion@cora.nwra.com> - 5.6.2-1
- Update to 5.6.2
* Fri Jun 06 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Tue May 27 2014 Orion Poplawski <orion@cora.nwra.com> - 5.6-1
- Update to 5.6
* Mon May 5 2014 Orion Poplawski <orion@cora.nwra.com> - 5.5.1-1
- Update to 5.5.1
* Fri May 2 2014 Orion Poplawski <orion@cora.nwra.com> - 5.5-2
- Add EL support
* Thu May 1 2014 Orion Poplawski <orion@cora.nwra.com> - 5.5-1
- Update to 5.5
* Fri Apr 18 2014 Orion Poplawski <orion@cora.nwra.com> - 5.4.2-1
- Update to 5.4.2
* Mon Apr 14 2014 Orion Poplawski <orion@cora.nwra.com> - 5.4.1-1
- Update to 5.4.1
* Tue Apr 1 2014 Orion Poplawski <orion@cora.nwra.com> - 5.3.2-1
- Initial package