-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #592 from d-loose/no-refresh-on-loading
feat(bootstrap): don't check for updates in `_initInstallerApp`
- Loading branch information
Showing
5 changed files
with
130 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[Desktop Entry] | ||
Name=Ubuntu Desktop Init | ||
# Translators: Do NOT translate or transliterate this text (this is an icon file name)! | ||
Icon=preferences-system | ||
Exec=ubuntu-desktop-init | ||
Terminal=false | ||
Type=Application | ||
StartupNotify=true | ||
Categories=GNOME;GTK;System; | ||
OnlyShowIn=GNOME;Unity; | ||
NoDisplay=true | ||
X-GNOME-HiddenUnderSystemd=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
name: ubuntu-desktop-init | ||
version: git | ||
summary: Ubuntu Desktop Init | ||
description: | | ||
A first boot initialisation wizard for new Ubuntu and variants. | ||
It comprises a Flutter-based UI and a go backend packaged separately as a deb. | ||
grade: stable | ||
confinement: strict | ||
base: core22 | ||
architectures: | ||
- build-on: amd64 | ||
- build-on: arm64 | ||
|
||
apps: | ||
ubuntu-desktop-init: | ||
command: bin/ubuntu_init | ||
extensions: [gnome] | ||
desktop: usr/share/applications/ubuntu-desktop-init.desktop | ||
environment: | ||
LOG_LEVEL: debug | ||
plugs: | ||
- usr-share-desktop-provision | ||
- run-provd-socket | ||
- network | ||
- network-manager | ||
- tmp | ||
- var-log-installer | ||
|
||
parts: | ||
flutter-git: | ||
plugin: nil | ||
source: . | ||
override-pull: | | ||
# necessary when reruns using the same container | ||
if [ -d "flutter" ]; then | ||
rm -rf "flutter" | ||
fi | ||
craftctl default | ||
FLUTTER_VERSION=$(sed -n "s/^flutter \([0-9.]\+\).*/\1/p" .tool-versions) | ||
git clone -b $FLUTTER_VERSION --depth 1 https://github.com/flutter/flutter.git | ||
override-build: | | ||
mkdir -p $CRAFT_PART_INSTALL/usr/bin | ||
mkdir -p $CRAFT_PART_INSTALL/usr/libexec | ||
cp -r $CRAFT_PART_SRC/flutter $CRAFT_PART_INSTALL/usr/libexec/flutter | ||
ln -s $CRAFT_PART_INSTALL/usr/libexec/flutter/bin/flutter $CRAFT_PART_INSTALL/usr/bin/flutter | ||
ln -s $CRAFT_PART_INSTALL/usr/libexec/flutter/bin/dart $CRAFT_PART_INSTALL/usr/bin/dart | ||
$CRAFT_PART_INSTALL/usr/bin/flutter doctor | ||
build-packages: | ||
- clang | ||
- cmake | ||
- curl | ||
- libgtk-3-dev | ||
- ninja-build | ||
- unzip | ||
- xz-utils | ||
- zip | ||
override-prime: "" | ||
|
||
ubuntu-desktop-init: | ||
after: [flutter-git] | ||
plugin: nil | ||
source: . | ||
override-build: | | ||
set -eux | ||
mkdir -p $CRAFT_PART_INSTALL/bin/lib | ||
mkdir -p $CRAFT_PART_INSTALL/usr/share/applications | ||
cp snap/local/ubuntu-desktop-init.desktop $CRAFT_PART_INSTALL/usr/share/applications/ | ||
dart pub global activate melos | ||
dart pub global run melos bootstrap | ||
# patch config directory path | ||
sed -i 's|/usr/share|/var/lib/snapd/hostfs/usr/share|' packages/ubuntu_provision/lib/src/services/config_service.dart | ||
cd packages/ubuntu_init | ||
flutter build linux --release -v | ||
cp -r build/linux/*/release/bundle/* $CRAFT_PART_INSTALL/bin/ | ||
stage-packages: | ||
- libsysmetrics1 | ||
- pciutils | ||
- util-linux | ||
|
||
lint: | ||
ignore: | ||
- library: | ||
- usr/lib/**/libsysmetrics.so.1 | ||
|
||
plugs: | ||
run-provd-socket: | ||
interface: system-files | ||
read: | ||
- /run/gnome-initial-setup/desktop-provision/init.socket | ||
write: | ||
- /run/gnome-initial-setup/desktop-provision/init.socket | ||
tmp: | ||
interface: system-files | ||
read: | ||
- /var/lib/snapd/hostfs/tmp | ||
write: | ||
- /var/lib/snapd/hostfs/tmp | ||
usr-share-desktop-provision: | ||
interface: system-files | ||
read: | ||
- /var/lib/snapd/hostfs/usr/share/desktop-provision | ||
var-log-installer: | ||
interface: system-files | ||
write: | ||
- /var/log/installer | ||
|
||
slots: | ||
dbus-name: | ||
interface: dbus | ||
bus: session | ||
name: com.canonical.ubuntu_init |