From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id +JdVFU8X+GBVnQAAgWs5BA (envelope-from ) for ; Wed, 21 Jul 2021 14:47:11 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id ED4oEU8X+GBgdAAAB5/wlQ (envelope-from ) for ; Wed, 21 Jul 2021 12:47:11 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id E7D9925425 for ; Wed, 21 Jul 2021 14:47:10 +0200 (CEST) Received: from localhost ([::1]:38856 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m6Bd0-00035s-17 for larch@yhetil.org; Wed, 21 Jul 2021 08:47:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51520) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m6Bcs-00034f-E1 for guix-patches@gnu.org; Wed, 21 Jul 2021 08:47:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:53104) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m6Bcs-0005Lf-64 for guix-patches@gnu.org; Wed, 21 Jul 2021 08:47:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m6Bcs-0007qL-5I for guix-patches@gnu.org; Wed, 21 Jul 2021 08:47:02 -0400 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1626871631; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=+IL+g4qlVf7za56Lbzy6DEsWCye61NitxFJsRyomU3I=; b=c7CYMKi/3K2GMa01bgXHCkbYyzoCD5tOD+LM83wp9V/hZNN+uDBPzXETx5lhg7YdbllJqJ Hpx7maTcyGjX1HhyuLsciE8XjJPLmNtWtgKO6FE535YGkBKf9h3lu6vFMnakx5Ew6vDqRb mVuS70alEgt4t8BIF79Ve3jg7btJ52FkEjQiQVh1SoWpnJxGA3eIf9suvYNfaQO2pSoHzw OO/PXakDbZ9N/58AY3VG07r3CPTqWqWLYOQ4HpC2nE3+nHDU95gjDvlWrRcKdh/P53EPuk TE/ie2dV5JMPe8YbH77jgJoXhepTfNGtTh538NIH9aPZ/+1/uOyaQ2PLVnDvmg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1626871631; a=rsa-sha256; cv=none; b=B/uCZy79Ftpmzq7SGF+g1Dk8lGEqodA1CwOFm4aG7l/gsWikVEPLm+3SAxmMOAx6Zkyz/3 4cS6XH8q7aeRZegzT1c4tRZoW6b3I+cg58M7NLvgx/nHN07Gcx4CggDZItSDef1MtHl2oZ BP3MXtf5CBI7JLGYfKd5Eb5DgWFNrT8Io5ICM+KqIoiSTFTZoT9QdRnGRftm9w8iPXht1g K4t7oJWjT3Qjxmu7bnLyvCN29kjyL6yoSMZlwiy1WNt5UFqCCLQfuBxknnwe9pKGHCwjM9 JUUDOgREySFNq95L8Zs7fE2qZUSnrZlPnN5jRE3cRfbrPt6Yw7eT1VGE7tnL6w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=spbu.ru header.s=20180812 header.b=lskNpjmM; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: 0.58 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=spbu.ru header.s=20180812 header.b=lskNpjmM; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: E7D9925425 X-Spam-Score: 0.58 X-Migadu-Scanner: scn0.migadu.com X-TUID: yJ8TtzlSS2+m >> +++ 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!