From 8ecd916380774a271376cd6398acd6dfdb826bbb Mon Sep 17 00:00:00 2001 From: Tee KOBAYASHI Date: Fri, 4 Nov 2022 18:42:51 +0900 Subject: [PATCH] putty: Bump to 0.78 --- x11-packages/putty/build.sh | 10 +-- x11-packages/putty/fix-hardcoded-paths.patch | 75 +++++++++++++++++++ x11-packages/putty/no-priv-drop.patch | 13 ++-- .../putty/putty-0.70_unix_uxnet.c.patch | 12 --- .../putty/putty-0.70_unix_uxnoise.c.patch | 12 --- .../putty/putty-0.70_unix_uxpgnt.c.patch | 12 --- .../putty/putty-0.70_unix_uxproxy.c.patch | 12 --- .../putty/putty-0.70_unix_uxshare.c.patch | 12 --- 8 files changed, 85 insertions(+), 73 deletions(-) create mode 100644 x11-packages/putty/fix-hardcoded-paths.patch delete mode 100644 x11-packages/putty/putty-0.70_unix_uxnet.c.patch delete mode 100644 x11-packages/putty/putty-0.70_unix_uxnoise.c.patch delete mode 100644 x11-packages/putty/putty-0.70_unix_uxpgnt.c.patch delete mode 100644 x11-packages/putty/putty-0.70_unix_uxproxy.c.patch delete mode 100644 x11-packages/putty/putty-0.70_unix_uxshare.c.patch diff --git a/x11-packages/putty/build.sh b/x11-packages/putty/build.sh index 5b72af261a..95497f27b5 100644 --- a/x11-packages/putty/build.sh +++ b/x11-packages/putty/build.sh @@ -2,13 +2,11 @@ TERMUX_PKG_HOMEPAGE=https://www.chiark.greenend.org.uk/~sgtatham/putty/ TERMUX_PKG_DESCRIPTION="A terminal integrated SSH/Telnet client" TERMUX_PKG_LICENSE="MIT" TERMUX_PKG_MAINTAINER="@termux" -TERMUX_PKG_VERSION=0.76 -TERMUX_PKG_REVISION=4 +TERMUX_PKG_VERSION=0.78 TERMUX_PKG_SRCURL=https://the.earth.li/~sgtatham/putty/${TERMUX_PKG_VERSION}/putty-${TERMUX_PKG_VERSION}.tar.gz -TERMUX_PKG_SHA256=547cd97a8daa87ef71037fab0773bceb54a8abccb2f825a49ef8eba5e045713f -TERMUX_PKG_DEPENDS="atk, gdk-pixbuf, glib, gtk3, libandroid-glob, libandroid-shmem, libcairo, libx11, pango" +TERMUX_PKG_SHA256=274e01bcac6bd155dfd647b2f18f791b4b17ff313753aa919fcae2e32d34614f +TERMUX_PKG_DEPENDS="gdk-pixbuf, glib, gtk3, libandroid-glob, libandroid-shmem, libcairo, libx11, pango" termux_step_pre_configure() { - export CFLAGS="${CFLAGS} -Wno-deprecated-declarations" - export LIBS="-landroid-glob -landroid-shmem" + LDFLAGS+=" -landroid-glob -landroid-shmem" } diff --git a/x11-packages/putty/fix-hardcoded-paths.patch b/x11-packages/putty/fix-hardcoded-paths.patch new file mode 100644 index 0000000000..429c966a27 --- /dev/null +++ b/x11-packages/putty/fix-hardcoded-paths.patch @@ -0,0 +1,75 @@ +--- a/ssh/sesschan.c ++++ b/ssh/sesschan.c +@@ -482,7 +482,7 @@ + agent->cl = cl; + agent->plug.vt = &agentfwd_plugvt; + +- char *dir_prefix = dupprintf("/tmp/%s-agentfwd", appname); ++ char *dir_prefix = dupprintf("@TERMUX_PREFIX@/tmp/%s-agentfwd", appname); + char *error = NULL, *socketname = NULL; + agent->socket = platform_make_agent_socket( + &agent->plug, dir_prefix, &error, &socketname); +--- a/unix/network.c ++++ b/unix/network.c +@@ -29,7 +29,7 @@ + #endif + + #ifndef X11_UNIX_PATH +-# define X11_UNIX_PATH "/tmp/.X11-unix/X" ++# define X11_UNIX_PATH "@TERMUX_PREFIX@/tmp/.X11-unix/X" + #endif + + /* +--- a/unix/noise.c ++++ b/unix/noise.c +@@ -70,7 +70,7 @@ + exit(1); + } + +- fp = popen("ls -al /tmp 2>/dev/null", "r"); ++ fp = popen("ls -al @TERMUX_PREFIX@/tmp 2>/dev/null", "r"); + if (fp) { + while ( (ret = fread(buf, 1, sizeof(buf), fp)) > 0) + func(buf, ret); +--- a/unix/pageant.c ++++ b/unix/pageant.c +@@ -233,7 +233,7 @@ + /* Nothing needs doing in Unix Pageant */ + } + +-#define PAGEANT_DIR_PREFIX "/tmp/pageant" ++#define PAGEANT_DIR_PREFIX "@TERMUX_PREFIX@/tmp/pageant" + + static bool time_to_die = false; + +--- a/unix/sharing.c ++++ b/unix/sharing.c +@@ -19,7 +19,7 @@ + #include "proxy/proxy.h" + #include "ssh.h" + +-#define CONNSHARE_SOCKETDIR_PREFIX "/tmp/putty-connshare" ++#define CONNSHARE_SOCKETDIR_PREFIX "@TERMUX_PREFIX@/tmp/putty-connshare" + #define SALT_FILENAME "salt" + #define SALT_SIZE 64 + #ifndef PIPE_BUF +--- a/unix/x11.c ++++ b/unix/x11.c +@@ -117,7 +117,7 @@ + * but it's worth a try, and we don't consider it a fatal error if + * it doesn't work. + */ +- unix_path = dupprintf("/tmp/.X11-unix/X%d", displayno); ++ unix_path = dupprintf("@TERMUX_PREFIX@/tmp/.X11-unix/X%d", displayno); + a_unix = unix_sock_addr(unix_path); + + sockets[nsockets] = new_unix_listener(a_unix, plug); +@@ -138,7 +138,7 @@ + + tmpdir = getenv("TMPDIR"); + if (!tmpdir || !*tmpdir) +- tmpdir = "/tmp"; ++ tmpdir = "@TERMUX_PREFIX@/tmp"; + + authfilename = dupcat(tmpdir, "/", progname, "-Xauthority-XXXXXX"); + diff --git a/x11-packages/putty/no-priv-drop.patch b/x11-packages/putty/no-priv-drop.patch index 2f2d92d6fc..789d97ae9a 100644 --- a/x11-packages/putty/no-priv-drop.patch +++ b/x11-packages/putty/no-priv-drop.patch @@ -1,19 +1,18 @@ -diff -uNr putty-0.73/unix/uxpty.c putty-0.73.mod/unix/uxpty.c ---- putty-0.73/unix/uxpty.c 2019-09-22 12:14:52.000000000 +0300 -+++ putty-0.73.mod/unix/uxpty.c 2020-09-23 19:29:25.338141793 +0300 -@@ -562,6 +562,7 @@ +--- a/unix/pty.c ++++ b/unix/pty.c +@@ -563,6 +563,7 @@ #endif } +#ifndef __ANDROID__ /* Drop privs. */ { - #ifndef HAVE_NO_SETRESUID -@@ -587,6 +588,7 @@ + #if HAVE_SETRESUID && HAVE_SETRESGID +@@ -588,6 +589,7 @@ } #endif } -+#endif ++#endif /* __ANDROID__ */ #endif /* NO_PTY_PRE_INIT */ diff --git a/x11-packages/putty/putty-0.70_unix_uxnet.c.patch b/x11-packages/putty/putty-0.70_unix_uxnet.c.patch deleted file mode 100644 index e465317883..0000000000 --- a/x11-packages/putty/putty-0.70_unix_uxnet.c.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -uNr putty-0.70/unix/uxnet.c putty-0.70.mod/unix/uxnet.c ---- putty-0.70/unix/uxnet.c 2017-07-04 22:30:56.000000000 +0300 -+++ putty-0.70.mod/unix/uxnet.c 2018-10-05 20:12:44.594090518 +0300 -@@ -30,7 +30,7 @@ - #endif - - #ifndef X11_UNIX_PATH --# define X11_UNIX_PATH "/tmp/.X11-unix/X" -+# define X11_UNIX_PATH "@TERMUX_PREFIX@/tmp/.X11-unix/X" - #endif - - /* diff --git a/x11-packages/putty/putty-0.70_unix_uxnoise.c.patch b/x11-packages/putty/putty-0.70_unix_uxnoise.c.patch deleted file mode 100644 index e357c89a13..0000000000 --- a/x11-packages/putty/putty-0.70_unix_uxnoise.c.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -uNr putty-0.70/unix/uxnoise.c putty-0.70.mod/unix/uxnoise.c ---- putty-0.70/unix/uxnoise.c 2017-07-04 22:30:56.000000000 +0300 -+++ putty-0.70.mod/unix/uxnoise.c 2018-10-05 20:12:53.697446775 +0300 -@@ -70,7 +70,7 @@ - exit(1); - } - -- fp = popen("ls -al /tmp 2>/dev/null", "r"); -+ fp = popen("ls -al @TERMUX_PREFIX@/tmp 2>/dev/null", "r"); - if (fp) { - while ( (ret = fread(buf, 1, sizeof(buf), fp)) > 0) - func(buf, ret); diff --git a/x11-packages/putty/putty-0.70_unix_uxpgnt.c.patch b/x11-packages/putty/putty-0.70_unix_uxpgnt.c.patch deleted file mode 100644 index 3c7d5aff48..0000000000 --- a/x11-packages/putty/putty-0.70_unix_uxpgnt.c.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -uNr putty-0.70/unix/uxpgnt.c putty-0.70.mod/unix/uxpgnt.c ---- putty-0.70/unix/uxpgnt.c 2017-07-04 22:30:56.000000000 +0300 -+++ putty-0.70.mod/unix/uxpgnt.c 2018-10-05 20:13:03.107470567 +0300 -@@ -153,7 +153,7 @@ - /* Nothing needs doing in Unix Pageant */ - } - --#define PAGEANT_DIR_PREFIX "/tmp/pageant" -+#define PAGEANT_DIR_PREFIX "@TERMUX_PREFIX@/tmp/pageant" - - const char *const appname = "Pageant"; - diff --git a/x11-packages/putty/putty-0.70_unix_uxproxy.c.patch b/x11-packages/putty/putty-0.70_unix_uxproxy.c.patch deleted file mode 100644 index c3cf896cd4..0000000000 --- a/x11-packages/putty/putty-0.70_unix_uxproxy.c.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -uNr putty-0.73/unix/uxproxy.c putty-0.73.mod/unix/uxproxy.c ---- putty-0.73/unix/uxproxy.c 2019-09-22 12:14:52.000000000 +0300 -+++ putty-0.73.mod/unix/uxproxy.c 2019-10-28 15:01:54.259328879 +0200 -@@ -62,7 +62,7 @@ - dup2(cmd_err_pipe[1], 2); - noncloexec(0); - noncloexec(1); -- execl("/bin/sh", "sh", "-c", cmd, (void *)NULL); -+ execl("@TERMUX_PREFIX@/bin/sh", "sh", "-c", cmd, (void *)NULL); - _exit(255); - } - diff --git a/x11-packages/putty/putty-0.70_unix_uxshare.c.patch b/x11-packages/putty/putty-0.70_unix_uxshare.c.patch deleted file mode 100644 index 8935f2c6b4..0000000000 --- a/x11-packages/putty/putty-0.70_unix_uxshare.c.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -uNr putty-0.70/unix/uxshare.c putty-0.70.mod/unix/uxshare.c ---- putty-0.70/unix/uxshare.c 2017-07-04 22:30:56.000000000 +0300 -+++ putty-0.70.mod/unix/uxshare.c 2018-10-05 20:13:10.914157046 +0300 -@@ -20,7 +20,7 @@ - #include "proxy.h" - #include "ssh.h" - --#define CONNSHARE_SOCKETDIR_PREFIX "/tmp/putty-connshare" -+#define CONNSHARE_SOCKETDIR_PREFIX "@TERMUX_PREFIX@/tmp/putty-connshare" - #define SALT_FILENAME "salt" - #define SALT_SIZE 64 -