5
# The testsuite has a sad if you're in a non-UTF-8 locale:
8
dpkg-checkbuilddeps -d 'python3-apt, apt-btrfs-snapshot, parsewiki, python3-feedparser,
9
python3-mock, xvfb, gir1.2-gtk-3.0, python3-gi, python3-nose, pep8, python3-distutils-extra, python3-update-manager'
11
# make sure the DistUpgrade symlink is good LP: #1824430
12
SYMLINK=$(readlink -q DistUpgrade/DistUpgrade)
13
if [ $SYMLINK != "." ]; then
14
echo "DistUpgrade/DistUpgrade is not a symlink to itself"
19
# echo "Running integrated tests"
23
# echo "Cleaning up after tests"
24
rm -f ./tests/data-sources-list-test/apt.log
25
rm -f ./tests/data-sources-list-test/Ubuntu.mirrors
28
max_age=$(($(date +%s) - 3600))
29
if [ $(stat -c '%Y' utils/demoted.cfg) -lt $max_age ]; then
30
# echo "Running demotions"
31
(cd utils && ./demotions.py eoan focal > demoted.cfg)
33
# when this gets enabled, make sure to add symlink in DistUpgrade
34
if [ $(stat -c "%Y" utils/demoted.cfg.bionic) -lt $max_age ]; then
35
# echo "Running lts demotions"
36
(cd utils && ./demotions.py bionic focal > demoted.cfg.bionic)
39
# update apt_btrfs_snapshot.py copy, this needs an installed
40
# apt-btrfs-snapshot on the build machine
41
if [ ! -e /usr/lib/python3/dist-packages/apt_btrfs_snapshot.py ]; then
42
echo "please sudo apt-get install apt-btrfs-snapshot"
45
echo "copying apt_btrfs_snapshot.py for the upgrader tarball"
46
cp /usr/lib/python3/dist-packages/apt_btrfs_snapshot.py DistUpgrade
48
# update invoke-rc.d copy, requires init-system-helpers
49
if [ ! -e /usr/sbin/invoke-rc.d ]; then
50
echo "please sudo apt install init-system-helpers"
53
if [ ! -e /usr/bin/patch ]; then
54
echo "please sudo apt install patch"
57
echo "copying invoke-rc.d for the upgrader tarball"
58
cp /usr/sbin/invoke-rc.d DistUpgrade/imported/
59
# now patch the file so the upgrade can continue even if there are errors
60
patch --fuzz=0 -p0 DistUpgrade/imported/invoke-rc.d DistUpgrade/imported/invoke-rc.d.diff || { echo "patch didn't apply cleanly" && exit 1; }
62
# update the translations
63
cd po; make update-po; cd ../
65
# (auto) generate the required html
66
if [ ! -x /usr/bin/parsewiki ]; then
67
echo "please sudo apt-get install parsewiki"
70
# confirm we have the release version appearing the right number of times in each Announcement
71
DEBRELEASE=$(LC_ALL=C dpkg-parsechangelog | sed -n -e '/^Distribution:/s/^Distribution: //p' | sed s/-.\*//)
73
if [ $(grep -ic $DEBRELEASE DevelReleaseAnnouncement) != 1 ]; then
74
echo "Confirm $DEBRELEASE is correct in DevelReleaseAnnouncement"
77
parsewiki DevelReleaseAnnouncement > DevelReleaseAnnouncement.html;
78
if [ $(grep -ic $DEBRELEASE ReleaseAnnouncement) != 3 ]; then
79
echo "Confirm $DEBRELEASE is correct in ReleaseAnnouncement"
82
parsewiki ReleaseAnnouncement > ReleaseAnnouncement.html;
83
if [ $(grep -ic $DEBRELEASE EOLReleaseAnnouncement) != 1 ]; then
84
echo "Confirm $DEBRELEASE is correct in EOLReleaseAnnouncement"
87
parsewiki EOLReleaseAnnouncement > EOLReleaseAnnouncement.html;
91
rm -rf utils/apt/lists utils/apt/*.bin utils/apt/sources.list
92
max_age=$(($(date +%s) - 3600))
93
if [ $(stat -c "%Y" data/mirrors.cfg) -lt $max_age ]; then
94
# echo "Running update mirrors"
95
(cd utils && ./update_mirrors.py ../data/mirrors.cfg)
99
DEBVER=$(LC_ALL=C dpkg-parsechangelog |sed -n -e '/^Version:/s/^Version: //p' | sed s/.*://)
100
echo "VERSION = '$DEBVER'" > DistUpgrade/DistUpgradeVersion.py