diff options
author | Ludovic Courtès <ludo@gnu.org> | 2025-04-23 10:50:17 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2025-04-23 12:25:45 +0200 |
commit | 27e62d4481a02f1016c7a72bedb946d92ceecf49 (patch) | |
tree | 2b63443744a6e02ef4a0c384067e85bef1ed8809 | |
parent | e042751c321b205166b9efa50a56442a7677cb1b (diff) | |
download | guix-27e62d4481a02f1016c7a72bedb946d92ceecf49.tar.gz guix-27e62d4481a02f1016c7a72bedb946d92ceecf49.zip |
activation: Fix ‘mkdir-p/perms’ on the Hurd.
Fixes <https://issues.guix.gnu.org/77992>.
Fixes a bug whereby ‘mkdir-p/perms’ would throw an exception on the
Hurd:
In gnu/build/activation.scm:
97:20 1 (mkdir-p/perms _ #("ludo" "x" 1000 998 "Ludovic…" …) …)
In unknown file:
0 (open "." 7340032 #<undefined>)
ERROR: In procedure open:
In procedure scm_fdes_to_port: requested file mode not available on fdes
This, in turn, would cause ‘user-homes’ to fail to start on the Hurd
since commit da741d89310efd0530351670d9c55ec2f952ab98.
* gnu/build/activation.scm (mkdir-p/perms): Add O_RDONLY to ‘open-flags’.
Reported-by: Yelninei <yelninei@tutamail.com>
Change-Id: I74f90599338772ba4341067215b864273aa30b3e
-rw-r--r-- | gnu/build/activation.scm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gnu/build/activation.scm b/gnu/build/activation.scm index 11f7c82d67..272a789291 100644 --- a/gnu/build/activation.scm +++ b/gnu/build/activation.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2012-2021, 2025 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org> ;;; Copyright © 2013 Andreas Enge <andreas@enge.fr> ;;; Copyright © 2015, 2018 Mark H Weaver <mhw@netris.org> @@ -90,6 +90,7 @@ and bits are set according to the default behaviour of 'mkdir'." ;; By combining O_NOFOLLOW and O_DIRECTORY, this procedure automatically ;; verifies that no components are symlinks. (define open-flags (logior O_CLOEXEC ; don't pass the port on to subprocesses + O_RDONLY ;needed on the Hurd, harmless on Linux O_NOFOLLOW ; don't follow symlinks O_DIRECTORY)) ; reject anything not a directory |