[Bug 662312] Re: Cannot handle spaces in compressoptions

Jouni "rautamiekka" Järvinen 662312 at bugs.launchpad.net
Wed May 28 14:43:26 UTC 2014


For what it's worth, the lines from §/etc/logrotate.d/apache2§:

/var/log/apache2/*.log {
    weekly
    missingok
    rotate 52
    compress
    compresscmd /usr/bin/xz
    compressoptions "-vvz9e --lzma2=dict=64MiB,mf=bt4,nice=273 --threads=3"
    delaycompress
    notifempty
    create 640 root adm
    sharedscripts
    postrotate
                if /etc/init.d/apache2 status > /dev/null ; then \
                    /etc/init.d/apache2 reload > /dev/null; \
                fi;
    endscript
    prerotate
        if [ -d /etc/logrotate.d/httpd-prerotate ]; then \
            run-parts /etc/logrotate.d/httpd-prerotate; \
        fi; \
    endscript
}

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to logrotate in Ubuntu.
https://bugs.launchpad.net/bugs/662312

Title:
  Cannot handle spaces in compressoptions

Status in “logrotate” package in Ubuntu:
  Confirmed
Status in “logrotate” package in Debian:
  Fix Released

Bug description:
  Binary package hint: logrotate

  I set these options in /etc/logrotate.conf:

     compress
     compresscmd      /usr/bin/xz
     uncompresscmd    /usr/bin/unxz
     compressoptions  -7 -e -T 1
     compressext      xz

  Compression fails with:

     /etc/cron.daily/logrotate:
     error: /etc/logrotate.conf:23 bad compressoptions path -7 -e -T 1
     run-parts: /etc/cron.daily/logrotate exited with return code 1

  logrotate fails if the compressoptions setting has any spaces.  This
  is also upstream Debian bug #159797 <http://bugs.debian.org/cgi-
  bin/bugreport.cgi?bug=159797> -- reported in 2002!

  Like the original report, this one has a workaround:

     compressoptions -7eT1

  Eventually someone will need options which cannot be jammed into a
  single space-free string.

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



More information about the foundations-bugs mailing list