From unknown Mon Aug 18 17:56:11 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#49456] [PATCH] gnu: add environment-modules Resent-From: Ivan Gankevich Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 07 Jul 2021 09:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 49456 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49456@debbugs.gnu.org Cc: Ivan Gankevich X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.162564842114503 (code B ref -1); Wed, 07 Jul 2021 09:01:01 +0000 Received: (at submit) by debbugs.gnu.org; 7 Jul 2021 09:00:21 +0000 Received: from localhost ([127.0.0.1]:50842 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m13Po-0003lr-JM for submit@debbugs.gnu.org; Wed, 07 Jul 2021 05:00:20 -0400 Received: from lists.gnu.org ([209.51.188.17]:53988) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m13Pn-0003lj-4w for submit@debbugs.gnu.org; Wed, 07 Jul 2021 05:00:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60530) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m13Pl-0002TK-N9 for guix-patches@gnu.org; Wed, 07 Jul 2021 05:00:17 -0400 Received: from mail.spbu.ru ([195.70.197.23]:41468 helo=cgp2.pu.ru) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1m13Pe-0007ta-8C for guix-patches@gnu.org; Wed, 07 Jul 2021 05:00:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=simple/simple; d=spbu.ru; s=20180812; bh=qrN4/1Vnq4zKIICePkD7YfdwKnKrbNBda3wl3MM93Kc=; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject:Cc:To:From; b=wbZLzI2BWm1aCPJ/ysRY6zrDdNgv0V4DiiSTMjGiCKoMkPC+nwAT4wbyMgqhi7MNRpilXauRlq JZLdPxVk9tsM5lWll7/vA/kTqK7JJVQ0vH9V5jIPFmzZwtbGDsT+ZmjnjmKARVTCjKCC/I7/KElTo 8bWnyITpju5OYfnGMDDHWA+t18/RqBlAfGxiO+k81uoPL92e+DrFVKeG5/gPEtlFCgcS0o5Vze/G6 2KtuzwEpGOidMwmYt4voUKt3FwpbDgh1mMt35yoMPODofpavX3zaazQZlZ/H4f/ihLRmr3Hfsoo7w TqvtSnM9zuAVL4bUsfh4bG2rCTkBgZ7ZJpyKw== Received: from [172.27.221.159] (account st018947@spbu.ru HELO surge.ws.pu.ru) by spbu.ru (CommuniGate Pro SMTP 6.2.15) with ESMTPSA id 169995947; Wed, 07 Jul 2021 12:00:05 +0300 From: Ivan Gankevich Date: Wed, 7 Jul 2021 11:59:33 +0300 Message-Id: <20210707085932.20751-1-i.gankevich@spbu.ru> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=195.70.197.23; envelope-from=i.gankevich@spbu.ru; helo=cgp2.pu.ru X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --- gnu/packages/parallel.scm | 64 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/gnu/packages/parallel.scm b/gnu/packages/parallel.scm index 42826f49d6..f07ce02d33 100644 --- a/gnu/packages/parallel.scm +++ b/gnu/packages/parallel.scm @@ -41,8 +41,10 @@ #:use-module (gnu packages admin) #:use-module (gnu packages autotools) #:use-module (gnu packages base) + #:use-module (gnu packages dejagnu) #:use-module (gnu packages flex) #:use-module (gnu packages freeipmi) + #:use-module (gnu packages less) #:use-module (gnu packages linux) #:use-module (gnu packages mpi) #:use-module (gnu packages perl) @@ -378,3 +380,65 @@ and output captured in the notebook. Whatever arguments are accepted by a SLURM command line executable are also accepted by the corresponding magic command---e.g., @code{%salloc}, @code{%sbatch}, etc.") (license license:bsd-3)))) + +(define-public environment-modules + (package + (name "environment-modules") + (version "4.7.1") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/modules/Modules/modules-" + version "/modules-" version ".tar.bz2")) + (sha256 (base32 "07r03vqskjxyjy5m2b6p2px42djnd2z1k4b5j9dxqv8prin01ax6")))) + (build-system gnu-build-system) + (arguments + `(#:configure-flags + (list (string-append "--with-bin-search-path=" + (assoc-ref %build-inputs "tcl") "/bin" ":" + (assoc-ref %build-inputs "procps") "/bin" ":" + (assoc-ref %build-inputs "less") "/bin" ":" + (assoc-ref %build-inputs "coreutils") "/bin") + (string-append "--with-tcl=" (assoc-ref %build-inputs "tcl") "/lib") + "--disable-compat-version") + #:test-target "test" + #:phases + (modify-phases %standard-phases + (add-before 'configure 'patch-scripts-for-python-3 + (lambda _ + ;; patch the script for python-3 + (substitute* "script/createmodule.py.in" + (("pathkeys.sort\\(\\)") "pathkeys = sorted(pathkeys)") + (("print\\(\"\\\\t\"\\*") "print(\"\\t\"*int") + (("@PYTHON@") (which "python3"))) + #t)) + (add-after 'configure 'patch-/bin/sh-in-tests + (lambda _ + (for-each + (lambda (file) + (substitute* file + (("/bin/sh") (which "bash")) + ;; For some reason "kvm" group cannot be resolved for + ;; "nixbld" user. We remove "-n" switch here to not + ;; resolve the groups at all. + (("exec id -G -n -z") "exec id -G -z") + (("exec id -G -n") "exec id -G") + )) + '("testsuite/modules.00-init/005-init_ts.exp" + "testsuite/install.00-init/005-init_ts.exp")) + #t))))) + (native-inputs + `(("dejagnu" ,dejagnu) + ("autoconf" ,autoconf) + ("which" ,which))) + (inputs + `(("tcl" ,tcl) + ("less" ,less) + ("procps" ,procps) + ("coreutils" ,coreutils) + ("python" ,python-3))) + (home-page "http://modules.sourceforge.net/") + (synopsis "Shell environment variables and aliases management") + (description "A tool that simplify shell initialization and lets users +easily modify their environment during the session with modulefiles.") + (license license:gpl2+))) -- 2.32.0 From unknown Mon Aug 18 17:56:11 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#49456] [PATCH] gnu: add environment-modules Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 20 Jul 2021 20:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49456 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ivan Gankevich Cc: 49456@debbugs.gnu.org Received: via spool by 49456-submit@debbugs.gnu.org id=B49456.16268133058348 (code B ref 49456); Tue, 20 Jul 2021 20:36:01 +0000 Received: (at 49456) by debbugs.gnu.org; 20 Jul 2021 20:35:05 +0000 Received: from localhost ([127.0.0.1]:35489 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5wSH-0002AZ-Bn for submit@debbugs.gnu.org; Tue, 20 Jul 2021 16:35:05 -0400 Received: from eggs.gnu.org ([209.51.188.92]:38540) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5wSF-0002A1-Gd for 49456@debbugs.gnu.org; Tue, 20 Jul 2021 16:35:04 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:57988) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m5wS9-0000Cy-GJ; Tue, 20 Jul 2021 16:34:57 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=45234 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m5wS9-0003QK-8T; Tue, 20 Jul 2021 16:34:57 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20210707085932.20751-1-i.gankevich@spbu.ru> Date: Tue, 20 Jul 2021 22:34:55 +0200 In-Reply-To: <20210707085932.20751-1-i.gankevich@spbu.ru> (Ivan Gankevich's message of "Wed, 7 Jul 2021 11:59:33 +0300") Message-ID: <87o8awk9lc.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hello, Nice! Overall LGTM, modulo cosmetic issues described below. Ivan Gankevich skribis: > +++ b/gnu/packages/parallel.scm How about =E2=80=98package-management.scm=E2=80=99 instead? You probably need to add a copyright line for you too. > +(define-public environment-modules > + (package > + (name "environment-modules") Should the package name be =E2=80=9Cmodules=E2=80=9D, since that=E2=80=99s = the name that upstream seems to be using? > + (add-before 'configure 'patch-scripts-for-python-3 > + (lambda _ > + ;; patch the script for python-3 Nitpick: please capitalize sentences and end with a period. > + (substitute* "script/createmodule.py.in" > + (("pathkeys.sort\\(\\)") "pathkeys =3D sorted(pathkeys)") > + (("print\\(\"\\\\t\"\\*") "print(\"\\t\"*int") > + (("@PYTHON@") (which "python3"))) > + #t)) You can omit the trailing #t (here and elsewhere). > + (add-after 'configure 'patch-/bin/sh-in-tests > + (lambda _ > + (for-each > + (lambda (file) > + (substitute* file > + (("/bin/sh") (which "bash")) > + ;; For some reason "kvm" group cannot be resolved for > + ;; "nixbld" user. We remove "-n" switch here to not > + ;; resolve the groups at all. > + (("exec id -G -n -z") "exec id -G -z") > + (("exec id -G -n") "exec id -G") Is this change made for tests? In the build environment, the build user is potentially in the =E2=80=9Ckvm=E2=80=9D group if it exists, but indeed,= /etc/group lacks =E2=80=9Ckvm=E2=80=9D (see nix/libstore/build.cc:1777). Should a post-check phase reinstate =E2=80=98-n=E2=80=99? > + )) Consider moving the parents on the previous line, as =E2=80=98guix lint=E2= =80=99 suggests. :-) > + (synopsis "Shell environment variables and aliases management") > + (description "A tool that simplify shell initialization and lets use= rs > +easily modify their environment during the session with modulefiles.") Please write full sentences for the description. Could you send an updated patch? Bonus points if you can provide a commit log that follows our conventions. :-) https://guix.gnu.org/manual/en/html_node/Submitting-Patches.html Thanks! Ludo=E2=80=99. From unknown Mon Aug 18 17:56:11 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#49456] [PATCH] gnu: Add modules. References: <20210707085932.20751-1-i.gankevich@spbu.ru> In-Reply-To: <20210707085932.20751-1-i.gankevich@spbu.ru> Resent-From: Ivan Gankevich Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 21 Jul 2021 12:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49456 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49456@debbugs.gnu.org Cc: Ivan Gankevich Received: via spool by 49456-submit@debbugs.gnu.org id=B49456.162687149929867 (code B ref 49456); Wed, 21 Jul 2021 12:45:02 +0000 Received: (at 49456) by debbugs.gnu.org; 21 Jul 2021 12:44:59 +0000 Received: from localhost ([127.0.0.1]:36406 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6Bas-0007lf-J1 for submit@debbugs.gnu.org; Wed, 21 Jul 2021 08:44:59 -0400 Received: from mail.spbu.ru ([195.70.197.23]:52895 helo=cgp2.pu.ru) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6Bap-0007lM-9z for 49456@debbugs.gnu.org; Wed, 21 Jul 2021 08:44:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=simple/simple; d=spbu.ru; s=20180812; bh=jiLef6AvnR1o83uZVDfj9wDpjuPKmSbI78gU3xdujBM=; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-Id:Date:Subject :Cc:To:From; b=Ndv1xaKDvWuO+C9DlOKrfwW1qA1vy5o8YWGxJ0Lbg23iRUqrzg+i7khCjUECCv AE4mH4y2jkWFqz0q0UDusWqj6DpxSi44tdk1wBsAybtbpBPbXVWvYg0f3wfIHmSEHTecUODcGq8Ll KXJuAWdYwwFCAivIUnZttinY1v5ao/Gfx3siD72BrYke3lV7+dUKasN2IOd9uJBydmtZ8V2I9ayOT do07ZHE7HuLuDj9AQhQWZgFkZJ1VRaL9yVGXurR01g0WwJAy5gOqo/lsuphQiTY6xo2bUxTU8qNHW ijw/ybSOZkqdPBDAdVlij7BHAKJ8oOc0mx33fvLWE6ZdDG0Gw== Received: from [172.27.221.159] (account st018947@spbu.ru HELO localhost.localdomain) by spbu.ru (CommuniGate Pro SMTP 6.2.15) with ESMTPSA id 173233908; Wed, 21 Jul 2021 15:44:47 +0300 From: Ivan Gankevich Date: Wed, 21 Jul 2021 15:27:38 +0300 Message-Id: <20210721122736.17604-1-i.gankevich@spbu.ru> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/packages/package-management.scm (modules): New variable. --- gnu/packages/package-management.scm | 109 ++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm index c2c7846630..d3dc8e593b 100644 --- a/gnu/packages/package-management.scm +++ b/gnu/packages/package-management.scm @@ -17,6 +17,7 @@ ;;; Copyright © 2020 Jesse Gibbons ;;; Copyright © 2020 Martin Becze ;;; Copyright © 2020 Vincent Legoll +;;; Copyright © 2021 Ivan Gankevich ;;; ;;; This file is part of GNU Guix. ;;; @@ -52,6 +53,7 @@ #:use-module (gnu packages crypto) #:use-module (gnu packages curl) #:use-module (gnu packages databases) + #:use-module (gnu packages dejagnu) #:use-module (gnu packages dbm) #:use-module (gnu packages docbook) #:use-module (gnu packages file) @@ -64,6 +66,7 @@ #:use-module (gnu packages guile) #:use-module (gnu packages guile-xyz) #:use-module (gnu packages hurd) + #:use-module (gnu packages less) #:use-module (gnu packages libedit) #:use-module (gnu packages linux) #:use-module (gnu packages lisp) @@ -83,6 +86,7 @@ #:use-module (gnu packages serialization) #:use-module (gnu packages sqlite) #:use-module (gnu packages ssh) + #:use-module (gnu packages tcl) #:use-module (gnu packages texinfo) #:use-module (gnu packages time) #:use-module (gnu packages tls) @@ -1494,3 +1498,108 @@ It is mainly meant for programmers who develop portable programs or libraries in but could potentially work for end-users of those programs. It also has a translator from R7RS, which allows most R7RS code to run on R6RS implementations.") (license license:gpl3+))) + +(define-public modules + (package + (name "modules") + (version "4.8.0") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/modules/Modules/modules-" + version "/modules-" version ".tar.bz2")) + (sha256 (base32 "1amz8qdqbvfdc8jv0j4720vywbz2gi7l3sr1lh37ilfbxy9lq9g9")))) + (build-system gnu-build-system) + (arguments + `(#:configure-flags + (list (string-append "--with-bin-search-path=" + (assoc-ref %build-inputs "tcl") "/bin" ":" + (assoc-ref %build-inputs "procps") "/bin" ":" + (assoc-ref %build-inputs "less") "/bin" ":" + (assoc-ref %build-inputs "coreutils") "/bin") + (string-append "--with-tcl=" (assoc-ref %build-inputs "tcl") "/lib") + "--disable-compat-version") + #:test-target "test" + #:phases + (modify-phases %standard-phases + (add-before 'configure 'patch-scripts-for-python-3 + (lambda _ + ;; Patch the script for python-3. + (substitute* "script/createmodule.py.in" + (("pathkeys.sort\\(\\)") "pathkeys = sorted(pathkeys)") + (("print\\(\"\\\\t\"\\*") "print(\"\\t\"*int") + (("@PYTHON@") (which "python3"))))) + (add-before 'check 'patch-/bin/sh-and-nixbld-groups-in-tests + (lambda _ + (use-modules (srfi srfi-1)) + (let* ((groups-file (string-append (getcwd) "/nixbld-groups")) + (groups-file-z (string-append groups-file "-z")) + (nixbld-groups + (fold + (lambda (id prev) + (catch #t + (lambda () (cons (group:name (getgrnam id)) prev)) + (lambda _ prev))) + '() + (vector->list (getgroups))))) + ;; Simulate "id -G -n" command output. + (call-with-output-file groups-file + (lambda (port) + (display (string-join nixbld-groups " ") port) + (display #\newline port))) + ;; Simulate "id -G -n -z" command output. + (call-with-output-file groups-file-z + (lambda (port) + (for-each + (lambda (group-name) + (display group-name port) + (display #\null port)) + nixbld-groups))) + ;; Generate "modulecmd-test.tcl" before running "make test". + (invoke "make" "modulecmd-test.tcl") + ;; Substitute shell. + (substitute* + '("modulecmd-test.tcl" + "modulecmd.tcl" + "testsuite/modules.70-maint/380-edit.exp" + "compat/init/filter") + (("/bin/sh") (which "sh"))) + ;; Skip tests that use supplementary groups. + (for-each + delete-file + '("testsuite/modules.20-locate/112-hide-user-group.exp" + "testsuite/modules.20-locate/117-forbid-user-group.exp" + "testsuite/modules.20-locate/119-hide-cascading.exp" + "testsuite/modules.50-cmds/140-system.exp" + "testsuite/modules.50-cmds/287-info-usergroups.exp" + "testsuite/modules.50-cmds/440-module-tag.exp" + "testsuite/modules.70-maint/220-config.exp")) + (for-each + (lambda (file) + (substitute* file + (("/bin/sh") (which "bash")) + ;; For some reason "kvm" group cannot be resolved for + ;; "nixbld" user. We replace "id ..." commands with + ;; "cat ..." that simulates them. + (("exec id -G -n -z") (string-append "exec cat " groups-file-z)) + (("exec id -G -n") (string-append "exec cat " groups-file)))) + '("testsuite/modules.00-init/005-init_ts.exp" + "testsuite/install.00-init/005-init_ts.exp" + "modulecmd-test.tcl")))))))) + (native-inputs + `(("dejagnu" ,dejagnu) + ("autoconf" ,autoconf) + ("which" ,which))) + (inputs + `(("tcl" ,tcl) + ("less" ,less) + ("procps" ,procps) + ("coreutils" ,coreutils) + ("python" ,python-3))) + (home-page "http://modules.sourceforge.net/") + (synopsis "Shell environment variables and aliases management") + (description "Modules simplify shell initialization and let users +modify their environment during the session with modulefiles. Modules are +used on high-performance clusters to dynamically add and remove paths +to specific versions of applications.") + (license license:gpl2+))) -- 2.32.0 From unknown Mon Aug 18 17:56:11 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#49456] [PATCH] gnu: add environment-modules Resent-From: Ivan Gankevich Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 21 Jul 2021 12:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49456 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 49456@debbugs.gnu.org Received: via spool by 49456-submit@debbugs.gnu.org id=B49456.162687161530133 (code B ref 49456); Wed, 21 Jul 2021 12:47:02 +0000 Received: (at 49456) by debbugs.gnu.org; 21 Jul 2021 12:46:55 +0000 Received: from localhost ([127.0.0.1]:36417 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6Bcl-0007px-Cw for submit@debbugs.gnu.org; Wed, 21 Jul 2021 08:46:55 -0400 Received: from mail.spbu.ru ([195.70.197.23]:36499 helo=cgp2.pu.ru) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6Bcj-0007pe-HG for 49456@debbugs.gnu.org; Wed, 21 Jul 2021 08:46:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=simple/simple; d=spbu.ru; s=20180812; bh=R2u/Z99zY+siZa8UhCgUukVUpIr2ed/CZWaOfz/JI3M=; h=In-Reply-To:Content-Transfer-Encoding:Content-Disposition:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; b=lskNpjmMVvWUDUp /zg571UrkMiKqK2dtoCqKb95R11A+DzM0gHjLve3uMMA0gnUoKysZrH8AxRLbv+0xv/HMV5MAYv7Y +fPx2qlfZX0CEzSHuFPjAfcun2Irq8LQP/L9Q/StwiiLdRIbQOxhjlNE6e7dlVJFNrb9irOfHJDSg 3tWfPILHbTSBGNMNhSatHzF/6dXk7DIK0iOvWOBaA5pa6WI4DMltKYXYCTpx7C8YUy3tNmxqqc8zK jt5dWi/4rWdslt8VrOy7PByCtrENdnZQ09krIsISv4f+LYXXDQ/j5etLT7xzrsyO9y5gFjO02g0fk rSU3NOoWEQvqI2EcVzg== Received: from [172.27.221.159] (account st018947@spbu.ru HELO localhost) by spbu.ru (CommuniGate Pro SMTP 6.2.15) with ESMTPSA id 173234356; Wed, 21 Jul 2021 15:46:47 +0300 Date: Wed, 21 Jul 2021 15:46:47 +0300 From: Ivan Gankevich Message-ID: References: <20210707085932.20751-1-i.gankevich@spbu.ru> <87o8awk9lc.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87o8awk9lc.fsf@gnu.org> X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> +++ b/gnu/packages/parallel.scm > >How about ‘package-management.scm’ instead? > >You probably need to add a copyright line for you too. Moved to ‘package-management.scm’, added copyright line. >> +(define-public environment-modules >> + (package >> + (name "environment-modules") > >Should the package name be “modules”, since that’s the name that >upstream seems to be using? Renamed to “modules”. >> + (add-after 'configure 'patch-/bin/sh-in-tests >> + (lambda _ >> + (for-each >> + (lambda (file) >> + (substitute* file >> + (("/bin/sh") (which "bash")) >> + ;; For some reason "kvm" group cannot be resolved for >> + ;; "nixbld" user. We remove "-n" switch here to not >> + ;; resolve the groups at all. >> + (("exec id -G -n -z") "exec id -G -z") >> + (("exec id -G -n") "exec id -G") > >Is this change made for tests? In the build environment, the build user >is potentially in the “kvm” group if it exists, but indeed, /etc/group >lacks “kvm” (see nix/libstore/build.cc:1777). > >Should a post-check phase reinstate ‘-n’? This change is needed for tests only, main programme uses different configuration. I have updated to the version 4.8.0 and unfortunately these changes no longer work (developers replaced calls to “id” with Tcl extensions). Now I disabled tests that use group information. Can we add all supplementary groups to /etc/groups? Not adding them to /etc/group makes some shell commands return an error (“groups”, “id -G -n”). > >> + (synopsis "Shell environment variables and aliases management") >> + (description "A tool that simplify shell initialization and lets users >> +easily modify their environment during the session with modulefiles.") > >Please write full sentences for the description. Changed description. >Could you send an updated patch? > >Bonus points if you can provide a commit log that follows our >conventions. :-) I’ve sent an updated patch in a separate email. Thank you for the corrections! From unknown Mon Aug 18 17:56:11 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Ivan Gankevich Subject: bug#49456: closed (Re: bug#49456: [PATCH] gnu: add environment-modules) Message-ID: References: <87lf5xax62.fsf_-_@gnu.org> <20210707085932.20751-1-i.gankevich@spbu.ru> X-Gnu-PR-Message: they-closed 49456 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 49456@debbugs.gnu.org Date: Fri, 23 Jul 2021 15:06:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1627052762-14415-1" This is a multi-part message in MIME format... ------------=_1627052762-14415-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #49456: [PATCH] gnu: add environment-modules which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 49456@debbugs.gnu.org. --=20 49456: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D49456 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1627052762-14415-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 49456-done) by debbugs.gnu.org; 23 Jul 2021 15:05:06 +0000 Received: from localhost ([127.0.0.1]:44287 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6wja-0003jJ-D9 for submit@debbugs.gnu.org; Fri, 23 Jul 2021 11:05:06 -0400 Received: from eggs.gnu.org ([209.51.188.92]:33278) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6wjX-0003ij-2q for 49456-done@debbugs.gnu.org; Fri, 23 Jul 2021 11:05:05 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:57878) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m6wjQ-0003ss-Ni; Fri, 23 Jul 2021 11:04:56 -0400 Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=42910 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m6wjQ-000622-Fn; Fri, 23 Jul 2021 11:04:56 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Ivan Gankevich Subject: Re: bug#49456: [PATCH] gnu: add environment-modules References: <20210707085932.20751-1-i.gankevich@spbu.ru> <20210721122736.17604-1-i.gankevich@spbu.ru> Date: Fri, 23 Jul 2021 17:04:53 +0200 In-Reply-To: <20210721122736.17604-1-i.gankevich@spbu.ru> (Ivan Gankevich's message of "Wed, 21 Jul 2021 15:27:38 +0300") Message-ID: <87lf5xax62.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49456-done Cc: 49456-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, Ivan Gankevich skribis: > * gnu/packages/package-management.scm (modules): New variable. Pushed as 8bcd920c71ffa3bcd1f4290e6c252cc59bc9be52. I followed up with a patch that removes FHS assumptions from the =E2=80=98add.modules=E2=80=99= script. Thanks! Ludo=E2=80=99. ------------=_1627052762-14415-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 7 Jul 2021 09:00:21 +0000 Received: from localhost ([127.0.0.1]:50842 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m13Po-0003lr-JM for submit@debbugs.gnu.org; Wed, 07 Jul 2021 05:00:20 -0400 Received: from lists.gnu.org ([209.51.188.17]:53988) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m13Pn-0003lj-4w for submit@debbugs.gnu.org; Wed, 07 Jul 2021 05:00:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60530) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m13Pl-0002TK-N9 for guix-patches@gnu.org; Wed, 07 Jul 2021 05:00:17 -0400 Received: from mail.spbu.ru ([195.70.197.23]:41468 helo=cgp2.pu.ru) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1m13Pe-0007ta-8C for guix-patches@gnu.org; Wed, 07 Jul 2021 05:00:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=simple/simple; d=spbu.ru; s=20180812; bh=qrN4/1Vnq4zKIICePkD7YfdwKnKrbNBda3wl3MM93Kc=; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject:Cc:To:From; b=wbZLzI2BWm1aCPJ/ysRY6zrDdNgv0V4DiiSTMjGiCKoMkPC+nwAT4wbyMgqhi7MNRpilXauRlq JZLdPxVk9tsM5lWll7/vA/kTqK7JJVQ0vH9V5jIPFmzZwtbGDsT+ZmjnjmKARVTCjKCC/I7/KElTo 8bWnyITpju5OYfnGMDDHWA+t18/RqBlAfGxiO+k81uoPL92e+DrFVKeG5/gPEtlFCgcS0o5Vze/G6 2KtuzwEpGOidMwmYt4voUKt3FwpbDgh1mMt35yoMPODofpavX3zaazQZlZ/H4f/ihLRmr3Hfsoo7w TqvtSnM9zuAVL4bUsfh4bG2rCTkBgZ7ZJpyKw== Received: from [172.27.221.159] (account st018947@spbu.ru HELO surge.ws.pu.ru) by spbu.ru (CommuniGate Pro SMTP 6.2.15) with ESMTPSA id 169995947; Wed, 07 Jul 2021 12:00:05 +0300 From: Ivan Gankevich To: guix-patches@gnu.org Subject: [PATCH] gnu: add environment-modules Date: Wed, 7 Jul 2021 11:59:33 +0300 Message-Id: <20210707085932.20751-1-i.gankevich@spbu.ru> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=195.70.197.23; envelope-from=i.gankevich@spbu.ru; helo=cgp2.pu.ru X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit Cc: Ivan Gankevich X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --- gnu/packages/parallel.scm | 64 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/gnu/packages/parallel.scm b/gnu/packages/parallel.scm index 42826f49d6..f07ce02d33 100644 --- a/gnu/packages/parallel.scm +++ b/gnu/packages/parallel.scm @@ -41,8 +41,10 @@ #:use-module (gnu packages admin) #:use-module (gnu packages autotools) #:use-module (gnu packages base) + #:use-module (gnu packages dejagnu) #:use-module (gnu packages flex) #:use-module (gnu packages freeipmi) + #:use-module (gnu packages less) #:use-module (gnu packages linux) #:use-module (gnu packages mpi) #:use-module (gnu packages perl) @@ -378,3 +380,65 @@ and output captured in the notebook. Whatever arguments are accepted by a SLURM command line executable are also accepted by the corresponding magic command---e.g., @code{%salloc}, @code{%sbatch}, etc.") (license license:bsd-3)))) + +(define-public environment-modules + (package + (name "environment-modules") + (version "4.7.1") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/modules/Modules/modules-" + version "/modules-" version ".tar.bz2")) + (sha256 (base32 "07r03vqskjxyjy5m2b6p2px42djnd2z1k4b5j9dxqv8prin01ax6")))) + (build-system gnu-build-system) + (arguments + `(#:configure-flags + (list (string-append "--with-bin-search-path=" + (assoc-ref %build-inputs "tcl") "/bin" ":" + (assoc-ref %build-inputs "procps") "/bin" ":" + (assoc-ref %build-inputs "less") "/bin" ":" + (assoc-ref %build-inputs "coreutils") "/bin") + (string-append "--with-tcl=" (assoc-ref %build-inputs "tcl") "/lib") + "--disable-compat-version") + #:test-target "test" + #:phases + (modify-phases %standard-phases + (add-before 'configure 'patch-scripts-for-python-3 + (lambda _ + ;; patch the script for python-3 + (substitute* "script/createmodule.py.in" + (("pathkeys.sort\\(\\)") "pathkeys = sorted(pathkeys)") + (("print\\(\"\\\\t\"\\*") "print(\"\\t\"*int") + (("@PYTHON@") (which "python3"))) + #t)) + (add-after 'configure 'patch-/bin/sh-in-tests + (lambda _ + (for-each + (lambda (file) + (substitute* file + (("/bin/sh") (which "bash")) + ;; For some reason "kvm" group cannot be resolved for + ;; "nixbld" user. We remove "-n" switch here to not + ;; resolve the groups at all. + (("exec id -G -n -z") "exec id -G -z") + (("exec id -G -n") "exec id -G") + )) + '("testsuite/modules.00-init/005-init_ts.exp" + "testsuite/install.00-init/005-init_ts.exp")) + #t))))) + (native-inputs + `(("dejagnu" ,dejagnu) + ("autoconf" ,autoconf) + ("which" ,which))) + (inputs + `(("tcl" ,tcl) + ("less" ,less) + ("procps" ,procps) + ("coreutils" ,coreutils) + ("python" ,python-3))) + (home-page "http://modules.sourceforge.net/") + (synopsis "Shell environment variables and aliases management") + (description "A tool that simplify shell initialization and lets users +easily modify their environment during the session with modulefiles.") + (license license:gpl2+))) -- 2.32.0 ------------=_1627052762-14415-1--