diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 000000000..e2598aace --- /dev/null +++ b/debian/changelog @@ -0,0 +1,358 @@ +lmod (8.7.34) unstable; urgency=medium + + * Setting TAG_VERSION to 8.7.34 + + -- Alexandre Strube Sun, 07 Jan 2024 13:30:02 +0100 + + +lmod (8.7.32) unstable; urgency=medium + + * Setting TAG_VERSION to 8.7.32 + + -- Alexandre Strube Thu, 04 Jan 2024 14:20:50 +0100 + + +lmod (8.7.31) unstable; urgency=medium + + * Setting TAG_VERSION to 8.7.31 + + -- Alexandre Strube Wed, 09 Aug 2023 19:55:37 +0200 + + +lmod (8.7.30) unstable; urgency=medium + + * Setting TAG_VERSION to 8.7.30 + + -- Alexandre Strube Sat, 22 Jul 2023 12:06:40 +0200 + + +lmod (8.7.29) unstable; urgency=medium + + * Setting TAG_VERSION to 8.7.29 + + -- Alexandre Strube Tue, 11 Jul 2023 18:43:51 +0200 + + +lmod (8.7.28) unstable; urgency=medium + + * Setting TAG_VERSION to 8.7.28 + + -- Alexandre Strube Fri, 07 Jul 2023 14:16:31 +0200 + + +lmod (8.7.27) unstable; urgency=medium + + * Setting TAG_VERSION to 8.7.27 + + -- Alexandre Strube Thu, 15 Jun 2023 13:09:27 +0200 + + +lmod (8.7.25) unstable; urgency=medium + + * Setting TAG_VERSION to 8.7.25 + + -- Alexandre Strube Fri, 19 May 2023 13:36:32 +0200 + + +lmod (8.7.24) unstable; urgency=medium + + * Setting TAG_VERSION to 8.7.24 + + -- Alexandre Strube Fri, 05 May 2023 12:05:40 +0200 + + +lmod (8.7.23) unstable; urgency=medium + + * Setting TAG_VERSION to 8.7.23 + + -- Alexandre Strube Thu, 30 Mar 2023 12:05:40 +0200 + + +lmod (8.7.22) unstable; urgency=medium + + * Setting TAG_VERSION to 8.7.22 + + -- Alexandre Strube Sun, 26 Mar 2023 17:13:41 +0200 + + +lmod (8.7.21) unstable; urgency=medium + + * Setting TAG_VERSION to 8.7.21 + + -- Alexandre Strube Sun, 26 Mar 2023 15:18:33 +0200 + + +lmod (8.7.20) unstable; urgency=medium + + * Setting TAG_VERSION to 8.7.20 + + -- Alexandre Strube Thu, 16 Mar 2023 23:55:17 +0100 + + +lmod (8.7.19) unstable; urgency=medium + + * Setting TAG_VERSION to 8.7.19 + + -- Alexandre Strube Tue, 17 Jan 2023 18:51:40 +0100 + + +lmod (8.7.18) unstable; urgency=medium + + * Setting TAG_VERSION to 8.7.18 + + -- Alexandre Strube Sun, 15 Jan 2023 19:02:48 +0100 + + +lmod (8.7.17) unstable; urgency=medium + + * Setting TAG_VERSION to 8.7.17 + + -- Alexandre Strube Fri, 13 Jan 2023 00:15:49 +0100 + + +lmod (8.7.15) unstable; urgency=medium + + * Setting TAG_VERSION to 8.7.15 + + -- Alexandre Strube Sun, 01 Jan 2023 18:09:19 +0100 + + +lmod (8.7.14) unstable; urgency=medium + + * Setting TAG_VERSION to 8.7.14 + + -- Alexandre Strube Tue, 01 Nov 2022 23:06:37 +0100 + + +lmod (8.7.13) unstable; urgency=medium + + * Setting TAG_VERSION to 8.7.13 + + -- Alexandre Strube Tue, 11 Oct 2022 22:46:18 +0200 + + +lmod (8.7.12) unstable; urgency=medium + + * Setting TAG_VERSION to 8.7.12 + + -- Alexandre Strube Mon, 05 Sep 2022 18:16:38 +0200 + + +lmod (8.7.11) unstable; urgency=medium + + * Setting TAG_VERSION to 8.7.11 + + -- Alexandre Strube Mon, 01 Aug 2022 00:04:00 +0200 + + +lmod (8.7.8) unstable; urgency=medium + + * Setting TAG_VERSION to 8.7.8 + + -- Alexandre Strube Wed, 20 Jul 2022 16:05:28 +0200 + + +lmod (8.7.7) unstable; urgency=medium + + * Setting TAG_VERSION to 8.7.7 + + -- Alexandre Strube Tue, 05 Jul 2022 17:53:46 +0200 + + +lmod (8.7.6) unstable; urgency=medium + + * Setting TAG_VERSION to 8.7.6 + + -- Alexandre Strube Mon, 27 Jun 2022 13:18:53 +0200 + + +lmod (8.7.5) unstable; urgency=medium + + * Setting TAG_VERSION to 8.7.5 + + -- Alexandre Strube Wed, 22 Jun 2022 23:16:13 +0200 + + +lmod (8.7.4) unstable; urgency=medium + + * Setting TAG_VERSION to 8.7.4 + + -- Alexandre Strube Wed, 08 Jun 2022 12:24:44 +0200 + + +lmod (8.7.3) unstable; urgency=medium + + * Setting TAG_VERSION to 8.7.3 + + -- Alexandre Strube Mon, 23 May 2022 22:14:33 +0200 + + +lmod (8.7.2) unstable; urgency=medium + + * Setting TAG_VERSION to 8.7.2 + + -- Alexandre Strube Thu, 05 May 2022 21:24:50 +0200 + + +lmod (8.7) unstable; urgency=medium + + * Setting TAG_VERSION to 8.7 + + -- Alexandre Strube Tue, 19 Apr 2022 11:20:50 +0200 + + +lmod (8.6.17) unstable; urgency=medium + + * Setting TAG_VERSION to 8.6.17 + + -- Alexandre Strube Mon, 28 Mar 2022 15:15:41 +0200 + + +lmod (8.6.15) unstable; urgency=medium + + * Setting TAG_VERSION to 8.6.15 + + -- Alexandre Strube Fri, 18 Mar 2022 09:41:24 +0100 + + +lmod (8.6.14) unstable; urgency=medium + + * Setting TAG_VERSION to 8.6.14 + + -- Alexandre Strube Sat, 26 Feb 2022 15:20:13 +0100 + + +lmod (8.6.12) unstable; urgency=medium + + * Setting TAG_VERSION to 8.6.12 + + -- Alexandre Strube Fri, 11 Feb 2022 16:34:48 +0100 + + +lmod (8.6.9) unstable; urgency=medium + + * Setting TAG_VERSION to 8.6.9 + + -- Alexandre Strube Wed, 02 Feb 2022 17:50:29 +0100 + + +lmod (8.6.8) unstable; urgency=medium + + * Setting TAG_VERSION to 8.6.8 + + -- Alexandre Strube Fri, 28 Jan 2022 17:29:00 +0100 + + +lmod (8.6.7) unstable; urgency=medium + + * Setting TAG_VERSION to 8.6.7 + + -- Alexandre Strube Thu, 27 Jan 2022 17:57:03 +0100 + + +lmod (8.6.6) unstable; urgency=medium + + * Setting TAG_VERSION to 8.6.6 + + -- Alexandre Strube Sun, 23 Jan 2022 16:39:34 +0100 + + +lmod (8.6.5) unstable; urgency=medium + + * Setting TAG_VERSION to 8.6.5 + + -- Alexandre Strube Tue, 11 Jan 2022 12:06:57 +0100 + + +lmod (8.6.4) unstable; urgency=medium + + * Setting TAG_VERSION to 8.6.4 + + -- Alexandre Strube Mon, 03 Jan 2022 13:18:38 +0100 + + +lmod (8.6.3) unstable; urgency=medium + + * Setting TAG_VERSION to 8.6.3 + + -- Alexandre Strube Sun, 02 Jan 2022 13:56:31 +0100 + + +lmod (8.6.2) unstable; urgency=medium + + * Setting TAG_VERSION to 8.6.2 + + -- Alexandre Strube Wed, 22 Dec 2021 17:18:06 +0100 + + +lmod (8.6.1) unstable; urgency=medium + + * Setting TAG_VERSION to 8.6.1 + + -- Alexandre Strube Wed, 10 nov 2020 18:35:00 +0100 + + +lmod (8.5.25) unstable; urgency=medium + + * New version after 4 years + * New maintainer + + -- Alexandre Strube Wed, 10 nov 2020 18:35:00 +0100 + +lmod (6.6-0.3) unstable; urgency=medium + + * Non-maintainer upload. + * Pass PS=/bin/ps to configure (Closes: #915304) + - fixes reproducible build on merged-usr vs non-merged systems + + -- Andreas Henriksson Sun, 02 Dec 2018 18:06:51 +0100 + +lmod (6.6-0.2) unstable; urgency=medium + + * Non-maintainer upload. + * Conflict with environment-modules. (Closes: #846580) + + -- Christian Hofstaedtler Thu, 22 Dec 2016 06:49:08 +0000 + +lmod (6.6-0.1) unstable; urgency=medium + + * Non-maintainer upload. + * New upstream release. (Closes: #793355) + * Refresh patch change_paths + * Update debhelper compatibility 9. + * Install README.md, it has been renamed from README. + * Add build-depends on procps. + * Add build-depends and depends on tcl. + * Update Standars-Version to 3.9.8, no changes required. + * Update lintian overrides. + * Make lmod to behave like environment-modules: + - Allow to configure the list of modules path at /etc/lmod/modulespath + - Install /etc/profile.d/lmod.sh and read MODULESPATH from + /etc/lmod/modulespath + + -- Ana Beatriz Guerrero Lopez Fri, 11 Nov 2016 23:37:24 +0100 + +lmod (5.8-1) unstable; urgency=medium + + * Imported Upstream version 5.8 (Closes: #764722) + * updated path patch for version 5.8 + * removed watch file (not working with SF.net) + * change standards version to 3.9.5 + * add short licensetext + + -- Aaron Zauner Tue, 04 Nov 2014 16:45:19 -0600 + +lmod (5.6.2-1) unstable; urgency=medium + + * Imported Upstream version 5.6.2 + * Added autopkgtest tests (loading) + * Generalized lintian ignores + * Updated Makefile patch + + -- Aaron Zauner Sat, 07 Jun 2014 17:57:30 -0500 + +lmod (5.5.1-1) unstable; urgency=medium + + * Initial release (Closes: #743823) + + -- Aaron Zauner Wed, 21 May 2014 00:05:23 -0600 diff --git a/debian/compat b/debian/compat new file mode 100644 index 000000000..ec635144f --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +9 diff --git a/debian/control b/debian/control new file mode 100644 index 000000000..7ddf89a54 --- /dev/null +++ b/debian/control @@ -0,0 +1,37 @@ +Source: lmod +Section: devel +Priority: optional +Maintainer: Alexandre Strube +Build-Depends: autotools-dev, + debhelper (>= 9), + lua-filesystem, + lua-json, + lua-posix, + lua-term, + lua5.3, + procps, + tcl, + tcl-dev, + liblua5.3-dev +Standards-Version: 3.9.8 +Homepage: https://www.tacc.utexas.edu/tacc-projects/lmod +Vcs-Git: git:://github.com/TACC/Lmod.git +Vcs-Browser: https://github.com/TACC/Lmod + +Package: lmod +Architecture: all +Depends: lua-filesystem, + lua-json, + lua-posix, + lua-term, + lua5.3, + tcl, + ${misc:Depends} +Conflicts: environment-modules +Description: Lua based environment modules + Lmod is a Lua based module system that easily handles the MODULEPATH + Hierarchical problem. Environment Modules provide a convenient way to + dynamically change the users' environment through modulefiles. This + includes easily adding or removing directories to the PATH environment + variable. Modulefiles for Library packages provide environment variables + that specify where the library and header files can be found. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 000000000..c6612024d --- /dev/null +++ b/debian/copyright @@ -0,0 +1,91 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: lmod +Source: http://sourceforge.net/projects/lmod/ + +Files: * +Copyright: 2008-2014 Robert McLay +License: MIT + +Files: tools/base64.lua +Copyright: 2006-2008 Alex Kloss +License: LGPL-2 + +Files: tools/json.lua +Copyright: 2005-2009 Craig Mason-Jones +License: MIT + +Files: tools/deepcopy.lua +Copyright: 2012 Declan White +License: MIT + +Files: pkgs/term/* +Copyright: 2009 Rob Hoelz +License: MIT + +Files: contrib/converting_shell_to_module_files/env2 +Copyright: 2003-2008 David C Black +License: Apache + +Files: configure +Copyright: 1992-1996, 1998-2012 Free Software Foundation, Inc. +License: configure + This configure script is free software; the Free Software Foundation + gives unlimited permission to copy, distribute and modify it. + +Files: debian/* +Copyright: 2021 Alexandre Strube +License: MIT + +License: MIT + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + . + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + . + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + +License: LGPL-2 + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + . + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + . + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + . + On Debian systems, the full text of the GNU Library General + Public License version 2 can be found in the file + `/usr/share/common-licenses/LGPL-2'. + +License: Apache + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this software except in compliance with the License. + You may obtain a copy of the License at + . + http://www.apache.org/licenses/LICENSE-2.0 + . + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + . + On Debian systems, the full text of the Apache License, Version 2.0 can be + found in the file `/usr/share/common-licenses/Apache-2.0'. diff --git a/debian/dirs b/debian/dirs new file mode 100644 index 000000000..11d2a71aa --- /dev/null +++ b/debian/dirs @@ -0,0 +1,3 @@ +etc/lmod +etc/lmod/modules +etc/profile.d diff --git a/debian/docs b/debian/docs new file mode 100644 index 000000000..5ab925900 --- /dev/null +++ b/debian/docs @@ -0,0 +1,2 @@ +README.md +README_lua_modulefiles.txt diff --git a/debian/files b/debian/files new file mode 100644 index 000000000..8f0f33588 --- /dev/null +++ b/debian/files @@ -0,0 +1,2 @@ +lmod_8.7.34_all.deb devel optional +lmod_8.7.34_amd64.buildinfo devel optional diff --git a/debian/gbp.conf b/debian/gbp.conf new file mode 100644 index 000000000..eafd4a571 --- /dev/null +++ b/debian/gbp.conf @@ -0,0 +1,2 @@ +[DEFAULT] +pristine-tar=true diff --git a/debian/lmod.lintian-overrides b/debian/lmod.lintian-overrides new file mode 100644 index 000000000..ddab3216c --- /dev/null +++ b/debian/lmod.lintian-overrides @@ -0,0 +1,10 @@ +# these are optional language support files +lmod: csh-considered-harmful usr/share/lmod/*/init/csh +lmod: missing-dep-for-interpreter csh => tcsh | csh | c-shell (usr/share/lmod/*/init/csh) +lmod: csh-considered-harmful usr/share/lmod/*/init/cshrc +lmod: missing-dep-for-interpreter csh => tcsh | csh | c-shell (usr/share/lmod/*/init/cshrc) +lmod: csh-considered-harmful usr/share/lmod/*/init/tcsh +lmod: missing-dep-for-interpreter csh => tcsh | csh | c-shell (usr/share/lmod/*/init/tcsh) +lmod: executable-not-elf-or-script usr/share/lmod/*/init/perl +lmod: script-not-executable usr/share/lmod/6.6/libexec/ignore_dirs_converter +lmod: executable-not-elf-or-script usr/share/lmod/6.6/init/r diff --git a/debian/lmod.substvars b/debian/lmod.substvars new file mode 100644 index 000000000..978fc8b5a --- /dev/null +++ b/debian/lmod.substvars @@ -0,0 +1,2 @@ +misc:Depends= +misc:Pre-Depends= diff --git a/debian/modulespath b/debian/modulespath new file mode 100644 index 000000000..9084cc6cf --- /dev/null +++ b/debian/modulespath @@ -0,0 +1,8 @@ +# +# This file defines the initial setup for the module files search path. +# Comments must begin with # and continue until the end of the line. +# Each line containing a single path will be added to the MODULEPATH +# environment variable. +# +/etc/lmod/modules +/usr/share/lmod/lmod/modulefiles/ diff --git a/debian/patches/change_paths b/debian/patches/change_paths new file mode 100644 index 000000000..f50f410d2 --- /dev/null +++ b/debian/patches/change_paths @@ -0,0 +1,27 @@ +--- a/Makefile.in ++++ b/Makefile.in +@@ -60,15 +60,15 @@ + prefix := @prefix@ + package := lmod + version := $(shell cd $(srcdir)/src; $(PATH_TO_LUA)/lua -e "V=require('Version'); print(V.tag())") +-PKGV := $(prefix)/$(package)/$(version) +-PKG := $(prefix)/$(package)/$(package) +-LIBEXEC := $(prefix)/$(package)/$(version)/libexec +-SHELLS := $(prefix)/$(package)/$(version)/shells +-TOOLS := $(prefix)/$(package)/$(version)/tools +-SETTARG := $(prefix)/$(package)/$(version)/settarg +-INIT := $(prefix)/$(package)/$(version)/init +-LMOD_MF := $(prefix)/$(package)/$(version)/modulefiles/Core +-MAN_PAGES := $(prefix)/$(package)/$(version)/share/man/cat1 ++PKGV := $(prefix)/share/$(package)/$(version) ++PKG := $(prefix)/share/$(package)/$(package) ++LIBEXEC := $(prefix)/share/$(package)/$(version)/libexec ++SHELLS := $(prefix)/share/$(package)/$(version)/shells ++TOOLS := $(prefix)/share/$(package)/$(version)/tools ++SETTARG := $(prefix)/share/$(package)/$(version)/settarg ++INIT := $(prefix)/share/$(package)/$(version)/init ++LMOD_MF := $(prefix)/share/$(package)/$(version)/modulefiles/Core ++MAN_PAGES := $(prefix)/share/man/man1 + LMOD_MF_SOURCE := $(patsubst %, $(srcdir)/%, MF/*.version.lua) + SETTARG_SOURCE := $(patsubst %, $(srcdir)/%, settarg/*.lua settarg/targ.in) + diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 000000000..81bdbafec --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,2 @@ +change_paths +set_modulespath diff --git a/debian/patches/set_modulespath b/debian/patches/set_modulespath new file mode 100644 index 000000000..af48c570e --- /dev/null +++ b/debian/patches/set_modulespath @@ -0,0 +1,18 @@ +This patch makes MODULEPATH to be set with the contents of the file +/etc/lmod/modulespath + +Date: 2016-11-10 +Author: Ana Guerrero López +--- a/init/profile.in ++++ b/init/profile.in +@@ -23,8 +23,8 @@ + export LMOD_FULL_SETTARG_SUPPORT=@lmod_full_settarg_support@ + export LMOD_COLORIZE=@colorize@ + export LMOD_PREPEND_BLOCK=@prepend_block@ +- export MODULEPATH=$(@PKG@/libexec/addto --append MODULEPATH $MODULEPATH_ROOT/$LMOD_sys $MODULEPATH_ROOT/Core) +- export MODULEPATH=$(@PKG@/libexec/addto --append MODULEPATH @PKG@/modulefiles/Core) ++ MODULEPATH=`sed -n 's/[ #].*$//; /./H; $ { x; s/^\n//; s/\n/:/g; p; }' /etc/lmod/modulespath` ++ export MODULEPATH + export MODULESHOME=@PKG@ + + export BASH_ENV=$MODULESHOME/init/bash diff --git a/debian/rules b/debian/rules new file mode 100755 index 000000000..90c331ed1 --- /dev/null +++ b/debian/rules @@ -0,0 +1,25 @@ +#!/usr/bin/make -f +# -*- makefile -*- + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +TDIR=debian/lmod + + +%: + dh $@ --with autotools-dev + +override_dh_auto_configure: + dh_auto_configure -- \ + --with-mode=0755 \ + PS=/bin/ps + +override_dh_auto_test: + +override_dh_pysupport: + +override_dh_auto_install: + dh_auto_install + cp ${TDIR}/usr/lmod/lmod/init/profile ${TDIR}/etc/profile.d/lmod.sh + cp debian/modulespath ${TDIR}/etc/lmod/ diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 000000000..163aaf8d8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debian/tests/control b/debian/tests/control new file mode 100644 index 000000000..8a6553905 --- /dev/null +++ b/debian/tests/control @@ -0,0 +1,2 @@ +Tests: load-test +Restrictions: allow-stderr diff --git a/debian/tests/load-test b/debian/tests/load-test new file mode 100755 index 000000000..733cf5bd5 --- /dev/null +++ b/debian/tests/load-test @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +source /usr/share/lmod/lmod/init/bash +module -h diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 000000000..f9f4101e0 --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,53 @@ +FROM debian:12 + +# Optionally, add incoming to sources.list +#RUN echo 'deb http://incoming.debian.org/debian-buildd buildd-unstable main contrib non-free' > /etc/apt/sources.list.d/incoming.list + +# Add deb-src to sources.list +RUN find /etc/apt/sources.list* -type f -exec sed -i 'p; s/^deb /deb-src /' '{}' + + +# Install developer tools +RUN apt-get update \ + && apt-get install --no-install-recommends -yV \ + apt-utils \ + build-essential \ + devscripts \ + equivs \ + devscripts \ + autoconf \ + automake \ + autopoint \ + autotools-dev \ + debhelper \ + dh-autoreconf \ + dh-strip-nondeterminism \ + dwz \ + libdebhelper-perl \ + libfile-stripnondeterminism-perl \ + libsub-override-perl \ + libtool \ + po-debconf \ + quilt \ + tcl-dev \ + liblua5.3-dev \ + git \ + nano \ + lua-filesystem \ + lua-json \ + lua-posix \ + lua-term \ + lua5.3 \ + procps \ + bc + + +RUN mkdir /tmp/git-repo; cd /tmp/git-repo ; \ + git clone https://github.com/surak/Lmod.git ; \ + cd Lmod ; \ + git fetch --tags; \ + git checkout tags/8.7.34 ; \ + git checkout origin/debian debian docker ; \ + cd Lmod ; debuild -b -uc -us; \ + cd .. ; dpkg -i ./lmod_8.7.34_all.deb ; \ + bash -c "source /etc/profile.d/lmod.sh; module --version" + diff --git a/docker/build.sh b/docker/build.sh new file mode 100755 index 000000000..d0bb8a500 --- /dev/null +++ b/docker/build.sh @@ -0,0 +1,60 @@ +#!/bin/bash + +# update master branch, just to keep it up with upstream +git checkout debian +git pull upstream master +git push + +# Get latest tags from upstream. Github UI is not enough +git fetch upstream --tags +git push --tags + +VERSION=$(git describe --tags `git rev-list --tags --max-count=1`) +echo "Version is $VERSION" + +if head -n1 ../debian/changelog | grep $VERSION ; then + echo "Latest version. I should not do a thing" +else + echo "It's not the latest version. Adding a new tag to changelog" + +### Adding a new changelog entry. Yes, I use ex + + ex ../debian/changelog << EOM +1 insert +lmod ($VERSION) unstable; urgency=medium + + * Setting TAG_VERSION to $VERSION + + -- Alexandre Strube $(date -R) + + +. +xit +EOM + +### Adding the filenames to debian/files with correct version + + cat > ../debian/files << EOM +lmod_${VERSION}_all.deb devel optional +lmod_${VERSION}_amd64.buildinfo devel optional +EOM + +### Adding right version to dockerfile . The '' is because of the bsd version of sed. +sed -i '' "s/git checkout tags.*/git checkout tags\/$VERSION \; \\\ /g" Dockerfile +sed -i '' "s/lmod_.*/lmod_${VERSION}_all.deb ; \\\ /g" Dockerfile + +### The container will fetch those from github, so they better be updated +git add ../debian/files ../debian/changelog Dockerfile +git commit -m "Added tag ${VERSION}" +git push + +# Build a docker image, calling Dockerfile from here. It clones this repo, checks out +# the latest tag, builds the debian package inside, creates a container from such +# image, copies the file out and deletes the container (not the image) +docker build -t debian . +docker create --name deb debian +docker cp deb:/tmp/git-repo/lmod_${VERSION}_all.deb . +docker rm deb + +echo "To run this image: docker run --rm -it --name deb debian /bin/bash \nTo cleanup the cache: docker builder prune -a -f " +fi