Skip to content
Snippets Groups Projects
Commit ed321062 authored by Luis Guzmán's avatar Luis Guzmán
Browse files

software-properties,distro-info-data: fix PPA integration by adding upstream codename info.

parent be5ac69f
No related branches found
No related tags found
1 merge request!1001software-properties,distro-info-data: fix PPA integration by adding upstream codename info.
Pipeline #865 passed
version,codename,series,created,release,eol version,codename,series,created,release,eol,upstream
2.0 LTS,Robur,robur,2007-10-18,2008-07-24,2011-05-12 2.0 LTS,Robur,robur,2007-10-18,2008-07-24,2011-05-12,hardy
3.0,Dwyn,dwyn,2008-10-30,2009-09-08,2010-10-23 3.0,Dwyn,dwyn,2008-10-30,2009-09-08,2010-10-23,jaunty
3.5,Awen,awen,2009-04-23,2010-03-22,2011-04-30 3.5,Awen,awen,2009-04-23,2010-03-22,2011-04-30,karmik
4.0 LTS,Taranis,taranis,2009-10-29,2010-09-17,2013-05-09 4.0 LTS,Taranis,taranis,2009-10-29,2010-09-17,2013-05-09,lucid
4.5,Slaine,slaine,2010-04-29,2011-03-24,2012-04-10 4.5,Slaine,slaine,2010-04-29,2011-03-24,2012-04-10,maverick
5.0,Dagda,dagda,2010-10-10,2011-09-17,2012-10-28 5.0,Dagda,dagda,2010-10-10,2011-09-17,2012-10-28,natty
5.5,Brigantia,brigantia,2011-04-28,2012-04-16,2013-05-09 5.5,Brigantia,brigantia,2011-04-28,2012-04-16,2013-05-09,oneiric
6.0 LTS,Toutanis,toutanis,2011-10-13,2013-03-11,2017-04-28 6.0 LTS,Toutanis,toutanis,2011-10-13,2013-03-11,2017-04-28,precise
7.0 LTS,Belenos,belenos,2013-10-17,2014-11-03,2019-04-25 7.0 LTS,Belenos,belenos,2013-10-17,2014-11-03,2019-04-25,trusty
8.0 LTS,Flidas,flidas,2015-10-22,2018-04-18,2021-04-21 8.0 LTS,Flidas,flidas,2015-10-22,2018-04-18,2021-04-21,xenial
9.0 LTS,Etiona,etiona,2017-10-19,2020-10-16,2023-04-26 9.0 LTS,Etiona,etiona,2017-10-19,2020-10-16,2023-04-26,bionic
10.0 LTS,Nabia,nabia,2019-10-17,2021-12-16,2025-04-23 10.0 LTS,Nabia,nabia,2019-10-17,2021-12-16,2025-04-23,focal
11.0 LTS,Aramo,aramo,2021-10-14,2027-04-21,2027-04-21 11.0 LTS,Aramo,aramo,2021-10-14,2027-04-21,2027-04-21,jammy
diff -Nru software-properties-0.99.22.4+11.0trisquel9/softwareproperties/ppa.py software-properties-0.99.22.4+11.0trisquel9_fix/softwareproperties/ppa.py
--- software-properties-0.99.22.4+11.0trisquel9/softwareproperties/ppa.py 2023-01-21 14:29:00.314035991 -0600
+++ software-properties-0.99.22.4+11.0trisquel9_fix/softwareproperties/ppa.py 2023-01-21 14:31:47.658510565 -0600
@@ -32,6 +32,8 @@
from urllib.parse import urlparse
+from softwareproperties.trisquel_info import trisquel_upstream_rel
+
PPA_URI_FORMAT = 'https://ppa.launchpadcontent.net/{team}/{ppa}/ubuntu/'
PRIVATE_PPA_URI_FORMAT = 'https://private-ppa.launchpadcontent.net/{team}/{ppa}/ubuntu/'
@@ -85,7 +87,7 @@
uri_format = PRIVATE_PPA_URI_FORMAT if self.lpppa.private else PPA_URI_FORMAT
uri = uri_format.format(team=self.teamname, ppa=self.ppaname)
- line = ('%s %s %s %s' % (self.binary_type, uri, self.dist, ' '.join(comps)))
+ line = ('%s %s %s %s' % (self.binary_type, uri, trisquel_upstream_rel, ' '.join(comps)))
self._set_source_entry(line)
@property
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# #
# This program is free software; you can redistribute it and/or modify # 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 # it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or # the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version. # (at your option) any later version.
# #
# This program is distributed in the hope that it will be useful, # This program is distributed in the hope that it will be useful,
...@@ -31,7 +31,14 @@ def trisquel_eol(): ...@@ -31,7 +31,14 @@ def trisquel_eol():
eol_datetime = datetime.strptime(line['eol'], '%Y-%m-%d') eol_datetime = datetime.strptime(line['eol'], '%Y-%m-%d')
eol_date = eol_datetime.date() eol_date = eol_datetime.date()
return eol_date return eol_date
def trisquel_upstream():
with open('/usr/share/distro-info/trisquel.csv', 'r') as distro_data:
trisquel_distro_data = csv.DictReader(distro_data)
for line in trisquel_distro_data:
if line['series'] == (release_name):
codename_upstream = line['upstream']
return(codename_upstream)
trisquel_rel_desc = release_description trisquel_rel_desc = release_description
trisquel_eol = trisquel_eol() trisquel_eol = trisquel_eol()
trisquel_upstream_rel = trisquel_upstream()
#!/bin/sh #!/bin/sh
# #
# Copyright (C) 2022 Luis Guzman <ark@switnet.org> # Copyright (C) 2023 Luis Guzman <ark@switnet.org>
# #
# This program is free software; you can redistribute it and/or modify # 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 # it under the terms of the GNU General Public License as published by
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# #
VERSION=4 VERSION=5
. ./config . ./config
...@@ -30,7 +30,7 @@ cp $DATA/trisquel.csv ./ ...@@ -30,7 +30,7 @@ cp $DATA/trisquel.csv ./
# The Breaks prevents upgrades # The Breaks prevents upgrades
sed '/Breaks:/d' -i debian/control sed '/Breaks:/d' -i debian/control
changelog "Adding trisquel distro info." changelog "Adding trisquel distro info and upstream equivalent."
compile compile
#!/bin/sh #!/bin/sh
# #
# Copyright (C) 2022 Luis Guzman <ark@switnet.org> # Copyright (C) 2023 Luis Guzman <ark@switnet.org>
# Copyright (C) 2011-2022 Ruben Rodriguez <ruben@trisquel.info> # Copyright (C) 2011-2022 Ruben Rodriguez <ruben@trisquel.info>
# Copyright (C) 2019 Mason Hock <mason@masonhock.com> # Copyright (C) 2019 Mason Hock <mason@masonhock.com>
# Copyright (C) 2011 Carlos Pais <freemind@lavabit.com> # Copyright (C) 2011 Carlos Pais <freemind@lavabit.com>
...@@ -20,37 +20,10 @@ ...@@ -20,37 +20,10 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# #
VERSION=9 VERSION=11
. ./config . ./config
cat << EOF | patch -p1
--- source.orig/softwareproperties/SoftwareProperties.py 2014-04-14 17:10:58.000000000 +0200
+++ source/softwareproperties/SoftwareProperties.py 2014-05-18 03:02:05.309290804 +0200
@@ -722,8 +746,19 @@
site is in whitelist or the shortcut implementer adds it.
"""
- deb_line = shortcut.SourceEntry().line
- file = shortcut.sourceparts_file
+ codenames = {}
+ codenames["aramo"] = "jammy"
+ codenames["nabia"] = "focal"
+ codenames["etiona"] = "bionic"
+ codenames["flidas"] = "xenial"
+ codenames["belenos"] = "trusty"
+ codenames["toutatis"] = "precise"
+ codenames["brigantia"] = "oneiric"
+ codenames["dagda"] = "natty"
+ codenames["slaine"] = "maverick"
+ codenames["taranis"] = "lucid"
+ codenames["awen"] = "karmic"
+ (deb_line, file) = shortcut.expand(codename=codenames[self.distro.codename])
deb_line = self.expand_http_line(deb_line)
debsrc_entry_type = 'deb-src' if enable_source_code else '# deb-src'
debsrc_line = debsrc_entry_type + deb_line[3:]
EOF
#Temporary removal of livepatch LP:1965993 #Temporary removal of livepatch LP:1965993
#patch -p1 < $DATA/remove_livepatch_from_gtk_uiv1_1.patch #patch -p1 < $DATA/remove_livepatch_from_gtk_uiv1_1.patch
#patch -p1 < $DATA/disable-livepatch.patch #patch -p1 < $DATA/disable-livepatch.patch
...@@ -59,8 +32,8 @@ rm softwareproperties/gtk/UbuntuProPage.py ...@@ -59,8 +32,8 @@ rm softwareproperties/gtk/UbuntuProPage.py
patch --no-backup-if-mismatch -p0 < $DATA/remove_snap_label.patch patch --no-backup-if-mismatch -p0 < $DATA/remove_snap_label.patch
#Python specific changes #Python specific changes
cp $DATA/trisquel_info.py softwareproperties/gtk/ cp $DATA/trisquel_info.py softwareproperties/
sed -i '/import softwareproperties.SoftwareProperties/a from softwareproperties.gtk.trisquel_info import trisquel_rel_desc, trisquel_eol' softwareproperties/gtk/SoftwarePropertiesGtk.py sed -i '/import softwareproperties.SoftwareProperties/a from softwareproperties.trisquel_info import trisquel_rel_desc, trisquel_eol' softwareproperties/gtk/SoftwarePropertiesGtk.py
sed -i 's|eol_date = distro.eol|eol_date = trisquel_eol|' softwareproperties/gtk/SoftwarePropertiesGtk.py sed -i 's|eol_date = distro.eol|eol_date = trisquel_eol|' softwareproperties/gtk/SoftwarePropertiesGtk.py
sed -i 's|eol_text = .*|eol_text = trisquel_rel_desc|' softwareproperties/gtk/SoftwarePropertiesGtk.py sed -i 's|eol_text = .*|eol_text = trisquel_rel_desc|' softwareproperties/gtk/SoftwarePropertiesGtk.py
#Allow to start and remove drivers tab for qt flavor #Allow to start and remove drivers tab for qt flavor
...@@ -109,8 +82,10 @@ sed -i '/init_ubuntu_pro/d' softwareproperties/gtk/SoftwarePropertiesGtk.py ...@@ -109,8 +82,10 @@ sed -i '/init_ubuntu_pro/d' softwareproperties/gtk/SoftwarePropertiesGtk.py
#Livepatch - aramo #Livepatch - aramo
patch --no-backup-if-mismatch -p0 < $DATA/aramo_rm_livepatch.patch patch --no-backup-if-mismatch -p0 < $DATA/aramo_rm_livepatch.patch
#Patch codename for PPAs
patch --no-backup-if-mismatch -p1 < $DATA/fix_PPA_upstream_codename.patch
changelog "Removed Ubuntu-specifc tests, Livepatch, Snap" changelog "Removed Ubuntu-specifc tests, Livepatch, Snap and fix PPA integration."
compile compile
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment