From: iyzsong@member.fsf.org (宋文武)
To: guix-devel@gnu.org
Subject: shepherd services have unwanted environment variables
Date: Thu, 12 Sep 2019 07:51:40 +0800 [thread overview]
Message-ID: <87pnk69ysz.fsf@member.fsf.org> (raw)
Hello, when fixing an issue for our libvirtd service, I found that most
our shepherd services inherit the default environment variables of the
pid 1 'shepherd', which is:
--8<---------------cut here---------------start------------->8---
$ cat /proc/1/environ | tr '\0' '\n'
HOME=/
TERM=linux
BOOT_IMAGE=/gnu/store/xwp07fcvwj9dpjsr9z4x9l03z9jj7fgx-linux-5.2.8/bzImage
--root=system
--system=/gnu/store/58gir4yk5xj2lqzvlja8ml57z54k54n0-system
--load=/gnu/store/58gir4yk5xj2lqzvlja8ml57z54k54n0-system/boot
PATH=/gnu/store/q8bcf3cl33mq31y9k1wnwc895ng3qdq8-e2fsck-static-1.45.2/sbin
GUIX_LOCPATH=/gnu/store/94k5w17z54w25lgp90czdqfv9m4hwzhq-glibc-utf8-locales-2.28/lib/locale
--8<---------------cut here---------------end--------------->8---
Obviously, we don't want BOOT_IMAGE, --root, --system, --load here, and
this PATH is not good.
I think a resonable default could be:
LANG=<from operating-system>
GUIX_LOCPATH=/run/current-system/locale
LINUX_MODULE_DIRECTORY=/run/booted-system/kernel/lib/modules
PATH=/run/setuid-programs:/run/current-system/profile/bin:/run/current-system/profile/sbin
So we can have shepherd services running under the same locale
configured by user and finding runtime binaries (eg: for libvirtd to
find qemu) in standard places.
What do you think?
next reply other threads:[~2019-09-11 23:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-11 23:51 宋文武 [this message]
2019-09-16 16:04 ` shepherd services have unwanted environment variables Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87pnk69ysz.fsf@member.fsf.org \
--to=iyzsong@member.fsf.org \
--cc=guix-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).