All of lore.kernel.org
 help / color / mirror / Atom feed
From: bugzilla at busybox.net <bugzilla@busybox.net>
To: buildroot@busybox.net
Subject: [Buildroot] [Bug 7766] New: logrotate default gzip path is usually wrong
Date: Tue,  6 Jan 2015 13:48:42 +0000 (UTC)	[thread overview]
Message-ID: <bug-7766-163@https.bugs.busybox.net/> (raw)

https://bugs.busybox.net/show_bug.cgi?id=7766

           Summary: logrotate default gzip path is usually wrong
           Product: buildroot
           Version: unspecified
          Platform: All
        OS/Version: Linux
            Status: NEW
          Severity: minor
          Priority: P5
         Component: Other
        AssignedTo: unassigned at buildroot.uclibc.org
        ReportedBy: hjp at liab.dk
                CC: buildroot at uclibc.org
   Estimated Hours: 0.0


The default paths for gzip and gunzip in logrotate are located in /bin/,
however, both standalone gzip and busybox-gzip installs to /usr/bin by default
(as far as I can see, however).

As the standard logrotate.conf file enables delayed compression, this meant,
that only one rotation happened on our system (leading us to think that
logrotate worked), but after the first rotation, the memory was slowly filled
with logs due to logrotate not locating gzip and stopping:

rotating pattern: /var/log/modemd  524288 bytes (7 rotations)
empty log files are rotated, old logs are removed
considering log /var/log/modemd
  log needs rotating
rotating log /var/log/modemd, log->rotateCount is 7
dateext suffix '-20000101'
glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
compressing log with: /bin/gzip
error: failed to compress log /var/log/modemd.1

-----------
I consider three options for fixing this:

1) logrotate is "fixed" upstream with a function looking for gzip based on the
environment PATH variable. However, I dont see this as a likely option, as I
believe RedHat and Fedora still uses /bin/ for these kinds of programs, and
thus has no interest in changing it.

2) It is simply fixed in logrotate.mk by appending:
 -DCOMPRESS_COMMAND=/usr/bin/gzip -DUNCOMPRESS_COMMAND=/usr/bin/gunzip
to the CC part of:
 $(MAKE) CC="$(TARGET_CC) $(TARGET_CFLAGS)" LDFLAGS="$(LDFLAGS)" -C $(@D)

3) Patching the config.h file of logrotate to use /usr/bin

I don't see what seems more fit? I'll help as much as possible with testing and
implementation.

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

             reply	other threads:[~2015-01-06 13:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-06 13:48 bugzilla at busybox.net [this message]
2015-01-06 14:08 ` [Buildroot] [Bug 7766] logrotate default gzip path is usually wrong bugzilla at busybox.net
2015-01-06 14:20 ` bugzilla at busybox.net
2015-01-06 14:38 ` bugzilla at busybox.net
2015-01-06 14:43 ` bugzilla at busybox.net
2015-01-06 17:05 ` bugzilla at busybox.net
2015-01-06 20:18 ` bugzilla at busybox.net

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-7766-163@https.bugs.busybox.net/ \
    --to=bugzilla@busybox.net \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.