Bug#686347: logrotate ignores 'size' parameter

2012-08-31 Thread Piotr Kowalczyk
Package: logrotate
Version: 3.7.8-6
Severity: normal
Tags: squeeze

LOG: http://pastebin.com/sHKtj8QP

-- Package-specific info:
Contents of /etc/logrotate.d
total 40
-rw-r--r-- 1 root root 194 Apr  1 09:15 apache2
-rw-r--r-- 1 root root 173 Oct 28  2010 apt
-rw-r--r-- 1 root root  79 Oct 16  2010 aptitude
-rw-r--r-- 1 root root 232 Sep 14  2010 dpkg
-rw-r--r-- 1 root root 146 May 12  2011 exim4-base
-rw-r--r-- 1 root root 126 May 12  2011 exim4-paniclog
-rw-r--r-- 1 root root  72 May  4  2010 heartbeat
-rw-r--r-- 1 root root 858 Aug 31 11:55 mysql-server
-rw-r--r-- 1 root root 840 Aug 31 12:38 mysql-server-test
-rw-r--r-- 1 root root 515 Aug  5  2010 rsyslog


-- System Information:
Debian Release: 6.0.5
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.2.13-grsec--grs-ipv6-64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages logrotate depends on:
ii  base-passwd   3.5.22 Debian base system master
password
ii  cron  3.0pl1-116 process scheduling daemon
ii  libc6 2.11.3-3   Embedded GNU C Library: Shared
lib
ii  libpopt0  1.16-1 lib for parsing cmdline
parameters
ii  libselinux1   2.0.96-1   SELinux runtime shared
libraries

Versions of packages logrotate recommends:
ii  bsd-mailx [mailx]  8.1.2-0.20100314cvs-1 simple mail user agent

logrotate suggests no packages.

-- Configuration Files:
/etc/cron.daily/logrotate [Errno 2] No such file or directory:
u'/etc/cron.daily/logrotate'

-- no debconf information


Bug#686347: logrotate ignores 'size' parameter

2012-08-31 Thread Paul Martin
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