Pin srt to a tested version; support only Pop!_OS 26.04 and later
srt is pinned to 0.0.83, the version the smoketest passed with. A computer with another version sees the agents item as to do in configure, which installs the pinned one. Move the pin only after smoketest/run 50 80 passes. The installer and configure stop on Pop!_OS (or Ubuntu) older than 26.04. The smoketest builds on Ubuntu 26.04, with checks that 24.04 is refused. 26.04's own AppArmor profile lets bubblewrap make user namespaces, so the connector's profile for it, and the code that offered to add it, are gone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
# Ubuntu 24.04, which Pop!_OS 24.04 is built on: the same apt packages,
|
||||
# Ubuntu 26.04, which Pop!_OS 26.04 is built on: the same apt packages,
|
||||
# except COSMIC's own. A user "pop" with passwordless sudo, as configure
|
||||
# expects an administrator. configure's own packages (install.sh's PACKAGES)
|
||||
# are already in, to keep each scenario quick; 05-install takes one out.
|
||||
FROM ubuntu:24.04
|
||||
FROM ubuntu:26.04
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends sudo ca-certificates curl dbus-x11 gnome-keyring \
|
||||
@@ -10,6 +10,6 @@ RUN apt-get update \
|
||||
jq libsecret-tools python3-gi gir1.2-secret-1 libnotify-bin avahi-utils \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
RUN useradd -m -s /bin/bash pop && echo 'pop ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/pop \
|
||||
&& printf 'ID=pop\nNAME="Pop!_OS"\nPRETTY_NAME="Pop!_OS 24.04 LTS (smoketest)"\nVERSION_ID="24.04"\nID_LIKE="ubuntu debian"\nUBUNTU_CODENAME=noble\nVERSION_CODENAME=noble\n' > /etc/os-release
|
||||
&& printf 'ID=pop\nNAME="Pop!_OS"\nPRETTY_NAME="Pop!_OS 26.04 LTS (smoketest)"\nVERSION_ID="26.04"\nID_LIKE="ubuntu debian"\nUBUNTU_CODENAME=resolute\nVERSION_CODENAME=resolute\n' > /etc/os-release
|
||||
USER pop
|
||||
WORKDIR /home/pop
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
# Smoketest
|
||||
|
||||
These tests run `configure`'s pieces on Ubuntu 24.04, which Pop!_OS 24.04 is built on, in throwaway Docker containers. A container has the same apt packages as Pop!_OS, except COSMIC's own, and `/etc/os-release` says Pop!_OS. Each scenario starts with what a login gives: `USER`, `/run/user/<uid>`, a session D-Bus in it and an unlocked gnome-keyring, as on Pop!_OS.
|
||||
These tests run `configure`'s pieces on Ubuntu 26.04, which Pop!_OS 26.04 is built on, in throwaway Docker containers. A container has the same apt packages as Pop!_OS, except COSMIC's own, and `/etc/os-release` says Pop!_OS. Each scenario starts with what a login gives: `USER`, `/run/user/<uid>`, a session D-Bus in it and an unlocked gnome-keyring, as on Pop!_OS.
|
||||
|
||||
They check what lint can't:
|
||||
|
||||
@@ -43,7 +43,7 @@ Each run writes its logs to `smoketest/results/<time>/`, one per scenario, and p
|
||||
|
||||
## What still needs Pop!_OS
|
||||
|
||||
A container has no COSMIC session, systemd user manager, FUSE mounts or AppArmor, so check these by hand on Pop!_OS 24.04:
|
||||
A container has no COSMIC session, systemd user manager, FUSE mounts or AppArmor, so check these by hand on Pop!_OS 26.04:
|
||||
|
||||
- **COSMIC Files** shows a folder added to its sidebar, with its name.
|
||||
- **Evolution** shows the email, calendars and contacts that `configure core` adds, against a real Core.
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Purpose : Run the smoketest scenarios, each in a fresh Ubuntu 24.04
|
||||
# container (Pop!_OS 24.04's base) with Docker. See README.md.
|
||||
# Purpose : Run the smoketest scenarios, each in a fresh Ubuntu 26.04
|
||||
# container (Pop!_OS 26.04's base) with Docker. See README.md.
|
||||
#
|
||||
# Usage: smoketest/run [--tier quick|all] [--keep] [scenario...]
|
||||
# smoketest/run --list
|
||||
|
||||
@@ -26,4 +26,12 @@ scenario() {
|
||||
check "no staging folders are left" bash -c '! compgen -G "$HOME/.local/share/federated-connector/.connector-*"'
|
||||
check_eq "the PATH block is in ~/.bashrc once" 1 "$(grep -c '>>> Federated Connector commands >>>' "$HOME/.bashrc")"
|
||||
check "the installed configure runs" "$HOME/.local/bin/configure" --help
|
||||
|
||||
step "On Pop!_OS 24.04, which isn't supported"
|
||||
sudo cp /etc/os-release "$HOME/os-release"
|
||||
sudo sed -i 's/26\.04/24.04/g; s/resolute/noble/g' /etc/os-release
|
||||
bash < "$CONNECTOR/install.sh" > "$HOME/old.log" 2>&1
|
||||
check_eq "install.sh stops" 1 $?
|
||||
check "it says to upgrade" grep -q "needs Pop!_OS 26.04 or later" "$HOME/old.log"
|
||||
sudo cp "$HOME/os-release" /etc/os-release
|
||||
}
|
||||
|
||||
@@ -21,4 +21,11 @@ scenario() {
|
||||
check "configure core gives up on a Superpanel it can't reach" \
|
||||
bash -c "printf 'https://superpanel.smoke.invalid\n' | '$CONNECTOR/configure' core | grep -q \"Couldn't reach https://superpanel.smoke.invalid\""
|
||||
check_not "it doesn't run as root" sudo "$CONNECTOR/configure" --list
|
||||
|
||||
sudo cp /etc/os-release "$HOME/os-release"
|
||||
sudo sed -i 's/26\.04/24.04/g; s/resolute/noble/g' /etc/os-release
|
||||
out="$(echo q | "$CONNECTOR/configure" 2>&1)"
|
||||
check_eq "on Pop!_OS 24.04, the menu stops" 1 "$(echo q | "$CONNECTOR/configure" > /dev/null 2>&1; echo $?)"
|
||||
check "and says to upgrade" grep -q "needs Pop!_OS 26.04 or later" <<< "$out"
|
||||
sudo cp "$HOME/os-release" /etc/os-release
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ scenario() {
|
||||
check "install_srt" install_srt
|
||||
check "Node.js is in ~/.local/share/federated-connector/node" test -x "$FC_TOOLS/node/bin/node"
|
||||
check "srt is found" srt_path
|
||||
check "srt is the version it's pinned to ($SRT_VERSION)" srt_current
|
||||
|
||||
step "A stand-in agent"
|
||||
mkdir -p "$HOME/.local/bin" "$HOME/.ssh" "$project"
|
||||
|
||||
Reference in New Issue
Block a user