First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 7144
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Mr. Bones. <mr_bones_@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Mr. Bones. <mr_bones_@gentoo.org>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
logrotate-3.6.5-r1.tar.gz A logrotate ebuild. application/x-gzip Wayne Davison 2003-03-05 14:23 0000 1.03 KB Details
logrotate.patch Fix a couple minor things in the 3.6.5-r1 ebuild patch Wayne Davison 2003-05-14 21:54 0000 946 bytes Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 7144 depends on: 16308 Show dependency tree
Show dependency graph
Bug 7144 blocks: 10933
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)







View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2002-08-27 20:44 0000
Several things:

First, there is no mention of logrotate, or equivalent functionality in
the install instructions.  This seems like a pretty large oversight since
without a log rotation scheme, the disk is going to fill up eventually
any it will be "our" fault since we never told the "user" that they needed
to do something about it.

Second, once the user figures out that they need log rotation, they may try
to "emerge logrotate" and find that it doesn't actually *do* anything out
of the box (so to speak).  I think the cron file and logrotate.conf files
should be installed into /etc/cron.daily and /etc respectively.  At least
then, the user has something to start from.  Better yet, this is Gentoo
Linux after all, we're supposed to be the hot stuff here.  Why not include
a functional logrotate.conf that's closer to what people might want?

Third, the default logrotate.conf uses the include functionality of
logrotate to grab files from /etc/logrotate.d.  The ebuild script doesn't
create this directory.

------- Comment #1 From Seemant Kulleen (RETIRED) 2002-08-28 01:57:35 0000 -------
Az, thoughts on this?

------- Comment #2 From Martin Holzer (RETIRED) 2002-08-28 04:36:26 0000 -------
how about a nice explain how to do text after emerging ?

 einfo in the ebuild

------- Comment #3 From Nicholas Wourms 2002-08-28 12:52:56 0000 -------
For the second point, I agree in that there should be a base logrotate.conf
based on the default daemons, etc which are installed.

On the third point, getting logrotate up and running is a major PITA w/o any
predefined scripts.  I would be nice, but admittedly a ton of work, to populate
each of the currently available daemon with its own script for logrotate.d.

Perhaps a USE flag, logrotate, could be used to determine if the "extras" get
installed?

------- Comment #4 From Martin Schlemmer (RETIRED) 2002-08-28 13:58:57 0000 -------
Guess I never thought about it, as I use sysklogd with vcron, which
rotates logs nicely all by itself.


------- Comment #5 From Martin Schlemmer (RETIRED) 2003-02-09 05:00:11 0000 -------
Nicholas, you are the lucky canditate that can add the scripts, as it seems
you sorda know something about them :P

------- Comment #6 From Nicholas Wourms 2003-02-10 08:54:10 0000 -------
Already one step ahead of you, I've modified (locally) the logrotate ebuild to
install properly along with a default conf and cron script.  I've also been
"stealing" logrotate.d scripts from RedHat's rpm's.  I will add them to
ebuilds, but I need to know first if we should have a USEFLAG to determine
their installation?  Or should I just check for the existance of
/etc/logrotate.d?  Please advise.

------- Comment #7 From Martin Schlemmer (RETIRED) 2003-02-16 17:48:32 0000 -------
I think just install them.  They usually are small, and the user who
use logrotate will delete/enable those he need.  Rather that, than
confusion about them not being there.

------- Comment #8 From Mr. Bones. 2003-02-24 15:15:36 0000 -------
Here's the /etc/logrotate.d/syslog-ng I'm using here:

/var/log/messages /var/log/mail.log /var/log/mail.err /var/log/kern.log /var/log/auth.log /var/log/cron.log {
    sharedscripts
    postrotate
	/etc/init.d/syslog-ng reload > /dev/null 2>&1 || true
    endscript
}

------- Comment #9 From Aron Griffis (RETIRED) 2003-03-04 15:40:19 0000 -------
Dragon, how's it going on this?

------- Comment #10 From Nicholas Wourms 2003-03-05 08:29:22 0000 -------
I'm working on it when I can (as you are aware I do have a fairly full plate),
but there are a bunch of packages which need the logrartate config fragments. 
I would prefer to check the majority of these fragments in at once so that
there is some uniformity.  I also want to make sure I get as much coverage as I
can on this first round.  Also, I would like Martin to add /etc/logrotate.d to
baselayout since he wants the fragments installed regardless of whether the
person uses logrotate or not.  Once the baselayout with this dir is stable, I
will then commit the updated ebuilds and logrotate config fragments.  However,
if this is an issue, let me know and I'll devote more resources to completing
it.

------- Comment #11 From Aron Griffis (RETIRED) 2003-03-05 08:52:49 0000 -------
To be honest, I would suggest a WIB (worse-is-better) approach.  I think that
if
we have some known culprits, we should get a first pass out there and not worry
about the stragglers.  We'll bring them into the fold as we can, but it might
be
too much to attempt to get a wide range of packages on the first pass.

Regarding /etc/logrotate.d, there is no need whatsoever to wait for the 
baselayout change.  The first package to add a snippet will automatically
create
that directory (as you know) and a subsequent baselayout update won't hurt
anything.  It's not a bad idea to get logrotate.d into baselayout, but I don't
think that should hold us up.

If there's anything I can do to help out, let me know.  If you have some
starter
snippets, maybe you should add them as attachments here so you're not the only
one with the info...  ;-)

------- Comment #12 From Martin Schlemmer (RETIRED) 2003-03-05 14:12:26 0000 -------
Right, I do not see what baselayout have to do with this ... it should actually
be created initially by logrotate (maybe with keepdir ...).

------- Comment #13 From Wayne Davison 2003-03-05 14:23:23 0000 -------
Created an attachment (id=8992) [edit]
A logrotate ebuild.

I improved the logrotate ebuild before I found this bug, so I'll go ahead and
include it here, just in case it has something that you'll find useful.  It has

the following changes:

+ Silences the CVS/Root spewage in the 3.6.5 "make" output.
+ Don't twiddle the Makefile, just set RPM_OPT_FLAGS with our CFLAGS
  (note that the tweaking of the Makefile was in the wrong section
  anyway -- it would have gotten repeated on repeated compilations if
  someone was using ebuild manually).
+ Installs a tweaked logrotate.conf file (doesn't refer to RPMs).
+ Installs a logrotate.d dir.
+ Installs a crontab file in the cron.daily dir.
+ The package now depends on virtual/cron.

Take a look if you haven't already tweak all these items.

------- Comment #14 From Wayne Davison 2003-03-05 14:28:25 0000 -------
On the topic of putting logrotate.d into the baselayout, I agree with Martin
(it just needs to be in the logrotate package).  The .keep file is needed to
prevent the directory from vanishing (which would cause logrotate to exit
with an error).  Having an empty .keep file in the dir does not adversely
affect logrotate (it reads the file, but does not do anything nor does it
complain about it being empty).

------- Comment #15 From Nicholas Wourms 2003-03-07 19:55:19 0000 -------
Martin, since logrotate isn't a required package, then what happens to the
people who don't have logrotate emerged but emerge a package with a logrotate
fragment?  You told me that I should just have each fragment install by
default, without any use flags or conditionals.  There's no reason why putting
it into baselayout would be bad.  It's either that or a USE flag, as we need
some way to make sure we don't get a sandbox error.

Wayne, actually I've already done those things, but thanks nontheless for your
contribution.  The reason I need logrotate.d in baselayout is because of how we
decided to impliment the installation of logrotate fragments [in this case,
without conditionals].  Besides, it just makes things easier for me.

Since Logrotate is developed by redhat, I'll be making my own tarballs based on
cvs tags rather then by rpm or debian's sources.  Anyhow, we'll get this fixed
up.

------- Comment #16 From Aron Griffis (RETIRED) 2003-03-07 22:07:30 0000 -------
Dragon, won't the directory /etc/logrotate.d be created automatically
by any package installing a logrotate fragment?  Possibly I'm
misunderstanding something, but I don't think there is any need for
the directory to exist prior to installing fragments...

------- Comment #17 From Nicholas Wourms 2003-03-08 07:58:40 0000 -------
Ok, I had a real brainfart when writing that last night.  Aaron, you are
totally correct, of course portage will make the dir!  What was I thinking? 
Ok, well that solves that one, I'll just have logrotate's ebuild install the
.keep file.  Thanks for setting me straight :-).

------- Comment #18 From Aron Griffis (RETIRED) 2003-03-10 23:06:07 0000 -------
Just FYI, I have added a logrotate.d snippet to the
syslog-ng-1.6.0_rc1-r1 ebuild based on Michael's suggestion.

------- Comment #19 From Aron Griffis (RETIRED) 2003-04-22 21:52:47 0000 -------
Re-assign to the original bug filer since he's now a dev and can decide what
needs to be done next, if anything, to finish this out.

------- Comment #20 From Paul Slinski 2003-04-29 09:40:41 0000 -------
I was just fighting with logrotate here and had some problems. I wont speak of
them here, but, I think a solution to your question of where to place the
logrotate.d/* files would be to place them in /usr/share/logrotate-*/samples
directory. Using this method would prevent confs from being installed for
programs that do not exist on the user's system (and keep the cron log from
filling up with errors). Placing a note at the end of the ebuild explaining the
location of the confs would be beneficial as well.

Thought I'd throw in my 2 cents and see if I could get some change anyhow :)
-P

------- Comment #21 From Mr. Bones. 2003-05-13 22:53:21 0000 -------
*** Bug 20907 has been marked as a duplicate of this bug. ***

------- Comment #22 From Wayne Davison 2003-05-14 21:54:45 0000 -------
Created an attachment (id=11998) [edit]
Fix a couple minor things in the 3.6.5-r1 ebuild

A couple things I noticed in the new logrotate 3.6.5-r1 ebuild:

- The src_compile() function is patching the source.  This should be done
  in the src_unpack() function so that someone using ebuild manually can
  run "ebuild ... compile" multiple times.

- The digest is missing the line for the selinux patch.

I've attached a patch that fixes these problems.

------- Comment #23 From Mr. Bones. 2003-05-15 18:31:19 0000 -------
Wanye -  Thanks for the patch.  I've applied it so please try out the
latest logrotate ebuild.

Thanks for testing.

------- Comment #24 From Mr. Bones. 2003-06-09 16:06:34 0000 -------
Masked testing for long enough so unmasked and closing this bug.

First Last Prev Next    No search results available      Search page      Enter new bug