Upstreams

Configuring where the recipe finds the ‘sources’ required for a build to work

The majority of packages are built using upstream release sources. While it is possible to create packages manually from local assets, the bulk of packages take an upstream tarball and build it.

Plain sources

A plain source is one that simply has an upstream URI and can be unpacked in some fashion, i.e. a tarball. The hash must be provided for the upstream and accompanied by the SHA256 sum.

upstreams:
    - uri: $hash
upstreams
    - uri:
        hash: $hash

Additional options

KeyTypeDescription
hashstringSHA256 of the upstream source
stripdirsstringNumber of directories to remove from archive root
unpackbooleanWhether to automatically unpack archive or not
unpackdirstringForce a different directory name when unpacking

Git sources

A git source may be used, when providing either a tag or ref. In Serpent OS we forbid the use of branch names in packaging, as they may mutate and break subsequent builds. Ideally a full git ref should be used.

upstreams:
    - git|uri: $ref
upstreams:
    - git|uri:
        ref: $ref

Additional options

KeyTypeDescription
refstringgit ref when using git source
clonedirstringOverride clone target directory