From patchwork Thu Nov 9 01:33:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tristan Cottam X-Patchwork-Id: 56108 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id C023C27BBE9; Thu, 9 Nov 2023 09:00:26 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id A800827BBE2 for ; Thu, 9 Nov 2023 09:00:24 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r10tg-0007QP-Vn; Thu, 09 Nov 2023 04:00:21 -0500 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 1r0xo9-0007kB-Of for guix-patches@gnu.org; Thu, 09 Nov 2023 00:42:26 -0500 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 1r0xo9-0003pm-Gq for guix-patches@gnu.org; Thu, 09 Nov 2023 00:42:25 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r0xok-0001ga-1h; Thu, 09 Nov 2023 00:43:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#67009] [PATCH] build: minetest-build-system: Improve white space handling in mod name field. Resent-From: Tristan Cottam Original-Sender: "Debbugs-submit" Resent-CC: liliana.prikler@gmail.com, iyzsong@envs.net, guix-patches@gnu.org Resent-Date: Thu, 09 Nov 2023 05:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 67009 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 67009@debbugs.gnu.org Cc: Tristan Cottam , Liliana Marie Prikler , =?utf-8?b?5a6L5paH5q2m?= X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: Liliana Marie Prikler , =?utf-8?b?5a6L5paH5q2m?= Received: via spool by submit@debbugs.gnu.org id=B.16995085306419 (code B ref -1); Thu, 09 Nov 2023 05:43:01 +0000 Received: (at submit) by debbugs.gnu.org; 9 Nov 2023 05:42:10 +0000 Received: from localhost ([127.0.0.1]:46553 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r0xnt-0001fS-6g for submit@debbugs.gnu.org; Thu, 09 Nov 2023 00:42:09 -0500 Received: from lists.gnu.org ([2001:470:142::17]:49384) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r0txg-0003m9-3B for submit@debbugs.gnu.org; Wed, 08 Nov 2023 20:36:03 -0500 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 1r0tww-0007B1-OM for guix-patches@gnu.org; Wed, 08 Nov 2023 20:35:14 -0500 Received: from mail-0301.mail-europe.com ([188.165.51.139]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r0tws-0006Sz-Sb for guix-patches@gnu.org; Wed, 08 Nov 2023 20:35:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cott.am; s=protonmail; t=1699493703; x=1699752903; bh=4XyzOTSptPvy9k19VqKMMA4NEGxJJOnSLEhwofgRXW0=; h=From:To:Cc:Subject:Date:Message-ID:From:To:Cc:Date:Subject: Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=j2qBp19QSrS6PhPcVfoKjMBYm/i2EcWaJ90rj6ffT7L2p7EoQFTJDeZrxQyYMo1F/ TW/wtnDgYsoagmM7UBSYXfI4XUPRHXNE55beeELzTzVtxy2dxr3/DMhC93VwWylcvz QqipaXqtmkcS4J0x5toScGMPb2Z+JJzktAWcmh49fsCZ7R/4QHuqfkJPfpA33Eauis gmn/cIz7h48WrvPUw/zHC62OSIGWCBkLVO2h/PHfskeV65KpB/sQvKTm3xbnMselLF bSRMXA4gQAPmlM77O0jNN6EYVInj2eQvourjzjEI8PKMqQG1U6RxsHcG5OC0vKnsqe VJTjFTZZjwoBg== X-Pm-Submission-Id: 4SQkzB1G8Zz4wwdK Date: Thu, 9 Nov 2023 02:33:01 +0100 Message-ID: <034f56289398fd3198b05b0a5a9b0147d64e92ba.1699493581.git.tristan@cott.am> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Received-SPF: pass client-ip=188.165.51.139; envelope-from=tristan@cott.am; helo=mail-0301.mail-europe.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Thu, 09 Nov 2023 00:42:08 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Mailman-Approved-At: Thu, 09 Nov 2023 04:00:12 -0500 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Tristan Cottam X-ACL-Warn: , Tristan Cottam via Guix-patches X-Patchwork-Original-From: Tristan Cottam via Guix-patches via From: Tristan Cottam Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches I'm currently developing a Minetest service, with its configuration including a field specifying the list of mod packages to install and enable. However, certain mods' configuration, beind developed on Windows, have a trailing carriage return before each newline, which is included in the Guix store mod directory base name. Such mods can't be programmatically loaded by a Minetest world, since trailing whitespace is ignored by Minetest's world configuration parser, leading to the wrong mod path being used. This patch fixes certain Minetest mods being stored with a terminating carriage return in their directory base name. * guix/build/minetest-build-system.scm (name-regexp): Improve white space handling. Change-Id: I95f4c201724991a10efba5c859bfef99779ea495 --- guix/build/minetest-build-system.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) base-commit: b0bfddd7f937fcefdaeb1de4ccafd415c1df4122 diff --git a/guix/build/minetest-build-system.scm b/guix/build/minetest-build-system.scm index 4a7a87ab83..8233d56aca 100644 --- a/guix/build/minetest-build-system.scm +++ b/guix/build/minetest-build-system.scm @@ -126,7 +126,7 @@ (define* (minimise-png #:key inputs native-inputs #:allow-other-keys) (/ total-old-size (expt 1024 2)) (/ total-new-size (expt 1024 2))))))) -(define name-regexp (make-regexp "^name[ ]*=(.+)$")) +(define name-regexp (make-regexp "^name[[:space:]]*=[[:space:]]*([[:graph:]]+)")) (define* (read-mod-name mod.conf #:optional not-found) "Read the name of a mod from MOD.CONF. If MOD.CONF