Subject: Re: [bug#77396] [PATCH v2 1/2] least-authority: Preserve systemd LISTEN_* environment variables.

From: Ludovic Courtès <[email-masked]>
Date: Thu, 03 Apr 2025 11:29:28 +0200

Maxim Cournoyer <[email-masked]> skribis:

> Otherwise, combining make-systemd-constructor with least-authority-wrapper
> would not work correctly out of the box.
>
> * guix/least-authority.scm (%precious-variables): Rename to...
> (%default-preserved-environment-variables): ... this, and export it.
> Add "LISTEN_PID" "LISTEN_FDS" "LISTEN_FDNAMES" environment variables.
> (least-authority-wrapper): Adjust accordingly.
>
> Change-Id: Idd259b15463920965f530e1917d76bf97def3b7b

[...]

> -(define %precious-variables
> +(define %default-preserved-environment-variables
>    ;; Environment variables preserved by the wrapper by default.
> -  '("HOME" "USER" "LOGNAME" "DISPLAY" "XAUTHORITY" "TERM" "TZ" "PAGER"))
> +  '("HOME" "USER" "LOGNAME" "DISPLAY" "XAUTHORITY" "TERM" "TZ" "PAGER"
> +    "LISTEN_PID" "LISTEN_FDS" "LISTEN_FDNAMES")) ;for make-systemd-constructor

I would not export this variable, but otherwise LGTM!

Thanks,
Ludo’.