Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 31 Mar 2001 23:58:40 +0200
From:      "Andre Goeree" <abgoeree@uwnet.nl>
To:        ports@freebsd.org
Subject:   Re: Error: your port uses an old layout.
Message-ID:  <20010331235840.A14256@mandark.attica.home>
In-Reply-To: <200103312143.f2VLhBf83710@ns1.unixathome.org>; from dan@langille.org on Sun, Apr 01, 2001 at 09:43:09AM %2B1200
References:  <200103310900.f2V90lf78965@ns1.unixathome.org>; <20010331233502.A13899@mandark.attica.home> <200103312143.f2VLhBf83710@ns1.unixathome.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--mP3DRpeJDSE+ciuQ
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Sun, Apr 01, 2001 at 09:43:09AM +1200, Dan Langille wrote:
> On 31 Mar 2001, at 23:35, Andre Goeree wrote:
> > 
> > Please try out the fix i described. It's a painless cure for those
> > bitten by the "old port lay-out" problem :-) It saves people having
> > to CVSup from scratch :-) In fact the filter is a solution to *all* 
> > problems related to CVSup not deleting files.
> > 
> > I attached (an older) backup script i use to roll tarballs of my
> > CVSupped stuff. You probably only have to modify it a little to
> > test/try out my fix to the old ports lay-out problem.
> > 
> > To convince yourself:
> > Take an old ports distrib and untar it somewhere.
> > Use a temporary cvsup file that uses this directory for ports and a
> > separate sup directory (not to mess up your own CVSup stuff).
> > CVSup once using the temporary cvsup file and try to build a port,
> > it will give you the error. 
> > Modify attached backup script so it will use the temporary ports/sup
> > dirs that you created. 
> > Roll a tarball using the backup script and untar it somewhere else. 
> > Go to this newly created portsdir and try to make a port, you will
> > succeed this time :-) This is the way i tested the fix.
> > 
> > Good luck on helping these people out!
> 
> Thanks.  Two issues:
> 
> 1 - I have less than 24 hours before I fly overseas so I don't have time or 
> the facilities to test the script.
> 
> 2 - Given my time frame, I was unable to understand how to use the 
> script.  Given a /usr/ports which fails, what does the newbie do?
> 
> 3 - Please post this script to -ports and ask for comment compared to 
> the script which Will Andrews posted.  Or if you prefer, with your 
> permission, I will.
> 
> Thank you.
> 
> -- 
> Dan Langille
> pgpkey - finger dan@unixathome.org | http://unixathome.org/finger.php
> got any work?  I'm looking for some.
> 


-- Andre.


--mP3DRpeJDSE+ciuQ
Content-Type: application/x-sh
Content-Disposition: attachment; filename="backup.sh"

#!/bin/sh
#
# $HOME/etc/rootstuff/backup.sh
#
# Variables

PREFIX=/usr
SUPBASE=/usr/local/cvsup
SUPDIR=/usr/local/cvsup/sup

BACKROOT=/home/backup
BACKDIR=${BACKROOT}/freebsd

SCRIPT=${0##*/}
TMP=/tmp/${0##*/}_$$
DATE=$(date +%m-%d)
TARSUFX=.tgz
TAROLD=.old
#TARBALL=${BACKDIR}/${1}-${DATE}${TARSUFX}
TARBALL=${BACKDIR}/${1}${TARSUFX}


# Roll a tarball
backup() {
    # cat checkouts files to one file
    cat ${SUPDIR}/${1}-*/* > ${TMP}_checkouts

    # convert the file to a file-list
    sed 's/^C /XXX /' ${TMP}_checkouts |grep -w XXX | \
	awk '{print $2}' |sed 's/,v//' |sort |uniq > ${TMP}_list

    # If the tarball exist
    #if [ -f ${TARBALL} ] ; then
    #mv ${TARBALL} ${TARBALL}.old
    #fi

    # change directory to the "cvsup prefix" and roll the tarball
    cd $PREFIX && tar -zcvf ${TARBALL} --files-from ${TMP}_list

    # cleanup
    rm -f ${TMP}_checkouts ${TMP}_list
}

# These are targets that always get backed up
always() {
    cd /var && tar -zcvf ${BACKDIR}/var.tgz pkg/db
    cd /usr/local && tar -zcvf ${BACKDIR}/cvsup.tgz cvsup
}

case "$1" in
	ports|src|doc)
	    backup $1
	    ;;
	var)
	    cd /var && tar -zcvf ${BACKDIR}/var.tgz db/pkg
	    ;;
	cvsup)
	    cd /usr/local && tar -zcvf ${BACKDIR}/cvsup.tgz cvsup
	    ;;
	*)
	    echo "${SCRIPT} [src|doc|ports|var|cvsup]"
	    ;;
esac


--mP3DRpeJDSE+ciuQ--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010331235840.A14256>