From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 6I9xDDeJTWMIhAAAbAwnHQ (envelope-from ) for ; Mon, 17 Oct 2022 18:56:23 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id oGxkDDeJTWMYcwEAauVa8A (envelope-from ) for ; Mon, 17 Oct 2022 18:56:23 +0200 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 111AB32DB4 for ; Mon, 17 Oct 2022 18:56:23 +0200 (CEST) Received: from localhost ([::1]:44252 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1okTPZ-0004lR-Vq for larch@yhetil.org; Mon, 17 Oct 2022 12:56:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50960) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okTPH-0004jx-MY for guix-patches@gnu.org; Mon, 17 Oct 2022 12:56:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:50728) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1okTPG-0004GM-OZ for guix-patches@gnu.org; Mon, 17 Oct 2022 12:56:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1okTPG-0006Cu-Ge for guix-patches@gnu.org; Mon, 17 Oct 2022 12:56:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58583] [PATCH v3] scripts: package: Forbid installation of the guix package. References: <20221017121642.15468-1-paren@disroot.org> In-Reply-To: <20221017121642.15468-1-paren@disroot.org> Resent-From: "(" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 17 Oct 2022 16:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58583 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 58583@debbugs.gnu.org Cc: "\(" Received: via spool by 58583-submit@debbugs.gnu.org id=B58583.166602570923783 (code B ref 58583); Mon, 17 Oct 2022 16:56:02 +0000 Received: (at 58583) by debbugs.gnu.org; 17 Oct 2022 16:55:09 +0000 Received: from localhost ([127.0.0.1]:49804 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okTOP-0006BW-7W for submit@debbugs.gnu.org; Mon, 17 Oct 2022 12:55:09 -0400 Received: from knopi.disroot.org ([178.21.23.139]:39708) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okTOM-0006BM-GW for 58583@debbugs.gnu.org; Mon, 17 Oct 2022 12:55:07 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 8735D4DB87; Mon, 17 Oct 2022 18:55:05 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with UTF8SMTP id ZmEDu0yPsHib; Mon, 17 Oct 2022 18:55:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1666025459; bh=a4qJRv1+xAQM3wvSYUQRXsK+/J+rc2aD0eFcbroTwp4=; h=From:To:Cc:Subject:Date; b=OwdV174sEucUPVor9Y5ONrSbfPYzjRxrSkKFHIX3u4ZQwbvF3K6xvq2U9RIA/pe4q B0Rvq69KlBKUvMUjfLw04+CpgBLBQjoLS/4dXllBOHNbncPtqCtthPUVHtAX9fm5lS D1CYpo5w8TkU441PYWY761stlGJlDJD5PjmBny5dE8fCrOtkVsbww5tlRrM1unDoyK yz5lt8DFDnw5W+UAX0JQ5XJs8VOszmtJmPYnRlwgLb2I3D35kk9F+34qIAY6Wmwbe3 islGN8DlWUJiLPkEXpFNBHM6CtC53Wyz3DR4CG5qXUnDC2xIuXvz6/pmDfGK39INFu mvyhA6sllI2gw== Date: Mon, 17 Oct 2022 17:50:57 +0100 Message-Id: <20221017165057.15648-1-paren@disroot.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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" Reply-to: "\(" X-ACL-Warn: , "\( via Guix-patches" From: "\( via Guix-patches" via X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1666025783; h=from:from:sender:sender:reply-to: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=0tubFqtSyc7dGmLXORp569J/4VZTjyhcRz5rOKr1pww=; b=gf4WCPj04eCU/W0zLt5bGoCyNtMvJk0M0oABHDg0jdjCJbsbLvX30+e3kLYfUvgNRNs5gz udbM4yvCQ677yZktKPb1QXTvkwtTaZRBUbSi0KpLYe2JAXIzfO6r5tafbPTXZO5jQLrrde 0tPuaaXg1Cn9rIiFGus2hxZjI8E/tonNkPfXjQjqGeKDl/ZaWGvQP/uE2PGTAco/s6MFNS 13NXQ4NSBFqf2sTvOeLoMM47ZDevlLgI+MsI74pkQuQdc4DxERWRKHGbrW/IWaFc1mI8Wy 3T7Nw0U1i5j8Y1fEhb/MD6ucopjOoDH3KKTgJj844a84lARHmXktruMNSVrKbQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1666025783; a=rsa-sha256; cv=none; b=oHAqQRlJDIUc8HDcwkoSC7EJFXOjjd0+I/FtFrcFpFnTyXtLzi+aIuhrBem6eMuuETnVyE FIafVw+Co5xmA6NqWk6qJtQQ+HFtZrbxJ/EITTjrYbdFyPl7jQkqxfkOL4/J0awoF+JUtp QDxObsrfa0o1GipoD6ApsB6aTp4OnvDRmVBDCLCo/HTocDxhdEKLZY7O8qm5UywJ4YGYPx yuDKhjBIMlJlMB3ztcobwWsm7D6SWMzHHEpgGP8Xol/pf5s4E9psblNonCizZRe65gFYZt kwkDzEv8A/0f1aQhUjBF+q1bo8ED8zrBpsaOEhzjqm6g9Xmf5BomPGCUN5w7xQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=disroot.org header.s=mail header.b=OwdV174s; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -1.42 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=disroot.org header.s=mail header.b=OwdV174s; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 111AB32DB4 X-Spam-Score: -1.42 X-Migadu-Scanner: scn1.migadu.com X-TUID: b0ajjvZZJOLp * guix/scripts/package.scm (package->manifest-entry*): Fail if the package to be installed is guix from the default channel. --- guix/scripts/package.scm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm index 7ba2661bbb..9f023ea7b5 100644 --- a/guix/scripts/package.scm +++ b/guix/scripts/package.scm @@ -12,6 +12,7 @@ ;;; Copyright © 2018 Steve Sprang ;;; Copyright © 2022 Josselin Poiret ;;; Copyright © 2022 Antero Mejr +;;; Copyright © 2022 ( ;;; ;;; This file is part of GNU Guix. ;;; @@ -699,7 +700,14 @@ (define (store-item->manifest-entry item) (define (package->manifest-entry* package output) "Like 'package->manifest-entry', but attach PACKAGE provenance meta-data to -the resulting manifest entry." +the resulting manifest entry, and report an error if PACKAGE is the 'guix' +package from the default channel." + (when (and (string=? (package-name package) "guix") + (string-prefix? "gnu/" (location-file + (package-location package)))) + (report-error (G_ "the 'guix' package should not be installed~%")) + (display-hint (G_ "use 'guix pull' to fetch the latest Guix revision")) + (exit 1)) (manifest-entry-with-provenance (package->manifest-entry package output))) -- 2.38.0