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
13 changes: 13 additions & 0 deletions .github/scripts/test-release-candidate-workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
ROOT = pathlib.Path(__file__).resolve().parents[2]
WORKFLOW = ROOT / ".github" / "workflows" / "release-candidate.yml"
RELEASE = ROOT / "scripts" / "release.sh"
DESKTOP_BUILD = ROOT / "guest" / "desktop" / "build.sh"


class ReleaseCandidateWorkflowTests(unittest.TestCase):
Expand Down Expand Up @@ -71,6 +72,18 @@ def test_candidate_builds_every_modular_guest_from_its_commit(self) -> None:
self.assertIn('guest/desktop/build.sh arm64 "$distro"', source)
self.assertIn('guest/desktop/verify-build.sh arm64 "$distro"', source)

def test_desktop_builder_makes_the_network_profile_private(self) -> None:
source = DESKTOP_BUILD.read_text(encoding="utf-8")
overlay_copy = "cp -a --no-preserve=ownership /tmp/rootfs-overlay/. /rootfs/"
private_profile = (
"chmod 0600 \\\n"
" /rootfs/etc/NetworkManager/system-connections/dory-wired.nmconnection"
)
self.assertIn(overlay_copy, source)
self.assertIn(private_profile, source)
self.assertLess(source.index(overlay_copy), source.index(private_profile))
self.assertLess(source.index(private_profile), source.index("mke2fs -q"))

def test_release_script_keeps_publication_blocked_after_staging(self) -> None:
subprocess.run(["bash", "-n", str(RELEASE)], cwd=ROOT, check=True)
source = RELEASE.read_text(encoding="utf-8")
Expand Down
5 changes: 5 additions & 0 deletions guest/desktop/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,11 @@ CID="$(docker_cmd create --privileged --platform linux/arm64 \
"$DORY_DESKTOP_SUITE" /rootfs "$DORY_DESKTOP_MIRROR"

cp -a --no-preserve=ownership /tmp/rootfs-overlay/. /rootfs/
# Git records only the executable bit, so a tracked NetworkManager profile arrives as 0644.
# NetworkManager requires system connection profiles to be root-private, and the image must
# establish that boundary before mke2fs captures the tree.
chmod 0600 \
/rootfs/etc/NetworkManager/system-connections/dory-wired.nmconnection
/tmp/install-graphics-pack.sh /tmp/dory-mesa-venus-arm64.tar.zst /rootfs 0
install -m0755 /tmp/dory-agent /rootfs/usr/bin/dory-agent
chmod 0755 /rootfs/usr/lib/dory/clipboard /rootfs/usr/lib/dory/configure-machine /rootfs/usr/lib/dory/first-boot \
Expand Down
Loading