Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Feb 2003 14:32:27 +0000
From:      Yann Golanski <yann@kierun.org>
To:        "Brian T. Schellenberger" <bts@babbleon.org>
Cc:        Gordon Broom <gjbroom@alumni.uwaterloo.ca>, ajs@labs.mot.com, freebsd-stable@freebsd.org
Subject:   Re: Upgrading ports and such
Message-ID:  <20030227143227.GA2328@kierun.org>
In-Reply-To: <200302270918.51075.bts@babbleon.org>
References:  <58951.1046312634@selfstyled.dyndns.org> <200302270829.36028.bts@babbleon.org> <20030227135451.GA31745@kierun.org> <200302270918.51075.bts@babbleon.org>

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

--QKdGvSO+nmPlgiQ/
Content-Type: multipart/mixed; boundary="7JfCtLOvnd9MIVvH"
Content-Disposition: inline


--7JfCtLOvnd9MIVvH
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Quoth Brian T. Schellenberger on Thu, Feb 27, 2003 at 09:18:51 -0500
> This script might work, though. =20

I have been using the same version of this script on at least 4
different machines and _never_ had a problem while updating.  Actually,
that's not true.  I did have one issue with mailman (hence why I am not
upgrading it) because I use Exim as an MTA and the mailman port does not
detect it and uses the defaults for Sendmail.... But once in 2 years in
not too bad I think.

> The basic problem that portupgrade gave me, I think, was that my pkgdb
> wasn't quite right to start with and portupgrade can really screw
> things up badly.  It looks like it tries to warn you about that now
> but either it didn't then or I didn't follow what it was trying to
> tell me to do.

Hence the line that saves the database and sanitize it.

> In the script below I have come questions, though:
>=20
> 1. I can't quite tell where the "real" linebreaks are.

They are attached.

> 2. Why do you need the whole date thing?  Are you preserving the=20
> databbase so that you can restore if things go badly or something?

I do save the database in case things go very bad but I never had to use
it.  Still, better safe than sorry.

> 3. In general I'm not going to be comfortable running a script like this=
=20
> unless I can understand what it's doing, but I might decode it in a=20
> month or two if I feel like trying an upgrade then.

Pardon?  Decoding the script does not take any time... It upgrades your
ports tree to the latest cvs (cvsup line) tree of the ports.  It then
checks the database for consistency using pkgdb -F.  It then backs up
the database using tar and date.  It then calls porteupgrade to re-built
all the pacakages and their dependencies.  Then, it prints what has been
upgraded or problem ports to the screen. =20

If that is still too complicated, read the manual for cvsup, pkgdb, tar
and portupgrade.

> (As it happens, I just did an upgrade two weeks ago using my "scorched=20
> earth" approach so I don't feel any need to upgrade right now.)

You are aware that there were a couple of security fixes in the last few
days that you should install...

> I'm not so sure that I'm looking to change my approach anyway; the=20
> complete wipe / install approach gives a very clean and consistent=20
> system with just one version of each library and all that and I always=20
> take the chance to clean up and get rid of ports that I'm not really=20
> using.  That sort of cleanup won't ever happen with portupgrade. =20
> Though if the entire process could be fully automated with minimal=20
> downtime, that might make up for it.

Whatever works for you.  Of course, note that your system maybe unsecure
and unsafe because you do not upgrade packages for such a long time. =20

--=20
yann@kierun.org                  -=3D*=3D-                      www.kierun.=
org
    PGP:   009D 7287 C4A7 FD4F 1680  06E4 F751 7006 9DE2 6318
    IRC:   nick kierun, server spod.uk.amiganet.org, channel #sanctus
    NNGS:  nick kierun, server nngs.cosmic.org, port 9696.

--7JfCtLOvnd9MIVvH
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="GRIDLOCK.cvsup"

# CVSup for Anubis...
#
# cvsup -g -L 2 ANUBIS.cvsup
#

*default tag=.
*default host=cvsup.uk.FreeBSD.org
*default prefix=/usr
*default base=/usr/local/etc/cvsup
*default release=cvs delete use-rel-suffix compress

ports-all

--7JfCtLOvnd9MIVvH
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="GRIDLOCK.upgrade"

#!/bin/sh
# portupgrade script.

day=`date +%d`
month=`date +%b`
year=`date +%Y`

/usr/local/bin/cvsup -g -L 2 /usr/ports/GRIDLOCK.cvsup
/usr/local/sbin/pkgdb -F
/usr/bin/tar zvcf /var/db/$year-$month-$day-pkg.tgz /var/db/pkg
/usr/local/sbin/portupgrade -v -x mailman -ra -l /usr/ports/LATEST.update
/usr/bin/grep -v '^\-' /usr/ports/LATEST.update
exit

--7JfCtLOvnd9MIVvH--

--QKdGvSO+nmPlgiQ/
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE+XiF791FwBp3iYxgRAo9VAJ0ZaYTIQPa1u4cMD5lzDOD0XVCNSACeOTp6
56F1ssjBvbdIV6v1h8QRiAM=
=c0bs
-----END PGP SIGNATURE-----

--QKdGvSO+nmPlgiQ/--

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




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