On Thu, Dec 23, 2004, Michael Schloh wrote:
>On Wed, Dec 22, 2004, Bill Campbell wrote:
>> The attached patch to the CURRENT amavisd.spec file does two things.  It
>> fixes the amavisd.conf file to add a $LOGFILE line (there wasn't any in the
>> conf file so the old edit didn't work).  It also creates the empty
>> directories under the %{l_prefix/amavisd/var directory that the
>> amavisd.conf file says need to be created manually.
>>
>Seems reasonable, I'll investigate this on a machine running amavisd.

I've got amavisd from Release 2.2 running on several machines, and got
tired of having to manually make directories and edit the amavisd.conf file
to add the LOGFILE entry.  I installed the patched version on a new machine
yesterday, and it seems to be working fine.

>> NOTE:  The line I changed in the ``%{l_shtool} subst'' invocation uses
>> ``\n'' to append a line after the MYHOME line.  This is fine with the
>> OpenPKG coreutils but won't work with the standard FreeBSD sed program.
>>
>This caught my eye, and I don't understand how coreutils is related. Don't
>you mean to say that because the shtool substition uses unportable sed
>features (like some other packages), it should depend (enforced by PreReqs)
>on the OpenPKG 'sed' package? That is how I've handled such problems in the
>past, but please enlighten me if you know a better way.

In this particular case, one could simply append the LOGFILE line to the
end of the amavisd.conf file after running shtool, but that doesn't solve
the more general case.  The places where I've used ``\n'' in substitutions
have been where I want to append or insert lines in a file, and I wouldn't
think that sed's append syntax would fit very well in the ``shtool subst''
invocation.

The coreutils package contains the gnu versions of sed, cp, etc.  which get
around portability problems.  I would put coreutils in the BuildPreReq,
assuming that would require it for the build process, but not necessarily
for the run time so, hopefully, it wouldn't create a dependency that caused
the package to automatically be rebuilt if coreutils is updated.

There are several programs that are used extensively by rpm in the build
process that aren't included in the openpkg package itself including cp,
sed, and xargs.  The rpm macros use these extensively with options that
aren't recognized by non-gnu versions of the programs or using things like
the sed extensions to recognize the standard ``C'' escapes (e.g. \t, \n,
and so forth).

Given that the packages that are included in openpkg plus these are all in
the Linux ``busybox'' used by the LRP and its decendants, I've wondered it
if the busybox versions couldn't be used instead of the larger separate
packages.  I've never tried building busybox on non-Linux systems so don't
know what technical challenges are there.

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
UUCP:               camco!bill  PO Box 820; 6641 E. Mercer Way
FAX:            (206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676
URL: http://www.celestial.com/

The essence of all slavery consists in taking the produce of another's
labor by force. It is immaterial whether this force be founded on ownership
of the slave or ownership of the money that he must get to live on.
    Leo Tolstoy 1891
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
Developer Communication List                   openpkg-dev@openpkg.org

Reply via email to