server/report-receiver/receiver.py takes what report sends to federated.sh/report, behind Caddy, and files each report as an issue in the private Federated_Computer/coredesktop-reports repository with the full log attached. It saves each report before replying and tries Gitea again later if it's down, limits how many reports one address can send, and refuses oversized logs, gzip bombs included. Standard library only. The README has the deployment steps: a Gitea user that can only file issues there, the systemd unit, and the Caddy route. make test runs its tests, which send reports with the real report client. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
16 lines
531 B
Makefile
16 lines
531 B
Makefile
# Every tracked file (not symlink) that starts with a bash or sh shebang (\043 is "#", which
|
|
# make would otherwise read as the start of a comment)
|
|
SCRIPTS := $(shell git ls-files -s | awk '$$1 != 120000 { print $$4 }' | xargs awk 'FNR == 1 && /^#!.*[\/ ](ba)?sh/ { print FILENAME }')
|
|
|
|
.PHONY: check lint test
|
|
|
|
check: lint test
|
|
|
|
# Errors and warnings only, for now; drop --severity to see style notes too
|
|
lint:
|
|
shellcheck --severity=warning $(SCRIPTS)
|
|
|
|
test:
|
|
bats tests
|
|
python3 -I -m unittest discover -s server/report-receiver
|