blob: 4cdc2a32e76facee03f784194e84d725bd12e2fe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
# AGENTS.md
## Project purpose
Hypervisor detection CLI tool for UNIX-like systems. Reports which hypervisor (KVM, Xen, VMware, Hyper-V, …) the host is running on without requiring root privileges.
## Tech stack
- Ada 2005 (designed for that — README: "Single high level language. Even if certain things require more code.").
- Build: GNAT 4.x+ via `gprbuild` (`hvinfo.gpr` project file). GNU `make` is the user-facing entry point (`Makefile` calls `gprbuild`/`gprclean`; installs via standard Unix `install`).
- Configuration generated by `mkconfig.sh` and `mkdefs.sh` (shell) using `gnatprep`.
- Debian packaging under `debian/` (`changelog`, `control`, `rules`, `copyright`).
## Build / test / run
```
gmake # builds via gprbuild into build/
gmake install PREFIX=<some dir>
# Debian package
dpkg-buildpackage -uc -us -tc -b
```
No automated test suite; the binary itself is the test (run on each target hypervisor).
## Repository layout
- `src/` — Ada sources.
- `hvinfo.gpr` — GNAT project file.
- `hvinfo.def` — gnatprep preprocessor directives file (committed).
- `config.def` — generated by `mkdefs.sh`; listed in `.gitignore`.
- `mkconfig.sh`, `mkdefs.sh` — generators called from `Makefile`.
- `Makefile` — user-facing build wrapper.
- `debian/` — Debian packaging.
- `VERSION`, `README.md`, `LICENSE` (GPL-2).
## Cross-repo context
One of the canonical 14 VyOS-image build packages, listed in an internal repository. Built into VyOS images by `vyos-build` and consumed at runtime by `vyos-1x` to detect virtualisation context. Native-package category — no application-level test runner beyond `dpkg-buildpackage`.
## Conventions
- Commit / PR title format: `component: T12345: description` (Phorge task ID at https://vyos.dev mandatory). Enforced by `vyos/.github` reusable workflows where consumed.
- Author: Daniil Baturin; one of the very few Ada packages in the VyOS ecosystem.
- License: GPL-2-or-later.
## Notes for future contributors
- Build needs Ada 2005 toolchain (`gnat`, `gprbuild`, `gnatprep`).
- Adding a new hypervisor signature: extend the relevant Ada module under `src/` and bump `VERSION`.
- License: GPL-2.
|