From 7f3c3259b20402c0d5cb7dfc751290720a9676aa Mon Sep 17 00:00:00 2001 From: Dave Hibberd Date: Thu, 27 Jul 2023 00:24:03 +0100 Subject: [PATCH 01/10] Comment out stuff I don't care for --- debian/rules | 1 + 1 file changed, 1 insertion(+) diff --git a/debian/rules b/debian/rules index adf355f..8f0e738 100755 --- a/debian/rules +++ b/debian/rules @@ -2,6 +2,7 @@ export DEB_BUILD_MAINT_OPTIONS=hardening=+all export NON_INTERACTIVE=1 +export DEB_CONFIGURE_EXTRA_FLAGS=--without-flexnet --without-tcpip --without-rose --without-autorouter --without-mheard %: dh $@ From 27f3de0c7bb591c67f2b26e15255d6533eb39972 Mon Sep 17 00:00:00 2001 From: Dave Hibberd Date: Thu, 27 Jul 2023 00:56:15 +0100 Subject: [PATCH 02/10] Do it right this time round --- debian/rules | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/debian/rules b/debian/rules index 8f0e738..03ad947 100755 --- a/debian/rules +++ b/debian/rules @@ -2,11 +2,15 @@ export DEB_BUILD_MAINT_OPTIONS=hardening=+all export NON_INTERACTIVE=1 -export DEB_CONFIGURE_EXTRA_FLAGS=--without-flexnet --without-tcpip --without-rose --without-autorouter --without-mheard %: dh $@ +# Remove things we aren't using in oarc. mheard is a bug awaiting a fix. + +override_dh_auto_configure: + dh_auto_configure -- --without-flexnet --without-tcpip --without-rose --without-autorouter --without-mheard + # Collapse upstream changes file into single file override_dh_auto_build: From 535b3cdf3d013a6c611e42362ce78edfc14ca655 Mon Sep 17 00:00:00 2001 From: Dave Hibberd Date: Thu, 27 Jul 2023 01:02:25 +0100 Subject: [PATCH 03/10] Patch out the netrom no motd bug --- debian/patches/netrom-motd.patch | 17 +++++++++++++++++ debian/patches/series | 1 + 2 files changed, 18 insertions(+) create mode 100644 debian/patches/netrom-motd.patch diff --git a/debian/patches/netrom-motd.patch b/debian/patches/netrom-motd.patch new file mode 100644 index 0000000..09d12cc --- /dev/null +++ b/debian/patches/netrom-motd.patch @@ -0,0 +1,17 @@ +--- a/node.c ++++ b/node.c +@@ -302,6 +302,14 @@ + #ifdef HAVEMOTD + if (User.ul_type == AF_NETROM) { + /* axio_printf(NodeIo, "%s} Welcome.\n", NodeId); */ ++ if (check_perms(PERM_ANSI, 0L) != -1) { ++ node_msg("\e[01;34m[\e[01;37m%s\e[01;34m]\e[0m - Welcome to %s", VERSION, FlexId); ++ } else ++ node_msg("%s - Welcome to %s", VERSION, FlexId); ++ if ((fp = fopen(HAVEMOTD, "r")) != NULL) { ++ while (fgets(buf, 256, fp) != NULL) axio_puts(buf,NodeIo); ++ axio_puts ("\n",NodeIo); ++ } + } else + if ((User.ul_type == AF_INET) || (User.ul_type == AF_INET6)) { + if (check_perms(PERM_ANSI, 0L) != -1) { diff --git a/debian/patches/series b/debian/patches/series index 5cb9a02..95dbf75 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,3 +1,4 @@ +netrom-motd.patch non-interactive-install.patch hardening folder-update From 3522edb96e164a4df2622c34aa4ca4108b19e982 Mon Sep 17 00:00:00 2001 From: Dave Hibberd Date: Fri, 4 Aug 2023 21:28:20 +0100 Subject: [PATCH 04/10] Just do anything? --- debian/patches/netrom-motd.patch | 65 ++++++++++++++++++++++++++------ 1 file changed, 54 insertions(+), 11 deletions(-) diff --git a/debian/patches/netrom-motd.patch b/debian/patches/netrom-motd.patch index 09d12cc..c92c050 100644 --- a/debian/patches/netrom-motd.patch +++ b/debian/patches/netrom-motd.patch @@ -1,17 +1,60 @@ --- a/node.c +++ b/node.c -@@ -302,6 +302,14 @@ +@@ -301,42 +301,19 @@ + node_log(LOGLVL_LOGIN, "%s @ %s logged in", User.call, User.ul_name); #ifdef HAVEMOTD if (User.ul_type == AF_NETROM) { ++ axio_printf(NodeIo, "Fit like eh day. \n"); /* axio_printf(NodeIo, "%s} Welcome.\n", NodeId); */ -+ if (check_perms(PERM_ANSI, 0L) != -1) { -+ node_msg("\e[01;34m[\e[01;37m%s\e[01;34m]\e[0m - Welcome to %s", VERSION, FlexId); -+ } else -+ node_msg("%s - Welcome to %s", VERSION, FlexId); -+ if ((fp = fopen(HAVEMOTD, "r")) != NULL) { -+ while (fgets(buf, 256, fp) != NULL) axio_puts(buf,NodeIo); -+ axio_puts ("\n",NodeIo); +- } else +- if ((User.ul_type == AF_INET) || (User.ul_type == AF_INET6)) { +- if (check_perms(PERM_ANSI, 0L) != -1) { +- node_msg("\n\e[01;34m[\e[01;37m%s\e[01;34m]\e[0m\nWelcome %s to the %s packet shell.", VERSION, User.call, HostName); +- } else if (check_perms(PERM_ANSI, 0L) == -1) { +- node_msg("\n[%s]\nWelcome %s to the %s packet shell.", VERSION, User.call, HostName); +- } +- if ((fp = fopen(HAVEMOTD, "r")) != NULL) { +- while (fgets(buf,256, fp) != NULL) axio_puts(buf,NodeIo); +- axio_printf (NodeIo, "\n"); +-/* axio_flush(NodeIo); */ +- } +- } else if (User.ul_type == AF_AX25) { +- if (check_perms(PERM_ANSI, 0L) != -1) { ++ /* if (check_perms(PERM_ANSI, 0L) != -1) { + node_msg("\e[01;34m[\e[01;37m%s\e[01;34m]\e[0m - Welcome to %s", VERSION, FlexId); + } else + node_msg("%s - Welcome to %s", VERSION, FlexId); + if ((fp = fopen(HAVEMOTD, "r")) != NULL) { + while (fgets(buf, 256, fp) != NULL) axio_puts(buf,NodeIo); + axio_puts ("\n",NodeIo); +-/* axio_flush(NodeIo); */ +- } +- } else if (User.ul_type == AF_ROSE) { +- node_msg("%s - Welcome to %s", VERSION, RoseId); +- if ((fp = fopen(HAVEMOTD, "r")) != NULL) { +- while (fgets(buf, 256, fp) != NULL) axio_puts(buf,NodeIo); +- axio_puts ("\n",NodeIo); +-/* axio_flush(NodeIo); */ +- } +- } +- lastlog(); +-#endif +- axio_flush(NodeIo); +- while (1) { if (User.ul_type != AF_NETROM) { +- axio_flush(NodeIo); + } - } else - if ((User.ul_type == AF_INET) || (User.ul_type == AF_INET6)) { - if (check_perms(PERM_ANSI, 0L) != -1) { ++ */ ++ } else ++ if ((User.ul_type == AF_INET) || (User.ul_type == AF_INET6)) { + if (check_perms(PERM_ANSI, 0L) != -1) { + axio_printf(NodeIo,"\e[01;34m"); + } +@@ -362,7 +339,7 @@ + else if ((User.ul_type != AF_NETROM) && (User.ul_type != AF_ROSE)) { + node_prompt(); + } else if ((User.ul_type == AF_NETROM) || (User.ul_type == AF_ROSE)) { +- axio_printf(NodeIo,"\n"); ++ node_prompt(); + } + } + } From 0c9efe6e2f0f70a0dd7f593fdcd3bffbaf4f0561 Mon Sep 17 00:00:00 2001 From: Dave Hibberd Date: Fri, 4 Aug 2023 21:44:41 +0100 Subject: [PATCH 05/10] Tidied it up so I've not deleted a pile of code for no reason --- debian/patches/netrom-motd.patch | 56 ++++---------------------------- 1 file changed, 7 insertions(+), 49 deletions(-) diff --git a/debian/patches/netrom-motd.patch b/debian/patches/netrom-motd.patch index c92c050..d8243fa 100644 --- a/debian/patches/netrom-motd.patch +++ b/debian/patches/netrom-motd.patch @@ -1,60 +1,18 @@ --- a/node.c +++ b/node.c -@@ -301,42 +301,19 @@ +@@ -301,6 +301,7 @@ node_log(LOGLVL_LOGIN, "%s @ %s logged in", User.call, User.ul_name); #ifdef HAVEMOTD if (User.ul_type == AF_NETROM) { -+ axio_printf(NodeIo, "Fit like eh day. \n"); ++ axio_printf(NodeIo, "Fit like eh day Netrommie. \n"); /* axio_printf(NodeIo, "%s} Welcome.\n", NodeId); */ -- } else -- if ((User.ul_type == AF_INET) || (User.ul_type == AF_INET6)) { -- if (check_perms(PERM_ANSI, 0L) != -1) { -- node_msg("\n\e[01;34m[\e[01;37m%s\e[01;34m]\e[0m\nWelcome %s to the %s packet shell.", VERSION, User.call, HostName); -- } else if (check_perms(PERM_ANSI, 0L) == -1) { -- node_msg("\n[%s]\nWelcome %s to the %s packet shell.", VERSION, User.call, HostName); -- } -- if ((fp = fopen(HAVEMOTD, "r")) != NULL) { -- while (fgets(buf,256, fp) != NULL) axio_puts(buf,NodeIo); -- axio_printf (NodeIo, "\n"); --/* axio_flush(NodeIo); */ -- } -- } else if (User.ul_type == AF_AX25) { -- if (check_perms(PERM_ANSI, 0L) != -1) { -+ /* if (check_perms(PERM_ANSI, 0L) != -1) { - node_msg("\e[01;34m[\e[01;37m%s\e[01;34m]\e[0m - Welcome to %s", VERSION, FlexId); - } else - node_msg("%s - Welcome to %s", VERSION, FlexId); - if ((fp = fopen(HAVEMOTD, "r")) != NULL) { - while (fgets(buf, 256, fp) != NULL) axio_puts(buf,NodeIo); - axio_puts ("\n",NodeIo); --/* axio_flush(NodeIo); */ -- } -- } else if (User.ul_type == AF_ROSE) { -- node_msg("%s - Welcome to %s", VERSION, RoseId); -- if ((fp = fopen(HAVEMOTD, "r")) != NULL) { -- while (fgets(buf, 256, fp) != NULL) axio_puts(buf,NodeIo); -- axio_puts ("\n",NodeIo); --/* axio_flush(NodeIo); */ -- } -- } -- lastlog(); --#endif -- axio_flush(NodeIo); -- while (1) { if (User.ul_type != AF_NETROM) { -- axio_flush(NodeIo); -+ } -+ */ -+ } else -+ if ((User.ul_type == AF_INET) || (User.ul_type == AF_INET6)) { - if (check_perms(PERM_ANSI, 0L) != -1) { - axio_printf(NodeIo,"\e[01;34m"); - } -@@ -362,7 +339,7 @@ + } else + if ((User.ul_type == AF_INET) || (User.ul_type == AF_INET6)) { +@@ -362,6 +363,7 @@ else if ((User.ul_type != AF_NETROM) && (User.ul_type != AF_ROSE)) { node_prompt(); } else if ((User.ul_type == AF_NETROM) || (User.ul_type == AF_ROSE)) { -- axio_printf(NodeIo,"\n"); -+ node_prompt(); ++ node_prompt(); + axio_printf(NodeIo,"\n"); } } - } From c5b58047766e71c3b4956830fc7f7e02cdb8c7bf Mon Sep 17 00:00:00 2001 From: Dave Hibberd Date: Fri, 4 Aug 2023 22:34:55 +0100 Subject: [PATCH 06/10] We now have an MOTD and prompt on netrom, and mheard is reenabled --- debian/patches/netrom-motd.patch | 19 ++++++++++++------- debian/patches/non-interactive-install.patch | 10 ++++++++++ debian/rules | 2 +- 3 files changed, 23 insertions(+), 8 deletions(-) diff --git a/debian/patches/netrom-motd.patch b/debian/patches/netrom-motd.patch index d8243fa..8c53a1f 100644 --- a/debian/patches/netrom-motd.patch +++ b/debian/patches/netrom-motd.patch @@ -1,18 +1,23 @@ --- a/node.c +++ b/node.c -@@ -301,6 +301,7 @@ +@@ -301,6 +301,11 @@ node_log(LOGLVL_LOGIN, "%s @ %s logged in", User.call, User.ul_name); #ifdef HAVEMOTD if (User.ul_type == AF_NETROM) { -+ axio_printf(NodeIo, "Fit like eh day Netrommie. \n"); ++ node_msg("%s - Welcome to %s", VERSION, NodeId); ++ if ((fp = fopen(HAVEMOTD, "r")) != NULL) { ++ while (fgets(buf, 256, fp) != NULL) axio_puts(buf,NodeIo); ++ axio_puts ("\n",NodeIo); ++ } /* axio_printf(NodeIo, "%s} Welcome.\n", NodeId); */ } else if ((User.ul_type == AF_INET) || (User.ul_type == AF_INET6)) { -@@ -362,6 +363,7 @@ - else if ((User.ul_type != AF_NETROM) && (User.ul_type != AF_ROSE)) { - node_prompt(); - } else if ((User.ul_type == AF_NETROM) || (User.ul_type == AF_ROSE)) { -+ node_prompt(); +@@ -365,6 +370,8 @@ axio_printf(NodeIo,"\n"); } } ++ } else { ++ node_prompt(); + } + if (check_perms(PERM_ANSI, 0L) != -1) { + /* Not needed from what I see so far. */ diff --git a/debian/patches/non-interactive-install.patch b/debian/patches/non-interactive-install.patch index 68a2d9b..c9f7252 100644 --- a/debian/patches/non-interactive-install.patch +++ b/debian/patches/non-interactive-install.patch @@ -16,3 +16,13 @@ Last-Update: 2018-02-10 _sleep() { [ "$NON_INTERACTIVE" = 1 ] || sleep "$@" +@@ -122,6 +116,9 @@ + if [ $? -ne 1 ] + then + HAVEAX25="#define HAVE_AX25 1" ++ #These have been moved out of tcp-ip so I have an MOTD when I don't build telnet in ++ HAVEMOTD="#define HAVEMOTD" ++ MOTDPATH='"/etc/ax25/uronode.motd"' + fi + # + # echo -n "Include support for the FlexNet protocol ? [Y/n]: "; read answer diff --git a/debian/rules b/debian/rules index 03ad947..39d8445 100755 --- a/debian/rules +++ b/debian/rules @@ -9,7 +9,7 @@ export NON_INTERACTIVE=1 # Remove things we aren't using in oarc. mheard is a bug awaiting a fix. override_dh_auto_configure: - dh_auto_configure -- --without-flexnet --without-tcpip --without-rose --without-autorouter --without-mheard + dh_auto_configure -- --without-flexnet --without-tcpip --without-rose --without-autorouter # Collapse upstream changes file into single file From a2d04aafd5d57f6eca417f22d1f83976dd57843c Mon Sep 17 00:00:00 2001 From: Dave Hibberd Date: Sat, 5 Aug 2023 00:49:38 +0100 Subject: [PATCH 07/10] Fix ability to build in zlib, then ignore it. Needs libax25 to have zlib. --- debian/control | 2 +- debian/patches/series | 1 + debian/patches/zlib-ifdef.patch | 22 ++++++++++++++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 debian/patches/zlib-ifdef.patch diff --git a/debian/control b/debian/control index d26f7f2..22956e6 100644 --- a/debian/control +++ b/debian/control @@ -3,7 +3,7 @@ Section: hamradio Priority: optional Maintainer: Debian Hamradio Maintainers Uploaders: Dave Hibberd -Build-Depends: debhelper-compat (= 13), libax25-dev +Build-Depends: debhelper-compat (= 13), libax25-dev, zlib1g-dev Standards-Version: 4.6.0.1 Vcs-Browser: https://salsa.debian.org/debian-hamradio-team/uronode Vcs-Git: https://salsa.debian.org/debian-hamradio-team/uronode.git diff --git a/debian/patches/series b/debian/patches/series index 95dbf75..7d47ffe 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,5 +1,6 @@ netrom-motd.patch non-interactive-install.patch +zlib-ifdef.patch hardening folder-update install-dir-creation diff --git a/debian/patches/zlib-ifdef.patch b/debian/patches/zlib-ifdef.patch new file mode 100644 index 0000000..003b860 --- /dev/null +++ b/debian/patches/zlib-ifdef.patch @@ -0,0 +1,22 @@ +--- a/configure ++++ b/configure +@@ -74,14 +74,15 @@ + _sleep 1 + echo -n "Checking for the existence of the Zlib headers... " + ZLIB="" +-HAVEZLIB="#undef HAVE_ZLIB" ++HAVEZLIB="#undef HAVE_ZLIB_H" + for zlibdir in /usr/include /usr/local/include + do + if [ -f $zlibdir/zlib.h ] + then +- echo $zlibdir/zlib.h +- ZLIB="-lz" +- HAVEZLIB="#define HAVE_ZLIB 1" ++ echo "skipping zlib until it works right..." ++ # echo $zlibdir/zlib.h ++ # ZLIB="-lz" ++ # HAVEZLIB="#define HAVE_ZLIB_H 1" + fi + done + if [ -z "$ZLIB" ] From 8cb40976e2041e0d97181d72883203c23ae49068 Mon Sep 17 00:00:00 2001 From: Dave Hibberd Date: Sat, 5 Aug 2023 00:58:02 +0100 Subject: [PATCH 08/10] Add a goodbye on netrom disconnect too --- debian/patches/netrom-motd.patch | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/debian/patches/netrom-motd.patch b/debian/patches/netrom-motd.patch index 8c53a1f..a740fc6 100644 --- a/debian/patches/netrom-motd.patch +++ b/debian/patches/netrom-motd.patch @@ -21,3 +21,14 @@ } if (check_perms(PERM_ANSI, 0L) != -1) { /* Not needed from what I see so far. */ +--- a/command.c ++++ b/command.c +@@ -137,7 +137,7 @@ + } + } + if (User.ul_type == AF_NETROM) { +- axio_printf(NodeIo,""); ++ axio_printf(NodeIo,"%s, thank you for connecting to the %s\nURONode netrom shell. Come back soon, 73!\n",User.call, NodeId); + } + if (User.ul_type == AF_ROSE) { + if (check_perms(PERM_ANSI, 0L) != -1) { From cea899c767210424b57207c9c65737858aac7273 Mon Sep 17 00:00:00 2001 From: Dave Hibberd Date: Thu, 31 Aug 2023 23:28:00 +0100 Subject: [PATCH 09/10] Cheeky removal of zlib patch to get rid of zconnect --- debian/patches/series | 1 - 1 file changed, 1 deletion(-) diff --git a/debian/patches/series b/debian/patches/series index 7d47ffe..95dbf75 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,6 +1,5 @@ netrom-motd.patch non-interactive-install.patch -zlib-ifdef.patch hardening folder-update install-dir-creation From 9cbc3829b2c2ddc83726db0416accc98c6a9f0a6 Mon Sep 17 00:00:00 2001 From: Dave Hibberd Date: Tue, 12 Sep 2023 22:37:31 +0100 Subject: [PATCH 10/10] Release twists --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index ffba1c3..4af44ed 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,9 @@ -uronode (2.15-3) UNRELEASED; urgency=medium +uronode (2.15-3) unstable; urgency=medium * Patching mheardd.dat location - this should fix jh and jl functionality - -- Dave Hibberd Tue, 12 Sep 2023 22:09:52 +0100 + -- Dave Hibberd Tue, 12 Sep 2023 22:37:21 +0100 uronode (2.15-2) unstable; urgency=medium