Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Aug 2011 15:46:57 +0200
From:      Ruben de Groot <mail25@bzerk.org>
To:        Howard Jones <howie@thingy.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: [freebsd-questions] FreeBSD supported versions (UNCLASSIFIED)
Message-ID:  <20110811134657.GA71716@ei.bzerk.org>
In-Reply-To: <4E43C0D3.6040105@thingy.com>
References:  <55A74C53CF85244A8000286B9B0313FE19534CB154@SCHOENTB1EXMB02.ap.ds.army.mil> <46F365E4DFD3421A4869B342@mac-pro.magehandbook.com> <CAHu1Y72BvzSWvn4Vpqf6BmG-CEexh6c4tDB8s3vZLWr7r40tfw@mail.gmail.com> <F1DF92842F3E008A2B4C9F69@mac-pro.magehandbook.com> <4E43C0D3.6040105@thingy.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Aug 11, 2011 at 12:45:23PM +0100, Howard Jones typed:
> On 11/08/2011 12:37, Daniel Staal wrote:
> >
> > (Well, ok, given the current release structure having an update today
> > means you are in a supported branch, and that supported branch will
> > continue to get updates for the foreseeable future.  But that still
> > does not tell me when the branch is likely to get unsupported, and in
> > theory a patch release could be made on the last day of support for a
> > branch.)
> A simple solution would be for there to ALWAYS be a patch release on the
> last day of support for a branch, that creates /etc/NOT-SUPPORTED or
> similar. Then it's just a matter of adding an /etc/cron.daily job to
> report on that, as long as you are following updates (and if you aren't
> you don't care about this issue).
> 
> I can't think of any other OS that does this, either - they generally
> just report that there are no available updates.

You can do a lot of nice stuff just parsing the cvsweb. For example,
here's a very basic script for showing supported branches:

#!/usr/bin/perl -w

use strict;
use LWP::Simple;

print "Supported branches of FreeBSD:\n\n";

my @content = split /\n/, get("http://www.freebsd.org/cgi/cvsweb.cgi/~checkout~/www/en/security/security.sgml");
die "Couldn't get url!" unless @content;

my $line = shift @content;
do { $line = shift @content; } until ($line =~ /name="supported-branches"/);
do { $line = shift @content; } until ($line =~ /table class="tblbasic"/);

while ($line = shift @content) {
        last if $line =~ /\<\/table\>/;
        if ($line =~ /\<t[hd]\>/) {
                $line =~ s/<[^>]*>//g;
                $line =~ s/^\s*//;
                printf "%-20s", $line;
        }
        print "\n" if $line =~ /\<\/tr\>/;
}




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