debian/0000775000000000000000000000000012270013221007156 5ustar debian/changelog0000664000000000000000000011522512270013206011041 0ustar logrotate (3.8.7-1ubuntu1) trusty; urgency=medium * Merge from Debian unstable, remaining changes: - debian/control: Drop mailx to Suggests for Ubuntu; it's only used on request, and we don't configure an MTA by default. - debian/cron.daily: Clean non-existent log files from logrotate status file. - debian/logrotate.conf: use group 'syslog' by default when rotating logs. -- Steve Langasek Wed, 22 Jan 2014 11:05:42 -0800 logrotate (3.8.7-1) unstable; urgency=low * New patch: - man-su-explanation-729315.patch: Explain how "su" may conflict with "create". (Closes: #729315) * New upstream release - Fix to forcing size-based rotations. (Closes: #714910) * Bump standards version to 3.9.5. (No changes needed.) -- Paul Martin Fri, 17 Jan 2014 09:46:01 +0000 logrotate (3.8.6-1ubuntu2) trusty; urgency=low * debian/logrotate.conf: use group 'syslog' by default when rotating logs, otherwise logrotate will refuse to rotate logs in /var/log whose owning group is now syslog instead of root. LP: #1258202. -- Steve Langasek Thu, 05 Dec 2013 10:35:47 -0800 logrotate (3.8.6-1ubuntu1) trusty; urgency=low * Resynchronise with Debian. Remaining changes: - debian/control: Drop mailx to Suggests for Ubuntu; it's only used on request, and we don't configure an MTA by default. - debian/cron.daily: Clean non-existent log files from logrotate status file. -- Colin Watson Tue, 29 Oct 2013 08:20:39 -0700 logrotate (3.8.6-1) unstable; urgency=low * New upstream release - logrotate crashes with sharedscripts when no logs are rotated. - Fix potential buffer overflow in parsing config. * New patch: - mktime-718332.patch: Fix incorrectly initialized struct tm causing extra rotations. (Closes: #718332) -- Paul Martin Tue, 03 Sep 2013 21:34:00 +0100 logrotate (3.8.5-1) unstable; urgency=low * New upstream release + Check for both possible orders of script output in tests. (Closes: #707526) + If logrotate state file is corrupted, fail with error. + Make logrotate state file creation atomic. (Closes: #707526) + Add fsync during log copytruncate and gzip+unlink. + Allow 'hourly' rotation. + Do not try to parse big (16+ MB) config files. * Debian patches merged upstream: - dst.patch - man-startcount.patch - man-compressext-576362.patch - asprintf-fixes.patch - makefile-test-cleanup.patch - manpage-hyphens.patch - acl-nosys-706050.patch - size-longlong-706460.patch - timetraveller-704950.patch -- Paul Martin Wed, 26 Jun 2013 22:26:23 +0100 logrotate (3.8.3-5) unstable; urgency=low * New patches: + timetraveller-704950.patch: don't complain if the local time has changed such that the last rotation was in the "future" if the change is less than 25 hours. This allows for timezone shifts for travellers. (Closes: #704950) Please note that logrotate should not be relied upon if you are using a TARDIS. + size-longlong-706460.patch: Parse the number in the size/minsize/maxsize as an unsigned long long instead of just an unsigned long. For those who like to write their multigigabyte values in bytes. (Closes: #706460) * Update standards version to 3.9.4. (No changes needed.) -- Paul Martin Tue, 30 Apr 2013 18:44:41 +0100 logrotate (3.8.3-4) experimental; urgency=low * Accommodate cross-building and "nocheck". (Closes: #694835) * Accommodate ext3 filesystem returning wrong error if ACL is disabled. (Closes: #706050) * Replace patches/acl-tests.patch with the ones from upstream SVN, as patches/rh391-acl-test.patch, rh394-acl-tests.patch, rh397-acl-tests.patch * Replace patches/configparse.patch with upstream's rh401-tabooextloop.patch * Imported from upstream SVN: + patch/rh390-version.patch: Add --version option. + patch/rh392-skip-errors.patch: Fixed bug which prevented skipping particular log file config if the config contains errors + patch/rh393-kilo.patch: Allow both 'k' and 'K' in size. + patch/rh395-action-error-skip.patch: Fixed skipping of configs containing firstaction/lastaction in case of error before these directives + patch/rh396-changes.patch: update to CHANGES file + patch/rh398-preremove.patch: new option "preremove" + patch/rh399-leakedfds.patch: Close leaked fds + patch/rh400-install.patch: Add INSTALL file + patch/rh402-selinux-compress-context.patch: set SELinux context before compressLogFile calls to create compressed log files with proper context + patch/rh403-prepostrotate.patch: Call prerotate/postrotate script only for really rotated files (Closes: #652971) - patches/sharedscripts-519432.patch: removed -- Paul Martin Wed, 24 Apr 2013 14:29:30 +0100 logrotate (3.8.3-3ubuntu2) raring; urgency=low * Use correct compiler when cross-building. * Honour DEB_BUILD_OPTIONS=nocheck. -- Colin Watson Sat, 01 Dec 2012 01:24:57 +0000 logrotate (3.8.3-3ubuntu1) raring; urgency=low * Resynchronise with Debian. Remaining changes: - debian/control: Drop mailx to Suggests for Ubuntu; it's only used on request, and we don't configure an MTA by default. - debian/cron.daily: Clean non-existent log files from logrotate status file. -- Colin Watson Tue, 27 Nov 2012 18:33:50 +0000 logrotate (3.8.3-3) unstable; urgency=low * Remove acl from Build-Depends. Buildd servers don't support ACLs on their filing systems. * patches/acl-tests.patch.: disable ACL tests if setfacl is not present or doesn't work. -- Paul Martin Tue, 16 Oct 2012 15:12:55 +0100 logrotate (3.8.3-2) unstable; urgency=low * Add acl to Build-Depends on Linux as the self-tests require it. * We don't need to Build-Depend on quilt any more, as package source is in "3.0 (quilt)" format. * postrm and preinst: use separate "set -e" rather than use "-e" in "#!" line. * patches/manpage-hyphens.patch: Fix lintian warning "hyphen-used-as-minus-sign". -- Paul Martin Tue, 16 Oct 2012 13:36:27 +0100 logrotate (3.8.3-1) unstable; urgency=low * New upstream release. Major changes: + Fixed setting "size" bigger than 4GB on 32bit architectures. + Do not overwrite mode set by "create" option when using ACL. + Mode argument in "create" directive can be omitted. * debian/rules: allow "clean" to clean up test directory. * debian/rules: Build with ACLs and build-depend on libacl1-dev -- Paul Martin Mon, 15 Oct 2012 14:51:14 +0100 logrotate (3.8.2-1) unstable; urgency=low * New upstream release. Major changes: + More regression tests. + Fixed mail sending for 'mailfirst', 'dateext' and 'delaycompress' combination. + Check if the log is not symlink before rotation. + Do not call fchown in createOutputFile if newly created file already has proper owner. This fixes rotation of files stored on NFS where we can't change owner. * Patches: - svn*.patch removed as we're using upstream release. svn-r360.patch was reverted upstream. (Breathes sigh of relief.) - dateext-504079.patch removed. Applied upstream. - copyloginfo-512152.patch removed. Applied upstream. -- Paul Martin Thu, 16 Aug 2012 12:46:06 +0100 logrotate (3.8.1-5) experimental; urgency=low * Add Homepage and Vcs-Svn to debian/control. (Closes: #675313) * Cherry pick upstream svn patches: + svn-r343.patch: Add strlen() sanity check to mbrtowc() call. + svn-r344.patch: Show error and ignore config if '{' is not present after log files declaration. + svn-r346.patch: Support whitespaces in compressoptions directive (Closes: #159797) + svn-r348.patch: Fix typo in manpage. (overwite -> overwrite) + svn-r{349,350,351,352,353,368}.patch: Extra test cases. + svn-r354.patch: Fix ACL bug caused by bad merge. + svn-r355.patch: Typo in maxsize debug message (was reporting minsize) + svn-r356.patch: Fix potential bad free in ACL code. + svn-r357.patch: Support for tilde expansion in config files. + svn-r358.patch: Add O_NOFOLLOW when opening files as safeguard against symlink tricks. + svn-r359.patch: don't run external programs with uid != euid. (Slightly modified from upstream to use the runScriptMultiple fix.) + svn-r360.patch: Don't accept service owned log directories anymore. (This is the reason why this is going in "experimental" for now.) + svn-r361.patch: Fix to one of the tests. + svn-r362.patch: Run shred unprivileged. + svn-r363.patch: Parser: check for missing brackets. + svn-r364.patch: Return failure when refusing to rotate a log due to wrong permissions * Amended patches: + test-cleanup.patch: Clean up after regression tests. -- Paul Martin Thu, 31 May 2012 09:54:20 +0100 logrotate (3.8.1-4) unstable; urgency=low * Switch to dh type debian/rules. * Patch: + test-cleanup.patch: Clean up after regression tests. -- Paul Martin Thu, 17 May 2012 13:58:57 +0100 logrotate (3.8.1-3) unstable; urgency=low * Enabled hardened build flags. * Patch: + asprintf-fixes.patch: Fix asprintf() warnings and allow build with hardened build flags. * Update standards version to 3.9.3. -- Paul Martin Thu, 17 May 2012 00:36:48 +0100 logrotate (3.8.1-2) unstable; urgency=low * Removed dependancy on fcron as it is no longer in the repository. -- Paul Martin Wed, 21 Dec 2011 11:02:53 +0000 logrotate (3.8.1-1) unstable; urgency=low * New upstream release + Changes in 3.8.0 fix build problems on non-POSIX architectures (Closes: #632501) + New config options: dateyesterday, maxsize, su. (See manpage.) (maxsize Closes: #635184) * New patch: + man-compressext-576362.patch. Correct manpage about compressext, compressoptions behaviour. (Closes: #576362) * debian/logrotate.README.Debian: update now that rsyslog is default for new installs. (Closes: #649598) * Incidentally, rsyslog is now default syslog, and that doesn't use savelog but makes use of logrotate. (Closes: #379843) * Install logrotate.conf.5 (a redirect to logrotate.8) (Closes: #182261) * debian/control: depend on cron-daemon as an alternative to cron. (Closes: #334137) * lintian warning fix: move debian/logrotate.copyright to debian/copyright * debian/control: add Breaks: postgresql-common (<= 126) as its config file requires an "su". Postgres maintainer is aware and awaits this upload. * Upload to unstable. (Closes: #648025) -- Paul Martin Mon, 05 Dec 2011 17:58:16 +0000 logrotate (3.8.0-1) experimental; urgency=low * New upstream release (Closes: #633529) + Fixes for CVE-2011-1098, CVE-2011-1154, and CVE-2011-1155 (Closes: #639302) + dateformat sorting noted in manpage (Closes: #580054) * Changed debian/control to use [linux-any] in Build-Depends. (Closes: #634704) * Removed patches: + create-388608.patch: Upstream has fixed this. + nofollow.patch: Upstream has fixed this. + security-388608.patch: Upstream has fixed this. + FTBFS-hurd-613342.patch: Adopted upstream. (Closes: #613342) -- Paul Martin Sun, 28 Aug 2011 19:11:09 +0100 logrotate (3.7.9-1) experimental; urgency=low * New upstream release * New patch: + FTBFS-hurd-613342.patch. Half of a fix to #613342. Unfortunately the rest of the supplied patch leaks memory badly. * Removed patches: - deb-taboos.patch (applied upstream) - ucf-taboos.patch (applied upstream) - compressutime.patch (applied upstream) - rh-toolarge.patch (upstream does things a different way) - rh-curdir2.patch (applied upstream) - parser571033.patch (applied upstream) * Added build-arch/build-indep targets to debian/rules. * Update standards version to 3.9.2 (no changes). -- Paul Martin Wed, 22 Jun 2011 15:51:46 +0100 logrotate (3.7.8-6ubuntu6) quantal; urgency=low * Rebuild for new armel compiler default of ARMv5t. -- Colin Watson Tue, 02 Oct 2012 16:36:26 +0100 logrotate (3.7.8-6ubuntu5) oneiric; urgency=low * cron.daily: ensure that the status file exists to avoid error messages in cron mail. LP: #785670 -- Reinhard Tartler Tue, 04 Oct 2011 18:23:34 +0200 logrotate (3.7.8-6ubuntu4) oneiric; urgency=low * SECURITY UPDATE: arbitrary code execution via shell metacharacters in log filename - debian/patches/CVE-2011-1154.patch: improve shred logic in logrotate.c. - CVE-2011-1154 * SECURITY UPDATE: denial of service via invalid characters in log filename - debian/patches/CVE-2011-1155.patch: properly escape filenames in logrotate.c. - CVE-2011-1155 -- Marc Deslauriers Fri, 17 Jun 2011 13:36:27 -0400 logrotate (3.7.8-6ubuntu3) natty; urgency=low * cron.daily: Fixing a shell redirection error -- Ahmed Kamal Sun, 13 Mar 2011 02:21:08 +0200 logrotate (3.7.8-6ubuntu2) natty; urgency=low * cron.daily: Added ability to clean non existent log files from logrotate status file (LP: #730504) -- Ahmed Kamal Sat, 12 Mar 2011 14:58:38 +0200 logrotate (3.7.8-6ubuntu1) maverick; urgency=low * Merge from debian unstable (LP: #554823), remaining changes: - debian/control: Drop mailx to Suggests for Ubuntu; it's only used on request, and we don'c configure an MTA by default. -- Lorenzo De Liso Wed, 14 Jul 2010 19:34:54 +0200 logrotate (3.7.8-6) unstable; urgency=low * New patch: + ucf-taboos.patch. Add common ucf files to default taboo list. Thanks to Noah Massey. -- Paul Martin Sat, 17 Apr 2010 22:01:47 +0100 logrotate (3.7.8-5) unstable; urgency=low * New patch: + parser571033.patch: fix the config parser to not get confused when a wildcard produces no results. (Closes: 571033) * Switch to dpkg-source 3.0 (quilt) format * Bump debhelper version to 7 (dh_clean -k -> dh_prep). * Update standards version to 3.8.4 (no changes). -- Paul Martin Sat, 20 Mar 2010 19:37:26 +0000 logrotate (3.7.8-4ubuntu2) lucid; urgency=low * rebuild rest of main for armel armv7/thumb2 optimization; UbuntuSpec:mobile-lucid-arm-gcc-v7-thumb2 -- Alexander Sack Sun, 07 Mar 2010 00:56:16 +0100 logrotate (3.7.8-4ubuntu1) karmic; urgency=low * Merge from debian unstable, remaining changes: LP: #414347 - debian/control: Drop mailx to Suggests for Ubuntu; it's only used on request, and we don'c configure an MTA by default. -- Bhavani Shankar Sun, 16 Aug 2009 12:40:24 +0530 logrotate (3.7.8-4) unstable; urgency=high * New patch: + security-388608.patch: A race condition in the creation of compressed and copied log files makes it possible to overwrite arbitrary files by generating a link or symlink during a window of opportunity between logrotate renaming a log file and creating the copy of the next. (Closes: #388608) Once again, many thanks to Florian Zumbiehl for forcing me to think. * Uploading to unstable. -- Paul Martin Fri, 14 Aug 2009 23:22:04 +0100 logrotate (3.7.8-3) experimental; urgency=low * New patch: + nofollow.patch: If a logfile is a symlink, it may be read when being compressed, being copied (copy, copytruncate) or mailed. Secure data (eg. password files) may be exposed. Thanks to Florian Zumbiehl for getting me thinking about this one. -- Paul Martin Thu, 06 Aug 2009 16:35:41 +0100 logrotate (3.7.8-2) experimental; urgency=low * New patch: + create-388608.patch: Really squash the race condition for the creation of compressed log files and the creation of new ones. (Closes: 388608) -- Paul Martin Tue, 04 Aug 2009 21:16:03 +0100 logrotate (3.7.8-1) experimental; urgency=low * New upstream release: - do not exit on status file errors - limit config file inclusion nesting - use hashes for status file handling (patch by Petr Tesarik and Leonardo Chiquitto) - dateformat to allow unixtime (patch by Sami Kerola ) * Upstream has taken some of our patches: - manpage.patch: partial uptake, updated - man-189243.patch: fully applied upstream - man-sizetypo.patch: fully applied upstream - man-overriden.patch: fully applied upstream * Added a watch file (but upstream has a redirect to https). * Upstream has also fixed createOutputFile to be more secure (Closes: #388608) * New Debian patch: + sharedscripts-519432.patch: Prerotate and postrotate scripts get the list of rotated files passed to them as arguments. (Closes: #519432) + chown-484762.patch: If running as non-root, warn but don't abort if we can't chown the compressed log file. (Closes: #484762) * Update Standards-Version to 3.8.2. (No changes) -- Paul Martin Tue, 04 Aug 2009 15:18:18 +0100 logrotate (3.7.7-5ubuntu1) karmic; urgency=low * Merge from debian unstable, remaining changes: LP: #410660 - debian/control: Drop mailx to Suggests for Ubuntu; it's only used on request, and we don'c configure an MTA by default. -- Bhavani Shankar Sat, 08 Aug 2009 17:00:10 +0530 logrotate (3.7.7-5) unstable; urgency=high * Backport patch from 3.7.8-3 (in experimental): + nofollow.patch: If a logfile is a symlink, it may be read when being compressed, being copied (copy, copytruncate) or mailed. Secure data (eg. password files) may be exposed. Thanks to Florian Zumbiehl for getting me thinking about this one. -- Paul Martin Thu, 06 Aug 2009 16:41:26 +0100 logrotate (3.7.7-4) unstable; urgency=low * Update location of upstream in debian/copyright. -- Paul Martin Thu, 19 Feb 2009 11:54:07 +0000 logrotate (3.7.7-3) unstable; urgency=low * Fix sharedcycles. (Closes: #512152) -- Paul Martin Sun, 18 Jan 2009 00:48:49 +0000 logrotate (3.7.7-3ubuntu1) jaunty; urgency=low * Merge from debian unstable, remaining changes: - debian/control: Drop mailx to Suggests for Ubuntu; it's only used on request, and we don'c configure an MTA by default. -- Chuck Short Sun, 18 Jan 2009 05:51:34 +0000 logrotate (3.7.7-3) unstable; urgency=low * Fix sharedcycles. (Closes: #512152) -- Paul Martin Sun, 18 Jan 2009 00:48:49 +0000 logrotate (3.7.7-2ubuntu1) jaunty; urgency=low * Merge from debian unstable, remaining changes: LP: #313461 - debian/control: Drop mailx to Suggests for Ubuntu; it's only used on request, and we don't configure an MTA by default. -- Bhavani Shankar Sat, 03 Jan 2009 19:08:07 +0530 logrotate (3.7.7-2) unstable; urgency=low * Upload to unstable. * Patches from upstream (3.7.7-4): + rh-curdir2.patch: logrotate would crash under SELinux. + rh-toolarge.patch: abort if the config file looks as though it might be a huge log file, rather than segfaulting. (Closes: #435086) -- Paul Martin Wed, 17 Dec 2008 13:12:27 +0000 logrotate (3.7.7-1ubuntu1) jaunty; urgency=low * Merge with Debian experimental (LP: #64964). Remaining Ubuntu changes: - debian/control: Drop mailx to Suggests for Ubuntu; it's only used on request, and we don't configure an MTA by default. -- Martin Pitt Fri, 07 Nov 2008 14:57:09 +0100 logrotate (3.7.7-1) experimental; urgency=low * New upstream release (based on upstream 3.7.7-1) + The source code has been run through "indent" which makes looking for differences "interesting". + Debian patches no longer required: - compress-499502.patch: upstream has fix. - globfix-277652: upstream has a fix. In addition, logrotate will attempt to continue rather than stopping dead if there are any errors in its config files. (Closes: #285858) - script-argument.patch: upstream has fixed this. - rh-dateext.patch: upstream has it. - rh-maxage.patch: upstream has it. - rh-noTMPDIR.patch: upstream has it. - rh-selinux.patch: upstream has it. - taboo-to-debug.patch: upstream has it. - scripterrors.patch: upstream has fix. - man-lastaction.patch: upstream has it. - man-mailtypo.patch: upstream has it. - man-rh-1.patch: upstream has it. - man-333996.patch: upstream has fix. + New features: - yearly rotations - minsize - optionally use shred when deleting files - dateformat, to control the date format when using dateext - Tabooexts can be wildcards. + Upstream fixes: - Manpage fixed for example using /var/log/news. (Closes: #339502) * dateext-504079.patch: If dateext is used with delaycompress and mailfirst, the wrong filename (one that has compressext added) is attempted to be mailed. (Closes: #504079,#433496) * dst.patch: Update to add the current "hour" to the struct tm, so that DST changes don't cause the date to be off by one. (Closes: #416177) * Corrected upstream URL (Closes: #410420) * deb-taboos.patch: added .cfsaved to taboo list. (Closes: #463581) -- Paul Martin Fri, 07 Nov 2008 02:27:18 +0000 logrotate (3.7.1-5) unstable; urgency=high * globfix-277652: ignore glob failure until end of block, so that missingok can be taken into account. (Closes: #277652) * Urgency high for RC bug. -- Paul Martin Wed, 08 Oct 2008 16:33:20 +0100 logrotate (3.7.1-4) unstable; urgency=high * Change default logrotate.conf to use permission 660 for /var/log/btmp. (Closes: #370050) * compress-499502.patch: Don't clobber existing files if in debug mode and compressing. (Closes: #499502) * Lintian cleanups: + debian-rules-ignores-make-clean-error + maintainer-script-ignores-errors preinst postrm + Update Standards-Version to 3.8.0. (No changes) -- Paul Martin Wed, 01 Oct 2008 00:39:12 +0100 logrotate (3.7.1-3) unstable; urgency=low * Patch debian/control to fix FTBFS on kfreebsd-amd64. Perhaps we need a build-depends macro for !kfreebsd. (Closes: #361465) * Use and depend on debhelper version 5. * Switch from dpatch to quilt. * cpp-crossbuild.patch: change from using $(CPP) to $(CC) -E. Thanks to NIIBE Yutaka. (Closes: #284040) * dst.patch: fix mktime initialisation so that daylight savings is taken into account. Thanks to Holger Weiss. (Closes: #278591) * man-333996.patch: fix typos in logrotate.8 where "then" should be "than". Thanks to Adrian Knoth. (Closes: #333996) * manpage.patch: Apply missed fixes from #101272. Thanks to J S Bygott. (Closes: #335060) * script-argument.patch: Allow the use of $1 in scripts again. (Closes: #330783) * README.Debian: Document that sysklogd does its own log rotation. (Closes: #308963) * README.Debian: Document how scripts are called. (Closes: #308920) * Update the copyright file. * debian/control: remove versioned dependency on cron. The version of cron forbidden pre-dates woody (currently "oldstable") by several years. This versioned dependency is preventing logrotate being installed with bcron. (Closes: #304038, #349150) * debian/rules: Fix backports, allowing them to use selinux. (Closes: #340363) * uncompressChild-warning.patch: Fix a "might be used uninitialised" warning from gcc. -- Paul Martin Sat, 8 Apr 2006 23:02:19 +0100 logrotate (3.7.1-2) unstable; urgency=low * Patches: + 40-compressutime: Preserve mtime/atime on compression. (Closes: #286957) + 40-scripterrors: Give error messages identifying log file on script errors. (Closes: #122691, #195790, #222050, #306020) * Patch debian/control to fix FTBFS on kfreebsd-i386. (Closes: #320331). -- Paul Martin Sat, 3 Sep 2005 13:37:53 +0100 logrotate (3.7.1-1) unstable; urgency=low * New upstream release (based on upstream 3.7.1-11) * This upload enables selinux code. (Closes: #193601, #315514) * Updated dpatches: + 30-config-h: upstream has changed to using "/bin/mail" instead of "/bin/mail -s" + No need for 41-execlp-fix or 42-execlp-bin-sh. + Upstream fix obsoletes 60-compressowner. * Upstream uses a patch system, too. Patches from upstream: + 01-rh-dateext (logrotate-3.7.1-dateext.patch) + 01-rh-maxage (logrotate-3.7.1-maxage.patch) dateext and maxage (Closes: #178526, #188198, #226061, #257685, #306304) + 01-rh-noTMPDIR (logrotate-3.7.1-noTMPDIR.patch) This has the effect of never requiring a tempdir for scripts. There's the possibility of large scripts running into stack limits. + 01-rh-selinux (logrotate-3.7.1-selinux.patch) Updates to selinux code. + 52-man-rh-1 (based on logrotate-3-man.patch) Explains a bit more about postrotate scripts and updates the sharedscripts entry. * Update Standards-Version (no changes needed). * Update copyright file with current upstream location. -- Paul Martin Mon, 25 Jul 2005 22:15:18 +0100 logrotate (3.7-5) unstable; urgency=high Brown paper bag upload. * 42-execlp-bin-sh: Fix major flaw in the last patch... it tries to execute the logfile. Thanks very much for the quick report, Philipp. It was my fault, not yours. (Closes: #279965) -- Paul Martin Wed, 25 May 2005 10:43:42 +0100 logrotate (3.7-4) unstable; urgency=high * 42-execlp-bin-sh: Call /bin/sh directly for scripts. Allows /tmp to be mounted noexec. This is a simple fix for sarge -- a potentially better fix is available upstream. Thanks to Philipp Hartmann. (Closes: #279965) * Documentation fixes: + 52-man-overriden: Fix spelling of "overridden" in manpage. (Closes: #310337) + 52-man-mailtypo: Fixes formatting of the -mail option in manpage. (Closes: #300644) -- Paul Martin Wed, 25 May 2005 08:49:07 +0100 logrotate (3.7-3) unstable; urgency=high * 41-execlp-fix: "critical" bug with execlp() call on scripts. This affects only those who use the undocumented feature of the arguments of the script being the files that are being rotated. Oh rats... I've just documented it! (Closes: #276172) Thanks to Lars for the quick NMU. The rest of the changes are minor and are mainly to documentation: * Depend on cron | anacron | fcron. (Closes: #308172) * 52-man-sizetypo.dpatch fixes "size=100k" typo in manpage. Thanks to Ged Haywood for spotting this. Also spotted by Kjetil Kjernsmo (Closes: #272716) * 52-man-lastaction.dpatch fixes mistake in the lastaction description. (Closes: #278172) * Credit some of the RedHat authors in the debian/copyright file, and update the location of the cvs repository. * 52-man-startcount.dpatch, fixes manpage for "start" description. (Closes: #290628) -- Paul Martin Mon, 16 May 2005 23:01:32 +0100 logrotate (3.7-2) unstable; urgency=high * Added commented out stuff in debian/rules to build a logrotate-selinux package should Russell's move to get libselinux1 made "base" fail. * Patch: 21-taboo-to-debug, reduces the "Ignoring..." messages of the taboo filter from ERROR to DEBUG. (Closes: #249073) * Patch: 30-config-h, changed to fix upstream bug with mailing logs. (Closes: #253837) -- Paul Martin Fri, 11 Jun 2004 13:51:34 +0100 logrotate (3.7-1) unstable; urgency=low * Moved to using dpatch to keep track of changes. * New upstream release: + Includes some SELinux code, not compiled in by default as libselinux1 is not a base package. (Refer: #224880) + Always use compressext for the extension for compressed files; before compresscmd and compressext had to agree + Compression and scripts don't use system() anymore + compress and maillast didn't work together properly + delaycompress and mailfirst didn't work properly (Closes: #186818,#211687) + Don't use system() for mailing (or uncompressing) logs anymore + missingok works on directories, too (Closes: #246352,#248318) * Manpage fixes: + Include mention of G suffix to "size" option. + Fix also the wording of the "weekly" option. (Closes: #232263) + Fix examples' location of killall. (Closes: #189243) + Fix description of "compressext". (Closes: #230519) * Patches applied: + Trustix logrotate-3.7-compressowner.patch, which retains original owner and mode of logs when they are compressed. * Fixed upstream source location in copyright file. (Closes: #187384) * Standards-Version: 3.6.1 + New default compilation options (10.1). * Use and depend on debhelper 4. * Added reportbug script. -- Paul Martin Mon, 10 May 2004 19:43:54 +0100 logrotate (3.6.5-3) unstable; urgency=low * Added missingok to /var/log/wtmp entry of logrotate.conf. (Closes: #199154) -- Paul Martin Tue, 11 Nov 2003 23:17:24 +0000 logrotate (3.6.5-2) unstable; urgency=low * Added check for prerotate and postrotate scripts having no terminating endscript. (Closes: #162976) -- Paul Martin Wed, 9 Oct 2002 18:21:36 +0100 logrotate (3.6.5-1) unstable; urgency=low * New upstream release - Stop the shared postrotate/prerotate scripts from running if none of the log(s) need rotating (Closes: #149135, #153284, #15890) - Use TMPDIR instead of /tmp, if specified, when executing scripts. - New config directives "copy", "nocopy" and "start". - Sizes can be expressed in gigabytes (G suffix). - Some updates to manpage. + Manpage documents naming of rotated files (Closes: #143169) * Standards-Version: 3.5.6 -- Paul Martin Tue, 27 Aug 2002 00:21:14 +0100 logrotate (3.5.9-10) unstable; urgency=high * cron.daily was getting deleted by the debian/rules script. Mea maxima culpa. (Closes: #152966). -- Paul Martin Tue, 30 Jul 2002 00:08:37 +0100 logrotate (3.5.9-9) unstable; urgency=high * Downgraded depends on mailx to a recommends. (Closes: #127239, #149535) * Really put check for existence of logrotate binary into the cron.daily script. It was getting overwritten by a copy from the examples directory. (Closes: #150727) -- Paul Martin Sat, 22 Jun 2002 23:48:27 +0100 logrotate (3.5.9-8) unstable; urgency=high * Added check to cron.daily (blatantly stolen from exim's) to only attempt to run logrotate if it's binary exists. (Closes: #144265) * Priority high to ensure this minimal bugfix (a violation of a "should" policy directive) gets into woody. -- Paul Martin Tue, 23 Apr 2002 23:16:43 +0100 logrotate (3.5.9-7) unstable; urgency=medium * More typos fixed. Thanks to David Lawyer . (Closes: #134944). * Simple logic fix in decision of whether to uncompress a logfile when mailing it. (Closes: #137573) -- Paul Martin Tue, 12 Mar 2002 17:30:02 +0000 logrotate (3.5.9-6) unstable; urgency=low * No changes to programs, only to documentation. * Changes to manpage logrotate.8: + Fixed typos, errors and omissions. (Closes: #101272) Thanks to Jeremy S Bygott + Documented the location of killall program. + Fix the other mention of the status file location. + Documented error behaviour of globs in config file. (Closes: #128795) * Upstream added an "olddir" directive some time ago. (Closes: #56044) -- Paul Martin Fri, 8 Feb 2002 20:08:36 +0000 logrotate (3.5.9-5) unstable; urgency=low * Further development on bug #118466. Use stat() rather than fgetc/ungetc. Thanks to Ian Wienand for being unsatisfied with my previous attempts, which contained many logic errors. Mea culpa. (Closes: #119176) -- Paul Martin Sun, 18 Nov 2001 11:59:08 +0000 logrotate (3.5.9-4) unstable; urgency=low * Fix the logic error in the last two uploads. Use fgetc/ungetc instead of feof. (Closes: #118466) -- Paul Martin Wed, 14 Nov 2001 00:37:55 +0000 logrotate (3.5.9-3) unstable; urgency=low * Fix a bug I introduced in the last upload. Check that filehandles are non-null when you reference them. Brown paper bag time. (Closes: #118907,#119176) -- Paul Martin Tue, 13 Nov 2001 12:45:51 +0000 logrotate (3.5.9-2) unstable; urgency=low * Manpage was giving wrong location for status file. Fixed. * Test that status file is non zero length before trying to read it. (Closes: #118466) -- Paul Martin Tue, 6 Nov 2001 21:36:48 +0000 logrotate (3.5.9-1) unstable; urgency=low * New upstream release: + Incorporates the Debian fix to #110958. + Manpage updates. + Checks for negative values of rotate (Closes: #42683) + Fix to "extension" being ignored (Closes: #104335) -- Paul Martin Wed, 5 Sep 2001 22:42:13 +0100 logrotate (3.5.7-5) unstable; urgency=low * Removed rotation of /var/log/lastlog. It's a file that doesn't grow, and rotating it loses all the lastlog information. Perhaps making a backup would make more sense. (Closes: #111184) -- Paul Martin Tue, 4 Sep 2001 16:14:16 +0100 logrotate (3.5.7-4) unstable; urgency=low * Fixed bug with trying to free() a static string. (Closes: #110958) -- Paul Martin Mon, 3 Sep 2001 00:03:37 +0100 logrotate (3.5.7-3) unstable; urgency=low * Removed the debian/logrotate.conffiles, as debhelper v3 now automatically includes all files in /etc as conffiles. (Closes: #105616) -- Paul Martin Wed, 18 Jul 2001 11:48:03 +0100 logrotate (3.5.7-2) unstable; urgency=low * Removed the "errors root" from the default /etc/logrotate.conf file. (Closes: #105349) -- Paul Martin Sun, 15 Jul 2001 16:35:24 +0100 logrotate (3.5.7-1) unstable; urgency=low * New upstream release: + Allows compression command to be configurable (Closes: #101007) + Enables LFS support (Closes: #100810) + Quotes filenames for running compress commands or pre/postrotate commands. + Errors directive has been removed. For reasons, see http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=16544 * Changed preinst and new postrm scripts to clean up old status files. (Closes: #101831) -- Paul Martin Fri, 13 Jul 2001 23:21:57 +0100 logrotate (3.5.4-2) unstable; urgency=low * Loosened the config syntax checking to allow more flexibility. (Closes: #95617,#95630) * mailx is now in testing. (Closes: #67053) * Compile with -O2. -- Paul Martin Tue, 15 May 2001 01:59:19 +0100 logrotate (3.5.4-1) unstable; urgency=low * New maintainer. * New upstream release. (Closes: #71385,#78378,#81582,#88769) * Added .dpkg-new to default tabooext list. (Closes: #80527) * Changing to in log.c fixes compiler warning. * Removed RPM from logrotate.conf. (Closes: #52802,#78349,#65162,#90990) * Moved the logrotate.status back to /var/lib. FHS compliance. (Closes: #49553,#59120,#68728) * Removed tab characters from manpage source. (Closes: #53903) * Changed dependencies to allow either cron or anacron. (Closes: #87716) * Placed upstream source location in copyright file. (Closes: #45184) * Added rotation of /var/log/btmp and /var/log/lastlog to default configuration. * No longer consider state file dates before 1996 as fatal errors. (Closes: #65534) * Commas now no longer delimit tabooexts. Manpage changed to reflect this. (Closes: #52719) -- Paul Martin Thu, 26 Apr 2001 02:22:52 +0100 logrotate (3.2-11) unstable; urgency=low * cron dependency is now versioned >= 3.0pl1-53, the first cron to fix the wtmp/btmp rotation problem -- Joseph Carter Sun, 12 Sep 1999 15:51:07 -0700 logrotate (3.2-10) unstable; urgency=low * Added versioned depends on base-passwd to make upgrades from slink work normally. (Closes: #44667) -- Joseph Carter Thu, 9 Sep 1999 19:05:02 -0700 logrotate (3.2-9) unstable; urgency=low * Cleaned up a couple of typos (Closes: #43716) * Added btmp with missingok to logrotate defaults (Closes: #43717) -- Joseph Carter Sat, 4 Sep 1999 13:55:11 -0700 logrotate (3.2-8) unstable; urgency=low * You can now disable logrotate.d entries by renaming them to include the .disabled extention. Also logrotate will now ignore dpkg dropping files (Closes: #43703) -- Joseph Carter Sun, 29 Aug 1999 11:34:27 -0700 logrotate (3.2-7) unstable; urgency=low * No longer rotate lastlog (Closes: #43422) -- Joseph Carter Tue, 24 Aug 1999 20:52:39 -0700 logrotate (3.2-6) unstable; urgency=low * Now Depends on cron like it should -- Joseph Carter Mon, 2 Aug 1999 09:51:58 -0700 logrotate (3.2-5) unstable; urgency=low * /etc/logrotate.conf is now a conffile. How I missed this it one before is quite beyond me. Oops. => (Closes #42195) -- Joseph Carter Fri, 30 Jul 1999 10:39:58 -0700 logrotate (3.2-4) unstable; urgency=low * removed dependency on bash from postinst (Closes: #41118) -- Joseph Carter Mon, 26 Jul 1999 00:47:41 -0700 logrotate (3.2-3) unstable; urgency=low * More FHS updates, new standards version, debhelper v2, etc * Recompiled with libpopt * We now have a group utmp and will use it * Priority: Important since policy 3 mandates logrotate for log rotaton -- Joseph Carter Fri, 16 Jul 1999 10:09:23 -0700 logrotate (3.2-2) unstable; urgency=low * Moved the status file from /var/lib/logrotate.status which is lame to /var/state/logrotate/status * I spaced the use of /bin/mail---oops. It's a symlink on this system so it didn't BREAK anything here. I also didn't declare dependency on mailx. Someone get me a paper bag. Closes: bug#37817 * Renamed debian/* files to debian/logrotate.* in preperation for The Debhelper 2.x Way. Harmless change and makes me feel useful. => * Changed wtmp rotation in the default conffile. Rotates as root.adm for now. This is a temporary change pending utmp group implemenetation. -- Joseph Carter Sun, 16 May 1999 16:09:42 -0700 logrotate (3.2-1) unstable; urgency=low * Initial Release. -- Joseph Carter Thu, 22 Apr 1999 15:33:04 -0700 debian/logrotate.postrm0000664000000000000000000000014312270005653012434 0ustar #!/bin/sh set -e if [ "$1" = "purge" ]; then rm -rf /var/lib/logrotate fi #DEBHELPER# exit 0 debian/logrotate.conf0000664000000000000000000000127712270005653012046 0ustar # see "man logrotate" for details # rotate log files weekly weekly # use the syslog group by default, since this is the owning group # of /var/log/syslog. su root syslog # keep 4 weeks worth of backlogs rotate 4 # create new (empty) log files after rotating old ones create # uncomment this if you want your log files compressed #compress # packages drop log rotation information into this directory include /etc/logrotate.d # no packages own wtmp, or btmp -- we'll rotate them here /var/log/wtmp { missingok monthly create 0664 root utmp rotate 1 } /var/log/btmp { missingok monthly create 0660 root utmp rotate 1 } # system-specific logs may be configured here debian/logrotate.preinst0000664000000000000000000000125112270005653012575 0ustar #!/bin/sh set -e if [ "$1" = "upgrade" ]; then # Fix up the location of the state files that previous versions used. if [ -f /var/state/logrotate/status ]; then if [ -f /var/lib/logrotate/status ]; then rm /var/state/logrotate/status else mkdir -m 755 -p /var/lib/logrotate mv /var/state/logrotate/status /var/lib/logrotate/status fi rm -rf /var/state/logrotate fi if [ -f /var/lib/logrotate.status ]; then if [ -f /var/lib/logrotate/status ]; then rm /var/lib/logrotate.status else mkdir -m 755 -p /var/lib/logrotate mv /var/lib/logrotate.status /var/lib/logrotate/status fi fi fi #DEBHELPER# exit 0 debian/patches/0000775000000000000000000000000012270013217010612 5ustar debian/patches/man-189243.patch0000664000000000000000000000102112270005653013155 0ustar Fix location of killall in the examples. (Closes: #189243) --- /home/pm/deb/logrotate/logrotate-3.7/logrotate.8 2004-02-11 21:18:23.000000000 +0000 +++ logrotate-3.7/logrotate.8 2004-02-11 21:18:54.000000000 +0000 @@ -83,7 +83,7 @@ rotate 5 weekly postrotate - /sbin/killall -HUP syslogd + /usr/bin/killall -HUP syslogd endscript } @@ -93,7 +93,7 @@ size=100k sharedscripts postrotate - /sbin/killall -HUP httpd + /usr/bin/killall -HUP httpd endscript } debian/patches/chown-484762.patch0000664000000000000000000000120712270005653013532 0ustar Index: logrotate-3.8.5/logrotate.c =================================================================== --- logrotate-3.8.5.orig/logrotate.c 2013-06-26 22:17:20.821656206 +0100 +++ logrotate-3.8.5/logrotate.c 2013-06-26 22:17:20.817656132 +0100 @@ -314,8 +314,12 @@ if (fchmod(fd, (S_IRUSR | S_IWUSR) & sb->st_mode)) { message(MESS_ERROR, "error setting mode of %s: %s\n", fileName, strerror(errno)); - close(fd); - return -1; + if (geteuid() == 0) { + /* If run as non-root, we may not be able to duplicate + the ownership of the file. Warn but don't fail. */ + close(fd); + return -1; + } } if (fstat(fd, &sb_create)) { debian/patches/deb-config-h.patch0000664000000000000000000000124612270005653014065 0ustar Fix locations of STATEFILE and DEFAULT_MAIL_COMMAND for Debian. Index: logrotate-3.8.2/config.h =================================================================== --- logrotate-3.8.2.orig/config.h 2012-08-13 16:46:25.000837718 +0100 +++ logrotate-3.8.2/config.h 2012-08-13 16:46:40.749133393 +0100 @@ -27,7 +27,7 @@ * Default settings for Linux - leave these last. */ #ifndef DEFAULT_MAIL_COMMAND -#define DEFAULT_MAIL_COMMAND "/bin/mail" +#define DEFAULT_MAIL_COMMAND "/usr/bin/mail" #endif #ifndef COMPRESS_COMMAND @@ -43,5 +43,5 @@ #endif #ifndef STATEFILE -#define STATEFILE "/var/lib/logrotate.status" +#define STATEFILE "/var/lib/logrotate/status" #endif debian/patches/man-su-explanation-729315.patch0000664000000000000000000000142512270005747016136 0ustar Index: logrotate-3.8.6/logrotate.8 =================================================================== --- logrotate-3.8.6.orig/logrotate.8 2013-09-03 21:55:05.305538834 +0100 +++ logrotate-3.8.6/logrotate.8 2013-11-19 00:04:51.095192999 +0000 @@ -503,7 +503,10 @@ \fBsu \fIuser\fR \fIgroup\fR Rotate log files set under this user and group instead of using default user/group (usually root). \fIuser\fR specifies the user name used for -rotation and \fIgroup\fR specifies the group used for rotation. +rotation and \fIgroup\fR specifies the group used for rotation. If the +user/group you specify here does not have sufficient privilege to make +files with the ownership you've specified in a \fIcreate\fR instruction, +it will cause an error. .TP \fBtabooext\fR [+] \fIlist\fR debian/patches/mktime-718332.patch0000664000000000000000000000124412270005653013674 0ustar Index: logrotate-3.8.6/logrotate.c =================================================================== --- logrotate-3.8.6.orig/logrotate.c 2013-09-03 21:55:08.153596707 +0100 +++ logrotate-3.8.6/logrotate.c 2013-09-03 22:10:40.012851906 +0100 @@ -2114,12 +2114,14 @@ return 1; } + memset(&st->lastRotated, 0, sizeof(st->lastRotated)); st->lastRotated.tm_year = year; st->lastRotated.tm_mon = month; st->lastRotated.tm_mday = day; st->lastRotated.tm_hour = hour; st->lastRotated.tm_min = minute; st->lastRotated.tm_sec = second; + st->lastRotated.tm_isdst = -1; /* fill in the rest of the st->lastRotated fields */ lr_time = mktime(&st->lastRotated); debian/patches/uncompressChild-warning.patch0000664000000000000000000000106712270005653016451 0ustar Index: logrotate-3.7.7/logrotate.c =================================================================== --- logrotate-3.7.7.orig/logrotate.c 2008-12-17 13:03:40.451635277 +0000 +++ logrotate-3.7.7/logrotate.c 2008-12-17 13:03:41.355635555 +0000 @@ -289,7 +289,7 @@ char *uncompressCommand, char *address, char *subject) { int mailInput; - pid_t mailChild, uncompressChild; + pid_t mailChild, uncompressChild=-1; int mailStatus, uncompressStatus; int uncompressPipe[2]; char *mailArgv[] = { mailCommand, "-s", subject, address, NULL }; debian/patches/series0000664000000000000000000000021412270005747012035 0ustar deb-config-h.patch datehack.patch manpage.patch cpp-crossbuild.patch chown-484762.patch mktime-718332.patch man-su-explanation-729315.patch debian/patches/manpage.patch0000664000000000000000000001443212270005653013254 0ustar Closes: #101272, #335060 Patches from: J S Bygott General fixes to manpages. Index: logrotate-3.8.5/logrotate.8 =================================================================== --- logrotate-3.8.5.orig/logrotate.8 2013-06-26 22:06:31.660308056 +0100 +++ logrotate-3.8.5/logrotate.8 2013-06-26 22:14:03.333646535 +0100 @@ -11,8 +11,8 @@ weekly, monthly, or when it grows too large. .P Normally, \fBlogrotate\fR is run as a daily cron job. It will not modify -a log multiple times in one day unless the criterion for that log is -based on the log's size and \fBlogrotate\fR is being run multiple times +a log more than once in one day unless the criterion for that log is +based on the log's size and \fBlogrotate\fR is being run more than once each day, or unless the \fB\-f\fR or \fB\-\-force\fR option is used. .P Any number of config files may be given on the command line. Later config @@ -52,22 +52,22 @@ Tells \fBlogrotate\fR which command to use when mailing logs. This command should accept two arguments: 1) the subject of the message, and 2) the recipient. The command must then read a message on standard input -and mail it to the recipient. The default mail command is \fB/bin/mail +and mail it to the recipient. The default mail command is \fB/usr/bin/mail -s\fR. .TP \fB\-s\fR, \fB\-\-state \fR Tells \fBlogrotate\fR to use an alternate state file. This is useful if logrotate is being run as a different user for various sets of -log files. The default state file is \fI/var/lib/logrotate.status\fR. +log files. The default state file is \fI/var/lib/logrotate/status\fR. .TP \fB\-\-usage\fR Prints a short usage message. .TP -+\fB\-v\fR, \fB\-\-verbose\fR -Turns on verbose mode. +\fB\-v\fR, \fB\-\-verbose\fR +Turns on verbose mode, ie. display messages during rotation. .SH CONFIGURATION FILE @@ -119,9 +119,9 @@ The first few lines set global options; in the example, logs are compressed after they are rotated. Note that comments may appear anywhere in the config file as long as the first non-whitespace -character on the line is a #. +character on the line is a \fB#\fR. -The next section of the config files defined how to handle the log file +The next section of the config file defines how to handle the log file \fI/var/log/messages\fR. The log will go through five weekly rotations before being removed. After the log file has been rotated (but before the old version of the log has been compressed), the command @@ -129,14 +129,15 @@ The next section defines the parameters for both \fI/var/log/httpd/access.log\fR and \fI/var/log/httpd/error.log\fR. -They are rotated whenever it grows over 100k in size, and the old logs +Each is rotated whenever it grows over 100k in size, and the old logs files are mailed (uncompressed) to www@my.org after going through 5 rotations, rather than being removed. The \fBsharedscripts\fR means that the \fBpostrotate\fR script will only be run once (after the old logs have -been compressed), not once for each log which is rotated. Note that the double -quotes around the first filename at the beginning of this section allows -logrotate to rotate logs with spaces in the name. Normal shell quoting rules -apply, with ', ", and \\ characters supported. +been compressed), not once for each log which is rotated. +Note that log file names may be enclosed in +quotes (and that quotes are required if the name contains spaces). +Normal shell quoting rules apply, with \fB'\fR, \fB"\fR, and \fB\\\fR +characters supported. The next section defines the parameters for all of the files in \fI/var/log/news\fR. Each file is rotated on a monthly basis. This is @@ -151,6 +152,10 @@ rotate all files, including previously rotated ones. A way around this is to use the \fBolddir\fR directive or a more exact wildcard (such as *.log). +If the directory \fI/var/log/news\fR does not exist, this will cause +\fBlogrotate\fR to report an error. This error cannot be stopped with +the \fBmissingok\fR directive. + Here is more information on the directives which may be included in a \fBlogrotate\fR configuration file: @@ -162,12 +167,12 @@ .TP \fBcompresscmd\fR Specifies which command to use to compress log files. The default is -\fBgzip\fR. See also \fBcompress\fR. +\fBgzip\fR(1). See also \fBcompress\fR. .TP \fBuncompresscmd\fR Specifies which command to use to uncompress log files. The default is -\fBgunzip\fR. +\fBgunzip\fR(1). .TP \fBcompressext\fR @@ -194,7 +199,7 @@ .TP \fBcopytruncate\fR -Truncate the original log file in place after creating a copy, +Truncate the original log file to zero size in place after creating a copy, instead of moving the old log file and optionally creating a new one. It can be used when some program cannot be told to close its logfile and thus might continue writing (appending) to the previous log file forever. @@ -254,7 +259,7 @@ .TP \fBextension \fIext\fR Log files with \fIext\fR extension can keep it after the rotation. -If compression is used, the compression extension (normally \fB.gz\fR) +If compression is used, the compression extension (normally \fI.gz\fR) appears after \fIext\fR. For example you have a logfile named mylog.foo and want to rotate it to mylog.1.foo.gz instead of mylog.foo.1.gz. @@ -281,7 +286,7 @@ .TP \fBmail \fIaddress\fR -When a log is rotated out-of-existence, it is mailed to \fIaddress\fR. If +When a log is rotated out of existence, it is mailed to \fIaddress\fR. If no mail should be generated by a particular log, the \fBnomail\fR directive may be used. @@ -361,7 +366,7 @@ .TP \fBnomail\fR -Don't mail old log files to any address. +Do not mail old log files to any address. .TP \fBnomissingok\fR @@ -369,7 +374,7 @@ .TP \fBnoolddir\fR -Logs are rotated in the same directory the log normally resides in (this +Logs are rotated in the directory they normally reside in (this overrides the \fBolddir\fR option). .TP @@ -532,12 +537,15 @@ .SH SEE ALSO .BR gzip (1) - +.SH NOTES +The \fBkillall\fR(1) program in Debian is found in the \fIpsmisc\fR package. .SH AUTHORS .nf Erik Troan, Preston Brown, Jan Kaluza. + +Corrections and changes for Debian by Paul Martin .fi debian/patches/cpp-crossbuild.patch0000664000000000000000000000137712270005653014601 0ustar Closes: #284040 Patch from: NIIBE Yutaka Cross-building logrotate with dpkg-cross, I encountered a problem. dpkg-cross sets CPP variable, and compilation failures, because the executable 'cpp' does not accept multiple input files. Index: logrotate-3.8.5/Makefile =================================================================== --- logrotate-3.8.5.orig/Makefile 2013-06-26 22:15:57.859971822 +0100 +++ logrotate-3.8.5/Makefile 2013-06-26 22:15:57.855971737 +0100 @@ -123,7 +123,7 @@ rm -f ./test/test.ACL ./test/test.SELINUX ./test/error.log depend: - $(CPP) $(CFLAGS) -M $(SOURCES) > .depend + $(CC) -E $(CFLAGS) -M $(SOURCES) > .depend # pretest create the file ./test/test.ACL with # 0 or 1 according to the WITH_ACL=yes presence. debian/patches/man-sizetypo.patch0000664000000000000000000000062512270005653014302 0ustar Fix manpage typo in the size example. --- /home/pm/deb/logrotate/logrotate-3.7/logrotate.8 2004-09-13 22:50:08.000000000 +0100 +++ logrotate-3.7/logrotate.8 2004-09-13 22:50:25.000000000 +0100 @@ -90,7 +90,7 @@ "/var/log/httpd/access.log" /var/log/httpd/error.log { rotate 5 mail www@my.org - size=100k + size 100k sharedscripts postrotate /usr/bin/killall -HUP httpd debian/patches/configparse.patch0000664000000000000000000000150412270005653014140 0ustar # Loosens the config syntax checking to allow more flexibility. # (Closes: #95617,#95630) Index: logrotate-3.8.3/config.c =================================================================== --- logrotate-3.8.3.orig/config.c 2012-10-15 14:18:29.117724327 +0100 +++ logrotate-3.8.3/config.c 2012-10-15 14:18:32.089780981 +0100 @@ -1110,7 +1110,7 @@ while (*endtag) { chptr = endtag; - while (!isspace(*chptr) && *chptr != ',' && *chptr) + while (!isspace(*chptr) && /* *chptr != ',' && */ *chptr) chptr++; tabooExts = realloc(tabooExts, sizeof(*tabooExts) * @@ -1122,8 +1122,10 @@ tabooCount++; endtag = chptr; + /* if (*endtag == ',') - start++; + endtag++; + */ while (isspace(*endtag) && *endtag) endtag++; } debian/patches/sharedscripts-519432.patch0000664000000000000000000000560112270005653015265 0ustar Index: logrotate-3.8.3/logrotate.c =================================================================== --- logrotate-3.8.3.orig/logrotate.c 2013-04-24 12:29:24.009997692 +0100 +++ logrotate-3.8.3/logrotate.c 2013-04-24 13:53:14.562163828 +0100 @@ -295,6 +295,42 @@ return rc; } +static int runScriptMultiple(char *logfn, char *script, struct logNames **rotNames, int numFiles) +{ + int rc,i; + char **argv; + + if (debug) { + message(MESS_DEBUG, "running script (multiple) with arg %s: \"%s\"\n", + logfn, script); + return 0; + } + + argv = calloc(numFiles+5,sizeof(char*)); + if (NULL == argv) { + message(MESS_ERROR,"error allocating memory to runScriptMultiple\n"); + return -1; + } + + argv[0] = "sh"; + argv[1] = "-c"; + argv[2] = script; + argv[3] = "logrotate_script"; + + for (i = 0; ifinalName; + } + argv[i+4] = NULL; + + if (!fork()) { + execv("/bin/sh",argv); + exit(1); + } + + wait(&rc); + return rc; +} + int createOutputFile(char *fileName, int flags, struct stat *sb, acl_type acl, int force_mode) { int fd; @@ -1604,18 +1640,22 @@ "since no logs will be rotated\n"); } else { message(MESS_DEBUG, "running prerotate script\n"); - if (runScript(log, log->flags & LOG_FLAG_SHAREDSCRIPTS ? log->pattern : log->files[j], log->pre)) { - if (log->flags & LOG_FLAG_SHAREDSCRIPTS) + if (log->flags & LOG_FLAG_SHAREDSCRIPTS) { + if (runScriptMultiple(log->pattern, log->pre, rotNames, log->numFiles)) { message(MESS_ERROR, "error running shared prerotate script " "for '%s'\n", log->pattern); - else { + logHasErrors[j] = 1; + hasErrors = 1; + } + } else { + if (runScript(log, log->files[j], log->pre)) { message(MESS_ERROR, "error running non-shared prerotate script " "for %s of '%s'\n", log->files[j], log->pattern); + logHasErrors[j] = 1; + hasErrors = 1; } - logHasErrors[j] = 1; - hasErrors = 1; } } } @@ -1639,18 +1679,22 @@ "since no logs were rotated\n"); } else { message(MESS_DEBUG, "running postrotate script\n"); - if (runScript(log, log->flags & LOG_FLAG_SHAREDSCRIPTS ? log->pattern : log->files[j], log->post)) { - if (log->flags & LOG_FLAG_SHAREDSCRIPTS) + if (log->flags & LOG_FLAG_SHAREDSCRIPTS) { + if (runScriptMultiple(log->pattern, log->post, rotNames, log->numFiles)) { message(MESS_ERROR, "error running shared postrotate script " "for '%s'\n", log->pattern); - else { + logHasErrors[j] = 1; + hasErrors = 1; + } + } else { + if (runScript(log, log->files[j], log->post)) { message(MESS_ERROR, "error running non-shared postrotate script " "for %s of '%s'\n", log->files[j], log->pattern); + logHasErrors[j] = 1; + hasErrors = 1; } - logHasErrors[j] = 1; - hasErrors = 1; } } } debian/patches/create-388608.patch0000664000000000000000000000200612270005653013657 0ustar Close #388608. In the extremely unlikely event that a log file to be rotated is going to be created group readable or writable, and the current group of the to-be-truncated logfile or the current user's group (for creation of the new logfile) is not the intended one, guard against the logfile being briefly readable or writable by the current user's group, or the group the logfile already had (and probably will have after the operation). Thanks to Florian Zumbiehl for being zealously persistent. Index: logrotate-3.7.9/logrotate.c =================================================================== --- logrotate-3.7.9.orig/logrotate.c 2011-06-22 15:15:29.087530649 +0100 +++ logrotate-3.7.9/logrotate.c 2011-06-22 15:15:37.963764798 +0100 @@ -233,7 +233,7 @@ { int fd; - fd = open(fileName, flags, sb->st_mode); + fd = open(fileName, flags, (S_IRUSR | S_IWUSR) & sb->st_mode); if (fd < 0) { message(MESS_ERROR, "error creating output file %s: %s\n", fileName, strerror(errno)); debian/patches/FTBFS-hurd-613342.patch0000664000000000000000000000172512270005653014211 0ustar Index: logrotate-3.7.9/config.c =================================================================== --- logrotate-3.7.9.orig/config.c 2011-06-22 15:40:42.727459027 +0100 +++ logrotate-3.7.9/config.c 2011-06-22 15:50:46.047374110 +0100 @@ -165,7 +165,7 @@ static int checkFile(const char *fname) { int i; - char pattern[PATH_MAX]; + char *pattern; /* Check if fname is '.' or '..'; if so, return false */ if (fname[0] == '.' && (!fname[1] || (fname[1] == '.' && !fname[2]))) @@ -173,15 +173,17 @@ /* Check if fname is ending in a taboo-extension; if so, return false */ for (i = 0; i < tabooCount; i++) { - snprintf(pattern, sizeof(pattern), "*%s", tabooExts[i]); + asprintf(&pattern, "*%s", tabooExts[i]); if (!fnmatch(pattern, fname, 0)) { message(MESS_DEBUG, "Ignoring %s, because of %s ending\n", fname, tabooExts[i]); + free(pattern); return 0; } } + free(pattern); /* All checks have been passed; return true */ return 1; } debian/patches/man-dateformat-580054.patch0000664000000000000000000000156612270005653015312 0ustar Index: logrotate-3.7.8/logrotate.8 =================================================================== --- logrotate-3.7.8.orig/logrotate.8 2010-05-03 12:25:04.013761517 +0200 +++ logrotate-3.7.8/logrotate.8 2010-05-03 13:38:33.861513873 +0200 @@ -222,6 +222,11 @@ The default value is -%Y%m%d. Note that also the character separating log name from the extension is part of the dateformat string. The system clock must be set past Sep 9th 2001 for %s to work correctly. +Note that the datestamps generated by this format must be lexically sortable +(i.e., first the year, then the month then the day. e.g., 2001/12/01 is ok, +but 01/12/2001 is not, since 01/11/2002 would sort lower while it is later). +This is because when using the \fBrotate\fR option, logrotate sorts all +rotated filenames to find out which logfiles are older and should be removed. .TP \fBdelaycompress\fR debian/patches/man-overriden.patch0000664000000000000000000000117712270005653014414 0ustar Fix manpage typo (Closes: #310337) Index: logrotate-3.7.7/logrotate.8 =================================================================== --- logrotate-3.7.7.orig/logrotate.8 2008-11-07 01:32:45.079556409 +0000 +++ logrotate-3.7.7/logrotate.8 2008-11-07 01:33:47.551555931 +0000 @@ -358,7 +358,7 @@ and is assumed to be relative to the directory holding the log file unless an absolute path name is specified. When this option is used all old versions of the log end up in \fIdirectory\fR. This option may be -overriden by the \fBnoolddir\fR option. +overridden by the \fBnoolddir\fR option. .TP \fBpostrotate\fR/\fBendscript\fR debian/patches/security-388608.patch0000664000000000000000000000223712270005653014271 0ustar Index: logrotate-3.7.9/logrotate.c =================================================================== --- logrotate-3.7.9.orig/logrotate.c 2011-06-22 15:20:33.987573622 +0100 +++ logrotate-3.7.9/logrotate.c 2011-06-22 15:20:41.311766830 +0100 @@ -233,7 +233,14 @@ { int fd; - fd = open(fileName, flags, (S_IRUSR | S_IWUSR) & sb->st_mode); + /* + * Protect against malicious linking or symlinking. + * This function only ever creates new files. + */ + unlink(fileName); + + fd = open(fileName, (flags | O_EXCL | O_NOFOLLOW), + (S_IRUSR | S_IWUSR) & sb->st_mode); if (fd < 0) { message(MESS_ERROR, "error creating output file %s: %s\n", fileName, strerror(errno)); @@ -349,7 +356,7 @@ } outFile = - createOutputFile(compressedName, O_RDWR | O_CREAT | O_TRUNC, sb); + createOutputFile(compressedName, O_RDWR | O_CREAT, sb); if (outFile < 0) { close(inFile); return 1; @@ -528,7 +535,7 @@ } #endif fdsave = - createOutputFile(saveLog, O_WRONLY | O_CREAT | O_TRUNC, sb); + createOutputFile(saveLog, O_WRONLY | O_CREAT, sb); #ifdef WITH_SELINUX if (selinux_enabled) { setfscreatecon_raw(prev_context); debian/patches/datehack.patch0000664000000000000000000000115112270005653013402 0ustar No longer consider state file dates before 1996 as fatal errors. (Closes: #65534) Index: logrotate-3.8.6/logrotate.c =================================================================== --- logrotate-3.8.6.orig/logrotate.c 2013-09-03 21:55:00.397439117 +0100 +++ logrotate-3.8.6/logrotate.c 2013-09-03 21:55:00.393439028 +0100 @@ -2045,7 +2045,7 @@ } /* Hack to hide earlier bug */ - if ((year != 1900) && (year < 1996 || year > 2100)) { + if ((year != 1900) && (year < 1970 || year > 2100)) { message(MESS_ERROR, "bad year %d for file %s in state file %s\n", year, argv[0], stateFilename); debian/patches/nofollow.patch0000664000000000000000000000315512270005653013503 0ustar Index: logrotate-3.7.9/logrotate.c =================================================================== --- logrotate-3.7.9.orig/logrotate.c 2011-06-22 15:15:37.000000000 +0100 +++ logrotate-3.7.9/logrotate.c 2011-06-22 15:20:33.987573622 +0100 @@ -343,7 +343,7 @@ compressedName = alloca(strlen(name) + strlen(log->compress_ext) + 2); sprintf(compressedName, "%s%s", name, log->compress_ext); - if ((inFile = open(name, O_RDONLY)) < 0) { + if ((inFile = open(name, O_RDONLY | O_NOFOLLOW)) < 0) { message(MESS_ERROR, "unable to open %s for compression\n", name); return 1; } @@ -396,7 +396,7 @@ char *mailArgv[] = { mailCommand, "-s", subject, address, NULL }; int rc = 0; - if ((mailInput = open(logFile, O_RDONLY)) < 0) { + if ((mailInput = open(logFile, O_RDONLY | O_NOFOLLOW)) < 0) { message(MESS_ERROR, "failed to open %s for mailing: %s\n", logFile, strerror(errno)); return 1; @@ -487,7 +487,7 @@ message(MESS_DEBUG, "copying %s to %s\n", currLog, saveLog); if (!debug) { - if ((fdcurr = open(currLog, (flags & LOG_FLAG_COPY) ? O_RDONLY : O_RDWR)) < 0) { + if ((fdcurr = open(currLog, ((flags & LOG_FLAG_COPY) ? O_RDONLY : O_RDWR) | O_NOFOLLOW)) < 0) { message(MESS_ERROR, "error opening %s: %s\n", currLog, strerror(errno)); return 1; @@ -1074,7 +1074,7 @@ security_context_t oldContext = NULL; int fdcurr = -1; - if ((fdcurr = open(log->files[logNum], O_RDWR)) < 0) { + if ((fdcurr = open(log->files[logNum], O_RDWR | O_NOFOLLOW)) < 0) { message(MESS_ERROR, "error opening %s: %s\n", log->files[logNum], strerror(errno)); debian/watch0000664000000000000000000000020312270005653010214 0ustar # Compulsory line, this is a version 3 file version=3 http://fedorahosted.org/releases/l/o/logrotate/logrotate-([\d\.]+).tar.gz debian/copyright0000664000000000000000000000271312270005653011126 0ustar This package was originally debianized by Joseph Carter on Thu, 22 Apr 1999 15:33:04 -0700. This version was downloaded from RedHat's server at: https://fedorahosted.org/releases/l/o/logrotate/ Upstream's website for the source is: https://fedorahosted.org/logrotate/ Upstream Authors are various RedHat people, including Erik Troan, Preston Brown, Elliot Lee, Miloslav Trmac, Dan Walsh, Peter Vrabec, Jesse Keating and Tomas Smetana. Copyright: GNU GENERAL PUBLIC LICENSE (GPL) Version 2 All modifications to the packaging and patches by Paul Martin are also made available under the GPL: Copyright (C) 2001-2011 Paul Martin This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA On a Debian system, the GPLv2 can be found in /usr/share/common-licenses/GPL-2 debian/logrotate.bug-script0000664000000000000000000000014212270005653013166 0ustar #!/bin/sh printf "Contents of /etc/logrotate.d\n" >&3 ls -l /etc/logrotate.d >&3 printf "\n" >&3 debian/cron.daily0000664000000000000000000000056412270005653011162 0ustar #!/bin/sh # Clean non existent log file entries from status file cd /var/lib/logrotate test -e status || touch status head -1 status > status.clean sed 's/"//g' status | while read logfile date do [ -e "$logfile" ] && echo "\"$logfile\" $date" done >> status.clean mv status.clean status test -x /usr/sbin/logrotate || exit 0 /usr/sbin/logrotate /etc/logrotate.conf debian/logrotate.dirs0000664000000000000000000000012612270005653012052 0ustar usr/sbin usr/share/man/man8 usr/share/bug/logrotate var/lib/logrotate etc/logrotate.d debian/logrotate.README.Debian0000664000000000000000000000132012270005653013224 0ustar logrotate for Debian -------------------- Note that logrotate may not be the only log rotation program on a Debian system. If sysklogd is installed, as was the case in older versions of Debian, it uses its own log rotation scripts which can be found in /etc/cron.daily/sysklogd and /etc/cron.weekly/sysklogd Current installs use rsyslog, which does not perform its own log rotation, but makes use of logrotate. ~~ Logrotate prerotate/postrotate/firstaction/lastaction scripts are currently executed by giving the whole script to "sh -c" thus: execl("/bin/sh", "sh", "-c", script, "sh", logfn, NULL); This might change in future versions. -- Paul Martin Mon, 05 Dec 2011 17:38:47 +0000 debian/compat0000664000000000000000000000000212270005653010366 0ustar 9 debian/NEWS0000664000000000000000000000050512270005653007667 0ustar logrotate (3.8.0-1) experimental; urgency=low Please note that this update changes the behaviour of logrotate: Logrotate now skips directories which are world writable or writable by group which is not "root" unless the (new) "su" directive is used. -- Paul Martin Sun, 28 Aug 2011 19:16:36 +0100 debian/rules0000775000000000000000000000241712270005653010254 0ustar #!/usr/bin/make -f export DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS \ 2>/dev/null || true) export DEB_HOST_GNU_SYSTEM := $(shell dpkg-architecture \ -qDEB_HOST_GNU_SYSTEM 2>/dev/null || true) ifeq ($(DEB_HOST_ARCH_OS),) DEB_HOST_ARCH_OS := $(subst -gnu,,$(DEB_HOST_GNU_SYSTEM)) ifeq ($(DEB_HOST_ARCH_OS),gnu) DEB_HOST_ARCH_OS := hurd endif endif DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) CROSS := else CROSS := CC=$(DEB_HOST_GNU_TYPE)-gcc endif %: dh $@ override_dh_auto_build: ifeq ($(DEB_HOST_ARCH_OS),linux) $(MAKE) RPM_OPT_FLAGS="$(CFLAGS)" WITH_SELINUX="yes" WITH_ACL="yes" $(CROSS) else $(MAKE) RPM_OPT_FLAGS="$(CFLAGS)" $(CROSS) endif override_dh_auto_install: override_dh_auto_clean: $(MAKE) clean cd test ; rm -f $$(ls | egrep '^test-config.[0-9]+$$') cd test ; rm -f test*.log* anothertest*.log* state test-config. cd test ; rm -f scriptout mail-out compress-args different*.log* # ACL tests will fail if we're not building with ACL override_dh_auto_test: ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) ifeq ($(DEB_HOST_ARCH_OS),linux) cd test ; ./test endif endif debian/logrotate.install0000664000000000000000000000006012270005653012554 0ustar logrotate usr/sbin/ debian/logrotate.conf etc/ debian/source/0000775000000000000000000000000012270013217010463 5ustar debian/source/format0000664000000000000000000000001412270005653011676 0ustar 3.0 (quilt) debian/logrotate.manpages0000664000000000000000000000003512270005653012703 0ustar logrotate.8 logrotate.conf.5 debian/source.lintian-overrides0000664000000000000000000000031612270005653014050 0ustar # lintian doesn't seem to know about kfreebsd-amd64 yet. logrotate source: invalid-arch-string-in-source-relation kfreebsd-amd64 [build-depends: libselinux1-dev [!hurd-i386 !kfreebsd-i386 !kfreebsd-amd64]] debian/control0000664000000000000000000000175512270005747010607 0ustar Source: logrotate Section: admin Priority: important Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Paul Martin Build-Depends: libpopt-dev, debhelper (>= 9), libselinux1-dev [linux-any], libacl1-dev [linux-any] Vcs-Svn: http://svn.fedorahosted.org/svn/logrotate/ Homepage: https://fedorahosted.org/logrotate/ Standards-Version: 3.9.5 Package: logrotate Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, cron | anacron | cron-daemon, base-passwd (>= 2.0.3.4) Breaks: postgresql-common (<= 126) Suggests: mailx Description: Log rotation utility 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. Normally, logrotate runs as a daily cron job.