Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Dec 2005 08:39:13 +0000
From:      Yann Golanski <yann@kierun.org>
To:        rihad <rihad@mail.ru>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: ports security branch
Message-ID:  <20051220083913.GA505@kierun.org>
In-Reply-To: <43A7A3F7.7060500@mail.ru>
References:  <43A7A3F7.7060500@mail.ru>

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

--1LKvkjL3sHcu1TtY
Content-Type: multipart/mixed; boundary="gKMricLos+KVdGMg"
Content-Disposition: inline


--gKMricLos+KVdGMg
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Quoth rihad on Tue, Dec 20, 2005 at 10:25:59 +0400
> Is there a security branch for the FreeBSD ports collection? Let's say,
> I installed FreeBSD 6.0 together with all needed -RELEASE ports/packages
> (i.e., those on the CD). Running security/portaudit after a while
> reveals that some of the installed packages have vulnerabilities. Am I
> on my own to go grab the fresh ports tree, and upgrade the affected
> software, suffering all the intricacies of the move by myself? Debian
> GNU/Linux has its security package updates, OpenBSD has a separately
> maintained "errata" ports branch (it's very likely you still get to
> download a newer release of the software, though).

Attached is a script I use to update my machines.  It works fine but
you need to understand what it does and not run it blindly.  DO NOT put
that in cron, there lies pain!

Otherwise, just run the script and it will update all your ports for
you.  It'll even mail you with the updated ports.=20

--=20
yann@kierun.org                  -=3D*=3D-                      www.kierun.=
org
    PGP:   009D 7287 C4A7 FD4F 1680  06E4 F751 7006 9DE2 6318

--gKMricLos+KVdGMg
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="PORT.update"
Content-Transfer-Encoding: quoted-printable

#!/bin/sh
# portupgrade script.

### variables.
day=3D`date +%d`
month=3D`date +%b`
year=3D`date +%Y`
host=3D`uname -n`
tmp=3D".upgrade.tmp"

### Does what it does...
#/usr/local/bin/cvsup -g -L 2 /usr/ports/CVSUP
make update
make fetchindex
less /usr/ports/UPDATING
echo 'Do you want to update the port tree? [yn]?'
read -p '[y]es or [n]o: ' -e val
case ${val} in
[yY])
  echo 'Updating the port collection now!!!...'
  ;;
[nN])
  echo 'Aborting NOW!!!...'
  exit;
  ;;
*)
  echo 'What the hell?... I am aborting now.'
  exit;
  ;;
esac
#/usr/local/sbin/portsdb -Uu
/usr/local/sbin/pkgdb -F
/usr/bin/tar ycf /var/db/$year-$month-$day-pkg.tbz2 /var/db/pkg
/usr/local/sbin/portupgrade -C -u -v -r -R -a -l /usr/ports/LATEST.update
/usr/local/sbin/portaudit -Fad > $tmp
echo ''>> $tmp
cat /usr/ports/LATEST.update | sort >> $tmp
cat $tmp | mail -s "Portupdate $host on $day $month $year" root@$host
/usr/local/sbin/portsclean -C -L -P -D
/usr/home/yann/bin/aide.sh

### reporting.
echo ''
echo 'This is what has been updated today:'
/usr/bin/grep -v '^\-' /usr/ports/LATEST.update | sort=20
echo ''
exit

--gKMricLos+KVdGMg--

--1LKvkjL3sHcu1TtY
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (FreeBSD)

iD8DBQFDp8Mx91FwBp3iYxgRAhf/AJ9g3I9H/pe3dpx+2Si7SO7qT+TUCwCcC6vb
2UU/8sz+y+VUYcl7+ZuAp/M=
=z96o
-----END PGP SIGNATURE-----

--1LKvkjL3sHcu1TtY--



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