From patchwork Mon Jul 25 12:16:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philip McGrath X-Patchwork-Id: 40939 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 04C3E27BBEA; Mon, 25 Jul 2022 13:20:38 +0100 (BST) 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 6B84E27BBE9 for ; Mon, 25 Jul 2022 13:20:37 +0100 (BST) Received: from localhost ([::1]:50918 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oFx4e-0001Vy-JU for patchwork@mira.cbaines.net; Mon, 25 Jul 2022 08:20:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47786) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oFx3B-0008NL-2A for guix-patches@gnu.org; Mon, 25 Jul 2022 08:19:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:59710) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oFx3A-0005P7-Og for guix-patches@gnu.org; Mon, 25 Jul 2022 08:19:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oFx3A-0002yQ-LJ for guix-patches@gnu.org; Mon, 25 Jul 2022 08:19:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56759] [PATCH 17/20] gnu: ruby-anystyle-data: Don't write to installed gem. Resent-From: Philip McGrath Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 25 Jul 2022 12:19:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56759 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 56759@debbugs.gnu.org Cc: Philip McGrath Received: via spool by 56759-submit@debbugs.gnu.org id=B56759.165875151911320 (code B ref 56759); Mon, 25 Jul 2022 12:19:04 +0000 Received: (at 56759) by debbugs.gnu.org; 25 Jul 2022 12:18:39 +0000 Received: from localhost ([127.0.0.1]:49445 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oFx2l-0002wK-Du for submit@debbugs.gnu.org; Mon, 25 Jul 2022 08:18:39 -0400 Received: from mail-qv1-f52.google.com ([209.85.219.52]:45733) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oFx2e-0002vY-3T for 56759@debbugs.gnu.org; Mon, 25 Jul 2022 08:18:32 -0400 Received: by mail-qv1-f52.google.com with SMTP id h18so8218028qvr.12 for <56759@debbugs.gnu.org>; Mon, 25 Jul 2022 05:18:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=UmIPzPg4g86OfxxC71X6VNV6b1KOyQ3I4X/aMAkI+Qc=; b=UyU8/2nyk26YHfnnxqmh2Hb+bvigz/Rd/gsnVCleLlBgyQDFT7vaYDcyWHehJy47J5 DaWNkpI8csY3Ph3b6wgvn2EdGxOmbGqsT7UAmHLAqtjwQHpO7SvNplpaVPsXlgcx05G8 PJ1LsNKsIqXa5h2vaYX5EgJIFeZnENTf89R0rNhQwZcILj+5noGALVOWbRVD/wdS1vwh 8gIV+xayjMZxXHyXk+42tLlNL1u+e3xgXjyQIplwoHnmA3ZntkWJkDXigQLkLftySp8s MtJI05FCh8JWGYvxv5skKfdRFKM9DsMftgVkeJk6g2kCQzvE6DmD05Q9br6cipBIDlX1 vDRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=UmIPzPg4g86OfxxC71X6VNV6b1KOyQ3I4X/aMAkI+Qc=; b=YG1N+4d5EmRVcjZgtQFzQI/By1R3zL0Mdza7Dghjk3F+qogVrNxma7jMjpDihqw8UA JJPgWdrvX+gk55p/ghvTwperqvKrud2Yvtp9lhBaWuVM0Fe1DqkohAY1Kc1/XeUkBgPi ege33ng38FP9WfduJBHRTnGOp/O9xHnNIPnXs9M8Z6zVebKjmPM8k5jjFlAEu6rqMsfu JULXgUqfnBUG1+lm5Lc5yPhaGvT0qPzgwQFxJ//yoatCnvvl+FLmBN2CSct56yTM/bg9 tmRtktsNJ4rNASErN7y0rSES2WAT44uC/AvTgdLL+zfas68pjM4qR9RiuJp248C+nFb8 W2FA== X-Gm-Message-State: AJIora+Se4rm03rQAW5aFiisDNPAuuewuaLQDR9fW3B53X4naoKx9J4y 1DNv76bt3zfl2G/iT5npgv47eGIK426NmeiO X-Google-Smtp-Source: AGRyM1v5HRPa+JVr6IGfzagfn5rsNkALmKtGX7kJi9e9v+bhZWgbjycoWg3dzVSJIXzLfmVKlLoR9A== X-Received: by 2002:a05:6214:c85:b0:474:3c94:cdaa with SMTP id r5-20020a0562140c8500b004743c94cdaamr7273135qvr.69.1658751506505; Mon, 25 Jul 2022 05:18:26 -0700 (PDT) Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51]) by smtp.gmail.com with UTF8SMTPSA id d21-20020ac85ad5000000b0031ea1ad6c5asm7718462qtd.75.2022.07.25.05.18.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 25 Jul 2022 05:18:26 -0700 (PDT) From: Philip McGrath Date: Mon, 25 Jul 2022 08:16:32 -0400 Message-Id: <850eda181196962254ba2bb516a8233216d18b42.1658750358.git.philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: References: MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/patches/ruby-anystyle-data-immutable-install.patch: New patch. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/ruby.scm (ruby-anystyle-data)[patches]: Use it. --- gnu/local.mk | 1 + ...ruby-anystyle-data-immutable-install.patch | 40 +++++++++++++++++++ gnu/packages/ruby.scm | 2 + 3 files changed, 43 insertions(+) create mode 100644 gnu/packages/patches/ruby-anystyle-data-immutable-install.patch diff --git a/gnu/local.mk b/gnu/local.mk index 3bc947f30c..54ac9f2f9f 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1774,6 +1774,7 @@ dist_patch_DATA = \ %D%/packages/patches/rocm-comgr-3.1.0-dependencies.patch \ %D%/packages/patches/rocm-opencl-runtime-4.3-noclinfo.patch \ %D%/packages/patches/rocm-opencl-runtime-4.3-noopencl.patch \ + %D%/packages/patches/ruby-anystyle-data-immutable-install.patch \ %D%/packages/patches/ruby-latex-decode-fix-test.patch \ %D%/packages/patches/ruby-mustache-1.1.1-fix-race-condition-tests.patch \ %D%/packages/patches/ruby-sanitize-system-libxml.patch \ diff --git a/gnu/packages/patches/ruby-anystyle-data-immutable-install.patch b/gnu/packages/patches/ruby-anystyle-data-immutable-install.patch new file mode 100644 index 0000000000..d5d7149a67 --- /dev/null +++ b/gnu/packages/patches/ruby-anystyle-data-immutable-install.patch @@ -0,0 +1,40 @@ +From a6f5b37cd22daa6069d8fbef8cba9dc60a6731f6 Mon Sep 17 00:00:00 2001 +From: Philip McGrath +Date: Sun, 24 Jul 2022 23:54:19 -0400 +Subject: [PATCH] `AnyStyle::Data.setup()`: adjust for immutable install + +Don't override the default paths for `Dictionary::Marshal`, +`Dictionary::GDBM`, and `Dictionary:LDBM` to point to this gem: we can't +populate such files without the 'anystyle' gem (which depends on this +one), and we won't be able to write to the directory where this gem is +installed later, so the files will never exist at those locations. +--- + lib/anystyle/data/setup.rb | 12 ------------ + 1 file changed, 12 deletions(-) + +diff --git a/lib/anystyle/data/setup.rb b/lib/anystyle/data/setup.rb +index 17efdf8..08246fa 100644 +--- a/lib/anystyle/data/setup.rb ++++ b/lib/anystyle/data/setup.rb +@@ -4,18 +4,6 @@ module AnyStyle + + def self.setup + Dictionary.defaults[:source] = File.join(ROOT, 'dict.txt.gz') +- +- if defined? Dictionary::Marshal +- Dictionary::Marshal.defaults[:path] = File.join(ROOT, 'dict.marshal') +- end +- +- if defined? Dictionary::GDBM +- Dictionary::GDBM.defaults[:path] = File.join(ROOT, 'dict.db') +- end +- +- if defined? Dictionary::LDBM +- Dictionary::LDBM.defaults[:path] = ROOT +- end + end + end + end +-- +2.32.0 + diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm index 3feb07dcdc..32ba09d283 100644 --- a/gnu/packages/ruby.scm +++ b/gnu/packages/ruby.scm @@ -13444,6 +13444,8 @@ (define-public ruby-anystyle-data (snippet ;; remove pre-built file #~(delete-file "lib/anystyle/data/dict.txt.gz")) + (patches + (search-patches "ruby-anystyle-data-immutable-install.patch")) (file-name (git-file-name name version)))) (build-system ruby-build-system) (arguments