commit: e6268410df9427a59a9a4f08a0a10f7139f5d3a4
Author: Eli Schwartz <eschwartz93 <AT> gmail <DOT> com>
AuthorDate: Mon Feb 19 06:07:41 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Feb 19 06:16:02 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e6268410
net-misc/openssh: use an officially supported approach to overriding xauth
Instead of patching out a header file, use the ./configure option
dedicated for this purpose. It has the side effect of correctly sed'ing
out config files / manpages with the updated location.
When not explicitly passed, the builtin default is used as a fallback,
but when USE=X, portage as an implementation detail guarantees that
xauth will be installed before openssh is compiled.
... as long as you don't use --buildpkg.
So, "probably" if you used USE=X the paths were correct, but:
- this is overall a poor approach to reliability
- it misses the point of also overriding the path when USE="-X"
- we just removed the USE flag and the RDEPEND
Signed-off-by: Eli Schwartz <eschwartz93 <AT> gmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>
net-misc/openssh/openssh-9.6_p1-r3.ebuild | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/net-misc/openssh/openssh-9.6_p1-r3.ebuild
b/net-misc/openssh/openssh-9.6_p1-r3.ebuild
index 164c30ecc6c8..3876e99bb31c 100644
--- a/net-misc/openssh/openssh-9.6_p1-r3.ebuild
+++ b/net-misc/openssh/openssh-9.6_p1-r3.ebuild
@@ -128,10 +128,6 @@ pkg_pretend() {
}
src_prepare() {
- sed -i \
- -e
"/_PATH_XAUTH/s:/usr/X11R6/bin/xauth:${EPREFIX}/usr/bin/xauth:" \
- pathnames.h || die
-
# don't break .ssh/authorized_keys2 for fun
sed -i '/^AuthorizedKeysFile/s:^:#:' sshd_config || die
@@ -185,6 +181,8 @@ src_configure() {
--datadir="${EPREFIX}"/usr/share/openssh
--with-privsep-path="${EPREFIX}"/var/empty
--with-privsep-user=sshd
+ # optional at runtime; guarantee a known path
+ --with-xauth="${EPREFIX}"/usr/bin/xauth
# --with-hardening adds the following in addition to flags we
# already set in our toolchain: