Your message dated Wed, 22 Aug 2018 20:21:57 +0200
with message-id 
<CAJ2a_DcDbbHQ+XURT+=uxfa8efxfcaxhnq2e_shefj0z_wm...@mail.gmail.com>
and subject line logrotate does not correctly process %V (week number) in 
dateext
has caused the Debian Bug report #889943,
regarding logrotate does not correctly process %V (week number) in dateext
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
889943: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=889943
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: logrotate
Version: 3.8.7-1+b1
Severity: normal

Dear Maintainer,

logrotate does not seem to process %V (week number), when added in dateext.
See the following output:

-----------
rotating pattern: /var/log/nginx/*.log  forced from command line (52 rotations)
empty log files are rotated, old logs are removed
considering log /var/log/nginx/access.log
  log needs rotating
considering log /var/log/nginx/error.log
  log needs rotating
rotating log /var/log/nginx/access.log, log->rotateCount is 52
Converted ' _%Y_%V' -> '_%Y_%%V'
dateext suffix '_2018_%V'
glob pattern '_[0-9][0-9][0-9][0-9]_%V'
compressing log with: /usr/bin/lzop
destination /var/log/nginx/access.log_2018_%V already exists, skipping rotation
rotating log /var/log/nginx/error.log, log->rotateCount is 52
Converted ' _%Y_%V' -> '_%Y_%%V'
dateext suffix '_2018_%V'
glob pattern '_[0-9][0-9][0-9][0-9]_%V'
compressing log with: /usr/bin/lzop
destination /var/log/nginx/error.log_2018_%V already exists, skipping rotation
-----------

Logroate for nginx is configured as follows (vim /etc/logrotate.d/nginx)
/var/log/nginx/*.log {
  weekly
  missingok
  rotate 52
  compress
  delaycompress
  create 0640 www-data adm
  sharedscripts
  prerotate
        if [ -d /etc/logrotate.d/httpd-prerotate ]; then \
                run-parts /etc/logrotate.d/httpd-prerotate; \
        fi \
  endscript
  postrotate
        invoke-rc.d nginx rotate >/dev/null 2>&1
  endscript
  dateext
  dateformat _%Y_%V
  compresscmd /usr/bin/lzop
  compressoptions -U -9
  compressext .lzo
}

I was expecting logrotate to be able interpret any dateformats, which are 
specified in man date - in this case the weeknumber.


-- Package-specific info:
Contents of /etc/logrotate.d
total 40
-rw-r--r-- 1 root root 406 Feb  9 00:42 apt
-rw-r--r-- 1 root root 197 Feb  9 00:42 aptitude
-rw-r--r-- 1 root root 237 Feb  9 00:41 emby-server
-rw-r--r-- 1 root root 378 Feb  9 00:42 fail2ban
-rw-r--r-- 1 root root 203 Feb  9 00:43 iptables
-rw-r--r-- 1 root root 440 Feb  9 00:48 nginx
-rw-r--r-- 1 root root 351 Dec 26 17:25 nginx.dpkg-dist
-rw-r--r-- 1 root root 209 Feb  6 18:08 plexdrive
-rw-r--r-- 1 root root 308 Feb  4 19:03 ramdisks
-rw-r--r-- 1 root root 729 Feb  4 19:02 rsyslog


-- System Information:
Debian Release: 8.10
  APT prefers oldstable-updates
  APT policy: (500, 'oldstable-updates'), (500, 'oldstable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.16.0-5-amd64 (SMP w/12 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL 
set to en_US.UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages logrotate depends on:
ii  base-passwd         3.5.37
ii  cron [cron-daemon]  3.0pl1-127+deb8u1
ii  libacl1             2.2.52-2
ii  libc6               2.19-18+deb8u10
ii  libpopt0            1.16-10
ii  libselinux1         2.3-2

Versions of packages logrotate recommends:
ii  bsd-mailx [mailx]  8.1.2-0.20141216cvs-2

logrotate suggests no packages.

-- Configuration Files:
/etc/logrotate.conf changed:
daily
rotate 30
create
compress
include /etc/logrotate.d
/var/log/wtmp {
    missingok
    monthly
    create 0664 root utmp
    rotate 12
    dateext
    dateformat _%Y-%m
}
/var/log/btmp {
    missingok
    monthly
    create 0660 root utmp
    rotate 12
    dateext
    dateformat _%Y-%m
}


-- no debconf information

--- End Message ---
--- Begin Message ---
Version: 3.11.0-0.1

Fixed by 
https://github.com/logrotate/logrotate/commit/3177da6ab07c0b9b7867d195aab5540ed9256544

--- End Message ---

Reply via email to