### Manual repair of a slot whose PACKAGES index advertises a broken `Built` ### stamp (e.g. `Built: R 4.5.0; NA; ...`). # # uvr matches the stamp's platform triple plus R minor to decide binary vs # source, so an unusable triple turns a whole slot source-only. See # local/repair-built-stamp.R for why this patches PACKAGES.db in place instead # of forcing a full reparse. # # Run with `dry_run: true` first: it reports how many entries are broken per # slot and changes nothing. Pick the R version the slot should advertise, which # is the R_VERSION its entry in .crow/process-updates.yaml uses. variables: target_arch: description: 'Architecture of the slot to repair.' options: - amd64 - arm64 default: arm64 OS: description: 'Base OS image name.' options: - alpine - redhat - ubuntu default: alpine OS_VERSION: description: 'OS image tag. Must match OS (alpine: 3.22/3.23/3.24; redhat: 8/9/10; ubuntu: jammy/noble/resolute).' options: - '3.22' - '3.23' - '3.24' - '8' - '9' - '10' - 'jammy' - 'noble' - 'resolute' default: '3.22' R_VERSION: description: 'R version whose stamp the slot should advertise.' options: - 4.5.3 - 4.4.3 default: 4.5.3 dry_run: description: 'Report what would change without writing anything.' options: - 'true' - 'false' default: 'true' when: - event: manual evaluate: 'target_arch == "${ARCH}"' skip_clone: true labels: platform: linux/${ARCH} group: rpkgs-${ARCH} matrix: include: - ARCH: amd64 - ARCH: arm64 steps: - name: 'Repair Built stamp' image: 'reg.devxy.io/rpkgs/build-env-${OS}:${OS_VERSION}' pull: true environment: B2_S3_ACCESS_KEY: from_secret: B2_S3_ACCESS_KEY B2_S3_SECRET_KEY: from_secret: B2_S3_SECRET_KEY REPO_RO_TOKEN: from_secret: REPO_RO_TOKEN GIT_USER: pat-s commands: - git clone -q https://pat-s:$$REPO_RO_TOKEN@git.devxy.io/devxy/build-cran-binaries.git . - /opt/R/$R_VERSION/bin/Rscript local/install-bincraft.R - /opt/R/$R_VERSION/bin/R -q -e 'packageVersion("bincraft")' - | if [ "$dry_run" = "false" ]; then /opt/R/$R_VERSION/bin/Rscript local/repair-built-stamp.R "$ARCH" --apply else /opt/R/$R_VERSION/bin/Rscript local/repair-built-stamp.R "$ARCH" fi backend_options: docker: resources: requests: memory: 2Gi cpu: 1000m limits: memory: 8Gi cpu: 2000m