Bug 228081 - www/awstats: missing dep
Summary: www/awstats: missing dep
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Kurt Jaeger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-08 20:12 UTC by Ivan Rozhuk
Modified: 2018-05-12 10:13 UTC (History)
4 users (show)

See Also:
vidar: maintainer-feedback+


Attachments
add missed dep (454 bytes, patch)
2018-05-08 20:12 UTC, Ivan Rozhuk
no flags Details | Diff
Diff to OPTIONize plugin dependencies (1.82 KB, patch)
2018-05-08 23:52 UTC, Vidar Karlsen
vidar: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Rozhuk 2018-05-08 20:12:52 UTC
Created attachment 193187 [details]
add missed dep

URI/Escape.pm is missing, awstats unable to run.
Comment 1 Vidar Karlsen 2018-05-08 22:08:12 UTC
Thanks for spotting this! It might have passed under my radar as for some reason it runs fine without p5-URI (and p5-Encode) in my environments, even in a minimal test jail with an nginx access log I copied from somewhere else:

root@fbsd11-1-portswrk:~ # pkg info
awstats-7.7,1                  Free real-time logfile analyzer to get advanced web statistics
p5-Digest-HMAC-1.03_1          Perl5 interface to HMAC Message-Digest Algorithms
p5-Net-DNS-1.15,1              Perl5 interface to the DNS resolver, and dynamic updates
p5-Net-IP-1.26_1               Perl extension for manipulating IPv4/IPv6 addresses
p5-Net-XWhois-0.90_5           Whois Client Interface for Perl5
perl5-5.26.2                   Practical Extraction and Report Language
pkg-1.10.5                     Package manager

root@fbsd11-1-portswrk:~ # grep ^LoadPlugin /usr/local/etc/awstats/awstats.entropia.no.conf
LoadPlugin="decodeutfkeys"

root@fbsd11-1-portswrk:~ # /usr/local/www/awstats/cgi-bin/awstats.pl -config=entropia.no
Create/Update database for config "/usr/local/etc/awstats/awstats.entropia.no.conf" by AWStats version 7.7 (build 20180105)
From data in log file "/usr/local/etc/awstats/entropia.no.access.log"...
Phase 1 : First bypass old records, searching new record...
Searching new records from beginning of log file...
Phase 2 : Now process new records (Flush history on disk after 20000 hosts)...
Jumped lines in file: 0
Parsed lines in file: 13877
 Found 3077 dropped records,
 Found 0 comments,
 Found 0 blank records,
 Found 4 corrupted records,
 Found 0 old records,
 Found 10796 new qualified records.



I can't seem to recreate the problem on my end, but the DecodeUTFKeys plugin does say it requires Encode and URI::Escape.

These plugins are however not enabled by default, and adding p5-URI as a rundep will only solve it for the DecodeUTFKeys plugin. Looking at the other bundled plugins, I see several more requirements, and I'm thinking of adding them as options with some suitable descriptions (e.g. "p5-URI, required by the DecodeUTFKeys plugin"). Do you have any thoughts on that?

Full list of plugins with requirements:
$ grep -B2 "REQUIRED MODULES:" /usr/local/www/awstats/cgi-bin/awstats.model.conf

# PLUGIN: DecodeUTFKeys
# REQUIRED MODULES: Encode and URI::Escape
--
# PLUGIN: IPv6
# PARAMETERS: None
# REQUIRED MODULES: Net::IP and Net::DNS
--
# PLUGIN: HashFiles
# REQUIRED MODULES: Storable
--

# PLUGIN: HostInfo
# REQUIRED MODULES: Net::XWhois
--

# PLUGIN: TimeHiRes
# REQUIRED MODULES: Time::HiRes (if Perl < 5.8)
--

# PLUGIN: TimeZone
# REQUIRED MODULES: Time::Local
--

# PLUGIN: GeoIPfree
# REQUIRED MODULES: Geo::IPfree version 0.2+ (from Graciliano M.P.)
--

# PLUGIN: GeoIP
# REQUIRED MODULES: Geo::IP or Geo::IP::PurePerl (from Maxmind)
--

# PLUGIN: GeoIP6
# REQUIRED MODULES: Geo::IP or Geo::IP::PurePerl (from Maxmind, version >= 1.40)
--

# PLUGIN: GeoIP_City_Maxmind
# REQUIRED MODULES: Geo::IP or Geo::IP::PurePerl (from Maxmind)
--

# PLUGIN: GeoIP_ASN_Maxmind
# REQUIRED MODULES: Geo::IP or Geo::IP::PurePerl (from Maxmind)
--

# PLUGIN: GeoIP_Region_Maxmind
# REQUIRED MODULES: Geo::IP or Geo::IP::PurePerl (from Maxmind)
--

# PLUGIN: GeoIP_ISP_Maxmind
# REQUIRED MODULES: Geo::IP or Geo::IP::PurePerl (from Maxmind)
--

# PLUGIN: GeoIP_Org_Maxmind
# REQUIRED MODULES: Geo::IP or Geo::IP::PurePerl (from Maxmind)
Comment 2 Ivan Rozhuk 2018-05-08 22:11:55 UTC
No, options is good.
Comment 3 Vidar Karlsen 2018-05-08 23:52:24 UTC
Created attachment 193195 [details]
Diff to OPTIONize plugin dependencies

Turns out most of the plugin requirements are in Perl CORE.
This patch adds options to add RUN_DEPENDS for those that aren't.

QA:
portlint -C: looks fine.
poudriere testport 11.1: ok
Comment 4 Kurt Jaeger freebsd_committer freebsd_triage 2018-05-12 10:12:12 UTC
Committed, thanks!
Comment 5 commit-hook freebsd_committer freebsd_triage 2018-05-12 10:13:03 UTC
A commit references this bug:

Author: pi
Date: Sat May 12 10:12:02 UTC 2018
New revision: 469723
URL: https://svnweb.freebsd.org/changeset/ports/469723

Log:
  www/awstats: fix/add RUN_DEPENDS by adding OPTIONs

  PR:		228081
  Submitted by:	rozhuk.im@gmail.com
  Approved by:	vidar@karlsen.tech (maintainer)

Changes:
  head/www/awstats/Makefile