mirror of
https://github.com/termux-pacman/termux-packages.git
synced 2026-02-23 09:52:40 +00:00
fix(main/openssh): properly generate configuration files
This commit is contained in:
@@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="Secure shell for logging into a remote machine"
|
||||
TERMUX_PKG_LICENSE="BSD"
|
||||
TERMUX_PKG_MAINTAINER="Joshua Kahn @TomJo2000"
|
||||
TERMUX_PKG_VERSION="9.9p1"
|
||||
TERMUX_PKG_REVISION=2
|
||||
TERMUX_PKG_REVISION=3
|
||||
TERMUX_PKG_SRCURL=https://github.com/openssh/openssh-portable/archive/refs/tags/V_$(sed 's/\./_/g; s/p/_P/g' <<< $TERMUX_PKG_VERSION).tar.gz
|
||||
TERMUX_PKG_SHA256=e8858153f188754d0bbf109477690eba226132879b6840cf08b51afb38151040
|
||||
TERMUX_PKG_AUTO_UPDATE=true
|
||||
@@ -32,6 +32,7 @@ TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
|
||||
--with-privsep-path=$TERMUX_PREFIX/var/empty
|
||||
--with-xauth=$TERMUX_PREFIX/bin/xauth
|
||||
--with-kerberos5
|
||||
--with-default-path=$TERMUX_PREFIX/bin
|
||||
ac_cv_func_endgrent=yes
|
||||
ac_cv_func_fmt_scaled=no
|
||||
ac_cv_func_getlastlogxbyname=no
|
||||
@@ -87,14 +88,13 @@ termux_step_post_make_install() {
|
||||
|
||||
mkdir -p $TERMUX_PREFIX/etc/ssh/
|
||||
cp $TERMUX_PKG_SRCDIR/moduli $TERMUX_PREFIX/etc/ssh/moduli
|
||||
|
||||
mkdir -p $TERMUX_PREFIX/etc/ssh/ssh_config.d
|
||||
touch $TERMUX_PREFIX/etc/ssh/ssh_config.d/.placeholder
|
||||
mkdir -p $TERMUX_PREFIX/etc/ssh/sshd_config.d
|
||||
touch $TERMUX_PREFIX/etc/ssh/sshd_config.d/.placeholder
|
||||
}
|
||||
|
||||
termux_step_post_massage() {
|
||||
# Directories referenced by Include in ssh_config and sshd_config.
|
||||
mkdir -p etc/ssh/ssh_config.d
|
||||
mkdir -p etc/ssh/sshd_config.d
|
||||
|
||||
# Verify that we have man pages packaged (#1538).
|
||||
local manpage
|
||||
for manpage in ssh-keyscan.1 ssh-add.1 scp.1 ssh-agent.1 ssh.1; do
|
||||
|
||||
@@ -5,7 +5,7 @@ diff -uNr openssh-portable-V_9_9_P1/ssh_config openssh-portable-V_9_9_P1.mod/ssh
|
||||
# list of available options, their meanings and defaults, please see the
|
||||
# ssh_config(5) man page.
|
||||
|
||||
+Include @TERMUX_PREFIX@/etc/ssh/ssh_config.d/*.conf
|
||||
+Include /etc/ssh/ssh_config.d/*.conf
|
||||
+
|
||||
# Host *
|
||||
# ForwardAgent no
|
||||
|
||||
@@ -1,35 +1,17 @@
|
||||
diff -uNr openssh-portable-V_9_9_P1/sshd_config openssh-portable-V_9_9_P1.mod/sshd_config
|
||||
--- openssh-portable-V_9_9_P1/sshd_config 2024-09-20 01:20:48.000000000 +0300
|
||||
+++ openssh-portable-V_9_9_P1.mod/sshd_config 2024-09-20 21:17:58.227367401 +0300
|
||||
@@ -3,21 +3,23 @@
|
||||
# This is the sshd server system-wide configuration file. See
|
||||
# sshd_config(5) for more information.
|
||||
|
||||
-# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin
|
||||
+# This sshd was compiled with PATH=@TERMUX_PREFIX@/bin
|
||||
|
||||
# The strategy used for options in the default sshd_config shipped with
|
||||
# OpenSSH is to specify options with their default value where
|
||||
+++ openssh-portable-V_9_9_P1.mod/sshd_config 2024-09-22 13:52:50.784644276 +0300
|
||||
@@ -10,7 +10,9 @@
|
||||
# possible, but leave them commented. Uncommented options override the
|
||||
# default value.
|
||||
|
||||
-#Port 22
|
||||
+Include @TERMUX_PREFIX@/etc/ssh/sshd_config.d/*.conf
|
||||
+Include /etc/ssh/sshd_config.d/*.conf
|
||||
+
|
||||
+#Port 8022
|
||||
#AddressFamily any
|
||||
#ListenAddress 0.0.0.0
|
||||
#ListenAddress ::
|
||||
|
||||
-#HostKey /etc/ssh/ssh_host_rsa_key
|
||||
-#HostKey /etc/ssh/ssh_host_ecdsa_key
|
||||
-#HostKey /etc/ssh/ssh_host_ed25519_key
|
||||
+#HostKey @TERMUX_PREFIX@/etc/ssh/ssh_host_rsa_key
|
||||
+#HostKey @TERMUX_PREFIX@/etc/ssh/ssh_host_ecdsa_key
|
||||
+#HostKey @TERMUX_PREFIX@/etc/ssh/ssh_host_ed25519_key
|
||||
|
||||
# Ciphers and keying
|
||||
#RekeyLimit default none
|
||||
@@ -70,17 +72,6 @@
|
||||
#GSSAPIAuthentication no
|
||||
#GSSAPICleanupCredentials yes
|
||||
@@ -48,7 +30,7 @@ diff -uNr openssh-portable-V_9_9_P1/sshd_config openssh-portable-V_9_9_P1.mod/ss
|
||||
#AllowAgentForwarding yes
|
||||
#AllowTcpForwarding yes
|
||||
#GatewayPorts no
|
||||
@@ -89,24 +80,22 @@
|
||||
@@ -89,7 +80,6 @@
|
||||
#X11UseLocalhost yes
|
||||
#PermitTTY yes
|
||||
#PrintMotd yes
|
||||
@@ -56,22 +38,11 @@ diff -uNr openssh-portable-V_9_9_P1/sshd_config openssh-portable-V_9_9_P1.mod/ss
|
||||
#TCPKeepAlive yes
|
||||
#PermitUserEnvironment no
|
||||
#Compression delayed
|
||||
#ClientAliveInterval 0
|
||||
#ClientAliveCountMax 3
|
||||
#UseDNS no
|
||||
-#PidFile /var/run/sshd.pid
|
||||
+#PidFile @TERMUX_PREFIX@/var/run/sshd.pid
|
||||
@@ -99,7 +89,6 @@
|
||||
#PidFile /var/run/sshd.pid
|
||||
#MaxStartups 10:30:100
|
||||
#PermitTunnel no
|
||||
-#ChrootDirectory none
|
||||
#VersionAddendum none
|
||||
|
||||
# no default banner path
|
||||
#Banner none
|
||||
|
||||
# override default of no subsystems
|
||||
-Subsystem sftp /usr/libexec/sftp-server
|
||||
+Subsystem sftp @TERMUX_PREFIX@/libexec/sftp-server
|
||||
|
||||
# Example of overriding settings on a per-user basis
|
||||
#Match User anoncvs
|
||||
|
||||
Reference in New Issue
Block a user