You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Christian Couder <Ch...@fr.alcove.com> on 2001/02/15 12:18:42 UTC

Configure and buildinfo.sh problem

Hello,

I am a newbie on this list, and here is my problem.
 
In my /etc/resolv.conf file, on the first line I have:
  
  search prod.marchfirst.fr\000

I don't know if the \000 at the end is valid or not, but the network seems to
work fine with it and it seems not to work without it.

My problem is that the apache configure script (I tested both 1.3.17 and
1.3.14) does this:

    conf_serveradmin="`$aux/buildinfo.sh -n %u@%h%d`"
    conf_servername="`$aux/buildinfo.sh -n %h%d`"

and buildinfo.sh is looking into my resolv.conf to find the domain name
so that 'conf_servername' is set to something like this:

alcove1.prod.marchfirst.fr%d00

Of course there seem to be a bug in buildinfo.sh, because it should be
something like 

alcove1.prod.marchfirst.fr\000

or

alcove1.prod.marchfirst.fr

But the problem appears latter in the configure file, because there is

sed <Makefile.tmpl >$mkf \
-e "s%@PLATFORM@%$PLATFORM%g" \
-e "s%@PERL@%$PERL%g" \

[... I skip many lines like the above ...]

-e "s%@conf_serveradmin@%$conf_serveradmin%g"
-e "s%@conf_servername@%$conf_servername%g"

[... I skip a few more lines ...]
  
and it doesn't work in the 2 latter code lines.

Of course, because there is a '%' character in $conf_servername and in
$conf_serveradmin !

So I suggest to fix the buildinfo.sh script. And I think it would be
also a good idea to test all the variables to be sure that there is no '%'
character in them before the big 'sed <Makefile.tmpl >$mkf ...' in the
configure file.

In the buildinfo.sh script, the bug is somewhere in these lines:

        if [ "x$domainname" = "x" ]; then 
	     domainname="`egrep '^[      ]*search' /etc/resolv.conf |
	     head -1 |\
             sed -e 's/.*search//' \ 
		-e 's/^[   ]*//' -e 's/^ *//' -e 's/^      *//' \
		-e 's/ .*//' -e 's/        .*//' \
		-e 's/^\.//' -e 's/^/./' |\
	     awk '{ printf("%s", $1); }'`"
	fi

And I don't know how to fix it because I don't know if the \000 should
be removed or not.

Thanks for any fix or thought about this.

Regards,
Christian.



  

Re: Configure and buildinfo.sh problem

Posted by Greg Stein <gs...@lyra.org>.
On Thu, Feb 15, 2001 at 12:18:42PM +0100, Christian Couder wrote:
> Hello,
> 
> I am a newbie on this list, and here is my problem.
>  
> In my /etc/resolv.conf file, on the first line I have:
>   
>   search prod.marchfirst.fr\000
> 
> I don't know if the \000 at the end is valid or not, but the network seems to
> work fine with it and it seems not to work without it.

It shouldn't be in there. You'll need to remove it and then track down the
reasons for your network not working. But I don't think Apache needs to
change to deal with resolve.conf files that have a NUL character in them.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/