defpkgbuild(ca-certificates-bundle, #:pkgname, "ca-certificates-bundle", #:pkgver, "20261020", #:pkgrel, 2, #:pkgdesc, "Mozilla TLS certificate authorities for Vinix", #:arch, [#:any], #:url, "https://gitlab.alpinelinux.org/alpine/ca-certificates", #:license, "MPL-2.0", #:source, ["https://distfiles.alpinelinux.org/distfiles/v3.21/ca-certificates-20261020.tar.bz2"], #:sha256sums, ["1048bc7f50fa42a6621bc2f8816173f89a0c0098f26dff072bc8fe40af714400"], ; Generate the trust bundle from the pinned NSS certdata, using the same ; server-auth trust selection as Alpine. certdata.stamp also splits the PEMs. #:build, fn() { run("make", "-C", "ca-certificates-20261020", "certdata.stamp") ; libarchive also extracts this port under the bootstrap C locale. run("mv", "ca-certificates-20261020/NetLock_Arany_=Class_Gold=_Főtanúsítvány.crt", "ca-certificates-20261020/NetLock_Arany_Class_Gold.crt") }, #:check, fn() { run("grep", "-q", "^-----BEGIN CERTIFICATE-----$", "ca-certificates-20261020/cert.pem") run("test", "-f", "ca-certificates-20261020/ISRG_Root_X1.crt") }, #:package, fn() { run("install", "-Dm644", "ca-certificates-20261020/cert.pem", string-append(pkgdir(), "/etc/ssl/certs/ca-certificates.crt")) run("ln", "-s", "certs/ca-certificates.crt", string-append(pkgdir(), "/etc/ssl/cert.pem")) ; The Java trust-store builder also consumes the authorities individually. dest := string-append(pkgdir(), "/usr/share/ca-certificates/mozilla") run("mkdir", "-p", dest) for-each(fn(cert) { run("install", "-m644", cert, dest) }, glob("ca-certificates-20261020/*.crt")) })