diff --git a/.gitignore b/.gitignore index 0839bfc..86f1b2d 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /uronode-2.2.tar.gz +/uronode-2.3.1.tar.gz diff --git a/sources b/sources index fd2d54c..e77c25e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -4699e451fa5e4300a6c2f2ab3de2ea6f uronode-2.2.tar.gz +ee2f7bde030b1c7d1ea61e4bfeb716ef uronode-2.3.1.tar.gz diff --git a/uronode-2.1-non-interactive-configure.patch b/uronode-2.1-non-interactive-configure.patch deleted file mode 100644 index c9e544c..0000000 --- a/uronode-2.1-non-interactive-configure.patch +++ /dev/null @@ -1,250 +0,0 @@ -diff --git a/configure b/configure -index ac1a98c..e30b98d 100755 ---- a/configure -+++ b/configure -@@ -1,7 +1,17 @@ - #!/bin/sh - -+_sleep() -+{ -+ [ "$NON_INTERACTIVE" = 1 ] || sleep "$@" -+} -+ -+_whiptail() -+{ -+ [ "$NON_INTERACTIVE" = 1 ] || whiptail "$@" -+} -+ - echo "Cleaning the directory for a fresh configuration..." --sleep 2 -+_sleep 2 - make distclean > make.debug - - ETC_DIR=/etc/ax25 -@@ -16,16 +26,16 @@ echo "will very simply and easily guide you into installling URONode with as" - echo "very little trouble as possible. All you need to really do is simply" - echo "answer the following questions below properly. If you make a mistake" - echo "just break out of it (ctrl+c) and rerun ./configure. Let's get started!" --sleep 1 -+_sleep 1 - echo " " --sleep 1 -+_sleep 1 - echo -n "you need gcc to build URONode: " - GCC=`which gcc` --sleep 2 -+_sleep 2 - if [ -e "$GCC" ] - then - echo -n "saw $GCC... " -- sleep 1 -+ _sleep 1 - echo "GCC found! Congratulations!!" - else - echo "gcc not found!" -@@ -38,10 +48,10 @@ else - exit 1 - fi - echo -n "Your machine architecture is: " --sleep 1 -+_sleep 1 - ARCH=`uname -m` - echo $ARCH --sleep 1 -+_sleep 1 - echo -n "Checking for the existence of the Zlib headers... " - ZLIB="" - HAVEZLIB="#undef HAVE_ZLIB" -@@ -76,7 +86,12 @@ fi - MOTDPATH= - # echo -n "Include support for the AX.25 protocol ? [Y/n]: "; read answer - # if [ "$answer" = "Y" -o "$answer" = "y" -o "$answer" = "" ] -- whiptail --title "URONode Options:" --yesno "Support AX25?" 7 22 -+ if [ "$NON_INTERACTIVE" = 1 ] -+ then -+ echo "$@" | grep -vqe "--without-ax25" -+ else -+ whiptail --title "URONode Options:" --yesno "Support AX25?" 7 22 -+ fi - if [ $? -ne 1 ] - then - HAVEAX25="#define HAVE_AX25 1" -@@ -84,8 +99,13 @@ fi - # - # echo -n "Include support for the FlexNet protocol ? [Y/n]: "; read answer - # if [ "$answer" = "Y" -o "$answer" = "y" -o "$answer" = "" ] -- whiptail --title "URONode Options:" --yesno "Support FlexNet?" 7 22 - -+ if [ "$NON_INTERACTIVE" = 1 ] -+ then -+ echo "$@" | grep -vqe "--without-flexnet" -+ else -+ whiptail --title "URONode Options:" --yesno "Support FlexNet?" 7 22 -+ fi - if [ $? -ne 1 ] - then - HAVEAX25="#define HAVE_AX25 1" -@@ -96,7 +116,12 @@ fi - # - # echo -n "Include support for the NetRom protocol ? [Y/n]: "; read answer - # if [ "$answer" = "Y" -o "$answer" = "y" -o "$answer" = "" ] -- whiptail --title "URONode Options:" --yesno "Support NetRom?" 7 22 -+ if [ "$NON_INTERACTIVE" = 1 ] -+ then -+ echo "$@" | grep -vqe "--without-netrom" -+ else -+ whiptail --title "URONode Options:" --yesno "Support NetRom?" 7 22 -+ fi - if [ $? -ne 1 ] - then - HAVEAX25="#define HAVE_AX25 1" -@@ -105,7 +130,12 @@ fi - # - # echo -n "Include support for the Rose protocol ? [Y/n]: "; read answer - # if [ "$answer" = "Y" -o "$answer" = "y" -o "$answer" = "" ] -- whiptail --title "URONode Options:" --yesno "Support ROSE?" 7 22 -+ if [ "$NON_INTERACTIVE" = 1 ] -+ then -+ echo "$@" | grep -vqe "--without-rose" -+ else -+ whiptail --title "URONode Options:" --yesno "Support ROSE?" 7 22 -+ fi - if [ $? -ne 1 ] - then - HAVEAX25="#define HAVE_AX25 1" -@@ -114,7 +144,12 @@ fi - # - # echo -n "Include support for MHeard ports listen ? [Y/n]: "; read answer - # if [ "$answer" = "Y" -o "$answer" = "y" -o "$answer" = "" ] -- whiptail --title "URONode Options:" --yesno "Support MHeard?" 7 22 -+ if [ "$NON_INTERACTIVE" = 1 ] -+ then -+ echo "$@" | grep -vqe "--without-mheard" -+ else -+ whiptail --title "URONode Options:" --yesno "Support MHeard?" 7 22 -+ fi - if [ $? -ne 1 ] - then - HAVEAX25="#define HAVE_AX25 1" -@@ -123,7 +158,12 @@ fi - # - # echo -n "Include support for TCP/IP functions ? [Y/n]: "; read answer - # if [ "$answer" = "Y" -o "$answer" = "y" -o "$answer" = "" ] -- whiptail --title "URONode Options:" --yesno "Support TCP/IP?" 7 22 -+ if [ "$NON_INTERACTIVE" = 1 ] -+ then -+ echo "$@" | grep -vqe "--without-tcpip" -+ else -+ whiptail --title "URONode Options:" --yesno "Support TCP/IP?" 7 22 -+ fi - if [ $? -ne 1 ] - then - HAVETCPIP="#define HAVE_TCPIP 1" -@@ -168,72 +208,72 @@ sed -e "s~@ETC_DIR@~$ETC_DIR~g; \ - echo "Creating dependancy files..." - make depend > /dev/null 2>&1 - echo "Configuration successful!!" --sleep 1 -+_sleep 1 - echo "about the authors..." --sleep 3 -+_sleep 3 - echo "URONode is a combined effort of years worth of work. Those who's code" - echo "is included in this flavor of a linux based node are:" --sleep 1 -+_sleep 1 - echo "Brian Rogers N1URO (current maintainer), " --sleep 1 -+_sleep 1 - echo "Marius Petrescu YO2LOJ (current team member)," --sleep 1 -+_sleep 1 - echo "Stefano Noferi IZ5AWZ (AWZNode)" --sleep 1 -+_sleep 1 - echo -n "Tomi Manninen OH2BNS, " --sleep 1 -+_sleep 1 - echo -n "Alan Cox GW4PTS, " --sleep 1 -+_sleep 1 - echo "and Roy Van Zundert PE1RJA" - echo "" --sleep 1 -+_sleep 1 - echo "Special thanks to: Morgan, sm6tky for his security report" - echo "and Barry K2MF for his input on some of my routines and supplying" - echo "some source code." --sleep 1 -+_sleep 1 - echo "" - #echo -n "Shall I run the make command for you ? [Y/n]: " -- whiptail --title "Shall I make URONode?" --yesno "Yes to make or No to exit" 7 30 -+ _whiptail --title "Shall I make URONode?" --yesno "Yes to make or No to exit" 7 30 - # if [ "$answer" = "Y" -o "$answer" = "y" -o "$answer" = "" ] -- if [ $? -ne 1 ] -+ if [ "$NON_INTERACTIVE" != 1 -a $? -ne 1 ] - then - # echo "Making URONode! Please be patient." --# sleep 1 -+# _sleep 1 - # echo "compile errors will be in make.debug." - # echo "" --# sleep 1 -+# _sleep 1 - # echo "You may not see anything until the process is complete..." -- whiptail --title "Making URONODE..." --msgbox "Making. Check make.debug for errors. Hit OK to continue. You may not see anything for a minute..." 10 45 -+ _whiptail --title "Making URONODE..." --msgbox "Making. Check make.debug for errors. Hit OK to continue. You may not see anything for a minute..." 10 45 - make >> make.debug - echo "let's check for binary errors..." -- sleep 1 -+ _sleep 1 - echo -n "nodeusers: " -- sleep 1 -+ _sleep 1 - if [ -x ./nodeusers ]; then - echo "SUCCESS!" - else - echo "FAILED!" - fi -- sleep 1 -+ _sleep 1 - echo -n "uronode: " -- sleep 1 -+ _sleep 1 - if [ -x ./uronode ]; then - echo "SUCCESS!" - else - echo "FAILED!" - fi -- sleep 1 -+ _sleep 1 - echo -n "axdigi: " -- sleep 1 -+ _sleep 1 - if [ -x ./axdigi ]; then - echo "SUCCESS!" - fi -- sleep 1 -+ _sleep 1 - echo -n "flexd: " -- sleep 1 -+ _sleep 1 - if [ -x ./flexd ]; then - echo "SUCCESS!" -- sleep 1 -+ _sleep 1 - else - echo "FAILED! - perhaps you didn't want flexnet?" - echo "This is not an error if you chose NO to flexnet." -@@ -242,8 +282,8 @@ echo "" - echo "Process complete!" - echo "" - fi -- sleep 1 -- whiptail --title "URONode" --msgbox "Check the file make.debug if you had errors. If no errors, type: make install or make upgrade and edit your files in /etc/ax25/\n\n**WARNING: if you haven't already, add the following to your startup scripts:\n/usr/sbin/axdigi & to insure cross-port digipeating.\n\nFor help and release news join the forum at\nhttps://www.n1uro.net/forum\n\nEnjoy URONode - 73 de Brian N1URO" 20 50 -+ __sleep 1 -+ _whiptail --title "URONode" --msgbox "Check the file make.debug if you had errors. If no errors, type: make install or make upgrade and edit your files in /etc/ax25/\n\n**WARNING: if you haven't already, add the following to your startup scripts:\n/usr/sbin/axdigi & to insure cross-port digipeating.\n\nFor help and release news join the forum at\nhttps://www.n1uro.net/forum\n\nEnjoy URONode - 73 de Brian N1URO" 20 50 - - # echo "Check the file make.debug if you had errors." - # echo "If no errors, type: make install or make upgrade" diff --git a/uronode-2.2-ax25-build-fix.patch b/uronode-2.2-ax25-build-fix.patch deleted file mode 100644 index f934b19..0000000 --- a/uronode-2.2-ax25-build-fix.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/flexd.c b/flexd.c -index 0dc9534..a7575cc 100644 ---- a/flexd.c -+++ b/flexd.c -@@ -10,8 +10,7 @@ - #include - #include - --#include --#include -+#include - #include - #include - diff --git a/uronode-2.2-install-fix.patch b/uronode-2.2-install-fix.patch deleted file mode 100644 index 6513171..0000000 --- a/uronode-2.2-install-fix.patch +++ /dev/null @@ -1,219 +0,0 @@ -diff --git a/Makefile.in b/Makefile.in -index 60bb543..b6fed3f 100644 ---- a/Makefile.in -+++ b/Makefile.in -@@ -24,34 +24,33 @@ DIGI_OBJS = $(DIGI_SRC:.c=.o) - $(CC) $(CFLAGS) -c $< - - install: installbin installman installhelp installconf -- install -m 755 -D -d $(VAR_DIR) -- install -m 755 -D -d $(VAR_DIR)/node -- install -m 644 -p etc/loggedin $(VAR_DIR)/node -- install -m 644 -p etc/lastlog $(VAR_DIR)/node -- install -m 755 -D -d $(VAR_DIR)/flex -- install -m 644 -p etc/gateways $(VAR_DIR)/flex -+ install -m 755 -D -d $(VAR_DIR)/lib/uronode -+ install -m 755 -D -d $(VAR_DIR)/lib/flexd -+ install -m 755 -D -d $(VAR_DIR)/log/uronode -+ install -m 644 -p etc/loggedin $(VAR_DIR)/lib/uronode -+ install -m 644 -p etc/lastlog $(VAR_DIR)/log/uronode -+ install -m 644 -p etc/gateways $(VAR_DIR)/lib/flexd - - installbin: all -- install -m 755 -s -p calibrate $(SBIN_DIR) -- install -m 755 -s -p uronode $(SBIN_DIR) -- install -m 755 -s -p nodeusers $(SBIN_DIR) -- install -m 755 -s -p axdigi $(SBIN_DIR) --@IN@ install -m 755 -s -p flexd $(SBIN_DIR) -+ install -m 755 -D -d $(SBIN_DIR) -+ install -m 755 -p uronode $(SBIN_DIR) -+ install -m 755 -p nodeusers $(SBIN_DIR) -+ install -m 755 -p axdigi $(SBIN_DIR) -+@IN@ install -m 755 -p flexd $(SBIN_DIR) - - installhelp: -- install -m 755 -D -d $(VAR_DIR) -- install -m 755 -D -d $(VAR_DIR)/node/help -- install -m 644 -p etc/help/*.hlp $(VAR_DIR)/node/help -+ install -m 755 -D -d $(DATA_DIR)/uronode/help -+ install -m 644 -p etc/help/*.hlp $(DATA_DIR)/uronode/help - - installconf: installhelp - install -m 755 -D -d $(ETC_DIR) -- install -m 600 -p etc/uronode.conf $(ETC_DIR) -+ install -m 644 -p etc/uronode.conf $(ETC_DIR) - install -m 600 -p etc/uronode.perms $(ETC_DIR) -- install -m 600 -p etc/uronode.info $(ETC_DIR) -- install -m 600 -p etc/uronode.motd $(ETC_DIR) -+ install -m 644 -p etc/uronode.info $(ETC_DIR) -+ install -m 644 -p etc/uronode.motd $(ETC_DIR) - install -m 600 -p etc/uronode.users $(ETC_DIR) -- install -m 600 -p etc/uronode.routes $(ETC_DIR) -- install -m 600 -p etc/flexd.conf $(ETC_DIR) -+ install -m 644 -p etc/uronode.routes $(ETC_DIR) -+ install -m 644 -p etc/flexd.conf $(ETC_DIR) - - installman: - install -m 755 -D -d $(MAN_DIR)/man1 $(MAN_DIR)/man5 $(MAN_DIR)/man8 -@@ -63,14 +62,13 @@ installman: - install -m 644 -p man/axdigi.8.gz $(MAN_DIR)/man8 - - upgrade: installman -- install -m 755 -p calibrate $(SBIN_DIR) - install -m 755 -p uronode $(SBIN_DIR) - install -m 755 -p nodeusers $(SBIN_DIR) - install -m 755 -p flexd $(SBIN_DIR) - install -m 755 -p axdigi $(SBIN_DIR) - install -m 644 -p uronode.conf $(ETC_DIR) - install -m 644 -p uronode.perms $(ETC_DIR) -- -+ - clean: - rm -f *.o *~ *.bak *.orig make.debug nodeusers uronode flexd axdigi - rm -f etc/*~ etc/*.bak etc/*.orig -diff --git a/Makefile.include.in b/Makefile.include.in -index aca87b5..774d11f 100644 ---- a/Makefile.include.in -+++ b/Makefile.include.in -@@ -2,12 +2,13 @@ - ARCH = @ARCH@ - - # Paths --ETC_DIR = @ETC_DIR@ --SBIN_DIR = @SBIN_DIR@ --BIN_DIR = @BIN_DIR@ --LIB_DIR = @LIB_DIR@ --MAN_DIR = @MAN_DIR@ --VAR_DIR = @VAR_DIR@ -+ETC_DIR = $(DESTDIR)@ETC_DIR@ -+SBIN_DIR = $(DESTDIR)@SBIN_DIR@ -+BIN_DIR = $(DESTDIR)@BIN_DIR@ -+LIB_DIR = $(DESTDIR)@LIB_DIR@ -+MAN_DIR = $(DESTDIR)@MAN_DIR@ -+VAR_DIR = $(DESTDIR)@VAR_DIR@ -+DATA_DIR = $(DESTDIR)@DATA_DIR@ - - # Is Zlib available? - ZLIB = @ZLIB@ -\ No newline at end of file -diff --git a/config.h.in b/config.h.in -index 378d946..d101f3b 100644 ---- a/config.h.in -+++ b/config.h.in -@@ -16,7 +16,7 @@ - /* - * mheard specific (we need to get this out of here!!!!) - */ --#define DATA_MHEARD_FILE "@VAR_DIR@/mheard/mheard.dat" -+#define DATA_MHEARD_FILE "@VAR_DIR@/lib/uronode/mheard.dat" - - /* - * node specific -@@ -25,6 +25,6 @@ - #define CONF_NODE_PERMS_FILE "@ETC_DIR@/uronode.perms" - @HAVEMOTD@ @MOTDPATH@ - #define CONF_NODE_INFO_FILE "@ETC_DIR@/uronode.info" --#define DATA_NODE_LOGIN_FILE "@VAR_DIR@/node/loggedin" --#define DATA_NODE_HELP_DIR "@VAR_DIR@/node/help/" -+#define DATA_NODE_LOGIN_FILE "@VAR_DIR@/lib/uronode/loggedin" -+#define DATA_NODE_HELP_DIR "@DATA_DIR@/uronode/help/" - #endif -diff --git a/configure b/configure -index e30b98d..70b423e 100755 ---- a/configure -+++ b/configure -@@ -18,8 +18,9 @@ ETC_DIR=/etc/ax25 - SBIN_DIR=/usr/sbin - BIN_DIR=/usr/bin - LIB_DIR=/usr/lib --MAN_DIR=/usr/share/man --VAR_DIR=/var/ax25 -+DATA_DIR=/usr/share -+MAN_DIR=$DATA_DIR/man -+VAR_DIR=/var - - echo "Welcome to the configuration utility for URONode. This configure script" - echo "will very simply and easily guide you into installling URONode with as" -@@ -185,6 +186,7 @@ sed -e "s~@ARCH@~$ARCH~g; \ - s~@BIN_DIR@~$BIN_DIR~g; \ - s~@VAR_DIR@~$VAR_DIR~g; \ - s~@MAN_DIR@~$MAN_DIR~g; \ -+ s~@DATA_DIR@~$DATA_DIR~g; \ - s~@ZLIB@~$ZLIB~g" Makefile.include - - echo "Creating config.h" -@@ -195,6 +197,7 @@ sed -e "s~@ETC_DIR@~$ETC_DIR~g; \ - s~@BIN_DIR@~$BIN_DIR~g; \ - s~@VAR_DIR@~$VAR_DIR~g; \ - s~@MAN_DIR@~$MAN_DIR~g; \ -+ s~@DATA_DIR@~$DATA_DIR~g; \ - s~@HAVEAX25@~$HAVEAX25~g; \ - s~@HAVEFLEX@~$HAVEFLEX~g; \ - s~@HAVENETROM@~$HAVENETROM~g; \ -diff --git a/flexd.c b/flexd.c -index 0dc9534..6f46cb0 100644 ---- a/flexd.c -+++ b/flexd.c -@@ -28,7 +28,7 @@ - #define DEFAULT_POLL_TIME 600 - #define MINIMUM_POLL_TIME 300 - #define FLEXD_CONF_FILE "/etc/ax25/flexd.conf" --#define FLEXD_TEMP_PATH "/var/ax25/flex/" -+#define FLEXD_TEMP_PATH "/var/lib/flexd/" - #define FLEXD_PID_FILE "/var/run/flexd.pid" - - int poll_time=DEFAULT_POLL_TIME; -diff --git a/procinfo.h b/procinfo.h -index 8f63d66..c9bafce 100644 ---- a/procinfo.h -+++ b/procinfo.h -@@ -4,13 +4,13 @@ - #define PROC_NR_FILE "/proc/net/nr" - #define PROC_DEV_FILE "/proc/net/dev" - --#define FLEX_GT_FILE "/var/ax25/flex/gateways" --#define FLEX_DST_FILE "/var/ax25/flex/destinations" -+#define FLEX_GT_FILE "/var/lib/flexd/gateways" -+#define FLEX_DST_FILE "/var/lib/flexd/destinations" - - #define AX_ROUTES_FILE "/etc/ax25/uronode.routes" - - #ifndef DATA_MHEARD_FILE --#define DATA_MHEARD_FILE "/var/ax25/mheard/mheard.dat" -+#define DATA_MHEARD_FILE "/var/lib/uronode/mheard.dat" - #endif - - #define CONN_TYPE_DIRECT 'D' -@@ -41,7 +41,7 @@ struct proc_dev { - - - /* -- * /var/ax25/flex/gateways: (example) -+ * /var/lib/flexd/gateways: (example) - * addr callsign dev dest digipeaters - * 00001 PI4TUE ax1 935 - */ -@@ -56,7 +56,7 @@ struct flex_gt { - }; - - /* -- * /var/ax25/flex/destinations: (example) -+ * /var/lib/flexd/destinations: (example) - * callsign ssid rtt gateway - * 9A0XZG 0-15 2575 00001 - * DB0AAA 0-0 63 00001 -diff --git a/system.c b/system.c -index 6e183f9..7819736 100644 ---- a/system.c -+++ b/system.c -@@ -32,8 +32,8 @@ - #include "node.h" - #include "procinfo.h" - --#define DATA_NODE_LAST_FILE "/var/ax25/node/lastlog" --#define DATA_NODE_IP_FILE "/var/ax25/node/iplog" -+#define DATA_NODE_LAST_FILE "/var/log/uronode/lastlog" -+#define DATA_NODE_IP_FILE "/var/log/uronode/iplog" - #define CONF_USERS_FILE "/etc/ax25/uronode.users" - #define USER_NOBODY "nobody" - diff --git a/uronode-2.2-no-md2.patch b/uronode-2.2-no-md2.patch deleted file mode 100644 index 534bd8a..0000000 --- a/uronode-2.2-no-md2.patch +++ /dev/null @@ -1,280 +0,0 @@ -diff --git a/md2.c b/md2.c -deleted file mode 100644 -index a1ccae3..0000000 ---- a/md2.c -+++ /dev/null -@@ -1,231 +0,0 @@ -- -- --/* MD2C.C - RSA Data Security, Inc., MD2 message-digest algorithm -- */ -- --/* Copyright (C) 1990-2, RSA Data Security, Inc. Created 1990. All -- rights reserved. -- -- License to copy and use this software is granted for -- non-commercial Internet Privacy-Enhanced Mail provided that it is -- identified as the "RSA Data Security, Inc. MD2 Message Digest -- Algorithm" in all material mentioning or referencing this software -- or this function. -- -- RSA Data Security, Inc. makes no representations concerning either -- the merchantability of this software or the suitability of this -- software for any particular purpose. It is provided "as is" -- without express or implied warranty of any kind. -- -- These notices must be retained in any copies of any part of this -- documentation and/or software. --*/ -- --typedef unsigned char *POINTER; -- --/* UINT2 defines a two byte word */ --typedef unsigned short int UINT2; -- --/* UINT4 defines a four byte word */ --typedef unsigned long int UINT4; -- --typedef struct --{ -- unsigned char state[16]; /* state */ -- unsigned char checksum[16]; /* checksum */ -- unsigned int count; /* number of bytes, modulo 16 */ -- unsigned char buffer[16]; /* input buffer */ --} -- MD2_CTX; -- --static void MD2Transform (unsigned char[16], unsigned char[16], unsigned char[16]); -- --/* Permutation of 0..255 constructed from the digits of pi. It gives a -- "random" nonlinear byte substitution operation. --*/ --static unsigned char PI_SUBST[256] = -- { -- 41, 46, 67, 201, 162, 216, 124, 1, 61, 54, 84, 161, 236, 240, 6, -- 19, 98, 167, 5, 243, 192, 199, 115, 140, 152, 147, 43, 217, 188, -- 76, 130, 202, 30, 155, 87, 60, 253, 212, 224, 22, 103, 66, 111, 24, -- 138, 23, 229, 18, 190, 78, 196, 214, 218, 158, 222, 73, 160, 251, -- 245, 142, 187, 47, 238, 122, 169, 104, 121, 145, 21, 178, 7, 63, -- 148, 194, 16, 137, 11, 34, 95, 33, 128, 127, 93, 154, 90, 144, 50, -- 39, 53, 62, 204, 231, 191, 247, 151, 3, 255, 25, 48, 179, 72, 165, -- 181, 209, 215, 94, 146, 42, 172, 86, 170, 198, 79, 184, 56, 210, -- 150, 164, 125, 182, 118, 252, 107, 226, 156, 116, 4, 241, 69, 157, -- 112, 89, 100, 113, 135, 32, 134, 91, 207, 101, 230, 45, 168, 2, 27, -- 96, 37, 173, 174, 176, 185, 246, 28, 70, 97, 105, 52, 64, 126, 15, -- 85, 71, 163, 35, 221, 81, 175, 58, 195, 92, 249, 206, 186, 197, -- 234, 38, 44, 83, 13, 110, 133, 40, 132, 9, 211, 223, 205, 244, 65, -- 129, 77, 82, 106, 220, 55, 200, 108, 193, 171, 250, 36, 225, 123, -- 8, 12, 189, 177, 74, 120, 136, 149, 139, 227, 99, 232, 109, 233, -- 203, 213, 254, 59, 0, 29, 57, 242, 239, 183, 14, 102, 88, 208, 228, -- 166, 119, 114, 248, 235, 117, 75, 10, 49, 68, 80, 180, 143, 237, -- 31, 26, 219, 153, 141, 51, 159, 17, 131, 20 -- }; -- --static unsigned char *PADDING[] = -- { -- (unsigned char *) "", -- (unsigned char *) "\001", -- (unsigned char *) "\002\002", -- (unsigned char *) "\003\003\003", -- (unsigned char *) "\004\004\004\004", -- (unsigned char *) "\005\005\005\005\005", -- (unsigned char *) "\006\006\006\006\006\006", -- (unsigned char *) "\007\007\007\007\007\007\007", -- (unsigned char *) "\010\010\010\010\010\010\010\010", -- (unsigned char *) "\011\011\011\011\011\011\011\011\011", -- (unsigned char *) "\012\012\012\012\012\012\012\012\012\012", -- (unsigned char *) "\013\013\013\013\013\013\013\013\013\013\013", -- (unsigned char *) "\014\014\014\014\014\014\014\014\014\014\014\014", -- (unsigned char *) -- "\015\015\015\015\015\015\015\015\015\015\015\015\015", -- (unsigned char *) -- "\016\016\016\016\016\016\016\016\016\016\016\016\016\016", -- (unsigned char *) -- "\017\017\017\017\017\017\017\017\017\017\017\017\017\017\017", -- (unsigned char *) -- "\020\020\020\020\020\020\020\020\020\020\020\020\020\020\020\020" -- }; -- --/* MD2 initialization. Begins an MD2 operation, writing a new context. -- */ --static void MD2Init (MD2_CTX * context) --{ -- context->count = 0; -- memset ((POINTER) context->state, 0, sizeof (context->state)); -- memset ((POINTER) context->checksum, 0, sizeof (context->checksum)); --} -- --/* MD2 block update operation. Continues an MD2 message-digest -- operation, processing another message block, and updating the -- context. --*/ --static void MD2Update (MD2_CTX * context, unsigned char *input, unsigned int inputLen) --{ -- unsigned int i, index, partLen; -- -- /* Update number of bytes mod 16 */ -- index = context->count; -- context->count = (index + inputLen) & 0xf; -- -- partLen = 16 - index; -- -- /* Transform as many times as possible. -- */ -- if (inputLen >= partLen) -- { -- memcpy ((POINTER) & context->buffer[index], (POINTER) input, partLen); -- MD2Transform (context->state, context->checksum, context->buffer); -- -- for (i = partLen; i + 15 < inputLen; i += 16) -- MD2Transform (context->state, context->checksum, &input[i]); -- -- index = 0; -- } -- else -- i = 0; -- -- /* Buffer remaining input */ -- memcpy ((POINTER) & context->buffer[index], (POINTER) & input[i], -- inputLen - i); --} -- --/* MD2 finalization. Ends an MD2 message-digest operation, writing the -- message digest and zeroizing the context. --*/ --static void MD2Final (unsigned char digest[16], MD2_CTX * context) --{ -- unsigned int index, padLen; -- -- /* Pad out to multiple of 16. -- */ -- index = context->count; -- padLen = 16 - index; -- MD2Update (context, PADDING[padLen], padLen); -- -- /* Extend with checksum */ -- MD2Update (context, context->checksum, 16); -- -- /* Store state in digest */ -- memcpy ((POINTER) digest, (POINTER) context->state, 16); -- -- /* Zeroize sensitive information. -- */ -- memset ((POINTER) context, 0, sizeof (*context)); --} -- --/* MD2 basic transformation. Transforms state and updates checksum -- based on block. --*/ --static void MD2Transform (state, checksum, block) -- unsigned char state[16]; -- unsigned char checksum[16]; -- unsigned char block[16]; --{ -- unsigned int i, j, t; -- unsigned char x[48]; -- -- /* Form encryption block from state, block, state ^ block. -- */ -- memcpy ((POINTER) x, (POINTER) state, 16); -- memcpy ((POINTER) x + 16, (POINTER) block, 16); -- for (i = 0; i < 16; i++) -- x[i + 32] = state[i] ^ block[i]; -- -- /* Encrypt block (18 rounds). -- */ -- t = 0; -- for (i = 0; i < 18; i++) -- { -- for (j = 0; j < 48; j++) -- t = x[j] ^= PI_SUBST[t]; -- t = (t + i) & 0xff; -- } -- -- /* Save new state */ -- memcpy ((POINTER) state, (POINTER) x, 16); -- -- /* Update checksum. -- */ -- t = checksum[15]; -- for (i = 0; i < 16; i++) -- t = checksum[i] ^= PI_SUBST[block[i] ^ t]; -- -- /* Zeroize sensitive information. -- */ -- memset ((POINTER) x, 0, sizeof (x)); --} -- --static void MD2String (unsigned char *dest, unsigned char *source) --{ -- int i; -- MD2_CTX context; -- unsigned char digest[16]; -- unsigned int len = strlen (source); -- -- MD2Init (&context); -- MD2Update (&context, source, len); -- MD2Final (digest, &context); -- -- *dest = '\0'; -- -- for (i = 0; i < 16; i++) -- { -- char tmp[5]; -- -- sprintf (tmp, "%02X", digest[i]); -- strcat (dest, tmp); -- } --} -- --void makekey (char *cle, char *pass, char *buffer) --{ -- char source[1024]; -- -- strcpy (source, cle); -- strcat (source, pass); -- MD2String (buffer, source); --} -diff --git a/system.c b/system.c -index 7819736..18ac5cf 100644 ---- a/system.c -+++ b/system.c -@@ -23,7 +23,6 @@ - #include - #include - --#include "md2.c" - #include - #include - #include -@@ -307,21 +306,12 @@ int check_passwd(void) - char answer[81]=""; - char buf[2048]; - -- unsigned char MD2digest[16]; -- MD2_CTX context; -- - level=strlen(Password); - timet=time(NULL); - srandom((int) timet); - for(i=0;i<5;i++) pass[i]=(int) (level * (random()/(RAND_MAX+1.0))); - - sprintf(buffer,"%10.10ld%s",timet,Password); -- MD2Init(&context); -- MD2Update(&context,(unsigned char *)buffer,level+10); -- MD2Final(MD2digest,&context); -- -- for(i=0;i<16;i++) sprintf(&tmp[i*2],"%02x",MD2digest[i]); -- - axio_printf(NodeIo,"%s %d %d %d %d %d [%010.10ld]\n", - PassPrompt,pass[0]+1,pass[1]+1,pass[2]+1,pass[3]+1,pass[4]+1,timet); - -@@ -331,7 +321,7 @@ int check_passwd(void) - axio_gets(buf, sizeof(buf), NodeIo); - - -- if(strlen(buf)==32) i=strcmp(buf,tmp); /* yes, use md2 password, ignoring case */ -+ if(strlen(buf)==32) i=strcmp(buf,tmp); - else i=strcmp(buf,answer); - - if(i) { diff --git a/uronode-2.3.1-install-fix.patch b/uronode-2.3.1-install-fix.patch new file mode 100644 index 0000000..c11f71e --- /dev/null +++ b/uronode-2.3.1-install-fix.patch @@ -0,0 +1,131 @@ +diff --git a/Makefile.in b/Makefile.in +index 750e546..99b5a68 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -25,33 +25,33 @@ DIGI_OBJS = $(DIGI_SRC:.c=.o) + $(CC) $(CFLAGS) -c $< + + install: installbin installman installhelp installconf +- install -m 755 -D -d $(VAR_DIR) +- install -m 755 -D -d $(VAR_DIR)/node +- install -m 644 -p etc/loggedin $(VAR_DIR)/node +- install -m 644 -p etc/lastlog $(VAR_DIR)/node +- install -m 755 -D -d $(VAR_DIR)/flex +- install -m 644 -p etc/gateways $(VAR_DIR)/flex ++ install -m 755 -D -d $(VAR_DIR)/lib/uronode ++ install -m 755 -D -d $(VAR_DIR)/lib/flexd ++ install -m 755 -D -d $(VAR_DIR)/log/uronode ++ install -m 644 -p etc/loggedin $(VAR_DIR)/lib/uronode ++ install -m 644 -p etc/lastlog $(VAR_DIR)/log/uronode ++ install -m 644 -p etc/gateways $(VAR_DIR)/lib/flexd + + installbin: all +- install -m 755 -s -p uronode $(SBIN_DIR) +- install -m 755 -s -p nodeusers $(SBIN_DIR) +- install -m 755 -s -p axdigi $(SBIN_DIR) +-@IN@ install -m 755 -s -p flexd $(SBIN_DIR) ++ install -m 755 -D -d $(SBIN_DIR) ++ install -m 755 -p uronode $(SBIN_DIR) ++ install -m 755 -p nodeusers $(SBIN_DIR) ++ install -m 755 -p axdigi $(SBIN_DIR) ++@IN@ install -m 755 -p flexd $(SBIN_DIR) + + installhelp: +- install -m 755 -D -d $(VAR_DIR) +- install -m 755 -D -d $(VAR_DIR)/node/help +- install -m 644 -p etc/help/*.hlp $(VAR_DIR)/node/help ++ install -m 755 -D -d $(DATA_DIR)/uronode/help ++ install -m 644 -p etc/help/*.hlp $(DATA_DIR)/uronode/help + + installconf: installhelp + install -m 755 -D -d $(ETC_DIR) +- install -m 600 -p etc/uronode.conf $(ETC_DIR) ++ install -m 644 -p etc/uronode.conf $(ETC_DIR) + install -m 600 -p etc/uronode.perms $(ETC_DIR) +- install -m 600 -p etc/uronode.info $(ETC_DIR) +- install -m 600 -p etc/uronode.motd $(ETC_DIR) ++ install -m 644 -p etc/uronode.info $(ETC_DIR) ++ install -m 644 -p etc/uronode.motd $(ETC_DIR) + install -m 600 -p etc/uronode.users $(ETC_DIR) +- install -m 600 -p etc/uronode.routes $(ETC_DIR) +- install -m 600 -p etc/flexd.conf $(ETC_DIR) ++ install -m 644 -p etc/uronode.routes $(ETC_DIR) ++ install -m 644 -p etc/flexd.conf $(ETC_DIR) + + installman: + install -m 755 -D -d $(MAN_DIR)/man1 $(MAN_DIR)/man5 $(MAN_DIR)/man8 +diff --git a/Makefile.include.in b/Makefile.include.in +index aca87b5..774d11f 100644 +--- a/Makefile.include.in ++++ b/Makefile.include.in +@@ -2,12 +2,13 @@ + ARCH = @ARCH@ + + # Paths +-ETC_DIR = @ETC_DIR@ +-SBIN_DIR = @SBIN_DIR@ +-BIN_DIR = @BIN_DIR@ +-LIB_DIR = @LIB_DIR@ +-MAN_DIR = @MAN_DIR@ +-VAR_DIR = @VAR_DIR@ ++ETC_DIR = $(DESTDIR)@ETC_DIR@ ++SBIN_DIR = $(DESTDIR)@SBIN_DIR@ ++BIN_DIR = $(DESTDIR)@BIN_DIR@ ++LIB_DIR = $(DESTDIR)@LIB_DIR@ ++MAN_DIR = $(DESTDIR)@MAN_DIR@ ++VAR_DIR = $(DESTDIR)@VAR_DIR@ ++DATA_DIR = $(DESTDIR)@DATA_DIR@ + + # Is Zlib available? + ZLIB = @ZLIB@ +\ No newline at end of file +diff --git a/config.h.in b/config.h.in +index 76a7e9e..469f709 100644 +--- a/config.h.in ++++ b/config.h.in +@@ -23,14 +23,14 @@ + #define AX_ROUTES_FILE "@ETC_DIR@/uronode.routes" + #define CONF_USERS_FILE "@ETC_DIR@/uronode.users" + #define FLEXD_CONF_FILE "@ETC_DIR@/flexd.conf" +-#define FLEXD_TEMP_PATH "@VAR_DIR@/flex/" +-#define FLEXD_PID_FILE "/var/run/flexd.pid" +-#define FLEX_GT_FILE "@VAR_DIR@/flex/gateways" +-#define FLEX_DST_FILE "@VAR_DIR@/flex/destinations" +-#define DATA_MHEARD_FILE "@VAR_DIR@/mheard/mheard.dat" +-#define DATA_NODE_LOGIN_FILE "@VAR_DIR@/node/loggedin" +-#define DATA_NODE_HELP_DIR "@VAR_DIR@/node/help/" +-#define DATA_NODE_LAST_FILE "@VAR_DIR@/node/lastlog" +-#define DATA_NODE_IP_FILE "@VAR_DIR@/node/iplog" ++#define FLEXD_TEMP_PATH "/tmp/flex/" ++#define FLEXD_PID_FILE "@VAR_DIR@/run/flexd.pid" ++#define FLEX_GT_FILE "@VAR_DIR@/lib/flexd/gateways" ++#define FLEX_DST_FILE "@VAR_DIR@/lib/flexd/destinations" ++#define DATA_MHEARD_FILE "@VAR_DIR@/lib/uronode/mheard.dat" ++#define DATA_NODE_LOGIN_FILE "@VAR_DIR@/lib/uronode/loggedin" ++#define DATA_NODE_HELP_DIR "@DATA_DIR@/uronode/help/" ++#define DATA_NODE_LAST_FILE "@VAR_DIR@/lib/uronode/lastlog" ++#define DATA_NODE_IP_FILE "@VAR_DIR@/lib/uronode/iplog" + + #endif +diff --git a/procinfo.h b/procinfo.h +index 366a7bd..f8d8369 100644 +--- a/procinfo.h ++++ b/procinfo.h +@@ -34,7 +34,7 @@ struct proc_dev { + + + /* +- * /var/ax25/flex/gateways: (example) ++ * /var/lib/flexd/gateways: (example) + * addr callsign dev dest digipeaters + * 00001 PI4TUE ax1 935 + */ +@@ -49,7 +49,7 @@ struct flex_gt { + }; + + /* +- * /usr/local/var/ax25/flex/destinations: (example) ++ * /var/lib/flexd/destinations: (example) + * callsign ssid rtt gateway + * 9A0XZG 0-15 2575 00001 + * DB0AAA 0-0 63 00001 diff --git a/uronode-2.3.1-override-dirs-in-unattended-install.patch b/uronode-2.3.1-override-dirs-in-unattended-install.patch new file mode 100644 index 0000000..e06cb03 --- /dev/null +++ b/uronode-2.3.1-override-dirs-in-unattended-install.patch @@ -0,0 +1,40 @@ +diff --git a/configure b/configure +index 967ee29..2979b02 100755 +--- a/configure ++++ b/configure +@@ -14,12 +14,13 @@ echo "Cleaning the directory for a fresh configuration..." + _sleep 2 + make distclean > make.debug + +-ETC_DIR=/usr/local/etc/ax25 +-SBIN_DIR=/usr/local/sbin +-BIN_DIR=/usr/local/bin +-LIB_DIR=/usr/local/lib +-MAN_DIR=/usr/local/share/man +-VAR_DIR=/usr/local/var/ax25 ++[ "$ETC_DIR" ] || ETC_DIR=/usr/local/etc/ax25 ++[ "$SBIN_DIR" ] || SBIN_DIR=/usr/local/sbin ++[ "$BIN_DIR" ] || BIN_DIR=/usr/local/bin ++[ "$LIB_DIR" ] || LIB_DIR=/usr/local/lib ++[ "$DATA_DIR" ] || DATA_DIR=/usr/local/share ++[ "$MAN_DIR" ] || MAN_DIR=$DATA_DIR/man ++[ "$VAR_DIR" ] || VAR_DIR=/usr/local/var/ax25 + + echo "Welcome to the configuration utility for URONode. This configure script" + echo "will very simply and easily guide you into installling URONode with as" +@@ -185,6 +186,7 @@ sed -e "s~@ARCH@~$ARCH~g; \ + s~@BIN_DIR@~$BIN_DIR~g; \ + s~@VAR_DIR@~$VAR_DIR~g; \ + s~@MAN_DIR@~$MAN_DIR~g; \ ++ s~@DATA_DIR@~$DATA_DIR~g; \ + s~@ZLIB@~$ZLIB~g" Makefile.include + + echo "Creating config.h" +@@ -195,6 +197,7 @@ sed -e "s~@ETC_DIR@~$ETC_DIR~g; \ + s~@BIN_DIR@~$BIN_DIR~g; \ + s~@VAR_DIR@~$VAR_DIR~g; \ + s~@MAN_DIR@~$MAN_DIR~g; \ +++ s~@DATA_DIR@~$DATA_DIR~g; \ + s~@HAVEAX25@~$HAVEAX25~g; \ + s~@HAVEFLEX@~$HAVEFLEX~g; \ + s~@HAVENETROM@~$HAVENETROM~g; \ diff --git a/uronode.spec b/uronode.spec index e0dd3ce..3442ee9 100644 --- a/uronode.spec +++ b/uronode.spec @@ -8,7 +8,7 @@ Summary: Alternative packet radio system for Linux Name: uronode -Version: 2.2 +Version: 2.3.1 Release: 1%{?dist} License: GPLv2+ Group: Applications/Communications @@ -23,12 +23,9 @@ Source2: uronode@.service Source3: uronode.socket Source4: uronode.xinetd Source5: uronode-README.fedora -# Acidentaly dropped by upstream, license file from uronode-2.1 -Source6: uronode-license -Patch0: uronode-2.1-non-interactive-configure.patch -Patch1: uronode-2.2-install-fix.patch -Patch2: uronode-2.2-no-md2.patch -Patch3: uronode-2.2-ax25-build-fix.patch +# Sent upstream +Patch0: uronode-2.3.1-override-dirs-in-unattended-install.patch +Patch1: uronode-2.3.1-install-fix.patch %description URONode is an alternative packet radio system for Linux. It supports @@ -37,25 +34,24 @@ various IP functions, and ANSI colors. %prep %setup -q -%patch0 -p1 -b .non-interactive-setup +%patch0 -p1 -b .override-dirs-in-unattended-install %patch1 -p1 -b .install-fix -%patch2 -p1 -b .no-md2 -%patch3 -p1 -b .ax25-build-fix # Copy Fedora readme into place cp -p %{SOURCE5} README.fedora -# license -cp -p %{SOURCE6} LICENSE - # Removing bundled libax25, using system one. rm -rf include -# Remove binaries -rm -f ./calibrate - %build export NON_INTERACTIVE=1 +export ETC_DIR=/etc/ax25 +export SBIN_DIR=/usr/sbin +export BIN_DIR=/usr/bin +export LIB_DIR=/usr/lib +export DATA_DIR=/usr/share +export MAN_DIR=$DATA_DIR/man +export VAR_DIR=/var ./configure make %{?_smp_mflags} CFLAGS="%{optflags} %{?cflags_harden}" LDFLAGS="%{?__global_ldflags} %{?ldflags_harden}" @@ -87,7 +83,7 @@ touch %{buildroot}/%{_var}/{lib/flexd/destinations,lib/uronode/mheard.dat} %systemd_postun_with_restart flexd.service uronode.socket %files -%doc README.fedora README URONode.his FAQ COLORS CHANGES.1 CHANGES.2 LICENSE +%doc README.fedora README URONode.his FAQ COLORS CHANGES.1 CHANGES.2 COPYING %{_sbindir}/* %{_mandir}/*/* @@ -113,6 +109,16 @@ touch %{buildroot}/%{_var}/{lib/flexd/destinations,lib/uronode/mheard.dat} %ghost %{_var}/lib/uronode/mheard.dat %changelog +* Mon Feb 16 2015 Jaroslav Škarvada - 2.3.1-1 +- New version +- Rebased install-fix patch +- Allowed to override installation directories in configure script + (by override-dirs-in-unattended-install patch) +- Dropped downstream license file, license file provided by upstream +- Dropped non-interactive-configure patch (upstreamed) +- Dropped no-md2 patch (upstreamed) +- Dropped ax25-build-fix patch (upstreamed) + * Wed Dec 3 2014 Jaroslav Škarvada - 2.2-1 - New version - Updated ax25-build-fix patch, now flexd.c is affected