/ Zope / Apsis / Pound Mailing List / Archive / 2007 / 2007-04 / make install - problems on FreeBSD - suggestion for README file.

[ << ] [ >> ]

[ Pound and SSL Offloading Recommendations / ... ] [ ubsubscribe / "Olivier Rossel" ... ]

make install - problems on FreeBSD - suggestion for README file.
peceka <peceka(at)gmail.com>
2007-04-17 09:51:01 [ FULL ]
Hi,

i don't know if it known bug or even treated as bug but on FreeBSD if i do:
./configure and I don't use  ie. --with-owner=pound --with-group=pound
and then make install i've got:
# make install
/usr/bin/install -c -d /usr/local/sbin
/usr/bin/install -c -o  -g  -m 555 pound /usr/local/sbin/pound
install: -g: Invalid argument

when using ie. --with-owner=pound --with-group=pound
then got:

# make install
/usr/bin/install -c -d /usr/local/sbin
/usr/bin/install -c -o pound -g pound -m 555 pound /usr/local/sbin/pound
install: pound: Invalid argument

so first i must add user and group pound and then do make install.
And i think that it should be mentioned in README file in INSTALLATION section.

What do you think?

Regards,
p.

Re: [Pound Mailing List] make install - problems on FreeBSD - suggestion for README file.
Robert Segall <roseg(at)apsis.ch>
2007-04-17 18:20:10 [ FULL ]
On Tue, 2007-04-17 at 09:51 +0200, peceka wrote:[...]

The autoconf script tries for the groups (as well as users) root, sys,
bin, daemon, www and proxy. If none of these exists you'll get the error
you saw. Is that the case on FreeBSD? Could it be you have no egrep (or
a buggy version) on your system?[...]

Re: [Pound Mailing List] make install - problems on FreeBSD - suggestion for README file.
Stefan Lambrev <stefan.lambrev(at)sun-fish.com>
2007-04-17 18:50:16 [ FULL ]
Hi,

Robert Segall wrote:[...][...][...]
Attached is "port" for FreeBSD (pound 2.3)
You can find it on the mail list archive (as attachments got stripped)
It will install pound binaries owned by root:wheel
[...]
Attachments:  
pound-2.3-port.tgz application/octet-stream 2155 Bytes

Re: [Pound Mailing List] make install - problems on FreeBSD - suggestion for README file.
peceka <peceka(at)gmail.com>
2007-04-18 11:50:09 [ FULL ]
> The autoconf script tries for the groups (as well as users) root,
sys,[...]

No, this behaviour is on all my freebsds. egrep is a standard in base
installation and it works well. :-)

regards,
p.

Re: [Pound Mailing List] make install - problems on FreeBSD - suggestion for README file.
peceka <peceka(at)gmail.com>
2007-04-18 11:57:40 [ FULL ]
> > The autoconf script tries for the groups (as well as users) root,
sys,[...]

Yes, i know that there is port for FreeBSD. that's not a problem, i
know what to do to install Pound on BSD system. ;-)
I'm just think about including info in README that someone new to BSD
systems will install it without any problem, of course if he/she will
read documentation...

regards,
p.

Re: [Pound Mailing List] make install - problems on FreeBSD - suggestion for README file.
Robert Segall <roseg(at)apsis.ch>
2007-04-18 18:11:56 [ FULL ]
On Wed, 2007-04-18 at 11:50 +0200, peceka wrote:[...]

Perhaps you could have a look at the configuration script and see what's
wrong with it? The relevant section looks like this:

if test "x${I_OWNER}" == "x"
then
    egrep -s '^root' /etc/passwd > /dev/null && I_OWNER=root
    egrep -s '^sys' /etc/passwd > /dev/null && I_OWNER=sys
    egrep -s '^bin' /etc/passwd > /dev/null && I_OWNER=bin
    egrep -s '^daemon' /etc/passwd > /dev/null && I_OWNER=daemon
    egrep -s '^www' /etc/passwd > /dev/null && I_OWNER=www
    egrep -s '^proxy' /etc/passwd > /dev/null && I_OWNER=proxy
fi

and similar for I_GRP.[...]

Re: [Pound Mailing List] make install - problems on FreeBSD - suggestion for README file.
Ken Lalonde <ken(at)globalremit.com>
2007-04-18 22:03:39 [ FULL ]
FreeBSD's test command doesn't like the "==" operator.
The patch below fixes the problem.

Another issue that affects pound on FreeBSD is
setting up the "RootJail" directory.  You must
mount a devfs instance in that directory,
so that the openssl code has access to /dev/*random.
In short, you want to define a start_precmd in pound.sh
that runs "devfs_mount_jail $RootJail/dev".

I've emailed an updated pound.sh.in to
the port maintainer.


--- /tmp/configure	Wed Apr 18 15:55:58 2007
+++ ./configure	Fri Apr 13 13:38:39 2007
(at)(at) -7655,7 +7655,7 (at)(at)
 done
 
 
-if test "x${I_OWNER}" == "x"
+if test "x${I_OWNER}" = "x"
 then
     egrep -s '^root' /etc/passwd > /dev/null && I_OWNER=root
     egrep -s '^sys' /etc/passwd > /dev/null && I_OWNER=sys
(at)(at) -7666,7 +7666,7 (at)(at)
 fi
 
 
-if test "x${I_GRP}" == "x"
+if test "x${I_GRP}" = "x"
 then
     egrep -s '^root' /etc/group > /dev/null && I_GRP=root
     egrep -s '^sys' /etc/group > /dev/null && I_GRP=sys

Re: [Pound Mailing List] make install - problems on FreeBSD - suggestion for README file.
Stefan Lambrev <stefan.lambrev(at)sun-fish.com>
2007-04-18 22:09:03 [ FULL ]
Hi,

Robert Segall wrote:[...]
>>> The autoconf script tries for the groups (as well as users) root,
sys,
>>> bin, daemon, www and proxy. If none of these exists you'll get the
error
>>> you saw. Is that the case on FreeBSD? Could it be you have no
egrep (or
>>> a buggy version) on your system?
>>>       [...][...]
Aha this seems to be linuxisum ;)
In linux "sh" does not exist but it is replaced by bash.
In FreeBSD "sh" is "sh" and when you force #!/bin/sh
it will not work because this is not a shell script, but bash script.

The right syntax should be:

if [ -z  ${I_OWNER} ]
then
    egrep -s '^root' /etc/passwd > /dev/null && I_OWNER=root
    egrep -s '^sys' /etc/passwd > /dev/null && I_OWNER=sys
    egrep -s '^bin' /etc/passwd > /dev/null && I_OWNER=bin
    egrep -s '^daemon' /etc/passwd > /dev/null && I_OWNER=daemon
    egrep -s '^www' /etc/passwd > /dev/null && I_OWNER=www
    egrep -s '^proxy' /etc/passwd > /dev/null && I_OWNER=proxy
fi


Well at least this work on sh, bash and zsh without difference ;)[...]

Re: [Pound Mailing List] make install - problems on FreeBSD - suggestion for README file.
Robert Segall <roseg(at)apsis.ch>
2007-04-19 18:03:05 [ FULL ]
On Wed, 2007-04-18 at 23:09 +0300, Stefan Lambrev wrote:[...]

You're right - many thanks. It will be fixed in the next release.[...]

MailBoxer