Repository navigation
fix: refuse unsupported modules.shell and spaced init entries; literal export - #31
Merged
Merged
Conversation
The module wrapper is a script for a POSIX shell: it splits the unquoted EB_PIPELINE_MODULES at white space, under set -f. modules.shell took any string. zsh ran the script without splitting, so the modules of modules.init reached one module load as a single name, and csh, tcsh and fish failed to parse it when a step started. site::validate now accepts sh, bash, dash, ash, ksh, ksh93, mksh and yash, matched on the file name of the value so that a path works too, and reports anything else, so check and every other command that loads the site file refuse it. Each of those shells ran the wrapper here, and the wrapper test now runs a build through every one of them that is installed, bash and sh at least. The schema text, the site file and environment references, and the failures of the site file how-to say which shells are accepted, the last with the message from docs/examples/site-file.sh.
The entries of modules.init reach the module wrapper joined with spaces in EB_PIPELINE_MODULES, and the wrapper splits that at white space. An entry with white space in it loaded as several modules: a pasted line, "module load EasyBuild", loaded module, load and EasyBuild. An entry is now one module name, and site::validate reports an entry with white space, so check and every other command that loads the site file refuse it. That follows how init lines are written, with white space between module names and none inside one. Lmod and Environment Modules would load a quoted name with a space, but EB_PIPELINE_MODULES, joined with spaces, cannot carry one, and loading the entry whole would turn a pasted line into a module load that fails at run time. The templates and the site files of the docs give one name per entry and still pass. The schema text, the site file and environment references, and the failures of the site file how-to describe the rule, the last with the message from docs/examples/site-file.sh.
ox-rst formats ~code~, =verbatim= and inline source blocks with its verb markup, which writes each leading * as \* inside a reStructuredText literal. A literal takes no backslash escapes, so the log rotation page showed *.log and *.txt as \*.log and \*.txt. docs/export.el now puts the plain ``%s`` format for code and verbatim ahead of ox-rst's own entries in org-rst-text-markup-alist. Exported before and after, the whole site differs only in the line of the log rotation page that holds those two literals. docs/tools/test_export.py exports a page of literals with export.el in a scratch directory and reads the result with docutils: each literal must match its Org text. The pixi task exporttest runs it, docbld depends on it, and the contributing page lists it. export.el is the documentation template's file; the template and the eessi-arch-guard docs carry the same file and need the same change.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The module wrapper is a POSIX-shell script: it splits the unquoted
EB_PIPELINE_MODULESat white space, underset -f.modules.shelltook any string. zsh ran the script without splitting, so the modules ofmodules.initreached onemodule loadas a single name, and csh, tcsh and fish failed to parse it when a step started.site::validatenow acceptssh,bash,dash,ash,ksh,ksh93,mkshandyash, matched on the file name of the value so that a path works too, and reports any other shell, socheckand every other command that loads the site file refuse it. Each of those shells ran the wrapper here, and the wrapper test now runs a build through every one of them that is installed, bash and sh at least.The entries of
modules.initreach the module wrapper joined with spaces inEB_PIPELINE_MODULES, and the wrapper splits that at white space. An entry with white space in it loaded as several modules: a pasted line,module load EasyBuild, loadedmodule,loadandEasyBuild. An entry is now one module name, andsite::validatereports an entry with white space.ox-rst formats
~code~,=verbatim=and inline source blocks with its verb markup, which writes each leading*as\*inside a reStructuredText literal. A literal takes no backslash escapes, so the log rotation page showed*.logand*.txtas\*.logand\*.txt.docs/export.elnow puts the plain literal format for code and verbatim ahead of ox-rst's own entries inorg-rst-text-markup-alist. Exported before and after, the whole site differs only in the line of the log rotation page that holds those two literals.docs/tools/test_export.pyexports a page of literals and checks each one;docblddepends on it.export.elis the documentation template's file; the template and the eessi-arch-guard docs carry the same file and need the same change.