Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 353716 - www-misc/awstats-7.0_p20101205-r3 moved out of webapp-config, broken symlinks in /usr/bin
Summary: www-misc/awstats-7.0_p20101205-r3 moved out of webapp-config, broken symlinks...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Diego Elio Pettenò (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-04 19:56 UTC by Rob MacKenzie
Modified: 2011-11-11 16:04 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Testcase, fresh install on fairly stock server (freshInstall.txt,7.96 KB, text/plain)
2011-02-04 20:27 UTC, Rob MacKenzie
Details
emerge --info from fresh server. (emerge.info.txt,4.28 KB, text/plain)
2011-02-04 20:43 UTC, Rob MacKenzie
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rob MacKenzie 2011-02-04 19:56:13 UTC
awstats.pl needs a lib folder to work properly, but cannot find it when run via /usr/bin/awstats.pl symlink. 
Problem is on line 2163 of awstats.pl where a list of search directories is specified. I added the new install folder, and awstats now works. Mostly noticed this issue when cron ran awstats_updateall.pl, which refers to the /usr/bin link, therefore breaking.

Reproducible: Always

Steps to Reproduce:
1. Install new version
2. Run awstats.pl with $ /usr/bin/awstats.pl
Actual Results:  
Many messages like:

Warning: Can't read file "browsers.pm" (browsers detection will not work correctly).
Check if file is in "/usr/bin/lib" directory and is readable.


Expected Results:  
Normal run.
Comment 1 Diego Elio Pettenò (RETIRED) gentoo-dev 2011-02-04 20:18:41 UTC
I cannot reproduce this, can you please try without mucking up the files, and report what it does?
Comment 2 Rob MacKenzie 2011-02-04 20:27:39 UTC
Created attachment 261536 [details]
Testcase, fresh install on fairly stock server

Here is a test on a fresh server, never had awstats before.
Comment 3 Diego Elio Pettenò (RETIRED) gentoo-dev 2011-02-04 20:35:42 UTC
Thanks. Can you also please add an emerge --info? I can't reproduce on my production server (which is usually the guinea pig for awstats), but will set up a VM now to see if I can reproduce it.
Comment 4 Rob MacKenzie 2011-02-04 20:43:05 UTC
Created attachment 261537 [details]
emerge --info from fresh server.
Comment 5 Rob MacKenzie 2011-02-04 21:52:59 UTC
(In reply to comment #3)
> Thanks. Can you also please add an emerge --info? I can't reproduce on my
> production server (which is usually the guinea pig for awstats), but will set
> up a VM now to see if I can reproduce it.

I looked a little further into other servers. 
In previous versions there were symlinks that allowed the stock awstats.pl to work. These are removed with the new version. 

# ls -l /usr/share/awstats/
total 12
lrwxrwxrwx 1 root root 47 Dec  3 22:55 htdocs -> /usr/share/webapps/awstats/7.0_p20100929/htdocs
lrwxrwxrwx 1 root root 62 Dec  3 22:55 lang -> /usr/share/webapps/awstats/7.0_p20100929/hostroot/cgi-bin/lang
lrwxrwxrwx 1 root root 61 Dec  3 22:55 lib -> /usr/share/webapps/awstats/7.0_p20100929/hostroot/cgi-bin/lib
lrwxrwxrwx 1 root root 65 Dec  3 22:55 plugins -> /usr/share/webapps/awstats/7.0_p20100929/hostroot/cgi-bin/plugins
Comment 6 Thierry RL 2011-02-05 06:52:11 UTC
as awstats.pl searches lib dir in "$DIR/lib" and "/usr/share/awstats/lib" (where $DIR will be "/usr/bin" in our case)

i suggest to add
 dosym wwwroot/cgi-bin/lib usr/share/awstats/lib || die
in src_install()

this solved the problem on my server
Comment 7 Stef Simoens 2011-03-14 21:23:03 UTC
same problem here ... 
stock install of www-misc/awstats-7.0_p20101205-r3 (i.e. no upgrade)

*** without symlink /usr/share/awstats/lib => /usr/share/awstats/wwwroot/cgi-bin/lib
claudine logs # awstats.pl --help
Warning: Can't read file "browsers.pm" (browsers detection will not work correctly).
Check if file is in "/usr/bin/lib" directory and is readable.
Warning: Can't read file "domains.pm" (domains detection will not work correctly).
Check if file is in "/usr/bin/lib" directory and is readable.
Warning: Can't read file "operating_systems.pm" (operating systems detection will not work correctly).
Check if file is in "/usr/bin/lib" directory and is readable.
Warning: Can't read file "robots.pm" (robots detection will not work correctly).
Check if file is in "/usr/bin/lib" directory and is readable.
Warning: Can't read file "search_engines.pm" (search engines detection will not work correctly).
Check if file is in "/usr/bin/lib" directory and is readable.
Warning: Can't read file "worms.pm" (worms detection will not work correctly).
Check if file is in "/usr/bin/lib" directory and is readable.
----- awstats 7.0 (build 1.971) (c) 2000-2010 Laurent Destailleur -----
AWStats is a free web server logfile analyzer to show you advanced web
statistics.
AWStats comes with ABSOLUTELY NO WARRANTY. It's a free software distributed
with a GNU General Public License (See LICENSE file for details).

Syntax: awstats.pl -config=virtualhostname [options]
(... cut for readability ...) 
  0 domains/countries
  0 robots
  0 worm's families
  0 operating systems
  0 browsersWarning: Can't read file "browsers_phone.pm" (browsers phone detection will not work correctly).
Check if file is in "/usr/bin/lib" directory and is readable.
 (0 with phone browsers database)
  0 search engines (and keyphrases/keywords used from them)
  All HTTP errors with last referrer
  Report by day/month/year
  Dynamic or static HTML or XHTML reports, static PDF reports
  Indexed text or XML monthly database
  And a lot of other advanced features and options...
New versions and FAQ at http://awstats.sourceforge.net
claudine logs # 

*** with symlink /usr/share/awstats/lib => /usr/share/awstats/wwwroot/cgi-bin/lib
localhost logs # awstats.pl --help
----- awstats 7.0 (build 1.971) (c) 2000-2010 Laurent Destailleur -----
AWStats is a free web server logfile analyzer to show you advanced web
statistics.
AWStats comes with ABSOLUTELY NO WARRANTY. It's a free software distributed
with a GNU General Public License (See LICENSE file for details).

Syntax: awstats.pl -config=virtualhostname [options]
(... cut for readability ...)
  274 domains/countries
  643 robots
  5 worm's families
  72 operating systems
  208 browsers (592 with phone browsers database)
  228 search engines (and keyphrases/keywords used from them)
  All HTTP errors with last referrer
  Report by day/month/year
  Dynamic or static HTML or XHTML reports, static PDF reports
  Indexed text or XML monthly database
  And a lot of other advanced features and options...
New versions and FAQ at http://awstats.sourceforge.net
Comment 8 Diego Elio Pettenò (RETIRED) gentoo-dev 2011-11-11 12:33:55 UTC
Sorry for this coming so late but it's fixed as of 7.1-r1.
Comment 9 MT 2011-11-11 16:02:33 UTC
Despite the fixes for www-misc/awstats-7.0 and www-misc/awstats-7.1 I have the same exact problem when invoking the command "awstats_updateall.pl now": 

Warning: Can't read file "search_engines.pm" (search engines detection will not work correctly).
Check if file is in "/usr/share/awstats/wwwroot/lib" directory and is readable.
Warning: Can't read file "worms.pm" (worms detection will not work correctly).
Check if file is in "/usr/share/awstats/wwwroot/lib" directory and is readable.
Warning: Can't read file "operating_systems.pm" (operating systems detection will not work correctly).
Check if file is in "/usr/share/awstats/wwwroot/lib" directory and is readable.
Warning: Can't read file "robots.pm" (robots detection will not work correctly).
Check if file is in "/usr/share/awstats/wwwroot/lib" directory and is readable.
Warning: Can't read file "browsers.pm" (browsers detection will not work correctly).
Check if file is in "/usr/share/awstats/wwwroot/lib" directory and is readable.
Warning: Can't read file "mime.pm" (mime detection will not work correctly).
Check if file is in "/usr/share/awstats/wwwroot/lib" directory and is readable.


qfile search_engines.pm worms.pm operating_systems.pm robots.pm browsers.pm mime.pm
www-misc/awstats (/usr/share/awstats/wwwroot/cgi-bin/lib/operating_systems.pm)
www-misc/awstats (/usr/share/awstats/wwwroot/cgi-bin/lib/worms.pm)
www-misc/awstats (/usr/share/awstats/wwwroot/cgi-bin/lib/mime.pm)
www-misc/awstats (/usr/share/awstats/wwwroot/cgi-bin/lib/search_engines.pm)
www-misc/awstats (/usr/share/awstats/wwwroot/cgi-bin/lib/robots.pm)
www-misc/awstats (/usr/share/awstats/wwwroot/cgi-bin/lib/browsers.pm)


clearly the hardcoded path "/usr/share/awstats/wwwroot/lib" is missing a "cgi-bin".