From anders@totem.fix.no  Tue Jun  5 23:13:14 2001
Return-Path: <anders@totem.fix.no>
Received: from totem.fix.no (totem.fix.no [213.142.66.130])
	by hub.freebsd.org (Postfix) with ESMTP id 715F437B405
	for <FreeBSD-gnats-submit@freebsd.org>; Tue,  5 Jun 2001 23:13:14 -0700 (PDT)
	(envelope-from anders@totem.fix.no)
Received: by totem.fix.no (Postfix, from userid 1000)
	id 4114D3C8E; Wed,  6 Jun 2001 08:13:13 +0200 (CEST)
Message-Id: <20010606061313.4114D3C8E@totem.fix.no>
Date: Wed,  6 Jun 2001 08:13:13 +0200 (CEST)
From: Anders Nordby <anders@fix.no>
Reply-To: Anders Nordby <anders@fix.no>
To: FreeBSD-gnats-submit@freebsd.org
Subject: Add bzip2 hook to newsyslog(8)
X-Send-Pr-Version: 3.2

>Number:         27901
>Category:       bin
>Synopsis:       Add bzip2 hook to newsyslog(8)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    obrien
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jun 05 23:20:01 PDT 2001
>Closed-Date:    Mon Jul 30 09:27:37 PDT 2001
>Last-Modified:  Mon Jul 30 09:27:51 PDT 2001
>Originator:     Anders Nordby
>Release:        FreeBSD 4.3-STABLE i386
>Organization:
Fluxpod Information eXchange
>Environment:

kern.osreldate: 430000 (4.3-STABLE)
kern.osreldate: 500018 (5.0-20010420-CURRENT)

>Description:

This adds a bzip2 hook to newsyslog(8), to make it possible to have logs
compressed using bzip2. Very useful to keep disk usage down, but:

* Adds a dependancy to the bzip2 port. Which is specified in the man page, so
I guess it's OK since it only uses the binary.
* Uses /usr/local/bin/bzip2 directly. newsyslog will print where it tried to
execute bzip2 from if it fails. I suppose I could add a possibility to override
the path to bzip2 using an environment variable if that was of interest. This
would of course be much easier if bzip2 was in the base system, but I guess
there are reasons not to since it's not there already?

Let me know what you think, and I'll change the patches if improvements are
needed. Both gzip and bzip2 relates to environment variables GZIP and
BZIP/BZIP2 for options respectively (this works with newsyslog too), so I
guess using a BZIP2PATH to override the bzip2 location may be suitable?

>How-To-Repeat:

	<Code/input/activities to reproduce the problem (multiple lines)>

>Fix:

In src/usr.sbin: http://home.nuug.no/~anders/newsyslog.diffs
In src/etc: http://home.nuug.no/~anders/newsyslog.conf.diffs
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->obrien 
Responsible-Changed-By: obrien 
Responsible-Changed-When: Thu Jun 21 07:45:11 PDT 2001 
Responsible-Changed-Why:  

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=27901 
State-Changed-From-To: open->closed 
State-Changed-By: obrien 
State-Changed-When: Mon Jul 30 09:27:37 PDT 2001 
State-Changed-Why:  
Committed (with tweaks) 
thanks! 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=27901 
>Unformatted:
