Commit Graph

56 Commits

Author SHA1 Message Date
e9efc69c7a * bootstrap.conf: Replace \e with portable \033 2024-03-10 12:21:42 +01:00
188989e067 Update copyright year 2024-01-07 12:41:02 +01:00
15ba1db248 Update copyrights 2023-08-31 12:57:30 +02:00
ec3b71a06f * bootstrap.conf: Call clone_wiki() early to init the wiki submodule 2023-08-03 19:03:49 +02:00
4f12e73bbf * bootstrap.conf: Remove obsolete module strpbrk 2022-08-07 12:31:22 +02:00
3dc7f71098 Update copyright year 2022-02-25 17:46:43 +01:00
7c7bbf2c27 Fix issue #467 Adding wiki as submodule to repo
* bootstrap.conf: Add clone_wiki() and call it from
  bootstrap_post_import_hook().

Signed-off-by: Jeffrey Marius <getjff@gmail.com>
2021-08-21 19:32:11 +02:00
22162f82b2 Update copyright year 2021-01-22 21:58:38 +01:00
f95d05bb36 * bootstrap.conf: Remove python as dependency
/usr/bin/python don't exist here any more. 'python2' and 'python3' do
exist.
2020-10-26 22:01:07 +01:00
fcfd2993d1 Implement HTML download attribute
* bootstrap.conf: Add gnulib module 'filename'.
* src/blacklist.c (get_local_filename_real): Remove const from return type.
  (get_local_filename): Likewise.
* src/wget.c: Include "filename.h".
  (queue_url_from_remote): Add param 'download_name'.
  (queue_url_from_remote): Change local filename to that given by 'download' tag.
  (html_parse): Create C string from 'download' value.
* src/wget_blacklist.h (blacklist_entry): Remove const from local_filename.
2020-03-15 11:53:09 +01:00
59d9ecd9c0 * Update copyright year to 2020 2020-01-10 00:33:02 +01:00
9ab3c2a80d Support terminal hyperlinks in output
Some terminal emulators now allow printing hyperlinks through escape
sequences. See
https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda for
more information.

Hyperlink support cannot be gauged accurately. And while most terminals
just ignore the extra escape sequences, older versions of vte actually
print the URI along with some garbage. So, in this patch, the hyperlink
support is disabled by default and used only if the user explicitly
requests it. Once there is a way to query for feature support in
terminals, this can be intelligently enabled automatically.

* bootstrap.conf: Add new module xgethostname
* src/wget_options.h: Add a new option hyperlink and a global variable
  hostname
* src/options.c: Add a new command line option --hyperlink. This is the
  same option name as `ls` from coreutils for consistency across
  programs
  (init): If the user requests hyperlink support, get the hostname and
  store it. This is to prevent having to get the hostname for each
  downloaded file
* src/wget.c (prepare_file): Print the filename with a hyperlink if the
  user requests it.
* docs/wget2.md: Add documentation entry for hyperlinks
2019-11-06 15:09:44 +01:00
0d41581ba0 Update Gnulib
* gnulib: Update submodule
* bootstrap.conf: Add module access
2019-10-03 13:33:33 +02:00
c80e2381e5 Use gnulib's update-copyright module
* bootstrap.conf: Add update-copyright module
* cfg.mk: Setup environment for update-copyright
* contrib/update_copyright: Remove script no longer used
* libwget/ssl_openssl: Fix copyright year
* tests/test-post-handshare-auth.c: Fix copyright years
* contrib/commit-check: Add copyright and license
* contrib/mail.sh: Same
* src/version-text.h.in: Same
2019-09-11 00:03:04 +02:00
d543db817b * bootstrap.conf: Add gnulib modules for non-portable function calls 2019-08-30 11:07:39 +02:00
b4e81e1b3e Don't check for always true headers
* cfg.mk: Enable checking for always_true_header_tests
* libwget/http.c,net.c,ssl_gnutls.c: Don't check for HAVE_SYS_SOCKET_H.
  The gnulib module always provides it.
* libwget/ssl_gnutls.c: Don't check for HAVE_SYS_UIO_H. The gnulib
  module always provides it.
* bootstrap.conf: Add header sys_uio
* configure.ac: Remove check for sys/uio.h
2019-06-19 10:07:35 +02:00
8950a88e86 * bootstrap.conf: Add gnulib module arpa_inet
On Debian unstable, after updating gnulib there was:

In file included from ../lib/arpa/inet.h:46,
                 from ip.c:27:
/usr/include/arpa/inet.h:34:8: error: unknown type name 'in_addr_t'
 extern in_addr_t inet_addr (const char *__cp) __THROW;
2019-06-17 11:23:09 +02:00
ded4d44716 * bootstrap.conf: Explicitly set source_base and test_base 2019-05-24 11:15:11 +02:00
45ed5a88a2 * bootstrap.conf: Work around VPATH issue 2019-05-18 22:32:14 +02:00
bd79450c7a Add new option --unlink
* bootstrap.conf: Add gnulib module 'link'
* docs/wget2.md: Remove the 'unimplemented' tag for --unlink
* src/options.c: Add --unlink option
* src/wget.c (_prepare_file): Unlink file if requested
* src/wget_options.h (struct config): Add 'unlink' member
* tests/Makefile.am: Add test-unlink
* tests/libtest.c (wget_test): Implement hardlink feature
* tests/libtest.h (wget_test_file_t): Add 'hardlink' member
* tests/test-unlink.c: New file with tests for --unlink
2019-04-30 12:52:29 +02:00
fc761d3f5c * bootstrap.conf: Prerequisite 'rsync' removed 2019-01-12 20:45:17 +01:00
cdb3600791 Update copyrigght to 2019 2019-01-02 12:42:53 +01:00
84057647ff Handle wide characters in download progress bar
* bootstrap.conf: Add gnulib module 'wcwidth'
* libwget/bar.c: New function inspect_multibyte(),
  (_bar_update_slot): Make use of inspect_multibyte()
2018-11-01 19:26:55 +01:00
46d6b5ca45 * bootstrap.conf: Use rm -f to avoid error messages 2018-10-13 12:45:36 +02:00
9b616dbeff * bootstrap.conf: Enable syncing with translationproject.org 2018-06-07 22:25:09 +02:00
4045764ae3 * bootstrap.conf: Update dependencies 2018-04-02 11:30:33 +02:00
fcf2f7504b * bootstrap.conf: Add pkg-config as dependency 2018-03-18 10:48:24 +00:00
fc5bdca886 * bootstrap.conf: Clean up some files that gnulib-tool.py creates 2018-02-15 17:03:37 +01:00
8dcc57434c Add gnulib module limits-h
* bootstrap.conf: Add limits-h
* libwget/cookie.c: Include limits.h
* libwget/metalink.c: Likewise
2018-02-14 21:25:09 +01:00
dce5a4d62f Use realpath() instead of canonicalize_filename_mode()
* bootstrap.conf: Use canonicalize-lgpl module
* src/gpgme.c: Likewise

Using realpath() reduces extra code from gnulib.
2018-02-14 12:20:42 +01:00
39dfeec1ae Fixed problems pointed out in MR. Added tests and doxygen documentation.
* bootstrap.conf: Add canonicalize module.
* cfg.mk: Added exclusions to no new line at EOF for binary files used in tests.
* configure.ac: Check for libgpgme
* docs/wget2_manual.md: Added manual entries for --verify-sig, --gnupg-homedir, and new exit codes.
* fuzz/Makefile.am: Amend linker options
* include/wget/wget.h: Add error codes for GPG signature verification.
* po/POTFILES.in: Add new files.
* src/Makefile.am: Add src/gpgme.c and src/wget_gpgme.h
* src/gpgme.c: Using new error codes, and better signature verification failure detection.
* src/job.c (job_free): Free sig_filename
* src/options.c: Add new options --gnupg-homedir and --verify-sig
* src/wget.c: Verify the signature if possible, exit with the proper status code,
  print error messages
* src/wget_gpgme.h: Add documentation.
* src/wget_job.h: Extend struct JOB
* src/wget_options.h: Add new status codes, add new members to struct config
* tests/Makefile.am: Added new tests.
* tests/gpg-test-util.h: Common GPG testing functionality (tries to verify a signature, expects exit code ... etc).
* tests/gpg/helloworld.txt: Text that has been signed in the .sig files.
* tests/gpg/helloworld.txt.{invalid,no-pub,missing,trusted}.sig: Signatures on helloworld.txt with properties described by their names.
* tests/gpg/openpgp-revocs.d/*: Revocation certs for the fake "homedir"
* tests/gpg/private-keys-v1.d/*: The not-so-private private keys used to sign the test file.
* tests/gpg/pubring.kbx: Fake gnupg homedir public key ring.
* tests/gpg/test-gpg-*.c: Tests.
* tests/valgrind-supressions: Supress failures due to oddness with GPGME.
* unit-tests/Makefile.am: Add src/gpgme.o to BASE_OBJS
2018-01-01 13:28:43 +01:00
b82f692949 Thread abstraction via gnulib thread wrapper (glthread)
* bootstrap.conf: Add modules cond, lock and thread,
  remove module pthread
* include/wget/wget.h: Remove pthread code,
  add new wget_thread_* functions,
  amend params of wget_thread_* functions,
  add init and exit functions for mutex initialization
* */*.[ch]: Amend threading to new API

This change let libwget work with different kinds of
threading libraries incl. pthreads and windows threads.
2017-12-17 14:20:01 +01:00
c17054e09b * bootstrap.conf: Add modules pipe-posix, regex
# Conflicts:
#	bootstrap.conf
2017-12-04 12:59:34 +01:00
e8ad27f631 Implementation of --use-askpass switch
* bootstrap.conf: Add 'posix_spawn' and 'spawn-pipe' gnulib modules
* docs/wget2_manual.md: Add docs for --use-askpass
* src/options.c: Add implementation of --use-askpass
* src/wget_options.h (struct config): Add 'use_askpass_bin' member
2017-11-12 00:24:49 +01:00
5f91366ee2 * bootstrap.conf: Add more prerequisites 2017-11-11 16:14:08 +01:00
2cae33c8ed Implement --ask-password switch to enable a password prompt
* bootstrap.conf: Add 'getpass' gnulib module
* docs/wget2_manual.md: Amend docs for --ask-password
* src/options.c: Add implementation of --ask-password
* src/wget_options.h (struct config): Add 'password' member
2017-11-02 21:08:23 +01:00
e0b1a6b02e Fix recursive downloads with '-c' option
* bootstrap.conf: Enable safe-read module
* src/wget.c: Fix recursive downloads with '-c' option
* tests/Makefile.am: Add test-c-r.c
* tests/test-c-r.c: Add tests
2017-07-25 15:00:48 +00:00
8b16045f66 Implement --force-progress to force show progress bar
* bootstrap.conf: Add isatty module
* src/options.c: Add force_progress option
* src/wget.c: if force_progress then turn on progress bar
* src/wget_options.h: Add force_progress in config struct
2017-07-22 20:22:05 +05:30
88182528c2 Fix build for non-Windows envs without poll()
* bootstrap.conf: Add module msvc-nothrow
* libwget/io.c: Include msvc-nothrow.h on _WIN32,
  (wget_ready_2_transfer): Fix code for non-Windows envs
2017-05-24 14:09:50 +02:00
4f9f4f2828 Fix http to https
* README.md: Fix http to https
* bootstrap.conf: Likewise
* configure.ac: Likewise
2017-02-28 11:52:28 +01:00
5495dab56a Fallback to select() if poll() not available
* bootstrap.conf: Add module select
* libwget/io.c (wget_ready_2_transfer): Add fallback code
2017-01-18 11:15:24 +01:00
1f39794852 Add function wget_truncate()
* bootstrap.conf: Ad gnulib module ftruncate
* include/wget/wget.h: Add wget_truncate
* libwget/io.c: Add wget_truncate
* src/job.c: Call wget_truncate instead of truncate

The truncate() function is not covered by gnulib.
wget_truncate() is a wrapper around ftruncate(), which is covered
by gnulib.
2017-01-06 12:14:40 +01:00
0354295e03 Add network init function to bootstrap sockets on Windows
* bootstrap.conf: Add gnulib module 'sockets'
* examples/http_get2.c: Call wget_net_init()
* include/wget/wget.h: Add wget_net_init() and wget_net_deinit()
* libwget/init.c (wget_global_init): Call wget_net_init(),
  (wget_global_deinit): Call wget_net_deinit()
* libwget/net.c: Add wget_net_init() and wget_net_deinit()
2017-01-05 12:09:25 +01:00
40b8da056e Reduce redundant code by using strchrnul()
* bootstrap.conf: Add gnulib module strchrnul
* libwget/http.c (_parse_proxies): Remove redundant code
* libwget/ssl_gnutls.c (wget_ssl_open): Likewise
2016-12-16 15:41:58 +01:00
58d18ad60c New function to check for literal IPv4/IPv6 addresses
* bootstrap.conf: Add gnulib module 'inet_pton'
* docs/Makefile.am: Add man page libwget-ip.3
* wget/wget.h (struct wget_iri_st): New field 'is_ip_address'.
* libwget/Makefile.am: Add new file ip.c
* libwget/ip.c: New file defining new function wget_ip_is_family()
* libwget/iri.c (wget_iri_parse): Check for literal IP address
* src/wget.c: Do not add to HSTS if literal IP address
2016-11-08 16:22:08 +01:00
ed53ecbfa1 Use gnulib basename
* bootstrap.conf: Add gnulib module 'dirname'
* libwget/io.c: Use base_name() to get file basename
2016-11-08 12:41:12 +01:00
4c6d6179f2 Replace manywarnings module by our own code
* bootstrap.conf: Remove manywarnings, add warnings
* configure.ac: Replace manywarnings code

The new code works on recent gcc and clang with an overhead of
~100ms instead of ~9s here (without -C).
This is meant for developers only and is activated by either
--enable-gcc-warnings or by touching .manywarnings.
2016-11-02 16:51:49 +01:00
fd46f870b1 Add gnulib digest hash fallback
* bootstrap.conf: Add md2, md5, sha1, sha256, sha512 modules
* libwget/hashfile.c: Add code branch to use gnulib functions if needed
2016-10-17 21:04:36 +02:00
58ecced947 Use wget_human_readable() from Wget1.x
* bootstrap.conf: Remove module 'human'
* include/libwget.h.in: Amend wget_human_readable()
* libwget/bar.c: Use new function wget_human_readable()
* libwget/utils.c: Replace wget_human_readable()
* src/wget.c: Use new function wget_human_readable()
2016-09-20 16:39:39 +02:00
8368a98e98 Use gnulib human module for human readable file size
* bootstrap.conf: Add the human module and its dependency unistd
* include/libwget.h.in: Replace method signature for wget_human_readable
* libwget/bar.c (_bar_slot_t): Add a new struct memeber for storing the
human readable string that it printed on the progress bar
  (wget_bar_init): Initialise the new human_size struct member
  (wget_bar_update): Use the new wget_human_readable() method
  (_bar_print_final): Same
  (wget_bar_deinit): Free the allocated memory for each slot
* libwget/utils.c (wget_human_readable): Replace the old function with a
call to the human_readable() method from gnulib
2016-09-16 16:37:03 +02:00