[freebsd-questions] FreeBSD supported versions (UNCLASSIFIED)

Ruben de Groot mail25 at bzerk.org
Thu Aug 11 13:47:03 UTC 2011


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\>/;
}



More information about the freebsd-questions mailing list