Upstream status: Adapted from upstream. From d3d968e5835f449d7ea715f45160db81ea906303 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Tue, 16 Aug 2022 20:29:54 +0200 Subject: [PATCH] Fix build on GNU/Hurd There is no path length limitation there, even via pathconf. But glibc provides a getcwd function that allocates the buffer dynamically so we can just leverage that. --- include/ghc/filesystem.hpp | 7 +++++++ 1 file changed, 7 insertions(+) --- a/filesystem/filesystem.hpp.orig 2022-08-11 22:14:32.000000000 +0200 +++ b/filesystem/filesystem.hpp 2023-06-13 07:26:25.310000000 +0200 @@ -4081,6 +4081,13 @@ return path(); } return path(std::wstring(buffer.get()), path::native_format); +#elif defined(__GLIBC__) + std::unique_ptr buffer { ::getcwd(NULL, 0), std::free }; + if (buffer == nullptr) { + ec = detail::make_system_error(); + return path(); + } + return path(buffer.get()); #else size_t pathlen = static_cast(std::max(int(::pathconf(".", _PC_PATH_MAX)), int(PATH_MAX))); std::unique_ptr buffer(new char[pathlen + 1]); href='/guix/log/etc/init.d'>logtreecommitdiff
AgeCommit message (Expand)Author
2024-06-26etc: Add explicit ‘--substitute-urls’ in guix-daemon service files....Having substitute URLs explicitly listed in the service startup file makes it clearer what should be modified to permanently change the list of substitute URLs. * config-daemon.ac: Rename ‘guix_substitute_urls’ to ‘GUIX_SUBSTITUTE_URLS’ and substitute it. * nix/local.mk (etc/guix-%.service, etc/init.d/guix-daemon) (etc/guix-%.conf): Substitute it. * etc/guix-daemon.conf.in, etc/guix-daemon.service.in, etc/init.d/guix-daemon.in: Add an explicit ‘--substitute-urls’ option. Change-Id: Ie491b7fab5c42e54dca582801c03805a85de2bf9 Ludovic Courtès
2021-07-07guix-install.sh: Prompt for configuring substitutes discovery....Also ensure prompt_yes_no always print the message with a trailing space, which is more pleasing to the eye. * etc/guix-daemon.conf.in <--discover=no>: New guix-daemon option. * etc/guix-daemon.service.in: Likewise. * etc/init.d/guix-daemon.in: Likewise. * etc/openrc/guix-daemon.in: Likewise. * etc/guix-install.sh (configure_substitute_discovery): New procedure. (sys_enable_guix_daemon): Ask the user whether automatic substitute discovery should be enabled. Set the '--discover' argument accordingly. (prompt_yes_no): Add a trailing space to the message. (sys_authorize_build_farms): Remove trailing space from the message argument. * NEWS (Distribution): Add news. Maxim Cournoyer