1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 06:07:34 +00:00

Ports: Update dropbear port to 2022.82

This commit is contained in:
Patrick Meyer 2022-04-28 01:50:11 +00:00 committed by Brian Gianforcaro
parent f8c81b2f01
commit 03d38e3ab8
7 changed files with 64 additions and 56 deletions

View file

@ -38,7 +38,7 @@ Please make sure to keep this list up to date when adding and updating ports. :^
| [`dosbox-staging`](dosbox-staging/) | DOSBox Staging | 0.76.0 | https://dosbox-staging.github.io/ | | [`dosbox-staging`](dosbox-staging/) | DOSBox Staging | 0.76.0 | https://dosbox-staging.github.io/ |
| [`drascula`](drascula/) | Dráscula: The Vampire Strikes Back | 1.0 | https://www.scummvm.org/games/#games-drascula | | [`drascula`](drascula/) | Dráscula: The Vampire Strikes Back | 1.0 | https://www.scummvm.org/games/#games-drascula |
| [`dreamweb`](dreamweb/) | DreamWeb | 1.1 | https://www.scummvm.org/games/#games-dreamweb | | [`dreamweb`](dreamweb/) | DreamWeb | 1.1 | https://www.scummvm.org/games/#games-dreamweb |
| [`dropbear`](dropbear/) | Dropbear SSH | 2019.78 | https://dropbear.nl/mirror/dropbear.html | | [`dropbear`](dropbear/) | Dropbear SSH | 2022.82 | https://dropbear.nl/mirror/dropbear.html |
| [`dungeonrush`](dungeonrush/) | DungeonRush | 1.1-beta | https://github.com/Rapiz1/DungeonRush | | [`dungeonrush`](dungeonrush/) | DungeonRush | 1.1-beta | https://github.com/Rapiz1/DungeonRush |
| [`ed`](ed/) | GNU ed | 1.18 | https://www.gnu.org/software/ed/ | | [`ed`](ed/) | GNU ed | 1.18 | https://www.gnu.org/software/ed/ |
| [`emu2`](emu2/) | emu2 DOS emulator | 2021.01 | https://github.com/dmsc/emu2 | | [`emu2`](emu2/) | emu2 DOS emulator | 2021.01 | https://github.com/dmsc/emu2 |

View file

@ -1,12 +1,8 @@
#!/usr/bin/env -S bash ../.port_include.sh #!/usr/bin/env -S bash ../.port_include.sh
port=dropbear port=dropbear
version=2019.78 version=2022.82
files="https://mirror.dropbear.nl/mirror/releases/dropbear-${version}.tar.bz2 dropbear-${version}.tar.bz2 files="https://mirror.dropbear.nl/mirror/releases/dropbear-${version}.tar.bz2 dropbear-${version}.tar.bz2 3a038d2bbc02bf28bbdd20c012091f741a3ec5cbe460691811d714876aad75d1"
https://mirror.dropbear.nl/mirror/releases/dropbear-${version}.tar.bz2.asc dropbear-${version}.tar.bz2.asc auth_type="sha256"
https://mirror.dropbear.nl/mirror/releases/dropbear-key-2015.asc dropbear-key-2015.asc"
auth_type="sig"
auth_opts=("--keyring" "./dropbear-key-2015.asc" "dropbear-${version}.tar.bz2.asc")
useconfigure=true useconfigure=true
use_fresh_config_sub=true use_fresh_config_sub=true
# don't care about zlib, less deps is better # don't care about zlib, less deps is better

View file

@ -1,6 +1,8 @@
--- a/default_options.h.orig diff --git a/default_options.h b/default_options.h
index 536f4e7..5073b7c 100644
--- a/default_options.h
+++ b/default_options.h +++ b/default_options.h
@@ -59,8 +59,8 @@ @@ -72,8 +72,8 @@ IMPORTANT: Some options will require "make clean" after changes */
#define DROPBEAR_SVR_REMOTETCPFWD 1 #define DROPBEAR_SVR_REMOTETCPFWD 1
/* Enable Authentication Agent Forwarding */ /* Enable Authentication Agent Forwarding */
@ -11,7 +13,7 @@
/* Note: Both DROPBEAR_CLI_PROXYCMD and DROPBEAR_CLI_NETCAT must be set to /* Note: Both DROPBEAR_CLI_PROXYCMD and DROPBEAR_CLI_NETCAT must be set to
* allow multihop dbclient connections */ * allow multihop dbclient connections */
@@ -179,7 +179,7 @@ @@ -210,7 +210,7 @@ group1 in Dropbear server too */
/* Authentication Types - at least one required. /* Authentication Types - at least one required.
RFC Draft requires pubkey auth, and recommends password */ RFC Draft requires pubkey auth, and recommends password */

View file

@ -1,34 +1,10 @@
I patch both configure.ac and configure itself (though only configure is required for the build) I patch both configure.ac and configure itself (though only configure is required for the build)
Serenity's GCC doesn't support SSP, so this is disabled. Serenity's GCC doesn't support SSP, so this is disabled.
--- a/configure.ac.orig diff --git a/configure b/configure
+++ b/configure.ac index 8374714..8c9eb9a 100755
@@ -99,22 +99,7 @@ --- a/configure
[AC_MSG_NOTICE([Not setting $TESTFLAGS]); LDFLAGS="$OLDLDFLAGS" ]
)
fi # non-static
- # stack protector. -strong is good but only in gcc 4.9 or later
- OLDCFLAGS="$CFLAGS"
- TESTFLAGS="-fstack-protector-strong"
- CFLAGS="$CFLAGS $TESTFLAGS"
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
- [AC_MSG_NOTICE([Setting $TESTFLAGS])],
- [
- CFLAGS="$OLDCFLAGS"
- TESTFLAGS="-fstack-protector --param=ssp-buffer-size=4"
- CFLAGS="$CFLAGS $TESTFLAGS"
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
- [AC_MSG_NOTICE([Setting $TESTFLAGS])],
- [AC_MSG_NOTICE([Not setting $TESTFLAGS]); CFLAGS="$OLDCFLAGS" ]
- )
- ]
- )
+
# FORTIFY_SOURCE
DB_TRYADDCFLAGS([-D_FORTIFY_SOURCE=2])
--- a/configure.orig
+++ b/configure +++ b/configure
@@ -3357,53 +3357,7 @@ @@ -3381,53 +3381,7 @@ fi
rm -f core conftest.err conftest.$ac_objext \ rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext conftest$ac_exeext conftest.$ac_ext
fi # non-static fi # non-static
@ -38,11 +14,11 @@ Serenity's GCC doesn't support SSP, so this is disabled.
- CFLAGS="$CFLAGS $TESTFLAGS" - CFLAGS="$CFLAGS $TESTFLAGS"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext - cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */ -/* end confdefs.h. */
-
-int -int
-main () -main ()
-{ -{
-
- ; - ;
- return 0; - return 0;
-} -}
@ -82,3 +58,31 @@ Serenity's GCC doesn't support SSP, so this is disabled.
# FORTIFY_SOURCE # FORTIFY_SOURCE
{ {
OLDFLAGS="$CFLAGS" OLDFLAGS="$CFLAGS"
diff --git a/configure.ac b/configure.ac
index 6a19479..28cd987 100644
--- a/configure.ac
+++ b/configure.ac
@@ -103,22 +103,7 @@ if test "$hardenbuild" -eq 1; then
[AC_MSG_NOTICE([Not setting $TESTFLAGS]); LDFLAGS="$OLDLDFLAGS" ]
)
fi # non-static
- # stack protector. -strong is good but only in gcc 4.9 or later
- OLDCFLAGS="$CFLAGS"
- TESTFLAGS="-fstack-protector-strong"
- CFLAGS="$CFLAGS $TESTFLAGS"
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
- [AC_MSG_NOTICE([Setting $TESTFLAGS])],
- [
- CFLAGS="$OLDCFLAGS"
- TESTFLAGS="-fstack-protector --param=ssp-buffer-size=4"
- CFLAGS="$CFLAGS $TESTFLAGS"
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
- [AC_MSG_NOTICE([Setting $TESTFLAGS])],
- [AC_MSG_NOTICE([Not setting $TESTFLAGS]); CFLAGS="$OLDCFLAGS" ]
- )
- ]
- )
+
# FORTIFY_SOURCE
DB_TRYADDCFLAGS([-D_FORTIFY_SOURCE=2])

View file

@ -1,7 +1,9 @@
Not sure why this is missing, but okay. Not sure why this is missing, but okay.
--- a/includes.h.orig diff --git a/includes.h b/includes.h
index 1e00002..2208f94 100644
--- a/includes.h
+++ b/includes.h +++ b/includes.h
@@ -38,6 +38,7 @@ @@ -37,6 +37,7 @@
#include <sys/un.h> #include <sys/un.h>
#include <sys/wait.h> #include <sys/wait.h>
#include <sys/resource.h> #include <sys/resource.h>

View file

@ -1,7 +1,9 @@
Serenity doesn't use /sbin. Serenity doesn't use /sbin.
--- a/Makefile.in.orig diff --git a/Makefile.in b/Makefile.in
index e824491..f30f508 100644
--- a/Makefile.in
+++ b/Makefile.in +++ b/Makefile.in
@@ -87,7 +87,7 @@ @@ -97,7 +97,7 @@ prefix=@prefix@
exec_prefix=@exec_prefix@ exec_prefix=@exec_prefix@
datarootdir = @datarootdir@ datarootdir = @datarootdir@
bindir=@bindir@ bindir=@bindir@

View file

@ -1,15 +1,17 @@
--- b/netio.c.orig diff --git a/netio.c b/netio.c
index 2ed9bb1..e0e9962 100644
--- a/netio.c
+++ b/netio.c +++ b/netio.c
@@ -294,7 +294,7 @@ @@ -304,7 +304,7 @@ void packet_queue_to_iovec(const struct Queue *queue, struct iovec *iov, unsigne
buffer *writebuf; buffer *writebuf;
#ifndef IOV_MAX #ifndef IOV_MAX
- #if defined(__CYGWIN__) && !defined(UIO_MAXIOV) - #if defined(__CYGWIN__) && !defined(UIO_MAXIOV)
+ #if !defined(UIO_MAXIOV) + #if !defined(UIO_MAXIOV)
#define IOV_MAX 1024 #define IOV_MAX 1024
#else #elif defined(__sgi)
#define IOV_MAX UIO_MAXIOV #define IOV_MAX 512
@@ -334,11 +334,7 @@ @@ -346,11 +346,7 @@ void packet_queue_consume(struct Queue *queue, ssize_t written) {
} }
void set_sock_nodelay(int sock) { void set_sock_nodelay(int sock) {
@ -22,15 +24,15 @@
} }
#if DROPBEAR_SERVER_TCP_FAST_OPEN #if DROPBEAR_SERVER_TCP_FAST_OPEN
@@ -448,7 +444,6 @@ @@ -469,7 +465,6 @@ int dropbear_listen(const char* address, const char* port,
struct addrinfo hints, *res = NULL, *res0 = NULL; struct addrinfo hints, *res = NULL, *res0 = NULL;
int err; int err;
unsigned int nsock; unsigned int nsock;
- struct linger linger; - struct linger linger;
int val; int val;
int sock; int sock;
uint16_t *allocated_lport_p = NULL;
@@ -527,9 +522,6 @@ @@ -548,9 +543,6 @@ int dropbear_listen(const char* address, const char* port,
val = 1; val = 1;
/* set to reuse, quick timeout */ /* set to reuse, quick timeout */
setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (void*) &val, sizeof(val)); setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (void*) &val, sizeof(val));