[Touch-packages] [Bug 1320201] Re: behaviour in debug mode doesn't match real behaviour

2016-06-23 Thread Matt Fischer
** Changed in: logrotate (Ubuntu)
   Importance: Undecided => High

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to logrotate in Ubuntu.
https://bugs.launchpad.net/bugs/1320201

Title:
  behaviour in debug mode doesn't match real behaviour

Status in logrotate package in Ubuntu:
  Confirmed

Bug description:
  Situation: a single log file (no earlier rotates) and a logrotate
  status that says it is time to rotate.

  # ls -l /var/log/mail.log*
  -rw-r- 1 syslog adm 287 May 16 11:27 /var/log/mail.log

  # cat /var/lib/logrotate/status 
  logrotate state -- version 2
  "/var/log/mail.log" 2012-3-31

  # cat /tmp/test.conf 
  /var/log/mail.log
  {
rotate 4
weekly
missingok
notifempty
compress
delaycompress
sharedscripts
postrotate
reload rsyslog >/dev/null 2>&1 || true
endscript
  }

  logrotate in debug mode will fail, because it simulates removing a
  non-existing mail.log.5.gz:

  # logrotate -d /tmp/test.conf; echo $?
  reading config file /tmp/test.conf
  reading config info for /var/log/mail.log

  
  Handling 1 logs

  rotating pattern: /var/log/mail.log
   weekly (4 rotations)
  empty log files are not rotated, old logs are removed
  considering log /var/log/mail.log
log needs rotating
  rotating log /var/log/mail.log, log->rotateCount is 4
  dateext suffix '-20140516'
  glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
  previous log /var/log/mail.log.1 does not exist
  renaming /var/log/mail.log.4.gz to /var/log/mail.log.5.gz (rotatecount 4, 
logstart 1, i 4), 
  renaming /var/log/mail.log.3.gz to /var/log/mail.log.4.gz (rotatecount 4, 
logstart 1, i 3), 
  renaming /var/log/mail.log.2.gz to /var/log/mail.log.3.gz (rotatecount 4, 
logstart 1, i 2), 
  renaming /var/log/mail.log.1.gz to /var/log/mail.log.2.gz (rotatecount 4, 
logstart 1, i 1), 
  renaming /var/log/mail.log.0.gz to /var/log/mail.log.1.gz (rotatecount 4, 
logstart 1, i 0), 
  renaming /var/log/mail.log to /var/log/mail.log.1
  running postrotate script
  running script (multiple) with arg /var/log/mail.log
  : "
reload rsyslog >/dev/null 2>&1 || true
  "
  removing old log /var/log/mail.log.5.gz
  error: error opening /var/log/mail.log.5.gz: No such file or directory
  1

  
  logrotate's real behaviour handles this situation correctly:

  # logrotate -v /tmp/test.conf; echo $?
  reading config file /tmp/test.conf
  reading config info for /var/log/mail.log

  
  Handling 1 logs

  rotating pattern: /var/log/mail.log
   weekly (4 rotations)
  empty log files are not rotated, old logs are removed
  considering log /var/log/mail.log
log needs rotating
  rotating log /var/log/mail.log, log->rotateCount is 4
  dateext suffix '-20140516'
  glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
  previous log /var/log/mail.log.1 does not exist
  renaming /var/log/mail.log.4.gz to /var/log/mail.log.5.gz (rotatecount 4, 
logstart 1, i 4), 
  old log /var/log/mail.log.4.gz does not exist
  renaming /var/log/mail.log.3.gz to /var/log/mail.log.4.gz (rotatecount 4, 
logstart 1, i 3), 
  old log /var/log/mail.log.3.gz does not exist
  renaming /var/log/mail.log.2.gz to /var/log/mail.log.3.gz (rotatecount 4, 
logstart 1, i 2), 
  old log /var/log/mail.log.2.gz does not exist
  renaming /var/log/mail.log.1.gz to /var/log/mail.log.2.gz (rotatecount 4, 
logstart 1, i 1), 
  old log /var/log/mail.log.1.gz does not exist
  renaming /var/log/mail.log.0.gz to /var/log/mail.log.1.gz (rotatecount 4, 
logstart 1, i 0), 
  old log /var/log/mail.log.0.gz does not exist
  log /var/log/mail.log.5.gz doesn't exist -- won't try to dispose of it
  renaming /var/log/mail.log to /var/log/mail.log.1
  running postrotate script
  0

  
  Summary:

  # logrotate -d /tmp/test.conf; echo $?
  [..]
  removing old log /var/log/mail.log.5.gz
  error: error opening /var/log/mail.log.5.gz: No such file or directory

  exitcode: 1

  # logrotate -v /tmp/test.conf; echo $?
  [..]
  log /var/log/mail.log.5.gz doesn't exist -- won't try to dispose of it

  exitcode: 0


  
  1) The release of Ubuntu you are using, via 'lsb_release -rd' or System -> 
About Ubuntu
  Description:  Ubuntu 12.04.3 LTS
  Release:  12.04

  2) The version of the package you are using, via 'apt-cache policy pkgname' 
or by checking in Software Center
  logrotate:
Installed: 3.7.8-6ubuntu5
Candidate: 3.7.8-6ubuntu5

  3) What you expected to happen
  debug mode should not output an error and should have exitcode 0

  4) What happened instead
  debug mode prints an error and has exitcode 1

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/logrotate/+bug/1320201/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : 

[Touch-packages] [Bug 1320201] Re: behaviour in debug mode doesn't match real behaviour

2015-08-11 Thread Florent
Bumping for a fix on Ubuntu.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to logrotate in Ubuntu.
https://bugs.launchpad.net/bugs/1320201

Title:
  behaviour in debug mode doesn't match real behaviour

Status in logrotate package in Ubuntu:
  Confirmed

Bug description:
  Situation: a single log file (no earlier rotates) and a logrotate
  status that says it is time to rotate.

  # ls -l /var/log/mail.log*
  -rw-r- 1 syslog adm 287 May 16 11:27 /var/log/mail.log

  # cat /var/lib/logrotate/status 
  logrotate state -- version 2
  /var/log/mail.log 2012-3-31

  # cat /tmp/test.conf 
  /var/log/mail.log
  {
rotate 4
weekly
missingok
notifempty
compress
delaycompress
sharedscripts
postrotate
reload rsyslog /dev/null 21 || true
endscript
  }

  logrotate in debug mode will fail, because it simulates removing a
  non-existing mail.log.5.gz:

  # logrotate -d /tmp/test.conf; echo $?
  reading config file /tmp/test.conf
  reading config info for /var/log/mail.log

  
  Handling 1 logs

  rotating pattern: /var/log/mail.log
   weekly (4 rotations)
  empty log files are not rotated, old logs are removed
  considering log /var/log/mail.log
log needs rotating
  rotating log /var/log/mail.log, log-rotateCount is 4
  dateext suffix '-20140516'
  glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
  previous log /var/log/mail.log.1 does not exist
  renaming /var/log/mail.log.4.gz to /var/log/mail.log.5.gz (rotatecount 4, 
logstart 1, i 4), 
  renaming /var/log/mail.log.3.gz to /var/log/mail.log.4.gz (rotatecount 4, 
logstart 1, i 3), 
  renaming /var/log/mail.log.2.gz to /var/log/mail.log.3.gz (rotatecount 4, 
logstart 1, i 2), 
  renaming /var/log/mail.log.1.gz to /var/log/mail.log.2.gz (rotatecount 4, 
logstart 1, i 1), 
  renaming /var/log/mail.log.0.gz to /var/log/mail.log.1.gz (rotatecount 4, 
logstart 1, i 0), 
  renaming /var/log/mail.log to /var/log/mail.log.1
  running postrotate script
  running script (multiple) with arg /var/log/mail.log
  : 
reload rsyslog /dev/null 21 || true
  
  removing old log /var/log/mail.log.5.gz
  error: error opening /var/log/mail.log.5.gz: No such file or directory
  1

  
  logrotate's real behaviour handles this situation correctly:

  # logrotate -v /tmp/test.conf; echo $?
  reading config file /tmp/test.conf
  reading config info for /var/log/mail.log

  
  Handling 1 logs

  rotating pattern: /var/log/mail.log
   weekly (4 rotations)
  empty log files are not rotated, old logs are removed
  considering log /var/log/mail.log
log needs rotating
  rotating log /var/log/mail.log, log-rotateCount is 4
  dateext suffix '-20140516'
  glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
  previous log /var/log/mail.log.1 does not exist
  renaming /var/log/mail.log.4.gz to /var/log/mail.log.5.gz (rotatecount 4, 
logstart 1, i 4), 
  old log /var/log/mail.log.4.gz does not exist
  renaming /var/log/mail.log.3.gz to /var/log/mail.log.4.gz (rotatecount 4, 
logstart 1, i 3), 
  old log /var/log/mail.log.3.gz does not exist
  renaming /var/log/mail.log.2.gz to /var/log/mail.log.3.gz (rotatecount 4, 
logstart 1, i 2), 
  old log /var/log/mail.log.2.gz does not exist
  renaming /var/log/mail.log.1.gz to /var/log/mail.log.2.gz (rotatecount 4, 
logstart 1, i 1), 
  old log /var/log/mail.log.1.gz does not exist
  renaming /var/log/mail.log.0.gz to /var/log/mail.log.1.gz (rotatecount 4, 
logstart 1, i 0), 
  old log /var/log/mail.log.0.gz does not exist
  log /var/log/mail.log.5.gz doesn't exist -- won't try to dispose of it
  renaming /var/log/mail.log to /var/log/mail.log.1
  running postrotate script
  0

  
  Summary:

  # logrotate -d /tmp/test.conf; echo $?
  [..]
  removing old log /var/log/mail.log.5.gz
  error: error opening /var/log/mail.log.5.gz: No such file or directory

  exitcode: 1

  # logrotate -v /tmp/test.conf; echo $?
  [..]
  log /var/log/mail.log.5.gz doesn't exist -- won't try to dispose of it

  exitcode: 0


  
  1) The release of Ubuntu you are using, via 'lsb_release -rd' or System - 
About Ubuntu
  Description:  Ubuntu 12.04.3 LTS
  Release:  12.04

  2) The version of the package you are using, via 'apt-cache policy pkgname' 
or by checking in Software Center
  logrotate:
Installed: 3.7.8-6ubuntu5
Candidate: 3.7.8-6ubuntu5

  3) What you expected to happen
  debug mode should not output an error and should have exitcode 0

  4) What happened instead
  debug mode prints an error and has exitcode 1

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/logrotate/+bug/1320201/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1320201] Re: behaviour in debug mode doesn't match real behaviour

2015-06-09 Thread Gertjan Oude Lohuis
I'm not sure if you're waiting for a confirmation from me, but this
patch seems to work perfectly! Merge away :).

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to logrotate in Ubuntu.
https://bugs.launchpad.net/bugs/1320201

Title:
  behaviour in debug mode doesn't match real behaviour

Status in logrotate package in Ubuntu:
  Confirmed

Bug description:
  Situation: a single log file (no earlier rotates) and a logrotate
  status that says it is time to rotate.

  # ls -l /var/log/mail.log*
  -rw-r- 1 syslog adm 287 May 16 11:27 /var/log/mail.log

  # cat /var/lib/logrotate/status 
  logrotate state -- version 2
  /var/log/mail.log 2012-3-31

  # cat /tmp/test.conf 
  /var/log/mail.log
  {
rotate 4
weekly
missingok
notifempty
compress
delaycompress
sharedscripts
postrotate
reload rsyslog /dev/null 21 || true
endscript
  }

  logrotate in debug mode will fail, because it simulates removing a
  non-existing mail.log.5.gz:

  # logrotate -d /tmp/test.conf; echo $?
  reading config file /tmp/test.conf
  reading config info for /var/log/mail.log

  
  Handling 1 logs

  rotating pattern: /var/log/mail.log
   weekly (4 rotations)
  empty log files are not rotated, old logs are removed
  considering log /var/log/mail.log
log needs rotating
  rotating log /var/log/mail.log, log-rotateCount is 4
  dateext suffix '-20140516'
  glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
  previous log /var/log/mail.log.1 does not exist
  renaming /var/log/mail.log.4.gz to /var/log/mail.log.5.gz (rotatecount 4, 
logstart 1, i 4), 
  renaming /var/log/mail.log.3.gz to /var/log/mail.log.4.gz (rotatecount 4, 
logstart 1, i 3), 
  renaming /var/log/mail.log.2.gz to /var/log/mail.log.3.gz (rotatecount 4, 
logstart 1, i 2), 
  renaming /var/log/mail.log.1.gz to /var/log/mail.log.2.gz (rotatecount 4, 
logstart 1, i 1), 
  renaming /var/log/mail.log.0.gz to /var/log/mail.log.1.gz (rotatecount 4, 
logstart 1, i 0), 
  renaming /var/log/mail.log to /var/log/mail.log.1
  running postrotate script
  running script (multiple) with arg /var/log/mail.log
  : 
reload rsyslog /dev/null 21 || true
  
  removing old log /var/log/mail.log.5.gz
  error: error opening /var/log/mail.log.5.gz: No such file or directory
  1

  
  logrotate's real behaviour handles this situation correctly:

  # logrotate -v /tmp/test.conf; echo $?
  reading config file /tmp/test.conf
  reading config info for /var/log/mail.log

  
  Handling 1 logs

  rotating pattern: /var/log/mail.log
   weekly (4 rotations)
  empty log files are not rotated, old logs are removed
  considering log /var/log/mail.log
log needs rotating
  rotating log /var/log/mail.log, log-rotateCount is 4
  dateext suffix '-20140516'
  glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
  previous log /var/log/mail.log.1 does not exist
  renaming /var/log/mail.log.4.gz to /var/log/mail.log.5.gz (rotatecount 4, 
logstart 1, i 4), 
  old log /var/log/mail.log.4.gz does not exist
  renaming /var/log/mail.log.3.gz to /var/log/mail.log.4.gz (rotatecount 4, 
logstart 1, i 3), 
  old log /var/log/mail.log.3.gz does not exist
  renaming /var/log/mail.log.2.gz to /var/log/mail.log.3.gz (rotatecount 4, 
logstart 1, i 2), 
  old log /var/log/mail.log.2.gz does not exist
  renaming /var/log/mail.log.1.gz to /var/log/mail.log.2.gz (rotatecount 4, 
logstart 1, i 1), 
  old log /var/log/mail.log.1.gz does not exist
  renaming /var/log/mail.log.0.gz to /var/log/mail.log.1.gz (rotatecount 4, 
logstart 1, i 0), 
  old log /var/log/mail.log.0.gz does not exist
  log /var/log/mail.log.5.gz doesn't exist -- won't try to dispose of it
  renaming /var/log/mail.log to /var/log/mail.log.1
  running postrotate script
  0

  
  Summary:

  # logrotate -d /tmp/test.conf; echo $?
  [..]
  removing old log /var/log/mail.log.5.gz
  error: error opening /var/log/mail.log.5.gz: No such file or directory

  exitcode: 1

  # logrotate -v /tmp/test.conf; echo $?
  [..]
  log /var/log/mail.log.5.gz doesn't exist -- won't try to dispose of it

  exitcode: 0


  
  1) The release of Ubuntu you are using, via 'lsb_release -rd' or System - 
About Ubuntu
  Description:  Ubuntu 12.04.3 LTS
  Release:  12.04

  2) The version of the package you are using, via 'apt-cache policy pkgname' 
or by checking in Software Center
  logrotate:
Installed: 3.7.8-6ubuntu5
Candidate: 3.7.8-6ubuntu5

  3) What you expected to happen
  debug mode should not output an error and should have exitcode 0

  4) What happened instead
  debug mode prints an error and has exitcode 1

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/logrotate/+bug/1320201/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : 

[Touch-packages] [Bug 1320201] Re: behaviour in debug mode doesn't match real behaviour

2015-06-02 Thread Voidenko Ekaterina
This bug affects me too. Thank you, Sergey. 
Please add this patch to Ubuntu. 

You have stupid bug and simple fix for it. Why not?

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to logrotate in Ubuntu.
https://bugs.launchpad.net/bugs/1320201

Title:
  behaviour in debug mode doesn't match real behaviour

Status in logrotate package in Ubuntu:
  Confirmed

Bug description:
  Situation: a single log file (no earlier rotates) and a logrotate
  status that says it is time to rotate.

  # ls -l /var/log/mail.log*
  -rw-r- 1 syslog adm 287 May 16 11:27 /var/log/mail.log

  # cat /var/lib/logrotate/status 
  logrotate state -- version 2
  /var/log/mail.log 2012-3-31

  # cat /tmp/test.conf 
  /var/log/mail.log
  {
rotate 4
weekly
missingok
notifempty
compress
delaycompress
sharedscripts
postrotate
reload rsyslog /dev/null 21 || true
endscript
  }

  logrotate in debug mode will fail, because it simulates removing a
  non-existing mail.log.5.gz:

  # logrotate -d /tmp/test.conf; echo $?
  reading config file /tmp/test.conf
  reading config info for /var/log/mail.log

  
  Handling 1 logs

  rotating pattern: /var/log/mail.log
   weekly (4 rotations)
  empty log files are not rotated, old logs are removed
  considering log /var/log/mail.log
log needs rotating
  rotating log /var/log/mail.log, log-rotateCount is 4
  dateext suffix '-20140516'
  glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
  previous log /var/log/mail.log.1 does not exist
  renaming /var/log/mail.log.4.gz to /var/log/mail.log.5.gz (rotatecount 4, 
logstart 1, i 4), 
  renaming /var/log/mail.log.3.gz to /var/log/mail.log.4.gz (rotatecount 4, 
logstart 1, i 3), 
  renaming /var/log/mail.log.2.gz to /var/log/mail.log.3.gz (rotatecount 4, 
logstart 1, i 2), 
  renaming /var/log/mail.log.1.gz to /var/log/mail.log.2.gz (rotatecount 4, 
logstart 1, i 1), 
  renaming /var/log/mail.log.0.gz to /var/log/mail.log.1.gz (rotatecount 4, 
logstart 1, i 0), 
  renaming /var/log/mail.log to /var/log/mail.log.1
  running postrotate script
  running script (multiple) with arg /var/log/mail.log
  : 
reload rsyslog /dev/null 21 || true
  
  removing old log /var/log/mail.log.5.gz
  error: error opening /var/log/mail.log.5.gz: No such file or directory
  1

  
  logrotate's real behaviour handles this situation correctly:

  # logrotate -v /tmp/test.conf; echo $?
  reading config file /tmp/test.conf
  reading config info for /var/log/mail.log

  
  Handling 1 logs

  rotating pattern: /var/log/mail.log
   weekly (4 rotations)
  empty log files are not rotated, old logs are removed
  considering log /var/log/mail.log
log needs rotating
  rotating log /var/log/mail.log, log-rotateCount is 4
  dateext suffix '-20140516'
  glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
  previous log /var/log/mail.log.1 does not exist
  renaming /var/log/mail.log.4.gz to /var/log/mail.log.5.gz (rotatecount 4, 
logstart 1, i 4), 
  old log /var/log/mail.log.4.gz does not exist
  renaming /var/log/mail.log.3.gz to /var/log/mail.log.4.gz (rotatecount 4, 
logstart 1, i 3), 
  old log /var/log/mail.log.3.gz does not exist
  renaming /var/log/mail.log.2.gz to /var/log/mail.log.3.gz (rotatecount 4, 
logstart 1, i 2), 
  old log /var/log/mail.log.2.gz does not exist
  renaming /var/log/mail.log.1.gz to /var/log/mail.log.2.gz (rotatecount 4, 
logstart 1, i 1), 
  old log /var/log/mail.log.1.gz does not exist
  renaming /var/log/mail.log.0.gz to /var/log/mail.log.1.gz (rotatecount 4, 
logstart 1, i 0), 
  old log /var/log/mail.log.0.gz does not exist
  log /var/log/mail.log.5.gz doesn't exist -- won't try to dispose of it
  renaming /var/log/mail.log to /var/log/mail.log.1
  running postrotate script
  0

  
  Summary:

  # logrotate -d /tmp/test.conf; echo $?
  [..]
  removing old log /var/log/mail.log.5.gz
  error: error opening /var/log/mail.log.5.gz: No such file or directory

  exitcode: 1

  # logrotate -v /tmp/test.conf; echo $?
  [..]
  log /var/log/mail.log.5.gz doesn't exist -- won't try to dispose of it

  exitcode: 0


  
  1) The release of Ubuntu you are using, via 'lsb_release -rd' or System - 
About Ubuntu
  Description:  Ubuntu 12.04.3 LTS
  Release:  12.04

  2) The version of the package you are using, via 'apt-cache policy pkgname' 
or by checking in Software Center
  logrotate:
Installed: 3.7.8-6ubuntu5
Candidate: 3.7.8-6ubuntu5

  3) What you expected to happen
  debug mode should not output an error and should have exitcode 0

  4) What happened instead
  debug mode prints an error and has exitcode 1

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/logrotate/+bug/1320201/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : 

[Touch-packages] [Bug 1320201] Re: behaviour in debug mode doesn't match real behaviour

2015-05-20 Thread Sergey V
Any news here?

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to logrotate in Ubuntu.
https://bugs.launchpad.net/bugs/1320201

Title:
  behaviour in debug mode doesn't match real behaviour

Status in logrotate package in Ubuntu:
  Confirmed

Bug description:
  Situation: a single log file (no earlier rotates) and a logrotate
  status that says it is time to rotate.

  # ls -l /var/log/mail.log*
  -rw-r- 1 syslog adm 287 May 16 11:27 /var/log/mail.log

  # cat /var/lib/logrotate/status 
  logrotate state -- version 2
  /var/log/mail.log 2012-3-31

  # cat /tmp/test.conf 
  /var/log/mail.log
  {
rotate 4
weekly
missingok
notifempty
compress
delaycompress
sharedscripts
postrotate
reload rsyslog /dev/null 21 || true
endscript
  }

  logrotate in debug mode will fail, because it simulates removing a
  non-existing mail.log.5.gz:

  # logrotate -d /tmp/test.conf; echo $?
  reading config file /tmp/test.conf
  reading config info for /var/log/mail.log

  
  Handling 1 logs

  rotating pattern: /var/log/mail.log
   weekly (4 rotations)
  empty log files are not rotated, old logs are removed
  considering log /var/log/mail.log
log needs rotating
  rotating log /var/log/mail.log, log-rotateCount is 4
  dateext suffix '-20140516'
  glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
  previous log /var/log/mail.log.1 does not exist
  renaming /var/log/mail.log.4.gz to /var/log/mail.log.5.gz (rotatecount 4, 
logstart 1, i 4), 
  renaming /var/log/mail.log.3.gz to /var/log/mail.log.4.gz (rotatecount 4, 
logstart 1, i 3), 
  renaming /var/log/mail.log.2.gz to /var/log/mail.log.3.gz (rotatecount 4, 
logstart 1, i 2), 
  renaming /var/log/mail.log.1.gz to /var/log/mail.log.2.gz (rotatecount 4, 
logstart 1, i 1), 
  renaming /var/log/mail.log.0.gz to /var/log/mail.log.1.gz (rotatecount 4, 
logstart 1, i 0), 
  renaming /var/log/mail.log to /var/log/mail.log.1
  running postrotate script
  running script (multiple) with arg /var/log/mail.log
  : 
reload rsyslog /dev/null 21 || true
  
  removing old log /var/log/mail.log.5.gz
  error: error opening /var/log/mail.log.5.gz: No such file or directory
  1

  
  logrotate's real behaviour handles this situation correctly:

  # logrotate -v /tmp/test.conf; echo $?
  reading config file /tmp/test.conf
  reading config info for /var/log/mail.log

  
  Handling 1 logs

  rotating pattern: /var/log/mail.log
   weekly (4 rotations)
  empty log files are not rotated, old logs are removed
  considering log /var/log/mail.log
log needs rotating
  rotating log /var/log/mail.log, log-rotateCount is 4
  dateext suffix '-20140516'
  glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
  previous log /var/log/mail.log.1 does not exist
  renaming /var/log/mail.log.4.gz to /var/log/mail.log.5.gz (rotatecount 4, 
logstart 1, i 4), 
  old log /var/log/mail.log.4.gz does not exist
  renaming /var/log/mail.log.3.gz to /var/log/mail.log.4.gz (rotatecount 4, 
logstart 1, i 3), 
  old log /var/log/mail.log.3.gz does not exist
  renaming /var/log/mail.log.2.gz to /var/log/mail.log.3.gz (rotatecount 4, 
logstart 1, i 2), 
  old log /var/log/mail.log.2.gz does not exist
  renaming /var/log/mail.log.1.gz to /var/log/mail.log.2.gz (rotatecount 4, 
logstart 1, i 1), 
  old log /var/log/mail.log.1.gz does not exist
  renaming /var/log/mail.log.0.gz to /var/log/mail.log.1.gz (rotatecount 4, 
logstart 1, i 0), 
  old log /var/log/mail.log.0.gz does not exist
  log /var/log/mail.log.5.gz doesn't exist -- won't try to dispose of it
  renaming /var/log/mail.log to /var/log/mail.log.1
  running postrotate script
  0

  
  Summary:

  # logrotate -d /tmp/test.conf; echo $?
  [..]
  removing old log /var/log/mail.log.5.gz
  error: error opening /var/log/mail.log.5.gz: No such file or directory

  exitcode: 1

  # logrotate -v /tmp/test.conf; echo $?
  [..]
  log /var/log/mail.log.5.gz doesn't exist -- won't try to dispose of it

  exitcode: 0


  
  1) The release of Ubuntu you are using, via 'lsb_release -rd' or System - 
About Ubuntu
  Description:  Ubuntu 12.04.3 LTS
  Release:  12.04

  2) The version of the package you are using, via 'apt-cache policy pkgname' 
or by checking in Software Center
  logrotate:
Installed: 3.7.8-6ubuntu5
Candidate: 3.7.8-6ubuntu5

  3) What you expected to happen
  debug mode should not output an error and should have exitcode 0

  4) What happened instead
  debug mode prints an error and has exitcode 1

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/logrotate/+bug/1320201/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1320201] Re: behaviour in debug mode doesn't match real behaviour

2015-04-03 Thread Sergey V
Upstream release 3.9.1 contains this fix.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to logrotate in Ubuntu.
https://bugs.launchpad.net/bugs/1320201

Title:
  behaviour in debug mode doesn't match real behaviour

Status in logrotate package in Ubuntu:
  Confirmed

Bug description:
  Situation: a single log file (no earlier rotates) and a logrotate
  status that says it is time to rotate.

  # ls -l /var/log/mail.log*
  -rw-r- 1 syslog adm 287 May 16 11:27 /var/log/mail.log

  # cat /var/lib/logrotate/status 
  logrotate state -- version 2
  /var/log/mail.log 2012-3-31

  # cat /tmp/test.conf 
  /var/log/mail.log
  {
rotate 4
weekly
missingok
notifempty
compress
delaycompress
sharedscripts
postrotate
reload rsyslog /dev/null 21 || true
endscript
  }

  logrotate in debug mode will fail, because it simulates removing a
  non-existing mail.log.5.gz:

  # logrotate -d /tmp/test.conf; echo $?
  reading config file /tmp/test.conf
  reading config info for /var/log/mail.log

  
  Handling 1 logs

  rotating pattern: /var/log/mail.log
   weekly (4 rotations)
  empty log files are not rotated, old logs are removed
  considering log /var/log/mail.log
log needs rotating
  rotating log /var/log/mail.log, log-rotateCount is 4
  dateext suffix '-20140516'
  glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
  previous log /var/log/mail.log.1 does not exist
  renaming /var/log/mail.log.4.gz to /var/log/mail.log.5.gz (rotatecount 4, 
logstart 1, i 4), 
  renaming /var/log/mail.log.3.gz to /var/log/mail.log.4.gz (rotatecount 4, 
logstart 1, i 3), 
  renaming /var/log/mail.log.2.gz to /var/log/mail.log.3.gz (rotatecount 4, 
logstart 1, i 2), 
  renaming /var/log/mail.log.1.gz to /var/log/mail.log.2.gz (rotatecount 4, 
logstart 1, i 1), 
  renaming /var/log/mail.log.0.gz to /var/log/mail.log.1.gz (rotatecount 4, 
logstart 1, i 0), 
  renaming /var/log/mail.log to /var/log/mail.log.1
  running postrotate script
  running script (multiple) with arg /var/log/mail.log
  : 
reload rsyslog /dev/null 21 || true
  
  removing old log /var/log/mail.log.5.gz
  error: error opening /var/log/mail.log.5.gz: No such file or directory
  1

  
  logrotate's real behaviour handles this situation correctly:

  # logrotate -v /tmp/test.conf; echo $?
  reading config file /tmp/test.conf
  reading config info for /var/log/mail.log

  
  Handling 1 logs

  rotating pattern: /var/log/mail.log
   weekly (4 rotations)
  empty log files are not rotated, old logs are removed
  considering log /var/log/mail.log
log needs rotating
  rotating log /var/log/mail.log, log-rotateCount is 4
  dateext suffix '-20140516'
  glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
  previous log /var/log/mail.log.1 does not exist
  renaming /var/log/mail.log.4.gz to /var/log/mail.log.5.gz (rotatecount 4, 
logstart 1, i 4), 
  old log /var/log/mail.log.4.gz does not exist
  renaming /var/log/mail.log.3.gz to /var/log/mail.log.4.gz (rotatecount 4, 
logstart 1, i 3), 
  old log /var/log/mail.log.3.gz does not exist
  renaming /var/log/mail.log.2.gz to /var/log/mail.log.3.gz (rotatecount 4, 
logstart 1, i 2), 
  old log /var/log/mail.log.2.gz does not exist
  renaming /var/log/mail.log.1.gz to /var/log/mail.log.2.gz (rotatecount 4, 
logstart 1, i 1), 
  old log /var/log/mail.log.1.gz does not exist
  renaming /var/log/mail.log.0.gz to /var/log/mail.log.1.gz (rotatecount 4, 
logstart 1, i 0), 
  old log /var/log/mail.log.0.gz does not exist
  log /var/log/mail.log.5.gz doesn't exist -- won't try to dispose of it
  renaming /var/log/mail.log to /var/log/mail.log.1
  running postrotate script
  0

  
  Summary:

  # logrotate -d /tmp/test.conf; echo $?
  [..]
  removing old log /var/log/mail.log.5.gz
  error: error opening /var/log/mail.log.5.gz: No such file or directory

  exitcode: 1

  # logrotate -v /tmp/test.conf; echo $?
  [..]
  log /var/log/mail.log.5.gz doesn't exist -- won't try to dispose of it

  exitcode: 0


  
  1) The release of Ubuntu you are using, via 'lsb_release -rd' or System - 
About Ubuntu
  Description:  Ubuntu 12.04.3 LTS
  Release:  12.04

  2) The version of the package you are using, via 'apt-cache policy pkgname' 
or by checking in Software Center
  logrotate:
Installed: 3.7.8-6ubuntu5
Candidate: 3.7.8-6ubuntu5

  3) What you expected to happen
  debug mode should not output an error and should have exitcode 0

  4) What happened instead
  debug mode prints an error and has exitcode 1

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/logrotate/+bug/1320201/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1320201] Re: behaviour in debug mode doesn't match real behaviour

2015-04-02 Thread Sergey V
I tested the patch, and seems it works as expected.

#old version, reproduce bug

hostname:~/logrotate# for i in `seq 1 10` ; do echo some entry $i 
/tmp/some.log; done

hostname:~/logrotate# cat /tmp/some.conf 
/tmp/some.log
{
 rotate 4
 weekly
 size 10
 missingok
 notifempty
 compress
 delaycompress
 sharedscripts
 postrotate
  reload rsyslog /dev/null 21 || true
 endscript
}

hostname:~/logrotate# ./logrotate -d /tmp/some.conf ; echo $?
reading config file /tmp/some.conf

Handling 1 logs

rotating pattern: /tmp/some.log
 10 bytes (4 rotations)
empty log files are not rotated, old logs are removed
considering log /tmp/some.log
  log needs rotating
rotating log /tmp/some.log, log-rotateCount is 4
dateext suffix '-20150317'
glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
previous log /tmp/some.log.1 does not exist
renaming /tmp/some.log.4.gz to /tmp/some.log.5.gz (rotatecount 4, logstart 1, i 
4), 
renaming /tmp/some.log.3.gz to /tmp/some.log.4.gz (rotatecount 4, logstart 1, i 
3), 
renaming /tmp/some.log.2.gz to /tmp/some.log.3.gz (rotatecount 4, logstart 1, i 
2), 
renaming /tmp/some.log.1.gz to /tmp/some.log.2.gz (rotatecount 4, logstart 1, i 
1), 
renaming /tmp/some.log.0.gz to /tmp/some.log.1.gz (rotatecount 4, logstart 1, i 
0), 
renaming /tmp/some.log to /tmp/some.log.1
running postrotate script
running script with arg /tmp/some.log
: 
  reload rsyslog /dev/null 21 || true

removing old log /tmp/some.log.5.gz
error: error opening /tmp/some.log.5.gz: No such file or directory
1

hostname:~/logrotate# ./logrotate -v /tmp/some.conf ; echo $?
reading config file /tmp/some.conf

Handling 1 logs

rotating pattern: /tmp/some.log
 10 bytes (4 rotations)
empty log files are not rotated, old logs are removed
considering log /tmp/some.log
  log needs rotating
rotating log /tmp/some.log, log-rotateCount is 4
dateext suffix '-20150317'
glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
previous log /tmp/some.log.1 does not exist
renaming /tmp/some.log.4.gz to /tmp/some.log.5.gz (rotatecount 4, logstart 1, i 
4), 
old log /tmp/some.log.4.gz does not exist
renaming /tmp/some.log.3.gz to /tmp/some.log.4.gz (rotatecount 4, logstart 1, i 
3), 
old log /tmp/some.log.3.gz does not exist
renaming /tmp/some.log.2.gz to /tmp/some.log.3.gz (rotatecount 4, logstart 1, i 
2), 
old log /tmp/some.log.2.gz does not exist
renaming /tmp/some.log.1.gz to /tmp/some.log.2.gz (rotatecount 4, logstart 1, i 
1), 
old log /tmp/some.log.1.gz does not exist
renaming /tmp/some.log.0.gz to /tmp/some.log.1.gz (rotatecount 4, logstart 1, i 
0), 
old log /tmp/some.log.0.gz does not exist
log /tmp/some.log.5.gz doesn't exist -- won't try to dispose of it
renaming /tmp/some.log to /tmp/some.log.1
running postrotate script
0


# after applying patch, compile new version and check

hostname:~/logrotate# ./configure 
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for gcc option to accept ISO C99... -std=gnu99
checking for gcc -std=gnu99 option to accept ISO Standard C... (cached) 
-std=gnu99
checking for poptParseArgvString in -lpopt... yes
checking for getfscreatecon_raw in -lselinux... no
checking for acl_get_file in -lacl... no
checking for strptime... yes
checking for qsort... yes
checking for fork... yes
checking for vfork... yes
checking for madvise... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating test/Makefile
config.status: executing depfiles commands
hostname:~/logrotate# make clean
Making clean in test
make[1]: Entering directory `/root/logrotate/test'
make[1]: Nothing to be done for `clean'.
make[1]: Leaving directory `/root/logrotate/test'
make[1]: Entering directory `/root/logrotate'
test -z logrotate || rm -f logrotate
rm -f *.o
make[1]: Leaving directory `/root/logrotate'
hostname:~/logrotate# make
Making all in test
make[1]: Entering directory `/root/logrotate/test'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/root/logrotate/test'
make[1]: Entering directory `/root/logrotate'
gcc -std=gnu99 -DPACKAGE_NAME=\logrotate\ -DPACKAGE_TARNAME=\logrotate\ 

[Touch-packages] [Bug 1320201] Re: behaviour in debug mode doesn't match real behaviour

2015-04-01 Thread Sergey V
Well, now patch is applied to upstream in r477 (svn repo:
http://svn.fedorahosted.org/svn/logrotate/trunk ).

Any chances to get it in ubuntu?

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to logrotate in Ubuntu.
https://bugs.launchpad.net/bugs/1320201

Title:
  behaviour in debug mode doesn't match real behaviour

Status in logrotate package in Ubuntu:
  Confirmed

Bug description:
  Situation: a single log file (no earlier rotates) and a logrotate
  status that says it is time to rotate.

  # ls -l /var/log/mail.log*
  -rw-r- 1 syslog adm 287 May 16 11:27 /var/log/mail.log

  # cat /var/lib/logrotate/status 
  logrotate state -- version 2
  /var/log/mail.log 2012-3-31

  # cat /tmp/test.conf 
  /var/log/mail.log
  {
rotate 4
weekly
missingok
notifempty
compress
delaycompress
sharedscripts
postrotate
reload rsyslog /dev/null 21 || true
endscript
  }

  logrotate in debug mode will fail, because it simulates removing a
  non-existing mail.log.5.gz:

  # logrotate -d /tmp/test.conf; echo $?
  reading config file /tmp/test.conf
  reading config info for /var/log/mail.log

  
  Handling 1 logs

  rotating pattern: /var/log/mail.log
   weekly (4 rotations)
  empty log files are not rotated, old logs are removed
  considering log /var/log/mail.log
log needs rotating
  rotating log /var/log/mail.log, log-rotateCount is 4
  dateext suffix '-20140516'
  glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
  previous log /var/log/mail.log.1 does not exist
  renaming /var/log/mail.log.4.gz to /var/log/mail.log.5.gz (rotatecount 4, 
logstart 1, i 4), 
  renaming /var/log/mail.log.3.gz to /var/log/mail.log.4.gz (rotatecount 4, 
logstart 1, i 3), 
  renaming /var/log/mail.log.2.gz to /var/log/mail.log.3.gz (rotatecount 4, 
logstart 1, i 2), 
  renaming /var/log/mail.log.1.gz to /var/log/mail.log.2.gz (rotatecount 4, 
logstart 1, i 1), 
  renaming /var/log/mail.log.0.gz to /var/log/mail.log.1.gz (rotatecount 4, 
logstart 1, i 0), 
  renaming /var/log/mail.log to /var/log/mail.log.1
  running postrotate script
  running script (multiple) with arg /var/log/mail.log
  : 
reload rsyslog /dev/null 21 || true
  
  removing old log /var/log/mail.log.5.gz
  error: error opening /var/log/mail.log.5.gz: No such file or directory
  1

  
  logrotate's real behaviour handles this situation correctly:

  # logrotate -v /tmp/test.conf; echo $?
  reading config file /tmp/test.conf
  reading config info for /var/log/mail.log

  
  Handling 1 logs

  rotating pattern: /var/log/mail.log
   weekly (4 rotations)
  empty log files are not rotated, old logs are removed
  considering log /var/log/mail.log
log needs rotating
  rotating log /var/log/mail.log, log-rotateCount is 4
  dateext suffix '-20140516'
  glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
  previous log /var/log/mail.log.1 does not exist
  renaming /var/log/mail.log.4.gz to /var/log/mail.log.5.gz (rotatecount 4, 
logstart 1, i 4), 
  old log /var/log/mail.log.4.gz does not exist
  renaming /var/log/mail.log.3.gz to /var/log/mail.log.4.gz (rotatecount 4, 
logstart 1, i 3), 
  old log /var/log/mail.log.3.gz does not exist
  renaming /var/log/mail.log.2.gz to /var/log/mail.log.3.gz (rotatecount 4, 
logstart 1, i 2), 
  old log /var/log/mail.log.2.gz does not exist
  renaming /var/log/mail.log.1.gz to /var/log/mail.log.2.gz (rotatecount 4, 
logstart 1, i 1), 
  old log /var/log/mail.log.1.gz does not exist
  renaming /var/log/mail.log.0.gz to /var/log/mail.log.1.gz (rotatecount 4, 
logstart 1, i 0), 
  old log /var/log/mail.log.0.gz does not exist
  log /var/log/mail.log.5.gz doesn't exist -- won't try to dispose of it
  renaming /var/log/mail.log to /var/log/mail.log.1
  running postrotate script
  0

  
  Summary:

  # logrotate -d /tmp/test.conf; echo $?
  [..]
  removing old log /var/log/mail.log.5.gz
  error: error opening /var/log/mail.log.5.gz: No such file or directory

  exitcode: 1

  # logrotate -v /tmp/test.conf; echo $?
  [..]
  log /var/log/mail.log.5.gz doesn't exist -- won't try to dispose of it

  exitcode: 0


  
  1) The release of Ubuntu you are using, via 'lsb_release -rd' or System - 
About Ubuntu
  Description:  Ubuntu 12.04.3 LTS
  Release:  12.04

  2) The version of the package you are using, via 'apt-cache policy pkgname' 
or by checking in Software Center
  logrotate:
Installed: 3.7.8-6ubuntu5
Candidate: 3.7.8-6ubuntu5

  3) What you expected to happen
  debug mode should not output an error and should have exitcode 0

  4) What happened instead
  debug mode prints an error and has exitcode 1

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/logrotate/+bug/1320201/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : 

[Touch-packages] [Bug 1320201] Re: behaviour in debug mode doesn't match real behaviour

2015-04-01 Thread Gertjan Oude Lohuis
Sorry for not responding earlier, haven't had a chance to test the new
behaviour. Great that this bug is fixed, will test it shortly. Thanks!

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to logrotate in Ubuntu.
https://bugs.launchpad.net/bugs/1320201

Title:
  behaviour in debug mode doesn't match real behaviour

Status in logrotate package in Ubuntu:
  Confirmed

Bug description:
  Situation: a single log file (no earlier rotates) and a logrotate
  status that says it is time to rotate.

  # ls -l /var/log/mail.log*
  -rw-r- 1 syslog adm 287 May 16 11:27 /var/log/mail.log

  # cat /var/lib/logrotate/status 
  logrotate state -- version 2
  /var/log/mail.log 2012-3-31

  # cat /tmp/test.conf 
  /var/log/mail.log
  {
rotate 4
weekly
missingok
notifempty
compress
delaycompress
sharedscripts
postrotate
reload rsyslog /dev/null 21 || true
endscript
  }

  logrotate in debug mode will fail, because it simulates removing a
  non-existing mail.log.5.gz:

  # logrotate -d /tmp/test.conf; echo $?
  reading config file /tmp/test.conf
  reading config info for /var/log/mail.log

  
  Handling 1 logs

  rotating pattern: /var/log/mail.log
   weekly (4 rotations)
  empty log files are not rotated, old logs are removed
  considering log /var/log/mail.log
log needs rotating
  rotating log /var/log/mail.log, log-rotateCount is 4
  dateext suffix '-20140516'
  glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
  previous log /var/log/mail.log.1 does not exist
  renaming /var/log/mail.log.4.gz to /var/log/mail.log.5.gz (rotatecount 4, 
logstart 1, i 4), 
  renaming /var/log/mail.log.3.gz to /var/log/mail.log.4.gz (rotatecount 4, 
logstart 1, i 3), 
  renaming /var/log/mail.log.2.gz to /var/log/mail.log.3.gz (rotatecount 4, 
logstart 1, i 2), 
  renaming /var/log/mail.log.1.gz to /var/log/mail.log.2.gz (rotatecount 4, 
logstart 1, i 1), 
  renaming /var/log/mail.log.0.gz to /var/log/mail.log.1.gz (rotatecount 4, 
logstart 1, i 0), 
  renaming /var/log/mail.log to /var/log/mail.log.1
  running postrotate script
  running script (multiple) with arg /var/log/mail.log
  : 
reload rsyslog /dev/null 21 || true
  
  removing old log /var/log/mail.log.5.gz
  error: error opening /var/log/mail.log.5.gz: No such file or directory
  1

  
  logrotate's real behaviour handles this situation correctly:

  # logrotate -v /tmp/test.conf; echo $?
  reading config file /tmp/test.conf
  reading config info for /var/log/mail.log

  
  Handling 1 logs

  rotating pattern: /var/log/mail.log
   weekly (4 rotations)
  empty log files are not rotated, old logs are removed
  considering log /var/log/mail.log
log needs rotating
  rotating log /var/log/mail.log, log-rotateCount is 4
  dateext suffix '-20140516'
  glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
  previous log /var/log/mail.log.1 does not exist
  renaming /var/log/mail.log.4.gz to /var/log/mail.log.5.gz (rotatecount 4, 
logstart 1, i 4), 
  old log /var/log/mail.log.4.gz does not exist
  renaming /var/log/mail.log.3.gz to /var/log/mail.log.4.gz (rotatecount 4, 
logstart 1, i 3), 
  old log /var/log/mail.log.3.gz does not exist
  renaming /var/log/mail.log.2.gz to /var/log/mail.log.3.gz (rotatecount 4, 
logstart 1, i 2), 
  old log /var/log/mail.log.2.gz does not exist
  renaming /var/log/mail.log.1.gz to /var/log/mail.log.2.gz (rotatecount 4, 
logstart 1, i 1), 
  old log /var/log/mail.log.1.gz does not exist
  renaming /var/log/mail.log.0.gz to /var/log/mail.log.1.gz (rotatecount 4, 
logstart 1, i 0), 
  old log /var/log/mail.log.0.gz does not exist
  log /var/log/mail.log.5.gz doesn't exist -- won't try to dispose of it
  renaming /var/log/mail.log to /var/log/mail.log.1
  running postrotate script
  0

  
  Summary:

  # logrotate -d /tmp/test.conf; echo $?
  [..]
  removing old log /var/log/mail.log.5.gz
  error: error opening /var/log/mail.log.5.gz: No such file or directory

  exitcode: 1

  # logrotate -v /tmp/test.conf; echo $?
  [..]
  log /var/log/mail.log.5.gz doesn't exist -- won't try to dispose of it

  exitcode: 0


  
  1) The release of Ubuntu you are using, via 'lsb_release -rd' or System - 
About Ubuntu
  Description:  Ubuntu 12.04.3 LTS
  Release:  12.04

  2) The version of the package you are using, via 'apt-cache policy pkgname' 
or by checking in Software Center
  logrotate:
Installed: 3.7.8-6ubuntu5
Candidate: 3.7.8-6ubuntu5

  3) What you expected to happen
  debug mode should not output an error and should have exitcode 0

  4) What happened instead
  debug mode prints an error and has exitcode 1

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/logrotate/+bug/1320201/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : 

[Touch-packages] [Bug 1320201] Re: behaviour in debug mode doesn't match real behaviour

2015-03-24 Thread Sergey V
Ping?

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to logrotate in Ubuntu.
https://bugs.launchpad.net/bugs/1320201

Title:
  behaviour in debug mode doesn't match real behaviour

Status in logrotate package in Ubuntu:
  Confirmed

Bug description:
  Situation: a single log file (no earlier rotates) and a logrotate
  status that says it is time to rotate.

  # ls -l /var/log/mail.log*
  -rw-r- 1 syslog adm 287 May 16 11:27 /var/log/mail.log

  # cat /var/lib/logrotate/status 
  logrotate state -- version 2
  /var/log/mail.log 2012-3-31

  # cat /tmp/test.conf 
  /var/log/mail.log
  {
rotate 4
weekly
missingok
notifempty
compress
delaycompress
sharedscripts
postrotate
reload rsyslog /dev/null 21 || true
endscript
  }

  logrotate in debug mode will fail, because it simulates removing a
  non-existing mail.log.5.gz:

  # logrotate -d /tmp/test.conf; echo $?
  reading config file /tmp/test.conf
  reading config info for /var/log/mail.log

  
  Handling 1 logs

  rotating pattern: /var/log/mail.log
   weekly (4 rotations)
  empty log files are not rotated, old logs are removed
  considering log /var/log/mail.log
log needs rotating
  rotating log /var/log/mail.log, log-rotateCount is 4
  dateext suffix '-20140516'
  glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
  previous log /var/log/mail.log.1 does not exist
  renaming /var/log/mail.log.4.gz to /var/log/mail.log.5.gz (rotatecount 4, 
logstart 1, i 4), 
  renaming /var/log/mail.log.3.gz to /var/log/mail.log.4.gz (rotatecount 4, 
logstart 1, i 3), 
  renaming /var/log/mail.log.2.gz to /var/log/mail.log.3.gz (rotatecount 4, 
logstart 1, i 2), 
  renaming /var/log/mail.log.1.gz to /var/log/mail.log.2.gz (rotatecount 4, 
logstart 1, i 1), 
  renaming /var/log/mail.log.0.gz to /var/log/mail.log.1.gz (rotatecount 4, 
logstart 1, i 0), 
  renaming /var/log/mail.log to /var/log/mail.log.1
  running postrotate script
  running script (multiple) with arg /var/log/mail.log
  : 
reload rsyslog /dev/null 21 || true
  
  removing old log /var/log/mail.log.5.gz
  error: error opening /var/log/mail.log.5.gz: No such file or directory
  1

  
  logrotate's real behaviour handles this situation correctly:

  # logrotate -v /tmp/test.conf; echo $?
  reading config file /tmp/test.conf
  reading config info for /var/log/mail.log

  
  Handling 1 logs

  rotating pattern: /var/log/mail.log
   weekly (4 rotations)
  empty log files are not rotated, old logs are removed
  considering log /var/log/mail.log
log needs rotating
  rotating log /var/log/mail.log, log-rotateCount is 4
  dateext suffix '-20140516'
  glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
  previous log /var/log/mail.log.1 does not exist
  renaming /var/log/mail.log.4.gz to /var/log/mail.log.5.gz (rotatecount 4, 
logstart 1, i 4), 
  old log /var/log/mail.log.4.gz does not exist
  renaming /var/log/mail.log.3.gz to /var/log/mail.log.4.gz (rotatecount 4, 
logstart 1, i 3), 
  old log /var/log/mail.log.3.gz does not exist
  renaming /var/log/mail.log.2.gz to /var/log/mail.log.3.gz (rotatecount 4, 
logstart 1, i 2), 
  old log /var/log/mail.log.2.gz does not exist
  renaming /var/log/mail.log.1.gz to /var/log/mail.log.2.gz (rotatecount 4, 
logstart 1, i 1), 
  old log /var/log/mail.log.1.gz does not exist
  renaming /var/log/mail.log.0.gz to /var/log/mail.log.1.gz (rotatecount 4, 
logstart 1, i 0), 
  old log /var/log/mail.log.0.gz does not exist
  log /var/log/mail.log.5.gz doesn't exist -- won't try to dispose of it
  renaming /var/log/mail.log to /var/log/mail.log.1
  running postrotate script
  0

  
  Summary:

  # logrotate -d /tmp/test.conf; echo $?
  [..]
  removing old log /var/log/mail.log.5.gz
  error: error opening /var/log/mail.log.5.gz: No such file or directory

  exitcode: 1

  # logrotate -v /tmp/test.conf; echo $?
  [..]
  log /var/log/mail.log.5.gz doesn't exist -- won't try to dispose of it

  exitcode: 0


  
  1) The release of Ubuntu you are using, via 'lsb_release -rd' or System - 
About Ubuntu
  Description:  Ubuntu 12.04.3 LTS
  Release:  12.04

  2) The version of the package you are using, via 'apt-cache policy pkgname' 
or by checking in Software Center
  logrotate:
Installed: 3.7.8-6ubuntu5
Candidate: 3.7.8-6ubuntu5

  3) What you expected to happen
  debug mode should not output an error and should have exitcode 0

  4) What happened instead
  debug mode prints an error and has exitcode 1

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/logrotate/+bug/1320201/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1320201] Re: behaviour in debug mode doesn't match real behaviour

2015-03-17 Thread Алексей
Some news? Bug affects 3.8.7-1ubuntu1 version too

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to logrotate in Ubuntu.
https://bugs.launchpad.net/bugs/1320201

Title:
  behaviour in debug mode doesn't match real behaviour

Status in logrotate package in Ubuntu:
  Confirmed

Bug description:
  Situation: a single log file (no earlier rotates) and a logrotate
  status that says it is time to rotate.

  # ls -l /var/log/mail.log*
  -rw-r- 1 syslog adm 287 May 16 11:27 /var/log/mail.log

  # cat /var/lib/logrotate/status 
  logrotate state -- version 2
  /var/log/mail.log 2012-3-31

  # cat /tmp/test.conf 
  /var/log/mail.log
  {
rotate 4
weekly
missingok
notifempty
compress
delaycompress
sharedscripts
postrotate
reload rsyslog /dev/null 21 || true
endscript
  }

  logrotate in debug mode will fail, because it simulates removing a
  non-existing mail.log.5.gz:

  # logrotate -d /tmp/test.conf; echo $?
  reading config file /tmp/test.conf
  reading config info for /var/log/mail.log

  
  Handling 1 logs

  rotating pattern: /var/log/mail.log
   weekly (4 rotations)
  empty log files are not rotated, old logs are removed
  considering log /var/log/mail.log
log needs rotating
  rotating log /var/log/mail.log, log-rotateCount is 4
  dateext suffix '-20140516'
  glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
  previous log /var/log/mail.log.1 does not exist
  renaming /var/log/mail.log.4.gz to /var/log/mail.log.5.gz (rotatecount 4, 
logstart 1, i 4), 
  renaming /var/log/mail.log.3.gz to /var/log/mail.log.4.gz (rotatecount 4, 
logstart 1, i 3), 
  renaming /var/log/mail.log.2.gz to /var/log/mail.log.3.gz (rotatecount 4, 
logstart 1, i 2), 
  renaming /var/log/mail.log.1.gz to /var/log/mail.log.2.gz (rotatecount 4, 
logstart 1, i 1), 
  renaming /var/log/mail.log.0.gz to /var/log/mail.log.1.gz (rotatecount 4, 
logstart 1, i 0), 
  renaming /var/log/mail.log to /var/log/mail.log.1
  running postrotate script
  running script (multiple) with arg /var/log/mail.log
  : 
reload rsyslog /dev/null 21 || true
  
  removing old log /var/log/mail.log.5.gz
  error: error opening /var/log/mail.log.5.gz: No such file or directory
  1

  
  logrotate's real behaviour handles this situation correctly:

  # logrotate -v /tmp/test.conf; echo $?
  reading config file /tmp/test.conf
  reading config info for /var/log/mail.log

  
  Handling 1 logs

  rotating pattern: /var/log/mail.log
   weekly (4 rotations)
  empty log files are not rotated, old logs are removed
  considering log /var/log/mail.log
log needs rotating
  rotating log /var/log/mail.log, log-rotateCount is 4
  dateext suffix '-20140516'
  glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
  previous log /var/log/mail.log.1 does not exist
  renaming /var/log/mail.log.4.gz to /var/log/mail.log.5.gz (rotatecount 4, 
logstart 1, i 4), 
  old log /var/log/mail.log.4.gz does not exist
  renaming /var/log/mail.log.3.gz to /var/log/mail.log.4.gz (rotatecount 4, 
logstart 1, i 3), 
  old log /var/log/mail.log.3.gz does not exist
  renaming /var/log/mail.log.2.gz to /var/log/mail.log.3.gz (rotatecount 4, 
logstart 1, i 2), 
  old log /var/log/mail.log.2.gz does not exist
  renaming /var/log/mail.log.1.gz to /var/log/mail.log.2.gz (rotatecount 4, 
logstart 1, i 1), 
  old log /var/log/mail.log.1.gz does not exist
  renaming /var/log/mail.log.0.gz to /var/log/mail.log.1.gz (rotatecount 4, 
logstart 1, i 0), 
  old log /var/log/mail.log.0.gz does not exist
  log /var/log/mail.log.5.gz doesn't exist -- won't try to dispose of it
  renaming /var/log/mail.log to /var/log/mail.log.1
  running postrotate script
  0

  
  Summary:

  # logrotate -d /tmp/test.conf; echo $?
  [..]
  removing old log /var/log/mail.log.5.gz
  error: error opening /var/log/mail.log.5.gz: No such file or directory

  exitcode: 1

  # logrotate -v /tmp/test.conf; echo $?
  [..]
  log /var/log/mail.log.5.gz doesn't exist -- won't try to dispose of it

  exitcode: 0


  
  1) The release of Ubuntu you are using, via 'lsb_release -rd' or System - 
About Ubuntu
  Description:  Ubuntu 12.04.3 LTS
  Release:  12.04

  2) The version of the package you are using, via 'apt-cache policy pkgname' 
or by checking in Software Center
  logrotate:
Installed: 3.7.8-6ubuntu5
Candidate: 3.7.8-6ubuntu5

  3) What you expected to happen
  debug mode should not output an error and should have exitcode 0

  4) What happened instead
  debug mode prints an error and has exitcode 1

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/logrotate/+bug/1320201/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1320201] Re: behaviour in debug mode doesn't match real behaviour

2015-03-17 Thread Sergey V
I prepared a patch to fix this issue (atteched).

Can anyone review please?

** Patch added: 
0001-If-the-last-rotation-doesn-t-exist-that-s-okay-even-.patch
   
https://bugs.launchpad.net/ubuntu/+source/logrotate/+bug/1320201/+attachment/4347726/+files/0001-If-the-last-rotation-doesn-t-exist-that-s-okay-even-.patch

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to logrotate in Ubuntu.
https://bugs.launchpad.net/bugs/1320201

Title:
  behaviour in debug mode doesn't match real behaviour

Status in logrotate package in Ubuntu:
  Confirmed

Bug description:
  Situation: a single log file (no earlier rotates) and a logrotate
  status that says it is time to rotate.

  # ls -l /var/log/mail.log*
  -rw-r- 1 syslog adm 287 May 16 11:27 /var/log/mail.log

  # cat /var/lib/logrotate/status 
  logrotate state -- version 2
  /var/log/mail.log 2012-3-31

  # cat /tmp/test.conf 
  /var/log/mail.log
  {
rotate 4
weekly
missingok
notifempty
compress
delaycompress
sharedscripts
postrotate
reload rsyslog /dev/null 21 || true
endscript
  }

  logrotate in debug mode will fail, because it simulates removing a
  non-existing mail.log.5.gz:

  # logrotate -d /tmp/test.conf; echo $?
  reading config file /tmp/test.conf
  reading config info for /var/log/mail.log

  
  Handling 1 logs

  rotating pattern: /var/log/mail.log
   weekly (4 rotations)
  empty log files are not rotated, old logs are removed
  considering log /var/log/mail.log
log needs rotating
  rotating log /var/log/mail.log, log-rotateCount is 4
  dateext suffix '-20140516'
  glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
  previous log /var/log/mail.log.1 does not exist
  renaming /var/log/mail.log.4.gz to /var/log/mail.log.5.gz (rotatecount 4, 
logstart 1, i 4), 
  renaming /var/log/mail.log.3.gz to /var/log/mail.log.4.gz (rotatecount 4, 
logstart 1, i 3), 
  renaming /var/log/mail.log.2.gz to /var/log/mail.log.3.gz (rotatecount 4, 
logstart 1, i 2), 
  renaming /var/log/mail.log.1.gz to /var/log/mail.log.2.gz (rotatecount 4, 
logstart 1, i 1), 
  renaming /var/log/mail.log.0.gz to /var/log/mail.log.1.gz (rotatecount 4, 
logstart 1, i 0), 
  renaming /var/log/mail.log to /var/log/mail.log.1
  running postrotate script
  running script (multiple) with arg /var/log/mail.log
  : 
reload rsyslog /dev/null 21 || true
  
  removing old log /var/log/mail.log.5.gz
  error: error opening /var/log/mail.log.5.gz: No such file or directory
  1

  
  logrotate's real behaviour handles this situation correctly:

  # logrotate -v /tmp/test.conf; echo $?
  reading config file /tmp/test.conf
  reading config info for /var/log/mail.log

  
  Handling 1 logs

  rotating pattern: /var/log/mail.log
   weekly (4 rotations)
  empty log files are not rotated, old logs are removed
  considering log /var/log/mail.log
log needs rotating
  rotating log /var/log/mail.log, log-rotateCount is 4
  dateext suffix '-20140516'
  glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
  previous log /var/log/mail.log.1 does not exist
  renaming /var/log/mail.log.4.gz to /var/log/mail.log.5.gz (rotatecount 4, 
logstart 1, i 4), 
  old log /var/log/mail.log.4.gz does not exist
  renaming /var/log/mail.log.3.gz to /var/log/mail.log.4.gz (rotatecount 4, 
logstart 1, i 3), 
  old log /var/log/mail.log.3.gz does not exist
  renaming /var/log/mail.log.2.gz to /var/log/mail.log.3.gz (rotatecount 4, 
logstart 1, i 2), 
  old log /var/log/mail.log.2.gz does not exist
  renaming /var/log/mail.log.1.gz to /var/log/mail.log.2.gz (rotatecount 4, 
logstart 1, i 1), 
  old log /var/log/mail.log.1.gz does not exist
  renaming /var/log/mail.log.0.gz to /var/log/mail.log.1.gz (rotatecount 4, 
logstart 1, i 0), 
  old log /var/log/mail.log.0.gz does not exist
  log /var/log/mail.log.5.gz doesn't exist -- won't try to dispose of it
  renaming /var/log/mail.log to /var/log/mail.log.1
  running postrotate script
  0

  
  Summary:

  # logrotate -d /tmp/test.conf; echo $?
  [..]
  removing old log /var/log/mail.log.5.gz
  error: error opening /var/log/mail.log.5.gz: No such file or directory

  exitcode: 1

  # logrotate -v /tmp/test.conf; echo $?
  [..]
  log /var/log/mail.log.5.gz doesn't exist -- won't try to dispose of it

  exitcode: 0


  
  1) The release of Ubuntu you are using, via 'lsb_release -rd' or System - 
About Ubuntu
  Description:  Ubuntu 12.04.3 LTS
  Release:  12.04

  2) The version of the package you are using, via 'apt-cache policy pkgname' 
or by checking in Software Center
  logrotate:
Installed: 3.7.8-6ubuntu5
Candidate: 3.7.8-6ubuntu5

  3) What you expected to happen
  debug mode should not output an error and should have exitcode 0

  4) What happened instead
  debug mode prints an error and has exitcode 1

To manage notifications about this bug go to:

[Touch-packages] [Bug 1320201] Re: behaviour in debug mode doesn't match real behaviour

2015-03-17 Thread Ubuntu Foundations Team Bug Bot
The attachment 0001-If-the-last-rotation-doesn-t-exist-that-s-okay-
even-.patch seems to be a patch.  If it isn't, please remove the
patch flag from the attachment, remove the patch tag, and if you are
a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by
~brian-murray, for any issues please contact him.]

** Tags added: patch

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to logrotate in Ubuntu.
https://bugs.launchpad.net/bugs/1320201

Title:
  behaviour in debug mode doesn't match real behaviour

Status in logrotate package in Ubuntu:
  Confirmed

Bug description:
  Situation: a single log file (no earlier rotates) and a logrotate
  status that says it is time to rotate.

  # ls -l /var/log/mail.log*
  -rw-r- 1 syslog adm 287 May 16 11:27 /var/log/mail.log

  # cat /var/lib/logrotate/status 
  logrotate state -- version 2
  /var/log/mail.log 2012-3-31

  # cat /tmp/test.conf 
  /var/log/mail.log
  {
rotate 4
weekly
missingok
notifempty
compress
delaycompress
sharedscripts
postrotate
reload rsyslog /dev/null 21 || true
endscript
  }

  logrotate in debug mode will fail, because it simulates removing a
  non-existing mail.log.5.gz:

  # logrotate -d /tmp/test.conf; echo $?
  reading config file /tmp/test.conf
  reading config info for /var/log/mail.log

  
  Handling 1 logs

  rotating pattern: /var/log/mail.log
   weekly (4 rotations)
  empty log files are not rotated, old logs are removed
  considering log /var/log/mail.log
log needs rotating
  rotating log /var/log/mail.log, log-rotateCount is 4
  dateext suffix '-20140516'
  glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
  previous log /var/log/mail.log.1 does not exist
  renaming /var/log/mail.log.4.gz to /var/log/mail.log.5.gz (rotatecount 4, 
logstart 1, i 4), 
  renaming /var/log/mail.log.3.gz to /var/log/mail.log.4.gz (rotatecount 4, 
logstart 1, i 3), 
  renaming /var/log/mail.log.2.gz to /var/log/mail.log.3.gz (rotatecount 4, 
logstart 1, i 2), 
  renaming /var/log/mail.log.1.gz to /var/log/mail.log.2.gz (rotatecount 4, 
logstart 1, i 1), 
  renaming /var/log/mail.log.0.gz to /var/log/mail.log.1.gz (rotatecount 4, 
logstart 1, i 0), 
  renaming /var/log/mail.log to /var/log/mail.log.1
  running postrotate script
  running script (multiple) with arg /var/log/mail.log
  : 
reload rsyslog /dev/null 21 || true
  
  removing old log /var/log/mail.log.5.gz
  error: error opening /var/log/mail.log.5.gz: No such file or directory
  1

  
  logrotate's real behaviour handles this situation correctly:

  # logrotate -v /tmp/test.conf; echo $?
  reading config file /tmp/test.conf
  reading config info for /var/log/mail.log

  
  Handling 1 logs

  rotating pattern: /var/log/mail.log
   weekly (4 rotations)
  empty log files are not rotated, old logs are removed
  considering log /var/log/mail.log
log needs rotating
  rotating log /var/log/mail.log, log-rotateCount is 4
  dateext suffix '-20140516'
  glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
  previous log /var/log/mail.log.1 does not exist
  renaming /var/log/mail.log.4.gz to /var/log/mail.log.5.gz (rotatecount 4, 
logstart 1, i 4), 
  old log /var/log/mail.log.4.gz does not exist
  renaming /var/log/mail.log.3.gz to /var/log/mail.log.4.gz (rotatecount 4, 
logstart 1, i 3), 
  old log /var/log/mail.log.3.gz does not exist
  renaming /var/log/mail.log.2.gz to /var/log/mail.log.3.gz (rotatecount 4, 
logstart 1, i 2), 
  old log /var/log/mail.log.2.gz does not exist
  renaming /var/log/mail.log.1.gz to /var/log/mail.log.2.gz (rotatecount 4, 
logstart 1, i 1), 
  old log /var/log/mail.log.1.gz does not exist
  renaming /var/log/mail.log.0.gz to /var/log/mail.log.1.gz (rotatecount 4, 
logstart 1, i 0), 
  old log /var/log/mail.log.0.gz does not exist
  log /var/log/mail.log.5.gz doesn't exist -- won't try to dispose of it
  renaming /var/log/mail.log to /var/log/mail.log.1
  running postrotate script
  0

  
  Summary:

  # logrotate -d /tmp/test.conf; echo $?
  [..]
  removing old log /var/log/mail.log.5.gz
  error: error opening /var/log/mail.log.5.gz: No such file or directory

  exitcode: 1

  # logrotate -v /tmp/test.conf; echo $?
  [..]
  log /var/log/mail.log.5.gz doesn't exist -- won't try to dispose of it

  exitcode: 0


  
  1) The release of Ubuntu you are using, via 'lsb_release -rd' or System - 
About Ubuntu
  Description:  Ubuntu 12.04.3 LTS
  Release:  12.04

  2) The version of the package you are using, via 'apt-cache policy pkgname' 
or by checking in Software Center
  logrotate:
Installed: 3.7.8-6ubuntu5
Candidate: 3.7.8-6ubuntu5

  3) What you expected to happen
  debug mode should not output an error and should have exitcode 0

  4) What happened instead
  debug mode prints an error and has