Add Linux RPM packaging to the official pipeline - #201
Add Linux RPM packaging to the official pipeline#201Mike Krüger (mkrueger) wants to merge 6 commits into
Conversation
Build framework-dependent x86_64 and aarch64 RPMs that require the .NET 10 runtime, validate their payload and Cloud Shell size limit, and document installation.
There was a problem hiding this comment.
Pull request overview
Adds first-class RPM packaging support to the official OneBranch pipeline so the CosmosDBShell CLI can be installed on RPM-based Linux distributions (including Azure Linux) via a framework-dependent RPM that depends on the preinstalled .NET 10 runtime.
Changes:
- Adds a governed Linux pipeline job that publishes
x86_64andaarch64framework-dependent builds and packages them as compressed RPMs, with size/dependency/path validation. - Introduces an RPM spec (
cosmosdbshell.spec) that installs the binary under/usr/libexecand exposes/usr/bin/cosmosdbshellvia a symlink. - Documents RPM installation and records the packaging change in the changelog.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| README.md | Documents installing CosmosDBShell via the pipeline-produced RPM artifacts. |
| packaging/rpm/cosmosdbshell.spec | Defines the RPM layout, runtime dependency, and installed file list. |
| CHANGELOG.md | Notes the new official RPM outputs and Cloud Shell size-limit validation. |
| .pipelines/CosmosDB-Shell-Official.yml | Adds a new governed Linux job to build, validate, and publish RPM artifacts. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
The build containers cannot reach the public Ubuntu archives, so installing the RPM tooling with apt-get failed. Azure Linux is RPM-native and resolves packages from packages.microsoft.com, which is reachable. Also disable RPM debuginfo extraction and binary stripping, which would corrupt the appended .NET single-file bundle.
Ship the ordinary framework-dependent publish output instead of a single-file bundle, so the package relies on the preinstalled .NET 10 runtime and does not extract itself at startup. Drop libmsalruntime.so, which ships only for linux-x64 and accounted for the entire size difference against linux-arm64.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.
Suppressed comments (1)
Previously missed (1) — in code that hasn't changed since the last review.
README.md:80
- The install example uses
dnf, but Azure Linux (called out in the text) typically usestdnf(and the official pipeline installs RPM tooling viatdnf). As written, the command is likely to fail on the primary target distro; consider documenting bothtdnf(Azure Linux / Cloud Shell) anddnf(other RPM distros).
sudo dnf install ./cosmosdbshell-<version>-<release>.<architecture>.rpm
cosmosdbshell
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.
Suppressed comments (1)
Previously missed (1) — in code that hasn't changed since the last review.
README.md:77
- The README implies these RPM artifacts can be installed on “other RPM-based distributions” with
dnf, but the package has a hard dependency ondotnet-runtime-10.0(from Microsoft’s RPM feeds / packages.microsoft.com). On distros without that repo configured,dnf installwill fail even if the .NET runtime was installed by other means. Consider clarifying the prerequisite (Microsoft .NET RPM repo enabled) so the installation steps are actionable.
The official pipeline produces framework-dependent RPMs for Azure Linux and
other RPM-based distributions:
- `cosmosdbshell-<version>-<release>.x86_64.rpm`
- `cosmosdbshell-<version>-<release>.aarch64.rpm`
Purpose
This PR adds small, framework-dependent RPM packages for internal Azure Cloud Shell deployment. They may also be useful in controlled CI environments that already provide the required runtime.
These RPMs are not intended as a general-purpose Linux distribution channel. Public/general installation should continue to use the supported distribution mechanisms documented by the project.
Packaging
x86_64andaarch64RPMs in the official pipelinedotnet-runtime-10.0)/usr/bin/cosmosdbshellcosmos_shell_rpmartifactNative MSAL runtime tradeoff
The RPM publish intentionally removes
libmsalruntime.so. That native library is available only forlinux-x64, would roughly double that package's size, and has nolinux-arm64equivalent.Without
libmsalruntime.so,VisualStudioCodeCredentialand its native MSAL broker flow do not work in these RPM builds. Other authentication paths remain available, including account keys, static tokens, managed identity, Azure CLI, browser/device-code flows, and the remainingDefaultAzureCredentialchain.The implementation makes this limitation explicit rather than relying on a runtime failure:
CosmosDBShellExcludeMsalRuntime=trueCOSMOSDBSHELL_NO_MSAL_RUNTIMEat compile timelibmsalruntime.sois accidentally includedValidation
libmsalruntime.so