Hi Paul,

On Thu, Oct 04, 2007 at 12:51:14AM +0100, Paul Martin wrote:
[...]
> I can't see the point in it myself. Can you give me a very good
> reason why they should be moved out of logrotate.conf? Upstream has
> them in there, too.

I only have a few small reasons. Maybe the sum of them is
convincing enough.

logrotate.conf currently is responsible for three different
jobs:
a) global config, setting defaults and including specific
   configs
b) Handling wtmp|btmp
c) Putting local stuff there (at least the last line
   suggests this)

Some reasons:

1) I think, it's generally a good idea to split jobs into
   different files

2) The wtmp/btmp rotating is a supplementary work of the
   logrotate package.

   If I didn't have thttpd on my machine, there wouldn't be
   any package depending on logrotate, thus I wouldn't even
   have rotating of wtmp|btmp.

   Conceivably this part could even be moved into another
   package, like the one containing the last and lastb
   command.

3) Maintainability for you and the admin.
   Assume the admin put in some local entries (see c) and
   now you (or some debian policy change) want the wtmp
   rotating to be different, then the update would end in a
   conflict and the admin would have to do the merge
   himself.
   Having the different parts in different files will give
   only conflicts, when they're really warranted.

   Consequently local entries should be put in some
   /etc/logrotate.d/local-something file.

4) Easier finding.
   Yesterday I wondered, how my wtmp gets rotated and ended
   up with "logrotate does it". 'dpkg -L logrotate' did not
   show anything in logrotate.d, which just confused me a
   bit. Seeing logrotate-[wb]tmp there would have catched
   my eyes way more quickly.

   I think, the original submitter also intended to raise
   that point by saying "but this makes them easier to
   find".

5) It doesn't really hurt. It adds two (or one) files,
   that's it, nothing more.


> They ought not be called logrotate-utmp or logrotate-wtmp, as those
> conceivably (by a very great stretch of the imagination) could be
> valid package names.

* There should be some convention for one package (this
  time logrotate) to be able to put multiple files in
  /etc/logrotate.d.
  I suggested PACKAGE-SUBNAME. Maybe _ instead of - would
  be better, I have no idea.
* PACKAGE has a strong reservation on the whole PACKAGE-*
  namespace. So I'd guess, PACKAGE-SUBNAME would only come
  into existence by the maintainer of PACKAGE or with his
  knowledge.
* I'd also find a solution with only
  /etc/logrotate.d/logrotate for wtmp and btmp somewhat
  acceptable, despite my note above on 4).


Thanks for your quick answer,


    Elrond



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to