Subject: Re: pkgsrc fubar... how to apply a patch?
To: Keith Mastin <kmastin@beechtree.ca>
From: Alistair Crooks <agc@wasabisystems.com>
List: netbsd-help
Date: 08/21/2002 11:33:42
We've never really considered the case where someone would want to
change the value of LOCALBASE mid-stream.  The trouble with doing
that, as you've found, is that there are dependencies and implicit
assumptions about the location of installed files.

On Wed, Aug 21, 2002 at 02:36:03AM -0400, Keith Mastin wrote:
> I found the answer to this, so am posting the problem/solution for future 
> reference...
>  
> The problem stemmed from the fact that a couple of days ago I changed the 
> install directory from /usr/pkgsrc to /usr/local but did not deinstall, 
> clean and reinstall the expat, libmm, gmake, and finally libtool-base 
> packages. The hint to this solution was found when following the apache 
> error back to libmm and then gmake, which required libmm (installed in 
> /usr/pkgsrc), which in turn required libexpat (also installed in 
> /usr/pkgsrc), which in turn required libtool (also installed in 
> /usr/pkgsrc). The error hint was in libtool make deinstall/clean/make 
> sequence, where it suggested to deinstall the specific libtool version and 
> reinstall.

Actually, LOCALBASE defaults to "/usr/pkg", and a lot of people
install pkgsrc in "/usr/pkgsrc".  However, the source tree is location
independent, and you can have any number of them.
 
> So one by one, I went through the deps and did this in order... apache is 
> now installed in /usr/local.
> 
> Hope this makes things easier for someone in the future...
> 
> >Hi again. I put off writing to the list until after looking for this in 
> >the archives, also checked the users archives.
> >
> >Trying to install apache on 1.5.2, a bunch of deps that exist but are not 
> >found have me confounded. It's the libmm issue. I did a make clean, make 
> >and ran into the same problems. Back to the docs.
> >
> >I downloaded and make fetch-list, no problems, cd'ed to www/apache, ran 
> >make apache, which stopped at: 
> >	Shared object "libmm.so.12" not found
> >	*** Error code 1
> >
> >locate libmm.so.12:
> >	/usr/pkg/lib/libmm.so.12
> >	/usr/pkg/lib/libmm.so.12.21
> >	/usr/pkgsrc/devel/libmm/work/mm-1.2.1/.libs/libmm.so.12
> >	/usr/pkgsrc/devel/libmm/work/mm-1.2.1/.libs/libmm.so.12.21
> >	/usr/pkgsrc/www/apache/work/.buildlink/lib/libmm.so.12
> >	/usr/pkgsrc/www/apache/work/.buildlink/lib/libmm.so.12.21
> >
> >Reading the docs, seems I might need to update the package collection.
> >
> >I downloaded and untarred pkg_install-20020402.tar.gz (the one indicated 
> >in the pkgsrc/mk/bsd.pkg.mk file) into /usr/pkgsrc/pktools/ and did make 
> >install:
> >	bash-2.05# make install
> >	install ===> lib
> >	install ===> .WAIT
> >	cd: can't cd to /usr/pkgsrc/pkgtools/pkg_install/.WAIT
> >	*** Error code 2
> >
> >	Stop.

You don't need to compile everything as root - pkgsrc will detect this
when it needs to su, and do it "just in time".  There have been two
trojan attacks recently (in irssi and openssh, pkgsrc was vulnerable
to the irssi one, but not openssh) and the exposure to this sort of
trojan (which happens during the configure stage) is greatly reduced
if you run as a normal user.

Regards,
Alistair