| 1 | """Write update-ca-certificates' default trust selections from the matching Vinix bundle.""" |
| 2 | from pathlib import Path |
| 3 | import os |
| 4 | |
| 5 | certs = Path(os.environ["VPAC_MAKEPKG_ROOT"]) / "usr/share/ca-certificates" |
| 6 | files = sorted(path.relative_to(certs).as_posix() for path in (certs / "mozilla").glob("*.crt")) |
| 7 | if "mozilla/ISRG_Root_X1.crt" not in files: |
| 8 | raise SystemExit("missing packaged Mozilla authorities") |
| 9 | Path("ca-certificates.conf").write_text("\n".join(files) + "\n") |
| 10 |