]> git.donarmstrong.com Git - debian/debian-policy.git/commitdiff
Merge branch 'master' into bug477240-rra
authorRuss Allbery <rra@debian.org>
Sun, 25 Jul 2010 04:11:19 +0000 (21:11 -0700)
committerRuss Allbery <rra@debian.org>
Sun, 25 Jul 2010 04:11:19 +0000 (21:11 -0700)
debian/changelog
policy.sgml
upgrading-checklist.sgml

index 9afcb49887f09ad16aab5cb216794e3db234f9d9..58c472568e77d9d00e1d154a3590b48089b107da 100644 (file)
@@ -73,6 +73,11 @@ debian-policy (3.9.1.0) UNRELEASED; urgency=low
     Seconded: Emilio Pozuelo Monfort <pochu@debian.org>
     Seconded: Ludovic Brenta <ludovic@ludovic-brenta.org>
     Closes: #232448
+  * Policy: Recommend /etc/logrotate.d/package for logrotate rules
+    Wording: Russ Allbery <rra@debian.org>
+    Seconded: Guillem Jover <guillem@debian.org>
+    Seconded: Thijs Kinkhorst <thijs@debian.org>
+    Closes: #445203
   * Set the version of the Perl Policy to match the version of the Policy
     package.
   * Explain the Perl module package naming policy more explicitly and
index d1c7ca82eb6864ca329dcdbe3e8a14cdae60633e..b4352b7667c6360551ff2402b92ab742f5424629 100644 (file)
@@ -8022,11 +8022,13 @@ ln -fs ../sbin/sendmail debian/tmp/usr/bin/runq
        </p>
 
        <p>
-         Log files must be rotated occasionally so that they don't
-         grow indefinitely; the best way to do this is to drop a log
-         rotation configuration file into the directory
-         <file>/etc/logrotate.d</file> and use the facilities provided by
-         logrotate.<footnote>
+         Log files must be rotated occasionally so that they don't grow
+         indefinitely.  The best way to do this is to install a log
+         rotation configuration file in the
+         directory <file>/etc/logrotate.d</file>, normally
+         named <file>/etc/logrotate.d/<var>package</var></file>, and use
+         the facilities provided by <prgn>logrotate</prgn>.
+         <footnote>
            <p>
              The traditional approach to log files has been to set up
              <em>ad hoc</em> log rotation schemes using simple shell
@@ -8051,17 +8053,20 @@ ln -fs ../sbin/sendmail debian/tmp/usr/bin/runq
            section="8">):
          <example compact="compact">
 /var/log/foo/*.log {
-rotate 12
-weekly
-compress
-postrotate
-/etc/init.d/foo force-reload
-endscript
+    rotate 12
+    weekly
+    compress
+    missingok
+    postrotate
+        start-stop-daemon -K -p /var/run/foo.pid -s HUP -x /usr/sbin/foo -q
+    endscript
 }
          </example>
          This rotates all files under <file>/var/log/foo</file>, saves 12
-         compressed generations, and forces the daemon to reload its
-         configuration information after the log rotation.
+         compressed generations, and tells the daemon to reopen its log
+         files after the log rotation.  It skips this log rotation
+         (via <tt>missingok</tt>) if no such log file is present, which
+         avoids errors if the package is removed but not purged.
        </p>
 
        <p>
index 6602d9acfaf7876bf7b5ac507879d7bc4caf26dc..4cce6d0a71a3713f0d4fb1a7028c45b97f723b1e 100644 (file)
@@ -98,6 +98,10 @@ Not yet released.
   that libraries should be built with threading support and to be
   thread-safe if the library supports this.
   </item>
+<tag>10.8</tag>
+  <item>Recommend <file>/etc/logrotate.d/<var>package</var></file> for
+  logrotate rules.
+  </item>
 <tag>11.4, 11.8.3, 11.8.4</tag>
   <item>Packages providing alternatives for <prgn>editor</prgn>,
   <prgn>pager</prgn>, <prgn>x-terminal-emulator</prgn>, or