native-packages 0.6.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,206 @@
1
+ ---
2
+ title: Command reference
3
+ description: Look up native-packages commands, options, and examples for building, publishing, and managing recipes.
4
+ nav_order: 2
5
+ ---
6
+
7
+ # Command reference
8
+
9
+ Run commands from your application's directory. To select another configuration:
10
+
11
+ ```sh
12
+ native-packages --config packaging/native-packages.yaml COMMAND
13
+ ```
14
+
15
+ Use `native-packages --help` for a summary and `native-packages --version` for
16
+ the installed tool version. The examples below use app version `1.2.3`.
17
+
18
+ ## init
19
+
20
+ Create `native-packages.yaml`:
21
+
22
+ ```sh
23
+ native-packages init
24
+ native-packages init --interactive
25
+ native-packages init --name hello --input dist/hello.tar.gz --formats deb,rpm
26
+ ```
27
+
28
+ The default is a Linux amd64 template. Setup uses available Cargo and Git
29
+ metadata. Review the inputs, library type, dependencies, and metadata before
30
+ building. Existing configuration is never overwritten. Interactive setup
31
+ requires a terminal and is unavailable in CI.
32
+
33
+ ## validate
34
+
35
+ ```sh
36
+ native-packages validate
37
+ ```
38
+
39
+ Validate the configuration and render templates with placeholder values to
40
+ catch unknown tokens. This does not require actual build inputs or run hooks.
41
+
42
+ ## doctor
43
+
44
+ ```sh
45
+ native-packages doctor
46
+ native-packages doctor --target linux-amd64 --format deb
47
+ native-packages doctor --target macos-arm64 --defer-recipes
48
+ native-packages doctor --release v1.2.3
49
+ ```
50
+
51
+ Check configuration and required tools for selected targets. Repeat `--target`
52
+ and `--format` for several selections. `--defer-recipes` omits recipe tools;
53
+ `--release` also checks for the download tool. Actual input and package checks
54
+ happen during `build`.
55
+
56
+ ## build
57
+
58
+ ```sh
59
+ native-packages build --version 1.2.3
60
+ native-packages build --release v1.2.3
61
+ ```
62
+
63
+ | Option | Effect |
64
+ | --- | --- |
65
+ | `--version VERSION` | Set app version and use local inputs, unless `--release` is also present. |
66
+ | `--release TAG` | Download checked release inputs and use the tag's version. |
67
+ | `--target ID` | Select a target; repeat for several. |
68
+ | `--format FORMAT` | Select an output format; repeat for several. |
69
+ | `--output DIRECTORY` | Choose a new output directory. Default: `dist/packages/<version>`. |
70
+ | `--dry-run` | Print the plan without downloading, building, or executing hooks. |
71
+ | `--defer-recipes` | Build packages without acquiring global recipe assets or rendering templates. |
72
+
73
+ With neither version option, an exact supported release tag must exist at
74
+ `HEAD`. Supplying both requires matching versions. See
75
+ [Building packages](../_guides/building-packages.md).
76
+
77
+ ## aggregate
78
+
79
+ Combine build directories into a new output:
80
+
81
+ ```sh
82
+ native-packages aggregate dist/linux dist/macos dist/windows --output dist/complete
83
+ ```
84
+
85
+ `--output` is required. All inputs must have matching configuration, version,
86
+ and timestamp. The result must include every configured target and format.
87
+
88
+ For inputs made with `build --defer-recipes`, add `--finalize-recipes` to
89
+ render recipes using completed package hashes and remaining local assets.
90
+ See [Building across platforms](../_guides/multi-platform.md).
91
+
92
+ ## publish a build
93
+
94
+ ```sh
95
+ native-packages publish --from dist/packages/1.2.3 --to github
96
+ native-packages publish --from dist/linux --to github --target linux-amd64
97
+ ```
98
+
99
+ `--from` selects the build directory; `--to` lists destinations separated by
100
+ commas. `github` uploads release assets. Other names select entries or groups
101
+ in `repositories`.
102
+
103
+ The build must be complete and its recorded files unmodified. Repeated
104
+ `--target` options require exactly those targets, with all their formats.
105
+ Without target selection, all configured targets are required. There is no
106
+ publication `--format` or `--dry-run` option.
107
+
108
+ See [Publishing a release](../_guides/publishing.md) for release setup and
109
+ upload behavior.
110
+
111
+ ## Manage downstream recipes
112
+
113
+ | Command | Effect |
114
+ | --- | --- |
115
+ | `repositories` | List configured downstream destinations. |
116
+ | `stage TARGET DIRECTORY` | Stage generated recipes in the destination's local checkout. |
117
+ | `diff TARGET` | Show the staged changes. |
118
+ | `publish TARGET` | Commit and publish the staged update. |
119
+ | `status [TARGET]` | Query downstream versions and open requests; defaults to all. |
120
+
121
+ Here, `TARGET` means a repository destination or group, such as `aur`. It is
122
+ different from a build target such as `linux-amd64`.
123
+
124
+ For example:
125
+
126
+ ```sh
127
+ native-packages stage aur dist/packages/1.2.3/recipes
128
+ native-packages diff aur
129
+ native-packages publish aur
130
+ native-packages status aur --offline --json
131
+ ```
132
+
133
+ `status --offline` reads cached information; `--json` prints structured output.
134
+ Status exits unsuccessfully when a remote or request check fails.
135
+
136
+ For GitHub PR or GitLab MR destinations, `publish` requires `--body-file FILE`
137
+ with the reviewed submission description. It can also be used with
138
+ `publish --from ... --to DESTINATION`. Publish submission destinations
139
+ individually. See [Distribution recipes](../_guides/distribution-recipes.md).
140
+
141
+ ## notarize-macos
142
+
143
+ ```sh
144
+ native-packages notarize-macos portable-input --output signed/hello
145
+ ```
146
+
147
+ Copy a prepared macOS directory and, when Apple credentials are configured,
148
+ sign and notarize the copy. `--output` is required, must be new, and must be
149
+ outside the input. This command needs no project configuration. See
150
+ [Apple signing and notarization](../_guides/apple-notarization.md).
151
+
152
+ ## Release checksums and signatures
153
+
154
+ ```sh
155
+ native-packages release-checksums dist/release --output dist/release/checksums.txt
156
+ native-packages sign-checksums dist/release/checksums.txt --public-key assets/update-public-key.hex
157
+ native-packages verify-checksums dist/release/checksums.txt --public-key assets/update-public-key.hex
158
+ ```
159
+
160
+ These commands need no project configuration. Generation requires a nonempty,
161
+ flat directory of regular files and a new output file in that directory.
162
+ Signing checks every listed artifact before writing a new `checksums.txt.sig`.
163
+ Verification requires both a valid signature and matching artifact hashes.
164
+
165
+ The signing key comes from `NATIVE_PACKAGES_SIGNING_KEY`, or the environment
166
+ variable named by `--key-env VARIABLE`. Pass only the variable's name on the
167
+ command line, never its secret value. The public-key file contains 64 hex digits.
168
+ See [Release signatures and attestations](../_guides/release-signing.md).
169
+
170
+ ## migrate
171
+
172
+ ```sh
173
+ native-packages migrate --dry-run
174
+ native-packages migrate
175
+ ```
176
+
177
+ Preview or create a single configuration from the legacy `packaging/project.yml`
178
+ setup. Existing packaging files are preserved.
179
+
180
+ ## check-version
181
+
182
+ ```sh
183
+ native-packages check-version v1.2.3
184
+ ```
185
+
186
+ Validate a stable tag and, when `version_file` is configured, compare it with
187
+ the application's Cargo manifest version. Set `version_section` for workspace
188
+ manifests.
189
+
190
+ ## Select an installed tool version
191
+
192
+ If several gem versions are installed, RubyGems lets you select the one required
193
+ by the configuration:
194
+
195
+ ```sh
196
+ native-packages _0.7.0_ build --version 1.2.3
197
+ ```
198
+
199
+ Bundler also works if you prefer to manage the gem in a Gemfile.
200
+
201
+ ## Legacy commands
202
+
203
+ `prepare`, `check`, `artifacts`, `publish-release`, and `publish-aur` remain
204
+ available for older projects. Their original workflow is documented in the
205
+ [legacy guide](https://github.com/crmne/native-packages/blob/main/docs/legacy.md).
206
+ Use `build` and `publish --from` for new configurations.
@@ -0,0 +1,323 @@
1
+ ---
2
+ title: Configuration reference
3
+ description: All native-packages configuration fields, target options, hooks, tokens, and downstream repository settings.
4
+ nav_order: 1
5
+ ---
6
+
7
+ # Configuration reference
8
+
9
+ For a first configuration, follow [Getting started](../_guides/getting-started.md).
10
+ This page is for looking up individual settings.
11
+
12
+ ## File location
13
+
14
+ Use `native-packages.yaml` or `native-packages.yml` in your working directory.
15
+ To choose another file:
16
+
17
+ ```sh
18
+ native-packages --config packaging/native-packages.yaml build --version 1.2.3
19
+ ```
20
+
21
+ Configuration paths and hooks resolve from that file's directory. Keep only
22
+ one of the auto-discovered filenames, or use `--config` to select one.
23
+ The configuration is YAML data; it does not evaluate Ruby or general template
24
+ expressions. Use the replacement values listed below.
25
+
26
+ ## Top-level fields
27
+
28
+ | Field | Purpose |
29
+ | --- | --- |
30
+ | `schema` | Required. Set to `1`. |
31
+ | `tool.version` | Required. Exact native-packages version, such as `'0.7.0'`. |
32
+ | `tool.nfpm` | Required. Set to `'2.47.0'`, including in native-only configurations. |
33
+ | `nfpm` | Shared package metadata and installed-file mappings, or a relative YAML filename. Requires `name`. |
34
+ | `targets` | Required. Named build targets; use `{}` for recipe-only projects. |
35
+ | `release` | GitHub repository, checksum filename, and prerelease opt-in. |
36
+ | `assets` | Additional files used by recipe templates. Defaults to `{}`. |
37
+ | `templates` | Generated recipe paths mapped to source template paths. Defaults to `{}`. |
38
+ | `repositories` | Downstream publication destinations. Defaults to `{}`. |
39
+ | `libraries` | Additional shared-library dependency mappings for DEB/RPM. |
40
+ | `revisions` | Package revision numbers by app version and recipe path. |
41
+ | `version_file` | Cargo manifest checked by `check-version`. |
42
+ | `version_section` | Cargo section to check; defaults to `package`. |
43
+
44
+ Quote tool versions so they remain strings. A version mismatch reports the
45
+ command needed to install and select the configured gem.
46
+
47
+ ## Package metadata
48
+
49
+ `nfpm` is named after the helper that writes Linux packages and MSIX files.
50
+ It holds the package's metadata, files, dependencies, and package-manager
51
+ settings. Native DMG and Inno targets also read the shared metadata.
52
+
53
+ Every target needs nonempty `maintainer`, `description`, and `license` values.
54
+ Non-native targets need a `contents` list. The shared package name may contain
55
+ letters, digits, dots, underscores, and hyphens, starting with a letter or digit.
56
+
57
+ ```yaml
58
+ nfpm:
59
+ name: hello
60
+ description: A small greeting application
61
+ maintainer: Your Name <you@example.com>
62
+ license: MIT
63
+ contents:
64
+ - src: '@PAYLOAD@/hello'
65
+ dst: /usr/bin/hello
66
+ file_info:
67
+ mode: 0755
68
+ ```
69
+
70
+ You can move that mapping to a file and use `nfpm: packaging/package.yml`.
71
+ A target can supply an `nfpm` mapping or filename to override shared values.
72
+ Maps merge recursively; lists replace in full.
73
+
74
+ The package name, version, platform, and architecture come from the shared
75
+ name, build version, and target. Avoid conflicting declarations under `nfpm`.
76
+ Format-specific architecture names belong under sections such as `deb.arch`.
77
+ For additional metadata, scripts, and format overrides, see the
78
+ [nFPM configuration reference](https://nfpm.goreleaser.com/docs/configuration/).
79
+
80
+ ## Targets
81
+
82
+ Each key under `targets` is an ID such as `linux-amd64`. IDs use lowercase
83
+ letters, digits, and hyphens, starting with a letter or digit.
84
+
85
+ | Target field | Purpose |
86
+ | --- | --- |
87
+ | `platform` | Required: `linux`, `macos`, or `windows`. |
88
+ | `arch` | Required. Architecture, commonly `amd64` or `arm64`. macOS also supports `universal`. |
89
+ | `formats` | Required nonempty list of output formats, without duplicates. |
90
+ | `kind` | `binary` (default), `data`, or `source`. |
91
+ | `libc` | Required for Linux binary targets: `glibc`, `musl`, or `static`. |
92
+ | `abi` | Required for IPK: a label identifying the device/distribution baseline. |
93
+ | `input` | Required. Local file, directory, or release asset to package. |
94
+ | `nfpm` | Package metadata overrides for this target. |
95
+ | `compiler_target` | Optional value for `@TARGET@`; otherwise it is the target ID. |
96
+ | `before_build` | Command arguments run before copying a local input. |
97
+ | `after_package` | Command arguments run on each package before its hash is recorded. |
98
+ | `native` | Required for DMG/Inno. Contains `command` and `output`. |
99
+
100
+ Formats are `deb`, `rpm`, `archlinux`, `apk`, `ipk`, `srpm`, `msix`, `dmg`,
101
+ and `inno`. See [Supported platforms](platforms.md) for their requirements.
102
+
103
+ Windows targets select only `[msix]` or `[inno]`; macOS targets select `[dmg]`.
104
+ DMG and Inno each require a separate binary target. SRPM requires a separate
105
+ `kind: source` target with only `[srpm]`.
106
+
107
+ ### Inputs
108
+
109
+ | Input field | Purpose |
110
+ | --- | --- |
111
+ | `local` | Path used by local builds. |
112
+ | `release_asset` | Filename used by `build --release`. |
113
+ | `url` | Optional download URL overriding the default GitHub release URL. |
114
+ | `kind` | `archive` (default), `directory`, or `file`. |
115
+
116
+ Declare at least `local` or `release_asset`, and supply the field needed for
117
+ your chosen build mode. Native targets require `kind: directory` and `local`.
118
+ Binary release inputs always need a matching published checksum.
119
+
120
+ Regular package inputs reject symbolic links. Use explicit installed symlink
121
+ entries in `contents`. Native inputs preserve safe internal relative links.
122
+
123
+ ### Native commands
124
+
125
+ ```yaml
126
+ native:
127
+ command: [ruby, packaging/dmg.rb, '@PAYLOAD@', '@PACKAGE@', '@VERSION@']
128
+ output: 'hello-@TAG@-macos-arm64.dmg'
129
+ ```
130
+
131
+ The command must be a nonempty argument list containing `@PACKAGE@`, and must
132
+ create only that output file. `output` is a filename ending in `.dmg` or `.exe`.
133
+ See [macOS and Windows installers](../_guides/native-recipes.md) for the script
134
+ contract and a complete DMG example.
135
+
136
+ ## Hooks
137
+
138
+ `before_build` runs once per selected target before copying local input.
139
+ It is skipped in release mode. `after_package` runs once per generated package
140
+ in either mode, before checksums are recorded.
141
+
142
+ ```yaml
143
+ before_build: [./scripts/build-linux.sh, '@ARCH@']
144
+ after_package: [pwsh, -File, packaging/sign.ps1, '@PACKAGE@']
145
+ ```
146
+
147
+ Hooks run in the configuration directory with `NATIVE_PACKAGES_TARGET` and
148
+ `NATIVE_PACKAGES_VERSION`. They are argument lists, so use a script for shell
149
+ pipelines. `validate`, `doctor`, and dry runs never execute build hooks.
150
+ The output hook must preserve the package's filename and file set.
151
+
152
+ For DMGs, automatic Apple input signing finishes before the native command.
153
+ DMG signing and notarization run after `after_package`, before the final hash.
154
+ See [Apple signing and notarization](../_guides/apple-notarization.md).
155
+
156
+ ## Replacement values
157
+
158
+ Strings can contain `@KEY@` values. Unknown or unavailable values cause an error.
159
+
160
+ | Value | Meaning |
161
+ | --- | --- |
162
+ | `@NAME@` | Shared package name. |
163
+ | `@VERSION@` | App version without the leading `v`. |
164
+ | `@TAG@` | Version with the leading `v`. |
165
+ | `@DATE@` | Build timestamp in UTC ISO 8601 format. |
166
+ | `@SOURCE_DATE_EPOCH@` | Build timestamp as Unix seconds. |
167
+ | `@ROOT@` | Absolute configuration directory. |
168
+ | `@UPSTREAM@` | GitHub URL of `release.repository`. |
169
+ | `@GIT_VERSION@` | Git revision value such as `r42.abc1234`; `r0.unknown` without Git metadata. |
170
+ | `@ARCH@`, `@PLATFORM@` | Target architecture and platform. |
171
+ | `@TARGET_ID@` | Target ID. |
172
+ | `@TARGET@` | `compiler_target`, or the target ID if omitted. |
173
+ | `@PAYLOAD@` | Copied or extracted input directory, available during packaging. |
174
+ | `@PACKAGE@`, `@FORMAT@` | Output path and format, available to native commands and `after_package`. |
175
+ | `@PKGREL@` | Recipe revision; defaults to `1`. |
176
+ | `@KEY_FILE@`, `@KEY_URL@`, `@KEY_SHA256@` | Filename, URL, and hash for asset `KEY`. |
177
+
178
+ Target values are available within target definitions and package metadata,
179
+ not global recipe templates. `before_build` runs before the payload exists;
180
+ use it to produce `input.local`.
181
+
182
+ ## Release
183
+
184
+ ```yaml
185
+ release:
186
+ repository: your-name/hello
187
+ checksums: checksums.txt
188
+ prereleases: false
189
+ ```
190
+
191
+ `repository` is the GitHub `owner/repository` for downloads and package uploads.
192
+ `checksums` is a filename, defaulting to `checksums.txt`.
193
+ `prereleases: true` opts into the formats and version rules described in
194
+ [Prereleases](../_guides/prereleases.md).
195
+
196
+ ### Version and timestamp
197
+
198
+ `build --version 1.2.3` uses local inputs. `build --release v1.2.3` supplies the
199
+ version and uses release inputs. If both options are given, their versions
200
+ must agree. Omitting both requires an exact supported release tag at `HEAD`.
201
+
202
+ Versions are stable `MAJOR.MINOR.PATCH` unless prereleases are enabled. A leading
203
+ `v` is accepted. Build timestamps use `SOURCE_DATE_EPOCH`, then the relevant
204
+ Git commit's timestamp, then the current time if Git metadata is unavailable.
205
+ Set an explicit epoch for repeatable builds outside Git and for builds split
206
+ across hosts.
207
+
208
+ ## Assets and templates
209
+
210
+ ```yaml
211
+ assets:
212
+ AMD64:
213
+ file: hello_@VERSION@_linux_amd64.tar.gz
214
+ local: dist/hello_@VERSION@_linux_amd64.tar.gz
215
+ templates:
216
+ arch/hello-bin/PKGBUILD: packaging/arch/hello-bin/PKGBUILD.in
217
+ ```
218
+
219
+ Asset keys use uppercase letters, digits, and underscores, starting with a
220
+ letter. Each asset needs `file`; local builds also need `local`. An optional
221
+ `url` overrides its release download location. Downloads are checked against
222
+ release checksums by default. For a source archive omitted from the published
223
+ checksum list, explicitly set `checksummed: false`; its computed SHA-256 still
224
+ appears in the rendered recipe.
225
+
226
+ `templates` maps output paths under `recipes/` to source paths relative to the
227
+ configuration. See [Distribution recipes](../_guides/distribution-recipes.md)
228
+ for a complete example.
229
+
230
+ ### Deferred recipe generation
231
+
232
+ `build --defer-recipes` skips global assets and templates. Use
233
+ `aggregate --finalize-recipes` once all package builds and remaining local
234
+ assets are available. No additional configuration fields are needed. See
235
+ [Building across platforms](../_guides/multi-platform.md) for prerequisites,
236
+ asset matching, and publication rules.
237
+
238
+ ## Repositories
239
+
240
+ Each entry under `repositories` names a destination. These settings apply to
241
+ `stage`, `diff`, `publish`, and `status`:
242
+
243
+ | Field | Purpose |
244
+ | --- | --- |
245
+ | `publish` | Required: `push`, `github-pr`, `gitlab-mr`, or `manual`. |
246
+ | `url` | Required. Upstream clone URL. |
247
+ | `push_url` | Push URL; defaults to `url`. Set to your fork for submissions. |
248
+ | `fork_url` | Fork clone URL for submissions. |
249
+ | `group` | Optional name for selecting several destinations together. |
250
+ | `branch` | Upstream branch to start from. Required for managed Git destinations. |
251
+ | `package_path` | Package directory to check out; `.` for the whole repository. |
252
+ | `files` | Generated recipe paths mapped to downstream repository paths. |
253
+ | `version_file` | Downstream file containing the package version. |
254
+ | `version_files` | Alternative directory whose filenames contain versions, such as ebuilds. |
255
+ | `version_pattern` | Regular expression capturing the version from that file or those filenames. |
256
+ | `proposal_branch` | Branch pushed for a PR/MR; can contain `@VERSION@`. |
257
+ | `title` | Commit/request title template; defaults to the package name and version. |
258
+ | `status_branch` | Optional branch to inspect for upstream status. |
259
+ | `sign_commit`, `sign_push` | Enable Git commit or push signing. |
260
+ | `signoff` | Add a sign-off to the commit. |
261
+ | `notes` | Instructions for a manual destination. |
262
+
263
+ GitHub PR entries also need `repository` (upstream `owner/repo`) and
264
+ `fork_owner`. GitLab MR entries need `repository`, `fork_repository`, `host`,
265
+ and `token_env` (the environment variable holding the GitLab token).
266
+ Submission destinations need a fork, a `proposal_branch`, and a reviewed
267
+ `--body-file` when publishing. GitHub requests use authenticated `gh`; direct
268
+ Git pushes use your configured Git credentials.
269
+
270
+ ## Libraries
271
+
272
+ Add a mapping from a shared library's filename to its distribution package:
273
+
274
+ ```yaml
275
+ libraries:
276
+ libexample.so.1:
277
+ deb: libexample1
278
+ rpm: libexample
279
+ ```
280
+
281
+ Mappings extend the built-in DEB/RPM table. A mapping for an existing library
282
+ replaces that library's mapping, so include both formats if needed. Verify
283
+ package names against your supported distribution versions.
284
+
285
+ ## Revisions and version checks
286
+
287
+ To regenerate a recipe with a new package revision for the same app version:
288
+
289
+ ```yaml
290
+ revisions:
291
+ '1.2.3':
292
+ arch/hello-bin/PKGBUILD: 2
293
+ ```
294
+
295
+ That template receives `@PKGREL@` as `2`; other versions and templates default
296
+ to `1`. This setting controls recipe revisions, not the `nfpm.release` field.
297
+
298
+ For Cargo version checks:
299
+
300
+ ```yaml
301
+ version_file: Cargo.toml
302
+ version_section: package
303
+ ```
304
+
305
+ Run `native-packages check-version v1.2.3` to compare the manifest version with
306
+ the tag. Use `version_section: workspace.package` for a workspace version.
307
+
308
+ ## Output and publication
309
+
310
+ A build writes to a fresh `dist/packages/<version>/` by default. Packages live
311
+ under `packages/<target>/<format>/`. `build.json` records configuration identity,
312
+ targets, input/output hashes, and validation results.
313
+
314
+ Publication verifies the files against the manifest. It requires every format
315
+ for all configured targets unless exact complete targets are selected with
316
+ `publish --target`. See [Publishing a release](../_guides/publishing.md).
317
+
318
+ ### One configuration across native hosts
319
+
320
+ Build each native target on its host, then combine results with `aggregate`.
321
+ Use the same configuration, version, and timestamp. The Linux reusable workflow
322
+ can select Linux targets through its `targets` input. See
323
+ [Building across platforms](../_guides/multi-platform.md).
@@ -0,0 +1,104 @@
1
+ ---
2
+ title: Supported platforms
3
+ description: Package formats, required build inputs and tools, architecture checks, and distribution recipe support.
4
+ nav_order: 3
5
+ ---
6
+
7
+ # Supported platforms
8
+
9
+ Choose formats for the systems your app already supports. Each target needs
10
+ binaries built for the correct operating system, CPU architecture, and runtime
11
+ libraries.
12
+
13
+ ## Package formats
14
+
15
+ | Format | Target | What you supply | Packaging tools |
16
+ | --- | --- | --- | --- |
17
+ | `deb` | Linux | Compatible Linux files and package metadata. | nFPM, `readelf` for binaries. |
18
+ | `rpm` | Linux | Compatible Linux files and RPM-specific dependencies. | nFPM, `readelf` for binaries. |
19
+ | `archlinux` | Linux | Arch-compatible files and explicit dependencies. | nFPM, `readelf` for binaries. |
20
+ | `apk` | Linux | Suitable Alpine files, usually musl or static binaries, and dependencies. | nFPM, `readelf` for binaries. |
21
+ | `ipk` | Linux | Files for the device/distribution baseline, dependencies, and an `abi` label. | nFPM, `readelf` for binaries. |
22
+ | `srpm` | Linux source target | RPM spec and source files. | nFPM; native RPM tooling for rebuild tests. |
23
+ | `msix` | Windows | Windows binaries, identity, application assets, and capabilities. | nFPM; Windows tools for signing and installation tests. |
24
+ | `dmg` | macOS | Complete app and a DMG script. | macOS, `lipo`, and your script's tools, such as `hdiutil`. |
25
+ | `inno` | Windows | Complete app and an Inno Setup recipe/wrapper. | Windows and your installed Inno compiler. |
26
+
27
+ The supported nFPM version is **2.47.0**. It writes package files from your
28
+ prepared contents. Native DMG and Inno targets call your scripts instead.
29
+ Archive inputs also require `bsdtar`; release downloads require `curl`.
30
+
31
+ ## Linux compatibility
32
+
33
+ Linux binary targets declare `libc: glibc`, `musl`, or `static`. The tool checks
34
+ ELF architecture, linked libraries, and the declared C library without executing
35
+ the binaries. DEB/RPM dependency detection can be extended with
36
+ [configuration mappings](configuration.md#libraries).
37
+
38
+ Supported inspection architectures are `386`, `amd64`, `arm64`, `arm5`, `arm6`,
39
+ `arm7`, `mips`, `mipsle`, `mips64`, `mips64le`, `ppc64`, `ppc64le`, `s390x`,
40
+ `riscv64`, and `loong64`. Unknown architectures fail explicitly.
41
+
42
+ Use explicit dependencies for Arch, Alpine, and IPK. Test against the oldest
43
+ distribution version you intend to support, including any libraries your app
44
+ loads at runtime. Changing a glibc target's format to APK does not turn its
45
+ binary into a musl build.
46
+
47
+ For IPK, check which format your device's distribution release actually uses.
48
+ The repository's IPK fixture targets OpenWrt 24.10.8; its coverage should not
49
+ be treated as a claim about every OpenWrt version.
50
+
51
+ ## MSIX
52
+
53
+ MSIX targets use `platform: windows`, `formats: [msix]`, and PE binaries with
54
+ `arch: 386`, `amd64`, or `arm64`. Supply `nfpm.msix.publisher`, at least one
55
+ application under `nfpm.msix.applications`, and the required assets and
56
+ capabilities for your app.
57
+
58
+ The [all-formats example](https://github.com/crmne/native-packages/blob/main/examples/native-packages-all-formats.yaml)
59
+ includes an MSIX configuration. The reusable Linux workflow can construct an
60
+ MSIX from already-built Windows inputs. Perform signing and installation
61
+ checks on Windows.
62
+
63
+ Use Windows SDK SignTool through an `after_package` hook for signing, as the
64
+ project's Windows acceptance tests do. Those tests found that Windows rejected
65
+ nFPM 2.47.0's built-in signature with `0x80096010`. An MSIX file built
66
+ successfully is not yet evidence that Windows will accept and install it.
67
+
68
+ ## DMG and Inno Setup
69
+
70
+ These formats run on their native host and each require a separate binary
71
+ target with a local directory input. macOS inspection supports `amd64`,
72
+ `arm64`, and `universal`; Windows inspection supports `386`, `amd64`, and
73
+ `arm64`. Your script and compiler must also support the chosen architecture.
74
+
75
+ Follow [macOS and Windows installers](../_guides/native-recipes.md) for setup.
76
+ DMG targets can automatically [sign and notarize](../_guides/apple-notarization.md)
77
+ when complete Apple credentials are available.
78
+
79
+ ## Distribution recipes
80
+
81
+ [Templates and downstream repository settings](../_guides/distribution-recipes.md)
82
+ support AUR, Homebrew taps, Nixpkgs, Gentoo, Void, and other native recipe
83
+ repositories. You supply each distribution's recipe and its validation steps.
84
+ The tool renders release values and stages or submits the update.
85
+
86
+ An Arch package file and an AUR recipe are separate outputs: the former can
87
+ be installed directly; the latter tells Arch tooling how to obtain and package
88
+ your app.
89
+
90
+ There is no Flatpak build/publication adapter, no NSIS/WiX adapter, and no
91
+ hosted APT/DNF index service. Keep those workflows in your app's release
92
+ process if you need them.
93
+
94
+ ## What validation establishes
95
+
96
+ Builds check inputs, architecture, applicable library requirements, package
97
+ contents or native containers, and recorded hashes. A `build.json` reports
98
+ installation as `not-tested`.
99
+
100
+ This repository's CI separately builds fixtures in every supported format and
101
+ runs Linux install/upgrade/remove checks, an SRPM rebuild, Windows MSIX and
102
+ Inno checks, and macOS DMG checks. Your app still needs its own installation
103
+ and runtime tests, including services, GUI integrations, entitlements, or
104
+ hardware access where applicable.