Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 45 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ jobs:

- name: Validate shell scripts
run: |
bash -n data/kwin/setup.sh data/kwin/build.sh scripts/test-kwin-plugin.sh scripts/test-kwin-distro.sh scripts/test-kwin-setup.sh scripts/test-gnome-extension.sh install.sh uninstall.sh configure.sh bin/LG_Buddy_Common scripts/build-release-bundle.sh scripts/test-gui-launch.sh scripts/test-installed-gui.sh scripts/test-installer-first-run.sh scripts/test-installer-gui-dependencies.sh scripts/test-installer-graphical-auth.sh scripts/test-release-bundle.sh scripts/test-release-gui-behavior.sh scripts/test-release-gui-journey.sh scripts/test-release-linkage.sh scripts/test-cross-version-upgrade.sh scripts/test-without-python.sh scripts/test-production-upgrade-canary.sh scripts/publish-release-assets.sh
bash -n data/kwin/setup.sh data/kwin/build.sh scripts/test-kwin-plugin.sh scripts/test-kwin-distro.sh scripts/test-kwin-setup.sh scripts/test-kwin-native-setup.sh scripts/test-gnome-extension.sh install.sh uninstall.sh configure.sh bin/LG_Buddy_Common scripts/build-release-bundle.sh scripts/test-gui-launch.sh scripts/test-installed-gui.sh scripts/test-installer-first-run.sh scripts/test-installer-gui-dependencies.sh scripts/test-installer-graphical-auth.sh scripts/test-release-bundle.sh scripts/test-release-gui-behavior.sh scripts/test-release-gui-journey.sh scripts/test-release-linkage.sh scripts/test-cross-version-upgrade.sh scripts/test-without-python.sh scripts/test-production-upgrade-canary.sh scripts/publish-release-assets.sh
python3 -m py_compile scripts/test-release-gui-accessibility.py scripts/test-native-setup-recovery.py scripts/xwd_mean.py tools/mock_github_gui.py

- name: Validate deterministic GUI GitHub fixture
Expand Down Expand Up @@ -690,7 +690,7 @@ jobs:
bundle-smoke-test:
runs-on: ubuntu-24.04
timeout-minutes: 2
needs: [bundle-build, bundle-smoke-suites, bundle-supported-distros, debian-package, rpm-package, dnf-update-fedora44, rpm-update-fedora43-refusal, release-assets]
needs: [bundle-build, bundle-smoke-suites, bundle-supported-distros, plasma-setup, debian-package, rpm-package, dnf-update-fedora44, rpm-update-fedora43-refusal, release-assets]
# Keep the required check failing when production or any suite fails,
# times out, or is skipped, even after an upstream failure.
if: ${{ always() }}
Expand All @@ -700,17 +700,59 @@ jobs:
BUILD_RESULT: ${{ needs.bundle-build.result }}
SMOKE_RESULT: ${{ needs.bundle-smoke-suites.result }}
DISTRO_RESULT: ${{ needs.bundle-supported-distros.result }}
PLASMA_RESULT: ${{ needs.plasma-setup.result }}
DEBIAN_RESULT: ${{ needs.debian-package.result }}
RPM_RESULT: ${{ needs.rpm-package.result }}
DNF_RESULT: ${{ needs.dnf-update-fedora44.result }}
RPM_REFUSAL_RESULT: ${{ needs.rpm-update-fedora43-refusal.result }}
ASSETS_RESULT: ${{ needs.release-assets.result }}
run: |
if [ "$BUILD_RESULT" != success ] || [ "$SMOKE_RESULT" != success ] || [ "$DISTRO_RESULT" != success ] || [ "$DEBIAN_RESULT" != success ] || [ "$RPM_RESULT" != success ] || [ "$DNF_RESULT" != success ] || [ "$RPM_REFUSAL_RESULT" != success ] || [ "$ASSETS_RESULT" != success ]; then
if [ "$BUILD_RESULT" != success ] || [ "$SMOKE_RESULT" != success ] || [ "$DISTRO_RESULT" != success ] || [ "$PLASMA_RESULT" != success ] || [ "$DEBIAN_RESULT" != success ] || [ "$RPM_RESULT" != success ] || [ "$DNF_RESULT" != success ] || [ "$RPM_REFUSAL_RESULT" != success ] || [ "$ASSETS_RESULT" != success ]; then
echo "Native Plasma setup: $PLASMA_RESULT" >&2
echo "Bundle build: $BUILD_RESULT; smoke suites: $SMOKE_RESULT; supported distributions: $DISTRO_RESULT; Debian package: $DEBIAN_RESULT; RPM package: $RPM_RESULT; DNF update: $DNF_RESULT; Fedora 43 refusal: $RPM_REFUSAL_RESULT; release assets: $ASSETS_RESULT" >&2
exit 1
fi

plasma-setup:
needs: bundle-build
runs-on: ubuntu-24.04
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
include:
- name: Arch current
image: archlinux:latest
setup: pacman -Syu --noconfirm --needed kwin gcc cmake make pkgconf extra-cmake-modules qt6-base qt6-declarative wayland libepoxy libdrm vulkan-headers dbus binutils sudo shadow util-linux mesa xkeyboard-config
- name: Fedora 44
image: fedora:44
setup: dnf install -y kwin kwin-devel gcc-c++ cmake make pkgconf-pkg-config extra-cmake-modules qt6-qtbase-devel qt6-qtdeclarative-devel wayland-devel libepoxy-devel libdrm-devel vulkan-headers dbus-daemon systemd binutils sudo shadow-utils util-linux mesa-dri-drivers xkeyboard-config
container:
image: ${{ matrix.image }}
steps:
- uses: actions/checkout@v5
- name: Install Plasma test prerequisites
run: ${{ matrix.setup }}
- uses: actions/download-artifact@v7
with:
name: ci-release-bundle
path: dist
- name: Exercise native setup and repair with the real distro KWin
shell: bash
run: |
useradd --create-home tester
printf 'tester ALL=(root) NOPASSWD: ALL\n' > /etc/sudoers.d/lg-buddy-test
chmod 440 /etc/sudoers.d/lg-buddy-test
archive="$(find dist -maxdepth 1 -name '*.tar.gz' -print -quit)"
extraction="$(mktemp -d)"
tar --no-same-owner -C "$extraction" -xzf "$archive"
bundle="$(find "$extraction" -mindepth 1 -maxdepth 1 -type d -print -quit)"
install -m 755 "$bundle/lg-buddy" /usr/bin/lg-buddy
install -d /usr/lib/lg-buddy
cp -a "$bundle/docs/kwin" /usr/lib/lg-buddy/kwin
runuser -u tester -- dbus-run-session -- env LG_BUDDY_DISPOSABLE_TEST=1 \
bash scripts/test-kwin-native-setup.sh /usr/bin/lg-buddy /usr/lib/lg-buddy/kwin

bundle-supported-distros:
needs: bundle-build
runs-on: ubuntu-24.04
Expand Down
20 changes: 18 additions & 2 deletions crates/lg-buddy/src/kwin_bridge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,19 @@ fn plugin_directory(exists: impl Fn(&str) -> bool) -> Option<&'static str> {
.find(|directory| exists(&format!("{directory}/kwin/plugins")))
}

/// Arch's lib64 compatibility alias must use the real supported loader root.
/// Resolve only this exact alias; the installer still rejects other symlinks.
pub(crate) fn resolve_plugin_root(root: &str) -> &str {
if root == "/usr/lib64/qt6/plugins"
&& std::fs::read_link("/usr/lib64")
.is_ok_and(|target| matches!(target.to_str(), Some("lib" | "/usr/lib")))
{
"/usr/lib/qt6/plugins"
} else {
root
}
}

#[derive(Debug, Clone, PartialEq, Eq)]
pub(crate) struct KWinInfo {
pub version: String,
Expand Down Expand Up @@ -108,7 +121,7 @@ fn inspect_with(
}
let version = version_field(info, "KWin version:")?.to_owned();
let qt_version = version_field(info, "Qt Version:")?.to_owned();
let plugin_directory = plugin_directory(exists);
let plugin_directory = plugin_directory(exists).map(resolve_plugin_root);
if get_name_owner(bus, KWIN)? != owner {
return Err(invalid("KWin changed while inspecting integration"));
}
Expand Down Expand Up @@ -275,7 +288,10 @@ mod tests {
.unwrap();
assert_eq!(info.version, "6.7.4");
assert_eq!(info.qt_version, "6.10.2");
assert_eq!(info.plugin_directory, Some("/usr/lib64/qt6/plugins"));
assert_eq!(
info.plugin_directory,
Some(resolve_plugin_root("/usr/lib64/qt6/plugins"))
);
assert_eq!(
bus.calls,
["GetNameOwner", "supportInformation", "GetNameOwner"]
Expand Down
6 changes: 5 additions & 1 deletion crates/lg-buddy/src/setup/kwin/native.rs
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,11 @@ fn system_action(args: &[OsString]) -> Result<()> {
return Err(1);
}
let uid: u32 = args[1].to_str().and_then(|s| s.parse().ok()).ok_or(1u8)?;
let root = Path::new(&args[2]);
// Existing receipts may retain the lib64 spelling from before discovery
// normalized the distribution's compatibility alias.
let root = Path::new(kwin_bridge::resolve_plugin_root(
args[2].to_str().ok_or(1u8)?,
));
let id = args[3].to_str().ok_or(1u8)?;
if !owned_id(uid, id) || !supported_root(root) {
return Err(1);
Expand Down
1 change: 1 addition & 0 deletions crates/lg-buddy/tests/cucumber_support/mod.rs
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
pub mod plasma;
pub mod steps;
pub mod world;
Loading
Loading