rig ppm

Posit Package Manager information.

PPM server

By default rig reports on the public PPM instance at https://packagemanager.posit.co. Set the PACKAGEMANAGER_ADDRESS environment variable to the base URL of your own PPM instance to report on that instead. rig ppm url prints whichever one is in effect.

For now rig ppm builds ignores this environment variable and reads a package build index derived from the public instance.

Subcommands

build-log
Show the PPM build log for a package
builds
List the published builds of a package
platforms
List the platforms Posit Package Manager builds for
r-versions
List the R versions Posit Package Manager builds for
status
Show the Posit Package Manager status report
url
Print the Posit Package Manager URL

rig ppm build-log

Fetch Posit Package Manager’s build log for one CRAN package.

--platform and --arch name the build target to look up: --platform is a PPM target name such as macos, windows, or a Linux codename like jammy (run rig ppm platforms or rig ppm builds to see the names PPM uses). --platform also takes a rig platform string, e.g. x86_64-unknown-linux-gnu-ubuntu-22.04, which names the arch, too (see rig system detect-platform).

--r-version defaults to rig’s default R version (rig default), trimmed to a minor version (4.6.1 becomes 4.6) since that is all PPM accepts; pass it explicitly to ask about a different one. --version restricts the log to one package version; without it PPM reports the log for the latest version it knows.

Currently PPM has no way to ask for the log of a specific historical build. If package version has multiple builds, then the log of the last one is shown.

Usage

rig ppm build-log [OPTIONS] <package>

Arguments

<package>
package whose build log to show

Options

--admin
Run in admin mode (overrides RIG_MODE and config)
-a, --arch <arch>
CPU architecture (default: the current architecture)
-h, --help
Print help (see a summary with ‘-h’)
--json
JSON output
--no-cache
Do not read or write rig’s cache (overrides RIG_NO_CACHE and config)
-p, --platform <platform>
P3M build target, e.g. macos, windows, jammy (see rig ppm builds); default: the current platform
-r, --r-version <r-version>
R version the build is for (default: the default R version)
--user
Run in user mode (overrides RIG_MODE and config)
-v, --version <version>
package version (default: latest)

Examples

# The current platform, architecture and default R version
rig ppm build-log pak
# A specific target and package version
rig ppm build-log dplyr --platform noble --r-version 4.6 --version 1.2.1

rig ppm builds

List every source and binary artifact Posit Package Manager has published for one R package. Use --version to restrict the listing to a single package version.

The date is extracted from Posit Public Package Manager and it is not affected by the PACKAGEMANAGER_ADDRESS environment variable.

The columns

  • version: the package version, as published.

  • platform: source for the CRAN source tarball, otherwise the build target: macos, windows, or a Linux target name such as jammy. rig ppm platforms lists the target names.

  • arch, r_version: the architecture and minor R version the binary is for. Both are * on a source row, which is architecture- and version-independent.

  • linkingto: the package versions the binary was compiled against, for packages with a LinkingTo: field. This column is what tells otherwise identical rows apart. PPM republishes a binary when a compiled-against dependency changes, so the same version, platform, architecture and R version can legitimately have several builds; linkingto is the only difference between them.

  • url: where to download that artifact. The date in the URL is the CRAN snapshot the build was published against.

--json output adds a sha256 for each row, and for each linkingto entry: it is the hash of the original CRAN source tarball, and not the hash what the URL serves.

Usage

rig ppm builds [OPTIONS] <package>

Arguments

<package>
package to list the builds of

Options

--admin
Run in admin mode (overrides RIG_MODE and config)
-h, --help
Print help (see a summary with ‘-h’)
--json
JSON output
--no-cache
Do not read or write rig’s cache (overrides RIG_NO_CACHE and config)
--user
Run in user mode (overrides RIG_MODE and config)
-v, --version <version>
package version to list (default: all)

Examples

# Every build of a package, latest version last
rig ppm builds cli
# Just one version
rig ppm builds dplyr --version 1.1.4
# The builds for one R version and platform
rig ppm builds dplyr --json |
  jq '.[] | select(.r_version == "4.5" and .platform == "jammy")'

rig ppm platforms

List the build targets Posit Package Manager currently offers.

Add --all to list retired targets as well, with a hidden column marking which is which. --all applies to --json as well.

The columns

  • name: PPM’s name for the entry.

  • os: linux, macos or windows.

  • platform: the name this target goes by in a package’s build index, so this is the value to match against the platform column of rig ppm builds . Several entries can share one: CentOS 7 and RHEL 7 both use the centos7 binaries.

  • distribution, release: the distribution PPM builds the target on, which is not always the one it serves. The rhel9 target is built on Rocky Linux, so its distribution is rockylinux.

  • arch: the architectures this target is built for. Most Linux targets are x86_64 only.

  • binaries: whether PPM builds binary packages for the target at all. Where this is off, the target is still served, from source.

  • hidden: only shown with --all: set on the targets PPM no longer advertises, i.e. retired distribution releases. Their binaries stay downloadable, which is why they can be listed at all.

Usage

rig ppm platforms [OPTIONS]

Options

--admin
Run in admin mode (overrides RIG_MODE and config)
--all
Also list the platforms P3M has retired
-h, --help
Print help (see a summary with ‘-h’)
--json
JSON output
--no-cache
Do not read or write rig’s cache (overrides RIG_NO_CACHE and config)
--user
Run in user mode (overrides RIG_MODE and config)

rig ppm r-versions

List the minor R versions Posit Package Manager builds binary packages for, newest first, one per line.

Usage

rig ppm r-versions [OPTIONS]

Options

--admin
Run in admin mode (overrides RIG_MODE and config)
-h, --help
Print help (see a summary with ‘-h’)
--json
JSON output
--no-cache
Do not read or write rig’s cache (overrides RIG_NO_CACHE and config)
--user
Run in user mode (overrides RIG_MODE and config)

rig ppm status

Show the full status report of a Posit Package Manager instance: what it is and what it is configured for, then the R versions, build targets, Bioconductor releases and macOS build flavors it serves.

The report

The report shows an initial block and then four tables:

  • R versions: the minor R versions binaries are built for. Same list as rig ppm r-versions .

  • Build targets: the platforms, as reported, retired ones included. Same table as rig ppm platforms --all , which documents the columns.

  • Bioconductor versions: each Bioconductor release, the R version it goes with, and the CRAN snapshot it is pinned to.

  • macOS binaries: the macOS build flavor used for each R version, per architecture. default is what a newer R version gets. An empty cell means there are no macOS binaries for that R version and architecture.

An instance may report fields rig does not show. Use --json to see the status document in full; nothing is dropped from it.

This command does not cache information from PPM, it always performs an HTTP query.

Which server

https://packagemanager.posit.co by default, or the instance PACKAGEMANAGER_ADDRESS names. RIG_PPM_STATUS_URL overrides the URL of the status document alone and wins over PACKAGEMANAGER_ADDRESS; the report’s first line shows the URL actually used.

Usage

rig ppm status [OPTIONS]

Options

--admin
Run in admin mode (overrides RIG_MODE and config)
-h, --help
Print help (see a summary with ‘-h’)
--json
JSON output
--no-cache
Do not read or write rig’s cache (overrides RIG_NO_CACHE and config)
--user
Run in user mode (overrides RIG_MODE and config)

Examples

# The public instance
rig ppm status
# Your own instance
PACKAGEMANAGER_ADDRESS=https://ppm.example.com rig ppm status
# The complete status document, including fields rig does not display
rig ppm status --json

rig ppm url

Print the base URL of the Posit Package Manager instance the other rig ppm commands report on, and nothing else, so it can be used directly in a script:

curl "$(rig ppm url)/__api__/repos"

This is https://packagemanager.posit.co unless the PACKAGEMANAGER_ADDRESS environment variable is set, in which case it is that, with any trailing slash removed.

Usage

rig ppm url [OPTIONS]

Options

--admin
Run in admin mode (overrides RIG_MODE and config)
-h, --help
Print help (see a summary with ‘-h’)
--json
JSON output
--no-cache
Do not read or write rig’s cache (overrides RIG_NO_CACHE and config)
--user
Run in user mode (overrides RIG_MODE and config)