diff --git a/ports/openssh/build.sh b/ports/openssh/build.sh index 474184c9..b8d5df1e 100755 --- a/ports/openssh/build.sh +++ b/ports/openssh/build.sh @@ -9,13 +9,10 @@ MAKE_INSTALL_TARGETS=('install-nokeys') CONFIGURE_OPTIONS=( '--sysconfdir=/etc' '--sbindir=/usr/bin' + '--disable-utmpx' 'CFLAGS=-Wno-deprecated-declarations' ) -post_configure() { - sed -i 's|#define HAVE_IFADDRS_H 1|/* #undef HAVE_IFADDRS_H */|' config.h || exit 1 -} - post_install() { passwd="$BANAN_SYSROOT/etc/passwd" test "$(tail -c 1 "$passwd")" && echo >> $passwd diff --git a/ports/openssh/patches/0005-dont-require-maildir.patch b/ports/openssh/patches/0005-dont-require-maildir.patch new file mode 100644 index 00000000..1068bf05 --- /dev/null +++ b/ports/openssh/patches/0005-dont-require-maildir.patch @@ -0,0 +1,17 @@ +diff -ruN openssh-10.2p1/session.c openssh-10.2p1-banan_os/session.c +--- openssh-10.2p1/session.c 2025-10-10 05:38:31.000000000 +0300 ++++ openssh-10.2p1-banan_os/session.c 2025-11-10 00:25:55.532121660 +0200 +@@ -1001,11 +1001,13 @@ + # endif /* HAVE_CYGWIN */ + #endif /* HAVE_LOGIN_CAP */ + ++#ifdef _PATH_MAILDIR + if (!options.use_pam) { + snprintf(buf, sizeof buf, "%.200s/%.50s", + _PATH_MAILDIR, pw->pw_name); + child_set_env(&env, &envsize, "MAIL", buf); + } ++#endif + + /* Normal systems set SHELL by default. */ + child_set_env(&env, &envsize, "SHELL", shell); diff --git a/ports/openssh/patches/0006-fix-i_link-definition.patch b/ports/openssh/patches/0006-fix-i_link-definition.patch new file mode 100644 index 00000000..7463f126 --- /dev/null +++ b/ports/openssh/patches/0006-fix-i_link-definition.patch @@ -0,0 +1,14 @@ +diff -ruN openssh-10.2p1/sftp.c openssh-10.2p1-banan_os/sftp.c +--- openssh-10.2p1/sftp.c 2025-10-10 05:38:31.000000000 +0300 ++++ openssh-10.2p1-banan_os/sftp.c 2025-11-10 00:25:55.532202816 +0200 +@@ -124,6 +124,10 @@ + #define VIEW_FLAGS (LS_LONG_VIEW|LS_SHORT_VIEW|LS_NUMERIC_VIEW|LS_SI_UNITS) + #define SORT_FLAGS (LS_NAME_SORT|LS_TIME_SORT|LS_SIZE_SORT) + ++#ifdef I_LINK ++#undef I_LINK ++#endif ++ + /* Commands for interactive mode */ + enum sftp_command { + I_CHDIR = 1, diff --git a/ports/openssh/patches/0007-dont-require-epfnotsupport.patch b/ports/openssh/patches/0007-dont-require-epfnotsupport.patch new file mode 100644 index 00000000..8d6822ed --- /dev/null +++ b/ports/openssh/patches/0007-dont-require-epfnotsupport.patch @@ -0,0 +1,30 @@ +diff -ruN openssh-10.2p1/openbsd-compat/bindresvport.c openssh-10.2p1-banan_os/openbsd-compat/bindresvport.c +--- openssh-10.2p1/openbsd-compat/bindresvport.c 2025-10-10 05:38:31.000000000 +0300 ++++ openssh-10.2p1-banan_os/openbsd-compat/bindresvport.c 2025-11-10 00:32:48.596625576 +0200 +@@ -84,7 +84,11 @@ + salen = sizeof(struct sockaddr_in6); + portp = &in6->sin6_port; + } else { ++#ifdef EPFNOSUPPORT + errno = EPFNOSUPPORT; ++#else ++ errno = EAFNOSUPPORT; ++#endif + return (-1); + } + sa->sa_family = af; +diff -ruN openssh-10.2p1/openbsd-compat/rresvport.c openssh-10.2p1-banan_os/openbsd-compat/rresvport.c +--- openssh-10.2p1/openbsd-compat/rresvport.c 2025-10-10 05:38:31.000000000 +0300 ++++ openssh-10.2p1-banan_os/openbsd-compat/rresvport.c 2025-11-10 00:32:48.610715933 +0200 +@@ -76,7 +76,11 @@ + portp = &((struct sockaddr_in6 *)sa)->sin6_port; + break; + default: ++#ifdef EPFNOSUPPORT + errno = EPFNOSUPPORT; ++#else ++ errno = EAFNOSUPPORT; ++#endif + return (-1); + } + sa->sa_family = af;