Bug 264755 - www/webalizer: Add DNS option
Summary: www/webalizer: Add DNS option
Status: Closed Not Accepted
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Dirk Meyer
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2022-06-18 18:04 UTC by Craig Leres
Modified: 2022-06-20 19:24 UTC (History)
1 user (show)

See Also:
dinoex: maintainer-feedback+


Attachments
patch (1.58 KB, patch)
2022-06-18 18:05 UTC, Craig Leres
no flags Details | Diff
revised patch (1.86 KB, patch)
2022-06-18 21:07 UTC, Craig Leres
no flags Details | Diff
revised patch (1.93 KB, patch)
2022-06-19 20:07 UTC, Craig Leres
leres: maintainer-approval? (dinoex)
Details | Diff
build log (85.05 KB, text/plain)
2022-06-19 20:10 UTC, Craig Leres
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Craig Leres freebsd_committer freebsd_triage 2022-06-18 18:04:50 UTC
Make it possible to build webalizer without DNS support. While we're here, sort OPTIONS.
Comment 1 Craig Leres freebsd_committer freebsd_triage 2022-06-18 18:05:36 UTC
Created attachment 234769 [details]
patch
Comment 2 Dirk Meyer freebsd_committer freebsd_triage 2022-06-18 18:53:51 UTC
1)
Sorting options is a bad idea.
The options are ordered by function groups: databases, charsets, patches.

2)
DNS lookups are disabled by default in webalizer.conf
There are no external dependencies for this option.
Please explain why do your need to build a binary without?

3)
The patch is incomplete.
Whithout DNS you don't need the "webazolver" binary.
Comment 3 Craig Leres freebsd_committer freebsd_triage 2022-06-18 21:07:01 UTC
Created attachment 234772 [details]
revised patch

I have a system is able to sustain more than 2K PTR queries/sec for 20 minutes starting at midnight (when I run webalizer). DNS.README lead me to believe the only want to disable PTR lookups was at compile time:

Note: The Reverse DNS feature may be enabled or disabled at compile
      time.  DNS lookup code is enabled by default.  You can run The
      Webalizer using the '-vV' command line options to determine what
      options are enabled in the version you are using.
Comment 4 Dirk Meyer freebsd_committer freebsd_triage 2022-06-19 15:08:24 UTC
4)
wcmgr is only for the DNS cache.

I am not sure the patched port does compile.


5) manpage:
REVERSE DNS LOOKUPS
       The Webalizer fully supports IPv4 and IPv6 DNS lookups, and maintains a
       cache of those lookups to reduce processing the same addresses in
       subsequent runs.  The cache file can be created at run-time, or may be
       created before running the webalizer using either the stand alone
       'webazolver' program, or The Webalizer (DNS) Cache file manager program
       'wcmgr'.  In order to perform reverse lookups, a DNSCache file must be
       specified, either on the command line or in a configuration file.


Even for high performance,
running without "DNSCache" in config file and CLI arguments is sufficient.

The patch does only add complexity for no real benefit.
Comment 5 Craig Leres freebsd_committer freebsd_triage 2022-06-19 20:07:49 UTC
Created attachment 234795 [details]
revised patch

Only install wcmgr when DNS.
Comment 6 Craig Leres freebsd_committer freebsd_triage 2022-06-19 20:10:16 UTC
Created attachment 234796 [details]
build log

poudriere build log for 13.1-RELEASE
Comment 7 Dirk Meyer freebsd_committer freebsd_triage 2022-06-20 17:42:57 UTC
More regressions:

6) The options GEOIP and GEODB are broken wiithout DNS

Possible fix is to add *_IMPLIES=

7) Slave ports */geolizer need to be extended as well.

Possible fix extends OPTIONS_DEFAULT there.

8) manpage "wcmgr.1.gz" should not be included.

Possible fix:

-LMAN1=               ${PKGNAMEPREFIX}webalizer.1 ${PKGNAMEPREFIX}wcmgr.1
+LMAN1=               ${PKGNAMEPREFIX}webalizer.1
+.if ${PORT_OPTIONS:MDNS}
+LMAN1+=              ${PKGNAMEPREFIX}wcmgr.1
+.endif
Comment 8 Craig Leres freebsd_committer freebsd_triage 2022-06-20 19:24:17 UTC
Ok, I give up.