distro-info-data-0.18/0000755000000000000000000000000012263105705011475 5ustar distro-info-data-0.18/validate-csv-data0000755000000000000000000001344011736573123014725 0ustar #!/usr/bin/python # Copyright (C) 2012, Benjamin Drung # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. """Validates a given Debian or Ubuntu distro-info CSV file.""" import csv import datetime import optparse import os import sys _COLUMNS = { "debian": ("version", "codename", "series", "created", "release", "eol"), "ubuntu": ("version", "codename", "series", "created", "release", "eol", "eol-server"), } _DATES = ("created", "release", "eol", "eol-server") _EARLIER_DATES = ( ("created", "release"), ("release", "eol"), ("eol", "eol-server"), ) _STRINGS = { "debian": ("codename", "series"), "ubuntu": ("version", "codename", "series"), } def convert_date(string): """Convert a date string in ISO 8601 into a datetime object.""" if not string: date = None else: parts = [int(x) for x in string.split("-")] if len(parts) == 3: (year, month, day) = parts date = datetime.date(year, month, day) else: raise ValueError("Date not in ISO 8601 format.") return date def error(filename, line, message, *args): """Prints an error message""" print >> sys.stderr, "%s:%i: %s." % (filename, line, message % args) def validate(filename, distro): """Validates a given CSV file. Returns True if the given CSV file is valid and otherwise False. """ failures = 0 content = open(filename).readlines() # Remove comments for line in xrange(len(content)): if content[line].startswith("#"): content[line] = "\n" csvreader = csv.DictReader(content) for row in csvreader: # Check for missing columns for column in _COLUMNS[distro]: if not column in row: msg = "Column `%s' is missing" error(filename, csvreader.line_num, msg, column) failures += 1 # Check for additinal columns for column in row: if not column in _COLUMNS[distro]: msg = "Additional column `%s' is specified" error(filename, csvreader.line_num, msg, column) failures += 1 # Check required strings columns for column in _STRINGS[distro]: if column in row and not row[column]: msg = "Empty column `%s' specified" error(filename, csvreader.line_num, msg, column) failures += 1 # Check dates for column in _DATES: if column in row: try: row[column] = convert_date(row[column]) except ValueError: msg = "Invalid date `%s' in column `%s'" error(filename, csvreader.line_num, msg, row[column], column) failures += 1 row[column] = None # Check required date columns column = "created" if column in row and not row[column]: msg = "No date specified in column `%s'" error(filename, csvreader.line_num, msg, column) failures += 1 # Compare dates for (date1, date2) in _EARLIER_DATES: if date2 in row and row[date2]: if date1 in row and row[date1]: # date1 needs to be earlier than date2 if row[date1] >= row[date2]: msg = ("Date %s of column `%s' needs to be later " "than %s of column `%s'") error(filename, csvreader.line_num, msg, row[date2].isoformat(), date2, row[date1].isoformat(), date1) failures += 1 else: # date1 needs to be specified if date1 is specified msg = ("A date needs to be specified in column `%s' due " "to the given date in column `%s'") error(filename, csvreader.line_num, msg, date1, date2) failures += 1 return failures == 0 def main(): """Main function with command line parameter parsing.""" script_name = os.path.basename(sys.argv[0]) usage = "%s -d|-u csv-file" % (script_name) parser = optparse.OptionParser(usage=usage) parser.add_option("-d", "--debian", dest="debian", action="store_true", default=False, help="validate a Debian CSV file") parser.add_option("-u", "--ubuntu", dest="ubuntu", action="store_true", default=False, help="validate an Ubuntu CSV file") (options, args) = parser.parse_args() if len(args) == 0: parser.error("No CSV file specified.") elif len(args) > 1: parser.error("Multiple CSV files specified: %s" % (", ".join(args))) if len([x for x in [options.debian, options.ubuntu] if x]) != 1: parser.error("You have to select exactly one of --debian, --ubuntu.") if options.debian: distro = "debian" else: distro = "ubuntu" if validate(args[0], distro): return 0 else: return 1 if __name__ == "__main__": sys.exit(main()) distro-info-data-0.18/debian.csv0000644000000000000000000000127012263067541013441 0ustar version,codename,series,created,release,eol 1.1,Buzz,buzz,1993-08-16,1996-06-17,1997-06-05 1.2,Rex,rex,1996-06-17,1996-12-12,1998-06-05 1.3,Bo,bo,1996-12-12,1997-06-05,1999-03-09 2.0,Hamm,hamm,1997-06-05,1998-07-24,2000-03-09 2.1,Slink,slink,1998-07-24,1999-03-09,2000-10-30 2.2,Potato,potato,1999-03-09,2000-08-15,2003-07-30 3.0,Woody,woody,2000-08-15,2002-07-19,2006-06-30 3.1,Sarge,sarge,2002-07-19,2005-06-06,2008-03-30 4.0,Etch,etch,2005-06-06,2007-04-08,2010-02-15 5.0,Lenny,lenny,2007-04-08,2009-02-14,2012-02-06 6.0,Squeeze,squeeze,2009-02-14,2011-02-06,2014-05-04 7,Wheezy,wheezy,2011-02-06,2013-05-04 8,Jessie,jessie,2013-05-04 ,Sid,sid,1993-08-16 ,Experimental,experimental,1993-08-16 distro-info-data-0.18/Makefile0000644000000000000000000000040411736557042013144 0ustar PREFIX ?= /usr build: install: install -d $(DESTDIR)$(PREFIX)/share/distro-info install -m 644 $(wildcard *.csv) $(DESTDIR)$(PREFIX)/share/distro-info test: ./validate-csv-data -d debian.csv ./validate-csv-data -u ubuntu.csv .PHONY: build install test distro-info-data-0.18/debian/0000755000000000000000000000000012263105733012720 5ustar distro-info-data-0.18/debian/copyright0000644000000000000000000000166412122161176014657 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: distro-info-data Upstream-Contact: Benjamin Drung Files: * Copyright: 2009-2013, Benjamin Drung License: ISC Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. . THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. distro-info-data-0.18/debian/control0000644000000000000000000000160212263067440014324 0ustar Source: distro-info-data Section: devel Priority: optional Maintainer: Benjamin Drung Uploaders: Stefano Rivera Build-Depends: debhelper (>= 9), python Standards-Version: 3.9.5 Vcs-Git: git://anonscm.debian.org/collab-maint/distro-info-data.git Vcs-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/distro-info-data.git Package: distro-info-data Architecture: all Depends: ${misc:Depends} Breaks: distro-info (<< 0.3~) Replaces: distro-info (<< 0.3~) Description: information about the distributions' releases (data files) Information about all releases of Debian and Ubuntu. The distro-info script will give you the codename for e.g. the latest stable release of your distribution. To get information about a specific distribution there are the debian-distro-info and the ubuntu-distro-info scripts. . This package contains the data files. distro-info-data-0.18/debian/README.Debian0000644000000000000000000000160711762170254014770 0ustar distro-info =========== The distro-info package provides centralized lists of code-names and release history for the supported distributions (Currently: Debian and Ubuntu). The distro-info data (in the distro-info-data package) can be updated once, and all the packages using it will have the latest data. This avoids having to hard-code current development release names (and other such volatile data) into packages. Outdated Data Errors ==================== If you get an error that the package data is out of date, look for a newer distro-info-data package in your distribution's updates. On Debian, this is: deb http://ftp.debian.org/debian stable-updates main On Ubuntu, it is: deb http://archive.ubuntu.com/ubuntu $RELEASE-updates main where $RELEASE is the name of your release. If there isn't an update available yet, you should be able to install the latest version from Debian/unstable. distro-info-data-0.18/debian/source/0000755000000000000000000000000011566027503014223 5ustar distro-info-data-0.18/debian/source/format0000644000000000000000000000001511566027503015432 0ustar 3.0 (native) distro-info-data-0.18/debian/rules0000755000000000000000000000003611732726471014007 0ustar #!/usr/bin/make -f %: dh $@ distro-info-data-0.18/debian/compat0000644000000000000000000000000212122161174014111 0ustar 9 distro-info-data-0.18/debian/changelog0000644000000000000000000001222112263105733014570 0ustar distro-info-data (0.18) unstable; urgency=medium * Update EOL date of Ubuntu 13.04 "Raring Ringtai" to 2014-01-27. * Bump Standards-Version to 3.9.5. * Use just the stable release version without the point release suffix, i.e. 6.0 for squeeze, 7 for wheezy, and 8 for jessie. (Closes: #724557) -- Benjamin Drung Wed, 08 Jan 2014 00:20:59 +0100 distro-info-data (0.17) unstable; urgency=low * Add Ubuntu 14.04, Trusty Tahr (Closes: #726696) -- Stefano Rivera Fri, 18 Oct 2013 16:52:25 +0200 distro-info-data (0.16) unstable; urgency=low * Correct current Debian testing series from experimental to jessie. * Correct release date of Debian 7.0 "Wheezy". -- Benjamin Drung Wed, 08 May 2013 11:33:31 +0200 distro-info-data (0.15) unstable; urgency=low * Debian wheezy released. Update squeeze EOL. -- Stefano Rivera Sun, 05 May 2013 10:42:16 +0200 distro-info-data (0.14) unstable; urgency=low * Add Ubuntu 13.10, Saucy Salamander. Thanks Iain Lane. -- Stefano Rivera Thu, 25 Apr 2013 17:11:17 +0200 distro-info-data (0.13) unstable; urgency=low * Update EOL dates of Ubuntu 8.04 LTS, 10.04 LTS, and 11.10 to 2013-05-09. -- Benjamin Drung Sat, 30 Mar 2013 22:05:32 +0100 distro-info-data (0.12) unstable; urgency=low * Ubuntu 13.04 "Raring Ringtail" will only be supported for 9 month. * Switch to debhelper 9. * Bum Standards-Version to 3.9.4 (no changes needed). -- Benjamin Drung Tue, 19 Mar 2013 23:16:52 +0100 distro-info-data (0.11) unstable; urgency=low [ Benjamin Drung ] * Add Debian 8.0 "Jessie". [ Stefano Rivera ] * Add Ubuntu Raring Ringtail. -- Benjamin Drung Thu, 18 Oct 2012 11:20:58 +0200 distro-info-data (0.10) unstable; urgency=low * Add a README.Debian explaining how to deal with outdated data. -- Stefano Rivera Fri, 01 Jun 2012 18:42:15 +0200 distro-info-data (0.9) unstable; urgency=low * Add Ubuntu Quantal Quetzal. -- Stefano Rivera Mon, 23 Apr 2012 17:21:58 +0200 distro-info-data (0.8) unstable; urgency=low * Add validate-csv-data script to validate data on build time. -- Benjamin Drung Tue, 03 Apr 2012 15:41:01 +0200 distro-info-data (0.7) unstable; urgency=low * Use full dates (add days for future EOL dates of Ubuntu). -- Benjamin Drung Fri, 23 Mar 2012 15:29:11 +0100 distro-info-data (0.6) unstable; urgency=low * Put data into separate source package to avoid a full source rebuild for just updating the data. -- Benjamin Drung Fri, 23 Mar 2012 00:16:02 +0100 distro-info (0.5.1) unstable; urgency=low [ Stefano Rivera ] * Bump Standards-Version to 3.9.3, no changes needed. * Update machine-readable copyright Format to 1.0. [ Benjamin Drung ] * DebianDistroInfo.hs, UbuntuDistroInfo.hs: Replace System import by System.Environment and System.Exit import to fix build failure. -- Benjamin Drung Sat, 25 Feb 2012 16:11:25 +0100 distro-info (0.5) unstable; urgency=low * Allow retrieving the release version and full name with the Python module. (Closes: #647951) -- Benjamin Drung Mon, 23 Jan 2012 19:18:50 +0100 distro-info (0.4) unstable; urgency=low [ Stefano Rivera ] * Add is_lts method to UbuntuDistroInfo [ Benjamin Drung ] * Enable optimization for Haskell code. * Break old ubuntu-dev-tools package instead of recommending python-distro-info. -- Benjamin Drung Tue, 25 Oct 2011 23:19:56 +0200 distro-info (0.3) unstable; urgency=low [ Stefano Rivera ] * Add basic Perl module, API-compatible with the Python one. * Add liblist-compare-perl as a Build-Dependency for the Perl test suite. [ Benjamin Drung ] * Improve speed by rewriting scripts in Haskell (LP: #796317). * Allow printing of release version and full name (LP: #807644). * Split scripts, Perl and Python libraries in separate binary packages. -- Benjamin Drung Tue, 11 Oct 2011 23:55:18 +0200 distro-info (0.2.3) unstable; urgency=low * "old" is not a Debian suite alias, but "oldstable" is. * Add myself to Uploaders. -- Stefano Rivera Fri, 07 Oct 2011 22:24:08 +0200 distro-info (0.2.2) unstable; urgency=low * Add 12.04 LTS "Precise Pangolin" to Ubuntu list. -- Benjamin Drung Thu, 06 Oct 2011 01:07:36 +0200 distro-info (0.2.1) unstable; urgency=low * Correct release and EOL dates of old Ubuntu releases by reviewing ubuntu-announce emails. -- Benjamin Drung Sat, 23 Jul 2011 15:55:23 +0200 distro-info (0.2) unstable; urgency=low * Make sure all DistroInfo classes have a .codename method. * Add experimental to list of Debian distributions. * Bump Breaks and Replaceses for ubuntu-dev-tools. -- Benjamin Drung Sat, 25 Jun 2011 16:30:59 +0200 distro-info (0.1) unstable; urgency=low * Initial release (Closes: #559761) -- Benjamin Drung Sun, 19 Jun 2011 00:08:57 +0200 distro-info-data-0.18/ubuntu.csv0000644000000000000000000000242012263066456013543 0ustar version,codename,series,created,release,eol,eol-server 4.10,Warty Warthog,warty,2004-03-05,2004-10-20,2006-04-30 5.04,Hoary Hedgehog,hoary,2004-10-20,2005-04-08,2006-10-31 5.10,Breezy Badger,breezy,2005-04-08,2005-10-12,2007-04-13 6.06 LTS,Dapper Drake,dapper,2005-10-12,2006-06-01,2009-07-14,2011-06-01 6.10,Edgy Eft,edgy,2006-06-01,2006-10-26,2008-04-25 7.04,Feisty Fawn,feisty,2006-10-26,2007-04-19,2008-10-19 7.10,Gutsy Gibbon,gutsy,2007-04-19,2007-10-18,2009-04-18 8.04 LTS,Hardy Heron,hardy,2007-10-18,2008-04-24,2011-05-12,2013-05-09 8.10,Intrepid Ibex,intrepid,2008-04-24,2008-10-30,2010-04-30 9.04,Jaunty Jackalope,jaunty,2008-10-30,2009-04-23,2010-10-23 9.10,Karmic Koala,karmic,2009-04-23,2009-10-29,2011-04-29 10.04 LTS,Lucid Lynx,lucid,2009-10-29,2010-04-29,2013-05-09,2015-04-29 10.10,Maverick Meerkat,maverick,2010-04-29,2010-10-10,2012-04-10 11.04,Natty Narwhal,natty,2010-10-10,2011-04-28,2012-10-28 11.10,Oneiric Ocelot,oneiric,2011-04-28,2011-10-13,2013-05-09 12.04 LTS,Precise Pangolin,precise,2011-10-13,2012-04-26,2017-04-26 12.10,Quantal Quetzal,quantal,2012-04-26,2012-10-18,2014-04-18 13.04,Raring Ringtail,raring,2012-10-18,2013-04-25,2014-01-27 13.10,Saucy Salamander,saucy,2013-04-25,2013-10-17,2014-07-17 14.04 LTS,Trusty Tahr,trusty,2013-10-17,2014-04-17,2019-04-17