The logrotate utility is designed to simplify the administration of log files on a system which generates a lot of log files.
C Shell M4 Makefile
kdudka simplify code of prerotateSingleLog()
... to eliminate a use-after-free false positive reported by Coverity:

Error: USE_AFTER_FREE:
logrotate.c:1800: freed_arg: "free" frees "oldName".
logrotate.c:1779: use_after_free: Using freed pointer "oldName".

Closes #209
Latest commit 3110235 Aug 1, 2018
Permalink
Failed to load latest commit information.
build-aux Makefile.am: keep logrotate version in .tarball-version Feb 6, 2018
examples rename logrotate-default to logrotate.conf Mar 19, 2018
test rotate -1: never remove old log files Aug 1, 2018
.gitattributes .gitattributes: add merge=union policy for changelog merges Sep 23, 2016
.gitignore Makefile.am: keep logrotate version in .tarball-version Feb 6, 2018
.travis.yml configure.ac: enable running tests in parallel Aug 4, 2017
CONTRIBUTING.md docs: advise contributors to check Travis Apr 16, 2017
COPYING docs: FSF moved back in 2005 Apr 16, 2017
ChangeLog.md postrotate: pass rotated log file name as the 2nd argument May 4, 2018
INSTALL test: let tests run on 'make distcheck' Aug 3, 2016
Makefile.am Makefile.am: keep logrotate version in .tarball-version Feb 6, 2018
README.HPUX rename logrotate-default to logrotate.conf Mar 19, 2018
README.Solaris Patch from Fidelis Assis <fidelis@embratel.net.br> to add first/last Nov 15, 2002
README.md ChangeLog.md: user-visible changes to appear in 3.14.0 Mar 9, 2018
autogen.sh autotools: use autoconf for config.h and include it automatically Apr 7, 2017
config.c readConfigFile: assign and free 'key' consistently Aug 9, 2018
configure.ac configure.ac: show support status for SELinux and ACL at the end Mar 2, 2018
log.c clean up trailing whitespaces Mar 4, 2018
log.h remove unreachable log code Apr 7, 2017
logrotate.8.in logrotate.8: document the --version option Aug 6, 2018
logrotate.c simplify code of prerotateSingleLog() Aug 9, 2018
logrotate.conf.5 new man page for config, exit if config file too large, change cron s… Sep 25, 2009
logrotate.h readConfigFile: make the criterium override check more generic May 4, 2018
logrotate.spec.in rename logrotate-default to logrotate.conf Mar 19, 2018
queue.h Add queue.h to fix compilation with musl-libc Feb 10, 2015
upload-release.sh maint: upload-release.sh die() should print the message Apr 16, 2017

README.md

logrotate

The logrotate utility is designed to simplify the administration of log files on a system which generates a lot of log files. Logrotate allows for the automatic rotation compression, removal and mailing of log files. Logrotate can be set to handle a log file daily, weekly, monthly or when the log file gets to a certain size.

Download

The latest release is:

Previous releases:

Git checkout

You can also obtain code by using git checkout:

git clone https://github.com/logrotate/logrotate.git -b master

Replace master with branch or tag you intend to checkout

Verify and unpack

After downloading the tarball and .asc signature file, check the signature:

Get Kamil's PGP key rsa4096/72A37B36 (almost any keyserver will do if pgp.mit.edu is temporarily unavailable):

$ gpg --keyserver pgp.mit.edu --recv-key 992A96E075056E79CD8214F9873DB37572A37B36

and verify the PGP signature on the distribution tarball:

$ gpg --verify logrotate-3.11.0.tar.xz.asc logrotate-3.11.0.tar.xz

If successful your GPG output should look like this:

gpg: Signature made Fri 02 Dec 2016 08:30:39 AM EST
gpg:                using RSA key 873DB37572A37B36
gpg: Good signature from "Kamil Dudka <kdudka@redhat.com>" [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: 992A 96E0 7505 6E79 CD82  14F9 873D B375 72A3 7B36

You may then unpack the tarball:

$ tar -xJf logrotate-3.11.0.tar.xz

Notice that git tags are signed with same key:

$ git tag --verify 3.11.0

Compiling

Obtain source either by Downloading it or doing Git checkout.

Install dependencies for Debian systems:

apt-get update
apt-get install autoconf automake libpopt-dev libtool make xz-utils

Install dependencies for Fedora/CentOS systems:

yum install autoconf automake libtool make popt-devel xz

Compilation (autoreconf is optional if you obtained source from tarball):

cd logrotate-X.Y.Z
autoreconf -fiv
./configure
make

Patches and Questions

Open issues or pull requests on GitHub.