Re: [update] goaccess 1.4

2020-08-07 Thread Landry Breuil
On Sat, Aug 08, 2020 at 12:09:52AM +0300, Kirill Bychkov wrote:
> On Fri, August 7, 2020 09:05, Landry Breuil wrote:
> > On Fri, Aug 07, 2020 at 12:33:49AM +0300, Kirill Bychkov wrote:
> >> Missed your previous mail.
> >> I'm OK with moving config to /etc/goaccess/ as upstream have done.
> >> Probably browsers.list could be @sampled here with the tweak to
> >> config file setting its default location.
> >>
> >
> > and here's a diff @sampling both files under ${SYSCONFDIR}/goaccess/ - i
> > wouldnt modify the default config file, as it doesnt seem to add much
> > value by default, but at least browsers.list is here for users to
> > discover it.
> >
> > Landry
> >
> 
> To ease updates.
> OK?

looks ok, i havent done one in a while so unsure if a @conflict is
needed (dont think so) - thanks, completely forgot !

Landry



Re: [update] goaccess 1.4

2020-08-07 Thread Kirill Bychkov
On Fri, August 7, 2020 09:05, Landry Breuil wrote:
> On Fri, Aug 07, 2020 at 12:33:49AM +0300, Kirill Bychkov wrote:
>> Missed your previous mail.
>> I'm OK with moving config to /etc/goaccess/ as upstream have done.
>> Probably browsers.list could be @sampled here with the tweak to
>> config file setting its default location.
>>
>
> and here's a diff @sampling both files under ${SYSCONFDIR}/goaccess/ - i
> wouldnt modify the default config file, as it doesnt seem to add much
> value by default, but at least browsers.list is here for users to
> discover it.
>
> Landry
>

To ease updates.
OK?
Index: Makefile
===
RCS file: /cvs/ports/www/goaccess/Makefile,v
retrieving revision 1.25
diff -u -p -u -r1.25 Makefile
--- Makefile7 Aug 2020 15:14:54 -   1.25
+++ Makefile7 Aug 2020 21:07:49 -
@@ -3,6 +3,7 @@
 COMMENT =  realtime console web log analyzer

 DISTNAME = goaccess-1.4
+REVISION = 0

 CATEGORIES =   www

cvs server: Diffing patches
cvs server: Diffing pkg
Index: pkg/PLIST
===
RCS file: /cvs/ports/www/goaccess/pkg/PLIST,v
retrieving revision 1.6
diff -u -p -u -r1.6 PLIST
--- pkg/PLIST   7 Aug 2020 15:14:54 -   1.6
+++ pkg/PLIST   7 Aug 2020 21:07:49 -
@@ -1,4 +1,5 @@
 @comment $OpenBSD: PLIST,v 1.6 2020/08/07 15:14:54 landry Exp $
+@pkgpath  www/goaccess,tokyocabinet
 @bin bin/goaccess
 @man man/man1/goaccess.1
 share/examples/goaccess/



Re: [update] goaccess 1.4

2020-08-07 Thread Kirill Bychkov
On Fri, August 7, 2020 09:05, Landry Breuil wrote:
> On Fri, Aug 07, 2020 at 12:33:49AM +0300, Kirill Bychkov wrote:
>> Missed your previous mail.
>> I'm OK with moving config to /etc/goaccess/ as upstream have done.
>> Probably browsers.list could be @sampled here with the tweak to
>> config file setting its default location.
>>
>
> and here's a diff @sampling both files under ${SYSCONFDIR}/goaccess/ - i
> wouldnt modify the default config file, as it doesnt seem to add much
> value by default, but at least browsers.list is here for users to
> discover it.
>
> Landry
>

Works as expected after moving /etc/goaccess.conf to /etc/goaccess/,
thanks.
OK kirby@



Re: [update] goaccess 1.4

2020-08-07 Thread Landry Breuil
On Fri, Aug 07, 2020 at 12:33:49AM +0300, Kirill Bychkov wrote:
> Missed your previous mail.
> I'm OK with moving config to /etc/goaccess/ as upstream have done.
> Probably browsers.list could be @sampled here with the tweak to
> config file setting its default location.
> 

and here's a diff @sampling both files under ${SYSCONFDIR}/goaccess/ - i
wouldnt modify the default config file, as it doesnt seem to add much
value by default, but at least browsers.list is here for users to
discover it.

Landry
Index: Makefile
===
RCS file: /cvs/ports/www/goaccess/Makefile,v
retrieving revision 1.24
diff -u -r1.24 Makefile
--- Makefile10 Aug 2019 21:24:31 -  1.24
+++ Makefile7 Aug 2020 06:00:59 -
@@ -2,8 +2,7 @@
 
 COMMENT =  realtime console web log analyzer
 
-DISTNAME = goaccess-1.3
-REVISION = 2
+DISTNAME = goaccess-1.4
 
 CATEGORIES =   www
 
@@ -34,14 +33,5 @@
 CONFIGURE_ENV =CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib"
 FAKE_FLAGS =   confdir="${PREFIX}/share/examples/goaccess"
-
-FLAVORS =  tokyocabinet
-FLAVOR ?=
-
-.if ${FLAVOR:Mtokyocabinet}
-WANTLIB += bz2 tokyocabinet z
-LIB_DEPENDS += databases/tokyocabinet
-CONFIGURE_ARGS +=  --enable-tcb=btree
-.endif
 
 .include 
Index: distinfo
===
RCS file: /cvs/ports/www/goaccess/distinfo,v
retrieving revision 1.13
diff -u -r1.13 distinfo
--- distinfo28 Nov 2018 19:40:27 -  1.13
+++ distinfo7 Aug 2020 06:00:59 -
@@ -1,2 +1,2 @@
-SHA256 (goaccess-1.3.tar.gz) = jHdcXCS/hakz/W8SSQBIRzQtZUKqUz5OwCqve+Qde5s=
-SIZE (goaccess-1.3.tar.gz) = 541374
+SHA256 (goaccess-1.4.tar.gz) = 6Pu5/4UlVtct/Z8dATS6B1zltMQSiZAqb04Nl8aTd74=
+SIZE (goaccess-1.4.tar.gz) = 595264
Index: patches/patch-config_goaccess_conf
===
RCS file: /cvs/ports/www/goaccess/patches/patch-config_goaccess_conf,v
retrieving revision 1.1
diff -u -r1.1 patch-config_goaccess_conf
--- patches/patch-config_goaccess_conf  20 Jan 2019 13:36:51 -  1.1
+++ patches/patch-config_goaccess_conf  7 Aug 2020 06:00:59 -
@@ -20,38 +20,15 @@
  ##
  # Date Format Options (required)
  ##
-@@ -653,31 +663,10 @@ static-file .flv
- #std-geoip false
- 
- # Specify path to GeoIP database file. i.e., GeoLiteCity.dat
--# .dat file needs to be downloaded from maxmind.com.
-+# Free GeoLite2 databases are available in the geolite2-city/country packages.
+@@ -698,7 +708,10 @@ static-file .flv
+ # Download the GeoLite2-Country.mmdb.gz
+ # gunzip GeoLite2-Country.mmdb.gz
  #
--# For IPv4 City database:
--# wget -N 
http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
--# gunzip GeoLiteCity.dat.gz
--#
--# For IPv6 City database:
--# wget -N 
http://geolite.maxmind.com/download/geoip/database/GeoLiteCityv6-beta/GeoLiteCityv6.dat.gz
--# gunzip GeoLiteCityv6.dat.gz
--#
--# For IPv6 Country database:
--# wget -N http://geolite.maxmind.com/download/geoip/database/GeoIPv6.dat.gz
--# gunzip GeoIPv6.dat.gz
--#
--# For GeoIP2 City database:
--# wget -N 
http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.mmdb.gz
--# gunzip GeoLite2-City.mmdb.gz
--#
--# For GeoIP2 Country database:
--# wget -N 
http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.mmdb.gz
--# gunzip GeoLite2-Country.mmdb.gz
--#
--# Note: `geoip-city-data` is an alias of `geoip-database`
--#
 -#geoip-database /usr/local/share/GeoIP/GeoLiteCity.dat
++
++# Free GeoLite2 databases are available in the geolite2-city/country packages.
 +#geoip-database /var/db/GeoIP/GeoLite2-City.mmdb
 +geoip-database /var/db/GeoIP/GeoLite2-Country.mmdb
  
  ##
- # Tokyo Cabinet Options
+ # Persistence Options
Index: patches/patch-src_browsers_c
===
RCS file: /cvs/ports/www/goaccess/patches/patch-src_browsers_c,v
retrieving revision 1.1
diff -u -r1.1 patch-src_browsers_c
--- patches/patch-src_browsers_c20 Jan 2019 13:36:51 -  1.1
+++ patches/patch-src_browsers_c7 Aug 2020 06:00:59 -
@@ -5,7 +5,7 @@
 Index: src/browsers.c
 --- src/browsers.c.orig
 +++ src/browsers.c
-@@ -116,6 +116,8 @@ static const char *browsers[][2] = {
+@@ -114,6 +114,8 @@ static const char *browsers[][2] = {
{"MicroMessenger", "Others"},
{"Apache", "Others"},
{"JOSM", "Others"},
@@ -14,10 +14,10 @@
  
/* Feed-reader-as-a-service */
{"AppleNewsBot", "Feeds"},
-@@ -183,6 +185,7 @@ static const char *browsers[][2] = {
-   {"Python", "Crawlers"},
-   {"LinkedIn", "Crawlers"},
+@@ -189,6 +191,7 @@ static const char *browsers[][2] = {
{"Microsoft-WebDAV", "Crawlers"},
+   

Re: [update] goaccess 1.4

2020-08-06 Thread Kirill Bychkov
On Thu, August 6, 2020 13:49, Landry Breuil wrote:
> On Thu, Aug 06, 2020 at 12:18:50PM +0300, Kirill Bychkov wrote:
>> On Sun, August 2, 2020 18:24, Paco Esteban wrote:
>> > On Sat, 01 Aug 2020, Stuart Henderson wrote:
>> >
>> >> On 2020/08/01 17:40, Paco Esteban wrote:
>> >> > On Sat, 01 Aug 2020, Landry Breuil wrote:
>> >> >
>> >> > > Hi,
>> >> > >
>> >> > > here's an update to goaccess 1.4 (cf
>> >> > > http://goaccess.io/release-notes#release-1.4), drops the tokyocabinet
>> >> > > flavor (dep dropped upstream), removed some patches from upstream, i
>> >> > > have to admit i'm a bit puzzled by the src/settings.c patch, upstream
>> >> > > code was modified a bit there.
>> >> > >
>> >> > > feedback/testing welcome !
>> >> >
>> >> > Tested with combined logs from httpd.  On the config file I've
>> >> > uncommented:
>> >> >
>> >> > # httpd(8) combined log format
>> >> > date-format %d/%b/%Y
>> >> > time-format %T %z
>> >> > log-format %v %h %^ %^ [%d:%t] "%r" %s %b "%R" "%u"
>> >> >
>> >> > It crashes for me with this error:
>> >> >
>> >> > GoAccess - version 1.4 - Aug  1 2020 17:35:48
>> >> > Config file: No config file used
>> >> >
>> >> > Fatal error has occurred
>> >> > Error occurred at: src/goaccess.c - set_curses - 1411
>> >> > No time format was found on your conf file.
>> >> >
>> >> > I have to explicitly specify the config file with
>> >> > `--config-file=/etc/goaccess.conf`.  After that it works fine.  Could
>> it
>> >> > be related to that patch that you were talking about ?
>> >> >
>> >> > Cheers,
>> >> >
>> >> > --
>> >> > Paco Esteban.
>> >> > 0x5818130B8A6DBC03
>> >>
>> >> Oh, sounds like they messed up the fix afterwards then :(
>> >
>> > I think I've found the issue.  I had to add a new patch to src/util.c.
>> > They were trying to get the config file from
>> > ${SYSCONFDIR}/goaccess/goaccess.conf and we put it on
>> > ${SYSCONFDIR}/goaccess.conf
>> >
>> > Here's the updated patch.  With this it works fine for me on amd64.
>> >
>>
>> Hi,
>> Thanks for figuring this out. It works as before, using
>> my old config.
>> ok kirby@
>
> Just to make sure i got it right, are you okay with the patch changing
> the location upstream expects the config ? that changed in
> https://github.com/allinurl/goaccess/commit/6efcac6179859a504d60a7b96e2549e6da853c95
> where they default to a subdir of sysconfdir, and the code that looks
> for the config file changed in
> https://github.com/allinurl/goaccess/commit/91d3adaddd0a53cd23373f2ee1480de610bc4439.
>
> paco's patch would revert the latter. Isnt it cleaner to just modify
> where we @sample the default config file, adding a note to current.html
> telling users the default config file location changed ?
>
> Landry
>
Missed your previous mail.
I'm OK with moving config to /etc/goaccess/ as upstream have done.
Probably browsers.list could be @sampled here with the tweak to
config file setting its default location.



Re: [update] goaccess 1.4

2020-08-06 Thread Landry Breuil
On Thu, Aug 06, 2020 at 12:18:50PM +0300, Kirill Bychkov wrote:
> On Sun, August 2, 2020 18:24, Paco Esteban wrote:
> > On Sat, 01 Aug 2020, Stuart Henderson wrote:
> >
> >> On 2020/08/01 17:40, Paco Esteban wrote:
> >> > On Sat, 01 Aug 2020, Landry Breuil wrote:
> >> >
> >> > > Hi,
> >> > >
> >> > > here's an update to goaccess 1.4 (cf
> >> > > http://goaccess.io/release-notes#release-1.4), drops the tokyocabinet
> >> > > flavor (dep dropped upstream), removed some patches from upstream, i
> >> > > have to admit i'm a bit puzzled by the src/settings.c patch, upstream
> >> > > code was modified a bit there.
> >> > >
> >> > > feedback/testing welcome !
> >> >
> >> > Tested with combined logs from httpd.  On the config file I've
> >> > uncommented:
> >> >
> >> > # httpd(8) combined log format
> >> > date-format %d/%b/%Y
> >> > time-format %T %z
> >> > log-format %v %h %^ %^ [%d:%t] "%r" %s %b "%R" "%u"
> >> >
> >> > It crashes for me with this error:
> >> >
> >> > GoAccess - version 1.4 - Aug  1 2020 17:35:48
> >> > Config file: No config file used
> >> >
> >> > Fatal error has occurred
> >> > Error occurred at: src/goaccess.c - set_curses - 1411
> >> > No time format was found on your conf file.
> >> >
> >> > I have to explicitly specify the config file with
> >> > `--config-file=/etc/goaccess.conf`.  After that it works fine.  Could it
> >> > be related to that patch that you were talking about ?
> >> >
> >> > Cheers,
> >> >
> >> > --
> >> > Paco Esteban.
> >> > 0x5818130B8A6DBC03
> >>
> >> Oh, sounds like they messed up the fix afterwards then :(
> >
> > I think I've found the issue.  I had to add a new patch to src/util.c.
> > They were trying to get the config file from
> > ${SYSCONFDIR}/goaccess/goaccess.conf and we put it on
> > ${SYSCONFDIR}/goaccess.conf
> >
> > Here's the updated patch.  With this it works fine for me on amd64.
> >
> 
> Hi,
> Thanks for figuring this out. It works as before, using
> my old config.
> ok kirby@

Just to make sure i got it right, are you okay with the patch changing
the location upstream expects the config ? that changed in
https://github.com/allinurl/goaccess/commit/6efcac6179859a504d60a7b96e2549e6da853c95
where they default to a subdir of sysconfdir, and the code that looks
for the config file changed in
https://github.com/allinurl/goaccess/commit/91d3adaddd0a53cd23373f2ee1480de610bc4439.

paco's patch would revert the latter. Isnt it cleaner to just modify
where we @sample the default config file, adding a note to current.html
telling users the default config file location changed ?

Landry



Re: [update] goaccess 1.4

2020-08-06 Thread Kirill Bychkov
On Sun, August 2, 2020 18:24, Paco Esteban wrote:
> On Sat, 01 Aug 2020, Stuart Henderson wrote:
>
>> On 2020/08/01 17:40, Paco Esteban wrote:
>> > On Sat, 01 Aug 2020, Landry Breuil wrote:
>> >
>> > > Hi,
>> > >
>> > > here's an update to goaccess 1.4 (cf
>> > > http://goaccess.io/release-notes#release-1.4), drops the tokyocabinet
>> > > flavor (dep dropped upstream), removed some patches from upstream, i
>> > > have to admit i'm a bit puzzled by the src/settings.c patch, upstream
>> > > code was modified a bit there.
>> > >
>> > > feedback/testing welcome !
>> >
>> > Tested with combined logs from httpd.  On the config file I've
>> > uncommented:
>> >
>> > # httpd(8) combined log format
>> > date-format %d/%b/%Y
>> > time-format %T %z
>> > log-format %v %h %^ %^ [%d:%t] "%r" %s %b "%R" "%u"
>> >
>> > It crashes for me with this error:
>> >
>> > GoAccess - version 1.4 - Aug  1 2020 17:35:48
>> > Config file: No config file used
>> >
>> > Fatal error has occurred
>> > Error occurred at: src/goaccess.c - set_curses - 1411
>> > No time format was found on your conf file.
>> >
>> > I have to explicitly specify the config file with
>> > `--config-file=/etc/goaccess.conf`.  After that it works fine.  Could it
>> > be related to that patch that you were talking about ?
>> >
>> > Cheers,
>> >
>> > --
>> > Paco Esteban.
>> > 0x5818130B8A6DBC03
>>
>> Oh, sounds like they messed up the fix afterwards then :(
>
> I think I've found the issue.  I had to add a new patch to src/util.c.
> They were trying to get the config file from
> ${SYSCONFDIR}/goaccess/goaccess.conf and we put it on
> ${SYSCONFDIR}/goaccess.conf
>
> Here's the updated patch.  With this it works fine for me on amd64.
>

Hi,
Thanks for figuring this out. It works as before, using
my old config.
ok kirby@

> diff refs/heads/master refs/heads/new-goaccess
> blob - b303baf12ea0cb2bae267d2ffe28f8f5879f264b
> blob + f49e11b52834371f140af6d054c093beafe1ac04
> --- www/goaccess/Makefile
> +++ www/goaccess/Makefile
> @@ -2,8 +2,7 @@
>
>  COMMENT =realtime console web log analyzer
>
> -DISTNAME =   goaccess-1.3
> -REVISION =   2
> +DISTNAME =   goaccess-1.4
>
>  CATEGORIES = www
>
> @@ -34,14 +33,5 @@ CONFIGURE_ARGS =   --enable-geoip=mmdb \
>  CONFIGURE_ENV =  CPPFLAGS="-I${LOCALBASE}/include" \
>   LDFLAGS="-L${LOCALBASE}/lib"
>  FAKE_FLAGS = confdir="${PREFIX}/share/examples/goaccess"
> -
> -FLAVORS =tokyocabinet
> -FLAVOR ?=
> -
> -.if ${FLAVOR:Mtokyocabinet}
> -WANTLIB +=   bz2 tokyocabinet z
> -LIB_DEPENDS +=   databases/tokyocabinet
> -CONFIGURE_ARGS +=--enable-tcb=btree
> -.endif
>
>  .include 
> blob - df1345bc846efcdcb4f2cb2b9da05c2a03fe532c
> blob + b3eae565661ce3a4dbb95601c2ef686e5b78dfce
> --- www/goaccess/distinfo
> +++ www/goaccess/distinfo
> @@ -1,2 +1,2 @@
> -SHA256 (goaccess-1.3.tar.gz) = jHdcXCS/hakz/W8SSQBIRzQtZUKqUz5OwCqve+Qde5s=
> -SIZE (goaccess-1.3.tar.gz) = 541374
> +SHA256 (goaccess-1.4.tar.gz) = 6Pu5/4UlVtct/Z8dATS6B1zltMQSiZAqb04Nl8aTd74=
> +SIZE (goaccess-1.4.tar.gz) = 595264
> blob - b84ac32c8ba78bfddcc3b638970a30fd65d6a600
> blob + 357c5b22171025f049dfbd463e88c01b24f45e28
> --- www/goaccess/patches/patch-config_goaccess_conf
> +++ www/goaccess/patches/patch-config_goaccess_conf
> @@ -20,38 +20,15 @@ Index: config/goaccess.conf
>   ##
>   # Date Format Options (required)
>   ##
> -@@ -653,31 +663,10 @@ static-file .flv
> - #std-geoip false
> -
> - # Specify path to GeoIP database file. i.e., GeoLiteCity.dat
> --# .dat file needs to be downloaded from maxmind.com.
> -+# Free GeoLite2 databases are available in the geolite2-city/country
> packages.
> +@@ -698,7 +708,10 @@ static-file .flv
> + # Download the GeoLite2-Country.mmdb.gz
> + # gunzip GeoLite2-Country.mmdb.gz
>   #
> --# For IPv4 City database:
> --# wget -N
> http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
> --# gunzip GeoLiteCity.dat.gz
> --#
> --# For IPv6 City database:
> --# wget -N
> http://geolite.maxmind.com/download/geoip/database/GeoLiteCityv6-beta/GeoLiteCityv6.dat.gz
> --# gunzip GeoLiteCityv6.dat.gz
> --#
> --# For IPv6 Country database:
> --# wget -N http://geolite.maxmind.com/download/geoip/database/GeoIPv6.dat.gz
> --# gunzip GeoIPv6.dat.gz
> --#
> --# For GeoIP2 City database:
> --# wget -N
> http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.mmdb.gz
> --# gunzip GeoLite2-City.mmdb.gz
> --#
> --# For GeoIP2 Country database:
> --# wget -N
> http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.mmdb.gz
> --# gunzip GeoLite2-Country.mmdb.gz
> --#
> --# Note: `geoip-city-data` is an alias of `geoip-database`
> --#
>  -#geoip-database /usr/local/share/GeoIP/GeoLiteCity.dat
> ++
> ++# Free GeoLite2 databases are available in the geolite2-city/country
> packages.
>  +#geoip-database 

Re: [update] goaccess 1.4

2020-08-02 Thread Landry Breuil
On Sun, Aug 02, 2020 at 05:24:39PM +0200, Paco Esteban wrote:
> On Sat, 01 Aug 2020, Stuart Henderson wrote:
> 
> > On 2020/08/01 17:40, Paco Esteban wrote:
> > > On Sat, 01 Aug 2020, Landry Breuil wrote:
> > > 
> > > > Hi,
> > > > 
> > > > here's an update to goaccess 1.4 (cf
> > > > http://goaccess.io/release-notes#release-1.4), drops the tokyocabinet
> > > > flavor (dep dropped upstream), removed some patches from upstream, i
> > > > have to admit i'm a bit puzzled by the src/settings.c patch, upstream
> > > > code was modified a bit there.
> > > > 
> > > > feedback/testing welcome !
> > > 
> > > Tested with combined logs from httpd.  On the config file I've
> > > uncommented:
> > > 
> > > # httpd(8) combined log format
> > > date-format %d/%b/%Y
> > > time-format %T %z
> > > log-format %v %h %^ %^ [%d:%t] "%r" %s %b "%R" "%u"
> > > 
> > > It crashes for me with this error:
> > > 
> > > GoAccess - version 1.4 - Aug  1 2020 17:35:48
> > > Config file: No config file used
> > > 
> > > Fatal error has occurred
> > > Error occurred at: src/goaccess.c - set_curses - 1411
> > > No time format was found on your conf file.
> > > 
> > > I have to explicitly specify the config file with
> > > `--config-file=/etc/goaccess.conf`.  After that it works fine.  Could it
> > > be related to that patch that you were talking about ?
> > > 
> > > Cheers,
> > > 
> > > -- 
> > > Paco Esteban.
> > > 0x5818130B8A6DBC03
> > 
> > Oh, sounds like they messed up the fix afterwards then :(
> 
> I think I've found the issue.  I had to add a new patch to src/util.c.
> They were trying to get the config file from
> ${SYSCONFDIR}/goaccess/goaccess.conf and we put it on
> ${SYSCONFDIR}/goaccess.conf
> 
> Here's the updated patch.  With this it works fine for me on amd64.

Sure, but maybe we should follow upstream and @sample the file in
${SYSCONFDIR}/goaccess/goaccess.conf as it was apparently a deliberate
change in
https://github.com/allinurl/goaccess/commit/91d3adaddd0a53cd23373f2ee1480de610bc4439#
..



Re: [update] goaccess 1.4

2020-08-02 Thread Paco Esteban
On Sat, 01 Aug 2020, Stuart Henderson wrote:

> On 2020/08/01 17:40, Paco Esteban wrote:
> > On Sat, 01 Aug 2020, Landry Breuil wrote:
> > 
> > > Hi,
> > > 
> > > here's an update to goaccess 1.4 (cf
> > > http://goaccess.io/release-notes#release-1.4), drops the tokyocabinet
> > > flavor (dep dropped upstream), removed some patches from upstream, i
> > > have to admit i'm a bit puzzled by the src/settings.c patch, upstream
> > > code was modified a bit there.
> > > 
> > > feedback/testing welcome !
> > 
> > Tested with combined logs from httpd.  On the config file I've
> > uncommented:
> > 
> > # httpd(8) combined log format
> > date-format %d/%b/%Y
> > time-format %T %z
> > log-format %v %h %^ %^ [%d:%t] "%r" %s %b "%R" "%u"
> > 
> > It crashes for me with this error:
> > 
> > GoAccess - version 1.4 - Aug  1 2020 17:35:48
> > Config file: No config file used
> > 
> > Fatal error has occurred
> > Error occurred at: src/goaccess.c - set_curses - 1411
> > No time format was found on your conf file.
> > 
> > I have to explicitly specify the config file with
> > `--config-file=/etc/goaccess.conf`.  After that it works fine.  Could it
> > be related to that patch that you were talking about ?
> > 
> > Cheers,
> > 
> > -- 
> > Paco Esteban.
> > 0x5818130B8A6DBC03
> 
> Oh, sounds like they messed up the fix afterwards then :(

I think I've found the issue.  I had to add a new patch to src/util.c.
They were trying to get the config file from
${SYSCONFDIR}/goaccess/goaccess.conf and we put it on
${SYSCONFDIR}/goaccess.conf

Here's the updated patch.  With this it works fine for me on amd64.

diff refs/heads/master refs/heads/new-goaccess
blob - b303baf12ea0cb2bae267d2ffe28f8f5879f264b
blob + f49e11b52834371f140af6d054c093beafe1ac04
--- www/goaccess/Makefile
+++ www/goaccess/Makefile
@@ -2,8 +2,7 @@
 
 COMMENT =  realtime console web log analyzer
 
-DISTNAME = goaccess-1.3
-REVISION = 2
+DISTNAME = goaccess-1.4
 
 CATEGORIES =   www
 
@@ -34,14 +33,5 @@ CONFIGURE_ARGS = --enable-geoip=mmdb \
 CONFIGURE_ENV =CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib"
 FAKE_FLAGS =   confdir="${PREFIX}/share/examples/goaccess"
-
-FLAVORS =  tokyocabinet
-FLAVOR ?=
-
-.if ${FLAVOR:Mtokyocabinet}
-WANTLIB += bz2 tokyocabinet z
-LIB_DEPENDS += databases/tokyocabinet
-CONFIGURE_ARGS +=  --enable-tcb=btree
-.endif
 
 .include 
blob - df1345bc846efcdcb4f2cb2b9da05c2a03fe532c
blob + b3eae565661ce3a4dbb95601c2ef686e5b78dfce
--- www/goaccess/distinfo
+++ www/goaccess/distinfo
@@ -1,2 +1,2 @@
-SHA256 (goaccess-1.3.tar.gz) = jHdcXCS/hakz/W8SSQBIRzQtZUKqUz5OwCqve+Qde5s=
-SIZE (goaccess-1.3.tar.gz) = 541374
+SHA256 (goaccess-1.4.tar.gz) = 6Pu5/4UlVtct/Z8dATS6B1zltMQSiZAqb04Nl8aTd74=
+SIZE (goaccess-1.4.tar.gz) = 595264
blob - b84ac32c8ba78bfddcc3b638970a30fd65d6a600
blob + 357c5b22171025f049dfbd463e88c01b24f45e28
--- www/goaccess/patches/patch-config_goaccess_conf
+++ www/goaccess/patches/patch-config_goaccess_conf
@@ -20,38 +20,15 @@ Index: config/goaccess.conf
  ##
  # Date Format Options (required)
  ##
-@@ -653,31 +663,10 @@ static-file .flv
- #std-geoip false
- 
- # Specify path to GeoIP database file. i.e., GeoLiteCity.dat
--# .dat file needs to be downloaded from maxmind.com.
-+# Free GeoLite2 databases are available in the geolite2-city/country packages.
+@@ -698,7 +708,10 @@ static-file .flv
+ # Download the GeoLite2-Country.mmdb.gz
+ # gunzip GeoLite2-Country.mmdb.gz
  #
--# For IPv4 City database:
--# wget -N 
http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
--# gunzip GeoLiteCity.dat.gz
--#
--# For IPv6 City database:
--# wget -N 
http://geolite.maxmind.com/download/geoip/database/GeoLiteCityv6-beta/GeoLiteCityv6.dat.gz
--# gunzip GeoLiteCityv6.dat.gz
--#
--# For IPv6 Country database:
--# wget -N http://geolite.maxmind.com/download/geoip/database/GeoIPv6.dat.gz
--# gunzip GeoIPv6.dat.gz
--#
--# For GeoIP2 City database:
--# wget -N 
http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.mmdb.gz
--# gunzip GeoLite2-City.mmdb.gz
--#
--# For GeoIP2 Country database:
--# wget -N 
http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.mmdb.gz
--# gunzip GeoLite2-Country.mmdb.gz
--#
--# Note: `geoip-city-data` is an alias of `geoip-database`
--#
 -#geoip-database /usr/local/share/GeoIP/GeoLiteCity.dat
++
++# Free GeoLite2 databases are available in the geolite2-city/country packages.
 +#geoip-database /var/db/GeoIP/GeoLite2-City.mmdb
 +geoip-database /var/db/GeoIP/GeoLite2-Country.mmdb
  
  ##
- # Tokyo Cabinet Options
+ # Persistence Options
blob - 0e79c1d1d3b663c46ab44915980409c725c869e2
blob + e1fde41afa844fc90ec97bfcc0a57db0f5239a4a
--- www/goaccess/patches/patch-src_browsers_c

Re: [update] goaccess 1.4

2020-08-01 Thread Stuart Henderson
On 2020/08/01 17:40, Paco Esteban wrote:
> On Sat, 01 Aug 2020, Landry Breuil wrote:
> 
> > Hi,
> > 
> > here's an update to goaccess 1.4 (cf
> > http://goaccess.io/release-notes#release-1.4), drops the tokyocabinet
> > flavor (dep dropped upstream), removed some patches from upstream, i
> > have to admit i'm a bit puzzled by the src/settings.c patch, upstream
> > code was modified a bit there.
> > 
> > feedback/testing welcome !
> 
> Tested with combined logs from httpd.  On the config file I've
> uncommented:
> 
> # httpd(8) combined log format
> date-format %d/%b/%Y
> time-format %T %z
> log-format %v %h %^ %^ [%d:%t] "%r" %s %b "%R" "%u"
> 
> It crashes for me with this error:
> 
> GoAccess - version 1.4 - Aug  1 2020 17:35:48
> Config file: No config file used
> 
> Fatal error has occurred
> Error occurred at: src/goaccess.c - set_curses - 1411
> No time format was found on your conf file.
> 
> I have to explicitly specify the config file with
> `--config-file=/etc/goaccess.conf`.  After that it works fine.  Could it
> be related to that patch that you were talking about ?
> 
> Cheers,
> 
> -- 
> Paco Esteban.
> 0x5818130B8A6DBC03

Oh, sounds like they messed up the fix afterwards then :(



Re: [update] goaccess 1.4

2020-08-01 Thread Paco Esteban
On Sat, 01 Aug 2020, Landry Breuil wrote:

> Hi,
> 
> here's an update to goaccess 1.4 (cf
> http://goaccess.io/release-notes#release-1.4), drops the tokyocabinet
> flavor (dep dropped upstream), removed some patches from upstream, i
> have to admit i'm a bit puzzled by the src/settings.c patch, upstream
> code was modified a bit there.
> 
> feedback/testing welcome !

Tested with combined logs from httpd.  On the config file I've
uncommented:

# httpd(8) combined log format
date-format %d/%b/%Y
time-format %T %z
log-format %v %h %^ %^ [%d:%t] "%r" %s %b "%R" "%u"

It crashes for me with this error:

GoAccess - version 1.4 - Aug  1 2020 17:35:48
Config file: No config file used

Fatal error has occurred
Error occurred at: src/goaccess.c - set_curses - 1411
No time format was found on your conf file.

I have to explicitly specify the config file with
`--config-file=/etc/goaccess.conf`.  After that it works fine.  Could it
be related to that patch that you were talking about ?

Cheers,

-- 
Paco Esteban.
0x5818130B8A6DBC03



Re: [update] goaccess 1.4

2020-08-01 Thread Stuart Henderson
src/settings.c was committed upstream (hence the header), hopefully they 
didn't break it again (it used to prefer config in /etc rather than ~).


--
 Sent from a phone, apologies for poor formatting.
On 1 August 2020 07:13:06 Landry Breuil  wrote:


Hi,

here's an update to goaccess 1.4 (cf
http://goaccess.io/release-notes#release-1.4), drops the tokyocabinet
flavor (dep dropped upstream), removed some patches from upstream, i
have to admit i'm a bit puzzled by the src/settings.c patch, upstream
code was modified a bit there.

feedback/testing welcome !

Landry