build(snap): trim the description and part comments

The description carried a confinement section SPEC.md already owns,
and the part comments narrated build steps the commands state on
their own. First run now shows a plain run instead of the microVM
proof.
This commit is contained in:
vhaudiquet committed 2026-10-29 21:47:25 +01:00
1 parent ed5786c4b5
commit 8a0521ae76
1 file changed
+5 -25
+5 -25
View File
@@ -9,32 +9,22 @@ description: |
away. Persistence crosses an explicit `-v/--volume` share or it does not away. Persistence crosses an explicit `-v/--volume` share or it does not
happen. happen.
## Confinement
The host process never mounts a filesystem and never creates or
enters a namespace, so the whole runtime runs inside snapd's
default-deny seccomp allowlist. Working KVM is required; there is
no software fallback.
## First run ## First run
Connect the KVM interface (home and network connect on their own): Connect the KVM interface (home and network connect on their own):
sudo snap connect ecrou:kvm sudo snap connect ecrou:kvm
Then prove the machine: Then run a command in a microVM:
ecrou run alpine -- uname -a ecrou run ubuntu -- uname -a
The guest kernel version differing from the host is the microVM
proof.
## Diagnostics ## Diagnostics
`ecrou probe` reports what a run would find: KVM, libkrun, the `ecrou probe` reports what a run would find: KVM, libkrun, the
cache directory. cache directory.
## Where things live ## Configuration and cache
- image cache: `~/snap/ecrou/common/cache/ecrou` - image cache: `~/snap/ecrou/common/cache/ecrou`
- config: `~/snap/ecrou/common/config/ecrou.yaml` - config: `~/snap/ecrou/common/config/ecrou.yaml`
@@ -65,8 +55,6 @@ parts:
source: . source: .
rust-channel: "1.98.1" rust-channel: "1.98.1"
rust-path: [crates/ecrou-cli] rust-path: [crates/ecrou-cli]
# aws-lc-sys (the rustls provider) drives cmake and perl at build
# time; the rust plugin already brings gcc, curl, git, pkg-config.
build-packages: [cmake, perl] build-packages: [cmake, perl]
override-build: | override-build: |
craftctl default craftctl default
@@ -93,25 +81,17 @@ parts:
source-depth: 1 source-depth: 1
rust-channel: "1.98.1" rust-channel: "1.98.1"
override-build: | override-build: |
# Build only the libkrun package; the rest of the workspace is
# the feature-gated device crates, not needed for the eleven
# stable-ABI calls ecrou makes. `net` is TSI, the guest
# networking.
cargo build --release -p libkrun --features net cargo build --release -p libkrun --features net
# No distro the snap bases ship from publishes libkrun.so.1, so
# the soname layout is set up here the way `make install`
# would.
install -Dm755 target/release/libkrun.so \ install -Dm755 target/release/libkrun.so \
"$CRAFT_PART_INSTALL/lib/libkrun.so.1.19.7" "$CRAFT_PART_INSTALL/lib/libkrun.so.1.19.7"
ln -s libkrun.so.1.19.7 "$CRAFT_PART_INSTALL/lib/libkrun.so.1" ln -s libkrun.so.1.19.7 "$CRAFT_PART_INSTALL/lib/libkrun.so.1"
libkrunfw: libkrunfw:
plugin: nil plugin: nil
# libkrunfw5 ships only in the current series' universe today, # libkrunfw5 ships only in stonking universe today,
# not in any LTS base, so the .deb comes straight from the pool. # not in any LTS base, so the .deb comes straight from the pool.
# The library embeds its kernel and has no external symbols, so # The library embeds its kernel and has no external symbols, so
# it runs on the base's older glibc. The generic amd64 build, not # it runs on the base's older glibc.
# the amd64v3 flavor: the snap should not require AVX2.
build-packages: [curl] build-packages: [curl]
override-pull: | override-pull: |
curl -fL -o libkrunfw5.deb \ curl -fL -o libkrunfw5.deb \