fails when you use pbzip2 with compressoptions
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
logrotate (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: logrotate
Description: Ubuntu 8.10
Release: 8.10
apt-cache policy logrotate
logrotate:
Installed: 3.7.1-5ubuntu1
Candidate: 3.7.1-5ubuntu1
Version table:
*** 3.7.1-5ubuntu1 0
100 /var/lib/
Also recompiled/packaged logrotate to 3.7.8-4ubuntu1. I also tried upgrading pbzip2 to v1.0.5 to see if that help but did not.
I'm running rails and am trying to setup logrotate to process the rails logs. With this config I added to /etc/logrotate.
/home/website/
compresscmd /usr/bin/pbzip2
compressoptions -1
copytruncate
create
compress
compressext .bz2
missingok
rotate 3
}
I expect logrotate to run /usr/bin/pbzip2 -1 /vhome/
This is the error I see:
rotating log /home/website/
dateext suffix '-20100203'
glob pattern '-[0-9]
renaming /home/website/
renaming /home/website/
renaming /home/website/
renaming /home/website/
old log /home/website/
copying /home/website/
truncating /home/website/
compressing log with: /usr/bin/pbzip2
Parallel BZIP2 v1.0.5 - by: Jeff Gilchrist [http://
[Jan. 08, 2009] (uses libbzip2 by Julian Seward)
Invalid command line: Not enough files given. Aborting...
Usage: /usr/bin/pbzip2 [-1 .. -9] [-b#cdfhklp#qrtVz] <filename> <filename2> <filenameN>
-b# : where # is the file block size in 100k (default 9 = 900k)
-c : output to standard out (stdout)
-d : decompress file
-f : force, overwrite existing output file
-h : print this help message
-k : keep input file, don't delete
-l : load average determines max number processors to use
-p# : where # is the number of processors (default: autodetect [8])
-q : quiet mode (default)
-r : read entire input file into RAM and split between processors
-t : test compressed file integrity
-v : verbose mode
-V : display version info for pbzip2 then exit
-z : compress file (default)
-1 .. -9 : set BWT block size to 100k .. 900k (default 900k)
Example: pbzip2 -b15vk myfile.tar
Example: pbzip2 -p4 -r -5 myfile.tar second*.txt
Example: tar cf myfile.tar.bz2 --use-compress-
Example: pbzip2 -d myfile.tar.bz2
error: failed to compress log /home/website/
This is known bug in pbzip2 that does not allow command line options to be used when compressing from stdin. This has been fixed in the upstream beta and should be released as a new version in a week or two.
LoOoD: If you want to e-mail me, I can send you the pbzip2 beta source code to confirm that the fix also resolves this issue.