ubuntu-release-upgrader: start work for ecne do-release-upgrade.
This commit is contained in:
parent
1c4c985b76
commit
b0a4c0fb48
4 changed files with 182 additions and 30 deletions
|
|
@ -68,8 +68,8 @@ BackupExt=distUpgrade
|
|||
LogDir=/var/log/dist-upgrade/
|
||||
|
||||
[Sources]
|
||||
From=nabia
|
||||
To=aramo
|
||||
From=aramo
|
||||
To=ecne
|
||||
ValidOrigin=Trisquel
|
||||
ValidMirrors = mirrors.cfg
|
||||
Components=main
|
||||
|
|
|
|||
93
helpers/DATA/ubuntu-release-upgrader/DistUpgrade.cfg.aramo
Normal file
93
helpers/DATA/ubuntu-release-upgrader/DistUpgrade.cfg.aramo
Normal file
|
|
@ -0,0 +1,93 @@
|
|||
[View]
|
||||
# the views will be tried in this order, if one fails to import, the next
|
||||
# is tried
|
||||
View=DistUpgradeViewGtk3,DistUpgradeViewKDE,DistUpgradeViewText
|
||||
#View=DistUpgradeViewNonInteractive
|
||||
#Depends= apt (>= 1.0.10.2ubuntu2)
|
||||
# the views below support upgrades over ssh connection
|
||||
SupportSSH=DistUpgradeViewText,DistUpgradeViewNonInteractive
|
||||
|
||||
# Distro contains global information about the upgrade
|
||||
[Distro]
|
||||
# the meta-pkgs we support
|
||||
MetaPkgs=trisquel, trisquel-mini, triskel, trisquel-sugar, trisquel-gnome
|
||||
BaseMetaPkgs=trisquel-minimal, trisquel-base
|
||||
IgnoredTasks=minimal, standard
|
||||
Demotions=demoted.cfg
|
||||
RemovalDenylistFile=removal_denylist.cfg
|
||||
# if those packages were installed, make sure to keep them installed
|
||||
KeepInstalledPkgs=xserver-xorg-video-all
|
||||
KeepInstalledSection=translations
|
||||
RemoveObsoletes=yes
|
||||
PurgeObsoletes=yes
|
||||
#ForcedObsoletes=ksplash-engine-moodin, powernowd, laptop-mode-tools
|
||||
# hints for for stuff that should be done right after the cache calculated
|
||||
# the dist-upgrade (not to be confused with the PostUpgrade hooks in the
|
||||
# quirks handling)
|
||||
#PostUpgradePurge=linux-restricted-modules-common
|
||||
#PostUpgradeRemove=xsettings-kde
|
||||
PostUpgradeRemove=resolvconf,notification-daemon
|
||||
#PostUpgradeUpgrade=brasero,edubuntu-desktop
|
||||
#PostUpgradeInstall=apt
|
||||
#PostInstallScripts=./trisquel-postinstall.sh
|
||||
EnableApport=no
|
||||
# this supported deny listing certain versions to ensure we do not upgrade
|
||||
# - blcr-dkms fails to build on kernel 2.6.35
|
||||
#BadVersions=blcr-dkms_0.8.2-13
|
||||
# ubiquity slideshow
|
||||
#SlideshowUrl=http://people.canonical.com/~mvo/ubiquity-slideshow-upgrade/slides/
|
||||
|
||||
[trisquel]
|
||||
KeyDependencies=lightdm, mate-desktop-environment, marco, ubuntu-mate-default-settings, lightdm-gtk-greeter
|
||||
# those pkgs will be marked remove right after the distUpgrade in the cache
|
||||
PostUpgradeRemove=casper, xscreensaver, powermanagement-interface, compiz-core, gdm, gnome-ppp, resolvconf
|
||||
ForcedObsoletes= cups-pdf, notification-daemon, libcogl15, resolvconf
|
||||
|
||||
[trisquel-mini]
|
||||
KeyDependencies=lxde
|
||||
#Remove previous gnome component from ltrisquel to avoid pulling gnome depends on upgrade (LP: #945215)
|
||||
PostUpgradeRemove=casper, gnome-bluetooth, resolvconf
|
||||
ForcedObsoletes= cups-pdf, notification-daemon, libcogl15, resolvconf
|
||||
|
||||
[triskel]
|
||||
KeyDependencies=triskel-settings-desktop, plasma-desktop, sddm
|
||||
PostUpgradeRemove=powermanagement-interface, guidance-power-manager, kde-guidance-powermanager, kmix
|
||||
# those packages are marked as obsolete right after the upgrade
|
||||
ForcedObsoletes=ivman, gtk-qt-engine
|
||||
# help the resolver a bit: LP: #1426132
|
||||
PostUpgradeInstall=baloo-kf5
|
||||
|
||||
[trisquel-sugar]
|
||||
KeyDependencies=sugar, lightdm-gtk-greeter
|
||||
|
||||
[trisquel-gnome]
|
||||
KeyDependencies=gnome-core, gdm3
|
||||
|
||||
[Files]
|
||||
BackupExt=distUpgrade
|
||||
LogDir=/var/log/dist-upgrade/
|
||||
|
||||
[Sources]
|
||||
From=aramo
|
||||
To=ecne
|
||||
ValidOrigin=Trisquel
|
||||
ValidMirrors = mirrors.cfg
|
||||
Components=main
|
||||
Pockets=security,updates,backports
|
||||
;AllowThirdParty=False
|
||||
|
||||
;[PreRequists]
|
||||
;Packages=release-upgrader-apt,release-upgrader-dpkg
|
||||
;SourcesList=prerequists-sources.list
|
||||
;SourcesList-ia64=prerequists-sources.ports.list
|
||||
;SourcesList-hppa=prerequists-sources.ports.list
|
||||
|
||||
[Network]
|
||||
MaxRetries=3
|
||||
|
||||
[NonInteractive]
|
||||
ForceOverwrite=yes
|
||||
RealReboot=no
|
||||
DebugBrokenScripts=no
|
||||
DpkgProgressLog=no
|
||||
;TerminalTimeout=2400
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
diff --git a/DistUpgrade/DistUpgradeQuirks.py b/DistUpgrade/DistUpgradeQuirks.py
|
||||
index 9423f091..00d9b84c 100644
|
||||
--- a/DistUpgrade/DistUpgradeQuirks.py
|
||||
+++ b/DistUpgrade/DistUpgradeQuirks.py
|
||||
@@ -2000,17 +2000,27 @@ class DistUpgradeQuirks(object):
|
||||
break
|
||||
|
||||
if fail:
|
||||
- logging.debug('System is not /usr-merged!')
|
||||
- self._view.error(
|
||||
- _(
|
||||
- f'Cannot upgrade system with unmerged /usr'
|
||||
- ),
|
||||
- _(
|
||||
- 'Please install the usrmerge package to fix this, '
|
||||
- 'and then try the upgrade again.'
|
||||
- ),
|
||||
+ logging.warning(
|
||||
+ "System is not /usr-merged. Installing usrmerge before continuing..."
|
||||
+ )
|
||||
+ res = subprocess.run(["apt-get", "update"])
|
||||
+ res2 = subprocess.run(["apt-get", "-y", "install", "usrmerge"])
|
||||
+
|
||||
+ if res2.returncode != 0:
|
||||
+ # Installation failed, abort the upgrade with a clear message
|
||||
+ self.controller.error(_(
|
||||
+ "The system is not /usr-merged and 'usrmerge' could not be "
|
||||
+ "installed automatically. Please install it manually and "
|
||||
+ "try again."
|
||||
+ ))
|
||||
+ return
|
||||
+
|
||||
+ # Re-check that /usr merge is now in place
|
||||
+ # (ensure /bin -> /usr/bin, /lib -> /usr/lib, etc.)
|
||||
+ logging.info(
|
||||
+ "usrmerge installed successfully; system is now /usr-merged. "
|
||||
+ "Proceeding with the upgrade."
|
||||
)
|
||||
- self.controller.abort()
|
||||
|
||||
def _disable_cloud_init(self):
|
||||
"""
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Copyright (C) 2025 Luis Guzmán <ark@switnet.org>
|
||||
# Copyright (C) 2008-2024 Ruben Rodriguez <ruben@trisquel.info>
|
||||
# Copyright (C) 2014 Santiago Rodriguez <santi@trisquel.info>
|
||||
# Copyright (C) 2019 Mason Hock <mason@masonhock.com>
|
||||
|
|
@ -24,13 +25,20 @@
|
|||
# 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=16
|
||||
VERSION=16.1
|
||||
|
||||
. ./config
|
||||
# Previous upstream release name, update for each release.
|
||||
PREV_UPS_REL=jammy
|
||||
PREV_TRIS_REL=aramo
|
||||
# Use git Mirrors.masterlist as source.
|
||||
Mirrors_masterlist=$(mktemp)
|
||||
Mirrors_masterlist_git="trisquel-packages/-/raw/master/extra/mirrors/Mirrors.masterlist"
|
||||
TPH_GIT_URL="https://gitlab.trisquel.org/trisquel/package-helpers/"
|
||||
|
||||
# Fix PEP440 version compatibility
|
||||
# https://salsa.debian.org/debian/distro-info/-/commit/e2877dc44659d034155495e91976874c209a3c02
|
||||
patch --no-backup-if-mismatch -Np1 < $DATA/pep440.patch
|
||||
patch_p1 $DATA/pep440.patch
|
||||
|
||||
#%FSDG: Remove functions to deal with proprietary drivers
|
||||
rm ./DistUpgrade/xorg_fix_proprietary.py
|
||||
|
|
@ -226,25 +234,11 @@ trisquel-release-upgrader-core
|
|||
EOF
|
||||
|
||||
rm data/mirrors.cfg
|
||||
#https://mirmon.trisquel.org/conf.txt
|
||||
cat << EOF > data/mirrors.cfg
|
||||
https://archive.trisquel.info/trisquel/
|
||||
https://archive.trisquel.org/trisquel/
|
||||
https://mirror.fsf.org/trisquel/
|
||||
https://mirror.cedia.org.ec/trisquel.packages/
|
||||
https://mirrors.ustc.edu.cn/trisquel/
|
||||
https://ftp.caliu.cat/pub/distribucions/trisquel/packages/
|
||||
https://ftp.acc.umu.se/mirror/trisquel/packages/
|
||||
https://mirrors.ocf.berkeley.edu/trisquel/
|
||||
https://mirror.librelabucm.org/trisquel/
|
||||
https://mirror.linux.pizza/trisquel/packages/
|
||||
https://quantum-mirror.hu/mirrors/pub/trisquel/packages/
|
||||
https://mirror.csclub.uwaterloo.ca/trisquel/packages/
|
||||
https://ftpmirror1.infania.net/mirror/trisquel/packages/
|
||||
https://mirrors.nju.edu.cn/trisquel/
|
||||
https://mirror.math.princeton.edu/pub/trisquel-packages/
|
||||
https://mirrors.dotsrc.org/trisquel/
|
||||
EOF
|
||||
# https://gitlab.trisquel.org/trisquel/trisquel-packages/-/tree/master/extra/mirrors
|
||||
# FIXME: Propose a way to integrate from git and avoid fetching via wget/curl.
|
||||
wget https://gitlab.trisquel.org/trisquel/$Mirrors_masterlist_git -o /dev/null -O $Mirrors_masterlist
|
||||
python3 $DATA/../python-apt/parse-mirror-masterlist.py $Mirrors_masterlist|grep https|sort > data/mirrors.cfg
|
||||
rm $Mirrors_masterlist
|
||||
|
||||
replace changelogs.ubuntu.com packages.trisquel.org .
|
||||
|
||||
|
|
@ -288,16 +282,23 @@ rpl noble ecne . -R
|
|||
rm data/DistUpgrade.cfg*
|
||||
cp $DATA/DistUpgrade.cfg* data/
|
||||
|
||||
cat << EOF >> data/demoted.cfg
|
||||
cat << EOF | tee -a utils/demoted.cfg utils/demoted.cfg.$PREV_UPS_REL
|
||||
notification-daemon
|
||||
resolvconf
|
||||
eom
|
||||
desktop-common
|
||||
EOF
|
||||
|
||||
sed 's|.ubuntu-bug ubuntu-release-upgrader-core. in a terminal|https://gitlab.trisquel.org/trisquel/package-helpers in a browser.|' DistUpgrade/DistUpgradeCache.py -i
|
||||
replace "https*://launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+filebug" "https://gitlab.trisquel.org/trisquel/package-helpers/-/issues" .
|
||||
replace "https*://launchpad.net/ubuntu/+source/ubuntu-release-upgrader" "https://gitlab.trisquel.org/trisquel/package-helpers/" .
|
||||
replace "https*://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+filebug" "https://gitlab.trisquel.org/trisquel/package-helpers/-/issues" .
|
||||
for i in utils/demoted.cfg utils/demoted.cfg.$PREV_UPS_REL
|
||||
do
|
||||
sort -o $i $i
|
||||
done
|
||||
mv data/demoted.cfg.$PREV_UPS_REL data/demoted.cfg.$PREV_TRIS_REL
|
||||
|
||||
sed -i "s|the command .ubuntu-bug ubuntu-release-upgrader-core. in a terminal|$TPH_GIT_URL|" DistUpgrade/DistUpgradeCache.py
|
||||
replace "https*://launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+filebug" "${TPH_GIT_URL}-/issues" .
|
||||
replace "https*://launchpad.net/ubuntu/+source/ubuntu-release-upgrader" "$TPH_GIT_URL" .
|
||||
replace "https*://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+filebug" "${TPH_GIT_URL}-/issues" .
|
||||
find -type f |xargs rename 's/ubuntu-release-upgrader/trisquel-release-upgrader/g'
|
||||
replace "ubuntu-release-upgrader" "trisquel-release-upgrader" .
|
||||
mv kubuntu-devel-release-upgrade triskel-devel-release-upgrade
|
||||
|
|
@ -325,12 +326,28 @@ rpl "main restricted" "main" DistUpgrade -R
|
|||
replace Ubuntu Trisquel
|
||||
replace Canonical Trisquel
|
||||
replace "https*://www.ubuntu.com/" "https://trisquel.info" .
|
||||
replace "https*://wiki.ubuntu.com/X/Bugs/" "https://gitlab.trisquel.org/trisquel/package-helpers/-/issues" .
|
||||
replace "https*://wiki.ubuntu.com/X/Bugs/" "${TPH_GIT_URL}-/issues" .
|
||||
replace "https*://wiki.ubuntu.com/" "https://trisquel.info/wiki" .
|
||||
replace "https*://help.ubuntu.com/community" "https://trisquel.info/wiki" .
|
||||
|
||||
/bin/sed -i \
|
||||
-e 's/kubuntu/triskel/g' \
|
||||
-e 's/xubuntu/trisquel-mini/g' \
|
||||
-e 's/<2F>~Lubuntu/<2F>~Ltrisquel/g' \
|
||||
-e 's/被ubuntu/被trisquel/g' \
|
||||
-e "s#http://launchpad.net/ubuntu/+source/%s/%s/+changelog#$TPH_GIT_URL#g" \
|
||||
-e 's/<.*@ubuntu.com/<info@trisquel.info/g' \
|
||||
-e 's/ ubuntu\n/ trisquel\n/g' \
|
||||
-e 's/ubuntu\ /trisquel\ /g' \
|
||||
-e 's/\ ubuntu/\ trisquel/g' \
|
||||
-e 's/Ubuntu/Trisquel/g' \
|
||||
-e 's/ubuntu-desktop/trisquel-/g' \
|
||||
-e 's/www.ubuntu.com/trisquel.info/g' \
|
||||
-e 's/www.ubuntulinux.org/trisquel.info/g' \
|
||||
po/*.po \
|
||||
$(find -type f -name '*.py') \
|
||||
$(find -type f -name '*.glade')
|
||||
|
||||
/bin/sed -i 's/kubuntu/triskel/g; s/xubuntu/trisquel-mini/g; s/<2F>~Lubuntu/<2F>~Ltrisquel/g; s/被ubuntu/被trisquel/g; s#http://launchpad.net/ubuntu/+source/%s/%s/+changelog#https://gitlab.trisquel.org/trisquel/package-helpers#g; s/<.*@ubuntu.com/<info@trisquel.info/g; s/ ubuntu\n/ trisquel\n/g; s/ubuntu\ /trisquel\ /g; s/\ ubuntu/\ trisquel/g; s/Ubuntu/Trisquel/g; s/ubuntu-desktop/trisquel-/g; s/www.ubuntu.com/trisquel.info/g; s/www.ubuntulinux.org/trisquel.info/g ' po/*.po $(find -type f | grep py$) $(find -type f | grep '\.glade$')
|
||||
replace Trisquel-Gettext Ubuntu-Gettext
|
||||
|
||||
sed '1s/trisquel/ubuntu/' debian/control -i
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue