Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package goaccess for openSUSE:Factory checked in at 2021-03-02 12:34:25 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/goaccess (Old) and /work/SRC/openSUSE:Factory/.goaccess.new.2378 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "goaccess" Tue Mar 2 12:34:25 2021 rev:11 rq:875902 version:1.4.6 Changes: -------- --- /work/SRC/openSUSE:Factory/goaccess/goaccess.changes 2021-01-25 18:25:05.260556620 +0100 +++ /work/SRC/openSUSE:Factory/.goaccess.new.2378/goaccess.changes 2021-03-02 12:45:52.440377162 +0100 @@ -1,0 +2,32 @@ +Mon Mar 1 08:21:35 UTC 2021 - Michael Vetter <[email protected]> + +- Update to 1.4.6: + * Added additional feed reader clients. + * Added addtional browsers and bots to the main list. + * Added command line option '--unknowns-log' to log unknown browsers and + OSs. + * Added 'Referer' to the pre-defined 'Caddy JSON' log format. + * Added support for real-time piping as non-root user. + * Added the ability to Handle case when IPv4 is encoded as IPv6 in + GeoIP1/legacy. + * Ensure we capture linux (lowercase) when extracting an OS. + * Fixed a regression in parsing Google Cloud Storage or possibly other + non-JSON formats. + * Fixed inability to parse escaped formats. + * Fixed issue when using '%s' with 'strptime(3)' under musl libc. This + addresses mostly the Docker image. + * Fixed possible buffer over-read for certain log-format patterns. + * Fixed segfault when attempting to process a malformed JSON string. + * Fixed segfault when setting an empty log-format from the TUI dialog. + * Fixed sorting on hits and visitors when larger than INT_MAX. + * Updated CloudFront pre-defined log-format to reflect the latest fields. + * Updated 'Dockerfile' image to use 'alpine:3.13' instead of edge due to + compatibility issue with the GNU coreutils. + +------------------------------------------------------------------- +Mon Mar 1 08:20:53 UTC 2021 - Michael Vetter <[email protected]> + +- Update to 1.4.5: + * Fixed build issue due to initial declarations only allowed in C99 mode + +------------------------------------------------------------------- Old: ---- goaccess-1.4.4.tar.gz New: ---- goaccess-1.4.6.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ goaccess.spec ++++++ --- /var/tmp/diff_new_pack.hNMgvs/_old 2021-03-02 12:45:53.056377695 +0100 +++ /var/tmp/diff_new_pack.hNMgvs/_new 2021-03-02 12:45:53.060377698 +0100 @@ -21,7 +21,7 @@ %global goaccess_services [email protected] [email protected] Name: goaccess -Version: 1.4.4 +Version: 1.4.6 Release: 0 Summary: Apache Web Log Analyzer License: GPL-2.0-or-later ++++++ goaccess-1.4.4.tar.gz -> goaccess-1.4.6.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/goaccess-1.4.4/AUTHORS new/goaccess-1.4.6/AUTHORS --- old/goaccess-1.4.4/AUTHORS 2021-01-23 03:06:54.000000000 +0100 +++ new/goaccess-1.4.6/AUTHORS 2021-02-28 23:23:15.000000000 +0100 @@ -43,6 +43,7 @@ * Daniel (dmilith) Dettlaff <[email protected]> * Danila Vershinin <[email protected]> * Danny Kirkham <[email protected]> + * Darek Kay <[email protected]> * David Carlier <[email protected]> * David Geistert <[email protected]> * d_dandrew <[email protected]> @@ -58,6 +59,8 @@ * gitqlt <[email protected]> * Hiroki Kamino <[email protected]> * holys <[email protected]> + * Izzy <[email protected]> + * JackDesBwa <[email protected]> * Jeffery Wilkins <[email protected]> * Jeremy Burks <[email protected]> * Jeremy Lin <[email protected]> @@ -104,6 +107,7 @@ * Stuart Henderson <[email protected]> * Tatsuyuki Ishi <[email protected]> * Thomas Gl????le <[email protected]> + * Thomas Jost <[email protected]> * Thomas Lange <[email protected]> * Tom Samstag <[email protected]> * Ulrich Schwarz <[email protected]> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/goaccess-1.4.4/ChangeLog new/goaccess-1.4.6/ChangeLog --- old/goaccess-1.4.4/ChangeLog 2021-01-23 15:37:34.000000000 +0100 +++ new/goaccess-1.4.6/ChangeLog 2021-02-28 23:33:28.000000000 +0100 @@ -1,26 +1,55 @@ +Changes to GoAccess 1.4.6 - Sunday, February 28, 2021 + + - Added additional feed reader clients. + - Added addtional browsers and bots to the main list. + - Added command line option '--unknowns-log' to log unknown browsers and + OSs. + - Added 'Referer' to the pre-defined 'Caddy JSON' log format. + - Added support for real-time piping as non-root user. + - Added the ability to Handle case when IPv4 is encoded as IPv6 in + GeoIP1/legacy. + - Ensure we capture linux (lowercase) when extracting an OS. + - Fixed a regression in parsing Google Cloud Storage or possibly other + non-JSON formats. + - Fixed inability to parse escaped formats. + - Fixed issue when using '%s' with 'strptime(3)' under musl libc. This + addresses mostly the Docker image. + - Fixed possible buffer over-read for certain log-format patterns. + - Fixed segfault when attempting to process a malformed JSON string. + - Fixed segfault when setting an empty log-format from the TUI dialog. + - Fixed sorting on hits and visitors when larger than INT_MAX. + - Updated CloudFront pre-defined log-format to reflect the latest fields. + - Updated 'Dockerfile' image to use 'alpine:3.13' instead of edge due to + compatibility issue with the GNU coreutils. + +Changes to GoAccess 1.4.5 - Tuesday, January 26, 2021 + + - Fixed build issue due to initial declarations only allowed in C99 mode + (e.g., CentOS7). + Changes to GoAccess 1.4.4 - Monday, January 25, 2021 - - Added 'Caddy' to the list of pre-defined log formats. - - Added command line option '--no-strict-status' to disable status validation. - - Added native support to parse JSON logs. - - Added the ability to process timestamps in milliseconds using '%*'. - - Ensure TUI/CSV/HTML reports are able to output 'uint64_t' data. - - Ensure we allow UI render if the rate at which data is being read if - greater than '8192' req/s. - - Ensure we don't re-render Term/HTML output if no data was read/piped. - - Fixed build configure to work on NetBSD. - - Fixed issue where it would send data via socket each second when managed - by systemd. - - Fixed issue where parser was unable to parse syslog date with padding. - - Fixed issue where some items under browsers.list were not tab separated. - - Fixed issue where the format parser was unable to properly parse logs - delimited by a pipe. - - Fixed issue where T.X. Amount metrics were not shown when data was piped. - - Fixed issue where XFF parser could swallow an additional field. - - Fixed memory leak when using '%x' as date/time specifier. - - Replaced select(2) with poll(2) as it is more efficient and a lot faster - than select(2). - - Updated Swedish i18n. + - Added 'Caddy' to the list of pre-defined log formats. + - Added command line option '--no-strict-status' to disable status validation. + - Added native support to parse JSON logs. + - Added the ability to process timestamps in milliseconds using '%*'. + - Ensure TUI/CSV/HTML reports are able to output 'uint64_t' data. + - Ensure we allow UI render if the rate at which data is being read is + greater than '8192' req/s. + - Ensure we don't re-render Term/HTML output if no data was read/piped. + - Fixed build configure to work on NetBSD. + - Fixed issue where it would send data via socket each second when managed + by systemd. + - Fixed issue where parser was unable to parse syslog date with padding. + - Fixed issue where some items under browsers.list were not tab separated. + - Fixed issue where the format parser was unable to properly parse logs + delimited by a pipe. + - Fixed issue where T.X. Amount metrics were not shown when data was piped. + - Fixed issue where XFF parser could swallow an additional field. + - Fixed memory leak when using '%x' as date/time specifier. + - Replaced select(2) with poll(2) as it is more efficient and a lot faster + than select(2). + - Updated Swedish i18n. Changes to GoAccess 1.4.3 - Friday, December 04, 2020 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/goaccess-1.4.4/NEWS new/goaccess-1.4.6/NEWS --- old/goaccess-1.4.4/NEWS 2021-01-23 16:37:09.000000000 +0100 +++ new/goaccess-1.4.6/NEWS 2021-02-28 22:56:57.000000000 +0100 @@ -2,6 +2,10 @@ Gerardo Orellana <[email protected]> * Version history: + - 1.4.6 [Sunday, February 28, 2021] + . GoAccess 1.4.6 Released. See ChangeLog for new features/bug-fixes. + - 1.4.5 [Tuesday, January 26, 2021] + . GoAccess 1.4.5 Released. See ChangeLog for new features/bug-fixes. - 1.4.4 [Monday, January 25, 2021] . GoAccess 1.4.4 Released. See ChangeLog for new features/bug-fixes. - 1.4.3 [Friday, December 04, 2020] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/goaccess-1.4.4/config/goaccess.conf new/goaccess-1.4.6/config/goaccess.conf --- old/goaccess-1.4.4/config/goaccess.conf 2021-01-13 16:55:44.000000000 +0100 +++ new/goaccess-1.4.6/config/goaccess.conf 2021-02-28 23:39:01.000000000 +0100 @@ -462,6 +462,8 @@ #enable-panel REMOTE_USER #enable-panel CACHE_STATUS #enable-panel GEO_LOCATION +#enable-panel MIME_TYPE +#enable-panel TLS_TYPE # Hide a referer but still count it. Wild cards are allowed. i.e., *.bing.com # @@ -511,6 +513,8 @@ #ignore-panel REMOTE_USER #ignore-panel CACHE_STATUS #ignore-panel GEO_LOCATION +#ignore-panel MIME_TYPE +#ignore-panel TLS_TYPE # Ignore referers from being counted. # This supports wild cards. For instance, @@ -584,6 +588,8 @@ #sort-panel REMOTE_USER,BY_HITS,ASC #sort-panel CACHE_STATUS,BY_HITS,ASC #sort-panel GEO_LOCATION,BY_HITS,ASC +#sort-panel MIME_TYPE,BY_HITS,ASC +#sort-panel TLS_TYPE,BY_HITS,ASC # Consider the following extensions as static files # The actual '.' is required and extensions are case sensitive diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/goaccess-1.4.4/configure new/goaccess-1.4.6/configure --- old/goaccess-1.4.4/configure 2021-01-23 15:23:10.000000000 +0100 +++ new/goaccess-1.4.6/configure 2021-02-28 22:59:52.000000000 +0100 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for goaccess 1.4.4. +# Generated by GNU Autoconf 2.69 for goaccess 1.4.6. # # Report bugs to <[email protected]>. # @@ -580,8 +580,8 @@ # Identity of this package. PACKAGE_NAME='goaccess' PACKAGE_TARNAME='goaccess' -PACKAGE_VERSION='1.4.4' -PACKAGE_STRING='goaccess 1.4.4' +PACKAGE_VERSION='1.4.6' +PACKAGE_STRING='goaccess 1.4.6' PACKAGE_BUGREPORT='[email protected]' PACKAGE_URL='https://goaccess.io' @@ -1333,7 +1333,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures goaccess 1.4.4 to adapt to many kinds of systems. +\`configure' configures goaccess 1.4.6 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1404,7 +1404,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of goaccess 1.4.4:";; + short | recursive ) echo "Configuration of goaccess 1.4.6:";; esac cat <<\_ACEOF @@ -1514,7 +1514,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -goaccess configure 1.4.4 +goaccess configure 1.4.6 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2067,7 +2067,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by goaccess $as_me 1.4.4, which was +It was created by goaccess $as_me 1.4.6, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2934,7 +2934,7 @@ # Define the identity of the package. PACKAGE='goaccess' - VERSION='1.4.4' + VERSION='1.4.6' cat >>confdefs.h <<_ACEOF @@ -9658,7 +9658,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by goaccess $as_me 1.4.4, which was +This file was extended by goaccess $as_me 1.4.6, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -9725,7 +9725,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -goaccess config.status 1.4.4 +goaccess config.status 1.4.6 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/goaccess-1.4.4/configure.ac new/goaccess-1.4.6/configure.ac --- old/goaccess-1.4.4/configure.ac 2021-01-23 02:56:55.000000000 +0100 +++ new/goaccess-1.4.6/configure.ac 2021-02-28 22:56:57.000000000 +0100 @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ([2.69]) -AC_INIT([goaccess],[1.4.4],[[email protected]],[],[https://goaccess.io]) +AC_INIT([goaccess],[1.4.6],[[email protected]],[],[https://goaccess.io]) AM_INIT_AUTOMAKE AC_CONFIG_SRCDIR([src/goaccess.c]) AC_CONFIG_HEADERS([src/config.h]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/goaccess-1.4.4/goaccess.1 new/goaccess-1.4.6/goaccess.1 --- old/goaccess-1.4.4/goaccess.1 2021-01-23 20:29:18.000000000 +0100 +++ new/goaccess-1.4.6/goaccess.1 2021-02-28 23:47:41.000000000 +0100 @@ -1,4 +1,4 @@ -.TH goaccess 1 "JANUARY 2021" Linux "User Manuals" +.TH goaccess 1 "FEBRUARY 2021" Linux "User Manuals" .SH NAME goaccess \- fast web log analyzer and interactive viewer. .SH SYNOPSIS @@ -226,6 +226,7 @@ CLOUDSTORAGE - Google Cloud Storage, AWSELB - Amazon Elastic Load Balancing, AWSS3 - Amazon Simple Storage Service (S3) + CADDY - Caddy's JSON Structured format .IP .I Note: Piping data into GoAccess won't prompt a log/date/time configuration dialog, @@ -473,6 +474,9 @@ \fB\-\-invalid-requests=<filename> Log invalid requests to the specified file. .TP +\fB\-\-unknowns-log=<filename> +Log unknown browsers and OSs to the specified file. +.TP \fB\-\-no-global-config Do not load the global configuration file. This directory should normally be /usr/local/etc, unless specified with @@ -578,7 +582,10 @@ KEYPHRASES STATUS_CODES REMOTE_USER + CACHE_STATUS GEO_LOCATION + MIME_TYPE + TLS_TYPE .TP \fB\-\-hide-referer=<NEEDLE> Hide a referer but still count it. Wild cards are allowed in the needle. i.e., @@ -612,6 +619,8 @@ KEYPHRASES STATUS_CODES REMOTE_USER + CACHE_STATUS + GEO_LOCATION MIME_TYPE TLS_TYPE .TP diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/goaccess-1.4.4/po/de.po new/goaccess-1.4.6/po/de.po --- old/goaccess-1.4.4/po/de.po 2021-01-23 21:30:33.000000000 +0100 +++ new/goaccess-1.4.6/po/de.po 2021-02-28 22:56:57.000000000 +0100 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: [email protected]\n" -"POT-Creation-Date: 2021-01-23 14:30-0600\n" +"POT-Creation-Date: 2021-02-28 15:49-0600\n" "PO-Revision-Date: 2019-05-05 16:03+0200\n" "Last-Translator: Axel Wehner <[email protected]>\n" "Language: de\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/goaccess-1.4.4/po/es.po new/goaccess-1.4.6/po/es.po --- old/goaccess-1.4.4/po/es.po 2021-01-23 21:30:34.000000000 +0100 +++ new/goaccess-1.4.6/po/es.po 2021-02-28 22:56:57.000000000 +0100 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: Goaccess\n" "Report-Msgid-Bugs-To: [email protected]\n" -"POT-Creation-Date: 2021-01-23 14:30-0600\n" +"POT-Creation-Date: 2021-02-28 15:49-0600\n" "PO-Revision-Date: 2017-08-04 13:00-0300\n" "Last-Translator: Enrique Becerra <[email protected]>\n" "Language-Team: \n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/goaccess-1.4.4/po/fr.po new/goaccess-1.4.6/po/fr.po --- old/goaccess-1.4.4/po/fr.po 2021-01-23 21:30:34.000000000 +0100 +++ new/goaccess-1.4.6/po/fr.po 2021-02-28 22:56:57.000000000 +0100 @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: goaccess 1.4\n" "Report-Msgid-Bugs-To: [email protected]\n" -"POT-Creation-Date: 2021-01-23 14:30-0600\n" +"POT-Creation-Date: 2021-02-28 15:49-0600\n" "PO-Revision-Date: 2020-07-10 11:44+0200\n" "Last-Translator: Coban L. <[email protected]>\n" "Language-Team: fran??ais\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/goaccess-1.4.4/po/goaccess.pot new/goaccess-1.4.6/po/goaccess.pot --- old/goaccess-1.4.4/po/goaccess.pot 2021-01-23 21:30:33.000000000 +0100 +++ new/goaccess-1.4.6/po/goaccess.pot 2021-02-28 22:56:57.000000000 +0100 @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: goaccess 1.4.4\n" +"Project-Id-Version: goaccess 1.4.6\n" "Report-Msgid-Bugs-To: [email protected]\n" -"POT-Creation-Date: 2021-01-23 14:30-0600\n" +"POT-Creation-Date: 2021-02-28 15:49-0600\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <[email protected]>\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/goaccess-1.4.4/po/ja.po new/goaccess-1.4.6/po/ja.po --- old/goaccess-1.4.4/po/ja.po 2021-01-23 21:30:34.000000000 +0100 +++ new/goaccess-1.4.6/po/ja.po 2021-02-28 22:56:57.000000000 +0100 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: goaccess 1.3\n" "Report-Msgid-Bugs-To: [email protected]\n" -"POT-Creation-Date: 2021-01-23 14:30-0600\n" +"POT-Creation-Date: 2021-02-28 15:49-0600\n" "PO-Revision-Date: 2020-08-19 06:27+0900\n" "Last-Translator: Kamino <[email protected]>\n" "Language-Team: Japanese\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/goaccess-1.4.4/po/pt_BR.po new/goaccess-1.4.6/po/pt_BR.po --- old/goaccess-1.4.4/po/pt_BR.po 2021-01-23 21:30:34.000000000 +0100 +++ new/goaccess-1.4.6/po/pt_BR.po 2021-02-28 22:56:57.000000000 +0100 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: Goaccess\n" "Report-Msgid-Bugs-To: [email protected]\n" -"POT-Creation-Date: 2021-01-23 14:30-0600\n" +"POT-Creation-Date: 2021-02-28 15:49-0600\n" "PO-Revision-Date: 2019-04-25 20:34-0300\n" "Last-Translator: Alan Placidina Maria <[email protected]>\n" "Language-Team: \n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/goaccess-1.4.4/po/ru.po new/goaccess-1.4.6/po/ru.po --- old/goaccess-1.4.4/po/ru.po 2021-01-23 21:30:34.000000000 +0100 +++ new/goaccess-1.4.6/po/ru.po 2021-02-28 22:56:57.000000000 +0100 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: goaccess 1.4\n" "Report-Msgid-Bugs-To: [email protected]\n" -"POT-Creation-Date: 2021-01-23 14:30-0600\n" +"POT-Creation-Date: 2021-02-28 15:49-0600\n" "PO-Revision-Date: 2020-06-25 17:14+0300\n" "Last-Translator: Artyom Karlov <[email protected]>\n" "Language-Team: \n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/goaccess-1.4.4/po/sv.po new/goaccess-1.4.6/po/sv.po --- old/goaccess-1.4.4/po/sv.po 2021-01-23 21:30:34.000000000 +0100 +++ new/goaccess-1.4.6/po/sv.po 2021-02-28 22:56:57.000000000 +0100 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: goaccess 1.3\n" "Report-Msgid-Bugs-To: [email protected]\n" -"POT-Creation-Date: 2021-01-23 14:30-0600\n" +"POT-Creation-Date: 2021-02-28 15:49-0600\n" "PO-Revision-Date: 2018-12-13 22:48-0600\n" "Last-Translator: Anders Johansson <[email protected]>\n" "Language-Team: none\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/goaccess-1.4.4/po/uk.po new/goaccess-1.4.6/po/uk.po --- old/goaccess-1.4.4/po/uk.po 2021-01-23 21:30:34.000000000 +0100 +++ new/goaccess-1.4.6/po/uk.po 2021-02-28 22:56:57.000000000 +0100 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: goaccess 1.4\n" "Report-Msgid-Bugs-To: [email protected]\n" -"POT-Creation-Date: 2021-01-23 14:30-0600\n" +"POT-Creation-Date: 2021-02-28 15:49-0600\n" "PO-Revision-Date: 2020-06-25 17:12+0300\n" "Last-Translator: Artyom Karlov <[email protected]>\n" "Language-Team: \n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/goaccess-1.4.4/po/zh_CN.po new/goaccess-1.4.6/po/zh_CN.po --- old/goaccess-1.4.4/po/zh_CN.po 2021-01-23 21:30:34.000000000 +0100 +++ new/goaccess-1.4.6/po/zh_CN.po 2021-02-28 22:56:57.000000000 +0100 @@ -5,7 +5,7 @@ msgstr "" "Project-Id-Version: goaccess 1.2\n" "Report-Msgid-Bugs-To: [email protected]\n" -"POT-Creation-Date: 2021-01-23 14:30-0600\n" +"POT-Creation-Date: 2021-02-28 15:49-0600\n" "PO-Revision-Date: 2017-04-03 09:43+0200\n" "Last-Translator: Ai<[email protected]>\n" "Language-Team: Ai\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/goaccess-1.4.4/src/browsers.c new/goaccess-1.4.6/src/browsers.c --- old/goaccess-1.4.4/src/browsers.c 2021-01-20 01:22:03.000000000 +0100 +++ new/goaccess-1.4.6/src/browsers.c 2021-02-28 22:56:57.000000000 +0100 @@ -82,8 +82,9 @@ /* Others */ {"Homebrew", "Others"}, - {"APT-HTTP", "Others"}, + {"APT-", "Others"}, {"Apt-Cacher", "Others"}, + {"Aptly", "Others"}, {"Chef Client", "Others"}, {"Huawei", "Others"}, {"HUAWEI", "Others"}, @@ -122,6 +123,10 @@ {"libwww-perl", "Others"}, {"python-requests", "Others"}, {"PackageKit", "Others"}, + {"F-Droid", "Others"}, + {"okhttp", "Others"}, + {"node", "Others"}, + {"PrivacyBrowser", "Others"}, /* Feed-reader-as-a-service */ {"AppleNewsBot", "Feeds"}, @@ -138,6 +143,9 @@ {"theoldreader.com", "Feeds"}, {"WordPress.com Reader", "Feeds"}, {"YandexBlogs", "Feeds"}, + {"Brainstorm", "Feeds"}, + {"Mastodon", "Feeds"}, + {"Pleroma", "Feeds"}, /* Google crawlers (some based on Chrome, * therefore up on the list) */ @@ -152,6 +160,8 @@ /* Rebranded Firefox but is really unmodified * Firefox (Debian trademark policy) */ {"Iceweasel", "Firefox"}, + {"Waterfox", "Firefox"}, + {"PaleMoon", "Firefox"}, {"Focus", "Firefox"}, /* Klar is the name of Firefox Focus in the German market. */ {"Klar", "Firefox"}, @@ -176,6 +186,7 @@ {"Safari", "Safari"}, /* Crawlers/Bots */ + {"Slack", "Crawlers"}, {"Sogou", "Crawlers"}, {"Java", "Crawlers"}, {"Jakarta Commons-HttpClient", "Crawlers"}, @@ -243,10 +254,14 @@ {"com.apple.Safari.WebFeedParser", "Feeds"}, {"FeedDemon", "Feeds"}, {"Feedy", "Feeds"}, + {"Fever", "Feeds"}, + {"FreshRSS", "Feeds"}, {"Liferea", "Feeds"}, {"NetNewsWire", "Feeds"}, {"RSSOwl", "Feeds"}, + {"Tiny Tiny RSS", "Feeds"}, {"Thunderbird", "Feeds"}, + {"Winds", "Feeds"}, {"Pingdom.com", "Uptime"}, {"jetmon", "Uptime"}, @@ -548,6 +563,9 @@ return parse_browser (match, type, j, browsers_hash); } + if (conf.unknowns_log) + LOG_UNKNOWNS (("%-7s%s\n", "[BR]", str)); + xstrncpy (type, "Unknown", BROWSER_TYPE_LEN); return alloc_string ("Unknown"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/goaccess-1.4.4/src/commons.c new/goaccess-1.4.6/src/commons.c --- old/goaccess-1.4.4/src/commons.c 2021-01-20 01:22:03.000000000 +0100 +++ new/goaccess-1.4.6/src/commons.c 2021-02-28 23:42:16.000000000 +0100 @@ -75,8 +75,8 @@ #ifdef HAVE_GEOLOCATION {"GEO_LOCATION" , GEO_LOCATION} , #endif - {"MIME_TYPE" , MIME_TYPE} , - {"TLS_TYPE" , TLS_TYPE} , + {"MIME_TYPE" , MIME_TYPE} , + {"TLS_TYPE" , TLS_TYPE} , }; /* *INDENT-ON* */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/goaccess-1.4.4/src/commons.h new/goaccess-1.4.6/src/commons.h --- old/goaccess-1.4.4/src/commons.h 2021-01-23 02:58:17.000000000 +0100 +++ new/goaccess-1.4.6/src/commons.h 2021-02-28 22:56:57.000000000 +0100 @@ -43,7 +43,7 @@ #define __attribute__(x) /**/ #endif #define GO_UNUSED __attribute__((unused)) -#define GO_VERSION "1.4.4" +#define GO_VERSION "1.4.6" #define GO_WEBSITE "https://goaccess.io/" extern struct tm now_tm; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/goaccess-1.4.4/src/error.c new/goaccess-1.4.6/src/error.c --- old/goaccess-1.4.4/src/error.c 2021-01-20 01:22:03.000000000 +0100 +++ new/goaccess-1.4.6/src/error.c 2021-02-28 22:56:57.000000000 +0100 @@ -50,6 +50,7 @@ static FILE *access_log; static FILE *log_file; static FILE *log_invalid; +static FILE *log_unknowns; static Logs *log_data; static struct sigaction old_sigsegv_handler; @@ -88,6 +89,24 @@ fclose (log_invalid); } +/* Open the unknowns log file whose name is specified in the + * given path. */ +void +unknowns_log_open (const char *path) { + if (path != NULL) { + log_unknowns = fopen (path, "w"); + if (log_unknowns == NULL) + return; + } +} + +/* Close the unknowns log file. */ +void +unknowns_log_close (void) { + if (log_unknowns != NULL) + fclose (log_unknowns); +} + /* Set current overall parsed log data. */ void set_signal_data (void *p) { @@ -221,6 +240,20 @@ va_end (args); } +/* Write formatted unknown browsers/OSs log data to the logfile. */ +void +unknowns_fprintf (const char *fmt, ...) { + va_list args; + + if (!log_unknowns) + return; + + va_start (args, fmt); + vfprintf (log_unknowns, fmt, args); + fflush (log_unknowns); + va_end (args); +} + /* Debug otuput */ void dbg_printf (const char *fmt, ...) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/goaccess-1.4.4/src/error.h new/goaccess-1.4.6/src/error.h --- old/goaccess-1.4.4/src/error.h 2021-01-20 01:22:03.000000000 +0100 +++ new/goaccess-1.4.6/src/error.h 2021-02-28 22:56:57.000000000 +0100 @@ -74,6 +74,8 @@ #define LOG_DEBUG(x, ...) do { dbg_fprintf x; } while (0) /* invalid requests log */ #define LOG_INVALID(x, ...) do { invalid_fprintf x; } while (0) +/* unknown browser log */ +#define LOG_UNKNOWNS(x, ...) do { unknowns_fprintf x; } while (0) /* log debug wrapper */ #define LOG(x) do { if (DEBUG_TEST) dbg_printf x; } while (0) @@ -85,10 +87,13 @@ void dbg_log_open (const char *file); void dbg_printf (const char *fmt, ...) __attribute__((format (printf, 1, 2))); void invalid_fprintf (const char *fmt, ...) __attribute__((format (printf, 1, 2))); +void unknowns_fprintf (const char *fmt, ...) __attribute__((format (printf, 1, 2))); void invalid_log_close (void); void invalid_log_open (const char *path); void set_signal_data (void *p); void setup_sigsegv_handler (void); void sigsegv_handler (int sig); +void unknowns_log_close (void); +void unknowns_log_open (const char *path); #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/goaccess-1.4.4/src/geoip1.c new/goaccess-1.4.6/src/geoip1.c --- old/goaccess-1.4.4/src/geoip1.c 2021-01-20 01:22:03.000000000 +0100 +++ new/goaccess-1.4.6/src/geoip1.c 2021-02-28 22:56:57.000000000 +0100 @@ -92,6 +92,17 @@ geo_location_data = GeoIP_new (conf.geo_db); } +static char ip4to6_out_buffer[17]; +static char * ip4to6(const char * ipv4) { + unsigned int b[4]; + int n = sscanf(ipv4, "%u.%u.%u.%u", b, b+1, b+2, b+3); + if (n == 4) { + snprintf(ip4to6_out_buffer, sizeof(ip4to6_out_buffer), "::ffff:%02x%02x:%02x%02x", b[0], b[1], b[2], b[3]); + return ip4to6_out_buffer; + } + return NULL; +} + /* Get continent name concatenated with code. * * If continent not found, "Unknown" is returned. @@ -252,8 +263,13 @@ case GEOIP_COUNTRY_EDITION_V6: if (TYPE_IPV6 == type_ip) geoip_set_country_by_geoid (ip, location, TYPE_IPV6); - else - geoip_set_country (NULL, NULL, location); + else { + char * ipv6 = ip4to6(ip); + if (ipv6) + geoip_set_country_by_geoid (ipv6, location, TYPE_IPV6); + else + geoip_set_country (NULL, NULL, location); + } break; case GEOIP_CITY_EDITION_REV0: case GEOIP_CITY_EDITION_REV1: @@ -266,8 +282,13 @@ case GEOIP_CITY_EDITION_REV1_V6: if (TYPE_IPV6 == type_ip) geoip_set_country_by_record (ip, location, TYPE_IPV6); - else - geoip_set_country (NULL, NULL, location); + else { + char * ipv6 = ip4to6(ip); + if (ipv6) + geoip_set_country_by_record (ipv6, location, TYPE_IPV6); + else + geoip_set_country (NULL, NULL, location); + } break; } } @@ -326,8 +347,13 @@ case GEOIP_COUNTRY_EDITION_V6: if (TYPE_IPV6 == type_ip) geoip_set_continent_by_geoid (ip, location, TYPE_IPV6); - else - geoip_set_continent (NULL, location); + else { + char * ipv6 = ip4to6(ip); + if (ipv6) + geoip_set_continent_by_geoid (ipv6, location, TYPE_IPV6); + else + geoip_set_continent (NULL, location); + } break; case GEOIP_CITY_EDITION_REV0: case GEOIP_CITY_EDITION_REV1: @@ -340,8 +366,13 @@ case GEOIP_CITY_EDITION_REV1_V6: if (TYPE_IPV6 == type_ip) geoip_set_continent_by_record (ip, location, TYPE_IPV6); - else - geoip_set_continent (NULL, location); + else { + char * ipv6 = ip4to6(ip); + if (ipv6) + geoip_set_continent_by_record (ipv6, location, TYPE_IPV6); + else + geoip_set_continent (NULL, location); + } break; } } @@ -387,8 +418,13 @@ case GEOIP_CITY_EDITION_REV1_V6: if (TYPE_IPV6 == type_ip) geoip_set_city_by_record (ip, location, TYPE_IPV6); - else - geoip_set_city (NULL, NULL, location); + else { + char * ipv6 = ip4to6(ip); + if (ipv6) + geoip_set_city_by_record (ipv6, location, TYPE_IPV6); + else + geoip_set_city (NULL, NULL, location); + } break; } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/goaccess-1.4.4/src/gkhash.c new/goaccess-1.4.6/src/gkhash.c --- old/goaccess-1.4.4/src/gkhash.c 2021-01-23 19:33:06.000000000 +0100 +++ new/goaccess-1.4.6/src/gkhash.c 2021-02-28 23:43:13.000000000 +0100 @@ -445,28 +445,28 @@ /* *INDENT-OFF* */ static const GKHashMetric global_metrics[] = { - { MTRC_UNIQUE_KEYS, MTRC_TYPE_SI32 , new_si32_ht , des_si32_free , del_si32_free , NULL , "SI32_UNIQUE_KEYS.db" } , - { MTRC_AGENT_KEYS , MTRC_TYPE_SI32 , new_si32_ht , des_si32_free , del_si32_free , NULL , "SI32_AGENT_KEYS.db" } , - { MTRC_AGENT_VALS , MTRC_TYPE_IS32 , new_is32_ht , des_is32_free , del_is32_free , NULL , "IS32_AGENT_VALS.db" } , - { MTRC_CNT_VALID , MTRC_TYPE_II32 , new_ii32_ht , des_ii32 , del_ii32 , NULL , "II32_CNT_VALID.db" } , - { MTRC_CNT_BW , MTRC_TYPE_IU64 , new_iu64_ht , des_iu64 , del_iu64 , NULL , "IU64_CNT_BW.db" } , + { MTRC_UNIQUE_KEYS , MTRC_TYPE_SI32 , new_si32_ht , des_si32_free , del_si32_free , NULL , "SI32_UNIQUE_KEYS.db" } , + { MTRC_AGENT_KEYS , MTRC_TYPE_SI32 , new_si32_ht , des_si32_free , del_si32_free , NULL , "SI32_AGENT_KEYS.db" } , + { MTRC_AGENT_VALS , MTRC_TYPE_IS32 , new_is32_ht , des_is32_free , del_is32_free , NULL , "IS32_AGENT_VALS.db" } , + { MTRC_CNT_VALID , MTRC_TYPE_II32 , new_ii32_ht , des_ii32 , del_ii32 , NULL , "II32_CNT_VALID.db" } , + { MTRC_CNT_BW , MTRC_TYPE_IU64 , new_iu64_ht , des_iu64 , del_iu64 , NULL , "IU64_CNT_BW.db" } , }; static GKHashMetric module_metrics[] = { - { MTRC_KEYMAP , MTRC_TYPE_SI32 , new_si32_ht , des_si32_free , del_si32_free , NULL , NULL} , - { MTRC_ROOTMAP , MTRC_TYPE_IS32 , new_is32_ht , des_is32_free , del_is32_free , NULL , NULL} , - { MTRC_DATAMAP , MTRC_TYPE_IS32 , new_is32_ht , des_is32_free , del_is32_free , NULL , NULL} , - { MTRC_UNIQMAP , MTRC_TYPE_U648 , new_u648_ht , des_u648 , del_u648 , NULL , NULL} , - { MTRC_ROOT , MTRC_TYPE_II32 , new_ii32_ht , des_ii32 , del_ii32 , NULL , NULL} , - { MTRC_HITS , MTRC_TYPE_II32 , new_ii32_ht , des_ii32 , del_ii32 , NULL , NULL} , - { MTRC_VISITORS , MTRC_TYPE_II32 , new_ii32_ht , des_ii32 , del_ii32 , NULL , NULL} , - { MTRC_BW , MTRC_TYPE_IU64 , new_iu64_ht , des_iu64 , del_iu64 , NULL , NULL} , - { MTRC_CUMTS , MTRC_TYPE_IU64 , new_iu64_ht , des_iu64 , del_iu64 , NULL , NULL} , - { MTRC_MAXTS , MTRC_TYPE_IU64 , new_iu64_ht , des_iu64 , del_iu64 , NULL , NULL} , - { MTRC_METHODS , MTRC_TYPE_IS32 , new_is32_ht , des_is32_free , del_is32_free , NULL , NULL} , - { MTRC_PROTOCOLS , MTRC_TYPE_IS32 , new_is32_ht , des_is32_free , del_is32_free , NULL , NULL} , - { MTRC_AGENTS , MTRC_TYPE_IGSL , new_igsl_ht , des_igsl_free , del_igsl_free , NULL , NULL} , - { MTRC_METADATA , MTRC_TYPE_SU64 , new_su64_ht , des_su64_free , del_su64_free , NULL , NULL} , + { MTRC_KEYMAP , MTRC_TYPE_SI32 , new_si32_ht , des_si32_free , del_si32_free , NULL , NULL} , + { MTRC_ROOTMAP , MTRC_TYPE_IS32 , new_is32_ht , des_is32_free , del_is32_free , NULL , NULL} , + { MTRC_DATAMAP , MTRC_TYPE_IS32 , new_is32_ht , des_is32_free , del_is32_free , NULL , NULL} , + { MTRC_UNIQMAP , MTRC_TYPE_U648 , new_u648_ht , des_u648 , del_u648 , NULL , NULL} , + { MTRC_ROOT , MTRC_TYPE_II32 , new_ii32_ht , des_ii32 , del_ii32 , NULL , NULL} , + { MTRC_HITS , MTRC_TYPE_II32 , new_ii32_ht , des_ii32 , del_ii32 , NULL , NULL} , + { MTRC_VISITORS , MTRC_TYPE_II32 , new_ii32_ht , des_ii32 , del_ii32 , NULL , NULL} , + { MTRC_BW , MTRC_TYPE_IU64 , new_iu64_ht , des_iu64 , del_iu64 , NULL , NULL} , + { MTRC_CUMTS , MTRC_TYPE_IU64 , new_iu64_ht , des_iu64 , del_iu64 , NULL , NULL} , + { MTRC_MAXTS , MTRC_TYPE_IU64 , new_iu64_ht , des_iu64 , del_iu64 , NULL , NULL} , + { MTRC_METHODS , MTRC_TYPE_IS32 , new_is32_ht , des_is32_free , del_is32_free , NULL , NULL} , + { MTRC_PROTOCOLS , MTRC_TYPE_IS32 , new_is32_ht , des_is32_free , del_is32_free , NULL , NULL} , + { MTRC_AGENTS , MTRC_TYPE_IGSL , new_igsl_ht , des_igsl_free , del_igsl_free , NULL , NULL} , + { MTRC_METADATA , MTRC_TYPE_SU64 , new_su64_ht , des_su64_free , del_su64_free , NULL , NULL} , }; /* *INDENT-ON* */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/goaccess-1.4.4/src/goaccess.c new/goaccess-1.4.6/src/goaccess.c --- old/goaccess-1.4.4/src/goaccess.c 2021-01-20 01:22:03.000000000 +0100 +++ new/goaccess-1.4.6/src/goaccess.c 2021-02-28 22:56:57.000000000 +0100 @@ -172,6 +172,12 @@ invalid_log_close (); } + /* UNKNOWNS */ + if (conf.unknowns_log) { + LOG_DEBUG (("Closing unknowns log.\n")); + unknowns_log_close(); + } + /* CONFIGURATION */ free_formats (); free_browsers_hash (); @@ -1244,21 +1250,24 @@ set_pipe_stdin (void) { char *term = NULL; FILE *pipe = stdin; - int fd1, fd2; + int term_fd = -1; + int pipe_fd = -1; /* If unable to open a terminal, yet data is being piped, then it's - * probably from the cron. + * probably from the cron, or when running as a user that can't open a + * terminal. In that case it's still important to set the pipe as + * non-blocking. * * Note: If used from the cron, it will require the * user to use a single dash to parse piped data such as: * cat access.log | goaccess - */ - if ((fd1 = open_term (&term)) == -1) - goto out; + if ((term_fd = open_term (&term)) == -1) + goto out1; - if ((fd2 = dup (fileno (stdin))) == -1) + if ((pipe_fd = dup (fileno (stdin))) == -1) FATAL ("Unable to dup stdin: %s", strerror (errno)); - pipe = fdopen (fd2, "r"); + pipe = fdopen (pipe_fd, "r"); if (freopen (term, "r", stdin) == 0) FATAL ("Unable to open input from TTY"); if (fileno (stdin) != 0) @@ -1266,15 +1275,20 @@ add_dash_filename (); +out1: + /* no need to set it as non-blocking since we are simply outputting a * static report */ if (conf.output_stdout && !conf.real_time_html) - goto out; + goto out2; /* Using select(), poll(), or epoll(), etc may be a better choice... */ - if (fcntl (fd2, F_SETFL, fcntl (fd2, F_GETFL, 0) | O_NONBLOCK) == -1) + if (pipe_fd == -1) + pipe_fd = fileno (pipe); + if (fcntl (pipe_fd, F_SETFL, fcntl (pipe_fd, F_GETFL, 0) | O_NONBLOCK) == -1) FATAL ("Unable to set fd as non-blocking: %s.", strerror (errno)); -out: + +out2: free (term); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/goaccess-1.4.4/src/opesys.c new/goaccess-1.4.6/src/opesys.c --- old/goaccess-1.4.4/src/opesys.c 2021-01-20 01:22:03.000000000 +0100 +++ new/goaccess-1.4.6/src/opesys.c 2021-02-28 22:56:57.000000000 +0100 @@ -37,6 +37,7 @@ #include "opesys.h" +#include "error.h" #include "settings.h" #include "util.h" #include "xmalloc.h" @@ -90,6 +91,7 @@ {"CentOS", "Linux"}, {"PCLinuxOS", "Linux"}, {"Linux", "Linux"}, + {"linux", "Linux"}, {"FreeBSD", "BSD"}, {"NetBSD", "BSD"}, @@ -392,5 +394,8 @@ } xstrncpy (os_type, "Unknown", OPESYS_TYPE_LEN); + if (conf.unknowns_log) + LOG_UNKNOWNS (("%-7s%s\n", "[OS]", str)); + return alloc_string ("Unknown"); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/goaccess-1.4.4/src/options.c new/goaccess-1.4.6/src/options.c --- old/goaccess-1.4.4/src/options.c 2021-01-20 01:22:03.000000000 +0100 +++ new/goaccess-1.4.6/src/options.c 2021-02-28 22:56:57.000000000 +0100 @@ -109,6 +109,7 @@ {"ignore-statics" , required_argument , 0 , 0 } , {"ignore-status" , required_argument , 0 , 0 } , {"invalid-requests" , required_argument , 0 , 0 } , + {"unknowns-log" , required_argument , 0 , 0 } , {"json-pretty-print" , no_argument , 0 , 0 } , {"keep-last" , required_argument , 0 , 0 } , {"html-refresh" , required_argument , 0 , 0 } , @@ -214,6 +215,7 @@ " -S --log-size=<number> - Specify the log size, useful when piping in logs.\n" " --invalid-requests=<filename> - Log invalid requests to the specified file.\n" " --no-global-config - Don't load global configuration file.\n" + " --unknowns-log=<filename> - Log unknown browsers and OSs to the specified file.\n" "\n" "" /* Parse Options */ @@ -460,6 +462,12 @@ invalid_log_open (conf.invalid_requests_log); } + /* unknowns */ + if (!strcmp ("unknowns-log", name)) { + conf.unknowns_log = oarg; + unknowns_log_open(conf.unknowns_log); + } + /* output file */ if (!strcmp ("output", name)) set_array_opt (oarg, conf.output_formats, &conf.output_format_idx, MAX_OUTFORMATS); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/goaccess-1.4.4/src/parser.c new/goaccess-1.4.6/src/parser.c --- old/goaccess-1.4.4/src/parser.c 2021-01-21 02:00:45.000000000 +0100 +++ new/goaccess-1.4.6/src/parser.c 2021-02-28 22:56:57.000000000 +0100 @@ -1688,9 +1688,6 @@ /* iterate over the log format */ for (p = lfmt; *p; p++) { - /* advance to the first unescaped delim */ - if (*p == '\\') - continue; if (*p == '%') { perc++; continue; @@ -1699,6 +1696,8 @@ tilde++; continue; } + if (*str == '\n') + return 0; if (tilde && *p != '\0') { if ((str == NULL) || (*str == '\0')) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/goaccess-1.4.4/src/pdjson.c new/goaccess-1.4.6/src/pdjson.c --- old/goaccess-1.4.4/src/pdjson.c 2021-01-20 01:22:03.000000000 +0100 +++ new/goaccess-1.4.6/src/pdjson.c 2021-02-14 23:21:38.000000000 +0100 @@ -146,7 +146,8 @@ static enum json_type is_match (json_stream * json, const char *pattern, enum json_type type) { int c; - for (const char *p = pattern; *p; p++) { + const char *p = NULL; + for (p = pattern; *p; p++) { if (*p != (c = json->source.get (&json->source))) { json_error (json, "expected '%c' instead of byte '%c'", *p, c); return JSON_ERROR; @@ -263,8 +264,9 @@ read_unicode_cp (json_stream * json) { long cp = 0; int shift = 12; + size_t i = 0; - for (size_t i = 0; i < 4; i++) { + for (i = 0; i < 4; i++) { int c = json->source.get (&json->source); int hc; @@ -796,8 +798,9 @@ enum json_type type = json_next (json); size_t cnt_arr = 0; size_t cnt_obj = 0; + enum json_type skip; - for (enum json_type skip = type;; skip = json_next (json)) { + for (skip = type;; skip = json_next (json)) { if (skip == JSON_ERROR || skip == JSON_DONE) return skip; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/goaccess-1.4.4/src/settings.c new/goaccess-1.4.6/src/settings.c --- old/goaccess-1.4.4/src/settings.c 2021-01-20 01:22:03.000000000 +0100 +++ new/goaccess-1.4.6/src/settings.c 2021-02-28 23:51:49.000000000 +0100 @@ -70,18 +70,18 @@ "%h %^[%d:%t %^] \"%r\" %s %b", /* CLF */ "%v:%^ %h %^[%d:%t %^] \"%r\" %s %b", /* CLF+VHost */ "%d %t %^ %m %U %q %^ %^ %h %u %R %s %^ %^ %L", /* W3C */ - "%d\\t%t\\t%^\\t%b\\t%h\\t%m\\t%^\\t%r\\t%s\\t%R\\t%u\\t%^", /* CloudFront */ + "%d\\t%t\\t%^\\t%b\\t%h\\t%m\\t%v\\t%U\\t%s\\t%R\\t%u\\t%q\\t%^\\t%C\\t%^\\t%^\\t%^\\t%^\\t%T\\t%^\\t%K\\t%k\\t%^\\t%H\\t%^", /* CloudFront */ "\"%x\",\"%h\",%^,%^,\"%m\",\"%U\",\"%s\",%^,\"%b\",\"%D\",%^,\"%R\",\"%u\"", /* Cloud Storage */ "%^ %dT%t.%^ %v %h:%^ %^ %T %^ %^ %s %^ %b %^ \"%r\" \"%u\" %^", /* AWS Elastic Load Balancing */ "%^ %^ %^ %v %^: %x.%^ %~%L %h %^/%s %b %m %U", /* Squid Native */ "%^ %v [%d:%t %^] %h %^\"%r\" %s %^ %b %^ %L %^ \"%R\" \"%u\"", /* Amazon S3 */ /* Caddy JSON */ - "{\"ts\":\"%x.%^\",\"request\":{\"remote_addr\":\"%h:%^\",\"proto\":\"%H\"," - "\"method\":\"%m\",\"host\":\"%v\",\"uri\":\"%U\"," - "\"headers\":{\"User-Agent\":[\"%u\"]},\"tls\":{\"cipher_suite\":\"%k\"," - "\"proto\":\"%K\"}},\"duration\":\"%T\",\"size\":\"%b\",\"status\":\"%s\"," - "\"resp_headers\":{\"Content-Type\":[\"%M\"]}}" + "{ \"ts\": \"%x.%^\", \"request\": { \"remote_addr\": \"%h:%^\", \"proto\":" + "\"%H\", \"method\": \"%m\", \"host\": \"%v\", \"uri\": \"%U\", \"headers\": {" + "\"User-Agent\": [\"%u\"], \"Referer\": [\"%R\"] }, \"tls\": { \"cipher_suite\":" + "\"%k\", \"proto\": \"%K\" } }, \"duration\": \"%T\", \"size\": \"%b\"," + "\"status\": \"%s\", \"resp_headers\": { \"Content-Type\": [\"%M\"] } }" }; static const GPreConfTime times = { @@ -699,6 +699,8 @@ json_stream json; json_open_string (&json, fmt); + /* ensure we use strict JSON when determining if we're using a JSON format */ + json_set_streaming (&json, false); do { t = json_next (&json); switch (t) { @@ -803,7 +805,7 @@ ws_append_str (&key, json_get_string (&json, &len)); } /* val */ - else if (ctx == JSON_ARRAY || ((level % 2) == 0 && ctx != JSON_ARRAY)) { + else if (key && (ctx == JSON_ARRAY || ((level % 2) == 0 && ctx != JSON_ARRAY))) { val = xstrdup (json_get_string (&json, &len)); if ((ret = (*cb) (ptr_data, key, val))) goto clean; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/goaccess-1.4.4/src/settings.h new/goaccess-1.4.6/src/settings.h --- old/goaccess-1.4.4/src/settings.h 2021-01-20 01:22:03.000000000 +0100 +++ new/goaccess-1.4.6/src/settings.h 2021-02-28 22:56:57.000000000 +0100 @@ -122,6 +122,7 @@ const char *html_prefs; /* default HTML JSON preferences */ const char *html_report_title; /* report title */ const char *invalid_requests_log; /* invalid lines log path */ + const char *unknowns_log; /* unknown browsers/OSs log path */ const char *pidfile; /* daemonize pid file path */ const char *browsers_file; /* browser's file path */ const char *db_path; /* db path to files */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/goaccess-1.4.4/src/sort.c new/goaccess-1.4.6/src/sort.c --- old/goaccess-1.4.4/src/sort.c 2021-01-20 01:22:03.000000000 +0100 +++ new/goaccess-1.4.6/src/sort.c 2021-02-28 22:56:57.000000000 +0100 @@ -155,8 +155,8 @@ const GHolderItem *ia = a; const GHolderItem *ib = b; - int va = ia->metrics->hits; - int vb = ib->metrics->hits; + uint64_t va = ia->metrics->hits; + uint64_t vb = ib->metrics->hits; return (va < vb) - (va > vb); } @@ -167,8 +167,8 @@ const GHolderItem *ia = a; const GHolderItem *ib = b; - int va = ia->metrics->hits; - int vb = ib->metrics->hits; + uint64_t va = ia->metrics->hits; + uint64_t vb = ib->metrics->hits; return (va > vb) - (va < vb); } @@ -179,8 +179,8 @@ const GHolderItem *ia = a; const GHolderItem *ib = b; - int va = ia->metrics->visitors; - int vb = ib->metrics->visitors; + uint64_t va = ia->metrics->visitors; + uint64_t vb = ib->metrics->visitors; return (va < vb) - (va > vb); } @@ -191,8 +191,8 @@ const GHolderItem *ia = a; const GHolderItem *ib = b; - int va = ia->metrics->visitors; - int vb = ib->metrics->visitors; + uint64_t va = ia->metrics->visitors; + uint64_t vb = ib->metrics->visitors; return (va > vb) - (va < vb); } @@ -203,8 +203,8 @@ const GRawDataItem *ia = a; const GRawDataItem *ib = b; - int va = ia->hits; - int vb = ib->hits; + uint64_t va = ia->hits; + uint64_t vb = ib->hits; return (va < vb) - (va > vb); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/goaccess-1.4.4/src/ui.c new/goaccess-1.4.6/src/ui.c --- old/goaccess-1.4.4/src/ui.c 2021-01-20 01:22:03.000000000 +0100 +++ new/goaccess-1.4.6/src/ui.c 2021-02-28 22:56:57.000000000 +0100 @@ -1360,7 +1360,9 @@ if (!log_format) log_format = get_input_log_format (); - cstm_log = input_string (win, 12, 2, strlen (log_format), log_format, 0, 0); + cstm_log = + input_string (win, 12, 2, log_format ? strlen (log_format) : CONF_MAX_LEN_DLG, + log_format, 0, 0); if (cstm_log != NULL && *cstm_log != '\0') { if (log_format) free (log_format); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/goaccess-1.4.4/src/ui.h new/goaccess-1.4.6/src/ui.h --- old/goaccess-1.4.4/src/ui.h 2021-01-20 01:22:03.000000000 +0100 +++ new/goaccess-1.4.6/src/ui.h 2021-02-28 22:56:57.000000000 +0100 @@ -109,6 +109,7 @@ #define CONF_MENU_Y 4 #define CONF_WIN_H 20 #define CONF_WIN_W 71 +#define CONF_MAX_LEN_DLG 512 /* FIND DIALOG */ #define FIND_DLG_HEIGHT 8 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/goaccess-1.4.4/src/util.c new/goaccess-1.4.6/src/util.c --- old/goaccess-1.4.4/src/util.c 2021-01-20 01:22:03.000000000 +0100 +++ new/goaccess-1.4.6/src/util.c 2021-02-28 22:56:57.000000000 +0100 @@ -504,20 +504,29 @@ unsigned long long ts = 0; int us = strcmp ("%f", fmt) == 0; int ms = strcmp ("%*", fmt) == 0; +#if !defined(__GLIBC__) + int se = strcmp ("%s", fmt) == 0; +#endif + time_t seconds = 0; if (str == NULL || *str == '\0' || fmt == NULL || *fmt == '\0') return 1; /* check if char string needs to be converted from milli/micro seconds */ + /* note that MUSL doesn't have %s under strptime(3) */ +#if !defined(__GLIBC__) + if (se || us || ms) { +#else if (us || ms) { +#endif errno = 0; ts = strtoull (str, &sEnd, 10); if (str == sEnd || *sEnd != '\0' || errno == ERANGE) return 1; - seconds = (us) ? ts / SECS : ts / MILS; + seconds = (us) ? ts / SECS : ((ms) ? ts / MILS : ts); /* if GMT needed, gmtime_r instead of localtime_r. */ localtime_r (&seconds, tm);
