From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 4JO6NVRb216NWAAA0tVLHw (envelope-from ) for ; Sat, 06 Jun 2020 09:01:08 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id sDmPMVRb2154MgAA1q6Kng (envelope-from ) for ; Sat, 06 Jun 2020 09:01:08 +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 1CE1E940666 for ; Sat, 6 Jun 2020 09:01:08 +0000 (UTC) Received: from localhost ([::1]:59048 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jhUhO-0001Fo-9t for larch@yhetil.org; Sat, 06 Jun 2020 05:01:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46592) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jhUhK-0001Fe-CZ for guix-patches@gnu.org; Sat, 06 Jun 2020 05:01:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39139) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jhUhK-0007S9-3a for guix-patches@gnu.org; Sat, 06 Jun 2020 05:01:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jhUhK-0007JO-1A for guix-patches@gnu.org; Sat, 06 Jun 2020 05:01:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41734] [PATCH] gnu: sudo: Separate Python output. Resent-From: Mathieu Othacehe Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 06 Jun 2020 09:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 41734 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 41734@debbugs.gnu.org Cc: Mathieu Othacehe X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.159143402828055 (code B ref -1); Sat, 06 Jun 2020 09:01:01 +0000 Received: (at submit) by debbugs.gnu.org; 6 Jun 2020 09:00:28 +0000 Received: from localhost ([127.0.0.1]:50685 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jhUgm-0007IR-BP for submit@debbugs.gnu.org; Sat, 06 Jun 2020 05:00:28 -0400 Received: from lists.gnu.org ([209.51.188.17]:33110) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jhUgk-0007IK-U5 for submit@debbugs.gnu.org; Sat, 06 Jun 2020 05:00:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46534) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jhUgk-00017v-K9 for guix-patches@gnu.org; Sat, 06 Jun 2020 05:00:26 -0400 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]:50630) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jhUgj-0007K3-FP; Sat, 06 Jun 2020 05:00:26 -0400 Received: by mail-wm1-x344.google.com with SMTP id v19so10512544wmj.0; Sat, 06 Jun 2020 02:00:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=R07Wp8G2eBZauvIE7MseLhWmwPrZafZeWszLfr/XgFE=; b=qx4PcLE/+37tTdHco+dIeQYqeljPwLPl3mHvKnykjEIFhPcaN9LowPdgff4fSTqROC SX7AMJI1oOJT3G/UosAjVL+CEnbIMOtEPCSpn6cvyOtK7Id80fbtZSZJsfrYpsG2tymG 6vQLRvLrqedbDxr6xpHfyMQYSF9DxiH24SoSpmwlGltd8ccZAEMIUxz9lWpNflDCBYX0 Qi83r7I62xF2CPle/Of1ArCIpqNR5O/Y2FLI68NnlKqlE0MyClYYM6PJJjLJssrq9Kmg PEFh9O24Gt60no3V1vzv9+LLvtaxxUcOYyES3q6+Y4yO7keihhccvownKjh/m0O8ji2g jd6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=R07Wp8G2eBZauvIE7MseLhWmwPrZafZeWszLfr/XgFE=; b=thJMisJpABAJtDehnyuaFDSkEXO82SG8+UoGC82XHiDzuumEmHyZn1Ba8GsrYKYcXJ ZNgcMks0V5fh/RgXnhcbPqZeAQW9uxrL/dRpF2qidKlSexlKKmtunp4Voab2TgIVrXK2 w6Lqcj5pSLdHoLxKXVbWKNlKvJLVg+1tSZbf7HorWRDRmzmWzl1XQoGyx9N84MLZFDoM l7K5tWFK34T/rDcSXOA5UYPLQJsmRu6If0Dzs35Jrh4WZp1yhsG9QFdMpnAhYHocZ0qd nz3EhdZO0uPdxoL/kTP38D2P2sgfZaq6qEEP9SXRykzY1v/ZHY8gTjGBilci+3Z/iDR8 6Opw== X-Gm-Message-State: AOAM531sAOayBT+Jr9VQvJYNMMJsDLLUy9/7WMi9c9iwjHqRpKHDEHRF Wt0jRkQm0yEZkeFLwhjHUyNiSCqlS80= X-Google-Smtp-Source: ABdhPJzo4Y0Rouet/4Myw4zDF34mj7hszKx9ZB/YzEa9LTUsEUB291iqmw0v1M+VI2jg50egKm2SxQ== X-Received: by 2002:a7b:c7d8:: with SMTP id z24mr6375433wmk.28.1591434022570; Sat, 06 Jun 2020 02:00:22 -0700 (PDT) Received: from meru.fronius.com ([2a01:e0a:fa:a50:809b:e323:9e90:279b]) by smtp.gmail.com with ESMTPSA id x205sm15569384wmx.21.2020.06.06.02.00.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 Jun 2020 02:00:21 -0700 (PDT) From: Mathieu Othacehe X-Google-Original-From: Mathieu Othacehe Date: Sat, 6 Jun 2020 11:00:14 +0200 Message-Id: <20200606090014.12578-1-othacehe@gnu.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::344; envelope-from=m.othacehe@gmail.com; helo=mail-wm1-x344.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Spam-Score: 0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -2.3 (--) 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-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=gmail.com header.s=20161025 header.b=qx4PcLE/; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=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-Spam-Score: 4.09 X-TUID: APHuiEUCFUsC The Python plugin of "sudo" drag the Python interpreter to the closure of Guix System. Put it in a separate output. * gnu/packages/admin.scm (sudo)[arguments]: Add a 'separate-python-output phase. --- Hello, Here's a patch to remove Python from the Guix Sytem closure. As Python cross-compilation is broken, the "python" output cannot be populated when cross-compiling. This is not great. An alternative would be not to provide "python" output when cross-compiling but that requires to turn "output" into a thunk field, and I been advised not to do that (for performance reasons) in the past. WDYT? Thanks, Mathieu gnu/packages/admin.scm | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 77981e520a..9d9d70c88d 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -1375,6 +1375,7 @@ system administrator.") (delete-file-recursively "lib/zlib") #t)))) (build-system gnu-build-system) + (outputs (list "out" "python")) (arguments `(#:configure-flags (list (string-append "--docdir=" (assoc-ref %outputs "out") @@ -1432,7 +1433,23 @@ system administrator.") (substitute* "plugins/sudoers/Makefile.in" (("^pre-install:" match) (string-append match "\ndisabled-" match))) - #t))) + #t)) + (add-after 'install 'separate-python-output + (lambda* (#:key target outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out")) + (out:python (assoc-ref outputs "python"))) + ;; Python cross-compilation is not working. + (if target + (mkdir-p (string-append out:python "/empty")) + (for-each + (lambda (file) + (let ((old (string-append out "/" file)) + (new (string-append out:python "/" file))) + (mkdir-p (dirname new)) + (rename-file old new))) + (list "libexec/sudo/python_plugin.so" + "libexec/sudo/python_plugin.la"))) + #t)))) ;; XXX: The 'testsudoers' test series expects user 'root' to exist, but ;; the chroot's /etc/passwd doesn't have it. Turn off the tests. -- 2.26.2