Commit Graph

4297 Commits

Author SHA1 Message Date
Nekun
aabdf6eb66 Fix typo in VMS support code
* src/utils.c: Remove unpaired brace

Copyright-paperwork-exempt: Yes
2021-05-02 14:19:01 +02:00
Nils
1aada296dd Use "nofollow" instead of "no-follow" in messages
* src/html-url.c (get_urls_html_fm): Remove misleading debug message.
* src/recur.c (retrieve_tree): Fix no-follow -> follow in DEBUGP.

The attribute in html is "nofollow" so it is more consistent to call it
so than to hyphenate it.

Copyright-paperwork-exempt: Yes
2021-04-15 21:03:56 +02:00
Nils
f1cccd2c45 Print message for no-follow attribute only if norobots respected
* src/html-url.c (get_urls_html_fm): Remove misleading log message.
* src/recur.c (retrieve_tree): Add log message into correct if block.

Commit e39be32838 added a message that
said links will not be followed whenever the nofollow attribute is found
in a page. It didn't take into account that with -e robots=off (and
equivalents) links will still be followed.

This bug has been noticed multiple times:
* https://www.reddit.com/r/DataHoarder/comments/mprq89/wget_respects_nofollow_attribute_despite_e/
* https://gist.github.com/simonw/27e810771137408fd7834ad153750c41#gistcomment-3648191
* https://superuser.com/questions/1494761/wget-wont-ignore-no-follow-attributes

This commits makes it so that this message is only printed when a
nofollow link is found and the norobots convention is respected.

Copyright-paperwork-exempt: Yes
2021-04-15 21:02:28 +02:00
Tim Rühsen
11c626efc4 * configure.ac: Add AM_GNU_GETTEXT_VERSION 2021-04-15 20:56:27 +02:00
Tim Rühsen
db6166d011 * testenv/test/base_test.py: Rename valgrind-suppression-ssl -> valgrind-suppressions-ssl 2021-04-11 19:41:03 +02:00
Tim Rühsen
a65bc7c0e8 * testenv/test/base_test.py: Add --show-leak-kinds=all valgrind argument 2021-04-11 19:41:00 +02:00
Tim Rühsen
3a1ac38f00 * tests/WgetTests.pm: Add --show-leak-kinds=all valgrind argument 2021-04-11 19:40:56 +02:00
Tim Rühsen
d745ea0eb6 Fix testenv valgrind suppression
* testenv/Makefile.am: Remove valgrind-suppressions from EXTRA_DIST.
* testenv/valgrind-suppression-ssl: Rename to testenv/valgrind-suppressions-ssl.
2021-04-11 19:09:45 +02:00
Tim Rühsen
82afc6e6f0 * bootstrap.conf: Add 'rename' to gnulib modules
The missing module could be a reason for
https://savannah.gnu.org/bugs/?60346.

Reported-by: jrharris42@gmail.com
2021-04-11 13:16:21 +02:00
Tim Rühsen
90631a6fe5 * src/wget.h: Use strtoll() for str_to_wgint
This fixes a regression reported at https://savannah.gnu.org/bugs/?60353.

Reported-by: Michal Ruprich
2021-04-11 12:53:20 +02:00
Shamil Gumirov
fd2a061f6a Minor output fix to use quote_n() instead of quote()
* src/ftp.c (ftp_retrieve_list): change quote to quote_n
* src/iri.c (do_conversion): change quote to quote_n
* src/url.c (convert_fname): change quote to quote_n

The implementation quote() reuses the buffer it returns which
leads to printing the same string for each quote() call in one
output line. Instead, quote_n() should be used as highlighted in
the doc:
https://www.gnu.org/software/gnulib/manual/html_node/Quoting.html

Copyright-paperwork-exempt: Yes
2021-04-11 12:42:07 +02:00
Tim Rühsen
27b12dad12 * src/Makefile.am: Add metalink.c and xattr.c to EXTRA_wget_SOURCES 2021-04-05 12:37:28 +02:00
Tim Rühsen
c8d7a66217 * testenv/Makefile.am: Allow tarball build without python3 2021-04-05 12:37:15 +02:00
Tim Rühsen
6d58a04682 Fix spelling errors
* NEWS: trough -> through.
* README.checkout: Likewise.
* contrib/spell-checker: Add exclusion 'parm'
2021-04-04 17:14:57 +02:00
Tim Rühsen
7840db6c0b Remove gettext version requirements
* bootstrap.conf: Remove gettext version requirements
* configure.ac: Likewise.
2021-04-04 17:14:54 +02:00
Darshit Shah
cf788d60e4 Use a LOG_COMPILER for running fuzz tests
This prevents needing a special case in the fuzz tests to detect
valgrind usage and a new exec. Instead, we simply detect the environment
in a shell script and start the test with valgrind in the first place.

* fuzz/test-runner.sh: New script for running the fuzz tests
* fuzz/main.c (main): Remove code for re-running under valgrind
* fuzz/Makefile.am: Set the LOG_COMPILER to test-runner.sh and remember
  to add it to the list of extra files for packaging
2021-03-16 21:48:13 +01:00
Tim Rühsen
db4d5b6eb3 * configure.ac: Add AC_PROG_CC_C99 2021-03-07 19:56:36 +01:00
Darshit Shah
e9cf8da1a6 Bump gettext version to 0.20
* bootstrap.conf: Increase minimum version of gettext needed to 0.20
* configure.ac: Same
2021-03-07 14:50:11 +01:00
Darshit Shah
b743178b9d * bootstrap: Update script 2021-03-07 14:40:41 +01:00
Darshit Shah
65cc47b504 * gnulib: Pull forward 2021-03-07 14:39:53 +01:00
Darshit Shah
f7835691b4 Fix double free in FTP Code
* src/ftp.c(getftp): Don't free `target`. If it is not pointing to
  targetbuf, then it still pointing to its original location of u->dir.
  This location will be free'd later. Doing so now causes a double free
  and hence crashes Wget
* tests/Test-ftp-dir.px: New test to show double free error
* tests/Makefile.am: Add new test
2021-03-02 12:03:14 +01:00
Tim Rühsen
51ee45f017 * doc/wget.texi: Replace '' with in example
Needed to hide from texi2pod.pl replacement of '' -> ".

Reported-by: Vincent Lefevre
2021-01-31 18:23:36 +01:00
Tim Rühsen
7d9ed223fc Use gnulib's utime.h
* bootstrap.conf: Remove utime-h (included by utime).
* configure.ac: Remove header checks for utime.h and sys/utime.h.
* src/utils.c: Simply #include <utime.h>.
2021-01-23 19:28:58 +01:00
Tim Rühsen
f81191951a * configure.ac: Detect unresolved AX_ macros 2021-01-23 19:09:36 +01:00
Tim Rühsen
ea6143d56c * configure.ac: Use noyywrap for AC_PROG_LEX 2021-01-16 20:09:07 +01:00
Tim Rühsen
ad36a467ac Fix --quota on systems with 32bit long type
* src/init.c (cmd_bytes_sum): Use WGINT_MIN and WGINT_MAX in check.
* src/options.h (struct options): Make 'quota' of type wgint.
* src/retr.c: Make 'total_downloaded_bytes' of type wgint.
* src/utils.h: Fix comment.
* src/wget.h: Add WGINT_MIN, remove SUM_SIZE_INT.
2021-01-16 20:00:39 +01:00
Tim Rühsen
adc5aa0196 * configure.ac: Remove obsolete AC_HEADER_STDC 2021-01-16 19:34:53 +01:00
Tim Rühsen
5c8569ba5d * configure.ac: Replace ` with ' 2021-01-16 19:31:04 +01:00
Tim Rühsen
9f1c8dac77 * configure.ac: Use yywrap param for AC_PROG_LEX 2021-01-16 19:19:01 +01:00
Darshit Shah
6c84dc38bc maint: post-release administrivia
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
2021-01-09 11:01:24 +01:00
Darshit Shah
f720bdda9f * NEWS: Update NEWS items for release 2021-01-09 10:55:08 +01:00
Darshit Shah
90d43efbea * gnulib: Pull forward 2021-01-09 10:55:02 +01:00
Darshit Shah
0031bdedfc * cfg.mk: Add manual_title for web docs 2021-01-09 10:54:27 +01:00
Darshit Shah
72ede7a028 * contrib/make-release: Update to use maintainer-makefile 2021-01-09 10:54:10 +01:00
Darshit Shah
473eef671b * bootstrap.conf: Add gendocs and gnu-web-doc-update modules 2021-01-09 01:49:07 +01:00
Darshit Shah
8c35102b37 * configure.ac(AM_INIT_AUTOMAKE): Create lzip archives when making a distribution 2021-01-09 01:03:43 +01:00
Darshit Shah
ae203984e8 Prepare for making releases
The maintainer makefile provides targets for making a release. They need
these things:
* cfg.mk: Set the hash of the NEWS file as it was at the beginning of
  this release
* .prev-version: Create the .prev-version file
2021-01-09 00:46:24 +01:00
Darshit Shah
5f6f86aa26 Prepare NEWS file for new release
* NEWS: Fix the copyright notice
* NEWS: Add header for new release
2021-01-09 00:46:06 +01:00
Darshit Shah
e9641d989b Use PRId64 to correctly identify the format specifier
* src/utils.c: Use PRId64 to correctly identify the format specifier for
wgint values. This fixes a warning on 32-bit systems where wgint is a
long long int instead of the long int that the format specifier
indicated.

Reported-by: Jeffrey Walton
2021-01-07 21:35:20 +01:00
Darshit Shah
9f3df123bb * src/retr.c(rotate_backups): Simplify logic for handling filename rotation 2021-01-03 15:59:49 +01:00
Matt Whitlock
1e89e5f66c * configure.ac: Don't use Bashisms 2021-01-03 15:22:22 +01:00
Darshit Shah
5a7f2f7e87 Run make update-copyright 2021-01-01 12:31:01 +01:00
Darshit Shah
2e5d281468 * gnulib: Pull forward 2021-01-01 12:15:48 +01:00
Darshit Shah
8923dcc788 * NEWS: Finalize release 2020-12-31 16:39:39 +01:00
Darshit Shah
c2517256e4 * gnulib: Update for release 2020-12-31 16:27:48 +01:00
Darshit Shah
37f0dca4e2 * src/main.c: Disable use-askpass on VMS 2020-12-30 23:04:13 +01:00
Steven M. Schweda
8af2171a34 Fixes for running on VMS
time_t on VMS is typically unsigned.  (Lazy man's solution to 2038?)
I added "(time_t)" type casts to negative values ("-1"), and changed
tests to avoid complaints.

* src/hsts.c (hsts_add_entry): Explicitly cast potentially negative time
  values to time_t to handle VMS quirks.
  (hsts_store_entry): Same
  (get_hsts_store_filename): Use new ajoin_dir_file function to join
  filenames
  (test_hsts_read_database): Same
* src/init.c (struct options): use-askpass is not implemented on VMS
  (ajoin_dir_file): New Function to join filenames in a platform
  agnostic manner
  (wgetrc_user_file_name): Use ajoin_dir_file to join paths. Doing this
  correctly, eliminates the need for a special case on VMS
* src/init.h: Add prototype for ajoin_dir_file
* src/log.c (check_redirect_output): Ignore on VMS
* src/main.c(option_data): Disable use-askpass on VMS
  (print_help): Same
  (get_hsts_database): Use ajoin_dir_file to join paths
  (print_version): Add VMS specific information to Version output
* src/utils.c (fork_to_background): Fix signature on VMS

Co-authored-by: Darshit Shah <darnir@gnu.org>
2020-12-30 22:50:32 +01:00
Tim Rühsen
7ec15b9c92 Remove SIZEOF_WGINT as wgint is always int64_t
* src/http.c (test_parse_range_header): Remove use of SIZEOF_WGINT.
* src/utils.c (human_readable): Remove superfluous HR_NUMTYPE,
*   (number_to_string): Remove use of SIZEOF_WGINT.
* src/utils.h: Remove use of SIZEOF_WGINT and HR_NUMTYPE.
* src/wget.h: Remove #define SIZEOF_WGINT.
2020-12-29 12:44:20 +00:00
Tim Rühsen
a16149e5bb src/wget.h: Cleanup code around wgint 2020-12-29 12:44:20 +00:00
Darshit Shah
db88ad441e Remove portability handling for str[n]casecmp
* src/mswindows.c: Gnulib ensures we always have str{n}casecmp
* configure.ac: Don't need to define HAVE_STR[N]CASECMP anymore
2020-12-29 12:44:20 +00:00