defpkgbuild(ca-certificates, #:pkgname, "ca-certificates", #:pkgver, "20261020", #:pkgrel, 1, #:pkgdesc, "Update the system trust store and hash locally installed authorities", #:arch, [#:x86-64, #:aarch64], #:url, "https://gitlab.alpinelinux.org/alpine/ca-certificates", #:license, "MPL-2.0 AND MIT", #:depends, ["musl", "openssl", "busybox", "ca-certificates-bundle=20261020"], #:backup, ["etc/ca-certificates.conf"], #:source, ["https://distfiles.alpinelinux.org/distfiles/v3.21/ca-certificates-20261020.tar.bz2", "make-config.py", "certhash"], #:sha256sums, ["1048bc7f50fa42a6621bc2f8816173f89a0c0098f26dff072bc8fe40af714400", "10e3a6fbeca47340c6e50bff0cd06328f28a36161609fc0bd23d90a80e8e5bc8", "dcdcc8690bcb948d9cf90da1f3e6c504273bd13d560edc7482f141ff17acd76a"], #:build, fn() { run("make", "-C", "ca-certificates-20261020", "CC=vinix-cc", "update-ca-certificates", "c_rehash") run("python3", "make-config.py") }, #:check, fn() { root := get-environment-variable("VPAC_MAKEPKG_ROOT") run("mkdir", "checked") run("cp", string-append(root, "/usr/share/ca-certificates/mozilla/ISRG_Root_X1.crt"), "checked/test.crt") run("vinix-run", "ca-certificates-20261020/c_rehash", "checked") run("vinix-run", string-append(root, "/usr/bin/openssl"), "verify", "-no-CAfile", "-no-CAstore", "-no_check_time", "-CApath", "checked", "checked/test.crt") }, #:package, fn() { run("install", "-Dm755", "ca-certificates-20261020/update-ca-certificates", string-append(pkgdir(), "/usr/sbin/update-ca-certificates")) run("install", "-Dm755", "ca-certificates-20261020/c_rehash", string-append(pkgdir(), "/usr/bin/c_rehash")) run("install", "-Dm755", "certhash", string-append(pkgdir(), "/etc/ca-certificates/update.d/certhash")) run("install", "-Dm644", "ca-certificates.conf", string-append(pkgdir(), "/etc/ca-certificates.conf")) run("install", "-Dm644", "ca-certificates-20261020/update-ca-certificates.8", string-append(pkgdir(), "/usr/share/man/man8/update-ca-certificates.8")) run("mkdir", "-p", string-append(pkgdir(), "/usr/local/share/ca-certificates")) })