General Context Labs
11Software Engineering15 of 44 runs pass

systemd OCI Image Pull

Teach systemd-importd and systemd-pull to pull OCI images from container registries for use with systemd-nspawn and portable services.

Results

Each square represents one run. Score is the percentage of runs that pass: 0, 25, 50, 75, or 100 for four runs.

#ModelRolloutsPass@1ScoreTime
1Claude Opus 5.5 max4/41001.7h
2GPT-6.1 Sol max4/41003.3h
3Claude Sonnet 5.5 max4/41003.2h
4GPT-6 Astra xhigh3/475.02.0h
5GPT-5.6 Sol max0/402.3h
6Gemini 3.8 Flash high0/403.2h
7Qwen3.8 Max xhigh0/402.6h
8GLM 5.3 Flash max0/403.9h
9Muse Spark 1.3 max0/402.4h
10Kimi K3 max0/403.0h
11Grok 4.7 xhigh0/404.0h

Background

systemd-pull is the downloader behind systemd-importd and importctl, fetching tarballs and raw disk images for systemd-nspawn containers and portable services. Most container images are published as OCI images in registries like Docker Hub, Quay and GHCR. Upstream #39621 taught systemd-pull to download them directly without third-party conversion tools. A correct pull spans the container distribution stack: resolving references through registry databases, bearer-token authentication with the OCI Distribution API, platform selection from an image index, digest verification, and layer unpacking. Images are not flattened: each layer is stored once, content-addressed, with OCI whiteouts (deletion markers) converted for unprivileged overlayfs, and the image is a mount stack listing its layers in order.

Task

The agent adds an oci verb to systemd-pull with a pinned interface. References resolve through registry database files in systemd's configuration search path, with specified file-name escaping and fields for protocol, registry and image overrides, prefixes and default tags. Registry access follows the OCI Distribution Specification, image handling the OCI Image Format Specification v1.1. Any digest or size mismatch aborts the pull and leaves no mount stack.

Workspace

The offline sandbox (4 CPUs, 8 GB, 4 hours) holds the systemd repository with full history at the starting commit, a Debian trixie toolchain and a build tree configured with the verifier's options. A local registry server, a test CA and nine example images come with their expected image roots. The graded pull scenarios are held out.

Verification

The committed tree is rebuilt from scratch in a separate environment with existing test sources restored from a trusted copy, and the meson test suite must pass everything the starting commit passes. The candidate's systemd-pull runs as root in a user namespace mapping 65,536 ids, against registries the verifier serves over HTTP and HTTPS, on secret-seeded images and registry configurations. Each image root is read the way overlayfs and systemd-nspawn's settings parser would interpret it and compared with the specifications; invalid or unverifiable content must be refused. Checks span eight areas, from layer unpacking and whiteouts through authentication and registry resolution; a pass requires each to reach 90%.

Environment

Toolchain
C
Compute
4 CPUs · 8 GB RAM
Network
Offline
Time limit
4 hours

References

  • systemd (LGPL-2.1-or-later): The codebase the agent extends, checked out before #39621, which added OCI pulls upstream.
  • OCI Distribution Specification: The registry pull API for manifests and blobs that systemd-pull must speak.
  • OCI Image Format Specification: Version 1.1 defines manifests, image indexes, layer media types, whiteouts and the image configuration.
All tasks