- Switch every `metadata_db_sslmode` passed to bincraft in `.crow/` and `local/` from `require` to `verify-full`.
- Pass `sslrootcert = bincraft::postgres_sslrootcert("verify-full")` alongside `verify-full` in the scripts that call `DBI::dbConnect()` themselves, since libpq does not read the system trust store.
- Note in the README that the endpoint serves a Let's Encrypt certificate and how to verify it.
Part of rpkgs/bincraft#225.
44 lines
1.1 KiB
R
44 lines
1.1 KiB
R
### Lists packages without any successful binaries, i.e. pkgs for which all builds errored (per platform & arch)
|
|
library(DBI)
|
|
library(dplyr)
|
|
con <- DBI::dbConnect(
|
|
RPostgres::Postgres(),
|
|
dbname = "build_metadata",
|
|
host = "r-binaries.devxy.io",
|
|
port = 15432,
|
|
user = "r_binaries",
|
|
password = Sys.getenv("PGPASS"),
|
|
sslmode = "verify-full",
|
|
sslrootcert = bincraft::postgres_sslrootcert("verify-full")
|
|
)
|
|
|
|
cran_pkgs <- tools::CRAN_package_db() |>
|
|
filter(`Date/Publication` <= "2024-12-02") |>
|
|
pull(Package)
|
|
|
|
data <- dbGetQuery(
|
|
con,
|
|
"SELECT name,platform,arch,removed,error_occurred FROM single_builds;"
|
|
)
|
|
|
|
pkgs <- data |>
|
|
filter(platform == "alpine-320", arch == "arm64") |>
|
|
filter(removed == FALSE) |>
|
|
filter(error_occurred == FALSE) |>
|
|
distinct(name) |>
|
|
pull(name)
|
|
|
|
pkgs <- setdiff(cran_pkgs, pkgs)
|
|
# Format, remove line breaks, and print as a single line
|
|
formatted_pkgs <- gsub(
|
|
'"',
|
|
"'",
|
|
capture.output(dput(as.character(na.omit(pkgs[1:900]))))
|
|
)
|
|
|
|
formatted_pkgs_one_line <- paste(formatted_pkgs, collapse = " ")
|
|
|
|
cat(formatted_pkgs_one_line, "\n", sep = "")
|
|
length(pkgs)
|
|
|
|
clipr::write_clip(formatted_pkgs_one_line)
|