Bug 606675 - logrotate postrotate script args
Summary: logrotate postrotate script args
Alias: None
Product: Fedora
Classification: Fedora
Component: logrotate
Version: rawhide
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Jan Kaluža
QA Contact: Fedora Extras Quality Assurance
Depends On: 579680
Blocks: 604686
TreeView+ depends on / blocked
Reported: 2010-06-22 08:28 UTC by Jan Kaluža
Modified: 2010-07-01 18:57 UTC (History)
3 users (show)

Clone Of: 579680
Last Closed: 2010-07-01 18:57:25 UTC

Attachments (Terms of Use)

Description Jan Kaluža 2010-06-22 08:28:40 UTC
+++ This bug was initially created as a clone of Bug #579680 +++


the logrotate package was updated to version logrotate-3.7.4-9
as of advisory RHBA-2008:0881-3

Now the problem with the missing postrotate and prerotate argument 
is getting worse.

Because now the argument is a list of _all_ logfiles which are rotated.

BUT IT SHOULD BE the first argument - the _one_ logfile that is rotated
at this invocation.

Example for an postrotate script as running fine in nearly all
RHEL and RHL releases before but now it is useless:

    rotate 7
        service yyy condrestart &>/dev/null
        service yyy condrestart &>/dev/null
      [ -f $1.7.gz ] && gzip -dc $1.7.gz | bzip2 >> $1.archive.bz2 && rm
      exit 0

arg1 holds "/var/log/lpis/*.log" on every invocation :-(

Comment from Assignee on reopen of https://bugzilla.redhat.com/show_bug.cgi?id=445554 was
  the referenced bug has been opened by the Support Engineering (i.e., on
behalf of the paying customer), I'm not going to re-open it.  If you have a
valid subscription, please go through the standard support channels.  If not
then you may file a new bug yourself and hope for the best.  I'm really sorry.

Also note that you have been using an undocumented feature which always
comes at risk.

Another bad news -- even though I'm still the logrotate upstream developer, I
don't maintain it in RHEL any more and I even left the Engineering department.

So again: if you don't have a valid subscription your best chance is to file
a new bug.

Kind Regards, Roland

--- Additional comment from jkaluza@redhat.com on 2010-06-16 09:50:55 EDT ---

Created an attachment (id=424455)
proposed patch

I think this patch could fix your problem. If "sharedscripts" is not specified in config file, currently rotated file is passed as arg1 to postrotate/prerotate script. If "sharedscripts" is specified, old behaviour is used (whole pattern is passed to postrotate/prerotate script).

Comment 1 Fedora Update System 2010-06-22 10:50:37 UTC
logrotate-3.7.8-9.fc13 has been submitted as an update for Fedora 13.

Comment 2 Fedora Update System 2010-06-22 17:17:16 UTC
logrotate-3.7.8-9.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update logrotate'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/logrotate-3.7.8-9.fc13

Comment 3 Fedora Update System 2010-07-01 18:57:10 UTC
logrotate-3.7.8-9.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.