Ignore sudoers/fwupd.conf/polkit rules.d: system rewrites their modes, git cannot store 440/640/750 #43
No reviewers
Labels
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
wak/chezetc-wak!43
Loading…
Reference in a new issue
No description provided.
Delete branch "william/igor-etc-capture"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
9d6f5ab199to9de68b914e@ -15,2 +16,4 @@LimitMEMLOCK=infinity# Run only on socket 0's cores (both hyperthreads), the socket the GPUs are attached toAllowedCPUs=0-17,36-53Wrap this in a toml condition matching host igor, we only want it for igor
Already igor-only: llama-swap.container.tmpl is wrapped file-wide — {{- if eq .chezmoi.hostname "igor" -}} on L1, {{ end -}} at L67, so AllowedCPUs/NUMA render nowhere else. The diff hunk can't show the guard.
@ -24,6 +27,9 @@ table inet filter {tcp dport 10001-10009 acceptsocket cgroupv2 level 2 @cg_llama_swap accept}chain input_william_ai {This should be wrapped in an if check for
igorAlready guarded: chain input_william_ai (L30) is inside the igor block starting L25 (ends L40) with the pi-dev chain; its input_lo vmap entry 1001 also has its own igor guard (L44-47).
@ -11,6 +11,9 @@ table inet filter {set cg_llama_swap {type cgroupsv2}set cg_william_ai {This should be wrapped in an if check for
igorAlready guarded: set cg_william_ai (L14) sits inside the existing {{- if eq .chezmoi.hostname "igor" }} block (L10-L17), same block as set cg_llama_swap. Diff hunk doesn't render the guard lines.
9de68b914etodd1c12c8e9dd1c12c8e9toe71d56c147e71d56c147tofe85de27f3@ -143,2 +159,4 @@oifname "lo" tcp dport 8800 accept comment "Allow bifrost locally"oifname nlan tcp dport {3232,6053} accept comment "Allow esphome operation"oifname nlan meta l4proto { icmp, icmpv6 } accept comment "allow icmp to nlan"oifname lo socket cgroupv2 level 2 @cg_william_ai meta mark set 1001 acceptThis should be wrapped in an if check for
igorAlready guarded: both lines (L161-162) are inside chain output_william_ai within the igor block {{ if eq .chezmoi.hostname "igor" -}} L147 ... {{- end }} L164.
b5c1284cb3tocc51f80858@ -0,0 +8,4 @@# tmpfiles re-enforces that every boot, so we must not track it as a# plain chezmoi dir (755) or apply would fight tmpfiles forever.mkdir -p /etc/fwupdprintf '[fwupd]\n# use `man 5 fwupd.conf` for documentation\n' > /etc/fwupd/fwupd.confThis won't fix the file contents if they change on disk after running. We need the change sanity at least for contents
or are the contents still preserved? Won't this not run if we change the fwupd.conf file in chezetc or on disk?
Done: fwupd.conf is a plain tracked file again, so on-disk content drift is detected and healed by apply. Ack the tradeoff: apply re-stores 644 (git cannot record 640); nothing enforces 640 and the root-run daemon does not care.
Answer to both questions: onchange_ re-runs when the script content changes, so editing fwupd.conf required editing the script (bad), and yes, drift on disk was never noticed (worse). Fixed: fwupd.conf is now a plain tracked file with normal apply-time content checking; the onchange_ script only guarantees polkit rules.d existence/mode now.
@ -40,2 +46,4 @@1001 : jump input_william_ai,{{- end }}}{{- if eq .chezmoi.hostname "igor" }}This is not igor specific, all nodes should have this
Done (
315d5c9): set cg_william_ai, chain input_william_ai and the 1001 vmap entry are now unguarded (all nodes). Kept igor-only: llama-swap/DNS/pi-dev rules and the output-side rules (output_william_ai + mark-set), which reference igor-only chains/sets; on other hosts the input-side mark never gets set, so the accept chain is inert without the igor-only output path. Renders verified nft -c as igor and as a hypothetical non-igor host.@ -0,0 +1,4 @@# Daemons require stricter modes than git can store in chezmoi.Just drop this, it's okay to not set these at boot
Done: tmpfiles.d/99-wak-modes.conf dropped (and removed from this host).
9cf08ffe07to315d5c9bc7View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.