{"action":"created","issue":{"url":"https://api.github.com/repos/TACC/Lmod/issues/352","repository_url":"https://api.github.com/repos/TACC/Lmod","labels_url":"https://api.github.com/repos/TACC/Lmod/issues/352/labels{/name}","comments_url":"https://api.github.com/repos/TACC/Lmod/issues/352/comments","events_url":"https://api.github.com/repos/TACC/Lmod/issues/352/events","html_url":"https://github.com/TACC/Lmod/issues/352","id":304277467,"number":352,"title":"Feature request: simple install directory choice","user":{"login":"henryiii","id":4616906,"avatar_url":"https://avatars1.githubusercontent.com/u/4616906?v=4","gravatar_id":"","url":"https://api.github.com/users/henryiii","html_url":"https://github.com/henryiii","followers_url":"https://api.github.com/users/henryiii/followers","following_url":"https://api.github.com/users/henryiii/following{/other_user}","gists_url":"https://api.github.com/users/henryiii/gists{/gist_id}","starred_url":"https://api.github.com/users/henryiii/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/henryiii/subscriptions","organizations_url":"https://api.github.com/users/henryiii/orgs","repos_url":"https://api.github.com/users/henryiii/repos","events_url":"https://api.github.com/users/henryiii/events{/privacy}","received_events_url":"https://api.github.com/users/henryiii/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-03-12T08:26:32Z","updated_at":"2018-03-12T20:58:51Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"LMod currently forces its install structure on the user; for example, if you set prefix to `$prefix/lmod/VERSION/`, LMod will install to `$prefix/lmod/VERSION/lmod/VERSION/`. For systems (like Brew) that already manage versions, it would be much better to not force this structure on the user. What's worse, when Brew makes a link to `/usr/opt/lmod`, the path to the init script, for example, becomes: `/usr/opt/lmod/lmod/lmod/init/sh`. (In https://github.com/Homebrew/homebrew-core/pull/24305, I've removed one level of `lmod` by installing to `$prefix/lmod/VERSION/versions/lmod/VERSION/` and then making a symlink, but that means you are following two symlinks to an even longer final path.)\r\n\r\nThe request is to add a `./configure` option to allow direct specification the final install dir with no redirect. \r\n\r\nIdeally, if there are no collisions in /libexec, you could even install luamodules and lmod into the same directory, causing the path to be `/usr/opt/lmod/init/sh` if specifying the actual installation directory was possible."},"comment":{"url":"https://api.github.com/repos/TACC/Lmod/issues/comments/372460291","html_url":"https://github.com/TACC/Lmod/issues/352#issuecomment-372460291","issue_url":"https://api.github.com/repos/TACC/Lmod/issues/352","id":372460291,"user":{"login":"henryiii","id":4616906,"avatar_url":"https://avatars1.githubusercontent.com/u/4616906?v=4","gravatar_id":"","url":"https://api.github.com/users/henryiii","html_url":"https://github.com/henryiii","followers_url":"https://api.github.com/users/henryiii/followers","following_url":"https://api.github.com/users/henryiii/following{/other_user}","gists_url":"https://api.github.com/users/henryiii/gists{/gist_id}","starred_url":"https://api.github.com/users/henryiii/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/henryiii/subscriptions","organizations_url":"https://api.github.com/users/henryiii/orgs","repos_url":"https://api.github.com/users/henryiii/repos","events_url":"https://api.github.com/users/henryiii/events{/privacy}","received_events_url":"https://api.github.com/users/henryiii/received_events","type":"User","site_admin":false},"created_at":"2018-03-12T20:58:50Z","updated_at":"2018-03-12T20:58:50Z","author_association":"CONTRIBUTOR","body":"At this point it's mostly cosmetic but something that should be eventually fixed, IMO. The problem is that a system like brew already has versioning built in, and a symlink system for all packages built in too (since it's not a unique problem to LMod). (Packages live in `/usr/local/Cellar/package/version`, and the latest version is symlinked to `/usr/opt/package`)\r\n\r\nThe original solution in Brew was this:\r\n```ruby\r\nsystem \"./configure\", \"--prefix=#{prefix}\"\r\nsystem \"make\", \"install\"\r\n# Move prefix/lmod/VERSION/lmod/VERSION/* to prefix/lmod/VERSION/*\r\nmv Dir[prefix/\"lmod/#{version}/*\"], prefix\r\nrmdir prefix/\"lmod/#{version}\"\r\n(prefix/\"lmod\").install_symlink \"..\" => version\r\nDir[prefix/\"lmod/init/*\"].reject { |f| f[\"lmodrc.lua\"] }.each do |f|\r\n    inreplace f, \"lmod/lmod\", \"lmod\"\r\nend\r\n```\r\n\r\nwhich I've been able to reduce to this:\r\n\r\n```ruby\r\nsystem \"./configure\", \"--prefix=#{prefix}/versioned\"\r\nsystem \"make\", \"install\"\r\nprefix.install_symlink \"versioned/lmod/lmod\" => \"lmod\"\r\n```\r\n\r\nwhich is not ideal but not too bad (IMO).\r\n\r\n"}}
{"actor":{"display_login":"henryiii"}}