From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id QN3gBnKhEGYv/QAA62LTzQ:P1 (envelope-from ) for ; Sat, 06 Apr 2024 03:12:18 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id QN3gBnKhEGYv/QAA62LTzQ (envelope-from ) for ; Sat, 06 Apr 2024 03:12:18 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=none ("invalid DKIM record") header.d=freakingpenguin.com header.s=x header.b=ZbIzjW+1; 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"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1712365938; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=6feALBtLJyjd7h0Je59eHFatwcz6OS7HYOkpa80q/h0=; b=Yj8/iHVRqI8qYDckBUOUctjcp3keg5USBGV4YlNX3PnVEKTzInQp4BCv77FH7891jQc+Jn Ub6qsAcd0ifnyxYX/9nvZujJ5mUoUHlWyLTW8u/BBEOQ+4E/PmKPJUUlAAsdsNEJztigGk tTKxV3Tdz/lHaf6JnQruSEsHiGCw8h7RLp822LWX0TrNfcA9/38RHAtEvjz1uafwmRaUCf j+yCpy1/GgBRIB7jthaTavIarQup13diu4Rrsy/MR8CbzT7bKjTapgJ1bF0L8WGRA4ZW/C HsuX1/WdkXYIQuYAyPHKQGuRgM6fSczmOcP+i9mY2Te9ktyhrn9GttiKBgJtPA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1712365938; a=rsa-sha256; cv=none; b=FDeGDDv52HcjPrVvpg/TtqkH7SLqpXOxNjsKnOCukVdNLb37Pa8zDPqxocbCK1PUr3JiOU GBeRDJv8OcbAB1DTQe84Xh0L5oRLD2NX0umoa7Ge5fFn6VWCMntNEpcAeeq9aTsrUodD6C ofSH7Ce/3n4oDzhgxY/pjIRNW2zzlYfUnEpbofu0IYXUg+aVa/o8f4ltlPxaF+/puh9Z2p ws4nMpq1l3qk1XL46md6vo5KDES3FF6gbpYjwkQoFpFUasxseQE5jagUkMFvn0aPluMjU0 v1cHgKsPwUDnK5QVTd7Wd/a3afc9jPQ2rsdOpV3T3RLf0aNr2DO+72oVG0EX1A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none ("invalid DKIM record") header.d=freakingpenguin.com header.s=x header.b=ZbIzjW+1; 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"; dmarc=none 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 E055735A3C for ; Sat, 6 Apr 2024 03:12:17 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rsubC-0003vK-IT; Fri, 05 Apr 2024 21:12:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rsubA-0003v3-MW for guix-patches@gnu.org; Fri, 05 Apr 2024 21:12:00 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rsub9-0001AZ-M1; Fri, 05 Apr 2024 21:11:59 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rsubC-0000wr-ER; Fri, 05 Apr 2024 21:12:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70226] [PATCH] scripts: package: Disable searching with the empty string Resent-From: Richard Sent Original-Sender: "Debbugs-submit" Resent-CC: guix@cbaines.net, dev@jpoiret.xyz, ludo@gnu.org, othacehe@gnu.org, rekado@elephly.net, zimon.toutoune@gmail.com, me@tobias.gr, guix-patches@gnu.org Resent-Date: Sat, 06 Apr 2024 01:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 70226 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70226@debbugs.gnu.org Cc: Richard Sent , Christopher Baines , Josselin Poiret , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Mathieu Othacehe , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: Christopher Baines , Josselin Poiret , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Mathieu Othacehe , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice Received: via spool by submit@debbugs.gnu.org id=B.17123658653378 (code B ref -1); Sat, 06 Apr 2024 01:12:02 +0000 Received: (at submit) by debbugs.gnu.org; 6 Apr 2024 01:11:05 +0000 Received: from localhost ([127.0.0.1]:37835 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rsuaG-0000sP-RI for submit@debbugs.gnu.org; Fri, 05 Apr 2024 21:11:05 -0400 Received: from lists.gnu.org ([2001:470:142::17]:44374) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rsuaB-0000rE-RU for submit@debbugs.gnu.org; Fri, 05 Apr 2024 21:11:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rsua0-0003nr-2w for guix-patches@gnu.org; Fri, 05 Apr 2024 21:10:48 -0400 Received: from mail-108-mta226.mxroute.com ([136.175.108.226]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rsuZx-0000Df-QG for guix-patches@gnu.org; Fri, 05 Apr 2024 21:10:47 -0400 Received: from filter006.mxroute.com ([136.175.111.2] filter006.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta226.mxroute.com (ZoneMTA) with ESMTPSA id 18eb0f5225e0003bea.001 for (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Sat, 06 Apr 2024 01:10:38 +0000 X-Zone-Loop: d2f5586ca985caaf9756db1ce590ab98a8dd92a91c90 X-Originating-IP: [136.175.111.2] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=freakingpenguin.com; s=x; h=Content-Transfer-Encoding:MIME-Version: Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=6feALBtLJyjd7h0Je59eHFatwcz6OS7HYOkpa80q/h0=; b=ZbIzjW+1amsy0o6trpgaZ5W9ps oXqQQQZOQch9nObNrZvuyg6oiwMpvoDg2wxJ0jnV4Rvgou8lTnneW4l22TRJ1s/J42fX604anmF8k uPYN6eMMsvzQ9qOzmHrEKSV3IYXjC54+l7XNZ8eBcTvsIXDqO/wL9pX/ve6EWVINnkJ+7YVXwXN8m VCbnKENf6796a2kTt2RdakUXBx0K1Uq5AkEWrSkTgu1FN146nUGzfchJQDCEQxt4I2z6Ry3EiN1y1 bd28U3Yn+auoA6Q35M2E/h7MFctwkQjI/Ia0gDu/htTgT1dfJmJ27lie4gljzlkzmtg9YsUKvARm3 3uP5gGaw==; From: Richard Sent Date: Fri, 5 Apr 2024 21:05:53 -0400 Message-ID: <64c782009b2c286cc72513a4a7735bbad650052f.1712365552.git.richard@freakingpenguin.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Authenticated-Id: richard@freakingpenguin.com Received-SPF: pass client-ip=136.175.108.226; envelope-from=richard@freakingpenguin.com; helo=mail-108-mta226.mxroute.com 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-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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -3.36 X-Spam-Score: -3.36 X-Migadu-Queue-Id: E055735A3C X-Migadu-Scanner: mx12.migadu.com X-TUID: 3IXJsXMgbYvH Reported in . * guix/scripts/package.scm (process-query): search operating no longer passes empty strings to make-regexp to avoid unbounded memory usage. Change-Id: I8194591f0428c4f88fb101c0226b98f593a55709 --- Hi Guix! Not sure of the usefulness of small patches like this, but figure it gives me an excuse to trawl the repo and it's better to send it and not be needed than the inverse. I considered adding a --force flag to forcefully allow "" searches, but since multiple scripts use package.scm and there's a lot of CLI flags already it didn't seem appropriate to add another one, particularly if it just results in a system freeze. guix/scripts/package.scm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/guix/scripts/package.scm b/guix/scripts/package.scm index a489e06e73..66e5384ddc 100644 --- a/guix/scripts/package.scm +++ b/guix/scripts/package.scm @@ -891,6 +891,8 @@ (define (process-query opts) (('search _) (let* ((patterns (filter-map (match-lambda + ;; https://issues.guix.gnu.org/70223 + (('query 'search "") #f) (('query 'search rx) rx) (_ #f)) opts)) base-commit: 886ed061d7c57eb9d707b2af2c87402b86becf70 -- 2.41.0