webalizer damages webalizer.hist
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
webalizer (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
With the binary pacakage of webalizer in trusty as of 2014-12-05 (webalizer-2.23.08) when webalizer runs for a new month that is not already present in webalizer.hist it replaces in webalizer.hist all entries by the one with statistics from the previous run before adding the new stats.
To reproduce, unpack the attched archive with 3 log files containing single line with a hit for October-
webalizer -o html 1.log
That produces in the html subdirectory normal-loking webalizer.hist:
# Webalizer V2.23-08 History Data - 05/Dec/2014 12:15:00 (120 month)
10 2014 1 1 1 0 1 1 1 1 0 0
9 2014 0 0 0 0 0 0 0 0 0 0
8 2014 0 0 0 0 0 0 0 0 0 0
7 2014 0 0 0 0 0 0 0 0 0 0
6 2014 0 0 0 0 0 0 0 0 0 0
5 2014 0 0 0 0 0 0 0 0 0 0
...
Now run webalizer for 2.log:
webalizer -o html 1.log
This produces already corrupted file:
11 2014 1 1 1 0 1 1 1 1 0 0
10 2014 1 1 1 0 1 1 1 1 0 0
10 2014 1 1 1 0 1 1 1 1 0 0
10 2014 1 1 1 0 1 1 1 1 0 0
10 2014 1 1 1 0 1 1 1 1 0 0
10 2014 1 1 1 0 1 1 1 1 0 0
10 2014 1 1 1 0 1 1 1 1 0 0
...
where all entries but the last one became the statistics for october.
Now run for 3.log:
webalizer -o html 3.log
12 2014 1 1 1 0 1 1 1 1 0 0
11 2014 1 1 1 0 1 1 1 1 0 0
11 2014 1 1 1 0 1 1 1 1 0 0
11 2014 1 1 1 0 1 1 1 1 0 0
11 2014 1 1 1 0 1 1 1 1 0 0
11 2014 1 1 1 0 1 1 1 1 0 0
11 2014 1 1 1 0 1 1 1 1 0 0
11 2014 1 1 1 0 1 1 1 1 0 0
Notice how all entries were replaces by the statistics for November before adding stats for December.
The expected behavior should be the file looking like:
12 2014 1 1 1 0 1 1 1 1 0 0
11 2014 1 1 1 0 1 1 1 1 0 0
11 2014 1 1 1 0 1 1 1 1 0 0
10 2014 1 1 1 0 1 1 1 1 0 0
10 2014 1 1 1 0 1 1 1 1 0 0
10 2014 1 1 1 0 1 1 1 1 0 0
I tried to reproduce the bug via rebuild the package from sources, but I cannot rebuild it on Ubuntu 14.04 as the debuild gives:
dh --with autoreconf build
dh_testdir
dh_autoreconf
aclocal: warning: autoconf input should be named 'configure.ac', not 'configure.in'
configure.in:37: warning: AC_TRY_RUN called without default to allow cross compiling
autoconf: Undefined macros:
configure.
configure.
configure.
configure.in:37: warning: AC_TRY_RUN called without default to allow cross compiling
...
make: *** [build] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2
debuild: fatal error at line 1364:
dpkg-buildpackage -rfakeroot -D -us -uc failed
Also rebuilding the package manually on Fedora gives binary that behaves without the bug.
information type: | Public → Public Security |
information type: | Public Security → Public |
I se the same bug on Ubuntu 14.10 with the binary webalizer package. I also managed to rebuild the webalizer from the source package, but the resulting binary and/or package has not shown the bug and behaved as it should.