tag 686347 +moreinfo +fixed
thanks
On Fri, Aug 31, 2012 at 02:28:21PM +0200, Piotr Kowalczyk wrote:
Package: logrotate
Version: 3.7.8-6
Please try again with a more recent version. Debian wheezy (testing)
has 3.8.1 and Debian unstable has 3.8.2.
CentOS may have backported a fix that didn't make it into Squeeze.
Upstream fixed the parsing of the size directive in 3.8.1.
Minor bugs like this don't tend to be backported to the stable
distribution.
Also, please don't use Pastebin for bug reports, but include the
transcript in the bug report. Pastebin may go away at any point,
making it impossible for anyone to do work on the bug in the future.
For future readers, here is your transcript:
===
How it should work (tested on CentOS (logrotate 3.7.8)):
# cat /etc/logrotate.d/test
/root/log/log {
size=36G
compress
}
# dd if=/dev/zero of=log bs=3699 count=0 seek=$[1000*1000*10]
0+0 records in
0+0 records out
0 bytes (0 B) copied, 2.1422e-05 s, 0.0 kB/s
# ls -alh
total 8.0K
drwxr-xr-x. 2 root root 4.0K Aug 31 04:08 .
dr-xr-x---. 7 root root 4.0K Aug 31 03:58 ..
-rw-r--r--. 1 root root 35G Aug 31 04:08 log
# logrotate /etc/logrotate.d/test
# ls -alh
total 8.0K
drwxr-xr-x. 2 root root 4.0K Aug 31 04:08 .
dr-xr-x---. 7 root root 4.0K Aug 31 03:58 ..
-rw-r--r--. 1 root root 35G Aug 31 04:08 log
// changed logrotate from 36G to 34G:
# cat /etc/logrotate.d/test
/root/log/log {
size=34G
compress
}
# logrotate /etc/logrotate.d/test
^C
# ls -alh
total 88K
drwxr-xr-x. 2 root root 4.0K Aug 31 04:10 .
dr-xr-x---. 7 root root 4.0K Aug 31 03:58 ..
-rw-r--r--. 1 root root 35G Aug 31 04:08 log.1
-rw-r--r--. 1 root root 80K Aug 31 04:10 log.1.gz
How it's working (tested on Debian and Ubuntu (logrotate 3.7.8)):
# cat /etc/logrotate.d/test
/root/log/log {
size=36G
compress
}
# dd if=/dev/zero of=log bs=3699 count=0 seek=$[1000*1000*10]
0+0 przeczytanych recordów
0+0 zapisanych recordów
skopiowane 0 bajtów (0 B), 9,772e-06 s, 0,0 kB/s
# ls -alh
razem 8,0K
drwxr-xr-x 2 root root 4,0K sie 31 13:04 .
drwx-- 23 root root 4,0K sie 31 12:48 ..
-rw-r--r-- 1 root root 35G sie 31 13:26 log
# logrotate /etc/logrotate.d/test
^C
# ls -alh
razem 88K
drwxr-xr-x 2 root root 4,0K sie 31 13:26 .
drwx-- 23 root root 4,0K sie 31 12:48 ..
-rw-r--r-- 1 root root 35G sie 31 13:26 log.1
-rw-r--r-- 1 root root 80K sie 31 13:26 log.1.gz
# rm log*
// changed logrotate from 36G to 34G:
root@bms:~/log# cat /etc/logrotate.d/test
/root/log/log {
size=34G
compress
}
# dd if=/dev/zero of=log bs=3699 count=0 seek=$[1000*1000*10]
0+0 przeczytanych recordów
0+0 zapisanych recordów
skopiowane 0 bajtów (0 B), 8,863e-06 s, 0,0 kB/s
# ls -alh
razem 8,0K
drwxr-xr-x 2 root root 4,0K sie 31 13:04 .
drwx-- 23 root root 4,0K sie 31 12:48 ..
-rw-r--r-- 1 root root 35G sie 31 13:26 log
# logrotate /etc/logrotate.d/test
^C
# ls -alh
razem 40K
drwxr-xr-x 2 root root 4,0K sie 31 13:27 .
drwx-- 23 root root 4,0K sie 31 12:48 ..
-rw-r--r-- 1 root root 35G sie 31 13:27 log.1
-rw-r--r-- 1 root root 32K sie 31 13:27 log.1.gz
--
Paul Martin p...@debian.org
--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org