Skip to content

Commit

Permalink
Modulefile man page moved from man4 to man5
Browse files Browse the repository at this point in the history
modulefile man page is currently in the section 4 of man. According to
"man man", this is incorrect, as section 4 is for "Special files (usually
found in /dev)". The man page for modulefile should be in section 5,
"File formats and conventions, e.g. /etc/passwd".

This patch moves modulefile(4) to modulefile(5).

Fixes #518
  • Loading branch information
LaurentChardon authored and xdelaruelle committed Nov 15, 2023
1 parent d112d1a commit ac15879
Show file tree
Hide file tree
Showing 16 changed files with 54 additions and 54 deletions.
2 changes: 1 addition & 1 deletion INSTALL-win.rst
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,5 @@ a modulepath and contains few modulefile examples::
module-git module-info null

Documentation of the :ref:`module(1)` and :ref:`ml(1)` commands and
:ref:`modulefile(4)` syntax can be found in the ``doc`` directory in
:ref:`modulefile(5)` syntax can be found in the ``doc`` directory in
installation directory.
2 changes: 1 addition & 1 deletion MIGRATING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -972,7 +972,7 @@ Lmod: :mfcmd:`depends-on`, :mfcmd:`prereq-any`, :mfcmd:`always-load`,
and :mfcmd:`family`.

The :ref:`Compatibility with Lmod Tcl modulefile` section in the
:ref:`modulefile(4)` man page describes the differences existing between the
:ref:`modulefile(5)` man page describes the differences existing between the
two implementations.

Note that when processing a :mfcmd:`family` command, the
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,7 @@ dist-tar: ChangeLog.gz contrib/rpm/environment-modules.spec pkgdoc
lib/configure lib/config.h.in $(DIST_AUTORECONF_EXTRA) ChangeLog.gz \
doc/build/MIGRATING.txt doc/build/changes.txt doc/build/INSTALL.txt \
doc/build/INSTALL-win.txt doc/build/NEWS.txt doc/build/CONTRIBUTING.txt \
doc/build/module.1.in doc/build/ml.1 doc/build/modulefile.4 \
doc/build/module.1.in doc/build/ml.1 doc/build/modulefile.5 \
contrib/rpm/environment-modules.spec

dist-gzip: dist-tar
Expand Down
34 changes: 17 additions & 17 deletions NEWS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ Modules 5.2.0 (2022-11-08)
* Add support for :option:`--all` option on :subcmd:`savelist` sub-command not
to limit result to the collection matching currently defined
:mconfig:`collection_target`.
* Doc: add :ref:`Shell support` section in :ref:`modulefile(4)` man page to
* Doc: add :ref:`Shell support` section in :ref:`modulefile(5)` man page to
describe how shells support the different kind of environment changes that
can be defined in modulefiles.
* Record during :subcmd:`autoinit` sub-command the initial environment state
Expand Down Expand Up @@ -517,7 +517,7 @@ Modules 5.1.0 (2022-04-30)
* Produce a clear error message when wrong number of argument is received by
:mfcmd:`prereq` command.
* Doc: describe :mfvar:`ModulesVersion` in *Modules Variables* section in
:ref:`modulefile(4)` man page.
:ref:`modulefile(5)` man page.
* Set ``ModuleVersion`` as an alias over :mfvar:`ModulesVersion` modulefile
variable for compatibility with Lmod Tcl modulefiles.
* Doc: describe :mfcmd:`reportError` and :mfcmd:`reportWarning` modulefile
Expand Down Expand Up @@ -598,7 +598,7 @@ Modules 5.1.0 (2022-04-30)
are free of misspellings (with `codespell`_ tool) and trailing spaces.
* Doc: fix typos found in documentation with Aspell utility.
* Doc: describe :ref:`Dependencies between modulefiles` in
:ref:`modulefile(4)` man page. (fix issues #431 and #433)
:ref:`modulefile(5)` man page. (fix issues #431 and #433)
* Script: update :command:`pre-commit` git hook script to spell check
documentation files with `Aspell`_ tool.
* Script: add :command:`commit-msg` git hook script to spell check commit
Expand Down Expand Up @@ -627,7 +627,7 @@ Modules 5.1.0 (2022-04-30)
modulefile is unloaded. Previous values are saved in a
:envvar:`__MODULES_PUSHENV_\<VAR\>` environment variable.
* Doc: add :ref:`Compatibility with Lmod Tcl modulefile` section in
:ref:`modulefile(4)` man page.
:ref:`modulefile(5)` man page.
* Update definition of the ``module()`` python function and python
initialization script to explicitly send output to ``sys.stderr`` to get the
ability to catch this content.
Expand Down Expand Up @@ -658,9 +658,9 @@ Modules 5.1.0 (2022-04-30)
in its header signature than the one currently in use.
* Doc: describe :ref:`differences between run-command file and modulefile
interpretation<Modulefile and run-command interp diff>` in
:ref:`modulefile(4)` man page.
:ref:`modulefile(5)` man page.
* Doc: describe :mfcmd:`module` sub-commands available as modulefile Tcl
command for each interpretation context in :ref:`modulefile(4)` man page.
command for each interpretation context in :ref:`modulefile(5)` man page.
* When loading a module with some extra tags defined through the
:option:`--tag` option, if this module is already loaded the new tags are
added to those already set.
Expand Down Expand Up @@ -1063,7 +1063,7 @@ Modules 4.7.1 (2021-04-06)
* Revert "Install: have :file:`configure` script assume the ``.`` dot
directory when invoked without the prepended ``./``" as consent was not
obtained from author to re-license the contribution to GPLv2+.
* Doc: fixes few typos in :ref:`module(1)` and :ref:`modulefile(4)`.
* Doc: fixes few typos in :ref:`module(1)` and :ref:`modulefile(5)`.
* Update the :subcmd:`sh-to-mod` mechanism to support version 3.2 of the fish
shell. Fish 3.2 introduces the ``.`` builtin command that should be
regexp-escaped when determining the shell functions or aliases defined by
Expand Down Expand Up @@ -1348,11 +1348,11 @@ Modules 4.6.1 (2020-11-14)
* Doc: add *Use new features without breaking old module command* cookbook
recipe
* Doc: rework option description for :mfcmd:`module-hide` and
:mfcmd:`module-forbid` commands in :ref:`modulefile(4)` document.
:mfcmd:`module-forbid` commands in :ref:`modulefile(5)` document.
* Doc: describe in :ref:`changes` document that shell special characters like
backticks are escaped when used in values starting Modules 4.0. (fix issue
#365)
* Doc: make the ENVIRONMENT section from :ref:`modulefile(4)` man page point
* Doc: make the ENVIRONMENT section from :ref:`modulefile(5)` man page point
to the ENVIRONMENT section of :ref:`module(1)` man page.
* Fix :subcmd:`clear` sub-command to unset the
:envvar:`MODULES_LMSOURCESH<__MODULES_LMSOURCESH>` environment variable.
Expand Down Expand Up @@ -1560,7 +1560,7 @@ Modules 4.5.2 (2020-07-30)
:file:`configure` script with the ``--option value`` syntax in addition to
the ``--option=value`` syntax. (fix issue #348)
* Doc: alphabetically sort sub-commands of :mfcmd:`module-info` modulefile Tcl
command in :ref:`modulefile(4)` document.
command in :ref:`modulefile(5)` document.
* Script: clean previously built environment-modules RPMs in :command:`mrel`.
* Clearly separate quarantine variable definition from tclsh binary on
:file:`modulecmd.tcl` evaluated command call in ``_module_raw`` function for
Expand Down Expand Up @@ -1605,17 +1605,17 @@ Modules 4.5.0 (2020-04-07)
--------------------------

* Doc: fix typos and grammar mistakes on :ref:`module(1)`,
:ref:`modulefile(4)` and :ref:`changes` documents. (contribution from Colin
:ref:`modulefile(5)` and :ref:`changes` documents. (contribution from Colin
Marquardt)
* Doc: update cookbook recipes to highlight code of the Tcl scripts included.
(contribution from Colin Marquardt)
* Doc: improve markup of :ref:`module(1)`, :ref:`modulefile(4)` and
* Doc: improve markup of :ref:`module(1)`, :ref:`modulefile(5)` and
:ref:`changes` documents to enable references to module sub-commands,
command line switches, environment variables and modulefile Tcl commands.
(contribution from Colin Marquardt)
* Doc: alphabetically sort module sub-commands, command-line switches,
environment variables and modulefile Tcl commands in :ref:`module(1)` and
:ref:`modulefile(4)` documents.
:ref:`modulefile(5)` documents.
* Introduce the ``ml`` command, a handy frontend to the ``module`` command.
``ml`` reduces the number of characters to type to trigger ``module``. With
no argument ``ml`` is equivalent to ``module list``, ``ml mod`` corresponds
Expand Down Expand Up @@ -1753,7 +1753,7 @@ Modules 4.5.0 (2020-04-07)
* Enable resolution of default module in module sub-directory when this
default symbol targets a hidden directory (whose name starts with a dot
character). (fix issue #331)
* Doc: clarify hidden module location in :ref:`modulefile(4)` man page.
* Doc: clarify hidden module location in :ref:`modulefile(5)` man page.
* Install: define ``LD_PRELOAD`` as quarantine var along with
``LD_LIBRARY_PATH`` in RPM specfile.
* When :mconfig:`implicit_default` and :mconfig:`advanced_version_spec`
Expand Down Expand Up @@ -2556,7 +2556,7 @@ Modules 4.2.0 (2018-10-18)
Modules 4.1.4 (2018-08-20)
--------------------------

* Doc: fix typo on ``getenv`` command description in modulefile(4) man page
* Doc: fix typo on ``getenv`` command description in modulefile(5) man page
and clarify this command should be preferred over ``::env`` variable to
query environment variable value in modulefile.
* Init: fix ``bash`` and ``zsh`` completion scripts to enable Extended Regular
Expand Down Expand Up @@ -2592,7 +2592,7 @@ Modules 4.1.3 (2018-06-18)
* Correct modulefile lookup when a modulefile directory is overwritten by a
module alias definition but it contains an empty sub-directory. (fix
issue#170)
* Doc: describe ``getenv`` command in modulefile(4) man page.
* Doc: describe ``getenv`` command in modulefile(5) man page.
* Improve SH shell detection in profile.sh initialization script to use shell
variable on ``bash`` or ``zsh`` to determine current shell name. (fix
issue#173)
Expand Down Expand Up @@ -3165,7 +3165,7 @@ modules-tcl-1.704 (2017-01-20)
if a modulefile is named ``default``.
* Fix path variable counters when ``:`` character is used in elements of a
path-like variable.
* Update module(1) and modulefile(4) man pages to clear content specific to
* Update module(1) and modulefile(5) man pages to clear content specific to
the C version of Modules and add content specific to or adapt content that
behave differently on this Tcl version.
* Fix TCLSH variable issue in Python init script.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ type:

The following man pages are provided:

module(1), ml(1), modulefile(4)
module(1), ml(1), modulefile(5)


Test suite
Expand Down
4 changes: 2 additions & 2 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ placed in the following directory structure:
doc/
man/
man1/
man4/
man5/
nagelfar/
vim/
vimfiles/
Expand Down Expand Up @@ -947,7 +947,7 @@ if [ -e 'doc/build/changes.txt' ] && [ -e 'doc/build/MIGRATING.txt' ] \
&& [ -e 'doc/build/INSTALL.txt' ] && [ -e 'doc/build/INSTALL-win.txt' ] \
&& [ -e 'doc/build/NEWS.txt' ] && [ -e 'doc/build/CONTRIBUTING.txt' ] \
&& [ -e 'doc/build/module.1.in' ] && [ -e 'doc/build/ml.1' ] \
&& [ -e 'doc/build/modulefile.4' ] && [ "$oldbuilddoc" != 'y' ]; then
&& [ -e 'doc/build/modulefile.5' ] && [ "$oldbuilddoc" != 'y' ]; then
builddoc=p
# test sphinx availability otherwise
else
Expand Down
2 changes: 1 addition & 1 deletion contrib/rpm/environment-modules.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ fi
%{_datadir}/modulefiles
%{_mandir}/man1/ml.1.gz
%{_mandir}/man1/module.1.gz
%{_mandir}/man4/modulefile.4.gz
%{_mandir}/man5/modulefile.5.gz
%{macrosdir}/macros.%{name}
%{vimdatadir}/ftdetect/modulefile.vim
%{vimdatadir}/ftplugin/modulefile.vim
Expand Down
14 changes: 7 additions & 7 deletions doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ ALL_RST := $(wildcard $(SOURCE_DIR)/*.rst $(SOURCE_DIR)/cookbook/*.rst\
$(SOURCE_DIR)/design/*.rst)
ALL_TXT := $(patsubst $(SOURCE_DIR)/%,$(BUILD_DIR)/%,$(patsubst %.rst,%.txt,$(ALL_RST)))
ALL_HTML := $(patsubst $(SOURCE_DIR)/%,$(BUILD_DIR)/%,$(patsubst %.rst,%.html,$(ALL_RST)))
ALL_MAN := $(BUILD_DIR)/module.1 $(BUILD_DIR)/ml.1 $(BUILD_DIR)/modulefile.4
ALL_MAN := $(BUILD_DIR)/module.1 $(BUILD_DIR)/ml.1 $(BUILD_DIR)/modulefile.5

all: man txt

Expand Down Expand Up @@ -97,10 +97,10 @@ $(BUILD_DIR)/%.txt: $(SOURCE_DIR)/%.rst $(SOURCE_DIR)/version.py
$(ECHO_GEN2) $(ECHO_DIR_PREFIX)$(BUILD_DIR)/*.txt
$(SPHINXBUILD) $(SPHINXOPTS) -b text "$(SOURCE_DIR)" "$(BUILD_DIR)"

$(BUILD_DIR)/module.1.in $(BUILD_DIR)/modulefile.4 $(BUILD_DIR)/ml.1: $(ALL_RST) $(SOURCE_DIR)/version.py
$(BUILD_DIR)/module.1.in $(BUILD_DIR)/modulefile.5 $(BUILD_DIR)/ml.1: $(ALL_RST) $(SOURCE_DIR)/version.py
$(ECHO_GEN2) $(ECHO_DIR_PREFIX)$(BUILD_DIR)/ml.1
$(ECHO_GEN2) $(ECHO_DIR_PREFIX)$(BUILD_DIR)/module.1.in
$(ECHO_GEN2) $(ECHO_DIR_PREFIX)$(BUILD_DIR)/modulefile.4
$(ECHO_GEN2) $(ECHO_DIR_PREFIX)$(BUILD_DIR)/modulefile.5
$(SPHINXBUILD) $(SPHINXOPTS) -t pathsubs -b man "$(SOURCE_DIR)" "$(BUILD_DIR)"
$(if $(findstring module.1.in,$@),mv $(BUILD_DIR)/module.1 $@)
endif
Expand All @@ -109,7 +109,7 @@ $(BUILD_DIR)/module.1: $(BUILD_DIR)/module.1.in
$(translate-in-script)

install: man txt
$(INSTALL_DIR) '$(DESTDIR)$(mandir)/man1' '$(DESTDIR)$(mandir)/man4'
$(INSTALL_DIR) '$(DESTDIR)$(mandir)/man1' '$(DESTDIR)$(mandir)/man5'
ifeq ($(docinstall),y)
$(INSTALL_DIR) '$(DESTDIR)$(docdir)'
$(INSTALL_DATA) $(BUILD_DIR)/changes.txt '$(DESTDIR)$(docdir)/'
Expand All @@ -121,7 +121,7 @@ ifeq ($(docinstall),y)
endif
$(INSTALL_DATA) $(BUILD_DIR)/module.1 '$(DESTDIR)$(mandir)/man1/'
$(INSTALL_DATA) $(BUILD_DIR)/ml.1 '$(DESTDIR)$(mandir)/man1/'
$(INSTALL_DATA) $(BUILD_DIR)/modulefile.4 '$(DESTDIR)$(mandir)/man4/'
$(INSTALL_DATA) $(BUILD_DIR)/modulefile.5 '$(DESTDIR)$(mandir)/man5/'

uninstall:
ifeq ($(docinstall),y)
Expand All @@ -135,8 +135,8 @@ ifeq ($(docinstall),y)
endif
rm -f '$(DESTDIR)$(mandir)/man1/module.1'
rm -f '$(DESTDIR)$(mandir)/man1/ml.1'
rm -f '$(DESTDIR)$(mandir)/man4/modulefile.4'
rmdir '$(DESTDIR)$(mandir)/man1' '$(DESTDIR)$(mandir)/man4'
rm -f '$(DESTDIR)$(mandir)/man5/modulefile.5'
rmdir '$(DESTDIR)$(mandir)/man1' '$(DESTDIR)$(mandir)/man5'
rmdir '$(DESTDIR)$(mandir)'

clean:
Expand Down
6 changes: 3 additions & 3 deletions doc/source/FAQ.rst
Original file line number Diff line number Diff line change
Expand Up @@ -121,16 +121,16 @@ I want the modulefile to source some rc script that came with some application
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

See the module :ref:`sh-to-mod_sub-command` sub-command to translate the
environment changes done by a shell script into a :ref:`modulefile(4)`.
environment changes done by a shell script into a :ref:`modulefile(5)`.

You could also check the :ref:`source-sh_modulefile_command` to directly
import the environment changes performed by a shell script within a
:ref:`modulefile(4)`.
:ref:`modulefile(5)`.

How do I specify the *default* modulefile for some modulefile directory?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Modules usually uses the the highest lexicographically sorted :ref:`modulefile(4)` under the directory, unless there is a ``.version`` file in that directory which has a format like the following where ``native`` is a modulefile (or a sub-directory) in that directory. It's also possible to set the default with a ``.modulerc`` file with a **module-version** command.
Modules usually uses the the highest lexicographically sorted :ref:`modulefile(5)` under the directory, unless there is a ``.version`` file in that directory which has a format like the following where ``native`` is a modulefile (or a sub-directory) in that directory. It's also possible to set the default with a ``.modulerc`` file with a **module-version** command.

.. code-block:: tcl
Expand Down
2 changes: 1 addition & 1 deletion doc/source/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Changes between versions

This document lists functionality differences between each major version of Modules. The goal of each following section is to reference the features of previous major version that are missing or behave differently on the next major version and the features that can only be found on this newer version. For instance the `Modules 4`_ section lists the changes compared to Modules 3.2.

Regarding deprecated or newly introduced features, this document only lists their name or the command line argument related to them. Please refer to the :ref:`module(1)` and the :ref:`modulefile(4)` man pages of the previous or newer Modules version to learn the details about these removed or added features.
Regarding deprecated or newly introduced features, this document only lists their name or the command line argument related to them. Please refer to the :ref:`module(1)` and the :ref:`modulefile(5)` man pages of the previous or newer Modules version to learn the details about these removed or added features.


.. _Modules 4 changes:
Expand Down
2 changes: 1 addition & 1 deletion doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ def get_version_release_from_git():
man_pages = [
('module', 'module', u'command interface to the Modules package', [], 1),
('ml', 'ml', u'handy command interface to the Modules package', [], 1),
('modulefile', 'modulefile', u'files containing Tcl code for the Modules package', [], 4)
('modulefile', 'modulefile', u'files containing Tcl code for the Modules package', [], 5)
]


Expand Down
2 changes: 1 addition & 1 deletion doc/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ introduced by each version is available in the :ref:`MIGRATING` guide.
new features between major versions.

Reference manual page for the :ref:`module(1)` and :ref:`ml(1)` commands and
for :ref:`modulefile(4)` script provide details on all supported options.
for :ref:`modulefile(5)` script provide details on all supported options.

A :ref:`cookbook` of recipes describes how to use the various features of
Modules and how to extend the :command:`module` command to achieve specific
Expand Down
2 changes: 1 addition & 1 deletion doc/source/ml.rst
Original file line number Diff line number Diff line change
Expand Up @@ -88,5 +88,5 @@ the list of supported environment variables.
SEE ALSO
--------

:ref:`module(1)`, :ref:`modulefile(4)`
:ref:`module(1)`, :ref:`modulefile(5)`

Loading

0 comments on commit ac15879

Please sign in to comment.