refactor: migrate package installation from pak to uvr
bincraft dropped pak in favour of uvr, so the pipelines, helper scripts and images in this repo move with it. - add local/uvr-install.sh as the single replacement for pak::pak(); it bootstraps a pinned uvr, mints a throwaway project under TMPDIR and runs `uvr add --no-install` + `uvr sync --library`, because `uvr add` refuses to run outside a project and only `sync` honours --library - install bincraft via its Forgejo spec (forgejo::codefloe.com/rpkgs/ bincraft@<tag>) instead of a git:: URL, keeping the git ls-remote tag resolution - pass UVR_R_BIN/UVR_TARGET_LIB from install-bincraft.R so the per-R-minor passes target their own R and library - replace R_PKG_CACHE_DIR with UVR_CACHE_DIR/UVR_PACKAGES_DIR on the persistent volume, preserving the amd64-off/arm64-on split - drop trim_pkgcache_metadata() and its test; uvr's cache does not grow the way pkgcache's _metadata dir did - let uvr install system requirements from its vendored r-system-requirements rules, replacing pak::sysreqs_db_update() - migrate the shiny app image, the alpine reprex and the CRAN loading test; ship uvr-install.sh in the build-one image - track the uvr pin with renovate
This commit is contained in:
parent
fe2289af56
commit
f3c18b6805
1 changed files with 327 additions and 245 deletions
19
README.md
19
README.md
|
|
@ -112,9 +112,9 @@ Processing updates with an existing database file takes around 5 minutes.
|
|||
|
||||
### Inferring System Dependencies
|
||||
|
||||
R package dependencies and their system dependencies are installed through {pak}.
|
||||
{pak} allows for parallel downloads and installation, significantly speeding up package installation compared to `install.packages()`.
|
||||
Additionally, it automatically infers package dependencies using JSON rules from [rstudio/r-system-requirements](https://github.com/rstudio/r-system-requirements).
|
||||
R package dependencies and their system dependencies are installed through [uvr](https://github.com/nbafrank/uvr).
|
||||
`uvr` allows for parallel downloads and installation, significantly speeding up package installation compared to `install.packages()`.
|
||||
Additionally, it automatically infers package dependencies using JSON rules vendored from [rstudio/r-system-requirements](https://github.com/rstudio/r-system-requirements).
|
||||
Not all R packages specify required system dependencies in their DESCRIPTION file, and not all listed dependencies have existing rules in `rstudio/r-system-requirements`.
|
||||
For Alpine, no rules existed until recently, establishing a foundation for semi-automated package installation on Alpine Linux.
|
||||
|
||||
|
|
@ -152,12 +152,13 @@ A Shiny dashboard providing a search functionality of the database and grouped s
|
|||
|
||||
Is supported by writing `Meta/archive.rds` during each package index update, listing all available archived packages.
|
||||
|
||||
### `pak::pak(package@version)`
|
||||
### `uvr add package@version`
|
||||
|
||||
`pak` searches for `Archive/<package>` and can install all versions it finds.
|
||||
Clients that resolve archived versions search for `Archive/<package>` and can install all versions they find.
|
||||
This holds for `uvr` as well as for older `pak`-based clients.
|
||||
|
||||
Ensure to use a clean cache if other repositories have been used previously.
|
||||
If in doubt or when testing, call `pak::meta_clean(force = TRUE)`.
|
||||
If in doubt or when testing, call `uvr cache clean`.
|
||||
|
||||
## Lessons Learned
|
||||
|
||||
|
|
@ -180,7 +181,7 @@ If in doubt or when testing, call `pak::meta_clean(force = TRUE)`.
|
|||
|
||||
## URL Composition and Platform Identifiers
|
||||
|
||||
Platform identifiers have been aligned with those used in <https://github.com/rstudio/r-system-requirements> to ensure proper recognition by the automatic syslib dependency installer of `pak`, specifically via the environment variable `PKG_SYSREQS_PLATFORM`:
|
||||
Platform identifiers have been aligned with those used in <https://github.com/rstudio/r-system-requirements>, which `uvr` vendors and uses for its automatic syslib dependency installer (`uvr sync --install-system-deps`):
|
||||
|
||||
- redhat-9
|
||||
- redhat-8
|
||||
|
|
@ -237,8 +238,8 @@ internal error 1 in memDecompress
|
|||
Solution:
|
||||
|
||||
```sh
|
||||
rm -rf /mnt/cache/R-pkgs/pak /mnt/cache/pkgcache/ /root/.cache/R/
|
||||
R -q -e 'install.packages("pak", repos = sprintf("https://r-lib.github.io/p/pak/stable/%s/%s/%s", .Platform$pkgType, R.Version()$os, R.Version()$arch))'
|
||||
uvr cache clean
|
||||
rm -rf /mnt/cache/uvr /root/.cache/R/
|
||||
```
|
||||
|
||||
</details>
|
||||
|
|
|
|||
Loading…
Reference in a new issue