devxy/build-cran-binaries
Watch
1
0
Fork
You've already forked build-cran-binaries
0

Compare commits

..
Author SHA1 Message Date
981c55fce7 chore: remove plans and specs design docs
Drop the internal plans/ and specs/ design documents, the README link to the patching spec and their markdownlint ignores.
15h ago
5 changed files with 29 additions and 45 deletions

View file

@ -8,8 +8,8 @@ s3fs::s3_file_system(
refresh = T refresh = T
) )
arch <- "arm64" arch = "arm64"
os <- "alpine321" os = "alpine321"
files <- s3fs::s3_dir_ls(sprintf( files <- s3fs::s3_dir_ls(sprintf(
"devxy-r-package-binaries-hel1/%s/%s/latest/src/contrib", "devxy-r-package-binaries-hel1/%s/%s/latest/src/contrib",
@ -17,11 +17,11 @@ files <- s3fs::s3_dir_ls(sprintf(
os os
)) ))
length(unique(sapply(strsplit(basename(files), "_"), function(x) x[1]))) length(unique(sapply(strsplit(basename(files), "_"), function(x) x[1])))
non_archived <- unique(sapply(strsplit(basename(files), "_"), function(x) { non_archived = unique(sapply(strsplit(basename(files), "_"), function(x) {
x[1] x[1]
})[duplicated(sapply(strsplit(basename(files), "_"), function(x) x[1]))]) })[duplicated(sapply(strsplit(basename(files), "_"), function(x) x[1]))])
# RInno is not built because it only exists for Windows # RInno is not built because it only exists for Windows
non_archived <- setdiff(non_archived, "RInno") non_archived = setdiff(non_archived, "RInno")
# future::plan("sequential", workers = 8) # future::plan("sequential", workers = 8)
future::plan("sequential", workers = 1) future::plan("sequential", workers = 1)
# future.apply::future_lapply(non_archived, function(x) archive_package(x, codename = os, arch = arch)) # future.apply::future_lapply(non_archived, function(x) archive_package(x, codename = os, arch = arch))

View file

@ -1,30 +1,22 @@
### Scope: Check whether there are any incomplete entries in PACKAGES.rds. These will result in NA when calling available.packages() ### Scope: Check whether there are any incomplete entries in PACKAGES.rds. These will result in NA when calling available.packages()
foo <- available.packages( foo = available.packages("https://cran.devxy.io/amd64/jammy/latest/src/contrib")
"https://cran.devxy.io/amd64/jammy/latest/src/contrib"
)
sum((is.na(foo[, "Version"]))) sum((is.na(foo[, "Version"])))
which((is.na(foo[, "Version"]))) which((is.na(foo[, "Version"])))
foo <- available.packages( foo = available.packages("https://cran.devxy.io/amd64/noble/latest/src/contrib")
"https://cran.devxy.io/amd64/noble/latest/src/contrib"
)
sum((is.na(foo[, "Version"]))) sum((is.na(foo[, "Version"])))
which((is.na(foo[, "Version"]))) which((is.na(foo[, "Version"])))
foo <- available.packages( foo = available.packages("https://cran.devxy.io/amd64/rhel8/latest/src/contrib")
"https://cran.devxy.io/amd64/rhel8/latest/src/contrib"
)
sum((is.na(foo[, "Version"]))) sum((is.na(foo[, "Version"])))
which((is.na(foo[, "Version"]))) which((is.na(foo[, "Version"])))
foo <- available.packages( foo = available.packages("https://cran.devxy.io/amd64/rhel9/latest/src/contrib")
"https://cran.devxy.io/amd64/rhel9/latest/src/contrib"
)
sum((is.na(foo[, "Version"]))) sum((is.na(foo[, "Version"])))
which((is.na(foo[, "Version"]))) which((is.na(foo[, "Version"])))
foo <- available.packages( foo = available.packages(
"https://cran.devxy.io/amd64/alpine320/latest/src/contrib" "https://cran.devxy.io/amd64/alpine320/latest/src/contrib"
) )
sum((is.na(foo[, "Version"]))) sum((is.na(foo[, "Version"])))
@ -32,32 +24,24 @@ which((is.na(foo[, "Version"])))
# arm64 # arm64
foo <- available.packages( foo = available.packages("https://cran.devxy.io/arm64/jammy/latest/src/contrib")
"https://cran.devxy.io/arm64/jammy/latest/src/contrib"
)
sum((is.na(foo[, "Version"]))) sum((is.na(foo[, "Version"])))
which((is.na(foo[, "Version"]))) which((is.na(foo[, "Version"])))
foo <- available.packages( foo = available.packages("https://cran.devxy.io/arm64/noble/latest/src/contrib")
"https://cran.devxy.io/arm64/noble/latest/src/contrib"
)
sum((is.na(foo[, "Version"]))) sum((is.na(foo[, "Version"])))
which((is.na(foo[, "Version"]))) which((is.na(foo[, "Version"])))
foo <- available.packages( foo = available.packages("https://cran.devxy.io/arm64/rhel8/latest/src/contrib")
"https://cran.devxy.io/arm64/rhel8/latest/src/contrib"
)
sum((is.na(foo[, "Version"]))) sum((is.na(foo[, "Version"])))
which((is.na(foo[, "Version"]))) which((is.na(foo[, "Version"])))
foo <- available.packages( foo = available.packages("https://cran.devxy.io/arm64/rhel9/latest/src/contrib")
"https://cran.devxy.io/arm64/rhel9/latest/src/contrib"
)
sum((is.na(foo[, "Version"]))) sum((is.na(foo[, "Version"])))
which((is.na(foo[, "Version"]))) which((is.na(foo[, "Version"])))
foo <- available.packages( foo = available.packages(
"https://cran.devxy.io/arm64/alpine320/latest/src/contrib" "https://cran.devxy.io/arm64/alpine320/latest/src/contrib"
) )
sum((is.na(foo[, "Version"]))) sum((is.na(foo[, "Version"])))

View file

@ -1,7 +1,7 @@
library(future) library(future)
future::plan(multisession) future::plan(multisession)
future::plan(sequential) future::plan(sequential)
time <- Sys.time() time = Sys.time()
files <- s3fs::s3_dir_ls( files <- s3fs::s3_dir_ls(
sprintf( sprintf(
"devxy-r-package-binaries-hel1/arm64/rhel9/latest/src/contrib/Archive" "devxy-r-package-binaries-hel1/arm64/rhel9/latest/src/contrib/Archive"
@ -54,8 +54,8 @@ curl::curl_download(
"https://cran.devxy.io/amd64/rhel9/latest/src/contrib/PACKAGES.db", "https://cran.devxy.io/amd64/rhel9/latest/src/contrib/PACKAGES.db",
"PACKAGES.db" "PACKAGES.db"
) )
con <- DBI::dbConnect(RSQLite::SQLite(), "PACKAGES.db") con = DBI::dbConnect(RSQLite::SQLite(), "PACKAGES.db")
df <- DBI::dbReadTable(con, "packages") df = DBI::dbReadTable(con, "packages")
cranlike:::write_packages_files("/tmp", "PACKAGES.db") cranlike:::write_packages_files("/tmp", "PACKAGES.db")
@ -69,11 +69,11 @@ system("cat /tmp/PACKAGES | grep '^Package: digest' | wc -l")
curl::curl_fetch_memory( curl::curl_fetch_memory(
"https://cloud.r-project.org/src/contrib/Meta/archive.rds" "https://cloud.r-project.org/src/contrib/Meta/archive.rds"
) )
remotes <- readRDS(url( remotes = readRDS(url(
"https://cloud.r-project.org/src/contrib/Meta/archive.rds", "https://cloud.r-project.org/src/contrib/Meta/archive.rds",
"rb" "rb"
)) ))
packages <- readRDS(url( packages = readRDS(url(
"https://cran.devxy.io/arm64/noble/latest/src/contrib/PACKAGES.rds", "https://cran.devxy.io/arm64/noble/latest/src/contrib/PACKAGES.rds",
"rb" "rb"
)) ))

View file

@ -42,14 +42,14 @@ files <- s3fs::s3_dir_ls(sprintf(
"devxy-r-package-binaries-hel1/arm64/alpine320/latest/src/contrib" "devxy-r-package-binaries-hel1/arm64/alpine320/latest/src/contrib"
)) ))
files_b <- basename(files) files_b = basename(files)
files_b_split <- sapply(strsplit(basename(files_b), "_"), function(x) x[1]) files_b_split = sapply(strsplit(basename(files_b), "_"), function(x) x[1])
cran_pkgs <- tools::CRAN_package_db() |> cran_pkgs <- tools::CRAN_package_db() |>
filter(`Date/Publication` <= "2025-01-25") |> filter(`Date/Publication` <= "2025-01-25") |>
pull(Package) pull(Package)
pkgs <- setdiff(cran_pkgs, files_b_split) pkgs = setdiff(cran_pkgs, files_b_split)
formatted_pkgs <- gsub( formatted_pkgs <- gsub(
'"', '"',
"'", "'",

View file

@ -39,14 +39,14 @@ files <- s3fs::s3_dir_ls(sprintf(
"devxy-r-package-binaries-hel1/arm64/alpine320/latest/src/contrib" "devxy-r-package-binaries-hel1/arm64/alpine320/latest/src/contrib"
)) ))
files_b <- basename(files) files_b = basename(files)
files_b_split <- sapply(strsplit(basename(files_b), "_"), function(x) x[1]) files_b_split = sapply(strsplit(basename(files_b), "_"), function(x) x[1])
files_b_split <- setdiff( files_b_split = setdiff(
files_b_split, files_b_split,
c("PACKAGES", "PACKAGES.gz", "PACKAGES.rds", "PACKAGES.db", "Archive") c("PACKAGES", "PACKAGES.gz", "PACKAGES.rds", "PACKAGES.db", "Archive")
) )
# windows-only # windows-only
files_b_split <- setdiff( files_b_split = setdiff(
files_b_split, files_b_split,
c( c(
"PACKAGES", "PACKAGES",
@ -67,12 +67,12 @@ files_b_split <- setdiff(
"R2wd" "R2wd"
) )
) )
pkgs_index <- available.packages( pkgs_index = available.packages(
"https://cran.devxy.io/amd64/jammy/latest/src/contrib" "https://cran.devxy.io/amd64/jammy/latest/src/contrib"
)[, "Package"] )[, "Package"]
pkgs_index_b <- basename(pkgs_index) pkgs_index_b = basename(pkgs_index)
if (length(files_b_split) != length(pkgs_index_b)) { if (length(files_b_split) != length(pkgs_index_b)) {
pkgs_missing <- setdiff(files_b_split, pkgs_index_b) pkgs_missing = setdiff(files_b_split, pkgs_index_b)
message("Packages missing in index but present in S3:") message("Packages missing in index but present in S3:")
pkgs_missing pkgs_missing
formatted_pkgs <- gsub( formatted_pkgs <- gsub(