FreeBSDPorts

WebHome | UnixGeekTools | Geekfarm | About This Site

Pointers

Create a port on a host to install on another host

    $ cd /var/db/pkg/fontconfig-2.2.0/
    $ pkg_create -v -c +COMMENT -d +DESC -f +CONTENTS -m +MTREE_DIRS ~/fontconfig-2.2.0.tgz

create pacakages from all installed ports

    cd /var/db/pkg
    for package in *
    do
        package_tarball="/home/pkg-current/$package.tgz"
        if [ ! -e $package_tarball ]
        then
            echo Creating package for $package in $package_tarball
            cd /var/db/pkg/$package
            pkg_create -v -c +COMMENT -d +DESC -f +CONTENTS -m +MTREE_DIRS $package_tarball
            echo
        fi
    done

Rebuilding all ports

This should ideally be done after a FreeBSDUpgrade.


    # force upward-recursive upgrade of portupgrade itself
    portupgrade -fR portupgrade

    # force rebuild of all ports
    portupgrade -af

CVSup

my current solution:

19 4 * * * /usr/local/bin/cvsup /root/ports-supfile

Upgrading ports on jails

wu-portupgrade


    #!/usr/local/bin/bash

    # set env vars for ports
    WITH_FASTX11=yes
    WITH_SDL=yes

    # Where to store backup packages (in case new ones don't work)
    export PKG_TMPDIR="/home/pkg-backup"

    [ ! -d $PKG_TMPDIR ] && mkdir $PKG_TMPDIR
    [ ! -d $PKG_TMPDIR ] && echo UNABLE TO MAKE DIRECTORY $PKG_TMPDIR && exit 1

    # Upgrade it all
    [ -z "$1" ] && options="$options --all "

    # Run Recursive
    [ -z "$1" ] && options="$options --recursive"

    # Back it up
    options="$options --backup-packages "

    # Do a make clean before
    options="$options --clean "

    # Do a make clean after
    options="$options --cleanup "

    # Run Interactive
    options="$options --interactive"

    command="portupgrade $options $@"

    echo $command
    $command




Updated Sun Jul 23, 2006 12:11 PM