Re: Intriqued by Bsd 4.4

From: Simon J Mudd (no email)
Date: Mon Oct 15 2001 - 06:17:36 EDT


 (Dominik Mierzejewski) writes:

> Sorry, I forgot one more thing:
> Postfix needs postfix user and group - but this is again not required
> during the RPM build process - we can check it in the %pre script and
> bail out, telling the admin to add them to his system.

I don't know which rpm spec file you are looking at, but these
extracts from the spec file show that I do indeed test for the
existence of a postfix user and group on the system:

Taken from postfix.spec.in v2.149 (snapshot spec file)

In %prep:

# create postfix user and group on BUILD machine if necessary
# Add the postfix group if not found
perl -e '$gid=getgrnam("postfix"); exit 1 unless defined( $gid )' || {
    perl -e '$nam=getgrgid(%{gid}); exit 1 unless defined( $nam )' && die \
          'gid collision, aborting install' \
          'either add "postfix" group or delete the group using GID %{gid}'
    %whinge "Adding postfix to /etc/group."
    /usr/sbin/groupadd -g %{gid} -r postfix
}
 
# Add the postfix user if not found
perl -e '$uid=getpwnam("postfix"); exit 1 unless defined( $uid )' || {
    perl -e '$nam=getpwuid(%{uid}); exit 1 unless defined( $nam )' && die \
        'uid collision, aborting install' \
        'either add "postfix" user or delete the user using UID %{uid}'
    %whinge "Adding postfix to /etc/passwd."
    /usr/sbin/useradd -d %{queue_directory} -s /bin/true -g postfix -M -r -u %{uid} postfix
}

The same procedure also takes place in the %pre stage before installing
postfix.

Simon

-- 
Simon J Mudd, Madrid SPAIN.   email: 
Tel: +34-91-408 4878,   Mobile: +34-605-085 219
-
To unsubscribe, send mail to  with content
(not subject): unsubscribe postfix-users







Hosted Email Solutions

Invaluement Anti-Spam DNSBLs



Powered By FreeBSD   Powered By FreeBSD