Zlib and netrom MOTD patch

This commit is contained in:
Dave Hibberd 2023-08-07 12:37:26 +01:00
parent f3e7693fe3
commit 7a63b2dc8f
No known key found for this signature in database
GPG Key ID: 03A1FB7A1904771B
5 changed files with 72 additions and 2 deletions

7
debian/changelog vendored
View File

@ -1,3 +1,10 @@
uronode (2.15-2) UNRELEASED; urgency=medium
* Add zlib to control and patch in correct ifdef to configure
* Add netrom MOTD patch
-- Dave Hibberd <d@vehibberd.com> Mon, 07 Aug 2023 12:35:32 +0100
uronode (2.15-1) unstable; urgency=medium
* New upstream version 2.15

4
debian/control vendored
View File

@ -3,8 +3,8 @@ Section: hamradio
Priority: optional
Maintainer: Debian Hamradio Maintainers <debian-hams@lists.debian.org>
Uploaders: Dave Hibberd <d@vehibberd.com>
Build-Depends: debhelper-compat (= 13), libax25-dev
Standards-Version: 4.6.0.1
Build-Depends: debhelper-compat (= 13), libax25-dev, zlib1g-dev
Standards-Version: 4.6.2.0
Vcs-Browser: https://salsa.debian.org/debian-hamradio-team/uronode
Vcs-Git: https://salsa.debian.org/debian-hamradio-team/uronode.git
Homepage: https://uronode.sourceforge.net/

38
debian/patches/netrom-motd.patch vendored Normal file
View File

@ -0,0 +1,38 @@
Description: Add in motd functionality for Netrom
Author: Dave Hibberd <d@vehibberd.com>
Last-Update: 2023-08-07
--- a/node.c
+++ b/node.c
@@ -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) {
+ 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)) {
@@ -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. */
--- 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) {

View File

@ -1,4 +1,6 @@
netrom-motd.patch
non-interactive-install.patch
zlib-ifdef.patch
hardening
folder-update
install-dir-creation

23
debian/patches/zlib-ifdef.patch vendored Normal file
View File

@ -0,0 +1,23 @@
Description: Fix zlib ifdef to ensure it builds right
Author: Dave Hibberd <d@vehibberd.com>
Last-Update: 2023-08-07
--- a/configure
+++ b/configure
@@ -74,14 +74,14 @@
_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"
+ HAVEZLIB="#define HAVE_ZLIB_H 1"
fi
done
if [ -z "$ZLIB" ]