all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Philip McGrath <philip@philipmcgrath.com>
To: 56759@debbugs.gnu.org
Cc: Philip McGrath <philip@philipmcgrath.com>
Subject: [bug#56759] [PATCH 17/20] gnu: ruby-anystyle-data: Don't write to installed gem.
Date: Mon, 25 Jul 2022 08:16:32 -0400	[thread overview]
Message-ID: <850eda181196962254ba2bb516a8233216d18b42.1658750358.git.philip@philipmcgrath.com> (raw)
In-Reply-To: <cover.1658750358.git.philip@philipmcgrath.com>

* 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 <philip@philipmcgrath.com>
+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
-- 
2.32.0





  parent reply	other threads:[~2022-07-25 12:20 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-25 12:13 [bug#56759] [PATCH 00/20] gnu: Add AnyStyle Philip McGrath
2022-07-25 12:16 ` [bug#56759] [PATCH 01/20] gnu: Add ruby-wapiti Philip McGrath
2022-07-25 12:16 ` [bug#56759] [PATCH 02/20] gnu: Add ruby-namae Philip McGrath
2022-07-25 12:16 ` [bug#56759] [PATCH 03/20] gnu: Add itex2mml Philip McGrath
2022-07-25 12:16 ` [bug#56759] [PATCH 04/20] gnu: Add ruby-ritex Philip McGrath
2022-07-25 12:16 ` [bug#56759] [PATCH 05/20] gnu: Add ruby-latex-decode Philip McGrath
2022-07-25 12:16 ` [bug#56759] [PATCH 06/20] gnu: Add ruby-link-header Philip McGrath
2022-07-25 12:16 ` [bug#56759] [PATCH 07/20] gnu: Add ruby-rdf Philip McGrath
2022-07-25 12:16 ` [bug#56759] [PATCH 08/20] gnu: Add ruby-rdf-vocab Philip McGrath
2022-07-25 12:16 ` [bug#56759] [PATCH 09/20] gnu: Add ruby-bibtex-ruby Philip McGrath
2022-07-25 12:16 ` [bug#56759] [PATCH 10/20] gnu: Add ruby-unicode-scripts Philip McGrath
2022-07-25 12:16 ` [bug#56759] [PATCH 11/20] gnu: Add ruby-citeproc Philip McGrath
2022-07-25 12:16 ` [bug#56759] [PATCH 12/20] gnu: Add ruby-edtf Philip McGrath
2022-07-25 12:16 ` [bug#56759] [PATCH 13/20] gnu: Add ruby-gli Philip McGrath
2022-07-25 12:16 ` [bug#56759] [PATCH 14/20] gnu: Add ruby-anystyle-data Philip McGrath
2022-07-25 12:16 ` [bug#56759] [PATCH 15/20] gnu: Add ruby-anystyle Philip McGrath
2022-07-25 12:16 ` [bug#56759] [PATCH 16/20] gnu: Add anystyle Philip McGrath
2022-07-25 12:16 ` Philip McGrath [this message]
2022-07-25 12:16 ` [bug#56759] [PATCH 18/20] gnu: ruby-anystyle: Initialize dictionary files Philip McGrath
2022-07-25 12:16 ` [bug#56759] [PATCH 19/20] gnu: anystyle: Add tests for dictionary adapters Philip McGrath
2022-07-25 12:16 ` [bug#56759] [PATCH 20/20] gnu: anystyle: Use GDBM by default Philip McGrath
2022-07-25 15:10 ` [bug#56759] [PATCH v2 05/20] gnu: Add ruby-latex-decode Philip McGrath
2022-08-04  9:57 ` bug#56759: [PATCH 00/20] gnu: Add AnyStyle Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=850eda181196962254ba2bb516a8233216d18b42.1658750358.git.philip@philipmcgrath.com \
    --to=philip@philipmcgrath.com \
    --cc=56759@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.