From 33eae03417ea1ab9c15fa73bd7c418c307cac992 Mon Sep 17 00:00:00 2001 From: James Henstridge Date: Tue, 25 Jun 2024 14:27:17 +0800 Subject: [PATCH] Rebase Ubuntu Core Desktop changes on top of core24: * Add a Github Actions workflow to test build the snap. * Configure snap settings defaults via gadget.yaml. * Configure some interface connects for ubuntu-desktop-session via gadget.yaml. * Turn on the graphical boot splash screen. * Add a cloud-init script to do some first-boot config for the network-manager and lxd snaps. Co-authored-by: Ken VanDine Co-authored-by: Robert Ancell Co-authored-by: Sergio Costas Rodriguez --- .github/workflows/build-snap.yml | 23 +++++++++++++++++ extra/cloud.conf | 4 +++ extra/cmdline.extra | 1 + extra/extra-setup.sh | 14 +++++++++++ gadget/gadget-amd64.yaml | 43 +++++++++++++++++++++++++++++++- snapcraft.yaml | 12 ++++++--- 6 files changed, 93 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/build-snap.yml create mode 100644 extra/cloud.conf create mode 100644 extra/cmdline.extra create mode 100755 extra/extra-setup.sh diff --git a/.github/workflows/build-snap.yml b/.github/workflows/build-snap.yml new file mode 100644 index 0000000..c1c194f --- /dev/null +++ b/.github/workflows/build-snap.yml @@ -0,0 +1,23 @@ +name: build-snap +on: + pull_request: + push: + branches: + - main + - 22 + - 24 + +jobs: + snap: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: snapcore/action-build@v1 + id: snapcraft + with: + # Switch back to stable once https://github.com/canonical/snapcraft/pull/4850 is released. + snapcraft-channel: edge + - uses: actions/upload-artifact@v4 + with: + name: 'snap' + path: ${{ steps.snapcraft.outputs.snap}} diff --git a/extra/cloud.conf b/extra/cloud.conf new file mode 100644 index 0000000..ec64949 --- /dev/null +++ b/extra/cloud.conf @@ -0,0 +1,4 @@ +#cloud-config +datasource_list: [NoCloud] +runcmd: + - /snap/pc-desktop/current/extra-setup.sh diff --git a/extra/cmdline.extra b/extra/cmdline.extra new file mode 100644 index 0000000..b26209f --- /dev/null +++ b/extra/cmdline.extra @@ -0,0 +1 @@ +quiet splash \ No newline at end of file diff --git a/extra/extra-setup.sh b/extra/extra-setup.sh new file mode 100755 index 0000000..e39698a --- /dev/null +++ b/extra/extra-setup.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +if [ -d /var/snap/network-manager/current/ ]; then + mkdir -p /var/snap/network-manager/current/conf.d + cat > /var/snap/network-manager/current/conf.d/disable-polkit.conf <