[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 33/33: daemon: Workaround issues for the Hurd.
From: |
Ludovic Courtès |
Subject: |
Re: 33/33: daemon: Workaround issues for the Hurd. |
Date: |
Tue, 10 Mar 2020 10:04:43 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) |
address@hidden skribis:
> commit c32b64950972a459af7192abd7a8bc9619c013e9
> Author: Manolis Ragkousis <address@hidden>
> AuthorDate: Wed Dec 28 02:49:22 2016 +0200
>
> daemon: Workaround issues for the Hurd.
>
> This allows for native builds on the Hurd, doing
>
> sudo ./pre-inst-env guix-daemon --disable-chroot
> --build-users-group=guixbuild &
> ./pre-inst-env guix build hello
>
> * nix/libstore/build.cc (DerivationGoal::startBuilder)[__GNU__]: Allow
> non-chrooted build.
> * nix/libutil/util.cc (killUser)[__GNU__]: Avoid wait failure.
[...]
> +++ b/nix/libstore/build.cc
> @@ -1824,7 +1824,7 @@ void DerivationGoal::startBuilder()
> }
>
> if (useChroot) {
> -#if CHROOT_ENABLED
> +#if CHROOT_ENABLED || __GNU__
Can we instead change the #define CHROOT_ENABLED such that
CHROOT_ENABLED is always true when __GNU__? Also with a comment stating
that GNU supports chroot(2) without being root.
> +++ b/nix/libutil/util.cc
> @@ -872,9 +872,11 @@ void killUser(uid_t uid)
> _exit(0);
> });
>
> +#if !__GNU__
> int status = pid.wait(true);
> if (status != 0)
> throw Error(format("cannot kill processes for uid `%1%': %2%") % uid
> % statusToString(status));
> +#endif
Do you know what the rationale was? It looks like it could leave
zombies behind us.
Ludo’.
- Re: 33/33: daemon: Workaround issues for the Hurd.,
Ludovic Courtès <=