## Summary
Builds R-minor-sensitive CRAN packages once per installed R minor version (into per-minor S3 slots `…/contrib/<x.y>/`) and everything else once into the generic slot, driven by bincraft 4.2.0's ABI classifier. Both the full and iterative pipelines are covered.
## What's in here
**Detection / precompute**
- `local/r-minor-helpers.R` — pure `classify_from_metadata()` (NeedsCompilation / risky `LinkingTo`) + `parse_build_args()`, with unit tests.
- `local/packages-to-build.R` — adds a per-package `r_minor_sensitive` flag: cheap CRAN-metadata rules first, source download + `bincraft::needs_per_minor_recompile()` only for the ambiguous compiled subset (fail-safe to sensitive). Classified once per package, applied to all versions.
**Full build**
- `local/build-all.R` — passes the per-row `is_r_minor_sensitive` flag; new `--sensitive-only` mode builds just the risky subset.
- `.crow/build-all-versions-{amd64,arm64}.yaml` — install-deps persists the sensitive subset; build step runs a sensitive-only pass under each non-primary `/opt/R/*` minor; new step uploads the generic index plus a per-minor index for each minor.
**Iterative build**
- All 14 `.crow/process-updates-*.yaml` — primary pass uses `r_minor_detection = 'classifier'`; a sensitive-only multi-R pass builds risky updates under each other minor; per-minor index upload added.
**Tooling / housekeeping**
- Pins bincraft `v4.1.1` → `v4.2.0` across all workflows; removes the superseded standalone `build-r-minor-sensitive-packages.yaml`.
- Adds prek/pre-commit hooks (prettier, markdownlint, editorconfig-checker, yamllint, air) and applies them repo-wide; excludes the verbatim GPL `LICENSE.md` and auxiliary shell scripts.
- Design + implementation docs under `docs/superpowers/`.
## Requires before merge
- A `v4.2.0` git tag must be pushed on the bincraft repo (codefloe.com/rpkgs/bincraft) — the workflow install steps pin `@v4.2.0`. The full-build install-deps clones `main`, so it is unaffected.
Reviewed-on: #84
115 lines
3.3 KiB
R
115 lines
3.3 KiB
R
library(bincraft)
|
|
library(dplyr)
|
|
s3fs::s3_file_system(
|
|
aws_access_key_id = Sys.getenv("HETZNER_S3_ACCESS_KEY_K3S"),
|
|
aws_secret_access_key = Sys.getenv("HETZNER_S3_SECRET_KEY_K3S"),
|
|
endpoint = "https://hel1.your-objectstorage.com",
|
|
region_name = "hel1",
|
|
)
|
|
|
|
files <- s3fs::s3_dir_ls(sprintf(
|
|
"devxy-r-package-binaries-hel1/amd64/jammy/latest/src/contrib"
|
|
))
|
|
files <- s3fs::s3_dir_ls(sprintf(
|
|
"devxy-r-package-binaries-hel1/amd64/noble/latest/src/contrib"
|
|
))
|
|
files <- s3fs::s3_dir_ls(sprintf(
|
|
"devxy-r-package-binaries-hel1/amd64/rhel8/latest/src/contrib"
|
|
))
|
|
files <- s3fs::s3_dir_ls(sprintf(
|
|
"devxy-r-package-binaries-hel1/amd64/rhel9/latest/src/contrib"
|
|
))
|
|
files <- s3fs::s3_dir_ls(sprintf(
|
|
"devxy-r-package-binaries-hel1/amd64/alpine320/latest/src/contrib"
|
|
))
|
|
|
|
files <- s3fs::s3_dir_ls(sprintf(
|
|
"devxy-r-package-binaries-hel1/arm64/jammy/latest/src/contrib"
|
|
))
|
|
files <- s3fs::s3_dir_ls(sprintf(
|
|
"devxy-r-package-binaries-hel1/arm64/noble/latest/src/contrib"
|
|
))
|
|
files <- s3fs::s3_dir_ls(sprintf(
|
|
"devxy-r-package-binaries-hel1/arm64/rhel8/latest/src/contrib"
|
|
))
|
|
files <- s3fs::s3_dir_ls(sprintf(
|
|
"devxy-r-package-binaries-hel1/arm64/rhel9/latest/src/contrib"
|
|
))
|
|
files <- s3fs::s3_dir_ls(sprintf(
|
|
"devxy-r-package-binaries-hel1/arm64/alpine320/latest/src/contrib"
|
|
))
|
|
|
|
files_b = basename(files)
|
|
files_b_split = sapply(strsplit(basename(files_b), "_"), function(x) x[1])
|
|
files_b_split = setdiff(
|
|
files_b_split,
|
|
c("PACKAGES", "PACKAGES.gz", "PACKAGES.rds", "PACKAGES.db", "Archive")
|
|
)
|
|
# windows-only
|
|
files_b_split = setdiff(
|
|
files_b_split,
|
|
c(
|
|
"PACKAGES",
|
|
"PACKAGES.gz",
|
|
"PACKAGES.rds",
|
|
"PACKAGES.db",
|
|
"Archive",
|
|
"RInno",
|
|
"KeyboardSimulator",
|
|
"R2PPT",
|
|
"RWinEdt",
|
|
"blatr",
|
|
"excel.link",
|
|
"spectrino",
|
|
"taskscheduleR",
|
|
"MDSGUI",
|
|
"BiplotGUI",
|
|
"R2wd"
|
|
)
|
|
)
|
|
pkgs_index = available.packages(
|
|
"https://cran.devxy.io/amd64/jammy/latest/src/contrib"
|
|
)[, "Package"]
|
|
pkgs_index_b = basename(pkgs_index)
|
|
if (length(files_b_split) != length(pkgs_index_b)) {
|
|
pkgs_missing = setdiff(files_b_split, pkgs_index_b)
|
|
message("Packages missing in index but present in S3:")
|
|
pkgs_missing
|
|
formatted_pkgs <- gsub(
|
|
'"',
|
|
"'",
|
|
capture.output(dput(as.character(na.omit(pkgs_missing[1:900]))))
|
|
)
|
|
formatted_pkgs_one_line <- paste(formatted_pkgs, collapse = " ")
|
|
|
|
cat(formatted_pkgs_one_line, "\n", sep = "")
|
|
}
|
|
|
|
files <- s3fs::s3_dir_ls(sprintf(
|
|
"devxy-r-package-binaries-hel1/amd64/noble/latest/src/contrib"
|
|
))
|
|
files <- s3fs::s3_dir_ls(sprintf(
|
|
"devxy-r-package-binaries-hel1/amd64/rhel8/latest/src/contrib"
|
|
))
|
|
files <- s3fs::s3_dir_ls(sprintf(
|
|
"devxy-r-package-binaries-hel1/amd64/rhel9/latest/src/contrib"
|
|
))
|
|
files <- s3fs::s3_dir_ls(sprintf(
|
|
"devxy-r-package-binaries-hel1/amd64/alpine320/latest/src/contrib"
|
|
))
|
|
|
|
files <- s3fs::s3_dir_ls(sprintf(
|
|
"devxy-r-package-binaries-hel1/arm64/jammy/latest/src/contrib"
|
|
))
|
|
files <- s3fs::s3_dir_ls(sprintf(
|
|
"devxy-r-package-binaries-hel1/arm64/noble/latest/src/contrib"
|
|
))
|
|
files <- s3fs::s3_dir_ls(sprintf(
|
|
"devxy-r-package-binaries-hel1/arm64/rhel8/latest/src/contrib"
|
|
))
|
|
files <- s3fs::s3_dir_ls(sprintf(
|
|
"devxy-r-package-binaries-hel1/arm64/rhel9/latest/src/contrib"
|
|
))
|
|
files <- s3fs::s3_dir_ls(sprintf(
|
|
"devxy-r-package-binaries-hel1/arm64/alpine320/latest/src/contrib"
|
|
))
|