-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathLmod-UGent.spec
317 lines (236 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
%global macrosdir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d)
Name: Lmod
Version: 8.7.4
Release: 1.ug%{?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: modulecmd
Patch0: Lmod-spider-no-hidden-cluster-modules.patch
Patch1: Lmod-compile-cache-alt-lua-versions.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
# Lmod 8.x ships binaries when configured with --with-fastTCLInterp=yes (which is the default)
# BuildArch: noarch
BuildRequires: lua-devel
BuildRequires: lua-filesystem
BuildRequires: lua-json
BuildRequires: lua-posix
BuildRequires: lua-term
BuildRequires: tcl-devel
Requires: Lmod-core = %{version}
Conflicts: environment-modules
Provides: environment(modules)
%package core
Summary: Core files for Environmental Modules System in Lua
Requires: lua-filesystem
Requires: lua-json
Requires: lua-posix
Requires: lua-term
Requires: tcl
Requires: /bin/ps
%if 0%{?fedora} || 0%{?rhel} > 7
Requires: python3-vsc-install
%else
Requires: python-vsc-install
%endif
%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.
%description core
Provides core files for Lmod (i.e. no compatibility, profile.d,...)
%prep
%setup -q
%patch0 -p1
%patch1 -p1
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-module-root-path=/etc/modulefiles/vsc --with-cachedLoads=yes --with-siteName='HPC-UGent'
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
# install modulecmd
mkdir -p %{buildroot}/%{_bindir}
install -Dpm 755 %{SOURCE5} %{buildroot}/%{_bindir}
%clean
rm -rf %{buildroot}
%files
%{_bindir}/modulecmd
%{_sysconfdir}/profile.d/modules.csh
%{_sysconfdir}/profile.d/modules.sh
%{_sysconfdir}/modulefiles
%{_datadir}/modulefiles
%{macrosdir}/macros.%{name}
%files core
%doc INSTALL License README.md README_lua_modulefiles.txt
%{_datadir}/lmod
%changelog
* Wed Jun 8 2022 Kenneth Hoste <[email protected]> - 8.7.4-1.ug
- update to Lmod 8.7.4
* Thu Nov 5 2020 Kenneth Hoste <[email protected]> - 8.4.12-1.ug
- update to Lmod 8.4.12
* Mon Oct 26 2020 Kenneth Hoste <[email protected]> - 8.4.2-2.ug
- roll back to Lmod 8.4.2 because of bug in Lmod 8.4.10 (https://github.com/TACC/Lmod/issues/476)
* Mon Oct 26 2020 Kenneth Hoste <[email protected]> - 8.4.10-2.ug
- update to Lmod 8.4.10 and add patch to also compile Lmod spider cache with alternate Lua versions
* Mon Aug 31 2020 Kenneth Hoste <[email protected]> - 8.4.2-1.ug
- update to Lmod 8.4.2 + add 'Provides: environment(modules)' to spec file
* Tue Nov 26 2019 Kenneth Hoste <[email protected]> - 8.2.5-1.ug
- update to Lmod 8.2.5 (support for extensions)
* Tue Sep 24 2019 Kenneth Hoste <[email protected]> - 8.1.17-1.ug
- update to Lmod 8.1.17 (restores 'module switch')
* Mon Sep 23 2019 Kenneth Hoste <[email protected]> - 8.1.16-1.ug
- update to Lmod 8.1.16
* Wed Sep 26 2018 Kenneth Hoste <[email protected]> - 7.8.4-1.ug
- update to Lmod 7.8.4 + tweak admin.list
* Wed Apr 4 2018 Kenneth Hoste <[email protected]> - 7.7.26-1.ug
- update to Lmod 7.7.26 (clean error when cache file can not be read & more)
* Fri Sep 29 2017 Kenneth Hoste <[email protected]> - 7.7.5-1.ug
- update to Lmod 7.7.5 (faster bash completion)
* Thu Jul 13 2017 Kenneth Hoste <[email protected]> - 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 <[email protected]> - 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 <[email protected]> - 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 <[email protected]> - 6.6-2ug
- Install a admin.list (aka nag file)
* Fri Oct 14 2016 Ward Poelmans <[email protected]> - 6.6-1ug
- Use the json config interface of Lmod in cache creation script
* Thu May 19 2016 Ward Poelmans <[email protected]> - 6.3.5-2ug
- Add icinga/nagios wrapper for cache creation script
* Wed May 11 2016 Ward Poelmans <[email protected]> - 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 <[email protected]> - 6.1.3-1ug
- Adapt to UGent use
* Thu Feb 11 2016 Orion Poplawski <[email protected]> - 6.1.3-1
- Update to 6.1.3
* Wed Feb 10 2016 Orion Poplawski <[email protected]> - 6.1.2-1
- Update to 6.1.2
* Sat Feb 6 2016 Orion Poplawski <[email protected]> - 6.1-1
- Update to 6.1
* Fri Feb 5 2016 Orion Poplawski <[email protected]> - 6.0.29-1
- Update to 6.0.29
* Wed Feb 03 2016 Fedora Release Engineering <[email protected]> - 6.0.26-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Mon Feb 1 2016 Orion Poplawski <[email protected]> - 6.0.26-1
- Update to 6.0.26
* Tue Jan 12 2016 Orion Poplawski <[email protected]> - 6.0.25-1
- Update to 6.0.25
* Tue Dec 22 2015 Orion Poplawski <[email protected]> - 6.0.24-2
- Add Requires: /usr/bin/ps
* Tue Dec 1 2015 Orion Poplawski <[email protected]> - 6.0.24-1
- Update to 6.0.24
* Wed Nov 25 2015 Orion Poplawski <[email protected]> - 6.0.22-1
- Update to 6.0.22
* Mon Nov 23 2015 Orion Poplawski <[email protected]> - 6.0.21-1
- Update to 6.0.21
* Fri Nov 20 2015 Orion Poplawski <[email protected]> - 6.0.20-1
- Update to 6.0.20
* Wed Nov 18 2015 Orion Poplawski <[email protected]> - 6.0.19-1
- Update to 6.0.19
* Mon Nov 16 2015 Orion Poplawski <[email protected]> - 6.0.18-1
- Update to 6.0.18
* Thu Nov 12 2015 Orion Poplawski <[email protected]> - 6.0.17-1
- Update to 6.0.17
* Wed Nov 11 2015 Orion Poplawski <[email protected]> - 6.0.16-1
- Update to 6.0.16
* Wed Oct 28 2015 Orion Poplawski <[email protected]> - 6.0.15-2
- Set PS path
- Add BR zsh
* Mon Oct 26 2015 Orion Poplawski <[email protected]> - 6.0.15-1
- Update to 6.0.15
* Wed Oct 21 2015 Orion Poplawski <[email protected]> - 6.0.12-2
- Mark 00-modulepath files as config
* Mon Oct 19 2015 Orion Poplawski <[email protected]> - 6.0.12-1
- Update to 6.0.12
- Drop shell patch fixed upstream
* Mon Oct 19 2015 Orion Poplawski <[email protected]> - 6.0.11-2
- Add patch to support generic and non-bash shells
* Tue Oct 6 2015 Orion Poplawski <[email protected]> - 6.0.11-1
- Update to 6.0.11
* Sun Sep 6 2015 Orion Poplawski <[email protected]> - 6.0.10-1
- Update to 6.0.10
* Wed Aug 12 2015 Orion Poplawski <[email protected]> - 6.0.9-1
- Update to 6.0.9
* Tue Jul 14 2015 Orion Poplawski <[email protected]> - 6.0.5-1
- Update to 6.0.5
- Drop tput patch applied upstream
* Mon Jul 13 2015 Orion Poplawski <[email protected]> - 6.0.4-1
- Update to 6.0.4
* Thu Jul 9 2015 Orion Poplawski <[email protected]> - 5.9.4.2-4
- Add patch to suppress tput output
* Tue Jun 16 2015 Fedora Release Engineering <[email protected]> - 5.9.4.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Tue May 26 2015 Orion Poplawski <[email protected]> - 5.9.4.2-2
- Fix alternatives script handling
* Tue May 19 2015 Orion Poplawski <[email protected]> - 5.9.4.2-1
- Update to 5.9.4.2
* Wed Apr 8 2015 Orion Poplawski <[email protected]> - 5.9.3-1
- Update to 5.9.3
* Tue Mar 31 2015 Orion Poplawski <[email protected]> - 5.9.2-1.git76a45db
- Update to 5.9.2-1.git76a45db for Lua 5.3 support
* Wed Mar 18 2015 Orion Poplawski <[email protected]> - 5.9-1
- Update to 5.9
* Tue Nov 4 2014 Orion Poplawski <[email protected]> - 5.8-1
- Update to 5.8
* Fri Sep 5 2014 Orion Poplawski <[email protected]> - 5.7.5-1
- Update to 5.7.5
* Wed Aug 20 2014 Orion Poplawski <[email protected]> - 5.7.4-1
- Update to 5.7.4
* Tue Aug 5 2014 Orion Poplawski <[email protected]> - 5.7.1-1
- Update to 5.7.1
* Thu Jun 26 2014 Orion Poplawski <[email protected]> - 5.6.2-1
- Update to 5.6.2
* Fri Jun 06 2014 Fedora Release Engineering <[email protected]> - 5.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Tue May 27 2014 Orion Poplawski <[email protected]> - 5.6-1
- Update to 5.6
* Mon May 5 2014 Orion Poplawski <[email protected]> - 5.5.1-1
- Update to 5.5.1
* Fri May 2 2014 Orion Poplawski <[email protected]> - 5.5-2
- Add EL support
* Thu May 1 2014 Orion Poplawski <[email protected]> - 5.5-1
- Update to 5.5
* Fri Apr 18 2014 Orion Poplawski <[email protected]> - 5.4.2-1
- Update to 5.4.2
* Mon Apr 14 2014 Orion Poplawski <[email protected]> - 5.4.1-1
- Update to 5.4.1
* Tue Apr 1 2014 Orion Poplawski <[email protected]> - 5.3.2-1
- Initial package