From 27e62d4481a02f1016c7a72bedb946d92ceecf49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Wed, 23 Apr 2025 10:50:17 +0200 Subject: [PATCH] =?UTF-8?q?activation:=20Fix=20=E2=80=98mkdir-p/perms?= =?UTF-8?q?=E2=80=99=20on=20the=20Hurd.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes . 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 #) 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 Change-Id: I74f90599338772ba4341067215b864273aa30b3e --- gnu/build/activation.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gnu/build/activation.scm b/gnu/build/activation.scm index 11f7c82d675c85b63efb7a81ccce21d61ac18f2b..272a78929106345de318bf24b8f87afcd53f69d6 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 +;;; Copyright © 2012-2021, 2025 Ludovic Courtès ;;; Copyright © 2013 Nikita Karetnikov ;;; Copyright © 2013 Andreas Enge ;;; Copyright © 2015, 2018 Mark H Weaver @@ -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