Skip to content

Align MANPATH handling in lmod.spec to preserve system man pages (#2070) #2105

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

Open
wants to merge 2 commits into
base: 3.x
Choose a base branch
from

Conversation

Amrithasuresh
Copy link

Summary

This PR updates the lmod.spec file to align MANPATH handling

Changes

  • Initialize MANPATH if unset to system defaults
  • Use Lmod's 'addto' helper script to append Lmod man pages
  • Applied changes in both bash (lmod.sh) and csh (lmod.csh) profile scripts
  • Prevents module MANPATH overrides that hide system man pages (fixes manpath in modules #2070)

Related Issue

Fixes: #2070

Signed-off-by

Suresh Panneerselvam [email protected]

…em man pages

- Initialize MANPATH if unset to use system default paths
- Append Lmod's own man directory using upstream 'addto' helper script
- Prevents module MANPATH overrides that hide system man pages (fixes openhpc#2070)
- Applied changes in both bash (lmod.sh) and csh (lmod.csh) profile scripts

Signed-off-by: Suresh Panneerselvam <[email protected]>
setenv MANPATH ":"
endif
# Initialize MANPATH if unset, then safely append Lmod's man directory using addto helper
setenv MANPATH ` ${OHPC_ADMIN}/lmod/lmod/libexec/addto MANPATH ${OHPC_ADMIN}/lmod/lmod/share/man `
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there are unnecessary spaces after and before the backticks in this line. Please remove them. The spaces which are inside of the content between the backticks:

setenv MANPATH `${OHPC_ADMIN}/lmod/lmod/libexec/addto MANPATH ${OHPC_ADMIN}/lmod/lmod/share/man`

@adrianreber
Copy link
Member

@Amrithasuresh If you look at the result of the CI runs there will be an RPM which you can test locally to see if your change works as expected.

@adrianreber
Copy link
Member

@mslacken

lmod fails to build on opensuse:

Problem: 1: the to be installed lmod-ohpc-8.7.53-27.ohpc.1.src requires 'apparmor-abstractions', but this requirement cannot be provided
not installable providers: apparmor-abstractions-3.0.4-150500.9.3.noarch[repo-oss]
                   apparmor-abstractions-3.0.4-150500.11.3.1.noarch[repo-sle-update]

I think this is related to your PR to fix things around apparmor. Any ides how this could be fixed?

Copy link

github-actions bot commented Apr 11, 2025

Test Results

 30 files   - 18  30 suites   - 18   38s ⏱️ -12s
 54 tests  - 15  50 ✅  - 12  4 💤  - 3  0 ❌ ±0 
102 runs   - 45  96 ✅  - 36  6 💤  - 9  0 ❌ ±0 

Results for commit 07efc5e. ± Comparison against base commit c9a2481.

This pull request removes 16 and adds 1 tests. Note that renamed tests count towards both.
magpie ‑ [magpie] Verify MAGPIE module is loaded and matches rpm version
magpie ‑ [magpie] Verify module MAGPIE_DIR is defined and exists
magpie ‑ [magpie] check for RPM
mem_limits ‑ [memlock] check increased hard limit
mem_limits ‑ [memlock] check increased soft limit
munge ‑ [munge] Decode credential locally
munge ‑ [munge] Generate a credential
munge ‑ [munge] Run benchmark
munge ‑ [munge] check for OS provdied RPM
ompi_info ‑ [openmpi] check for no output to stderr with ompi_info
…
lmod ‑ [lmod] test that the setup function passed

♻️ This comment has been updated with latest results.

- Cleaned up MANPATH assignment in csh script as per review feedback

Signed-off-by: Suresh Panneerselvam <[email protected]>
@Amrithasuresh Amrithasuresh force-pushed the 3.x branch 2 times, most recently from 7f740a1 to 07efc5e Compare April 12, 2025 04:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

manpath in modules
2 participants