This guarantees the descriptor is closed even when copyfileobj raises,
matching the other writer implementations. The append-initrd-secrets
script reopens the file by path, so flush() is enough before invoking
it and the explicit close() is no longer needed.
Tell the user what actually happens (the old secrets stay in place) and
how to get rid of the warning, instead of just saying it is "normal".
Suggested-by: Will Fancher <elvishjerricco@gmail.com>
Shared kernels and initrds appear once per generation in boot_files, so
InitrdWithSecretsWriter rebuilt the same file repeatedly. Prefer the
current configuration's entry so its failures stay fatal.
has_gc_root() iterated the entire BootFileList for every file on the
ESP, giving O(files * roots) comparisons. Build the set of kept paths
once and use O(1) membership tests instead.
After removing or renaming a file in boot.initrd.secrets, older
generations' append scripts start failing. Aborting on that blocks
deploying the new configuration, so only treat a failure as fatal when
it belongs to the configuration being switched to.
Appending to the existing file made it grow on every rebuild and a
failed script could leave it half-written. Always rebuild from the
pristine initrd into a temp file and rename into place.
dbus-broker (now the default since #512050) calls
sd_id128_get_machine() which returns -ENOMEDIUM for an
all-zero machine-id, causing it to crash-loop and the test
to hang on multi-user.target.
The substitution in melpa-packages.nix rewrote `"mozc_emacs_helper"` in
`mozc.el` to `${pkgs.ibus-engines.mozc}/lib/mozc/mozc_emacs_helper`,
but that path no longer exists.
Since the Bazel-based rewrite and the optional ibus split in #483843,
`mozc_emacs_helper` is installed at `$out/bin/` of the base `mozc` package,
while `$out/lib/mozc/` only contains `mozc_server`,
`mozc_renderer`, and `mozc_tool`.
As a result, `mozc.el` invoked a non-existent helper and `mozc-mode` failed to start with
> 変換エンジンプログラムの起動に失敗しました。
Switch the reference to `pkgs.mozc` so it points at the actual binary
location and avoids pulling in the IBus front-end for Emacs users.
Assisted-by: Claude Code (claude-opus-4-7)