summaryrefslogtreecommitdiff
path: root/guix/scripts/publish.scm
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2020-11-11 00:02:32 +0100
committerMarius Bakke <marius@gnu.org>2020-11-11 00:02:32 +0100
commita9a0d348743af1a25fd27b2b073f0fe2b46978b6 (patch)
treea398c8229d516c99e3e1f4a527939b583ba1f5bb /guix/scripts/publish.scm
parent3dee2299aefaf954ce38073a8dc385ab21b559c2 (diff)
parent569cd538667dd8a0d0eacab2b326777c197260b8 (diff)
downloadguix-patches-a9a0d348743af1a25fd27b2b073f0fe2b46978b6.tar
guix-patches-a9a0d348743af1a25fd27b2b073f0fe2b46978b6.tar.gz
Merge branch 'master' into staging
Diffstat (limited to 'guix/scripts/publish.scm')
-rw-r--r--guix/scripts/publish.scm12
1 files changed, 10 insertions, 2 deletions
diff --git a/guix/scripts/publish.scm b/guix/scripts/publish.scm
index e8faf379e2..e3c8711f5b 100644
--- a/guix/scripts/publish.scm
+++ b/guix/scripts/publish.scm
@@ -583,7 +583,10 @@ requested using POOL."
;; guarantee the TTL (see <https://bugs.gnu.org/28664>.)
(with-atomic-file-output nar
(lambda (port)
- (write-file item port))))))
+ (write-file item port)
+ ;; Make the file world-readable, contrary to what
+ ;; 'with-atomic-file-output' does.
+ (chmod port (logand #o644 (lognot (umask)))))))))
(define* (bake-narinfo+nar cache item
#:key ttl (compressions (list %no-compression))
@@ -615,7 +618,12 @@ requested using POOL."
#:nar-path nar-path
#:compressions compressions
#:file-sizes sizes)
- port)))))
+ port)))
+
+ ;; Make the cached narinfo world-readable, contrary to what
+ ;; 'with-atomic-file-output' does, so that other users can rsync
+ ;; the whole cache.
+ (chmod port (logand #o644 (lognot (umask))))))
;; Make narinfo files for OTHERS hard links to NARINFO such that the
;; atime-based cache eviction considers either all the nars or none