Github messages for voidlinux
 help / color / mirror / Atom feed
From: tornaria <tornaria@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: bash: define SSH_SOURCE_BASHRC
Date: Mon, 13 May 2024 23:57:28 +0200	[thread overview]
Message-ID: <20240513215728.685FB21CDE@inbox.vuxu.org> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-50280@inbox.vuxu.org>

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

New comment by tornaria on void-packages repository

https://github.com/void-linux/void-packages/pull/50280#issuecomment-2108871504

Comment:
The following would "fix" the default `PATH` in bash (to exclude `.`):
```diff
--- a/srcpkgs/bash/template
+++ b/srcpkgs/bash/template
@@ -24,7 +24,11 @@ alternatives="
  sh:sh:/usr/bin/bash
  sh:sh.1:/usr/share/man/man1/bash.1"
 
-CFLAGS="-DSSH_SOURCE_BASHRC -DNON_INTERACTIVE_LOGIN_SHELLS -DSYS_BASHRC='\"/etc/bash/bashrc\"'"
+CFLAGS="\
+ -DSSH_SOURCE_BASHRC \
+ -DNON_INTERACTIVE_LOGIN_SHELLS \
+ -DDEFAULT_PATH_VALUE='\"/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin\"' \
+ -DSYS_BASHRC='\"/etc/bash/bashrc\"'"
 
 post_install() {
        rm -r ${DESTDIR}/usr/share/doc
```

It's not a very common situation to start bash with unset `PATH`, so this is not that important.

----

On the other hand, adding `-DSSH_SOURCE_BASAHRC` is IMHO very, very, necessary, and the only way (afaik) to have a reasonable bash startup that works fine with ssh (e.g. to setup `PATH`, etc).

  parent reply	other threads:[~2024-05-13 21:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-11 20:54 [PR PATCH] " tornaria
2024-05-11 23:06 ` tornaria
2024-05-13 21:57 ` tornaria [this message]
2024-05-19  0:03 ` ahesford
2024-05-19 16:58 ` tornaria
2024-06-13 23:28 ` [PR PATCH] [Closed]: " abenson

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=20240513215728.685FB21CDE@inbox.vuxu.org \
    --to=tornaria@users.noreply.github.com \
    --cc=ml@inbox.vuxu.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.
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 NNTP newsgroup(s).