From 7e2988c830c9bcf34d8b6ca49ebedb0f40c5cb1df6621656eee694e56d58b21a Mon Sep 17 00:00:00 2001 From: Sebastian Wagner Date: Sat, 11 Nov 2017 10:02:51 +0000 Subject: [PATCH] Accepting request 540687 from home:avindra - update to 2.15 (see ChangeLog for release notes and all changes since 2.4) - switch to new github url - run spec-cleaner - drop all patches * axel-fix_buffer_overflow.patch + upstreamed in 425dd156b76f2377a3e386324c282bdcdac90a40 * axel-getaddrinfo.patch + upstreamed in cc1142b8de01e182cbaf4cc8a606c80696d8c0b8 * axel-fix-url-max-length.patch + upstreamed in ce40ee76c25a84f386128927fcd0bab4e9751268 * axel-2.4-configure.patch + unneeded OBS-URL: https://build.opensuse.org/request/show/540687 OBS-URL: https://build.opensuse.org/package/show/network:utilities/axel?expand=0&rev=8 --- axel-2.15.tar.xz | 3 ++ axel-2.4-configure.patch | 30 ----------- axel-2.4.tar.bz2 | 3 -- axel-fix-url-max-length.patch | 11 ---- axel-fix_buffer_overflow.patch | 11 ---- axel-getaddrinfo.patch | 92 ---------------------------------- axel.changes | 17 +++++++ axel.spec | 32 +++--------- 8 files changed, 27 insertions(+), 172 deletions(-) create mode 100644 axel-2.15.tar.xz delete mode 100644 axel-2.4-configure.patch delete mode 100644 axel-2.4.tar.bz2 delete mode 100644 axel-fix-url-max-length.patch delete mode 100644 axel-fix_buffer_overflow.patch delete mode 100644 axel-getaddrinfo.patch diff --git a/axel-2.15.tar.xz b/axel-2.15.tar.xz new file mode 100644 index 0000000..50ebcfb --- /dev/null +++ b/axel-2.15.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:70daa27abca5a3f1abe4be833d8f64205ac422416f5bcf396856eb6dd0fe9194 +size 188132 diff --git a/axel-2.4-configure.patch b/axel-2.4-configure.patch deleted file mode 100644 index 25412f7..0000000 --- a/axel-2.4-configure.patch +++ /dev/null @@ -1,30 +0,0 @@ -When called with --disable-dependency-tracking, the configure -script would exit with the usage output. This patch make the script -accept and ignore that option. - -Index: configure -=================================================================== ---- configure.orig 2009-04-27 15:19:03.000000000 +0100 -+++ configure 2011-12-22 16:46:32.000000000 +0000 -@@ -20,7 +20,7 @@ strip=1 - arch=`uname -s` - - while [ -n "$1" ]; do -- e="`expr "$1" : '--\(.*=.*\)'`" -+ e="`expr "$1" : '--\(.*\)'`" - if [ -z "$e" ]; then - cat<http, "location:" ) ) == NULL ) - return( 0 ); -- sscanf( t, "%255s", s ); -+ sscanf( t, "%1024", s ); - if( strstr( s, "://" ) == NULL) - { - sprintf( conn->http->headers, "%s%s", diff --git a/axel-fix_buffer_overflow.patch b/axel-fix_buffer_overflow.patch deleted file mode 100644 index 92b33a1..0000000 --- a/axel-fix_buffer_overflow.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- http.c.orig 2010-10-12 16:45:27.000000000 +0200 -+++ http.c 2010-10-12 16:47:19.000000000 +0200 -@@ -164,7 +164,7 @@ - { - i ++; - } -- strncat( conn->headers, s, MAX_QUERY ); -+ strncat( conn->headers, s, sizeof(conn->headers) - strlen(conn->headers) - 1 ); - } - - #ifdef DEBUG diff --git a/axel-getaddrinfo.patch b/axel-getaddrinfo.patch deleted file mode 100644 index 286e304..0000000 --- a/axel-getaddrinfo.patch +++ /dev/null @@ -1,92 +0,0 @@ ---- tcp.c.orig 2010-10-12 16:51:18.000000000 +0200 -+++ tcp.c 2010-10-12 17:23:49.000000000 +0200 -@@ -25,13 +25,18 @@ - - #include "axel.h" - -+#include -+ - /* Get a TCP connection */ - int tcp_connect( char *hostname, int port, char *local_if ) - { -- struct hostent *host = NULL; -- struct sockaddr_in addr; -+ struct addrinfo hints; -+ struct addrinfo *ai, *rp; -+ char portbuf[8]; -+ snprintf(portbuf, 8, "%d", port); -+ - struct sockaddr_in local; -- int fd; -+ int fd = -1; - - #ifdef DEBUG - socklen_t i = sizeof( local ); -@@ -39,20 +44,34 @@ - fprintf( stderr, "tcp_connect( %s, %i ) = ", hostname, port ); - #endif - -- /* Why this loop? Because the call might return an empty record. -- At least it very rarely does, on my system... */ -- for( fd = 0; fd < 5; fd ++ ) -- { -- if( ( host = gethostbyname( hostname ) ) == NULL ) -- return( -1 ); -- if( *host->h_name ) break; -- } -- if( !host || !host->h_name || !*host->h_name ) -- return( -1 ); -- -- if( ( fd = socket( AF_INET, SOCK_STREAM, 0 ) ) == -1 ) -- return( -1 ); -- -+ { -+ memset(&hints, 0, sizeof(struct addrinfo)); -+ hints.ai_family = AF_UNSPEC; -+ hints.ai_socktype = SOCK_STREAM; -+ hints.ai_flags = 0; -+ hints.ai_protocol = 0; -+ if (getaddrinfo(hostname, portbuf, &hints, &ai) != 0) -+ { -+ fd = -1; -+ } else { -+ for (rp = ai; rp != NULL; rp->ai_next) -+ { -+ fd = socket(rp->ai_family, rp->ai_socktype, rp->ai_protocol); -+ if (fd < 0) continue; -+ if (connect(fd, rp->ai_addr, rp->ai_addrlen) >= 0) -+ { -+ break; -+ } -+ close(fd); -+ } -+ } -+ freeaddrinfo(ai); -+ } -+ if (fd < 0) -+ { -+ return( -1 ); -+ } -+ - if( local_if && *local_if ) - { - local.sin_family = AF_INET; -@@ -64,17 +83,7 @@ - return( -1 ); - } - } -- -- addr.sin_family = AF_INET; -- addr.sin_port = htons( port ); -- addr.sin_addr = *( (struct in_addr *) host->h_addr ); -- -- if( connect( fd, (struct sockaddr *) &addr, sizeof( struct sockaddr_in ) ) == -1 ) -- { -- close( fd ); -- return( -1 ); -- } -- -+ - #ifdef DEBUG - getsockname( fd, &local, &i ); - fprintf( stderr, "%i\n", ntohs( local.sin_port ) ); diff --git a/axel.changes b/axel.changes index eff6fba..f32d885 100644 --- a/axel.changes +++ b/axel.changes @@ -1,3 +1,20 @@ +------------------------------------------------------------------- +Sat Nov 11 04:06:28 UTC 2017 - aavindraa@gmail.com + +- update to 2.15 (see ChangeLog for release notes and all changes + since 2.4) +- switch to new github url +- run spec-cleaner +- drop all patches + * axel-fix_buffer_overflow.patch + + upstreamed in 425dd156b76f2377a3e386324c282bdcdac90a40 + * axel-getaddrinfo.patch + + upstreamed in cc1142b8de01e182cbaf4cc8a606c80696d8c0b8 + * axel-fix-url-max-length.patch + + upstreamed in ce40ee76c25a84f386128927fcd0bab4e9751268 + * axel-2.4-configure.patch + + unneeded + ------------------------------------------------------------------- Wed Apr 12 13:46:32 UTC 2017 - sebix+novell.com@sebix.at diff --git a/axel.spec b/axel.spec index ce66b35..2631f93 100644 --- a/axel.spec +++ b/axel.spec @@ -17,20 +17,14 @@ Name: axel -Version: 2.4 +Version: 2.15 Release: 0 Summary: Lightweight Download Accelerator License: GPL-2.0+ Group: Productivity/Networking/Other Url: http://axel.alioth.debian.org/ -Source: axel-%{version}.tar.bz2 -Patch1: axel-fix_buffer_overflow.patch -Patch2: axel-getaddrinfo.patch -# PATCH-FIX-OPENSUSE axel-2.4-configure.patch andreas.stieger@gmx.de -- fix to accept and ignore --disable-dependency-tracking -Patch3: axel-2.4-configure.patch -# PATCH-FIX-OPENSUSE axel-fix-url-max-length.patch sebix+novell@sebix.at -- fix to accept longer URLs -Patch4: axel-fix-url-max-length.patch -BuildRoot: %{_tmppath}/%{name}-%{version}-build +Source: https://github.com/axel-download-accelerator/axel/releases/download/v%{version}/%{name}-%{version}.tar.xz +BuildRequires: pkgconfig(openssl) %description Axel tries to accelerate HTTP/FTP downloading process by using multiple @@ -40,31 +34,19 @@ byte-critical systems. %prep %setup -q -%patch1 -%patch2 -%patch3 -%patch4 %build -%configure \ - --debug=0 \ - --strip=0 \ - --i18n=1 - +%configure make %{?_smp_mflags} %install %make_install -rm -rf "%{buildroot}%{_mandir}/zh_CN" - %find_lang axel %files -f axel.lang -%defattr(-,root,root) -%doc CHANGES -%config %{_sysconfdir}/axelrc -%{_bindir}/axel -%{_mandir}/man1/axel.1%{ext_man} +%doc ChangeLog +%{_bindir}/%{name} +%{_mandir}/man1/%{name}.1%{ext_man} %changelog