Skip to main content

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.sh

Full 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                   # optional

Authentication

Not applicable — makeself archive creation is a local build step with no external service calls.

Common gotchas

  • makeself must be on PATH: the stage errors if makeself is not found.
  • One .run per platform: artifacts are grouped by OS + arch; each group produces one self-extracting archive. Use os and arch to 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 in dist/artifacts.json.

Republish / update behavior

Not applicable — this is a local packaging stage, not a publisher.

Makeself config fields

FieldTypeDefaultDescription
idstringdefaultUnique identifier
idslistall buildsFilter by build IDs
filenamestring{project}_{version}_{os}_{arch}.runOutput filename (template)
namestringproject nameDisplay name embedded in the archive
scriptstringrequiredStartup script path (template)
descriptionstringnoneLSM metadata description
maintainerstringnoneLSM metadata maintainer
keywordslistnoneLSM metadata keywords
homepagestringnoneLSM metadata homepage URL
licensestringnoneLSM metadata license
compressionstringmakeself defaultCompression: gzip, bzip2, xz, lzo, compress, or none
extra_argslistnoneExtra makeself CLI arguments
fileslistnoneAdditional files to include
oslist["linux", "darwin"]Target OS filter
archlistallTarget architecture filter
disablestring/boolnoneDisable this config

File entries

Each entry in files can specify:

FieldAliasTypeDescription
sourcesrcstringSource file path
destinationdststringDestination path inside archive
strip_parentboolStrip 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 .run per platform
  • Generates an embedded LSM (Linux Software Map) metadata file
  • The .run extension 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 build

Compression

Override the default compression method:

makeselfs:
  - script: ./install.sh
    compression: xz

Full 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"