unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#52452: Guix related downloads from ftp.gnu.org are slow over IPv6
@ 2021-12-12 15:13 Christopher Baines
  2021-12-22 19:14 ` bug#52452: PATCH v2 2/4] activation: Add 'lchown-recursive' Maxime Devos
  0 siblings, 1 reply; 2+ messages in thread
From: Christopher Baines @ 2021-12-12 15:13 UTC (permalink / raw)
  To: 52452

[-- Attachment #1: Type: text/plain, Size: 1454 bytes --]

900 times slower by my measurements. I noticed this when downloading the
release .tar.xz:

→ wget -4 https://ftp.gnu.org/gnu/guix/guix-binary-1.3.0.x86_64-linux.tar.xz
--2021-12-12 14:07:29--  https://ftp.gnu.org/gnu/guix/guix-binary-1.3.0.x86_64-linux.tar.xz
Resolving ftp.gnu.org (ftp.gnu.org)... 209.51.188.20
Connecting to ftp.gnu.org (ftp.gnu.org)|209.51.188.20|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 91030312 (87M) [application/x-xz]
Saving to: ‘guix-binary-1.3.0.x86_64-linux.tar.xz’

guix-binary-1.3.0.x 100%[===================>]  86.81M  29.4MB/s    in 2.9s    

2021-12-12 14:07:32 (29.4 MB/s) - ‘guix-binary-1.3.0.x86_64-linux.tar.xz’ saved [91030312/91030312]


→ wget -6 https://ftp.gnu.org/gnu/guix/guix-binary-1.3.0.x86_64-linux.tar.xz
--2021-12-12 14:07:38--  https://ftp.gnu.org/gnu/guix/guix-binary-1.3.0.x86_64-linux.tar.xz
Resolving ftp.gnu.org (ftp.gnu.org)... 2001:470:142:3::b
Connecting to ftp.gnu.org (ftp.gnu.org)|2001:470:142:3::b|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 91030312 (87M) [application/x-xz]
Saving to: ‘guix-binary-1.3.0.x86_64-linux.tar.xz.1’

guix-binary-1.3.0.x86_64-linux.tar.xz.1 100%[===================================================================>]  86.81M  32.4KB/s    in 43m 36s 

2021-12-12 14:51:14 (34.0 KB/s) - ‘guix-binary-1.3.0.x86_64-linux.tar.xz.1’ saved [91030312/91030312]

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 987 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#52452: PATCH v2 2/4] activation: Add 'lchown-recursive'.
  2021-12-12 15:13 bug#52452: Guix related downloads from ftp.gnu.org are slow over IPv6 Christopher Baines
@ 2021-12-22 19:14 ` Maxime Devos
  0 siblings, 0 replies; 2+ messages in thread
From: Maxime Devos @ 2021-12-22 19:14 UTC (permalink / raw)
  To: 52452

>+(define (lchown-recursive file owner group)
>+  "As 'lchown' but recursively, change ownership of FILE to the
>integer values
>+OWNER and GROUP without dereferencing symbolic links it encounter."
>+  (nftw file
>+        (lambda (filename statinfo flag base level)
>+          (catch 'system-error
>+            (lambda ()
>+              (when (member flag '(regular directory symlink))
>+                (lchown filename owner group)))
>+            (lambda args
>+              (format (current-error-port)
>+                      "warning: failed to chown ~s: ~a~%"
>+                      filename
>+                      (strerror (system-error-errno args)))))
>+          #t)
>+        'physical))

This is racy (compare with mkdir-p/perms for example).
This race can be resolved by using 'openat' & 'chownat' &
'AT_SYMLINK_NOFOLLOW' from
<https://lists.gnu.org/archive/html/guile-devel/2021-11/msg00005.html>.

Greetings,
Maxime.





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-12-22 19:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-12 15:13 bug#52452: Guix related downloads from ftp.gnu.org are slow over IPv6 Christopher Baines
2021-12-22 19:14 ` bug#52452: PATCH v2 2/4] activation: Add 'lchown-recursive' Maxime Devos

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).