#1152463 lmod: Incompatible with upcoming lua-posix 38

#1152463#5
Date:
2026-10-29 15:34:44 UTC
From:
To:
Dear Maintainer,

I intend to upload newly released lua-posix 38, which removes some
functions and breaks backward compatibility (see [1] for the full list).

lmod uses some of deprecated and noe removed functions, so I expect
it will break when lua-posix 38 will be introduced to Debian.

I guess, you'd have to patch lmod to use the new interface.
Unfortunately, simpy replacing the old name by the new one doesn't work.
For example, posix.uname is replaced by posix.sys.utsname.uname, but
the latter does not take arguments and returns a table with the results
instead of an individual field.

Here is the list of found old functions:

contrib/Bright/SitePackage.lua:local uname  = require("posix").uname
contrib/hostTypeCacheBuilder/may_i_build_cache:   myHostName = posix.uname("%n")
contrib/TACC/SitePackage.lua:local uname   = require("posix").uname
contrib/tracking_module_usage/gen_1/SitePackage.lua:local uname   = require("posix").uname
docs/source/300_tracking_module_usage.rst:   local uname   = require("posix").uname
hermes/lib/build_epoch.lua:   if (posix.gettimeofday) then
hermes/lib/build_epoch.lua:            local t1, t2 = posix.gettimeofday()
hermes/lib/build_epoch.lua:            local t = posix.gettimeofday()
hermes/lib/build_epoch.lua:      local x1, x2 = posix.gettimeofday()
hermes/lib/engine.lua:      local mystat = posix.stat(fullFn)
hermes/lib/getUname.lua:   local machName         = posix.uname("%m")
hermes/lib/getUname.lua:   local osName           = posix.uname("%s")
hermes/lib/getUname.lua:   t.hostName  = posix.uname("%n")
hermes/tm/FindTests.lua:      local mystat = posix.stat(path)
hermes/tm/FindTests.lua:         mystat = posix.stat(path)
hermes/tools/fileOps.lua:   local t = posix.stat(d,"type")
hermes/tools/fileOps.lua:   local t = posix.stat(fn,"type")
proj_mgmt/build_hide_cmd:   local tm = posix.localtime(myTime)
proj_mgmt/epoch.in.lua:-- depending on what version of posix.gettimeofday is installed.
proj_mgmt/epoch.in.lua:   if (posix.gettimeofday) then
proj_mgmt/epoch.in.lua:local stat     = posix.stat
proj_mgmt/epoch.in.lua:            local t1, t2 = posix.gettimeofday()
proj_mgmt/epoch.in.lua:            local t = posix.gettimeofday()
proj_mgmt/epoch.in.lua:      local x1, x2 = posix.gettimeofday()
proj_mgmt/jsonLoadConversion:local stat     = posix.stat
proj_mgmt/updateVersion:   local t = posix.stat(fn,"type")
rt/saverestore/saverestore.tdesc:   local osName = posix.uname("%s")
rt/sd_tacc/sd_tacc.tdesc:   local osName = posix.uname("%s")
settarg/getUname.lua:   local machName         = posix.uname("%m")
settarg/getUname.lua:   local osName           = posix.uname("%s")
settarg/getUname.lua:   local release          = posix.uname("%r")
src/addto.in.lua:local stat     = posix.stat
src/check_module_tree_syntax.in.lua:local stat     = posix.stat
src/chkJson:local stat     = posix.stat
src/clearLMOD_cmd.in.lua:local stat     = posix.stat
src/computeHashSum.in.lua:local stat     = posix.stat
src/DirTree.lua:local stat      = posix.stat
src/lmod.in.lua:      dbg.print{"Hostname: ",posix.uname("%n"),"\n"}
src/lmod.in.lua:      dbg.print{"System: ",posix.uname("%s")," ",posix.uname("%r"),"\n"}
src/lmod.in.lua:      dbg.print{"Version: ",posix.uname("%v"),"\n"}
src/lmod.in.lua:local stat     = posix.stat
src/ml_cmd.in.lua:local stat     = posix.stat
src/MRC.lua:   if (posix.strptime == nil or posix.mktime == nil) then
src/MRC.lua:   if (posix.strptime == nil or posix.mktime == nil) then
src/MRC.lua:   local d = posix.strptime(tStr,"%Y-%m-%dT%H:%M")
src/MRC.lua:      local tm = posix.localtime(s_Epoch)
src/MRC.lua:   return posix.mktime(tm)
src/printEnvT.lua:local stat     = posix.stat
src/sandbox.lua:            hostid = posix.hostid, open = posix.open,
src/sandbox.lua:            openlog = posix.openlog, closelog = posix.closelog,
src/sandbox.lua:  posix = { uname = posix.uname, setenv = posix.setenv,
src/sandbox.lua:            syslog = posix.syslog, stat = posix.stat},
src/sh_to_modulefile.in.lua:local stat     = posix.stat
src/spiderCacheSupport.in.lua:local stat     = posix.stat
src/spider.in.lua:   local hostName = posix.uname("%n")
src/spider.in.lua:local stat     = posix.stat
src/StandardPackage.lua:   a[#a + 1]  = posix.uname("%m")
src/StandardPackage.lua:   a[#a + 1]  = posix.uname("%s")
src/utils.lua:         epoch_type = "posix.gettimeofday() (1)"
src/utils.lua:         epoch_type = "posix.gettimeofday() (2)"
src/utils.lua:   if (posix.gettimeofday) then
src/utils.lua:      local gettimeofday = posix.gettimeofday
src/utils.lua:   local ppid  = posix.getpid("ppid")
src/utils.lua:local stat         = posix.stat
tools/fileOps.lua:   local result = posix.stat(f,"type")
tools/fileOps.lua:local stat      = posix.stat
tools/fileOps.lua:   local t = posix.stat(fn,"type")

[1] https://github.com/luaposix/luaposix/releases/tag/v38