Commit Graph
5 Commits
Author SHA1 Message Date
wickedyoda 2dc388a6df fix: repair APT keys before apt-get update in updates script
The script's first command was `sudo apt-get update` under `set -euo
pipefail`. On a system with a broken InfluxData repo, that command exits
100, so the script aborted at line 7 and never reached the InfluxData key
repair further down. The repair code could not run on exactly the systems
it existed to fix.

- Reorder: fetch and install keys before the first apt-get update.
- Drop -e so a failed update cannot abort key repair.
- Verify the fetched key's fingerprint before installing it; a mismatch is
  no longer installed after a warning.
- Reuse an existing keyring only if it contains the correct fingerprint;
  delete a stale/wrong keyring so it is refetched.
- Remove the [trusted=yes] fallback, which silently disabled signature
  verification. If no verifiable key is available, disable the repo
  instead.
- Detect VERSION_CODENAME for the Sury source instead of hardcoding
  bookworm, so trixie hosts get a valid suite.
- Fail loudly with the apt error if update still fails after repair.
2026-09-29 19:31:47 +00:00
WickedYodaandCopilot Autofix powered by AI a71faf5b9a Update keyring check to use -s instead of -f
Change condition to check if the keyring file is not empty before using it.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-09-19 16:57:06 -05:00
Jarvis 1e6b35f078 fix: make updates.sh path-independent and fix InfluxData keyring usage
- updates.sh: use BASH_SOURCE to find script dir, so fix_apt_influx.sh
  can be called from anywhere (was failing with 'command not found' when
  run from outside the updates_scripts directory)
- fix_apt_influx.sh: if key download fails but keyring already exists on
  disk, reuse it with [signed-by=] instead of falling back to
  [trusted=yes] which disables signature verification entirely
- Fixes: Missing key AC10D7449F343ADCEFDDC2B6DA61C26A0585BD3B error
  on Trixie when running updates.sh
2026-09-19 16:48:13 -05:00
WickedYodaandJarvis bcbe8b1d40 Fix InfluxDB APT key: add fallback sources and trusted=yes (#119)
* Fix InfluxDB APT key: add fallback sources and trusted=yes fallback

The key URL at repos.influxdata.com/influxdata-archive.key is intermittently
down. Add keyserver.ubuntu.com as fallback source. Use trusted=yes as last
resort if key fetch fails. Also correct keyring path to /usr/share/keyrings/
and remove Bookworm-specific comment.

* Fix shellcheck issues: remove duplicate shebang, fix cd error handling

---------

Co-authored-by: Jarvis <jarvis@wickedyoda.local>
2026-09-14 11:39:21 -05:00
WickedYoda 1e25e36ce6 Merge pull request #89 from wickedyoda/macos-update
Macos update
2026-08-05 13:20:24 -05:00