diff --git a/helpers/DATA/distro-info-data/README.Debian.patch b/helpers/DATA/distro-info-data/README.Debian.patch new file mode 100644 index 0000000..cc2243b --- /dev/null +++ b/helpers/DATA/distro-info-data/README.Debian.patch @@ -0,0 +1,22 @@ +--- debian/README.Debian 2019-10-17 15:10:30.000000000 -0500 ++++ debian/README.Debian_trisquel 2021-11-26 13:26:20.362971709 -0600 +@@ -2,7 +2,7 @@ + =========== + + The distro-info package provides centralized lists of code-names and release +-history for the supported distributions (Currently: Debian and Ubuntu). ++history for the supported distributions (Currently: Debian and Trisquel). + 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) +@@ -17,8 +17,8 @@ + 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 ++On Trisquel, it is: ++deb http://archive.trisquel.org/trisquel $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 diff --git a/helpers/DATA/distro-info-data/add_trisquel_validate.patch b/helpers/DATA/distro-info-data/add_trisquel_validate.patch new file mode 100644 index 0000000..dac8f65 --- /dev/null +++ b/helpers/DATA/distro-info-data/add_trisquel_validate.patch @@ -0,0 +1,51 @@ +--- validate-csv-data 2020-01-27 15:25:09.000000000 -0600 ++++ validate-csv-data_nabia 2021-11-25 01:56:57.107530515 -0600 +@@ -26,6 +26,7 @@ + import sys + + _COLUMNS = { ++ "trisquel": ("version", "codename", "series", "created", "release", "eol"), + "debian": ("version", "codename", "series", "created", "release", "eol"), + "ubuntu": ("version", "codename", "series", "created", "release", "eol", + "eol-server", "eol-esm"), +@@ -37,6 +38,7 @@ + ("eol", "eol-server"), + ) + _STRINGS = { ++ "trisquel": ("version", "codename", "series"), + "debian": ("codename", "series"), + "ubuntu": ("version", "codename", "series"), + } +@@ -130,24 +132,28 @@ + def main(): + """Main function with command line parameter parsing.""" + script_name = os.path.basename(sys.argv[0]) +- usage = "%s [-h] -d|-u csv-file" % (script_name) ++ usage = "%s [-h] -d|-u|-t csv-file" % (script_name) + parser = argparse.ArgumentParser(usage=usage) + + parser.add_argument("-d", "--debian", dest="debian", action="store_true", + default=False, help="validate a Debian CSV file") + parser.add_argument("-u", "--ubuntu", dest="ubuntu", action="store_true", + default=False, help="validate an Ubuntu CSV file") ++ parser.add_argument("-t", "--trisquel", dest="trisquel", action="store_true", ++ default=False, help="validate a Trisquel CSV file") + parser.add_argument("csv_file", metavar="csv-file", + help="CSV file to validate") + + args = parser.parse_args() +- if len([x for x in [args.debian, args.ubuntu] if x]) != 1: +- parser.error("You have to select exactly one of --debian, --ubuntu.") ++ if len([x for x in [args.trisquel, args.debian, args.ubuntu] if x]) != 1: ++ parser.error("You have to select exactly one of --trisquel, --debian, --ubuntu.") + + if args.debian: + distro = "debian" +- else: ++ elif args.ubuntu: + distro = "ubuntu" ++ else: ++ distro = "trisquel" + + return int(not validate(args.csv_file, distro)) + diff --git a/helpers/DATA/distro-info-data/trisquel.csv b/helpers/DATA/distro-info-data/trisquel.csv new file mode 100644 index 0000000..657a193 --- /dev/null +++ b/helpers/DATA/distro-info-data/trisquel.csv @@ -0,0 +1,6 @@ +version,codename,series,created,release,eol +6.0 LTS,Toutanis,toutanis,2011-10-13,2013-03-11,2017-04-28 +7.0 LTS,Belenos,belenos,2013-10-17,2014-11-03,2019-04-25 +8.0 LTS,Flidas,flidas,2015-10-22,2018-04-18,2021-04-21 +9.0 LTS,Etiona,etiona,2017-10-19,2020-10-16,2023-04-26 +10.0 LTS,Nabia,nabia,2019-10-17,2021-01-01,2025-04-23 diff --git a/helpers/make-distro-info-data b/helpers/make-distro-info-data new file mode 100644 index 0000000..daac039 --- /dev/null +++ b/helpers/make-distro-info-data @@ -0,0 +1,32 @@ +#!/bin/sh +# +# Copyright (C) 2021 Luis Guzman +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + +VERSION=1 + +. ./config + +patch -p0 < $DATA/add_trisquel_validate.patch +patch -p0 < $DATA/README.Debian.patch + +cp $DATA/trisquel.csv ./ + +changelog "Adding trisquel distro info." + +compile +