Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] openssh: fix default path
@ 2023-04-08  3:42 cattyhouse
  2023-04-08 16:29 ` cattyhouse
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: cattyhouse @ 2023-04-08  3:42 UTC (permalink / raw)
  To: ml

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

There is a new pull request by cattyhouse against master on the void-packages repository

https://github.com/cattyhouse/void-packages patch-1
https://github.com/void-linux/void-packages/pull/43338

openssh: fix default path
set default path to '/usr/local/sbin:/usr/local/bin:/usr/bin'. 

by default, openssh's default path is `/usr/bin:/bin:/usr/sbin:/sbin`, according to `appendpath` function in `/etc/profile`, /usr/local/{bin,sbin} will be append to the end of user's $PATH when it is a **ssh connection**. This fixes the issue.

[ref1 : archlinux](https://github.com/archlinux/svntogit-packages/blob/0a37d1bd869f9f1e4e6f9d6f5b249510f84140f0/trunk/PKGBUILD#L79)
[ref2 : alpine linux](https://git.alpinelinux.org/aports/tree/main/openssh/APKBUILD#n116)

A patch file from https://github.com/void-linux/void-packages/pull/43338.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-patch-1-43338.patch --]
[-- Type: text/x-diff, Size: 1420 bytes --]

From dd3f285f3c07a2c716764fab2c1ca994b39c0827 Mon Sep 17 00:00:00 2001
From: Justin <cattyhouse@users.noreply.github.com>
Date: Sat, 8 Apr 2023 11:36:28 +0800
Subject: [PATCH] openssh: fix default path

set default path to '/usr/local/sbin:/usr/local/bin:/usr/bin'.

by default, openssh's default path is '/usr/bin:/bin:/usr/sbin:/sbin', according to appendpath function in /etc/profile, /usr/local/{bin,sbin} will be append to the end of $PATH when it is a ssh connection. this fixes the issue.
---
 srcpkgs/openssh/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/openssh/template b/srcpkgs/openssh/template
index 88f39d31fbb3..b2c5926e7f66 100644
--- a/srcpkgs/openssh/template
+++ b/srcpkgs/openssh/template
@@ -1,7 +1,7 @@
 # Template file for 'openssh'
 pkgname=openssh
 version=9.3p1
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="--datadir=/usr/share/openssh
  --sysconfdir=/etc/ssh --without-selinux --with-privsep-user=nobody
@@ -9,6 +9,7 @@ configure_args="--datadir=/usr/share/openssh
  --disable-strip --with-privsep-path=/var/chroot/ssh
  --with-pid-dir=/run --with-pam
  --with-libedit --with-Werror
+ --with-default-path='/usr/local/sbin:/usr/local/bin:/usr/bin'
  $(vopt_if ldns --with-ldns=$XBPS_CROSS_BASE/usr)
  $(vopt_if ssl --with-ssl-engine --without-openssl)
  $(vopt_if gssapi --with-kerberos5=$XBPS_CROSS_BASE/usr --without-kerberos5)

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: openssh: fix default path
  2023-04-08  3:42 [PR PATCH] openssh: fix default path cattyhouse
@ 2023-04-08 16:29 ` cattyhouse
  2023-04-08 16:47 ` [PR PATCH] [Updated] " cattyhouse
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: cattyhouse @ 2023-04-08 16:29 UTC (permalink / raw)
  To: ml

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

New comment by cattyhouse on void-packages repository

https://github.com/void-linux/void-packages/pull/43338#issuecomment-1500927018

Comment:
i don't know how the CI works, looks like some job went ok, but others failed.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PR PATCH] [Updated] openssh: fix default path
  2023-04-08  3:42 [PR PATCH] openssh: fix default path cattyhouse
  2023-04-08 16:29 ` cattyhouse
@ 2023-04-08 16:47 ` cattyhouse
  2023-04-08 17:02 ` cattyhouse
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: cattyhouse @ 2023-04-08 16:47 UTC (permalink / raw)
  To: ml

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

There is an updated pull request by cattyhouse against master on the void-packages repository

https://github.com/cattyhouse/void-packages patch-1
https://github.com/void-linux/void-packages/pull/43338

openssh: fix default path
set default path to '/usr/local/sbin:/usr/local/bin:/usr/bin'. 

by default, openssh's default path is `/usr/bin:/bin:/usr/sbin:/sbin`, according to `appendpath` function in `/etc/profile`, /usr/local/{bin,sbin} will be append to the end of user's $PATH when it is a **ssh connection**. This fixes the issue.

[ref1 : archlinux](https://github.com/archlinux/svntogit-packages/blob/0a37d1bd869f9f1e4e6f9d6f5b249510f84140f0/trunk/PKGBUILD#L79)
[ref2 : alpine linux](https://git.alpinelinux.org/aports/tree/main/openssh/APKBUILD#n116)

@leahneukirchen @classabbyamp 

A patch file from https://github.com/void-linux/void-packages/pull/43338.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-patch-1-43338.patch --]
[-- Type: text/x-diff, Size: 2389 bytes --]

From dd3f285f3c07a2c716764fab2c1ca994b39c0827 Mon Sep 17 00:00:00 2001
From: Justin <cattyhouse@users.noreply.github.com>
Date: Sat, 8 Apr 2023 11:36:28 +0800
Subject: [PATCH 1/2] openssh: fix default path

set default path to '/usr/local/sbin:/usr/local/bin:/usr/bin'.

by default, openssh's default path is '/usr/bin:/bin:/usr/sbin:/sbin', according to appendpath function in /etc/profile, /usr/local/{bin,sbin} will be append to the end of $PATH when it is a ssh connection. this fixes the issue.
---
 srcpkgs/openssh/template | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/openssh/template b/srcpkgs/openssh/template
index 88f39d31fbb3..b2c5926e7f66 100644
--- a/srcpkgs/openssh/template
+++ b/srcpkgs/openssh/template
@@ -1,7 +1,7 @@
 # Template file for 'openssh'
 pkgname=openssh
 version=9.3p1
-revision=1
+revision=2
 build_style=gnu-configure
 configure_args="--datadir=/usr/share/openssh
  --sysconfdir=/etc/ssh --without-selinux --with-privsep-user=nobody
@@ -9,6 +9,7 @@ configure_args="--datadir=/usr/share/openssh
  --disable-strip --with-privsep-path=/var/chroot/ssh
  --with-pid-dir=/run --with-pam
  --with-libedit --with-Werror
+ --with-default-path='/usr/local/sbin:/usr/local/bin:/usr/bin'
  $(vopt_if ldns --with-ldns=$XBPS_CROSS_BASE/usr)
  $(vopt_if ssl --with-ssl-engine --without-openssl)
  $(vopt_if gssapi --with-kerberos5=$XBPS_CROSS_BASE/usr --without-kerberos5)

From bf312ad2d1f14d87f025225d287bc3c998bb1098 Mon Sep 17 00:00:00 2001
From: Justin <cattyhouse@users.noreply.github.com>
Date: Sun, 9 Apr 2023 00:47:55 +0800
Subject: [PATCH 2/2] remove single quote, it may confuse openssh

---
 srcpkgs/openssh/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/openssh/template b/srcpkgs/openssh/template
index b2c5926e7f66..86d3d1759e5d 100644
--- a/srcpkgs/openssh/template
+++ b/srcpkgs/openssh/template
@@ -9,7 +9,7 @@ configure_args="--datadir=/usr/share/openssh
  --disable-strip --with-privsep-path=/var/chroot/ssh
  --with-pid-dir=/run --with-pam
  --with-libedit --with-Werror
- --with-default-path='/usr/local/sbin:/usr/local/bin:/usr/bin'
+ --with-default-path=/usr/local/sbin:/usr/local/bin:/usr/bin
  $(vopt_if ldns --with-ldns=$XBPS_CROSS_BASE/usr)
  $(vopt_if ssl --with-ssl-engine --without-openssl)
  $(vopt_if gssapi --with-kerberos5=$XBPS_CROSS_BASE/usr --without-kerberos5)

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: openssh: fix default path
  2023-04-08  3:42 [PR PATCH] openssh: fix default path cattyhouse
  2023-04-08 16:29 ` cattyhouse
  2023-04-08 16:47 ` [PR PATCH] [Updated] " cattyhouse
@ 2023-04-08 17:02 ` cattyhouse
  2023-04-10  2:24 ` abenson
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: cattyhouse @ 2023-04-08 17:02 UTC (permalink / raw)
  To: ml

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

New comment by cattyhouse on void-packages repository

https://github.com/void-linux/void-packages/pull/43338#issuecomment-1500934541

Comment:
note: i did not test this PR as i don't have the dev environment, the editing was done on github web.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: openssh: fix default path
  2023-04-08  3:42 [PR PATCH] openssh: fix default path cattyhouse
                   ` (2 preceding siblings ...)
  2023-04-08 17:02 ` cattyhouse
@ 2023-04-10  2:24 ` abenson
  2023-04-10  2:49 ` cattyhouse
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: abenson @ 2023-04-10  2:24 UTC (permalink / raw)
  To: ml

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

New comment by abenson on void-packages repository

https://github.com/void-linux/void-packages/pull/43338#issuecomment-1501312247

Comment:
The commits need to be [squashed](https://www.git-tower.com/learn/git/faq/git-squash).  I don't think you can do this from the Web UI.

I'm not sure why the CI failed for the actual builds, that error shouldn't happen.  You should be able to fix the other issues identified in the `xlint` check.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: openssh: fix default path
  2023-04-08  3:42 [PR PATCH] openssh: fix default path cattyhouse
                   ` (3 preceding siblings ...)
  2023-04-10  2:24 ` abenson
@ 2023-04-10  2:49 ` cattyhouse
  2023-04-10  2:55 ` abenson
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: cattyhouse @ 2023-04-10  2:49 UTC (permalink / raw)
  To: ml

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

New comment by cattyhouse on void-packages repository

https://github.com/void-linux/void-packages/pull/43338#issuecomment-1501322828

Comment:
@abenson i don't have a dev environment. 

i discovered this by inserting `echo $PATH` at the first line of /etc/profile, and compare ssh vs tty login, and found it is due to sshd (strings /usr/bin/sshd | grep sbin). 

could you maybe create another PR and merge the patch, then this one could be closed. thanks

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: openssh: fix default path
  2023-04-08  3:42 [PR PATCH] openssh: fix default path cattyhouse
                   ` (4 preceding siblings ...)
  2023-04-10  2:49 ` cattyhouse
@ 2023-04-10  2:55 ` abenson
  2023-04-10  3:04 ` cattyhouse
  2023-04-27 12:57 ` [PR PATCH] [Closed]: " cattyhouse
  7 siblings, 0 replies; 9+ messages in thread
From: abenson @ 2023-04-10  2:55 UTC (permalink / raw)
  To: ml

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

New comment by abenson on void-packages repository

https://github.com/void-linux/void-packages/pull/43338#issuecomment-1501325224

Comment:
I can't recreate the problem you're describing.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: openssh: fix default path
  2023-04-08  3:42 [PR PATCH] openssh: fix default path cattyhouse
                   ` (5 preceding siblings ...)
  2023-04-10  2:55 ` abenson
@ 2023-04-10  3:04 ` cattyhouse
  2023-04-27 12:57 ` [PR PATCH] [Closed]: " cattyhouse
  7 siblings, 0 replies; 9+ messages in thread
From: cattyhouse @ 2023-04-10  3:04 UTC (permalink / raw)
  To: ml

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

New comment by cattyhouse on void-packages repository

https://github.com/void-linux/void-packages/pull/43338#issuecomment-1501331458

Comment:
> I can't recreate the problem you're describing.

it's easy to reproduce

1. edit `/etc/profile`
2. insert `echo "the PATH before appendpath is: $PATH"` **on the first line**
3. insert `echo "the PATH after appendpath is: $PATH"`  **on the last line**
4. ssh into it with any account

result you should see: 
the PATH after appendpath is `...:...:/usr/local/sbin:/usr/local/bin`, it makes /usr/local/{sbin,bin} in the end instead of in the beginning

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PR PATCH] [Closed]: openssh: fix default path
  2023-04-08  3:42 [PR PATCH] openssh: fix default path cattyhouse
                   ` (6 preceding siblings ...)
  2023-04-10  3:04 ` cattyhouse
@ 2023-04-27 12:57 ` cattyhouse
  7 siblings, 0 replies; 9+ messages in thread
From: cattyhouse @ 2023-04-27 12:57 UTC (permalink / raw)
  To: ml

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

There's a closed pull request on the void-packages repository

openssh: fix default path
https://github.com/void-linux/void-packages/pull/43338

Description:
set default path to '/usr/local/sbin:/usr/local/bin:/usr/bin'. 

by default, openssh's default path is `/usr/bin:/bin:/usr/sbin:/sbin`, according to `appendpath` function in `/etc/profile`, /usr/local/{bin,sbin} will be append to the end of user's $PATH when it is a **ssh connection**. This fixes the issue.

[ref1 : archlinux](https://github.com/archlinux/svntogit-packages/blob/0a37d1bd869f9f1e4e6f9d6f5b249510f84140f0/trunk/PKGBUILD#L79)
[ref2 : alpine linux](https://git.alpinelinux.org/aports/tree/main/openssh/APKBUILD#n116)

@leahneukirchen @classabbyamp 

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-04-27 12:57 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-08  3:42 [PR PATCH] openssh: fix default path cattyhouse
2023-04-08 16:29 ` cattyhouse
2023-04-08 16:47 ` [PR PATCH] [Updated] " cattyhouse
2023-04-08 17:02 ` cattyhouse
2023-04-10  2:24 ` abenson
2023-04-10  2:49 ` cattyhouse
2023-04-10  2:55 ` abenson
2023-04-10  3:04 ` cattyhouse
2023-04-27 12:57 ` [PR PATCH] [Closed]: " cattyhouse

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).