Repository navigation
feat(os): say where the system stands in its security support, read-only - #20
Merged
Merged
Conversation
…port table Debian and Ubuntu LTS only, by an ID that is exactly debian or ubuntu (ID_LIKE is never read). Seven dated entries, each with its sources and the vendor's extended programme as information. Evaluate says supported, ending_soon (180 days), security_ended or unknown, and answers unknown for a release that is not in the table, a codename that does not match, a clock before the table was written and any day 18 months after it.
…upport Read-only: /etc/os-release and the architecture, no apt, no network, no lock. Behind the token with the other /v1/sys routes.
One message per release and state (ending_soon, security_ended), looked at five minutes after the start and every day. The state is written to os-support.notified, atomically, before the message is raised: a restart can lose a message and never repeats one.
…went out The marker was written before the send, so a box with no channel (the default), with the Updates category off, or whose first send failed spent the one message of a state that lasts for months. raise now has a waiting form that says whether a channel took the message, and checkOSSupport writes the marker only then: otherwise the next daily look tries again. A crash between the send and the marker may tell a state once more.
…able is old Eighteen months after AsOf the table made every answer unknown, so a Debian 11 or Ubuntu 20.04 box that is still unpatched lost its badge, and its alert, at the moment it was oldest. Staleness now turns only supported and ending_soon into unknown, which a vendor can still move; security_ended stays, with its end day and source and without the extended programme and the next release, which are claims about a time the table has not been looked at for. The wrong clock guard (before AsOf) is unchanged. Also makes the Run test wait for the marker, which is now the last thing a look does.
Every Ubuntu date, the standard ones and the ESM ones, now has precision month, and Extended carries its own precision (day for Debian ELTS). The page the API cites (ubuntu.com/about/release-cycle) gives only a month for each of them, and Canonical's other pages disagree on the day and sometimes on the month; where they differ the earlier month is kept, the safe side for a warning. Ubuntu 22.04's end is now 2027-05-31 (the day before distro-info's 2027-06-01), so it reads 'around May 2027' as the cited page does, and its alert comes a day earlier. The other days are distro-info-data's, unchanged.
Raspberry Pi OS (64-bit, and Bookworm and later), Armbian, DietPi, Proxmox VE and OpenMediaVault say ID=debian and have no ID_LIKE, so the strict ID rule could not tell them from a plain Debian: they were known, badged, offered 'Debian 12 is the next release' and a Debian guide, and alerted. Describe now takes a way to look for files (the seam is service's markerExists, os.Stat on the box) and finds them by /etc/rpi-issue, /etc/armbian-release, /boot/dietpi.txt or /etc/dietpi, /usr/bin/pveversion or /etc/pve, and /etc/openmediavault or /usr/sbin/omv-confdbadm; Armbian is also told by its os-release PRETTY_NAME. A variant is known:false, with a variant field, no support, no next and no alert. The package comment, which said ID_LIKE made the identity strict, and the invented DietPi, OpenMediaVault and Proxmox fixtures are replaced by what the real files say.
…the test's list needs its lock go test -race found it in CI: two sends appended to the same slice.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
First rung of helping ReCasaOS users move off an operating system that has run out of support (Debian 11 has had no free security updates since 2026-08-31). Nothing here upgrades anything: it says, truthfully and read-only, where the system stands.
pkg/ossupport(standard library only): a strict identity from/etc/os-release(IDexactlydebianorubuntu;ID_LIKEis never read), a dated end-of-support table with its sources and anAsOfdate, andEvaluate:supported,ending_soon(180 days),security_ended,unknown. After 18 months the table stops answeringsupportedorending_soon(it may be wrong by then) but anendedstaysended; a clock beforeAsOfanswersunknown. Dates carry the precision the vendor gives (Ubuntu's pages give months).ID=debianorID=ubuntubut are not plain Debian or Ubuntu (Raspberry Pi OS, Armbian, DietPi, Proxmox VE, OpenMediaVault) are detected by their marker files and get no claim and no upgrade guidance.GET /v1/sys/osin the JWT group: no apt, no network. Debian 11 answerssecurity_ended,ends 2026-08-31, the vendor's extended programme, and the next release asreport(read-only).ending_soonorsecurity_ended, checked 5 minutes after start and every 24 hours. It is recorded as told only after a message went out: with no channel configured, with the Updates category off, or when the send fails, the next look tries again. The text says plainly that ReCasaOS cannot upgrade the operating system for you yet.Tests: parse and table boundaries (the day before, the day, the day after; 180 days; 18 months; month precision), every variant, the exact JSON of several identities, the alert (told once, again only when the state changes, not told when nothing went out, race of 32 goroutines), mutation checks. WSL test binaries for service, route and route/v1 pass.
Not verified on a real Debian or Ubuntu box yet: the measurement workflow of the installer repo records this route before and after an operating-system hop on four real guests.