Compare commits
1 Commits
b6f97ddd53
...
39fb6e8cfe
Author | SHA1 | Date |
---|---|---|
![]() |
39fb6e8cfe |
|
@ -0,0 +1,24 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [[ "$1" == "build" ]]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Get the systemd version installed in the host assuming it's recent enough
|
||||||
|
# but a major version older than the one in the image.
|
||||||
|
if dnf --version |grep -q '^4\.'; then
|
||||||
|
disable='--disablerepo'
|
||||||
|
elif dnf --version |grep -q '^dnf5\s'; then
|
||||||
|
disable='--disable-repo'
|
||||||
|
else
|
||||||
|
echo 'Unknown dnf version!'
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
curver=$(dnf repoquery "$disable" mkosi --latest-limit=1 --queryformat='%{evr}' systemd)
|
||||||
|
pkgs=$(dnf repoquery 'systemd*' |grep -F "$curver" |grep -v -e -debuginfo -e -debugsource)
|
||||||
|
pkgdir=/usr/host-pkgs
|
||||||
|
|
||||||
|
dnf download --arch noarch --arch "$DISTRIBUTION_ARCHITECTURE" --destdir "$BUILDROOT$pkgdir" $pkgs
|
|
@ -0,0 +1,7 @@
|
||||||
|
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||||
|
|
||||||
|
integration_tests += [
|
||||||
|
integration_test_template + {
|
||||||
|
'name' : fs.name(meson.current_source_dir()),
|
||||||
|
},
|
||||||
|
]
|
|
@ -96,6 +96,7 @@ foreach dirname : [
|
||||||
'TEST-85-NETWORK',
|
'TEST-85-NETWORK',
|
||||||
'TEST-86-MULTI-PROFILE-UKI',
|
'TEST-86-MULTI-PROFILE-UKI',
|
||||||
'TEST-87-AUX-UTILS-VM',
|
'TEST-87-AUX-UTILS-VM',
|
||||||
|
'TEST-88-UPGRADE',
|
||||||
]
|
]
|
||||||
subdir(dirname)
|
subdir(dirname)
|
||||||
endforeach
|
endforeach
|
||||||
|
|
|
@ -0,0 +1,53 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||||
|
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
|
||||||
|
# ex: ts=8 sw=4 sts=4 et filetype=sh
|
||||||
|
set -eux
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
|
pkgdir=/usr/host-pkgs
|
||||||
|
|
||||||
|
if ! [ -d "$pkgdir" ]; then
|
||||||
|
echo "Distro packages not found in $pkgdir" >/skipped
|
||||||
|
exit 77
|
||||||
|
fi
|
||||||
|
|
||||||
|
minor=$(systemctl --version |awk '/^systemd/{print$2}')
|
||||||
|
if which networkctl >/dev/null; then
|
||||||
|
networkd=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if dnf --version |grep -q '^4\.'; then
|
||||||
|
disable='--disablerepo'
|
||||||
|
elif dnf --version |grep -q '^dnf5\s'; then
|
||||||
|
disable='--disable-repo'
|
||||||
|
else
|
||||||
|
echo 'Unknown dnf version!'
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
dnf downgrade -y --allowerasing "$disable" '*' "$pkgdir"/*.rpm
|
||||||
|
|
||||||
|
newminor=$(systemctl --version |awk '/^systemd/{print$2}')
|
||||||
|
|
||||||
|
if [ "$newminor" -lt "$minor" ]; then
|
||||||
|
echo "Downgrade to $newminor was successful."
|
||||||
|
else
|
||||||
|
echo "Downgrade failed. Current version is still $newminor."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# TODO: sanity checks
|
||||||
|
|
||||||
|
systemctl --failed |grep -Fqx '0 loaded units listed.'
|
||||||
|
[ -n "$networkd" ] && networkctl status
|
||||||
|
loginctl list-sessions
|
||||||
|
|
||||||
|
# Finally test the upgrade
|
||||||
|
dnf -y upgrade $disable '*' "$PACKAGEDIR"/*.rpm
|
||||||
|
|
||||||
|
# TODO: sanity checks
|
||||||
|
|
||||||
|
systemctl --failed |grep -Fqx '0 loaded units listed.'
|
||||||
|
[ -n "$networkd" ] && networkctl status
|
||||||
|
loginctl list-sessions
|
Loading…
Reference in New Issue