diff options
author | Marius Bakke <[email protected]> | 2022-09-08 21:12:52 +0200 |
---|---|---|
committer | Marius Bakke <[email protected]> | 2022-09-08 21:12:52 +0200 |
commit | 884548b476f2ee27c01cb0c9ad93c0cf9d33fa5e (patch) | |
tree | 20650b3917b1292470ecc4ded13fbb04e5dbfa6d /gnu/packages/patches/racket-backport-8.6-docindex-write.patch | |
parent | 0e305798454c558ab6e722cf66ba351c326a1a8d (diff) | |
parent | fa894b3f4db835bd0bb52b32c7ec412e72b7e03a (diff) |
Merge branch 'staging' into core-updates
Diffstat (limited to 'gnu/packages/patches/racket-backport-8.6-docindex-write.patch')
-rw-r--r-- | gnu/packages/patches/racket-backport-8.6-docindex-write.patch | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/gnu/packages/patches/racket-backport-8.6-docindex-write.patch b/gnu/packages/patches/racket-backport-8.6-docindex-write.patch new file mode 100644 index 0000000000..abe1984507 --- /dev/null +++ b/gnu/packages/patches/racket-backport-8.6-docindex-write.patch @@ -0,0 +1,36 @@ +From 8b4d686a62fd66dedfc40ecdcf3698316993d614 Mon Sep 17 00:00:00 2001 +From: Philip McGrath <[email protected]> +Date: Sun, 17 Jul 2022 22:51:44 -0400 +Subject: [PATCH] racket-index: set write permission when copying + `docindex.sqlite` + +Fixes https://github.com/racket/racket/issues/4357 + +(cherry picked from commit 55b6cbdca1f36a4f37bab1519c1b658717d3cad2) +--- + pkgs/racket-index/setup/scribble.rkt | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/pkgs/racket-index/setup/scribble.rkt b/pkgs/racket-index/setup/scribble.rkt +index 6694f0b793..e27a8fa348 100644 +--- a/pkgs/racket-index/setup/scribble.rkt ++++ b/pkgs/racket-index/setup/scribble.rkt +@@ -252,7 +252,14 @@ + (unless (file-exists? db-file) + (define-values (base name dir?) (split-path db-file)) + (make-directory* base) +- (when copy-from (copy-file copy-from db-file)) ++ (when copy-from ++ (copy-file copy-from db-file) ++ ;; we might not have write permissions for the previous layer: ++ ;; ensure that we do for the new file ++ (define orig-mode (file-or-directory-permissions db-file 'bits)) ++ (define writeable-mode (bitwise-ior user-write-bit orig-mode)) ++ (unless (= writeable-mode orig-mode) ++ (file-or-directory-permissions db-file writeable-mode))) + (doc-db-disconnect + (doc-db-file->connection db-file #t)))) + (when (or (ormap can-build*? main-docs) +-- +2.32.0 + |