Commit Graph
2 Commits
Author SHA1 Message Date
shadowdaoandClaude Sonnet 5.5 ebe635501d pkgcache host: lock-free 'mode', atomic apply/revert file writes, shared repo lock
- health 'mode' took the 30 s flock and mkdir'd the state dir; a held lock gave an empty
  answer, which sync (OFF) read as 'not off' and reverted from the newest backup. mode is
  now read-only and lock-free.
- apply's rewrite() truncated repo files in place and revert used cp -a over the file;
  both now write a temp file and rename(2), so a concurrent dnf never sees half a file.
- apply/revert take the same lock as the health timer so a health run cannot rewrite
  repo files while they edit them.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0185ukXi4YX5FxJGqhi6qab6
2026-11-29 07:31:56 -08:00
shadowdaoandClaude Sonnet 5.5 b28e561387 feat(pkg-cache): host package cache is opt-in (default OFF) + origin fallback health check
- /etc/pkgcache-host.conf setting (PKGCACHE_ENABLED, PKGCACHE_URL, PKGCACHE_CA); no cache
  host is built into the tool. sync/apply/revert/status; status shows mode.
- pkgcache-host-health.sh + 5 min timer (installed only while ON): probes repomd.xml and
  .asc through the cache, 2 failures -> origin-only (reversible marker lines, atomic
  rename under flock), 3 successes -> cache-first. Both-down is not counted.
- scripts/tests/pkgcache-host.test.sh

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0185ukXi4YX5FxJGqhi6qab6
2026-11-29 07:23:46 -08:00