2.7 KiB · text History e832e77
[package]
name = "devendra-agent"
version.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
description = "Embeddable devendra agent: reconciles quadlets and systemd services from an iroh-docs manifest"

[lib]
name = "devendra_agent"
path = "src/lib.rs"

[[bin]]
name = "devendra-agent"
path = "src/bin/agent.rs"

[dependencies]
devendra-proto = { workspace = true }
devendra-node = { workspace = true }
tokio = { workspace = true }
anyhow = { workspace = true }
thiserror = { workspace = true }
tracing = { workspace = true }
tracing-subscriber = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
blake3 = { workspace = true }
clap = { workspace = true }
# Owner/group name -> uid/gid resolution for file ownership (getpwnam/getgrnam).
# `hostname` provides gethostname() for inferring --host-id from the system.
nix = { version = "0.29", default-features = false, features = ["user", "hostname"] }

# --- Debian packaging (cargo-deb): `just deb` / `just deb-arm64` ---
[package.metadata.deb]
maintainer = "gmorell <gmp@h4xmb.org>"
copyright = "2026, gmorell"
extended-description = """\
devendra host agent. Joins the controller's iroh-docs document from a join \
ticket and continuously reconciles this host toward its published manifest \
(installs quadlets/config, daemon-reloads, and manages systemd services)."""
section = "admin"
priority = "optional"
# glibc dynamic binary; init-system-helpers provides deb-systemd-helper /
# deb-systemd-invoke used by the generated maintainer scripts. Set explicitly
# (not $auto) so cross-built packages don't need the target's shared libs to
# resolve dependencies at build time.
depends = "libc6, init-system-helpers"
# Required for cargo-deb to emit the systemd postinst/postrm (enable/disable).
# The generated fragments are written from scratch; this dir holds only the unit
# + env example, no hand-written postinst/prerm/etc., which cargo-deb ignores.
maintainer-scripts = "../../packaging/systemd"
# Paths are relative to this crate's manifest dir; packaging/ is at the repo root.
assets = [
    ["target/release/devendra-agent", "usr/bin/", "755"],
    # Shipped as a conffile: dpkg preserves the admin's edited ticket on upgrade.
    ["../../packaging/systemd/devendra-agent.env.example", "etc/devendra/agent.env", "600"],
]
conf-files = ["/etc/devendra/agent.env"]

# Installs packaging/systemd/devendra-agent.service and generates the maintainer
# scripts. enable-on-install, but don't start: the unit needs a real ticket in
# /etc/devendra/agent.env first, so the admin starts it after editing that file.
[package.metadata.deb.systemd-units]
unit-scripts = "../../packaging/systemd"
enable = true
start = false