Initial Debian security mirror
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env python3
|
||||
import hashlib
|
||||
import json
|
||||
from pathlib import Path
|
||||
from sync import validate
|
||||
root = Path(__file__).resolve().parent.parent
|
||||
p = root / 'data/tracker.json'
|
||||
s = root / 'state/sync.json'
|
||||
raw = p.read_bytes()
|
||||
parsed = json.loads(raw)
|
||||
validate(parsed)
|
||||
meta = json.loads(s.read_text())
|
||||
assert hashlib.sha256(raw).hexdigest() == meta['sha256'], 'SHA256 stimmt nicht'
|
||||
print(f'OK: {len(parsed):,} Debian-Pakete; SHA256 geprüft')
|
||||
Reference in New Issue
Block a user