Files
Sergio 48e41331a1 journal-query CLI, machined, polkit con grants reales, GNOME boot test
- ente-journalctl: bin nuevo en ente-journald-compat. Lee
  ~/.local/share/ente/journal/index.log, parse timestamp:source:unit:sha,
  filtra --unit/--source/--since/--grep/--tail, restituye blobs desde CAS
  y formatea (pretty | --json). Default extrae MESSAGE de journald native.
- compat-machined: org.freedesktop.machine1.Manager con
  ListMachines/GetMachine/Register/Terminate. Lista vacía + NotFound —
  apps que llaman al boot ya no quedan en timeout.
- compat-polkit: query_policy() consulta el bus interno por el cap
  POLKIT_DECISION_IFACE con blob (pid_be|uid_be|action_id_utf8). Si hay
  proveedor su byte de respuesta gobierna; si no, default-allow.
  Anuncia POLKIT_SERVICE_IFACE (separado para evitar recursión).
- docs/gnome-boot-test.md: procedimiento end-to-end para arrancar GNOME
  con ente-zero como PID 1 en QEMU. scripts/build-rootfs.sh overlaya
  binarios + symlink /init. scripts/run-vm.sh boot QEMU con KVM y GTK.
  docs/seed-gnome-test.k Card Semilla con genesis para 8 shims +
  dbus-daemon + NetworkManager + gdm.

8 compat-shims operativos en paralelo cubriendo: logind, hostnamed,
timedated, localed, journald, resolved, polkit, machined.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-04 10:13:00 +00:00

41 lines
1.2 KiB
Bash
Executable File

#!/usr/bin/env bash
# run-vm.sh — boot de la imagen rootfs en QEMU con KVM.
#
# Inputs:
# $1 — imagen disco (qcow2 o raw) con el rootfs ya parchado
# $@ — args adicionales a qemu
#
# Default: 4 GiB RAM, 2 vCPU, virtio-net, OpenGL para GNOME shell.
set -euo pipefail
DISK="${1:-}"
shift || true
if [[ -z "$DISK" || ! -f "$DISK" ]]; then
echo "Uso: $0 <disk.qcow2> [args extra de qemu]" >&2
echo "Genera la imagen con scripts/build-rootfs.sh primero." >&2
exit 1
fi
# Boot config: redirige init a ente-zero. Usa los flags que el initramfs
# de la imagen base entienda — `init=` es universal para GRUB-equivalentes.
KERNEL_CMDLINE="root=/dev/vda1 rw console=ttyS0,115200 init=/usr/local/bin/ente-zero RUST_LOG=info"
# Config QEMU. -display gtk con OpenGL para GNOME shell. -display none
# para CI/headless (el test verifica solamente boot via console).
DISPLAY_FLAGS="${ENTE_VM_DISPLAY:--display gtk,gl=on}"
exec qemu-system-x86_64 \
-enable-kvm \
-cpu host \
-smp 2 \
-m 4G \
-drive "file=$DISK,if=virtio" \
-netdev user,id=net0 \
-device virtio-net-pci,netdev=net0 \
-serial mon:stdio \
$DISPLAY_FLAGS \
-append "$KERNEL_CMDLINE" \
"$@"