all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Danny O'Brien" <danny@spesh.com>
To: Leo Prikler <leo.prikler@student.tugraz.at>
Cc: 38243@debbugs.gnu.org
Subject: bug#38243: Zsh does not load /etc/profile values by default
Date: Sat, 7 Dec 2019 22:15:53 -0800	[thread overview]
Message-ID: <CAAkY2sdQN9Vczi=5_a_-=tZU8kwnd+Mhen--Lh_3maCu7NfaVQ@mail.gmail.com> (raw)
In-Reply-To: <02c4cef07e9f519697b9bbe9c6ab116fa2e2a404.camel@student.tugraz.at>

[-- Attachment #1: Type: text/plain, Size: 2256 bytes --]

On Sun, Nov 17, 2019 at 5:22 AM Leo Prikler <leo.prikler@student.tugraz.at>
wrote:

> > Not sure what the correct approach should be here. We could symlink
> > /etc/zprofile to /etc/profile , but that would require knowing that
> > /etc/profile was always available. Or we could include a source'ing
> > of
> > /etc/profile in /etc/zprofile.
>

I took a closer look at this, and currently Zsh users have /etc/profile
included in their environment by virtue of a default $HOME/.zprofile, which
is created in their home directory when they are created (via `useradd` and
/etc/skel ).

I'm a little stuck to know what to do here -- if we source /etc/profile in
/etc/zprofile, then we risk sourcing it twice for users who have the
current default ~/.zprofile already in their home directories`. OTOH, if
users come to Guix System with their own pre-existing home directory, then
they may well struggle --- as I did -- because important environment
variables aren't set by their established ~/.zshrc, ~/.zprofile or
~/.zlogin setups.

I *think* the right thing to do is to drop the current /etc/skel/.zprofile
and establish that /etc/zprofile (and other shells) should source
/etc/profile . Guix System does a lot of setup in /etc/profile including
including $GUIX_PROFILE/etc/profile.  It would be best if this
automatically happened, whatever is going on in individual home
directories. I'm a Guix newbie though, so I'm happy to take advice!
Archlinux has a one-line /etc/zprofile which sources /etc/profile ; Debian
does not; I have not checked other distributions, but I could.

A couple of Guix commits where the current behavior was established:

commit 2f4d43584cb26315c028dfbd2197da0d175933a2
Author: Chris Marusich <cmmarusich@gmail.com>
Date:   Sat Oct 13 22:50:36 2018 -0700

    system: Rename .zlogin to .zprofile.

    Reported by Meiyo Peng <meiyo.peng@gmail.com>.

    * gnu/system/shadow.scm (default-skeletons): Rename zlogin to zprofile.

commit 02f707c590fa3c5bbd74168468bf561b47317f71
Author: Sou Bunnbu (宋文武) <iyzsong@gmail.com>
Date:   Fri Dec 5 21:17:49 2014 +0800

    system: Add skeleton '.zlogin'.

    * gnu/system/shadow.scm (default-skeletons): Add .zlogin.

Best,

d.

[-- Attachment #2: Type: text/html, Size: 2985 bytes --]

  reply	other threads:[~2019-12-08  6:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-17  7:14 bug#38243: Zsh does not load /etc/profile values by default Danny O'Brien
2019-11-17 13:21 ` Leo Prikler
2019-12-08  6:15   ` Danny O'Brien [this message]
2019-12-08  9:01     ` Leo Prikler
2019-11-17 21:42 ` 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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAAkY2sdQN9Vczi=5_a_-=tZU8kwnd+Mhen--Lh_3maCu7NfaVQ@mail.gmail.com' \
    --to=danny@spesh.com \
    --cc=38243@debbugs.gnu.org \
    --cc=leo.prikler@student.tugraz.at \
    /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 external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.