James Shubin
73e641120f
pgraph: Improve time complexity of IncomingGraphVertices
...
This goes from O(n^2) to O(n) when map lookup is O(1). I never really
focused on much optimizing, but I noticed this one in passing.
2025-07-13 03:18:22 -04:00
James Shubin
f7e446ef6f
lang: core: example: nested: We don't use the func suffix anymore
...
There are only functions, no need to add suffixes to file names.
2025-07-13 03:18:22 -04:00
James Shubin
21917864db
lang: core, funcs: Remove facts API
...
This started because it was possible, not because it was very useful.
The overhead of using the full function API, is lessened by the function
API helpers, and the upcoming improvements in the function API.
It's much easier to have one fewer API's to manage and so on.
It's also a stark reminder of how weak tools like "puppet" are which
only really have data collection systems that don't take arguments.
2025-07-13 03:15:53 -04:00
James Shubin
c49d469dcd
engine: resources: Work around trailing slash issue in home dir
...
If the user is logged in, and we try to change from /home/james to
/home/james/ we'll get the error:
usermod: user james is currently used by process ????
and furthermore, it makes no sense to try and make this change since the
usermod function won't do anything if you run:
usermod --gid james --groups wheel --home /home/james/ james
when /etc/passwd has /home/james as the string.
2025-06-25 06:05:28 -04:00
James Shubin
0a79daf277
pgraph: Print cycles on error
...
I'm a terrible algorithmist, so who knows if this is correct, but it
seems to work in my cursory testing.
2025-06-25 06:05:28 -04:00
James Shubin
a4ed647d02
modules: purpleidea: Add more packages
2025-06-25 06:05:28 -04:00
James Shubin
79c199975d
modules: purpleidea: Add another useful helper package
2025-06-25 06:05:11 -04:00
James Shubin
50b4a2a4f7
lang: ast: Make error message clearer
2025-06-25 04:50:47 -04:00
James Shubin
f778008929
modules: misc: Key generation should support other types
...
I think these short keys are sketchy, but what do I know.
2025-06-25 04:50:47 -04:00
James Shubin
54380a2a1f
modules: cups: Add more edges
...
Useful for performance reasons until we make autoedges blazing fast.
2025-06-25 04:50:47 -04:00
James Shubin
a5fc1256e2
lang: core: embedded: provisioner: Encrypt the filesystem
...
The provisioner should be able to encrypt things. We should use an empty
passphrase so that the choosing of the actual passphrase can be done at
first boot.
2025-06-23 19:53:52 -04:00
James Shubin
0b2236962c
lang: core: embedded: provisioner: Separate home is rare
...
Maybe one day we want this off to prevent storage issues, but not today.
2025-06-12 18:17:33 -04:00
James Shubin
ee7ad7cbbe
lang: core: embedded: provisioner: Skip ignore if no drives available
...
Small bug for certain setups.
2025-06-12 18:11:14 -04:00
James Shubin
7ba4c4960b
modules: meta: Wrong interface for the loc network
...
Copy pasta bug!
2025-06-08 21:27:04 -04:00
James Shubin
777ea6115b
lang: core: embedded: provisioner: Support exec handoff
...
Could be used for any tool, but mgmt is an obvious possibility.
I should check this code more, but it's roughly right and I'm sure it
will get refactored more when I build opt-in provisioning and so on.
2025-06-08 21:16:54 -04:00
James Shubin
582cea31b0
modules: Get rid of unnecessary printing
2025-06-08 04:33:35 -04:00
James Shubin
c107240098
modules: shorewall: Add manual edges for performance
...
If you don't want to use auto-edges, then this still works.
2025-06-08 04:30:39 -04:00
James Shubin
6265a330bf
modules: misc: The COPR setup must be non-interactive
2025-06-08 04:21:58 -04:00
James Shubin
cfcb35456f
modules: misc: Use a template for network
...
Just a bug, now fixed.
2025-06-08 04:21:27 -04:00
James Shubin
1ef7c370e7
etcd, engine: Fix typos
2025-06-08 03:36:11 -04:00
James Shubin
f22ec07ed3
lang: Improve logging of startup information
...
Graph size and build time are both helpful.
2025-06-08 03:36:11 -04:00
James Shubin
f594799a7f
etcd: ssh: Improve the authentication for ssh etcd world
...
This was rather tricky, but I think I've learned a lot more about how
SSH actually works. We now only offer up to the server what we can
actually support, which lets us actually get back a host key we have a
chance of actually authenticating against.
Needed a new version of the ssh code and had to mess with go mod
garbage.
2025-06-08 03:07:59 -04:00
James Shubin
1ccec72a7c
cli, etcd, lib, setup: Support ssh hostkey logic
...
This makes it easy to pass in the expected key so that we never have to
guess and risk MITM attacks.
2025-06-07 17:55:41 -04:00
James Shubin
55eeb50fb4
lang: Refactor all the highlight helping together
...
Keep this cleaner and add a bit more.
2025-06-07 17:52:15 -04:00
James Shubin
2b7e9c3200
engine, integration, setup: Seeds should be called properly
2025-06-07 17:52:15 -04:00
James Shubin
25263fe9ea
cli: Allow multiples of these args
...
We forgot the flag that lets the CLI parser actually let us use
multiples.
2025-06-06 23:53:42 -04:00
James Shubin
1df28c1d00
lang: ast, funcs: Start plumbing through the textarea
...
We need to get these everywhere and this is a start.
2025-06-06 03:11:06 -04:00
James Shubin
32e91dc7de
lang: interpolate: Add temporary textarea info to interpolation
...
We should really be doing the math to find out how far along the string
each token really is, but that's complicated and tedious, especially
with the simplification passes, so let's skip that for now and just show
the whole thing.
2025-06-06 03:11:06 -04:00
James Shubin
c2c6cb5b6a
lang: interfaces: Subtle fixes in textarea
...
Turns out we need a lot more tests to make this work easier.
2025-06-06 03:11:06 -04:00
James Shubin
58461323b9
lang: parser: Try to add the end values in parser
...
Not sure if this is right, but it's a start.
2025-06-06 03:11:06 -04:00
James Shubin
cdc6743d83
lang: ast, interfaces, interpolate: Remove the legacy pos
...
This ports things to the new textarea. We need to plumb through things a
lot more, especially the string interpolation math to get the right
offsets everywhere, but that's coming.
2025-06-06 02:37:43 -04:00
James Shubin
86dfa5844a
lang: ast: Add missing initialization calls
...
Not sure how we forgot these before.
2025-06-06 02:35:20 -04:00
James Shubin
5d44cd28db
lang: ast, interpolate: Pass through uninterpolated strings
...
We don't need to make a new reference for nothing.
2025-06-06 01:00:11 -04:00
James Shubin
4f977dbe57
lang: Use the source finder wherever we can
...
This was easy to add and it works great!
2025-06-06 01:00:11 -04:00
James Shubin
573bd283cd
lang: funcs: dage: Print out some error locations
...
Most things don't support this yet, but let's get in some initial
plumbing. It's always difficult to know which function failed, so we
need to start telling the users more precisely.
2025-06-06 01:00:11 -04:00
James Shubin
6ac72974eb
lang: ast, interfaces: Move textarea to a common package
...
We're going to use it everywhere. We also make it more forgiving in the
meanwhile while we're porting things over.
2025-06-06 01:00:11 -04:00
James Shubin
4189a1299a
lang: ast: Add scope feedback for classes
...
We did this elsewhere for functions, let's add classes too.
2025-06-06 01:00:11 -04:00
James Shubin
dcd4f0709f
lang: ast: Provide better error reporting for scope errors
...
Print these file and line numbers when we can!
2025-06-05 23:00:56 -04:00
James Shubin
75bafa4fd3
mcl, docs: Use the less ambiguous form of the import
...
Update the style guide as well!
2025-06-05 22:47:38 -04:00
James Shubin
e5ec13f592
modules: misc: Add a class to install a copr repo
2025-06-05 22:47:38 -04:00
James Shubin
1a0fcfb829
modules: misc: Use the less ambiguous import name
2025-06-05 22:34:33 -04:00
James Shubin
ba86665cbb
misc: Rename for consistency
2025-06-05 22:34:29 -04:00
James Shubin
301ce03061
misc, setup, util: Add a ulimit
...
I think this gives us the ability to open more files.
2025-06-05 22:34:29 -04:00
James Shubin
650e8392c5
golang: Tidy mod file
...
I ran go mod tidy.
2025-06-05 21:46:28 -04:00
James Shubin
d7534b2b3b
golang: Update go.mod to avoid tidy warnings
2025-06-05 21:45:06 -04:00
James Shubin
3b88ad3794
lang: core: os: Add a modinfo function
...
Not sure if this will need renaming, but might be a useful family of
functions.
2025-06-05 21:40:19 -04:00
James Shubin
499b8f2732
lang: funcs: dage: Make error clearer
...
The implementation of the specific function is sending a nil value,
which is not allowed. This is a bug in the code of that function.
2025-06-05 20:36:15 -04:00
James Shubin
ac3a131a9f
modules: meta: Improve firewall rules for our router
2025-06-05 14:47:46 -04:00
James Shubin
a72492f042
modules: meta: Move router to networkd
...
I can't get NetworkManager working properly in parallel to wireguard. I
get an extra route added and it breaks the tunnel. No idea why. The
networkd equivalent seems to just work.
2025-06-05 14:47:46 -04:00
James Shubin
c51a55e98a
modules: misc: Add networkd helpers
2025-06-05 14:47:46 -04:00