unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob 9a2ab9ea7d526c317078bb3e3109d99087b62eb7 2344 bytes (raw)
name: gnu/packages/patches/spacemacs-rolling-release-quelpa-permissions.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
 
When quelpa builds some packages it has to copy files from the store, which means that they are marked as read-only. This patch sets the permissions of copied files and directories to ensure that they are writable.

diff --git a/core/libs/quelpa.el b/core/libs/quelpa.el
index 70b143657..9da420028 100644
@@ -374,8 +374,10 @@ and return TIME-STAMP, otherwise return OLD-TIME-STAMP."
         (delete-directory dir t)
         (make-directory dir)
         (if (eq type 'file)
-            (copy-file file-path dir t t t t)
-          (copy-directory file-path dir t t t)))
+          (progn (copy-file file-path dir t t t t)
+                 (set-file-modes (expand-file-name (file-name-nondirectory file-path) dir) #o644))
+          (progn (copy-directory file-path dir t t t)
+                 (set-file-modes dir #o755))))
       (quelpa-build--dump new-stamp-info stamp-file)
       (quelpa-file-version file-path type version time-stamp))))

@@ -1369,10 +1371,13 @@ FILES is a list of (SOURCE . DEST) relative filepath pairs."
   (cond
    ((file-regular-p file)
     (quelpa-build--message "%s -> %s" file newname)
-    (copy-file file newname))
+    (copy-file file newname)
+    (set-file-modes newname #o644))
    ((file-directory-p file)
     (quelpa-build--message "%s => %s" file newname)
-    (copy-directory file newname))))
+    (make-directory newname)
+    (set-file-modes newname #o755)
+    (map quelpa-build--copy-file (directory-files file t)))))

 (defun quelpa-build--find-source-file (target files)
   "Search for source of TARGET in FILES."
@@ -1463,6 +1468,7 @@ Returns the archive entry for the package."
     (if (file-exists-p pkg-target)
         (quelpa-build--message "Skipping rebuild of %s" pkg-target)
       (copy-file pkg-source pkg-target)
+      (set-file-modes pkg-target #o644)
       (let ((enable-local-variables nil)
             (make-backup-files nil))
         (with-temp-buffer
@@ -1566,7 +1572,8 @@ attribute with an URL like \"http://domain.tld/path/to/file.el\"."
     (unless (string= (file-name-extension url) "el")
       (error "<%s> does not end in .el" url))
     (unless (file-directory-p dir)
-      (make-directory dir))
+      (make-directory dir)
+      (set-file-modes dir #o755))
     (url-copy-file url local-path t)
     (quelpa-check-hash name config local-path dir 'url)))


debug log:

solving b3b514941f ...
found b3b514941f in https://yhetil.org/guix-patches/mS425o3U--g_ZZemWqvuUgtTHvBroyNZvJUCP6Dy2ABWdMTmgI1CweiSpOj40xlg1LXarBqJE0krzRh4J-DhzoWQ_jofFDDgxUXg1cvjZUA=@protonmail.com/

applying [1/1] https://yhetil.org/guix-patches/mS425o3U--g_ZZemWqvuUgtTHvBroyNZvJUCP6Dy2ABWdMTmgI1CweiSpOj40xlg1LXarBqJE0krzRh4J-DhzoWQ_jofFDDgxUXg1cvjZUA=@protonmail.com/
diff --git a/gnu/packages/patches/spacemacs-rolling-release-quelpa-permissions.patch b/gnu/packages/patches/spacemacs-rolling-release-quelpa-permissions.patch
new file mode 100644
index 0000000000..b3b514941f

Checking patch gnu/packages/patches/spacemacs-rolling-release-quelpa-permissions.patch...
1:57: new blank line at EOF.
+
Applied patch gnu/packages/patches/spacemacs-rolling-release-quelpa-permissions.patch cleanly.
warning: 1 line adds whitespace errors.

index at:
100644 9a2ab9ea7d526c317078bb3e3109d99087b62eb7	gnu/packages/patches/spacemacs-rolling-release-quelpa-permissions.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).