-
Notifications
You must be signed in to change notification settings - Fork 21
feat: rvpm dist, package Raven apps into distributable artifacts #858
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
f7c06f4
feat: rvpm dist packages apps into tar, zip, deb, rpm, msi, and inno …
martian56 d76b374
fix: reject control characters in dist metadata and package version
martian56 adfa480
fix: msi backend targets WiX 3 only, matching the generated schema
martian56 02653b7
build: bump version to 2.20.0 for the rvpm dist release
martian56 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,87 @@ | ||
| # rvpm dist | ||
|
|
||
| `rvpm dist` builds the application in the current directory and packages it | ||
| into distributable artifacts. A Raven binary is a single static file, so | ||
| packaging is one staged file tree plus each format's own metadata, which | ||
| rvpm generates from the manifest. | ||
|
|
||
| ## Usage | ||
|
|
||
| ``` | ||
| rvpm dist [--target <t1,t2>] [--out-dir <dir>] | ||
| ``` | ||
|
|
||
| Targets: `tar`, `zip`, `deb`, `rpm`, `msi`, `inno`. `--target` overrides the | ||
| manifest's `[dist].targets`; without either, the host default applies | ||
| (`zip` on Windows, `tar` elsewhere). Libraries have no binary and are | ||
| rejected. | ||
|
|
||
| Artifacts land in `[dist].out_dir` (default `target/dist`), with a `work/` | ||
| scratch directory beside them holding the staging trees and generated | ||
| packaging files, which is useful when debugging a format. | ||
|
|
||
| ## The [dist] manifest section | ||
|
|
||
| Every field is optional; an absent section behaves like an empty one. | ||
|
|
||
| ```toml | ||
| [dist] | ||
| targets = ["deb", "zip"] # what plain `rvpm dist` produces | ||
| out_dir = "target/dist" | ||
| display_name = "Rook" # installer titles; default: package name | ||
| description = "A coding agent" # default: "<name> <version>" | ||
| license = "MIT" # rpm License, installers | ||
| homepage = "https://example.com" # deb Homepage, rpm URL, installers | ||
| maintainer = "Ada <ada@x.com>" # deb Maintainer; default: first author | ||
| vendor = "Acme" # rpm Vendor, msi Manufacturer; default: maintainer | ||
|
|
||
| [[dist.assets]] # extra files installed with the binary | ||
| source = "README.md" # read relative to the package root | ||
| dest = "share/doc/rook/README.md" # forward-slash path under the install prefix | ||
|
|
||
| [dist.linux] | ||
| depends = ["libc6 (>= 2.31)"] # deb Depends and rpm Requires, verbatim | ||
| section = "utils" # deb | ||
| priority = "optional" # deb | ||
|
|
||
| [dist.windows] | ||
| icon = "assets/rook.ico" # Inno Setup icon | ||
| upgrade_code = "9f0c86a1-2b3c-4d5e-8f90-112233445566" # msi upgrade GUID | ||
| ``` | ||
|
|
||
| Asset `source` and `dest` must be relative forward-slash paths with no `..` | ||
| components; the same containment rule `[ffi].sources` follows. The install | ||
| prefix per format: `/usr/` for deb and rpm (the binary goes to | ||
| `/usr/bin/<name>`), the archive root for tar and zip, and the application | ||
| folder for msi and inno. | ||
|
|
||
| ## Formats and their tools | ||
|
|
||
| rvpm generates each format's packaging text and shells out to the format's | ||
| own tool, the same approach dependency fetching takes with curl and tar. A | ||
| missing tool fails with an install hint. | ||
|
|
||
| | Target | Tool | Artifact | | ||
| |---|---|---| | ||
| | `tar` | tar | `<name>-<version>-<arch>.tar.gz`, top-level `<name>-<version>-<arch>/` directory | | ||
| | `zip` | bsdtar or zip | `<name>-<version>-<arch>.zip`, flat | | ||
| | `deb` | dpkg-deb | `<name>_<version>_<deb-arch>.deb` | | ||
| | `rpm` | rpmbuild | rpmbuild's own `<name>-<version>-1.<arch>.rpm` naming | | ||
| | `msi` | WiX 3 (candle, light) | `<name>-<version>-<arch>.msi` | | ||
| | `inno` | Inno Setup ISCC | `<name>-<version>-setup.exe` | | ||
|
|
||
| Version strings are normalized per format: a leading `v` is dropped | ||
| everywhere, rpm turns a `-` pre-release separator into `~`, and the msi | ||
| ProductVersion keeps only the numeric `X.Y.Z` prefix. | ||
|
|
||
| The msi upgrade GUID is what lets a newer installer replace an older | ||
| install. When `[dist.windows].upgrade_code` is not set, rvpm derives a | ||
| stable GUID from the package name and prints it with a note; pin it in the | ||
| manifest so it never changes by accident. | ||
|
|
||
| ## What is out of scope | ||
|
|
||
| Packages are not signed (deb signing, rpm signing, Authenticode are all | ||
| post-processing on the produced artifacts). Cross-format scripting hooks | ||
| (postinst and friends) and desktop shortcuts are not modeled yet. The | ||
| installers do not modify PATH. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.