Search Criteria
Package Details: environment-modules 5.6.1-6
Package Actions
| Git Clone URL: | https://aur.archlinux.org/environment-modules.git (read-only, click to copy) |
|---|---|
| Package Base: | environment-modules |
| Description: | Provides for an easy dynamic modification of a user's environment via modulefile. |
| Upstream URL: | https://envmodules.io/ |
| Licenses: | GPL-2.0-or-later |
| Conflicts: | lmod |
| Replaces: | env-modules |
| Submitter: | hcartiaux |
| Maintainer: | hcartiaux (ChrisTX, snafu) |
| Last Packager: | ChrisTX |
| Votes: | 15 |
| Popularity: | 0.172068 |
| First Submitted: | 2026-06-29 01:01 (UTC) |
| Last Updated: | 2026-07-06 23:47 (UTC) |
Dependencies (26)
- bash (bash-gitAUR, bash-devel-gitAUR)
- glibc (glibc-gitAUR, glibc-git-native-pgoAUR, glibc-eacAUR)
- inetutils (inetutils-gitAUR)
- lsb-release
- procps-ng (procps-ng-nosystemd-gitAUR, procps-ng-gitAUR)
- tcl (tcl-fossilAUR, tcl84AUR, tcl84AUR)
- util-linux (util-linux-aesAUR, util-linux-selinuxAUR)
- viAUR (neovim-symlinksAUR, nvi-gitAUR, heirloom-ex-viAUR, viAUR, ex-vi-compat)
- xorg-xrdb (xorg-xrdb-mcppAUR)
- less (less-gitAUR) (make)
- nagelfarAUR (make)
- python-sphinx (python-sphinx-gitAUR) (make)
- bash (bash-gitAUR, bash-devel-gitAUR) (check)
- cmake (cmake3AUR, cmake-gitAUR) (check)
- dash (dash-gitAUR, dash-editline-gitAUR, dash-staticAUR, dash-static-muslAUR) (check)
- dejagnu (dejagnu-gitAUR) (check)
- fish (fish-gitAUR) (check)
- ksh (ksh93-gitAUR, ksh-okshAUR) (check)
- perl (perl-gitAUR) (check)
- python (check)
- Show 6 more dependencies...
Latest Comments
1 2 3 4 Next › Last »
ChrisTX commented on 2026-07-06 23:56 (UTC) (edited on 2026-07-07 22:57 (UTC) by ChrisTX)
@hcartiaux Sorry for the indent changes, I unintentionally had my editor on format-on-save and it reformatted it with
shfmt, which I hadn't noticed. I disabled that now to avoid running into this in the future.As for
sed: I would agree if this was for building an application, but here it's a bunch of tests, that are all broken the same way. Ifsedwas to fail patching something, that test will just error later on. With apatchapproach you'll potentially have to update the patch more often if lines around the patch location change.As forSee edit belowdnsdomainname, that shouldn't be an issue. Upstream only uses this for statistics and doesn't make use of it being a NIS domain or whatever. The correct choice would behostname -y, as that shows the YP/NIS domain. I'm not entirely sure the choice of a DNS name is replaceable there. Maybe we should raise this with upstream what they think and to eye a change maybe for a future release?While I was looking through their code, I did notice a few things though:
Upstream uses
xorg-xrdbto provide the module files commandx-resource. To my understanding its optional, so I've made it an opts and make depends as it's used in some tests. Unlike the domain name thing, they callxrdba lot, like hereThey use
lsb_releasehere and then reuse the results. I've added that to the depends.They have an optional dependency on mogui, the environment-modules GUI. It's being tested for here and changes some shell integration and some tests behaviour. But as you can see, this hasn't been updated in two years and there's no AUR package or anything for it either. Alas, I didn't add it, but this could (should?) be an opt depends.
Edit: It is actually possible to make
sedfail on no substitution, but it means using rather ugly commands. Namely theqcommand allows exiting with a specific code (although this is a GNU extension):This would work, but I'm not sure if that's any less maintenance because this is obviously awful to read...
Edit #2: I made an upstream bug report about this whole matter.
Also, I probably didn't explain too well what I my concern about
dnsdomainnameis, or at least I believe so. Effectively, the main usage for the information ofdomainname(1)in modules is notmodule state, but rather the modulefile commanduname. It does return this information in itsfieldparameter to whatever modulefile calls it. And that's the crux - it's very difficult to estimate what modulefiles would do with it, but if they use it, they will almost certainly assume it to be a NIS domain name, because that's what it's defined as in the documentation and that's what upstream does.If you set your hostname to anything containing a
.you will have adnsdomainnameautomatically nowadays. I have dedicated servers at cloud providers with their FQDN as hostname but that aren't part of any domain; no NIS, AD, FreeIPA. But if it's not(none), modulefiles might believe those machines to be joined in an NIS domain when it isn't.I don't think it's a good idea for us to change the behaviour here - after some contemplation I would swap to
hostname -y. As I've explained in the upstream bug report, the issue overall stems from any distro (Fedora, Debians, Nix, SuSE) but Arch usingdebian-hostnamerather than GNU inetutils to providehostname(1)and friends. But on either package,hostname -yworks and usesgetdomainname(2)under the hood, so the behaviour is identical.Maybe it's worth a consideration for Arch though to package
debian-hostname. Inetutils has its own problems and 99% of people only install it forhostname(1)anyway. It also has no dependencies whatsoever and is absolutely minimalistic.Edit #3: I uploaded MoGui to AUR if you want to take a look. But MoGui is a pretty basic and trivial GUI, I'd just leave it as is, or maybe make it a virtual dependency.
hcartiaux commented on 2026-07-06 09:43 (UTC) (edited on 2026-07-06 10:36 (UTC) by hcartiaux)
@ChrisTX, reviewing right now.
Few remarks:
Edit: OK for me, thanks a lot for your work @ChrisTX @snafu :)
ChrisTX commented on 2026-07-01 03:59 (UTC) (edited on 2026-07-01 03:59 (UTC) by ChrisTX)
I added
inetutilsto thedepends()array (that's what provideshostname) and had a quick look at why the tests were failing. It turns out, it was just the samedomainnamething. Instead of deleting them I just added two lines ofsedthat do thedomainname->hostname -dadjustment for the test as well. This way we can run the fullQUICKTESTsuite without deleting any tests.hcartiaux commented on 2026-06-29 01:14 (UTC)
New version pushed as environment-modules.
I've not added yp-tools to the depends array, I've created a patch instead. Tests are passing, some of them are disabled with
QUICKTEST=1so not totally surprising.I've not added powershell to the checkdepends array (because it's in AUR and I don't intend to move powershell to extra)
there's apparently a problem with the shell initialization in bash for the ml() function, I have to debug this.
for the broken symlinks, my mistake :)
let's keep the configuration and paths in sync with other distros, as users are probably coming from HPC centers using RHEL or Debian derivatives.
When you're ok, I can merge env-modules into environment-modules. My onboarding as a new package maintainer is not yet completed, so it will probably stay in AUR for a few more weeks.
ChrisTX commented on 2026-06-23 19:01 (UTC)
@snafu
+1 for renaming it.
I just put it in the location upstream used, and Ubuntu and Fedora seem to use the same location. But somewhere under
/usr/shareis fine.Regarding the breakage, there's typos in the PKGBUILD causing it. The variable
_modulediris defined, but it later referencesmoduledirwithout a leading underscore. This causes the breakage I've seen. I've just removed those variables, which fixed the issue.Also, zsh will work as-is like this. The idea is that any shell should load upstream's
profile.sh- this can be done by just putting it in/etc/profile.d. zsh and other shells will load that. See also the upstream documentation on this. Either way, I can confirm that with my fixes it works out-of-the-box in zsh, bash, etc.snafu commented on 2026-06-23 18:47 (UTC)
@ChrisTX great effort! And great to hear that it will migrate to extra.
Just one minor thought, maybe when migrating the package should be renamed to
environment-modulesfor reasons of consistency orsed -i -e 's/environment-modules/envmodules/g' PKGBUILD(which might be even more consistent with http://envmodules.io, but does not match the other major distro's)And maybe regarding point 5. also /usr/share/environment-modules/init, would be less confusion from my point of view.
Regarding point 2, the symlinks are not broken in the last version I have installed. But since zsh does not provide something a mechanism like BASH_ENV (which is set by envmodules), i found no other way to make module function available. Nevertheless removing the noise postinstall is fine.
ChrisTX commented on 2026-06-23 12:47 (UTC) (edited on 2026-06-23 12:47 (UTC) by ChrisTX)
@hcartiaux Oh nice, I didn't know this was planned. In that case, I got some remarks that might help then:
Please note that the
yp-toolssolution is probably not what you want to go with then. They indeed hardcode the usage ofdomainname(1), but it's used here ininit.tcland in tests only, e.g. here or here. The tests should just be skipped with a warning, and ininit.tclthis could be patched to callhostname -d(from inetutils) or you could make a dummy package that provides a/usr/bin/domainname, which in turn just callshostname -d.As for the
makedepends(): It will use whatever is available in terms of commands automatically. Alas, you could removepowershell(which is only in AUR atm) from it and it would just cause the tests forpowershellto get skipped. I however sort of had to add it as it would for people installing from AUR otherwise make a difference for the tests whetherpowershellis available or not. ( PS. alternatively, I just last month significantly reworked and cleaned up thepowershellPKGBUILD as well. 😅 )hcartiaux commented on 2026-06-23 08:54 (UTC) (edited on 2026-06-23 08:55 (UTC) by hcartiaux)
@ChrisTX thanks a lot for your work here. I'll take the time to review your changes this week and will update env-modules. Eventually, I'll migrate the package to extra.
ChrisTX commented on 2026-06-22 19:45 (UTC) (edited on 2026-06-22 19:46 (UTC) by ChrisTX)
This has a few issues:
The tests need zsh, dash, bash, etc. installed to run consistently. All of the shells need to go in
makedepends()since otherwise the tests will silently skip or fail. This includes R, CMake, Perl and PowerShell since the package has integrations for those.The variables in the PKGBUILD are messed up, so it created broken symlinks in / instead of what it's supposed to do.
You can't use
optdepends()formakedepends(). This breaks automatic building in chroot etc. Sphinx and Nagelfar are also not declared as optional by upstream and should be present.Check shouldn't be commented out, see here. This can be skipped with
--nocheck. However, upstream recommends usingQUICKTEST=1(see here). Using that makes the tests pass quickly.The init path should be
/usr/share/module/init, this is the right path on Arch, and also what upstream uses. They don't belong in/etc.The module should already with its symlink to
/etc/profile.dbe loaded for all shells. The reason it doesn't is point 2. Thus the .install can be removed, as the info is obsolete.Every major distro (Fedora, Debian, Ubuntu, ...) that ships this puts the configuration files under
/etc/environment-modules.viis a hard dependency, and so is havingdomainname, see e.g. here in their documentation. The latter can only be provided byyp-tools. Without these, certain parts of environment modules break.Quite a bunch of optional, newer features are left disabled.
Taking all of this together, I got the following patch for the PKGBUILD: https://gist.github.com/ChrisTX/b8651ce3dcf1d8841f5e5f432abfca82
I should add that this kinda sucks, especially the dependency on
yp-tools, but unfortunately environment modules assumesdomainname(1)to be available and will cause errors if it isn't. The same goes for the amount of dependencies for the tests.hcartiaux commented on 2025-11-07 09:21 (UTC)
I've updated the PKGBUILD here: https://gist.github.com/hcartiaux/0f32c3d1d05f8d15a77267b0146583e1
1 2 3 4 Next › Last »