Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Oct 1997 08:27:46 -0700 (PDT)
From:      Brion Moss <brion@queeg.com>
To:        Christopher Allen <gmfangs@asmrb.org>
Cc:        freebsd-doc@freebsd.org
Subject:   Re:Problem based on Handbook answer
Message-ID:  <199710201527.IAA26236@coven.queeg.com>
In-Reply-To: <v03110716b07072d9aada@lr8e1-port1.zocalo.net>
References:  <v03110716b07072d9aada@lr8e1-port1.zocalo.net>

next in thread | previous in thread | raw e-mail | index | archive | help
1) The problem is that the .tar.gz extension indicates a compressed
tar file.  In order to unpack it you need to give tar the "z" argument
(e.g., "tar xzvf" instead of "tar xvf").

2) The canonical way to do this is to use the ctm mailing lists to
keep current with the ports tree.  See the handbook for details, but
basically you subscribe to a mailing list that sends out patches
periodically, and you filter the mail through a program which applies
those patches.

Or, you could write a script that looks like this:

	#!/bin/sh
	# Fetch the new ports into /tmp
	cd /tmp
	fetch ftp://ftp.freebsd.org/pub/FreeBSD/FreeBSD-current/ports.tar.gz
	# delete the old ports files.  I didn't feel like listing them
	# all, you'll have to finish the list
	cd /usr
	rm -rf ports/{archivers,astro,audio,benchmarks,cad,chinese,...}
	# unpack the new ports file in place
	tar xzf /tmp/ports.tar.gz

Hope that helps.

	-Brion

Christopher Allen writes:
> I just installed FreeBSD, and discovered that my ports directory wasn't
> current.
> 
> In <http://www.freebsd.org/handbook/handbook28.html#30>; it says:
> >Let's try something more ambitious now. Instead of getting a single port
> >skeleton, let's get a whole sub-directory, for example all the database
> >skeletons in the ports collection. It looks almost the same:-
> >
> > # cd /usr/ports
> > # ftp ftp.freebsd.org
> > [log in as `ftp' and give your email address when asked for a
> > password. Remember to use binary (aka image) mode!]
> > > cd /pub/FreeBSD/ports
> > > get databases.tar.gz         [tarballs up the databases directory for us]
> > > quit
> > # tar xzf databases.tar.gz     [extract all the database skeletons]
> > # cd databases
> > # make install                 [build and install all the database ports]
> 
> I did all of the above, and grabbed a bunch of skeletons (www, net,
> security, etc.) to my newly installed FreeBSD machine, and I used binary
> mode to transfer.
> 
> However, when I got to the part to untar the files, I got the following
> message:
> 
> >#tar xvf www.tar.gz
> >tar: Hmm, this doesn't look like a tar archive.
> >tar: Skipping to next file header...
> >tar: only read 4672 bytes from archive www.tar.gz
> >cerebus gmfangs 176 7:23pm /usr/ports #
> 
> This happened on the other files as well.
> 
> 1) What is my problem?
> 
> 2) Is there any way to easily refresh all the skeletons without
> accidentally copying the distfiles/ directory? My ideal would be just a
> script that would delete all the ports/ directory except for the distfiles/
> and redownload the latest version.
> 
> -----------------------------------------------------------------------
> .. Christopher Allen                          1563 Solano Ave., #353 ..
> .. <gmfangs@asmrb.org>          ;->          Berkeley, CA 94707-2116 ..
> ..                                                     h510/528-9899 ..
> .. <http://www.asmrb.org/~gmfangs/>;      f510/649-3301 o510/649-3300 ..
> 
> 



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