How mstrpi/pyspawn works
pyspawn is an unfinished interactive tool for creating systemd-nspawn containers. The user supplies a container name, base distribution, and network mode; the main script then checks prerequisites, prepares host directories and package dependencies, installs the selected base system, configures networking, and sets the root password. The graph follows calls visible in the excerpts; several calls have argument mismatches, so it represents intended dispatch as written, not confirmed successful execution.
Main entry points: main.py Setup orchestrator · functions.py Private networking · container.py Container choices
Components 17
Setup flow
- Setup orchestrator
main.py - Container choices
resources/container.py - Root check
resources/functions.py - Package dependencies
resources/functions.py
Container provisioning
- Debian bootstrap
resources/functions.py - Fedora bootstrap
resources/functions.py - Arch bootstrap
resources/functions.py - Root password
resources/functions.py
Networking
- Host networking
resources/functions.py - Private networking
resources/functions.py - Bridge setup
resources/functions.py - Macvlan setup
resources/functions.py
Host operations
- Host directories
resources/functions.py - Btrfs option
resources/functions.py - SELinux controls
resources/functions.py - Host system tools
Other components
- Administrator
Connections 26
- Administrator → Container choices: enters choices
resources/container.py - Setup orchestrator → Container choices: creates
main.py - Container choices → Setup orchestrator: provides settings
main.py - Setup orchestrator → Root check: checks access
main.py - Setup orchestrator → Btrfs option: checks option
main.py - Setup orchestrator → Host directories: creates directories
main.py - Setup orchestrator → Package dependencies: installs dependencies
main.py - Setup orchestrator → Debian bootstrap: selects distro
main.py - Setup orchestrator → Fedora bootstrap: selects distro
main.py - Setup orchestrator → Arch bootstrap: selects distro
main.py - Setup orchestrator → Host networking: selects network
main.py - Setup orchestrator → Private networking: selects network
main.py - Private networking → Bridge setup: dispatches bridge
resources/functions.py - Private networking → Macvlan setup: dispatches macvlan
resources/functions.py - Setup orchestrator → SELinux controls: toggles controls
main.py - Setup orchestrator → Root password: sets password
main.py - Btrfs option → Host system tools: runs command
resources/functions.py - Package dependencies → Host system tools: runs package commands
resources/functions.py - Debian bootstrap → Host system tools: runs bootstrap
resources/functions.py - Fedora bootstrap → Host system tools: runs bootstrap
resources/functions.py - Arch bootstrap → Host system tools: runs bootstrap
resources/functions.py - Host networking → Host system tools: writes config
resources/functions.py - Bridge setup → Host system tools: writes config
resources/functions.py - Macvlan setup → Host system tools: writes config
resources/functions.py - SELinux controls → Host system tools: runs commands
resources/functions.py - Root password → Host system tools: runs nspawn
resources/functions.py