~ubuntu-branches/ubuntu/edgy/logrotate/edgy

« back to all changes in this revision

Viewing changes to debian/patches/50-manpage.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): Paul Martin
  • Date: 2004-06-11 13:51:34 UTC
  • mfrom: (1.1.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20040611135134-xwwlztb186794ikt
Tags: 3.7-2
* 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)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh -e
 
2
## 50-manpage.dpatch by Paul Martin <pm@debian.org>
 
3
##
 
4
## All lines beginning with `## DP:' are a description of the patch.
 
5
## DP: No description.
 
6
 
 
7
if [ $# -lt 1 ]; then
 
8
    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
 
9
    exit 1
 
10
fi
 
11
 
 
12
[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
 
13
patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
 
14
 
 
15
case "$1" in
 
16
       -patch) patch $patch_opts -p1 < $0;;
 
17
       -unpatch) patch $patch_opts -p1 -R < $0;;
 
18
        *)
 
19
                echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
 
20
                exit 1;;
 
21
esac
 
22
 
 
23
exit 0
 
24
 
 
25
@DPATCH@
 
26
diff -urNad /home/pm/deb/logrotate/logrotate-3.7/logrotate.8 logrotate-3.7/logrotate.8
 
27
--- /home/pm/deb/logrotate/logrotate-3.7/logrotate.8    2003-09-22 20:11:12.000000000 +0100
 
28
+++ logrotate-3.7/logrotate.8   2004-02-11 21:03:50.000000000 +0000
 
29
@@ -3,7 +3,8 @@
 
30
 .SH NAME
 
31
 logrotate \- rotates, compresses, and mails system logs
 
32
 .SH SYNOPSIS
 
33
-\fBlogrotate\fR [-dv] [-f|--force] [-s|--state \fIfile\fR] \fIconfig_file\fR+
 
34
+\fBlogrotate\fR [\fB\-dv\fR] [\fB\-f\fR|\fB\-\-force\fR]
 
35
+[\fB\-s\fR|\fB-\-state\ \fIstatefile\fR] \fIconfig_file\fR ..
 
36
 .SH DESCRIPTION
 
37
 \fBlogrotate\fR is designed to ease administration of systems that generate
 
38
 large numbers of log files.  It allows automatic rotation, compression, 
 
39
@@ -11,16 +12,16 @@
 
40
 weekly, monthly, or when it grows too large.
 
41
 .P
 
42
 Normally, \fBlogrotate\fR is run as a daily cron job.  It will not modify
 
43
-a log multiple times in one day unless the criterium for that log is
 
44
-based on the log's size and \fBlogrotate\fR is being run multiple times
 
45
-each day, or unless the \fB-f\fR or \fB-force\fR option is used. 
 
46
+a log more than once in one day unless the criterion for that log is
 
47
+based on the log's size and \fBlogrotate\fR is being run more than once
 
48
+each day, or unless the \fB-f\fR or \fB-\-force\fR option is used. 
 
49
 .P
 
50
 Any number of config files may be given on the command line. Later config
 
51
 files may override the options given in earlier files, so the order
 
52
-in which the \fBlogrotate\fR config files are listed in is important.
 
53
+in which the \fBlogrotate\fR config files are listed is important.
 
54
 Normally, a single config file which includes any other config files
 
55
 which are needed should be used.  See below for more information on how
 
56
-to use the \fIinclude\fR directive to accomplish this.  If a directory
 
57
+to use the \fBinclude\fR directive to accomplish this.  If a directory
 
58
 is given on the command line, every file in that directory is used as
 
59
 a config file.
 
60
 .P
 
61
@@ -36,37 +37,42 @@
 
62
 be made to the logs or to the \fBlogrotate\fR state file.
 
63
 
 
64
 .TP
 
65
-\fB-f, -\-force\fR
 
66
+\fB-f\fR, \fB-\-force\fR
 
67
 Tells \fBlogrotate\fR to force the rotation, even if it doesn't think
 
68
 this is necessary.  Sometimes this is useful after adding new entries to
 
69
-\fBlogrotate\fR, or if old log files have been removed by hand, as the
 
70
-new files will be created, and logging will continue correctly.
 
71
+a \fBlogrotate\fR config file, or if old log files have been removed
 
72
+by hand, as the new files will be created, and logging will continue
 
73
+correctly.
 
74
 
 
75
 .TP
 
76
-\fB-m, -\-mail <command>\fR
 
77
+\fB-m\R, \B-\-mail <command>\fR
 
78
 Tells \fBlogrotate\fR which command to use when mailing logs. This
 
79
 command should accept two arguments: 1) the subject of the message, and
 
80
 2) the recipient. The command must then read a message on standard input
 
81
-and mail it to the recipient. The default mail command is \fB/bin/mail
 
82
+and mail it to the recipient. The default mail command is \fB/usr/bin/mail
 
83
 -s\fR.
 
84
 
 
85
 .TP
 
86
-\fB-s, -\-state <statefile>\fR
 
87
+\fB-s\fR, \fB-\-state <statefile>\fR
 
88
 Tells \fBlogrotate\fR to use an alternate state file.  This is useful
 
89
-if logrotate is being run as a different user for various sets of
 
90
+if \fBlogrotate\fR is being run as a different user for various sets of
 
91
 log files.  The default state file is \fI/var/lib/logrotate/status\fR.
 
92
 
 
93
 .TP
 
94
 \fB-\-usage\fR
 
95
 Prints a short usage message.
 
96
 
 
97
+.TP
 
98
+\fB-v\fR, \fB--verbose\fR
 
99
+Display messages during rotation.
 
100
+
 
101
 .SH CONFIGURATION FILE
 
102
 
 
103
 \fBlogrotate\fR reads everything about the log files it should be handling
 
104
 from the series of configuration files specified on the command line.  Each
 
105
 configuration file can set global options (local definitions override
 
106
 global ones, and later definitions override earlier ones) and specify
 
107
-a logfile to rotate. A simple configuration file looks like this:
 
108
+some logfiles to rotate. A simple configuration file looks like this:
 
109
 
 
110
 .nf
 
111
 .ta +3i
 
112
@@ -77,7 +83,7 @@
 
113
     rotate 5
 
114
     weekly
 
115
     postrotate
 
116
-       /sbin/killall -HUP syslogd
 
117
+        /sbin/killall -HUP syslogd
 
118
     endscript
 
119
 }
 
120
 
 
121
@@ -87,7 +93,7 @@
 
122
     size=100k
 
123
     sharedscripts
 
124
     postrotate
 
125
-       /sbin/killall -HUP httpd
 
126
+        /sbin/killall -HUP httpd
 
127
     endscript
 
128
 }
 
129
 
 
130
@@ -97,7 +103,7 @@
 
131
     olddir /var/log/news/old
 
132
     missingok
 
133
     postrotate
 
134
-       kill -HUP `cat /var/run/inn.pid`
 
135
+        kill -HUP `cat /var/run/inn.pid`
 
136
     endscript
 
137
     nocompress
 
138
 }
 
139
@@ -107,9 +113,9 @@
 
140
 The first few lines set global options; in the example, logs are
 
141
 compressed after they are rotated.  Note that comments may appear
 
142
 anywhere in the config file as long as the first non-whitespace
 
143
-character on the line is a #.
 
144
+character on the line is a \fB#\fR.
 
145
 
 
146
-The next section of the config files defined how to handle the log file
 
147
+The next section of the config file defines how to handle the log file
 
148
 \fI/var/log/messages\fR. The log will go through five weekly rotations before
 
149
 being removed. After the log file has been rotated (but before the old
 
150
 version of the log has been compressed), the command 
 
151
@@ -117,13 +123,13 @@
 
152
 
 
153
 The next section defines the parameters for both
 
154
 \fI/var/log/httpd/access.log\fR and \fI/var/log/httpd/error.log\fR.
 
155
-They are rotated whenever is grows over 100k is size, and the old logs
 
156
+Each is rotated whenever it grows over 100k is size, and the old log
 
157
 files are mailed (uncompressed) to www@my.org after going through 5
 
158
 rotations, rather then being removed. The \fBsharedscripts\fR means that
 
159
 the \fBpostrotate\fR script will only be run once, not once for each
 
160
-log which is rotated. Note that the double quotes around the first filename
 
161
-at the beginning of this section allows logrotate to rotate logs with
 
162
-spaces in the name. Normal shell quoting rules apply, with ', ", and \\
 
163
+log which is rotated. Note that log file names may be enclosed in
 
164
+quotes (and that quotes are required if the name contains spaces).
 
165
+Normal shell quoting rules apply, with \fB'\fR, \fB"\fR, and \fB\\\fR
 
166
 characters supported.
 
167
 
 
168
 The last section defines the parameters for all of the files in
 
169
@@ -135,29 +141,33 @@
 
170
 rotate all files, including previously rotated ones.  A way around this
 
171
 is to use the \fBolddir\fR directive or a more exact wildcard (such as *.log).
 
172
 
 
173
+If the directory \fI/var/log/news\fR does not exist, this will cause 
 
174
+\fBlogrotate\fR to report an error. This error cannot be stopped with
 
175
+the \fBmissingok\fR directive.
 
176
+
 
177
 Here is more information on the directives which may be included in
 
178
 a \fBlogrotate\fR configuration file:
 
179
 
 
180
 .TP
 
181
 \fBcompress\fR
 
182
-Old versions of log files are compressed with \fBgzip\fR by default. See also
 
183
-\fBnocompress\fR. 
 
184
+Old versions of log files are compressed with \fBgzip\fR(1) by default.
 
185
+See also \fBnocompress\fR. 
 
186
 
 
187
 .TP
 
188
 \fBcompresscmd\fR
 
189
 Specifies which command to use to compress log files.  The default is
 
190
-\fBgzip\fR.  See also \fBcompress\fR.
 
191
+\fBgzip\fR(1).  See also \fBcompress\fR.
 
192
 
 
193
 .TP
 
194
 \fBuncompresscmd\fR
 
195
 Specifies which command to use to uncompress log files.  The default is
 
196
-\fBgunzip\fR.
 
197
+\fBgunzip\fR(1).
 
198
 
 
199
 .TP
 
200
 \fBcompressext\fR
 
201
 Specifies which extension to use on compressed logfiles, if compression
 
202
-is enabled.  The default follows that of the configured compression
 
203
-command.
 
204
+is enabled.  The default follows that of the default compression
 
205
+command (.gz).
 
206
 
 
207
 .TP
 
208
 \fBcompressoptions\fR
 
209
@@ -174,9 +184,9 @@
 
210
 
 
211
 .TP
 
212
 \fBcopytruncate\fR
 
213
-Truncate the original log file in place after creating a copy,
 
214
-instead of moving the old log file and optionally creating a new one,
 
215
-It can be used when some program can not be told to close its logfile
 
216
+Truncate the original log file to zero size in place after creating a copy,
 
217
+instead of moving the old log file and optionally creating a new one.
 
218
+It can be used when some program cannot be told to close its logfile
 
219
 and thus might continue writing (appending) to the previous log file forever.
 
220
 Note that there is a very small time slice between copying the file and
 
221
 truncating it, so some logging data might be lost.
 
222
@@ -188,7 +198,7 @@
 
223
 Immediately after rotation (before the \fBpostrotate\fR script is run)
 
224
 the log file is created (with the same name as the log file just rotated).
 
225
 \fImode\fR specifies the mode for the log file in octal (the same
 
226
-as \fBchmod(2)\fR), \fIowner\fR specifies the user name who will own the
 
227
+as \fBchmod\fR)(2), \fIowner\fR specifies the user name who will own the
 
228
 log file, and \fIgroup\fR specifies the group the log file will belong
 
229
 to. Any of the log file attributes may be omitted, in which case those
 
230
 attributes for the new file will use the same values as the original log
 
231
@@ -202,20 +212,20 @@
 
232
 .TP
 
233
 \fBdelaycompress\fR
 
234
 Postpone compression of the previous log file to the next rotation cycle.
 
235
-This has only effect when used in combination with \fBcompress\fR.
 
236
-It can be used when some program can not be told to close its logfile
 
237
+This only has effect when used in combination with \fBcompress\fR.
 
238
+It can be used when some program cannot be told to close its logfile
 
239
 and thus might continue writing to the previous log file for some time.
 
240
 
 
241
 .TP
 
242
 \fBextension \fIext\fR
 
243
 Log files are given the final extension \fIext\fR after rotation. If 
 
244
-compression is used, the compression extension (normally \fB.gz\fR)
 
245
+compression is used, the compression extension (normally \fI.gz\fR)
 
246
 appears after \fIext\fR.
 
247
 
 
248
 .TP
 
249
 \fBifempty\fR
 
250
-Rotate the log file even if it is empty, overiding the \fBnotifempty\fR
 
251
-option (ifempty is the default).
 
252
+Rotate the log file even if it is empty, overriding the \fBnotifempty\fR
 
253
+option (\fBifempty\fR is the default).
 
254
 
 
255
 .TP
 
256
 \fBinclude \fIfile_or_directory\fR
 
257
@@ -226,12 +236,12 @@
 
258
 which are ignored are files which are not regular files (such as
 
259
 directories and named pipes) and files whose names end with one of
 
260
 the taboo extensions, as specified by the \fBtabooext\fR directive.
 
261
-The \fBinclude\fR directive may not appear inside of a log file
 
262
+The \fBinclude\fR directive may not appear inside a log file
 
263
 definition.
 
264
 
 
265
 .TP
 
266
 \fBmail \fIaddress\fR
 
267
-When a log is rotated out-of-existence, it is mailed to \fIaddress\fR. If
 
268
+When a log is rotated out of existence, it is mailed to \fIaddress\fR. If
 
269
 no mail should be generated by a particular log, the \fBnomail\fR directive
 
270
 may be used.
 
271
 
 
272
@@ -257,8 +267,7 @@
 
273
 
 
274
 .TP
 
275
 \fBnocompress\fR
 
276
-Old versions of log files are not compressed with \fBgzip\fR. See also
 
277
-\fBcompress\fR. 
 
278
+Old versions of log files are not compressed. See also \fBcompress\fR. 
 
279
 
 
280
 .TP
 
281
 \fBnocopy\fR
 
282
@@ -281,7 +290,7 @@
 
283
 
 
284
 .TP
 
285
 \fBnomail\fR
 
286
-Don't mail old log files to any address.
 
287
+Do not mail old log files to any address.
 
288
 
 
289
 .TP
 
290
 \fBnomissingok\fR
 
291
@@ -289,12 +298,12 @@
 
292
 
 
293
 .TP
 
294
 \fBnoolddir\fR
 
295
-Logs are rotated in the same directory the log normally resides in (this 
 
296
+Logs are rotated in the directory they normally resides in (this 
 
297
 overrides the \fBolddir\fR option).
 
298
 
 
299
 .TP
 
300
 \fBnosharedscripts\fR
 
301
-Run \fBprerotate\fR and \fBpostrotate\fR scripts for every script which
 
302
+Run \fBprerotate\fR and \fBpostrotate\fR scripts for every log which
 
303
 is rotated (this is the default, and overrides the \fBsharedscripts\fR
 
304
 option).
 
305
 
 
306
@@ -315,16 +324,15 @@
 
307
 \fBpostrotate\fR/\fBendscript\fR
 
308
 The lines between \fBpostrotate\fR and \fBendscript\fR (both of which
 
309
 must appear on lines by themselves) are executed after the log file is
 
310
-rotated. These directives may only appear inside of a log file definition.
 
311
-See \fBprerotate\fR as well.
 
312
+rotated. These directives may only appear inside a log file definition.
 
313
+See also \fBprerotate\fR.
 
314
 
 
315
 .TP
 
316
 \fBprerotate\fR/\fBendscript\fR
 
317
 The lines between \fBprerotate\fR and \fBendscript\fR (both of which
 
318
 must appear on lines by themselves) are executed before the log file is
 
319
 rotated and only if the log will actually be rotated. These directives
 
320
-may only appear inside of a log file definition.  See \fBpostrotate\fR
 
321
-as well.
 
322
+may only appear inside a log file definition.  See also \fBpostrotate\fR.
 
323
 
 
324
 .TP
 
325
 \fBfirstaction\fR/\fBendscript\fR
 
326
@@ -340,30 +348,31 @@
 
327
 must appear on lines by themselves) are executed once after all log
 
328
 files that match the wildcarded pattern are rotated, after postrotate script
 
329
 is run and only if at least one log is rotated. These directives may only
 
330
-appear inside of a log file definition. See \fBlastaction\fR as well.
 
331
+appear inside a log file definition. See also \fBlastaction\fR.
 
332
 
 
333
 .TP
 
334
 \fBrotate \fIcount\fR
 
335
-Log files are rotated <count> times before being removed or mailed to the
 
336
+Log files are rotated \fIcount\fR times before being removed or mailed to the
 
337
 address specified in a \fBmail\fR directive. If \fIcount\fR is 0, old versions
 
338
 are removed rather then rotated.
 
339
 
 
340
 .TP
 
341
-\fBsize \fIsize\fR
 
342
+\fBsize \fIsize\fR[\fBG\fR|\fBM\fR|\fBk\fR]
 
343
 Log files are rotated when they grow bigger then \fIsize\fR bytes. If
 
344
 \fIsize\fR is followed by \fIM\fR, the size if assumed to be in megabytes.
 
345
-If the \fIk\fR is used, the size is in kilobytes. So \fBsize 100\fR,
 
346
-\fIsize 100k\fR, and \fIsize 100M\fR are all valid.
 
347
+If the \fIG\fR suffix is used, the size is in gigabytes.
 
348
+If the \fIk\fR suffix is used, the size is in kilobytes. So \fBsize 100\fR,
 
349
+\fIsize 100k\fR, \fIsize 100M\fR and \fIsize 1G\fR are all valid.
 
350
 
 
351
 .TP
 
352
 \fBsharedscripts\fR
 
353
-Normally, \fBprescript\fR and \fBpostscript\fR scripts are run for each
 
354
+Normally, \fBprerotate\fR and \fBpostrotate\fR scripts are run for each
 
355
 log which is rotated, meaning that a single script may be run multiple
 
356
 times for log file entries which match multiple files (such as the 
 
357
-/var/log/news/* example). If \fBsharedscript\fR is specified, the scripts
 
358
+\fI/var/log/news/*\fR example). If \fBsharedscript\fR is specified, the scripts
 
359
 are only run once, no matter how many logs match the wildcarded pattern.
 
360
 However, if none of the logs in the pattern require rotating, the scripts
 
361
-will not be run at all. This option overrides the \fbnosharedscripts\fR
 
362
+will not be run at all. This option overrides the \fBnosharedscripts\fR
 
363
 option.
 
364
 
 
365
 .TP
 
366
@@ -377,18 +386,21 @@
 
367
 .TP
 
368
 \fBtabooext\fR [+] \fIlist\fR
 
369
 The current taboo extension list is changed (see the \fBinclude\fR directive
 
370
-for information on the taboo extensions). If a + precedes the list of
 
371
-extensions, the current taboo extension list is augmented, otherwise it
 
372
+for information on the taboo extensions). If a \fB+\fR precedes \fIlist\fR,
 
373
+the current taboo extension list is augmented by \fIlist\fR, otherwise it
 
374
 is replaced. At startup, the taboo extension list 
 
375
-contains .rpmorig, .rpmsave, ,v, .swp, .rpmnew, and ~.
 
376
+contains .rpmorig, .rpmsave, .dpkg-dist, .dpkg-old, .dpkg-new, .disabled,
 
377
+,v, .swp, .rpmnew, and ~. The members of the list are separated by spaces,
 
378
+not commas.
 
379
+
 
380
 
 
381
 .TP
 
382
 \fBweekly\fR
 
383
 Log files are rotated if the current weekday is less then the weekday
 
384
 of the last rotation or if more then a week has passed since the last
 
385
 rotation. This is normally the same as rotating logs on the first day
 
386
-of the week, but it works better if \fIlogrotate\fR is not run every
 
387
-night.
 
388
+of the week, but if \fBlogrotate\fR is not being run every night a log 
 
389
+rotation will happen at the first valid opportunity.
 
390
 
 
391
 .SH FILES
 
392
 .PD 0
 
393
@@ -400,11 +412,16 @@
 
394
 Configuration options.
 
395
 
 
396
 .SH SEE ALSO
 
397
-.IR gzip (1)
 
398
+.BR gzip (1)
 
399
+
 
400
+.SH NOTES
 
401
+The \fBkillall\fR(1) program in Debian is found in the \fIpsmisc\fR package.
 
402
 
 
403
 .SH AUTHORS
 
404
 .nf
 
405
 Erik Troan <ewt@redhat.com>
 
406
 .nf
 
407
 Preston Brown <pbrown@redhat.com>
 
408
+.nf
 
409
+Corrections and changes for Debian by Paul Martin <pm@debian.org>
 
410
 .fi