~nesv/govern

Shrink binaries

Since govern has the possibility of shipping a lot of binaries, it would
be prudent to shrink them down as much as possible.

To accomplish this, there are two sets of changes to the Makefile:

- Pass `-ldflags="-s -w"` to go build, which will strip debugging
  symbols;
- If present on the host, use upx(1) to shrink the binaries even further.

upx(1) is kind of a neat tool. It works by compressing a binary, and
having it unpack itself at execution time, then using a JMP instruction
to jump to the extracted binary.
0c306332 — Nick Saika 1 year, 1 month ago
ci: Call "go mod download" before running "make check"
ci: Rename .build to .builds
Remove a ton of dead code, and fix linting errors
18e992f6 — Nick Saika 1 year, 1 month ago
makefile: Renamed "GNUmakefile" to "Makefile"
09022b1e — Nick Saika 1 year, 1 month ago
ci: Add sr.ht build manifest for Arch Linux
99a316d2 — Nick Saika 1 year, 1 month ago
makefile: Fix typo
Merge branch 'pkg.runner'
runners/pkg: Rewrite the pkg runner

Just a little bit of cleanup, so that it works.
runner: Require runners to specify which facts they plan on getting

To take a little inspiration from OpenBSD's pledge(2) and unveil(2)
syscalls, this change requires runners to explicitly state which facts
they plan on calling, before they call them. Failure to do so will
result in an error when the runner executes.
makefile: Add targets for building runners
internal/facts: Allow for facts to be printed as JSON
example/state: Remove nginx.hcl

Just to limit the examples to things we actually have.
runners/pkg: Refactor

I had an moment of inspiration: instead of having to implement functions
specific to each, supported Linux distribution and/or operating system
(e.g. *BSD), the commands for each supported OS or distribution could be
written down in a JSON file, embedded within the runner, and loaded at
startup.
Merge branch 'lua'
govern: New "shell" command!

This is the first step in bundling a Lua interpreter into govern. <3

This will enable the writing of facts and runners in Lua, without
requiring an external Lua interpreter to be installed. Govern *is* the
interpreter.
internal/facts: Add method to get fact names

After the facts.Facts type has been populated with all discovered facts
on a host, for convenience, this commit adds a way to retrieve the names
of all of those facts.
example: Update "nginx" and "utils" state examples
runners/file: New runner
Next