cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: ca-bundle.crt and `make install prefix=...`

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 7 Oct 2002 11:24:35 +0200 (MET DST)

On Fri, 4 Oct 2002, Roth, Kevin P. wrote:

> Two more problems with ca-bundle.crt (I'm sure you're lovin' it by now,
> Daniel ;-)

Heh, I knew I was gonna get problems with this stuff so I'm already wearing
my asbestos suit. ;-)

> 1. I do my curl builds in a subdirectory. Looks like this:
>
> $ tar xjf curl-7.10.tar.bz2
> $ mkdir curl-7.10/build
> $ cd curl-7.10/build
> $ ../configure --prefix=/usr
> $ make install
>
> The problem is in the install part - it's looking for the file
> 'lib/ca-bundle.crt', which is not found, because it's actually at
> '../lib/ca-bundle.crt'.
>
> My temporary fix for this was to copy the file by hand into the correct
> location...

Ah, right. This was due to me being stupid, but I made a fix and I tried to
do something like you did above and it seemed to work after this fix:

http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/curl/curl/lib/Makefile.am.diff?r1=1.46&r2=1.47

> 2. When building my cygwin binary packages, I do a `make install
> prefix=BLAH`, where BLAH is a temporary directory located at
> $(buildtop)/packages/Win32/cygwin/tmp_cygbuild. Note that I'm specifying a
> non-standard install prefix at MAKE time rather than at CONFIGURE time...

Is this really the "official" way of doing things like this? I mean, why do
you use different prefixes at configure and on make time?

If you want to install curl with a prefix=/usr but at a different path,
DESTDIR is the variable to set:

 $ ./configure --prefix=/usr
 $ make
 $ make DESTDIR=/tmp/foobar install

This will install everything in /tmp/foobar but it'll all have prefix /usr
anyway.

> When it installs ca-bundle.crt, instead of installing into the temp prefix,
> it installs to the one I specified at configure time
> (/usr/share/curl/curl-ca-bundle.crt).

Right, because the full path is defined by the configure script and only
DESTDIR can be set to change that at install time (DESTDIR simply prefixes
the actual path name).

> I could just specify my temp prefix at configure time, but since this used
> to work as I'm describing, could it be made to work again at some point?

I guess it can. However, that would require us to generate a new
lib/ca-bundle.h on make install, as that needs a full path name to the
installed bundle file.

Of course this is possible, I was just happy to get it working before, and I
guess I took a few shortcuts too many.

> If I can be of any assistance in testing a change, let me know. I just
> don't understand autoconf well enough to fix this problem.

I think that the solution to this problem is to do just what I said above,
make the 'make install' target change the lib/ca-bundle.h file to get the
correct full path.

-- 
 Daniel Stenberg -- curl related mails on curl related mailing lists please
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Received on 2002-10-07