pkgdb -F issues

Matthew Seaman m.seaman at infracaninophile.co.uk
Mon Apr 5 12:55:46 PDT 2004


On Mon, Apr 05, 2004 at 11:28:58AM -0700, Gary Kline wrote:
> On Mon, Apr 05, 2004 at 12:18:06PM +0100, Matthew Seaman wrote:

> > [*] Lest this leads to much wailing and gnashing of teeth, I should
> > stress here that you'll also have to recompile any ports that link
> > against the OpenSSL shlibs so that they pick up the shlibs from the
> > base system.
 
> 	Matthew, is there any way of collecting a list of these ports
> 	so they may be automated, at least ro some degree?  Run 
> 	portupgrade at a low prio else at night?
> 
> 	I'm looking for some way of upgrading what must be upgraded,
> 	with MIN intervention... .

Hmmm... Well, one way of proceeding would be to find all of the ports
that have the

    USE_OPENSSL=   yes

macro set in their port Makefiles:

    #!/bin/sh
    
    cd /usr/ports
    for m in `find . -mindepth 3 -maxdepth 3 -name Makefile -print` ; do
        d=`echo $m| sed -e 's,/[^/]*$,,`
        ssl=`(cd $d && make -V USE_OPENSSL) | tr a-z A-Z`
    
        if [ x"$ssl" = x"YES" ]; then
            echo $m
        fi
    done

(we could just grep for USE_OPENSSL, but there are quite a few slave
ports which we'd miss by doing it that way)

then compare that list against the list of all the ports you have
installed, and recompile anything that appears in both places, but
only after you've sorted out which openssl libs you want installed.

    % pkg_info -oa | grep '.*/.*' | sort > installed
    % find-ssl | sort > uses-openssl
    % comm -3 uses-openssl installed

You could also define 'WITH_OPENSSL_BASE=yes' in /etc/make.conf or
pkgtools.conf -- see the comments at the top of
/usr/ports/Mk/bsd.openssl.mk Defining that will override the automatic
check that usually happens so you should be quite clear that you are
using a patched version of openssl before you do that.

Note that there is a simple and obvious and time saving improvement to
the way of doing the check outlined above; which I am embarrassed not
to have thought of immediately, but which I'll leave as an exercise
for the student...

	Cheers,

	Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20040405/db0d790a/attachment.bin


More information about the freebsd-questions mailing list