diff --git a/.gitignore b/.gitignore index e472b4e..e85b06f 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ ax25-tools.tar.gz +/ax25-tools-1.0.3.tar.gz diff --git a/ax25-tools-0.0.10-build-fix.patch b/ax25-tools-0.0.10-build-fix.patch deleted file mode 100644 index 1992a61..0000000 --- a/ax25-tools-0.0.10-build-fix.patch +++ /dev/null @@ -1,61 +0,0 @@ -diff --git a/tcpip/rip98d.c b/tcpip/rip98d.c -index e40f21b..a672451 100644 ---- a/tcpip/rip98d.c -+++ b/tcpip/rip98d.c -@@ -32,9 +32,9 @@ struct dest_struct dest_list[50]; - - int dest_count = 0; - --int debug = FALSE; --int restrict = FALSE; --int logging = FALSE; -+int debug = FALSE; -+int rip_restrict = FALSE; -+int logging = FALSE; - - struct route_struct *first_route = NULL; - -@@ -203,7 +203,7 @@ static int read_routes(void) - continue; - } - -- if (restrict) { -+ if (rip_restrict) { - if (inet_netof(address) != 44) { - if (debug && logging) - syslog(LOG_DEBUG, "rejecting route to %s/%ld - not ampr.org\n", inet_ntoa(address), netmask); -@@ -286,7 +286,7 @@ int main(int argc, char **argv) - logging = TRUE; - break; - case 'r': -- restrict = TRUE; -+ rip_restrict = TRUE; - break; - case 't': - interval = atoi(optarg) * 60; -diff --git a/tcpip/rip98d.h b/tcpip/rip98d.h -index fb00a7d..a3edadb 100644 ---- a/tcpip/rip98d.h -+++ b/tcpip/rip98d.h -@@ -44,7 +44,7 @@ extern struct dest_struct dest_list[]; - extern int dest_count; - - extern int debug; --extern int restrict; -+extern int rip_restrict; - extern int logging; - - /* In rip98d.c */ -diff --git a/tcpip/rip98r.c b/tcpip/rip98r.c -index 25cb546..c495fc0 100644 ---- a/tcpip/rip98r.c -+++ b/tcpip/rip98r.c -@@ -127,7 +127,7 @@ void receive_routes(int s) - continue; - } - -- if (restrict) { -+ if (rip_restrict) { - if (network != 44) { - if (debug && logging) - syslog(LOG_DEBUG, " route to %s/%d metric %d - rejected\n", inet_ntoa(addr), bits, metric); diff --git a/ax25-tools-0.0.10-format-security.patch b/ax25-tools-0.0.10-format-security.patch index 1451a7a..0e27ad4 100644 --- a/ax25-tools-0.0.10-format-security.patch +++ b/ax25-tools-0.0.10-format-security.patch @@ -1,17 +1,41 @@ ---- a/6pack/m6pack.c -+++ b/6pack/m6pack.c -@@ -112,7 +112,7 @@ static __u8 obuf[SIZE]; /* buffer for sixpack_tx() */ +diff -Naur ax25-tools-0.0.10-rc4.orig/6pack/m6pack.c ax25-tools-0.0.10-rc4/6pack/m6pack.c +--- ax25-tools-0.0.10-rc4.orig/6pack/m6pack.c 2013-06-09 13:08:33.000000000 -0500 ++++ ax25-tools-0.0.10-rc4/6pack/m6pack.c 2015-09-21 09:02:02.845385771 -0500 +@@ -444,18 +444,18 @@ + return 1; + case ':': + case '?': +- fprintf(stderr, usage_string); ++ fprintf(stderr,"%s", usage_string); + return 1; + } + } - static int invalid_ports = 0; + if ((argc - optind) < 2 && ptmxdevices == 0) { +- fprintf(stderr, usage_string); ++ fprintf(stderr, "%s", usage_string); + return 1; + } + + if ((argc - optind) < 1 && ptmxdevices > 0) { +- fprintf(stderr, usage_string); ++ fprintf(stderr, "%s", usage_string); + return 1; + } --static char *usage_string = "usage: m6pack [-l] [-s speed] [-x num_ptmx_devices] [-v] tyinterface pty ..\n"; -+static const char usage_string[] = "usage: m6pack [-l] [-s speed] [-x num_ptmx_devices] [-v] tyinterface pty ..\n"; +diff -Naur ax25-tools-0.0.10-rc4.orig/ax25/axparms.c ax25-tools-0.0.10-rc4/ax25/axparms.c +--- ax25-tools-0.0.10-rc4.orig/ax25/axparms.c 2013-06-09 13:08:33.000000000 -0500 ++++ ax25-tools-0.0.10-rc4/ax25/axparms.c 2015-09-21 08:46:59.757122339 -0500 +@@ -59,7 +59,7 @@ + int i, j; + int ip_mode = ' '; + FILE* fp; +- char routebuf[80]; ++ const char routebuf[80]; - static int dump_report = FALSE; - static int logging = FALSE; ---- a/ax25/axparms.c -+++ b/ax25/axparms.c -@@ -147,7 +147,7 @@ PROC_AX25_ROUTE_FILE); + if (strcmp(argv[2], "add") == 0) { + ax25_route.port_addr = *callsign; +@@ -139,7 +139,7 @@ return 1; } while (fgets(routebuf,80,fp)) @@ -20,38 +44,79 @@ puts(""); } ---- a/kiss/mkiss.c -+++ b/kiss/mkiss.c -@@ -82,7 +82,7 @@ static int crc_errors = 0; - static int invalid_ports = 0; - static int return_polls = 0; - --static char *usage_string = "usage: mkiss [-p interval] [-c] [-f] [-h] [-l] [-s speed] [-v] [-x ] ttyinterface pty ..\n"; -+static const char usage_string[] = "usage: mkiss [-p interval] [-c] [-f] [-h] [-l] [-s speed] [-v] [-x ] ttyinterface pty ..\n"; +diff -Naur ax25-tools-0.0.10-rc4.orig/kiss/mkiss.c ax25-tools-0.0.10-rc4/kiss/mkiss.c +--- ax25-tools-0.0.10-rc4.orig/kiss/mkiss.c 2013-06-09 13:08:33.000000000 -0500 ++++ ax25-tools-0.0.10-rc4/kiss/mkiss.c 2015-09-21 08:59:16.299898538 -0500 +@@ -467,18 +467,18 @@ + return 1; + case ':': + case '?': +- fprintf(stderr, usage_string); ++ fprintf(stderr, "%s", usage_string); + return 1; + } + } - static int dump_report = FALSE; + if ((argc - optind) < 2 && ptmxdevices == 0) { +- fprintf(stderr, usage_string); ++ fprintf(stderr, "%s", usage_string); + return 1; + } ---- a/netrom/nrparms.c -+++ b/netrom/nrparms.c -@@ -30,8 +30,8 @@ - #include - #include + if ((argc - optind) < 1 && ptmxdevices > 0) { +- fprintf(stderr, usage_string); ++ fprintf(stderr, "%s", usage_string); + return 1; + } --char nodes_usage[] = "usage: nrparms -nodes nodecall +|- ident quality count port neighbour [digicall...]\n"; --char routes_usage[] = "usage: nrparms -routes port nodecall [digicall...] +|- pathquality\n"; -+static const char nodes_usage[] = "usage: nrparms -nodes nodecall +|- ident quality count port neighbour [digicall...]\n"; -+static const char routes_usage[] = "usage: nrparms -routes port nodecall [digicall...] +|- pathquality\n"; +diff -Naur ax25-tools-0.0.10-rc4.orig/netrom/nrparms.c ax25-tools-0.0.10-rc4/netrom/nrparms.c +--- ax25-tools-0.0.10-rc4.orig/netrom/nrparms.c 2013-06-09 13:08:33.000000000 -0500 ++++ ax25-tools-0.0.10-rc4/netrom/nrparms.c 2015-09-21 09:04:28.841799966 -0500 +@@ -210,7 +210,7 @@ + + if (strncmp(argv[1], "-n", 2) == 0) { + if (argc < 9) { +- fprintf(stderr, nodes_usage); ++ fprintf(stderr, "%s", nodes_usage); + close(s); + return 1; + } +@@ -221,7 +221,7 @@ - void nodes(int s, char *nodecall, char *op, char *ident, int quality, int count, char *port, char *neighbour, char *digis[]) - { ---- a/rose/rsparms.c -+++ b/rose/rsparms.c -@@ -27,7 +27,7 @@ + if (strncmp(argv[1], "-r", 2) == 0) { + if (argc < 6) { +- fprintf(stderr, routes_usage); ++ fprintf(stderr, "%s", routes_usage); + close(s); + return 1; + } +diff -Naur ax25-tools-0.0.10-rc4.orig/rose/rsparms.c ax25-tools-0.0.10-rc4/rose/rsparms.c +--- ax25-tools-0.0.10-rc4.orig/rose/rsparms.c 2013-06-09 13:08:33.000000000 -0500 ++++ ax25-tools-0.0.10-rc4/rose/rsparms.c 2015-09-21 09:09:48.051400618 -0500 +@@ -19,7 +19,7 @@ #include "../pathnames.h" --char nodes_usage[] = "usage: rsparms -node add|del nodeaddr[/mask] port neighbour [digis...]\n rsparms -node list\n"; -+static const char nodes_usage[] = "usage: rsparms -node add|del nodeaddr[/mask] port neighbour [digis...]\n rsparms -node list\n"; +-char nodes_usage[] = "usage: rsparms -nodes add|del nodeaddr[/mask] port neighbour [digis...]\n rsparms -nodes list\n"; ++static char nodes_usage[] = "usage: rsparms -nodes add|del nodeaddr[/mask] port neighbour [digis...]\n rsparms -nodes list\n"; /* print the Rose neighbour whose number is supplied */ void printnb(char *neigh) +@@ -68,7 +68,7 @@ + int args; + + if (argc < 3) { +- fprintf(stderr, nodes_usage); ++ fprintf(stderr, "%s", nodes_usage); + exit(1); + } + +@@ -114,7 +114,7 @@ + } + + if (argc < 6) { +- fprintf(stderr, nodes_usage); ++ fprintf(stderr, "%s", nodes_usage); + exit(1); + } + diff --git a/ax25-tools-0.0.10-nrattach-fix.patch b/ax25-tools-0.0.10-nrattach-fix.patch deleted file mode 100644 index 8a0ee32..0000000 --- a/ax25-tools-0.0.10-nrattach-fix.patch +++ /dev/null @@ -1,35 +0,0 @@ -diff --git a/netrom/nrattach.c b/netrom/nrattach.c -index bd6cb58..c3a9e63 100644 ---- a/netrom/nrattach.c -+++ b/netrom/nrattach.c -@@ -247,10 +247,8 @@ int main(int argc, char *argv[]) - return 1; - } - --#ifdef notdef - if (!startiface(dev, hp)) - return 1; --#endif - - printf("NET/ROM port %s bound to device %s\n", argv[optind], dev); - -diff -Naur ax25-tools.orig/netrom/nrattach.c ax25-tools/netrom/nrattach.c ---- ax25-tools.orig/netrom/nrattach.c 2005-11-28 14:14:48.000000000 -0600 -+++ ax25-tools/netrom/nrattach.c 2015-09-18 08:20:11.718492511 -0500 -@@ -7,6 +7,7 @@ - #include - #include - #include -+#include - - #include - -@@ -116,7 +117,7 @@ - return FALSE; - } - -- for (i = 0; i < 4; i++) { -+ for (i = 0; i < INT_MAX; i++) { - sprintf(dev, "nr%d", i); - strcpy(ifr.ifr_name, dev); - diff --git a/ax25-tools.spec b/ax25-tools.spec index cf74c75..b761211 100644 --- a/ax25-tools.spec +++ b/ax25-tools.spec @@ -1,12 +1,15 @@ Name: ax25-tools -Version: 0.0.10 -Release: 0.14.rc2%{?dist} +Version: 1.0.3 +Release: 1%{?dist} Summary: Tools used to configure an ax.25 enabled computer + License: GPLv2+ URL: http://www.linux-ax25.org/wiki/LinuxAX25 -#Actual tarball URL http://www.linux-ax25.org/cvsweb/ax25-tools/ax25-tools.tar.gz?tarball=1 -Source0: http://www.linux-ax25.org/cvsweb/ax25-tools/ax25-tools.tar.gz +# Official upstream is not active, moving to supported fork. +# https://github.com/ve7fet/linuxax25 +# cd ax25tools; git archive --prefix=%%{name}-%%{version}/ -o %%{name}-%{version} HEAD +Source0: %{name}-%{version}.tar.gz Source1: smdiag.desktop Source2: xfhdlcchpar.desktop Source3: xfhdlcsd.desktop @@ -16,10 +19,8 @@ Source5: xfsmmixer.desktop Source6: %{name}.png Patch0: ax25-tools-0.0.10-format-security.patch -Patch1: ax25-tools-0.0.10-nrattach-fix.patch -Patch2: ax25-tools-0.0.10-build-fix.patch # Sent upstream -Patch3: ax25-tools-0.0.10-rose-fix.patch +Patch1: ax25-tools-0.0.10-rose-fix.patch BuildRequires: automake BuildRequires: libax25-devel @@ -95,6 +96,7 @@ and sound modem. %package docs Summary: Documentation for ax25-tools and ax25-tools-x +BuildArch: noarch %description docs ax25-tools is a collection of tools that are used to configure an ax.25 enabled @@ -104,22 +106,23 @@ ax25-tools-x %prep -%setup -qn %{name} +%setup -q %patch0 -p1 -%patch1 -p1 -b .nrattach-fix -%patch2 -p1 -b .build-fix -%patch3 -p1 -b .rose-fix +%patch1 -p1 -b .rose-fix %build -autoreconf -fiv +./autogen.sh %configure -make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS" +make %{?_smp_mflags} CFLAGS="%{optflags}" %install %make_install +# Install configuration files manually +make installconf DESTDIR=%{buildroot} + # no upstream .desktop or icon yet so we'll use a temporary one mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/pixmaps/ cp %{SOURCE6} ${RPM_BUILD_ROOT}%{_datadir}/pixmaps/%{name}.png @@ -136,14 +139,25 @@ desktop-file-install \ --dir=${RPM_BUILD_ROOT}%{_datadir}/applications %{SOURCE5} #don't include these twice -rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name}/ +rm -rf $RPM_BUILD_ROOT%{_docdir}/ax25tools %files -%doc AUTHORS ChangeLog COPYING README -%doc yamdrv/README.yamdrv user_call/README.user_call tcpip/ttylinkd.README dmascc/README.dmascc +%doc AUTHORS ChangeLog COPYING +%doc doc/README* %{_bindir}/* %{_sbindir}/* +%{_localstatedir}/ax25/mheard/ +%config(noreplace) %{_sysconfdir}/ax25/ax25.profile +%config(noreplace) %{_sysconfdir}/ax25/ax25d.conf +%config(noreplace) %{_sysconfdir}/ax25/axports +%config(noreplace) %{_sysconfdir}/ax25/axspawn.conf +%config(noreplace) %{_sysconfdir}/ax25/nrbroadcast +%config(noreplace) %{_sysconfdir}/ax25/nrports +%config(noreplace) %{_sysconfdir}/ax25/rip98d.conf +%config(noreplace) %{_sysconfdir}/ax25/rsports +%config(noreplace) %{_sysconfdir}/ax25/rxecho.conf +%config(noreplace) %{_sysconfdir}/ax25/ttylinkd.conf %exclude %{_bindir}/smdiag %exclude %{_sbindir}/xfhdlcchpar %exclude %{_sbindir}/xfhdlcst @@ -151,7 +165,6 @@ rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name}/ %exclude %{_sbindir}/xfsmmixer %files x -%doc AUTHORS ChangeLog COPYING %{_bindir}/smdiag %{_sbindir}/xfhdlcchpar %{_sbindir}/xfhdlcst @@ -161,12 +174,15 @@ rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name}/ %{_datadir}/applications/*.desktop %files docs -%doc AUTHORS ChangeLog COPYING +%doc COPYING %{_mandir}/man?/* %changelog -* Fri Sep 18 2015 Richard Shaw 0.0.10-0.14.rc2 +* Fri Sep 18 2015 Richard Shaw - 0.0.10-0.15.rc4 +- Update to latest upstream release. + +* Fri Sep 18 2015 Richard Shaw - 0.0.10-0.14.rc2 - Prevent duplicate binaries from being packaged, fixes BZ#1058070. - Add patch to allow more than 4 netrom ports, fixes BZ#1152001. - Spec file cleanup. diff --git a/sources b/sources index 3c88d35..a078fdf 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -08f1d4990c628346cc01fad6de19a46c ax25-tools.tar.gz +71d84d319aae82f670c93b848b185394 ax25-tools-1.0.3.tar.gz