Conversation
- plans/turnkey/base: add libsocket6-perl + libio-socket-ssl-perl (IPv6 Webmin) - plans/turnkey/base: uncomment tklbam (migrated to Python 3.13) - conf/turnkey.d/webmin-conf: enable ipv6=1 by default - overlays/turnkey.d/networking/etc/gai.conf: prefer IPv4 for external connections Tested: Built turnkey-core v19 ISO (406MB), LXC container running with Webmin on IPv4+IPv6, SSH, systemd, Python 3.13, kernel 6.12.
|
@JedMeister Do we actually assert that common conf scripts are idempotent? |
No we don't but I figured that making them more idempotent was not a bad thing? Although thanks for asking the question and get me to look at it again with a fresh set of eyes. Looking at it again I have some thoughts... It occurs to me that the current behavior is quite handy. When things fail loudly and fatally if they are not in an "expected" state it's easy to see issues. That's particularly likely to occur during a transition. I recall that earlier on in the v19.x dev cycle we actually caught a few issues because of the current behavior. Having to rebuild the whole root.patched can suck, but arguably it's better than having a "successful" build that includes bugs that don't get discovered until later - perhaps even by a user! Even though these updates do display warnings, I could imagine that it would be easy to miss them. I often put a build on and then do other things and it's usually done when I come back. If we did implement this (or similar), it probably should be configurable - defaulting to failing when things are in unexpected state. But that sounds like a fair bit of work... A "build report" could potentially mitigate risk of bugs slipping through, but that's something we don't have currently so means more work... Obviously that would be a good thing regardless, but becomes more important if changes raise the possibility of things breaking and possibly easy to miss. Regardless, IIRC there isn't an easy way to rerun common conf scripts on an existing root.patched. Obviously you can use fab to explicitly (re)run specific scripts but I'm not sure how often that would be happening... So TBH I'm not even 100% sure of the problem this is solving? @marcos-mendez I assume that there is some sort of friction you hit while developing that lead you to make these changes? Can you please share some more context on your use case/workflow that makes things better for you with these changes applied? |
|
@JedMeister @OnGle — fair questions. Here's the concrete context. The friction While building the first v19 appliances (ejabberd, Moodle, Mastodon), I was iterating heavily on common — fixing plans, overlays, and conf scripts as Trixie-related issues surfaced one by one. The cycle looked like this:
Each of these required a What the changes actually areThey're minimal — the kind of thing you'd see in any shell script best practice guide:
These aren't masking real errors. A missing directory being created is correct state; On Jed's concern about silent failures I agree that builds should fail loudly on unexpected state. But these aren't unexpected — they're the expected result of a previous successful run of the same script. The distinction is:
The warnings are still printed so they show up in build logs — nothing is silently swallowed. On @OnGle question No, common doesn't formally assert idempotency. But I'd argue it's still good practice — it costs nothing (the changes are trivially small), it doesn't hide real errors, and it makes the development workflow significantly smoother for anyone actively iterating on appliance builds. That said, if you'd prefer a different approach (like a |
The fab/build system only caches the last finished target. If something fails you can just re-run make, you don't need to make clean, unless the script you're working on finishes successfully, if that's the case, just add an
I see the confusion here, this is a workflow issue as far as I can tell, instead of doing full rebuilds do this:
A previous successful run of the same script is an unexpected state. The build system does not expect scripts to ever be re-run. |
|
Ok thanks for explaining |
|
Thanks @OnGle I don't want to muddy the waters but at step 4, I recommend using
Also have a look at I've also opened a somewhat related issue: turnkeylinux/tracker#2106 |
Idempotency updates provided by @marcos-mendez - pulled from #339 (rebased on current HEAD of 19.x-dev branch to fix merge conflicts).