From 8c4e1385716f0caaec212dd5f66d3d97a8cb68f2 Mon Sep 17 00:00:00 2001 From: Janthon <59256720+JanthonAlyn@users.noreply.github.com> Date: Sun, 7 Jan 2024 10:43:30 +0800 Subject: [PATCH 1/4] Update configure.ac Fixed autoreconf warning. configure.ac:731: warning: The 'AM_PROG_MKDIR_P' macro is deprecated, and its use is discouraged. configure.ac:731: You should use the Autoconf-provided 'AC_PROG_MKDIR_P' macro instead, configure.ac:731: and use '$(MKDIR_P)' instead of '$(mkdir_p)'in your Makefile.am files. --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 14b340f431..004956760f 100644 --- a/configure.ac +++ b/configure.ac @@ -737,7 +737,7 @@ fi # Checks for library functions. AM_GNU_GETTEXT([external]) -AM_GNU_GETTEXT_VERSION([0.18]) +AM_GNU_GETTEXT_VERSION([0.19]) AC_FUNC_ERROR_AT_LINE AC_PROG_GCC_TRADITIONAL From 0aa23a39d9ed6c0ddb0f4f40a636765d0a95e043 Mon Sep 17 00:00:00 2001 From: luzpaz Date: Sun, 14 Jan 2024 16:22:28 +0000 Subject: [PATCH 2/4] Fix various typos Found via `codespell -q 3 -S "./deps,./ChangeLog.old,./LICENSE.OpenSSL,./doc/manual-src/pt,./doc/sphinx_themes/sphinx_rtd_theme/locale" -L ans,anull,clen,dependant,filetest,fo,hel,nd,orign,padd,parm,servent,tennant,worl,windows` --- configure.ac | 4 ++-- src/AbstractHttpServerResponseCommand.cc | 2 +- src/HttpResponse.h | 2 +- src/LogFactory.h | 4 ++-- src/NameResolver.h | 2 +- src/PortEventPoll.cc | 2 +- src/ServerStat.h | 2 +- src/WinTLSSession.cc | 2 +- src/getaddrinfo.c | 2 +- src/usage_text.h | 2 +- test/AllTest.cc | 2 +- test/FileTest.cc | 4 ++-- test/RequestTest.cc | 4 ++-- test/RpcMethodTest.cc | 4 ++-- test/SocketCoreTest.cc | 2 +- test/UriSplitTest.cc | 2 +- 16 files changed, 21 insertions(+), 21 deletions(-) diff --git a/configure.ac b/configure.ac index 004956760f..88778a3359 100644 --- a/configure.ac +++ b/configure.ac @@ -39,7 +39,7 @@ case "$host" in # available from even without (un)helpful interference # from , and also defines __USE_MINGW_ANSI_STDIO. EXTRACPPFLAGS="$EXTRACPPFLAGS -D_POSIX_C_SOURCE=1" - # Build with ASLR (dynamicbase) and NX compatiblity (nxcompat) + # Build with ASLR (dynamicbase) and NX compatibility (nxcompat) # Enable pie once upstream/binutils gets fixed to produce correct # binaries with it. EXTRALDFLAGS="$EXTRALDFLAGS -Wl,--dynamicbase -Wl,--nxcompat" @@ -749,7 +749,7 @@ AC_FUNC_STRFTIME AC_FUNC_VPRINTF AC_FUNC_FORK AC_FUNC_STRTOD -# Don't use AC_FUNC_MMAP becaue it fails on some platforms (e.g., +# Don't use AC_FUNC_MMAP because it fails on some platforms (e.g., # OpenWRT) which have mmap and it works in the way we use in aria2. # Instead use mmap in AC_CHECK_FUNCS list. AC_CHECK_FUNCS([__argz_count \ diff --git a/src/AbstractHttpServerResponseCommand.cc b/src/AbstractHttpServerResponseCommand.cc index 80923ae928..928d505862 100644 --- a/src/AbstractHttpServerResponseCommand.cc +++ b/src/AbstractHttpServerResponseCommand.cc @@ -122,7 +122,7 @@ bool AbstractHttpServerResponseCommand::execute() else { if (timeoutTimer_.difference(global::wallclock()) >= 30_s) { A2_LOG_INFO(fmt("CUID#%" PRId64 - " - HttpServer: Timeout while trasmitting response.", + " - HttpServer: Timeout while transmitting response.", getCuid())); return true; } diff --git a/src/HttpResponse.h b/src/HttpResponse.h index 2caffaf16c..c15dbaa30d 100644 --- a/src/HttpResponse.h +++ b/src/HttpResponse.h @@ -66,7 +66,7 @@ class HttpResponse { /** * Returns filename. - * If content-disposition header is privided in response header, + * If content-disposition header is provided in response header, * this function returns the filename from it. * If it is not there, returns the part of filename from the request URL. */ diff --git a/src/LogFactory.h b/src/LogFactory.h index fc2f8f6072..29131ba2e0 100644 --- a/src/LogFactory.h +++ b/src/LogFactory.h @@ -84,7 +84,7 @@ class LogFactory { static void setLogLevel(Logger::LEVEL level); /** - * Set log level to output to file by string represention of log + * Set log level to output to file by string representation of log * level. Possible values are: debug, info, notice, warn, error */ static void setLogLevel(const std::string& level); @@ -95,7 +95,7 @@ class LogFactory { static void setConsoleLogLevel(Logger::LEVEL level); /** - * Set log level to output to console by string represention of log + * Set log level to output to console by string representation of log * level. Possible values are: debug, info, notice, warn, error */ static void setConsoleLogLevel(const std::string& level); diff --git a/src/NameResolver.h b/src/NameResolver.h index a389cc3f4e..e5c201ab64 100644 --- a/src/NameResolver.h +++ b/src/NameResolver.h @@ -50,7 +50,7 @@ class NameResolver { NameResolver(); /** - * Reolved addresses are pushed into addresses. + * Resolved addresses are pushed into addresses. */ void resolve(std::vector& resolvedAddresses, const std::string& hostname); diff --git a/src/PortEventPoll.cc b/src/PortEventPoll.cc index ecd7fbfab9..0d3fbae1fa 100644 --- a/src/PortEventPoll.cc +++ b/src/PortEventPoll.cc @@ -103,7 +103,7 @@ void PortEventPoll::poll(const struct timeval& tv) int res; uint_t nget = 1; // If port_getn was interrupted by signal, it can consume events but - // not updat nget!. For this very annoying bug, we have to check + // not update nget!. For this very annoying bug, we have to check // actually event is filled or not. portEvents_[0].portev_user = (void*)-1; res = port_getn(port_, portEvents_, portEventsSize_, &nget, &timeout); diff --git a/src/ServerStat.h b/src/ServerStat.h index 3c73a04df9..dede65f92e 100644 --- a/src/ServerStat.h +++ b/src/ServerStat.h @@ -91,7 +91,7 @@ class ServerStat { // This method doesn't update _lastUpdate. void setStatus(STATUS status); - // status should be one of the followings: "OK", "ERROR". + // status should be one of the following: "OK", "ERROR". // Giving other string will not change the status of this object. // This method doesn't update _lastUpdate. void setStatus(const std::string& status); diff --git a/src/WinTLSSession.cc b/src/WinTLSSession.cc index 123780e729..7e6dd7645b 100644 --- a/src/WinTLSSession.cc +++ b/src/WinTLSSession.cc @@ -440,7 +440,7 @@ ssize_t WinTLSSession::readData(void* data, size_t len) // Can be filled from decBuffer entirely? if (decBuf_.size() >= len) { - A2_LOG_DEBUG("WinTLS: Fullfilling req from buffer"); + A2_LOG_DEBUG("WinTLS: Fulfilling req from buffer"); memcpy(data, decBuf_.data(), len); decBuf_.eat(len); return len; diff --git a/src/getaddrinfo.c b/src/getaddrinfo.c index 7c80dcf2b1..5925af2760 100644 --- a/src/getaddrinfo.c +++ b/src/getaddrinfo.c @@ -293,7 +293,7 @@ static int is_address(s) const char* s; } /* - * Calcurate length of the string `s', where `s' is set by + * Calculate length of the string `s', where `s' is set by * sprintf(s, "%d", n). */ static int itoa_length(n) diff --git a/src/usage_text.h b/src/usage_text.h index 4868456549..0871543608 100644 --- a/src/usage_text.h +++ b/src/usage_text.h @@ -98,7 +98,7 @@ #define TEXT_PROXY_METHOD \ _(" --proxy-method=METHOD Set the method to use in proxy request.") #define TEXT_REFERER \ - _(" --referer=REFERER Set an http referrrer (Referer). This affects\n" \ + _(" --referer=REFERER Set an http referrer (Referer). This affects\n" \ " all http/https downloads. If \"*\" is given,\n" \ " the download URI is also used as the referrer.\n" \ " This may be useful when used together with\n" \ diff --git a/test/AllTest.cc b/test/AllTest.cc index f869e55c06..357cebc5c1 100644 --- a/test/AllTest.cc +++ b/test/AllTest.cc @@ -26,7 +26,7 @@ int main(int argc, char* argv[]) // By default, SocketCore uses AF_UNSPEC for getaddrinfo hints to // resolve address. Sometime SocketCore::bind() and - // SocketCore::establishConnection() use difference protocl family + // SocketCore::establishConnection() use difference protocol family // and latter cannot connect to former. To avoid this situation, we // limit protocol family to AF_INET for unit tests. aria2::SocketCore::setProtocolFamily(AF_INET); diff --git a/test/FileTest.cc b/test/FileTest.cc index ca78217e80..e73daa565d 100644 --- a/test/FileTest.cc +++ b/test/FileTest.cc @@ -129,7 +129,7 @@ void FileTest::testMkdir() CPPUNIT_ASSERT(d.mkdirs()); CPPUNIT_ASSERT(d.exists()); - // this test failes because d.mkdir returns false when the directory is + // this test fails because d.mkdir returns false when the directory is // already exists. CPPUNIT_ASSERT(!d.mkdirs()); } @@ -147,7 +147,7 @@ void FileTest::testMkdir() CPPUNIT_ASSERT(d.mkdirs()); CPPUNIT_ASSERT(nd.exists()); - // this test failes because d.mkdir returns false when the directory is + // this test fails because d.mkdir returns false when the directory is // already exists. CPPUNIT_ASSERT(!d.mkdirs()); } diff --git a/test/RequestTest.cc b/test/RequestTest.cc index 24abf91ffb..1422847e79 100644 --- a/test/RequestTest.cc +++ b/test/RequestTest.cc @@ -74,7 +74,7 @@ void RequestTest::testSetUri2() CPPUNIT_ASSERT(v); - // referer is unchaged + // referer is unchanged CPPUNIT_ASSERT_EQUAL(std::string("http://aria.rednoah.com:8080"), req.getReferer()); CPPUNIT_ASSERT_EQUAL(std::string("http"), req.getProtocol()); @@ -124,7 +124,7 @@ void RequestTest::testRedirectUri() // See redirect count is incremented. CPPUNIT_ASSERT_EQUAL(2, req.getRedirectCount()); - // Give abosulute path + // Give absolute path CPPUNIT_ASSERT(req.redirectUri("/abspath/to/file")); CPPUNIT_ASSERT_EQUAL(std::string("http://aria.rednoah.co.jp/abspath/to/file"), req.getCurrentUri()); diff --git a/test/RpcMethodTest.cc b/test/RpcMethodTest.cc index 44bae5fe03..3fbd726a7f 100644 --- a/test/RpcMethodTest.cc +++ b/test/RpcMethodTest.cc @@ -875,7 +875,7 @@ void RpcMethodTest::testTellWaiting() CPPUNIT_ASSERT_EQUAL(0, res.code); resParams = downcast(res.param); CPPUNIT_ASSERT_EQUAL((size_t)4, resParams->size()); - // nagative offset and normalized offset < 0 + // negative offset and normalized offset < 0 req = RpcRequest(TellWaitingRpcMethod::getMethodName(), List::g()); req.params->append(Integer::g(-5)); req.params->append(Integer::g(100)); @@ -883,7 +883,7 @@ void RpcMethodTest::testTellWaiting() CPPUNIT_ASSERT_EQUAL(0, res.code); resParams = downcast(res.param); CPPUNIT_ASSERT_EQUAL((size_t)0, resParams->size()); - // nagative offset and normalized offset == 0 + // negative offset and normalized offset == 0 req = RpcRequest(TellWaitingRpcMethod::getMethodName(), List::g()); req.params->append(Integer::g(-4)); req.params->append(Integer::g(100)); diff --git a/test/SocketCoreTest.cc b/test/SocketCoreTest.cc index 443ca73cbb..666056e0bc 100644 --- a/test/SocketCoreTest.cc +++ b/test/SocketCoreTest.cc @@ -227,7 +227,7 @@ void SocketCoreTest::testVerifyHostname() CPPUNIT_ASSERT(net::verifyHostname("::1", dnsNames, ipAddrs, commonName)); } { - // If iPAddress is privided, don't match with commonName + // If iPAddress is provided, don't match with commonName std::vector dnsNames, ipAddrs; unsigned char binAddr[16]; size_t len; diff --git a/test/UriSplitTest.cc b/test/UriSplitTest.cc index 091b8d0bd7..53d5804b3b 100644 --- a/test/UriSplitTest.cc +++ b/test/UriSplitTest.cc @@ -82,7 +82,7 @@ void UriSplitTest::testUriSplit() // According to RFC 3986, @ in userinfo is illegal. But many people // have e-mail account as username and don't understand - // percent-encoding and keep getting erros putting it in URI in + // percent-encoding and keep getting errors putting it in URI in // unecoded form. Because of this, we support @ in username. uri = "http://user@foo.com:pass@aria2.sf.net/path/"; memset(&res, 0, sizeof(res)); From b0b6b14997153475f063ad57168cceb3320f8279 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Wed, 24 Jan 2024 19:49:17 +0900 Subject: [PATCH 3/4] ci: Run apt-get update --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d51fc84d2c..51703768ea 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,6 +23,7 @@ jobs: - name: Linux setup if: runner.os == 'Linux' run: | + sudo apt-get update sudo apt-get install \ g++-12 \ clang-15 \ From bd29175cddbd1ba75bc7e43e63a533d8b274d1ba Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Wed, 24 Jan 2024 19:41:05 +0900 Subject: [PATCH 4/4] Bump zlib to 1.3.1 --- Dockerfile.android | 4 ++-- Dockerfile.mingw | 6 +++--- README.android | 2 +- README.mingw | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Dockerfile.android b/Dockerfile.android index 9036103c58..342f305714 100644 --- a/Dockerfile.android +++ b/Dockerfile.android @@ -52,9 +52,9 @@ ENV LIBEXPAT_VERSION=2.5.0 ENV LIBEXPAT_ARCHIVE=expat-$LIBEXPAT_VERSION.tar.bz2 ENV LIBEXPAT_URI=https://github.com/libexpat/libexpat/releases/download/R_2_5_0/$LIBEXPAT_ARCHIVE -ENV ZLIB_VERSION=1.3 +ENV ZLIB_VERSION=1.3.1 ENV ZLIB_ARCHIVE=zlib-$ZLIB_VERSION.tar.gz -ENV ZLIB_URI=https://zlib.net/$ZLIB_ARCHIVE +ENV ZLIB_URI=https://github.com/madler/zlib/releases/download/v1.3.1/$ZLIB_ARCHIVE ENV CARES_VERSION=1.21.0 ENV CARES_ARCHIVE=c-ares-$CARES_VERSION.tar.gz diff --git a/Dockerfile.mingw b/Dockerfile.mingw index 7a416cef69..5f2d0e640b 100644 --- a/Dockerfile.mingw +++ b/Dockerfile.mingw @@ -32,7 +32,7 @@ RUN apt-get update && \ RUN curl -L -O https://gmplib.org/download/gmp/gmp-6.3.0.tar.xz && \ curl -L -O https://github.com/libexpat/libexpat/releases/download/R_2_5_0/expat-2.5.0.tar.bz2 && \ curl -L -O https://www.sqlite.org/2023/sqlite-autoconf-3430100.tar.gz && \ - curl -L -O https://www.zlib.net/zlib-1.3.tar.gz && \ + curl -L -O https://github.com/madler/zlib/releases/download/v1.3.1/zlib-1.3.1.tar.gz && \ curl -L -O https://c-ares.org/download/c-ares-1.19.1.tar.gz && \ curl -L -O https://libssh2.org/download/libssh2-1.11.0.tar.bz2 @@ -68,8 +68,8 @@ RUN tar xf sqlite-autoconf-3430100.tar.gz && \ --build=`dpkg-architecture -qDEB_BUILD_GNU_TYPE` && \ make -j$(nproc) install -RUN tar xf zlib-1.3.tar.gz && \ - cd zlib-1.3 && \ +RUN tar xf zlib-1.3.1.tar.gz && \ + cd zlib-1.3.1 && \ CC=$HOST-gcc \ AR=$HOST-ar \ LD=$HOST-ld \ diff --git a/README.android b/README.android index 997d0bac00..51bf748b01 100644 --- a/README.android +++ b/README.android @@ -44,7 +44,7 @@ The following libraries were statically linked. * openssl 1.1.1k * expat 2.4.1 -* zlib 1.2.11 +* zlib 1.3.1 * c-ares 1.17.2 * libssh2 1.9.0 diff --git a/README.mingw b/README.mingw index df2fba2ea7..5492bbab3e 100644 --- a/README.mingw +++ b/README.mingw @@ -11,7 +11,7 @@ necessary. The linked libraries are: * gmp 6.3.0 * expat 2.5.0 * sqlite 3.43.1 -* zlib 1.3 +* zlib 1.3.1 * c-ares 1.19.1 * libssh2 1.11.0