Makeself
Create self-extracting archives with makeself
Anodizer can create self-extracting .run archives using makeself.
Classification
Packager — creates self-extracting .run archives from Linux/macOS binaries. Required: not a publisher; makeself must be on PATH.
Minimal config
makeselfs:
- script: ./install.shFull config reference
makeselfs:
- id: default # optional; unique identifier
ids: [] # optional; filter by build IDs
filename: "" # optional; output filename template
name: "" # optional; display name embedded in archive
script: ./scripts/install.sh # required; startup script path (template)
description: "" # optional; LSM metadata description
maintainer: "" # optional; LSM metadata maintainer
keywords: [] # optional; LSM metadata keywords
homepage: "" # optional; LSM metadata homepage URL
license: "" # optional; LSM metadata license
compression: "" # optional; gzip | bzip2 | xz | lzo | compress | none
extra_args: [] # optional; extra makeself CLI arguments
files: [] # optional; additional files to include
os: ["linux", "darwin"] # optional; target OS filter
arch: [] # optional; target architecture filter
disable: false # optionalAuthentication
Not applicable — makeself archive creation is a local build step with no external service calls.
Common gotchas
makeselfmust be onPATH: the stage errors ifmakeselfis not found.- One
.runper platform: artifacts are grouped by OS + arch; each group produces one self-extracting archive. Useosandarchto restrict which targets are packaged. - Artifact ordering: the makeself stage uses a
BTreeMap(sorted by platform key) internally to ensure the artifact registration order is deterministic across builds, preventing drift indist/artifacts.json.
Republish / update behavior
Not applicable — this is a local packaging stage, not a publisher.
Makeself config fields
| Field | Type | Default | Description |
|---|---|---|---|
id | string | default | Unique identifier |
ids | list | all builds | Filter by build IDs |
filename | string | {project}_{version}_{os}_{arch}.run | Output filename (template) |
name | string | project name | Display name embedded in the archive |
script | string | required | Startup script path (template) |
description | string | none | LSM metadata description |
maintainer | string | none | LSM metadata maintainer |
keywords | list | none | LSM metadata keywords |
homepage | string | none | LSM metadata homepage URL |
license | string | none | LSM metadata license |
compression | string | makeself default | Compression: gzip, bzip2, xz, lzo, compress, or none |
extra_args | list | none | Extra makeself CLI arguments |
files | list | none | Additional files to include |
os | list | ["linux", "darwin"] | Target OS filter |
arch | list | all | Target architecture filter |
disable | string/bool | none | Disable this config |
File entries
Each entry in files can specify:
| Field | Alias | Type | Description |
|---|---|---|---|
source | src | string | Source file path |
destination | dst | string | Destination path inside archive |
strip_parent | — | bool | Strip parent directory from source path |
Prerequisites
The makeself command must be installed and available on PATH.
Behavior
- Groups binary artifacts by platform (os + arch), creating one
.runper platform - Generates an embedded LSM (Linux Software Map) metadata file
- The
.runextension is auto-appended if not present in the output name - IDs must be unique across all makeself configs
- Skippable with
--skip makeself
Default filenames
The default filename is {project}_{version}_{os}_{arch}.run, e.g.
myapp_1.2.3_linux_amd64.run or myapp_1.2.3_linux_armv7.run. Two amd64
builds of one target (a baseline and a -Ctarget-cpu=x86-64-v2/v3 tune)
are disambiguated by the micro-architecture level:
myapp_1.2.3_linux_amd64.run # baseline (v1 — no suffix)
myapp_1.2.3_linux_amd64v2.run # x86-64-v2 tuned build
myapp_1.2.3_linux_amd64v3.run # x86-64-v3 tuned buildCompression
Override the default compression method:
makeselfs:
- script: ./install.sh
compression: xzFull example
makeselfs:
- id: installer
script: ./scripts/install.sh
name: "My App Installer"
description: "Self-extracting installer for My App"
maintainer: "Alice <alice@example.com>"
license: MIT
homepage: "https://example.com/myapp"
compression: xz
os:
- linux
files:
- src: config.example.yaml
dst: config.yaml
- src: LICENSE
extra_args:
- "--nox11"