install: add --disable-compressed-changelog option
Some checks failed
easybuild-tests / framework (Tcl) (push) Has been cancelled
lint-tests / lint-all (push) Has been cancelled
linux-tests / tcl86-nolibtclenvmodules (push) Has been cancelled
linux-tests / tcl85-nolibtclenvmodules (push) Has been cancelled
linux-tests / tcl85-2 (push) Has been cancelled
linux-tests / tcl86 (push) Has been cancelled
linux-tests / tcl85 (push) Has been cancelled
linux-tests / tcl87 (push) Has been cancelled
linux-tests / tcl90 (push) Has been cancelled
windows-tests / native-cmd (push) Has been cancelled
windows-tests / native-pwsh (push) Has been cancelled
windows-tests / cygwin (push) Has been cancelled
windows-tests / msys (push) Has been cancelled

Add option to control if ChangeLog documentation file should be
installed compressed or not. Useful for installation on Gentoo where
compression is handled by distribution mechanisms.

Fixes #592

Signed-off-by: Xavier Delaruelle <xavier.delaruelle@cea.fr>
This commit is contained in:
Xavier Delaruelle
2026-02-03 16:38:03 +01:00
parent 55f89e3090
commit 0e6b60a3b7
8 changed files with 49 additions and 19 deletions

View File

@@ -11,4 +11,4 @@ ignore-words-list = ans,ot,ue,fo,haa,varius,tthe,tbe,nin,desig,matchin,compre,in
# lib/autom4te.cache/* # lib/autom4te.cache/*
# skip retrieved content: icdiff, lib/tcl.m4, tcl8.3.5, spack, miniconda3, OpenFOAM-dev # skip retrieved content: icdiff, lib/tcl.m4, tcl8.3.5, spack, miniconda3, OpenFOAM-dev
# skip pdf papers: doc/paper/*.pdf # skip pdf papers: doc/paper/*.pdf
skip = .git,ChangeLog.gz,modulecmd*.tcl,*doc/build,icdiff,*lib/tcl.m4,tcl8.3.5,spack,miniconda3,OpenFOAM-dev,modules.sum,modules.log,*lib/config.sub,*lib/config.guess,*lib/config.status,*lib/configure,*lib/autom4te.cache/*,*doc/paper/*.pdf skip = .git,ChangeLog*,modulecmd*.tcl,*doc/build,icdiff,*lib/tcl.m4,tcl8.3.5,spack,miniconda3,OpenFOAM-dev,modules.sum,modules.log,*lib/config.sub,*lib/config.guess,*lib/config.status,*lib/configure,*lib/autom4te.cache/*,*doc/paper/*.pdf

View File

@@ -132,7 +132,7 @@ jobs:
tcl85-2: tcl85-2:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
env: env:
CONFIGURE_OPTS: --with-tclsh=tclsh8.5 --prefix=/tmp/modules --with-tcl=/usr/local/lib --enable-quarantine-support --enable-silent-shell-debug-support --enable-modulespath --with-pager=more --with-dark-background-colors=hi --with-locked-configs=implicit_default --enable-wa-277 --enable-advanced-version-spec --disable-ml --disable-implicit-requirement --enable-set-shell-startup --enable-path-entry-reorder CONFIGURE_OPTS: --with-tclsh=tclsh8.5 --prefix=/tmp/modules --with-tcl=/usr/local/lib --enable-quarantine-support --enable-silent-shell-debug-support --enable-modulespath --with-pager=more --with-dark-background-colors=hi --with-locked-configs=implicit_default --enable-wa-277 --enable-advanced-version-spec --disable-ml --disable-implicit-requirement --enable-set-shell-startup --enable-path-entry-reorder --disable-compressed-changelog
COVERAGE: y COVERAGE: y
EXTRA_SCRIPT_PRETEST: make install-testinitrc-1 install-testetcrc install-testmodspath EXTRA_SCRIPT_PRETEST: make install-testinitrc-1 install-testetcrc install-testmodspath
EXTRA_SCRIPT_POSTTEST: make uninstall-testconfig EXTRA_SCRIPT_POSTTEST: make uninstall-testconfig

2
.gitignore vendored
View File

@@ -1,5 +1,5 @@
/modulecmd.tcl /modulecmd.tcl
/ChangeLog.gz /ChangeLog*
/README /README
/Makefile.inc /Makefile.inc
/version.inc /version.inc

View File

@@ -554,6 +554,15 @@ instance :instopt:`--disable-set-manpath<--enable-set-manpath>`):
.. versionchanged:: 5.0 .. versionchanged:: 5.0
Configuration option default set to ``yes`` Configuration option default set to ``yes``
.. instopt:: --enable-compressed-changelog
Control if ``ChangeLog`` documentation file should be installed in a
compressed format or not. (default=yes)
.. only:: html or latex
.. versionadded:: 5.7
.. instopt:: --enable-conflict-unload .. instopt:: --enable-conflict-unload
Apply automated unload of conflicting modulefiles when loading a module. Apply automated unload of conflicting modulefiles when loading a module.

View File

@@ -56,7 +56,13 @@ ifneq ($(wildcard Makefile.inc),Makefile.inc)
endif endif
include Makefile.inc include Makefile.inc
INSTALL_PREREQ := modulecmd.tcl ChangeLog.gz README script/add.modules \ ifeq ($(compressedchangelog),y)
CHANGELOG := ChangeLog.gz
else
CHANGELOG := ChangeLog
endif
INSTALL_PREREQ := modulecmd.tcl $(CHANGELOG) README script/add.modules \
script/modulecmd script/modulecmd
TEST_PREREQ := $(MODULECMD) TEST_PREREQ := $(MODULECMD)
ifeq ($(COVERAGE),y) ifeq ($(COVERAGE),y)
@@ -580,17 +586,19 @@ modulecmd.tcl: tcl/cache.tcl tcl/coll.tcl tcl/envmngt.tcl tcl/init.tcl \
# generate an empty changelog file if not working from git repository # generate an empty changelog file if not working from git repository
ifeq ($(wildcard .git),.git) ifeq ($(wildcard .git),.git)
ChangeLog.gz: script/gitlog2changelog.py ChangeLog: script/gitlog2changelog.py
$(ECHO_GEN) $(ECHO_GEN)
script/gitlog2changelog.py script/gitlog2changelog.py
gzip -f -9 ChangeLog
else else
ChangeLog.gz: ChangeLog:
$(ECHO_GEN) $(ECHO_GEN)
echo "Please refer to the NEWS document to learn about main changes" >ChangeLog echo "Please refer to the NEWS document to learn about main changes" >$@
gzip -f -9 ChangeLog
endif endif
ChangeLog.gz: ChangeLog
$(ECHO_GEN)
gzip --keep --force -9 $<
README: README:
$(ECHO_GEN) $(ECHO_GEN)
sed -e '181,187d' -e '1,10d' -e 's|\[\(.*\?\)\]\[[0-9]\]|\1|' $@.md > $@ sed -e '181,187d' -e '1,10d' -e 's|\[\(.*\?\)\]\[[0-9]\]|\1|' $@.md > $@
@@ -723,7 +731,7 @@ endif
ifeq ($(docinstall),y) ifeq ($(docinstall),y)
$(INSTALL_DIR) '$(DESTDIR)$(docdir)' $(INSTALL_DIR) '$(DESTDIR)$(docdir)'
$(INSTALL_DATA) COPYING.GPLv2 '$(DESTDIR)$(docdir)/' $(INSTALL_DATA) COPYING.GPLv2 '$(DESTDIR)$(docdir)/'
$(INSTALL_DATA) ChangeLog.gz '$(DESTDIR)$(docdir)/' $(INSTALL_DATA) $(CHANGELOG) '$(DESTDIR)$(docdir)/'
$(INSTALL_DATA) README '$(DESTDIR)$(docdir)/' $(INSTALL_DATA) README '$(DESTDIR)$(docdir)/'
endif endif
ifeq ($(vimaddons),y) ifeq ($(vimaddons),y)
@@ -800,7 +808,7 @@ ifeq ($(nagelfaraddons),y)
-rmdir -p '$(DESTDIR)$(nagelfardatadir)' -rmdir -p '$(DESTDIR)$(nagelfardatadir)'
endif endif
ifeq ($(docinstall),y) ifeq ($(docinstall),y)
rm -f $(foreach docfile,ChangeLog.gz README COPYING.GPLv2,'$(DESTDIR)$(docdir)/$(docfile)') rm -f $(foreach docfile,$(CHANGELOG) README COPYING.GPLv2,'$(DESTDIR)$(docdir)/$(docfile)')
ifeq ($(builddoc),n) ifeq ($(builddoc),n)
rmdir '$(DESTDIR)$(docdir)' rmdir '$(DESTDIR)$(docdir)'
endif endif
@@ -827,12 +835,12 @@ endif
# include pre-generated documents not to require documentation build # include pre-generated documents not to require documentation build
# tools when installing from dist tarball # tools when installing from dist tarball
dist-tar: ChangeLog.gz share/rpm/environment-modules.spec pkgdoc dist-tar: $(CHANGELOG) share/rpm/environment-modules.spec pkgdoc
$(ECHO_GEN2) $(DIST_PREFIX).tar $(ECHO_GEN2) $(DIST_PREFIX).tar
git archive --prefix=$(DIST_PREFIX)/ --worktree-attributes \ git archive --prefix=$(DIST_PREFIX)/ --worktree-attributes \
-o $(DIST_PREFIX).tar HEAD -o $(DIST_PREFIX).tar HEAD
tar -rf $(DIST_PREFIX).tar --transform 's,^,$(DIST_PREFIX)/,' \ tar -rf $(DIST_PREFIX).tar --transform 's,^,$(DIST_PREFIX)/,' \
lib/configure lib/config.h.in $(DIST_AUTORECONF_EXTRA) ChangeLog.gz \ lib/configure lib/config.h.in $(DIST_AUTORECONF_EXTRA) $(CHANGELOG) \
doc/build/MIGRATING.txt doc/build/changes.txt doc/build/INSTALL.txt \ 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/INSTALL-win.txt doc/build/NEWS.txt doc/build/CONTRIBUTING.txt \
doc/build/module.1.in doc/build/ml.1 doc/build/envml.1 \ doc/build/module.1.in doc/build/ml.1 doc/build/envml.1 \
@@ -850,7 +858,7 @@ dist-bzip2: dist-tar
dist: dist-gzip dist: dist-gzip
# dist zip ball for Windows platform with all pre-generated relevant files # dist zip ball for Windows platform with all pre-generated relevant files
dist-win: modulecmd.tcl ChangeLog.gz README pkgdoc dist-win: modulecmd.tcl $(CHANGELOG) README pkgdoc
$(ECHO_GEN2) $(DIST_WIN_PREFIX).zip $(ECHO_GEN2) $(DIST_WIN_PREFIX).zip
$(INSTALL_DIR) $(DIST_WIN_PREFIX) $(INSTALL_DIR) $(DIST_WIN_PREFIX)
$(INSTALL_DIR) $(DIST_WIN_PREFIX)/libexec $(INSTALL_DIR) $(DIST_WIN_PREFIX)/libexec
@@ -861,7 +869,7 @@ dist-win: modulecmd.tcl ChangeLog.gz README pkgdoc
$(INSTALL_PROGRAM) script/envml.cmd $(DIST_WIN_PREFIX)/bin/ $(INSTALL_PROGRAM) script/envml.cmd $(DIST_WIN_PREFIX)/bin/
$(INSTALL_DIR) $(DIST_WIN_PREFIX)/doc $(INSTALL_DIR) $(DIST_WIN_PREFIX)/doc
$(INSTALL_DATA) COPYING.GPLv2 $(DIST_WIN_PREFIX)/doc/ $(INSTALL_DATA) COPYING.GPLv2 $(DIST_WIN_PREFIX)/doc/
$(INSTALL_DATA) ChangeLog.gz $(DIST_WIN_PREFIX)/doc/ $(INSTALL_DATA) $(CHANGELOG) $(DIST_WIN_PREFIX)/doc/
$(INSTALL_DATA) README $(DIST_WIN_PREFIX)/doc/ $(INSTALL_DATA) README $(DIST_WIN_PREFIX)/doc/
$(INSTALL_DATA) doc/build/MIGRATING.txt $(DIST_WIN_PREFIX)/doc/ $(INSTALL_DATA) doc/build/MIGRATING.txt $(DIST_WIN_PREFIX)/doc/
$(INSTALL_DATA) doc/build/INSTALL-win.txt $(DIST_WIN_PREFIX)/doc/ $(INSTALL_DATA) doc/build/INSTALL-win.txt $(DIST_WIN_PREFIX)/doc/
@@ -892,7 +900,7 @@ clean:
rm -rf coverage rm -rf coverage
# do not clean generated docs if not in git repository # do not clean generated docs if not in git repository
ifeq ($(wildcard .git),.git) ifeq ($(wildcard .git),.git)
rm -f ChangeLog.gz rm -f ChangeLog*
endif endif
rm -f README rm -f README
rm -f modulecmd.tcl rm -f modulecmd.tcl
@@ -1138,7 +1146,7 @@ $(V).SILENT: initdir pkgdoc doc version.inc share/rpm/environment-modules.spec \
tcl/cache.tcl_i tcl/coll.tcl_i tcl/envmngt.tcl_i tcl/init.tcl_i tcl/interp.tcl_i \ tcl/cache.tcl_i tcl/coll.tcl_i tcl/envmngt.tcl_i tcl/init.tcl_i tcl/interp.tcl_i \
tcl/main.tcl_i tcl/mfcmd.tcl_i tcl/modfind.tcl_i tcl/modeval.tcl_i \ tcl/main.tcl_i tcl/mfcmd.tcl_i tcl/modfind.tcl_i tcl/modeval.tcl_i \
tcl/modscan.tcl_i tcl/modspec.tcl_i tcl/report.tcl_i tcl/subcmd.tcl_i \ tcl/modscan.tcl_i tcl/modspec.tcl_i tcl/report.tcl_i tcl/subcmd.tcl_i \
tcl/util.tcl_i ChangeLog.gz README script/add.modules \ tcl/util.tcl_i ChangeLog ChangeLog.gz README script/add.modules \
script/gitlog2changelog.py script/modulecmd \ script/gitlog2changelog.py script/modulecmd \
lib/libtclenvmodules$(SHLIB_SUFFIX) lib/libtestutil-closedir$(SHLIB_SUFFIX) \ lib/libtclenvmodules$(SHLIB_SUFFIX) lib/libtestutil-closedir$(SHLIB_SUFFIX) \
lib/libtestutil-getpwuid$(SHLIB_SUFFIX) lib/libtestutil-getgroups$(SHLIB_SUFFIX) \ lib/libtestutil-getpwuid$(SHLIB_SUFFIX) lib/libtestutil-getgroups$(SHLIB_SUFFIX) \

View File

@@ -63,6 +63,8 @@ initconfin := @initconfin@
builddoc := @builddoc@ builddoc := @builddoc@
# able to use manpath cmd to get currently set manpath # able to use manpath cmd to get currently set manpath
usemanpath := @usemanpath@ usemanpath := @usemanpath@
# compress ChangeLog file
compressedchangelog := @compressedchangelog@
# logger setup # logger setup
loggedevents := @loggedevents@ loggedevents := @loggedevents@

View File

@@ -50,6 +50,10 @@ Modules 5.7.0 (not yet released)
* Doc: add manual page for :ref:`modulecmd(1)` command. * Doc: add manual page for :ref:`modulecmd(1)` command.
* Make :mfcmd:`getenv` modulefile command available from module rc file * Make :mfcmd:`getenv` modulefile command available from module rc file
evaluation context. (fix issue #588) evaluation context. (fix issue #588)
* Install: add installation option
:instopt:`--disable-compressed-changelog<--enable-compressed-changelog>` to
cope with packaging process handling documentation file compression at their
level. (fix issue #592)
.. _5.6 release notes: .. _5.6 release notes:

11
configure vendored
View File

@@ -41,7 +41,7 @@ listterseoutput editor variantshortcut bashcompletiondir fishcompletiondir \
zshcompletiondir tcllinter tcllinteropts nagelfardatadir nagelfaraddons \ zshcompletiondir tcllinter tcllinteropts nagelfardatadir nagelfaraddons \
stickypurge uniquenameloaded abortonerror sourcecache logger loggeropts \ stickypurge uniquenameloaded abortonerror sourcecache logger loggeropts \
loggedevents conflictunload spideroutput spiderterseoutput spiderindepth \ loggedevents conflictunload spideroutput spiderterseoutput spiderindepth \
emacsdatadir emacsaddons requirevia" emacsdatadir emacsaddons requirevia compressedchangelog"
libarglist=() libarglist=()
# flags to know if argument has been specified on command-line # flags to know if argument has been specified on command-line
@@ -88,6 +88,7 @@ PYTHON=python
SPHINXBUILD=sphinx-build SPHINXBUILD=sphinx-build
builddoc=y builddoc=y
usemanpath=y usemanpath=y
compressedchangelog=y
PS='ps' PS='ps'
BASENAME='basename' BASENAME='basename'
RMDIR_IGN_NON_EMPTY='rmdir' RMDIR_IGN_NON_EMPTY='rmdir'
@@ -251,6 +252,9 @@ Optional Features:
--enable-color control colored output. \`yes' equals to the \`auto' --enable-color control colored output. \`yes' equals to the \`auto'
color mode. \`no' equals to the \`never' color mode color mode. \`no' equals to the \`never' color mode
[yes] [yes]
--enable-compressed-changelog
install \`ChangeLog' file in a compressed format
[yes]
--enable-conflict-unload --enable-conflict-unload
set modulecmd.tcl to automatically unload modules set modulecmd.tcl to automatically unload modules
that conflict with modules to load and the dependent that conflict with modules to load and the dependent
@@ -735,6 +739,9 @@ for arg in "$@"; do
--enable-doc-install*|--disable-doc-install) --enable-doc-install*|--disable-doc-install)
# shellcheck disable=SC2034 # shellcheck disable=SC2034
docinstall=$(get_feature_value "$arg") ;; docinstall=$(get_feature_value "$arg") ;;
--enable-compressed-changelog*|--disable-compressed-changelog)
# shellcheck disable=SC2034
compressedchangelog=$(get_feature_value "$arg") ;;
--enable-vim-addons*|--disable-vim-addons) --enable-vim-addons*|--disable-vim-addons)
# shellcheck disable=SC2034 # shellcheck disable=SC2034
vimaddons=$(get_feature_value "$arg") ;; vimaddons=$(get_feature_value "$arg") ;;
@@ -1086,7 +1093,7 @@ else
fi fi
# gzip is mandatory if installing from git repository to build ChangeLog.gz # gzip is mandatory if installing from git repository to build ChangeLog.gz
if [ $work_from_git_repo -eq 0 ]; then if [ "$compressedchangelog" = 'y' ] && [ $work_from_git_repo -eq 0 ]; then
check_requirement gzip check_requirement gzip
fi fi