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
1 files changed, 2 insertions(+), 1 deletions(-) M gnu/build/activation.scm
M gnu/build/activation.scm => gnu/build/activation.scm +2 -1
@@ 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