-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
also compile Lmod spider cache with alternate Lua versions (+ update to Lmod 8.4.10) (HPC-8637) #43
Merged
stdweird
merged 4 commits into
hpcugent:master
from
boegel:lmod8410_compile_cache_alt_lua_ver
Oct 26, 2020
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
246fcee
also compile Lmod spider cache with alternate Lua versions (+ update …
boegel 990f15e
redirect stderr to /dev/null when checking for alternate luac commands
boegel 3d4f3d7
add upstream ref for patch to compile Lmod spider cache with alternat…
boegel 1595191
fix release in changelog
boegel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
%global macrosdir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d) | ||
|
||
Name: Lmod | ||
Version: 8.4.2 | ||
Release: 1.ug%{?dist} | ||
Version: 8.4.10 | ||
Release: 2.ug%{?dist} | ||
Summary: Environmental Modules System in Lua | ||
|
||
# Lmod-5.3.2/tools/base64.lua is LGPLv2 | ||
|
@@ -14,6 +14,7 @@ Source2: SitePackage.lua | |
Source3: run_lmod_cache.py | ||
Source4: admin.list | ||
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) | ||
|
@@ -50,6 +51,7 @@ where the library and header files can be found. | |
%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 | ||
|
@@ -99,6 +101,9 @@ rm -rf %{buildroot} | |
|
||
|
||
%changelog | ||
* 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 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
see also https://github.com/TACC/Lmod/pull/475 | ||
|
||
commit ae104381f8a70580cabd4938d53d392fffb4112a | ||
Author: Kenneth Hoste <[email protected]> | ||
Date: Mon Oct 26 11:05:02 2020 +0100 | ||
|
||
also compile Lmod spider cache for alternate Lua versions if corresponding luac command is available | ||
|
||
diff --git a/src/update_lmod_system_cache_files.in b/src/update_lmod_system_cache_files.in | ||
index e3a089ae..37d82bee 100644 | ||
--- a/src/update_lmod_system_cache_files.in | ||
+++ b/src/update_lmod_system_cache_files.in | ||
@@ -308,6 +308,18 @@ update_cache() { | ||
lua_ver=$(@path_to_lua@/lua -e 'print((_VERSION:gsub("Lua ","")))') | ||
@path_to_luac@ -o ${cache_file_name}.new.luac_$lua_ver ${cache_file_name}.lua | ||
install_new_cache luac_$lua_ver ${cache_file_name} | ||
+ | ||
+ # also compile cache with other Lua 5.x versions, if corresponding luac is available | ||
+ for alt_luac in $(ls @path_to_luac@-5.* 2> /dev/null); do | ||
+ alt_lua_ver=$(basename ${alt_luac} | cut -f2 -d'-') | ||
+ debug "Found potential alternate Lua version ${alt_lua_ver} (via ${alt_luac}" | ||
+ # only for Lua versions different than what lua/luac commands correspond to (see above) | ||
+ if [ "${alt_lua_ver}" != "${lua_ver}" ]; then | ||
+ debug "Compiling cache file ${cache_file_name} for Lua ${alt_lua_ver}..." | ||
+ ${alt_luac} -o ${cache_file_name}.new.luac_${alt_lua_ver} ${cache_file_name}.lua | ||
+ install_new_cache luac_${alt_lua_ver} ${cache_file_name} | ||
+ fi | ||
+ done | ||
fi | ||
} | ||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why bump both the version and the release?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because I built an RPM with a
.1
release number while testing, but then had to make another minor change (see 990f15e)Lmod-8.4.10-2.ug.el7.x86_64
is currently what's installed ongligar06