TACC / Lmod

Lmod: An Environment Module System based on Lua, Reads TCL Modules, Supports a Software Hierarchy
http://lmod.readthedocs.org
Other
489 stars 126 forks source link

Debian and docker build #683

Closed surak closed 8 months ago

surak commented 8 months ago

As spoken at SC' 2023, this adds the necessary files for generating a Debian package in the debian/ directory.

It also has a docker/ directory which creates the .deb package inside a debian docker image. It was done this way so one can generate the Debian package always in a clean environment, and from non-debian machines (My workstation right now is a mac).

The workflow is simple:

cd docker
./build.sh

After a minute or two, there's a deb file with the latest tag from the "upstream" - in my case, set to https://github.com/TACC/Lmod.git.

This might need some adjustment in the docker file as it expects at least a branch called debian with the debian and docker directories to build itself there. Once this is on the master branch, this part is unnecessary.

I am talking about this: https://github.com/surak/Lmod/blob/4986506b836dfa9b6767f692830ecb907f864766/docker/Dockerfile#L44

rtmclay commented 8 months ago

Thanks for the patch! Best Robert

wpoely86 commented 8 months ago

I'm not familiar with the build process for debs but could we let this run as a github actions too @surak ?

surak commented 8 months ago

I don’t see why not. The dockerfile should work. The only thing it does is to install the dependencies for building a package, clone Lmod, switch to the right tag, compile it with the Debian package maker, and the scirpt copies the deb file out of the container