fix(ci): pass the metadata DB to per-minor reindexes and fail on errors #234
22 changed files with 40 additions and 28 deletions
fix: verify the metadata database certificate with sslmode=verify-full (#235)
Part of https://codefloe.com/rpkgs/bincraft/issues/225. Stacked on #234. Every connection to the metadata database used `sslmode = 'require'`, which encrypts but does not authenticate the server, so anyone able to impersonate `r-binaries.devxy.io:15432` would receive `PGPASS`. ## Changes - `.crow/build-all-versions.yaml`, `process-updates.yaml`, `prune-stale-flat-binaries.yaml`, `reindex.yaml`, `weekly-rebuild-reindex.yaml`: `metadata_db_sslmode = 'verify-full'` in every bincraft call. - `local/*.R`: the same for bincraft calls; scripts that call `DBI::dbConnect()` directly also pass `sslrootcert = bincraft::postgres_sslrootcert("verify-full")`, because libpq looks for `~/.postgresql/root.crt` rather than the system trust store. - `README.md`: note that the endpoint serves a Let's Encrypt certificate and how to verify it. - air reformatted three `=` assignments to `<-` in `local/missing-cran-packages-db.R` and `local/packages-without-any-binary.R` while the hook ran on those files. ## Ordering: merge last 1. devxy/k8s-talos#417 must be live: today the server presents an in-cluster certificate from a private CA, which `verify-full` rejects. 2. https://codefloe.com/rpkgs/bincraft/pulls/226 must be released: `local/install-bincraft.R` installs the latest tag, and older releases neither pass a root certificate nor export `postgres_sslrootcert()`. 3. #234 must be merged. Merging early fails every database connection in CI, and since #234 per-minor reindex failures fail the pipeline. Reviewed-on: #235
commit
5c4cca6cce
|
|
@ -207,7 +207,7 @@ steps:
|
||||||
FAILED_MINORS=""
|
FAILED_MINORS=""
|
||||||
for RBIN in /opt/R/[0-9]*/bin/R; do
|
for RBIN in /opt/R/[0-9]*/bin/R; do
|
||||||
RMINOR=$(basename "$(dirname "$(dirname "$RBIN")")" | cut -d. -f1-2)
|
RMINOR=$(basename "$(dirname "$(dirname "$RBIN")")" | cut -d. -f1-2)
|
||||||
/opt/R/$R_VERSION/bin/R -q -e "bincraft::upload_package_index(codename = '$CODENAME', r_minor = '$RMINOR', s3_endpoint = 'https://s3.eu-central-003.backblazeb2.com', s3_region = 'eu-central-003', s3_bucket = 'devxy-rpkgs-binaries', s3_access_key_id = Sys.getenv('B2_S3_ACCESS_KEY'), s3_secret_access_key = Sys.getenv('B2_S3_SECRET_KEY'), metadata_db_host = 'r-binaries.devxy.io', metadata_db_name = 'build_metadata', metadata_db_port = 15432L, metadata_db_user = 'rpkgs', metadata_db_password = Sys.getenv('PGPASS'), metadata_db_sslmode = 'require')" || FAILED_MINORS="$FAILED_MINORS $RMINOR"
|
/opt/R/$R_VERSION/bin/R -q -e "bincraft::upload_package_index(codename = '$CODENAME', r_minor = '$RMINOR', s3_endpoint = 'https://s3.eu-central-003.backblazeb2.com', s3_region = 'eu-central-003', s3_bucket = 'devxy-rpkgs-binaries', s3_access_key_id = Sys.getenv('B2_S3_ACCESS_KEY'), s3_secret_access_key = Sys.getenv('B2_S3_SECRET_KEY'), metadata_db_host = 'r-binaries.devxy.io', metadata_db_name = 'build_metadata', metadata_db_port = 15432L, metadata_db_user = 'rpkgs', metadata_db_password = Sys.getenv('PGPASS'), metadata_db_sslmode = 'verify-full')" || FAILED_MINORS="$FAILED_MINORS $RMINOR"
|
||||||
done
|
done
|
||||||
if [ -n "$FAILED_MINORS" ]; then
|
if [ -n "$FAILED_MINORS" ]; then
|
||||||
echo "Could not republish the per-minor index for:$FAILED_MINORS" >&2
|
echo "Could not republish the per-minor index for:$FAILED_MINORS" >&2
|
||||||
|
|
|
||||||
|
|
@ -194,7 +194,7 @@ steps:
|
||||||
# rhel-10 ships xwfb-run (Xwayland) instead of xvfb-run; prefer it and start weston, else fall back to xvfb-run
|
# rhel-10 ships xwfb-run (Xwayland) instead of xvfb-run; prefer it and start weston, else fall back to xvfb-run
|
||||||
- XVFB=$(command -v xwfb-run 2>/dev/null || command -v xvfb-run); XVFB_ARGS="-a"; if command -v xwfb-run >/dev/null 2>&1; then dnf install -y -q weston 2>/dev/null; XVFB_ARGS="-c weston"; fi
|
- XVFB=$(command -v xwfb-run 2>/dev/null || command -v xvfb-run); XVFB_ARGS="-a"; if command -v xwfb-run >/dev/null 2>&1; then dnf install -y -q weston 2>/dev/null; XVFB_ARGS="-c weston"; fi
|
||||||
# options(future.globals.onReference = NULL): for some reason s3fs::file_delete() throws 'Error: Detected a non-exportable reference ('externalptr') in one of the globals ('FUN' of class 'function') used in the future expression' otherwise
|
# options(future.globals.onReference = NULL): for some reason s3fs::file_delete() throws 'Error: Detected a non-exportable reference ('externalptr') in one of the globals ('FUN' of class 'function') used in the future expression' otherwise
|
||||||
- $XVFB $XVFB_ARGS -- /opt/R/$R_VERSION/bin/R -q -e "options(crayon.enabled = TRUE, Ncpus = 4, future.globals.onReference = 'error', repos = structure(c(getOption('repos'),INLA='https://inla.r-inla-download.org/R/stable'))); progressr::handlers('cli'); progressr::handlers(global = TRUE); options(future.globals.onReference = NULL); bincraft::process_cran_updates(interval = $INTERVAL, platform = '${OS}', process_updated = TRUE, process_new = ${PROCESS_NEW}, process_removed = TRUE, patches = 'local/patches', r_minor_detection = 'classifier',s3_endpoint = 'https://s3.eu-central-003.backblazeb2.com', s3_region = 'eu-central-003', s3_bucket = 'devxy-rpkgs-binaries', s3_access_key_id = Sys.getenv('B2_S3_ACCESS_KEY'), s3_secret_access_key = Sys.getenv('B2_S3_SECRET_KEY'), metadata_db_host = 'r-binaries.devxy.io', metadata_db_name = 'build_metadata', metadata_db_table = 'single_builds', metadata_db_user = 'rpkgs', metadata_db_password = Sys.getenv('PGPASS'), metadata_db_sslmode = 'require', metadata_db_port = 15432, archive = TRUE, upload = TRUE, store_build_metadata = TRUE)"
|
- $XVFB $XVFB_ARGS -- /opt/R/$R_VERSION/bin/R -q -e "options(crayon.enabled = TRUE, Ncpus = 4, future.globals.onReference = 'error', repos = structure(c(getOption('repos'),INLA='https://inla.r-inla-download.org/R/stable'))); progressr::handlers('cli'); progressr::handlers(global = TRUE); options(future.globals.onReference = NULL); bincraft::process_cran_updates(interval = $INTERVAL, platform = '${OS}', process_updated = TRUE, process_new = ${PROCESS_NEW}, process_removed = TRUE, patches = 'local/patches', r_minor_detection = 'classifier',s3_endpoint = 'https://s3.eu-central-003.backblazeb2.com', s3_region = 'eu-central-003', s3_bucket = 'devxy-rpkgs-binaries', s3_access_key_id = Sys.getenv('B2_S3_ACCESS_KEY'), s3_secret_access_key = Sys.getenv('B2_S3_SECRET_KEY'), metadata_db_host = 'r-binaries.devxy.io', metadata_db_name = 'build_metadata', metadata_db_table = 'single_builds', metadata_db_user = 'rpkgs', metadata_db_password = Sys.getenv('PGPASS'), metadata_db_sslmode = 'verify-full', metadata_db_port = 15432, archive = TRUE, upload = TRUE, store_build_metadata = TRUE)"
|
||||||
- |
|
- |
|
||||||
PRIMARY_MINOR=$(echo "$R_VERSION" | cut -d. -f1-2)
|
PRIMARY_MINOR=$(echo "$R_VERSION" | cut -d. -f1-2)
|
||||||
for RBIN in /opt/R/[0-9]*/bin/R; do
|
for RBIN in /opt/R/[0-9]*/bin/R; do
|
||||||
|
|
@ -206,7 +206,7 @@ steps:
|
||||||
mkdir -p "$LIB"
|
mkdir -p "$LIB"
|
||||||
R_LIBS_USER="$LIB" "$(dirname "$RBIN")/Rscript" local/install-bincraft.R || true
|
R_LIBS_USER="$LIB" "$(dirname "$RBIN")/Rscript" local/install-bincraft.R || true
|
||||||
R_LIBS_USER="$LIB" UVR_R_BIN="$RBIN" local/uvr-install.sh RPostgres || true
|
R_LIBS_USER="$LIB" UVR_R_BIN="$RBIN" local/uvr-install.sh RPostgres || true
|
||||||
R_LIBS_USER="$LIB" $XVFB $XVFB_ARGS -- "$(dirname "$RBIN")/R" -q -e "options(crayon.enabled = TRUE, Ncpus = 4, future.globals.onReference = NULL); bincraft::process_cran_updates(interval = $INTERVAL, platform = '${OS}', process_updated = TRUE, process_new = FALSE, process_removed = FALSE, patches = 'local/patches', r_minor_detection = 'classifier',r_minor_sensitive_only = TRUE, s3_endpoint = 'https://s3.eu-central-003.backblazeb2.com', s3_region = 'eu-central-003', s3_bucket = 'devxy-rpkgs-binaries', s3_access_key_id = Sys.getenv('B2_S3_ACCESS_KEY'), s3_secret_access_key = Sys.getenv('B2_S3_SECRET_KEY'), metadata_db_host = 'r-binaries.devxy.io', metadata_db_name = 'build_metadata', metadata_db_table = 'single_builds', metadata_db_user = 'rpkgs', metadata_db_password = Sys.getenv('PGPASS'), metadata_db_sslmode = 'require', metadata_db_port = 15432, archive = TRUE, upload = TRUE, store_build_metadata = TRUE)" || true
|
R_LIBS_USER="$LIB" $XVFB $XVFB_ARGS -- "$(dirname "$RBIN")/R" -q -e "options(crayon.enabled = TRUE, Ncpus = 4, future.globals.onReference = NULL); bincraft::process_cran_updates(interval = $INTERVAL, platform = '${OS}', process_updated = TRUE, process_new = FALSE, process_removed = FALSE, patches = 'local/patches', r_minor_detection = 'classifier',r_minor_sensitive_only = TRUE, s3_endpoint = 'https://s3.eu-central-003.backblazeb2.com', s3_region = 'eu-central-003', s3_bucket = 'devxy-rpkgs-binaries', s3_access_key_id = Sys.getenv('B2_S3_ACCESS_KEY'), s3_secret_access_key = Sys.getenv('B2_S3_SECRET_KEY'), metadata_db_host = 'r-binaries.devxy.io', metadata_db_name = 'build_metadata', metadata_db_table = 'single_builds', metadata_db_user = 'rpkgs', metadata_db_password = Sys.getenv('PGPASS'), metadata_db_sslmode = 'verify-full', metadata_db_port = 15432, archive = TRUE, upload = TRUE, store_build_metadata = TRUE)" || true
|
||||||
# Also build current packages whose required dependency tree needs a newer R.
|
# Also build current packages whose required dependency tree needs a newer R.
|
||||||
R_LIBS_USER="$LIB" $XVFB $XVFB_ARGS -- "$(dirname "$RBIN")/Rscript" local/build-newer-r.R "$R_VERSION"
|
R_LIBS_USER="$LIB" $XVFB $XVFB_ARGS -- "$(dirname "$RBIN")/Rscript" local/build-newer-r.R "$R_VERSION"
|
||||||
done
|
done
|
||||||
|
|
@ -215,7 +215,7 @@ steps:
|
||||||
FAILED_MINORS=""
|
FAILED_MINORS=""
|
||||||
for RBIN in /opt/R/[0-9]*/bin/R; do
|
for RBIN in /opt/R/[0-9]*/bin/R; do
|
||||||
RMINOR=$(basename "$(dirname "$(dirname "$RBIN")")" | cut -d. -f1-2)
|
RMINOR=$(basename "$(dirname "$(dirname "$RBIN")")" | cut -d. -f1-2)
|
||||||
/opt/R/$R_VERSION/bin/R -q -e "library(bincraft); upload_package_index(codename = '${OS_ID}', r_minor = '$RMINOR', s3_endpoint = 'https://s3.eu-central-003.backblazeb2.com', s3_region = 'eu-central-003', s3_bucket = 'devxy-rpkgs-binaries', s3_access_key_id = Sys.getenv('B2_S3_ACCESS_KEY'), s3_secret_access_key = Sys.getenv('B2_S3_SECRET_KEY'), metadata_db_host = 'r-binaries.devxy.io', metadata_db_name = 'build_metadata', metadata_db_port = 15432L, metadata_db_user = 'rpkgs', metadata_db_password = Sys.getenv('PGPASS'), metadata_db_sslmode = 'require')" || FAILED_MINORS="$FAILED_MINORS $RMINOR"
|
/opt/R/$R_VERSION/bin/R -q -e "library(bincraft); upload_package_index(codename = '${OS_ID}', r_minor = '$RMINOR', s3_endpoint = 'https://s3.eu-central-003.backblazeb2.com', s3_region = 'eu-central-003', s3_bucket = 'devxy-rpkgs-binaries', s3_access_key_id = Sys.getenv('B2_S3_ACCESS_KEY'), s3_secret_access_key = Sys.getenv('B2_S3_SECRET_KEY'), metadata_db_host = 'r-binaries.devxy.io', metadata_db_name = 'build_metadata', metadata_db_port = 15432L, metadata_db_user = 'rpkgs', metadata_db_password = Sys.getenv('PGPASS'), metadata_db_sslmode = 'verify-full')" || FAILED_MINORS="$FAILED_MINORS $RMINOR"
|
||||||
done
|
done
|
||||||
if [ -n "$FAILED_MINORS" ]; then
|
if [ -n "$FAILED_MINORS" ]; then
|
||||||
echo "Could not republish the per-minor index for:$FAILED_MINORS" >&2
|
echo "Could not republish the per-minor index for:$FAILED_MINORS" >&2
|
||||||
|
|
|
||||||
|
|
@ -212,7 +212,7 @@ steps:
|
||||||
FAILED_MINORS=""
|
FAILED_MINORS=""
|
||||||
for RBIN in /opt/R/[0-9]*/bin/R; do
|
for RBIN in /opt/R/[0-9]*/bin/R; do
|
||||||
RMINOR=$(basename "$(dirname "$(dirname "$RBIN")")" | cut -d. -f1-2)
|
RMINOR=$(basename "$(dirname "$(dirname "$RBIN")")" | cut -d. -f1-2)
|
||||||
/opt/R/4.5.3/bin/R -q -e "library(bincraft); upload_package_index(r_minor = '$RMINOR', s3_endpoint = 'https://s3.eu-central-003.backblazeb2.com', s3_region = 'eu-central-003', s3_bucket = 'devxy-rpkgs-binaries', s3_access_key_id = Sys.getenv('B2_S3_ACCESS_KEY'), s3_secret_access_key = Sys.getenv('B2_S3_SECRET_KEY'), metadata_db_host = 'r-binaries.devxy.io', metadata_db_name = 'build_metadata', metadata_db_port = 15432L, metadata_db_user = 'rpkgs', metadata_db_password = Sys.getenv('PGPASS'), metadata_db_sslmode = 'require')" || FAILED_MINORS="$FAILED_MINORS $RMINOR"
|
/opt/R/4.5.3/bin/R -q -e "library(bincraft); upload_package_index(r_minor = '$RMINOR', s3_endpoint = 'https://s3.eu-central-003.backblazeb2.com', s3_region = 'eu-central-003', s3_bucket = 'devxy-rpkgs-binaries', s3_access_key_id = Sys.getenv('B2_S3_ACCESS_KEY'), s3_secret_access_key = Sys.getenv('B2_S3_SECRET_KEY'), metadata_db_host = 'r-binaries.devxy.io', metadata_db_name = 'build_metadata', metadata_db_port = 15432L, metadata_db_user = 'rpkgs', metadata_db_password = Sys.getenv('PGPASS'), metadata_db_sslmode = 'verify-full')" || FAILED_MINORS="$FAILED_MINORS $RMINOR"
|
||||||
done
|
done
|
||||||
if [ -n "$FAILED_MINORS" ]; then
|
if [ -n "$FAILED_MINORS" ]; then
|
||||||
echo "Could not republish the per-minor index for:$FAILED_MINORS" >&2
|
echo "Could not republish the per-minor index for:$FAILED_MINORS" >&2
|
||||||
|
|
|
||||||
|
|
@ -165,7 +165,7 @@ steps:
|
||||||
FAILED_MINORS=""
|
FAILED_MINORS=""
|
||||||
for RBIN in /opt/R/[0-9]*/bin/R; do
|
for RBIN in /opt/R/[0-9]*/bin/R; do
|
||||||
RMINOR=$(basename "$(dirname "$(dirname "$RBIN")")" | cut -d. -f1-2)
|
RMINOR=$(basename "$(dirname "$(dirname "$RBIN")")" | cut -d. -f1-2)
|
||||||
/opt/R/$R_VERSION/bin/R -q -e "library(bincraft); upload_package_index(r_minor = '$RMINOR', s3_endpoint = 'https://s3.eu-central-003.backblazeb2.com', s3_region = 'eu-central-003', s3_bucket = 'devxy-rpkgs-binaries', s3_access_key_id = Sys.getenv('B2_S3_ACCESS_KEY'), s3_secret_access_key = Sys.getenv('B2_S3_SECRET_KEY'), metadata_db_host = 'r-binaries.devxy.io', metadata_db_name = 'build_metadata', metadata_db_port = 15432L, metadata_db_user = 'rpkgs', metadata_db_password = Sys.getenv('PGPASS'), metadata_db_sslmode = 'require')" || FAILED_MINORS="$FAILED_MINORS $RMINOR"
|
/opt/R/$R_VERSION/bin/R -q -e "library(bincraft); upload_package_index(r_minor = '$RMINOR', s3_endpoint = 'https://s3.eu-central-003.backblazeb2.com', s3_region = 'eu-central-003', s3_bucket = 'devxy-rpkgs-binaries', s3_access_key_id = Sys.getenv('B2_S3_ACCESS_KEY'), s3_secret_access_key = Sys.getenv('B2_S3_SECRET_KEY'), metadata_db_host = 'r-binaries.devxy.io', metadata_db_name = 'build_metadata', metadata_db_port = 15432L, metadata_db_user = 'rpkgs', metadata_db_password = Sys.getenv('PGPASS'), metadata_db_sslmode = 'verify-full')" || FAILED_MINORS="$FAILED_MINORS $RMINOR"
|
||||||
done
|
done
|
||||||
if [ -n "$FAILED_MINORS" ]; then
|
if [ -n "$FAILED_MINORS" ]; then
|
||||||
echo "Could not republish the per-minor index for:$FAILED_MINORS" >&2
|
echo "Could not republish the per-minor index for:$FAILED_MINORS" >&2
|
||||||
|
|
|
||||||
|
|
@ -168,7 +168,7 @@ steps:
|
||||||
FAILED_MINORS=""
|
FAILED_MINORS=""
|
||||||
for RBIN in /opt/R/[0-9]*/bin/R; do
|
for RBIN in /opt/R/[0-9]*/bin/R; do
|
||||||
RMINOR=$(basename "$(dirname "$(dirname "$RBIN")")" | cut -d. -f1-2)
|
RMINOR=$(basename "$(dirname "$(dirname "$RBIN")")" | cut -d. -f1-2)
|
||||||
/opt/R/$R_VERSION/bin/R -q -e "library(bincraft); upload_package_index(r_minor = '$RMINOR', s3_endpoint = 'https://s3.eu-central-003.backblazeb2.com', s3_region = 'eu-central-003', s3_bucket = 'devxy-rpkgs-binaries', s3_access_key_id = Sys.getenv('B2_S3_ACCESS_KEY'), s3_secret_access_key = Sys.getenv('B2_S3_SECRET_KEY'), metadata_db_host = 'r-binaries.devxy.io', metadata_db_name = 'build_metadata', metadata_db_port = 15432L, metadata_db_user = 'rpkgs', metadata_db_password = Sys.getenv('PGPASS'), metadata_db_sslmode = 'require')" || FAILED_MINORS="$FAILED_MINORS $RMINOR"
|
/opt/R/$R_VERSION/bin/R -q -e "library(bincraft); upload_package_index(r_minor = '$RMINOR', s3_endpoint = 'https://s3.eu-central-003.backblazeb2.com', s3_region = 'eu-central-003', s3_bucket = 'devxy-rpkgs-binaries', s3_access_key_id = Sys.getenv('B2_S3_ACCESS_KEY'), s3_secret_access_key = Sys.getenv('B2_S3_SECRET_KEY'), metadata_db_host = 'r-binaries.devxy.io', metadata_db_name = 'build_metadata', metadata_db_port = 15432L, metadata_db_user = 'rpkgs', metadata_db_password = Sys.getenv('PGPASS'), metadata_db_sslmode = 'verify-full')" || FAILED_MINORS="$FAILED_MINORS $RMINOR"
|
||||||
done
|
done
|
||||||
if [ -n "$FAILED_MINORS" ]; then
|
if [ -n "$FAILED_MINORS" ]; then
|
||||||
echo "Could not republish the per-minor index for:$FAILED_MINORS" >&2
|
echo "Could not republish the per-minor index for:$FAILED_MINORS" >&2
|
||||||
|
|
|
||||||
|
|
@ -139,6 +139,7 @@ For Alpine, no rules existed until recently, establishing a foundation for semi-
|
||||||
|
|
||||||
The build metadata is stored in a PostgreSQL database.
|
The build metadata is stored in a PostgreSQL database.
|
||||||
The database has a public endpoint at `r-binaries.devxy.io` and port `15432`.
|
The database has a public endpoint at `r-binaries.devxy.io` and port `15432`.
|
||||||
|
It serves a Let's Encrypt certificate for that name, so connect with `sslmode=verify-full`; from R, pass `sslrootcert = bincraft::postgres_sslrootcert("verify-full")` as well, since libpq does not read the system trust store by default.
|
||||||
It contains one table named `single_builds`, which holds the build metadata for each package:
|
It contains one table named `single_builds`, which holds the build metadata for each package:
|
||||||
|
|
||||||
| package_name | tag | platform | error_occurred | build_timestamp | build_duration | error | size | removed |
|
| package_name | tag | platform | error_occurred | build_timestamp | build_duration | error | size | removed |
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ db <- list(
|
||||||
metadata_db_port = 15432L,
|
metadata_db_port = 15432L,
|
||||||
metadata_db_user = "rpkgs",
|
metadata_db_user = "rpkgs",
|
||||||
metadata_db_password = Sys.getenv("PGPASS"),
|
metadata_db_password = Sys.getenv("PGPASS"),
|
||||||
metadata_db_sslmode = "require"
|
metadata_db_sslmode = "verify-full"
|
||||||
)
|
)
|
||||||
|
|
||||||
read_index <- function(index_url) {
|
read_index <- function(index_url) {
|
||||||
|
|
|
||||||
|
|
@ -152,7 +152,8 @@ con <- DBI::dbConnect(
|
||||||
port = 15432,
|
port = 15432,
|
||||||
user = "rpkgs",
|
user = "rpkgs",
|
||||||
password = Sys.getenv("PGPASS"),
|
password = Sys.getenv("PGPASS"),
|
||||||
sslmode = "require"
|
sslmode = "verify-full",
|
||||||
|
sslrootcert = bincraft::postgres_sslrootcert("verify-full")
|
||||||
)
|
)
|
||||||
# Scope the skip to the R minor this pass is running under. `single_builds`
|
# Scope the skip to the R minor this pass is running under. `single_builds`
|
||||||
# records `r_version` per attempt, but querying without it made a non-primary
|
# records `r_version` per attempt, but querying without it made a non-primary
|
||||||
|
|
@ -250,7 +251,7 @@ mapply(
|
||||||
metadata_db_table = "single_builds",
|
metadata_db_table = "single_builds",
|
||||||
metadata_db_user = "rpkgs",
|
metadata_db_user = "rpkgs",
|
||||||
metadata_db_password = Sys.getenv("PGPASS"),
|
metadata_db_password = Sys.getenv("PGPASS"),
|
||||||
metadata_db_sslmode = "require",
|
metadata_db_sslmode = "verify-full",
|
||||||
metadata_db_port = 15432,
|
metadata_db_port = 15432,
|
||||||
archive = TRUE,
|
archive = TRUE,
|
||||||
patches = "local/patches",
|
patches = "local/patches",
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ if ("--dry-run" %in% args) {
|
||||||
metadata_db_name = "build_metadata",
|
metadata_db_name = "build_metadata",
|
||||||
metadata_db_user = "rpkgs",
|
metadata_db_user = "rpkgs",
|
||||||
metadata_db_password = Sys.getenv("PGPASS"),
|
metadata_db_password = Sys.getenv("PGPASS"),
|
||||||
metadata_db_sslmode = "require",
|
metadata_db_sslmode = "verify-full",
|
||||||
metadata_db_port = 15432
|
metadata_db_port = 15432
|
||||||
),
|
),
|
||||||
s3_endpoint = "https://s3.eu-central-003.backblazeb2.com",
|
s3_endpoint = "https://s3.eu-central-003.backblazeb2.com",
|
||||||
|
|
@ -61,7 +61,7 @@ if ("--dry-run" %in% args) {
|
||||||
metadata_db_table = "single_builds",
|
metadata_db_table = "single_builds",
|
||||||
metadata_db_user = "rpkgs",
|
metadata_db_user = "rpkgs",
|
||||||
metadata_db_password = Sys.getenv("PGPASS"),
|
metadata_db_password = Sys.getenv("PGPASS"),
|
||||||
metadata_db_sslmode = "require",
|
metadata_db_sslmode = "verify-full",
|
||||||
metadata_db_port = 15432,
|
metadata_db_port = 15432,
|
||||||
archive = TRUE,
|
archive = TRUE,
|
||||||
patches = "local/patches",
|
patches = "local/patches",
|
||||||
|
|
|
||||||
|
|
@ -115,7 +115,7 @@ for (ver in versions) {
|
||||||
metadata_db_table = "single_builds",
|
metadata_db_table = "single_builds",
|
||||||
metadata_db_user = "rpkgs",
|
metadata_db_user = "rpkgs",
|
||||||
metadata_db_password = Sys.getenv("PGPASS"),
|
metadata_db_password = Sys.getenv("PGPASS"),
|
||||||
metadata_db_sslmode = "require",
|
metadata_db_sslmode = "verify-full",
|
||||||
metadata_db_port = 15432
|
metadata_db_port = 15432
|
||||||
)
|
)
|
||||||
if (sensitive) touched_minor <- TRUE else touched_generic <- TRUE
|
if (sensitive) touched_minor <- TRUE else touched_generic <- TRUE
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,8 @@ con <- DBI::dbConnect(
|
||||||
port = 15432,
|
port = 15432,
|
||||||
user = "rpkgs",
|
user = "rpkgs",
|
||||||
password = Sys.getenv("PGPASS"),
|
password = Sys.getenv("PGPASS"),
|
||||||
sslmode = "require"
|
sslmode = "verify-full",
|
||||||
|
sslrootcert = bincraft::postgres_sslrootcert("verify-full")
|
||||||
)
|
)
|
||||||
on.exit(DBI::dbDisconnect(con), add = TRUE)
|
on.exit(DBI::dbDisconnect(con), add = TRUE)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,8 @@ con <- DBI::dbConnect(
|
||||||
port = 15432,
|
port = 15432,
|
||||||
user = "r_binaries",
|
user = "r_binaries",
|
||||||
password = Sys.getenv("PGPASS"),
|
password = Sys.getenv("PGPASS"),
|
||||||
sslmode = "require"
|
sslmode = "verify-full",
|
||||||
|
sslrootcert = bincraft::postgres_sslrootcert("verify-full")
|
||||||
)
|
)
|
||||||
|
|
||||||
pkgs_db <- query_metadata_table() |>
|
pkgs_db <- query_metadata_table() |>
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,8 @@ con <- DBI::dbConnect(
|
||||||
port = 15432L,
|
port = 15432L,
|
||||||
user = "rpkgs",
|
user = "rpkgs",
|
||||||
password = Sys.getenv("PGPASS"),
|
password = Sys.getenv("PGPASS"),
|
||||||
sslmode = "require"
|
sslmode = "verify-full",
|
||||||
|
sslrootcert = bincraft::postgres_sslrootcert("verify-full")
|
||||||
)
|
)
|
||||||
on.exit(try(DBI::dbDisconnect(con), silent = TRUE), add = TRUE)
|
on.exit(try(DBI::dbDisconnect(con), silent = TRUE), add = TRUE)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,8 @@ con <- DBI::dbConnect(
|
||||||
port = 15432,
|
port = 15432,
|
||||||
user = "r_binaries",
|
user = "r_binaries",
|
||||||
password = Sys.getenv("PGPASS"),
|
password = Sys.getenv("PGPASS"),
|
||||||
sslmode = "require"
|
sslmode = "verify-full",
|
||||||
|
sslrootcert = bincraft::postgres_sslrootcert("verify-full")
|
||||||
)
|
)
|
||||||
|
|
||||||
`%nin%` <- Negate(`%in%`)
|
`%nin%` <- Negate(`%in%`)
|
||||||
|
|
@ -45,12 +46,12 @@ data <- dbGetQuery(
|
||||||
"SELECT name FROM single_builds WHERE platform = $1 AND arch = $2 and removed = FALSE;",
|
"SELECT name FROM single_builds WHERE platform = $1 AND arch = $2 and removed = FALSE;",
|
||||||
params = list(platform, arch)
|
params = list(platform, arch)
|
||||||
)
|
)
|
||||||
removed_pkgs = get_removed_cran_packages(lubridate::interval(
|
removed_pkgs <- get_removed_cran_packages(lubridate::interval(
|
||||||
lubridate::today(),
|
lubridate::today(),
|
||||||
lubridate::today() - 2
|
lubridate::today() - 2
|
||||||
))$name
|
))$name
|
||||||
pkgs_db <- unique(data$name)
|
pkgs_db <- unique(data$name)
|
||||||
pkgs_db = setdiff(pkgs_db, removed_pkgs)
|
pkgs_db <- setdiff(pkgs_db, removed_pkgs)
|
||||||
|
|
||||||
pkgs <- setdiff(cran_pkgs, pkgs_db)
|
pkgs <- setdiff(cran_pkgs, pkgs_db)
|
||||||
formatted_pkgs <- gsub(
|
formatted_pkgs <- gsub(
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,8 @@ con <- DBI::dbConnect(
|
||||||
port = 15432,
|
port = 15432,
|
||||||
user = "rpkgs",
|
user = "rpkgs",
|
||||||
password = Sys.getenv("PGPASS"),
|
password = Sys.getenv("PGPASS"),
|
||||||
sslmode = "require"
|
sslmode = "verify-full",
|
||||||
|
sslrootcert = bincraft::postgres_sslrootcert("verify-full")
|
||||||
)
|
)
|
||||||
|
|
||||||
cran_archive <- tools::CRAN_archive_db()
|
cran_archive <- tools::CRAN_archive_db()
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,8 @@ con <- DBI::dbConnect(
|
||||||
port = 15432,
|
port = 15432,
|
||||||
user = "r_binaries",
|
user = "r_binaries",
|
||||||
password = Sys.getenv("PGPASS"),
|
password = Sys.getenv("PGPASS"),
|
||||||
sslmode = "require"
|
sslmode = "verify-full",
|
||||||
|
sslrootcert = bincraft::postgres_sslrootcert("verify-full")
|
||||||
)
|
)
|
||||||
|
|
||||||
cran_pkgs <- tools::CRAN_package_db() |>
|
cran_pkgs <- tools::CRAN_package_db() |>
|
||||||
|
|
@ -27,7 +28,7 @@ pkgs <- data |>
|
||||||
distinct(name) |>
|
distinct(name) |>
|
||||||
pull(name)
|
pull(name)
|
||||||
|
|
||||||
pkgs = setdiff(cran_pkgs, pkgs)
|
pkgs <- setdiff(cran_pkgs, pkgs)
|
||||||
# Format, remove line breaks, and print as a single line
|
# Format, remove line breaks, and print as a single line
|
||||||
formatted_pkgs <- gsub(
|
formatted_pkgs <- gsub(
|
||||||
'"',
|
'"',
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,8 @@ con <- DBI::dbConnect(
|
||||||
port = 15432,
|
port = 15432,
|
||||||
user = "rpkgs",
|
user = "rpkgs",
|
||||||
password = Sys.getenv("PGPASS"),
|
password = Sys.getenv("PGPASS"),
|
||||||
sslmode = "require"
|
sslmode = "verify-full",
|
||||||
|
sslrootcert = bincraft::postgres_sslrootcert("verify-full")
|
||||||
)
|
)
|
||||||
on.exit(DBI::dbDisconnect(con), add = TRUE)
|
on.exit(DBI::dbDisconnect(con), add = TRUE)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,8 @@ con <- DBI::dbConnect(
|
||||||
port = 15432,
|
port = 15432,
|
||||||
user = "rpkgs",
|
user = "rpkgs",
|
||||||
password = Sys.getenv("PGPASS"),
|
password = Sys.getenv("PGPASS"),
|
||||||
sslmode = "require"
|
sslmode = "verify-full",
|
||||||
|
sslrootcert = bincraft::postgres_sslrootcert("verify-full")
|
||||||
)
|
)
|
||||||
on.exit(DBI::dbDisconnect(con), add = TRUE)
|
on.exit(DBI::dbDisconnect(con), add = TRUE)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,8 @@ if (length(explicit) > 0L) {
|
||||||
port = 15432L,
|
port = 15432L,
|
||||||
user = "rpkgs",
|
user = "rpkgs",
|
||||||
password = Sys.getenv("PGPASS"),
|
password = Sys.getenv("PGPASS"),
|
||||||
sslmode = "require"
|
sslmode = "verify-full",
|
||||||
|
sslrootcert = bincraft::postgres_sslrootcert("verify-full")
|
||||||
)
|
)
|
||||||
on.exit(try(DBI::dbDisconnect(con), silent = TRUE), add = TRUE)
|
on.exit(try(DBI::dbDisconnect(con), silent = TRUE), add = TRUE)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -171,7 +171,7 @@ for (i in seq_along(mine)) {
|
||||||
metadata_db_table = "single_builds",
|
metadata_db_table = "single_builds",
|
||||||
metadata_db_user = "rpkgs",
|
metadata_db_user = "rpkgs",
|
||||||
metadata_db_password = Sys.getenv("PGPASS"),
|
metadata_db_password = Sys.getenv("PGPASS"),
|
||||||
metadata_db_sslmode = "require",
|
metadata_db_sslmode = "verify-full",
|
||||||
metadata_db_port = 15432,
|
metadata_db_port = 15432,
|
||||||
archive = TRUE,
|
archive = TRUE,
|
||||||
upload = TRUE,
|
upload = TRUE,
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue