From 8abf9b92af62daa4e6799ff961a44794da655efe Mon Sep 17 00:00:00 2001 From: Ruben Rodriguez Date: Sat, 24 Aug 2024 23:53:46 -0400 Subject: [PATCH] ubuntu-release-upgrader: fixed pep440 compatibility; updated some string replacements --- .../DATA/ubuntu-release-upgrader/pep440.patch | 18 +++++++++++++++++ helpers/make-ubuntu-release-upgrader | 20 ++++++++++--------- 2 files changed, 29 insertions(+), 9 deletions(-) create mode 100644 helpers/DATA/ubuntu-release-upgrader/pep440.patch diff --git a/helpers/DATA/ubuntu-release-upgrader/pep440.patch b/helpers/DATA/ubuntu-release-upgrader/pep440.patch new file mode 100644 index 0000000..481c6d0 --- /dev/null +++ b/helpers/DATA/ubuntu-release-upgrader/pep440.patch @@ -0,0 +1,18 @@ +--- a/setup.py 2024-08-24 23:17:50.141778711 -0400 ++++ b/setup.py 2024-08-24 23:11:05.728064936 -0400 +@@ -1,6 +1,7 @@ + #!/usr/bin/env python3 + + import glob ++import re + + from distutils.core import setup + from subprocess import check_output +@@ -15,6 +16,7 @@ + # PEP 440 uses '!' for the epoch separator: + # https://peps.python.org/pep-0440/#version-epochs + version = value.strip().replace(':','!') ++ version = re.sub("([a-zA-Z])", r"+\1", version, count=1) + break + else: + raise RuntimeError('No version found in debian/changelog') diff --git a/helpers/make-ubuntu-release-upgrader b/helpers/make-ubuntu-release-upgrader index bf9d451..c0980e5 100644 --- a/helpers/make-ubuntu-release-upgrader +++ b/helpers/make-ubuntu-release-upgrader @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (C) 2008-2023 Ruben Rodriguez +# Copyright (C) 2008-2024 Ruben Rodriguez # Copyright (C) 2014 Santiago Rodriguez # Copyright (C) 2019 Mason Hock # @@ -24,10 +24,14 @@ # Also, don't forget to update the meta-release files at archive and packages.t.i # The "obsoletes" list from ubuntu has been removed -VERSION=15 +VERSION=16 . ./config +# Fix PEP440 version compatibility +# https://salsa.debian.org/debian/distro-info/-/commit/e2877dc44659d034155495e91976874c209a3c02 +patch --no-backup-if-mismatch -Np1 < $DATA/pep440.patch + #%FSDG: Remove functions to deal with proprietary drivers rm ./DistUpgrade/xorg_fix_proprietary.py rm ./DistUpgrade/NvidiaDetector @@ -116,7 +120,7 @@ that you have found a bug please send it to us via https://gitlab.trisquel.org/trisquel/package-helpers/-/issues If you have a question, or if you think you may have found a bug but -aren't sure, first try asking on the #trisquel IRC channel on Freenode, +aren't sure, first try asking on the #trisquel IRC channel on LiberaChat, on the Trisquel Users mailing list, or on the Trisquel forums: https://listas.trisquel.info/ @@ -173,7 +177,7 @@ that you have found a bug please send it to us via https://gitlab.trisquel.org/trisquel/package-helpers/-/issues If you have a question, or if you think you may have found a bug but -aren't sure, first try asking on the #trisquel IRC channel on Freenode, +aren't sure, first try asking on the #trisquel IRC channel on LiberaChat, on the Trisquel Users mailing list, or on the Trisquel forums: https://listas.trisquel.info/ @@ -264,6 +268,7 @@ rpl 20\.04 10\.0 po/* -R rpl 20\.04 10\.0 DistUpgrade/*.ui -R replace '20.04' '10.0' replace '22.04' '11.0' +replace '24.04' '12.0' rpl oneiric brigantia . -R rpl natty dagda . -R rpl maverick slaine . -R @@ -278,6 +283,7 @@ rpl xenial flidas . -R rpl bionic etiona . -R rpl focal nabia . -R rpl jammy aramo . -R +rpl noble ecne . -R rm data/DistUpgrade.cfg* cp $DATA/DistUpgrade.cfg* data/ @@ -313,13 +319,9 @@ rpl security.ubuntu.com/ubuntu archive.trisquel.org/trisquel . -R rpl archive.ubuntu.com archive.trisquel.org . -R rpl security.ubuntu.com archive.trisquel.org . -R -sed 's/"main", "restricted", "universe", "multiverse"/"main"/g' DistUpgrade/DistUpgradeController.py -i utils/demotions.py +sed "s/.main., .restricted., .universe., .multiverse./'main'/g" DistUpgrade/DistUpgradeController.py -i utils/demotions.py sed '/restricted/d' -i utils/demotions.py -sed 's/"main", "restricted"/"main"/g' DistUpgrade/DistUpgradeController.py -i rpl "main restricted" "main" DistUpgrade -R -sed 's/,"restricted"//g' DistUpgrade/DistUpgradeController.py -i -#sed 's/","restricted"/\\n"/g' DistUpgrade/DistUpgradeController.py -i -#rpl '10.04' $REVISION DistUpgrade po -R replace Ubuntu Trisquel replace Canonical Trisquel replace "https*://www.ubuntu.com/" "https://trisquel.info" .