Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 Jun 2011 20:26:22 +0100
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        freebsd-questions@freebsd.org
Subject:   Re: cvs vs. DVD
Message-ID:  <4E0787DE.1060606@infracaninophile.co.uk>
In-Reply-To: <BANLkTinZTRE7fErzxugTvsyfWxOJFcFv_g@mail.gmail.com>
References:  <BANLkTinZTRE7fErzxugTvsyfWxOJFcFv_g@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enigF6CDEB935C034E8AD81E2872
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On 26/06/2011 19:02, wayne mitchell wrote:
> be warned, you are dealing with a  'newbie'
> i have one machine that has internet access and another that does not
> both machines were installed with FreeBSD_RELEASE_8_1 with a DVD
> i am now using cvsup to upgrade the RELENG_8_1_RELEASE tree
>=20
> my second machine does not have working ethernet
>=20
> how do i transfer the updated ports tree to the other machine using
> only storage media (DVD, USB)
>=20
> my guess (hack) is to find all relavent files/data trees and simply
> copy over, then run necessary updates (portsdb, make world...)
>=20
> if that is correct then can you tell where those files are ?

For updating the base system, you need only copy across everything under
/usr/src -- you can then upgrade by building and installing world
+ kernel.  Easiest way to copy that directory tree across is to make a
tarball of it.  Assuming you have a USB stick mounted at /mnt/usb,
then:

     # cd /usr
     # tar -Jcvf /mnt/usb/usr-src.tar.xz src

Then unmount the usb stick, and mount it on the other host.  Extract
the files by:

     # cd /usr
     # mv src src.old   (or rm -rf src if you're feeling over-confident)
     # tar -xvf /mnt/usb/usr-src.tar.xz

How to update your machine by compiling the system sources is well
described in the Handbook, and there are instructions in
/usr/src/UPDATING too.

For updating ports, you can either copy /usr/ports in much the same way
-- assuming you've kept all of the distfiles you're going to need still
in /usr/ports/distfiles.

Or you can create pkg tarballs for any port you have installed on your
connected machine, plus pkgs for all of the dependencies.  First make
sure that everything on your connected machine is up to date:

     # portsnap fetch update       (or csup, or whatever you prefer)
     # portmaster -a

Then make packages of anything you want on the other machine, plus any
dependencies thereof:

     # cd /mnt/usb
     # pkg_create -b -R foobar-1.2.3

Move the USB stick to the other machine and install the pkg, which will
automatically include any dependencies not already installed:

     # pkg_add /mnt/usb/foobar-1.2.3.tbz

This will work equally well for ports you've installed yourself from the
ports tree, or for pkgs installed from the FreeBSD ftp servers[*].

It gets slightly tricky if you want to upgrade stuff via pkgs.  I
believe it should work if you install portmaster on your isolated
machine, and then do:

-- on the connected machine:

     # cd /mnt/usb
     # pkg_create -b -R foobar-1.2.3    (as before)
     # cp /usr/ports/INDEX-8 /mnt/usb

-- move the usb stick over to the isolated machine and do:

     # cp /mnt/usb/INDEX-8 /usr/ports/INDEX-8
     # portmaster -PP --local-packagedir=3D/mnt/usb \
          --packages-local foobar-1.2.3

(Not tested -- but if it works the way I think it should, that will
update foobar-1.2.3 and anything it depends on to the latest available
versions)

	Cheers,

	Matthew

[*] Verb. Sap.  Mixing up stuff installed from a local ports tree and
stuff installed from the pkg archives frequently leads to version
clashes, wailing and gnashing of teeth.  Unless you know exactly what
you are doing, it's best to stick exclusively to one or other of those
methods.

--=20
Dr Matthew J Seaman MA, D.Phil.                   7 Priory Courtyard
                                                  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey     Ramsgate
JID: matthew@infracaninophile.co.uk               Kent, CT11 9PW


--------------enigF6CDEB935C034E8AD81E2872
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.16 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk4Hh+UACgkQ8Mjk52CukIzz9QCfah9f68ROGTry+UMgbTvlLn67
R/cAn173S3rmYp/7dcRRxkkVVxluiEkj
=/Xm/
-----END PGP SIGNATURE-----

--------------enigF6CDEB935C034E8AD81E2872--



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