Skip to content

Latest commit

 

History

History
102 lines (81 loc) · 4.69 KB

File metadata and controls

102 lines (81 loc) · 4.69 KB
icon list-radio
description List of Binaries/Packages Generated during Build (TYPE: RECOMMENDED)

16.Provides

{% code overflow="wrap" %}

#Example ONLY
# $pkg itself will always be a default value, so not needed if contains only 1 program and that 1 program is $pkg itself
provides:
  - "prog-a"
  - "prog-b"

{% endcode %}

  • This is Optional & can be left empty or removed completely (TYPE: RECOMMENDED)
  • This lists all programs that are fetched/built during the x_exec.run part.
  • If this field is empty or doesn't exist, the interpreter will use $pkg as the only value of provides by default.
  • If this field exists, soar will treat it as a $pkg family containing all programs from provides
  • soar install $pkg by default, will install all programs from provides. This is the same as $pkg when provides is empty/nonexistent.
  • soar install $pkg/$prog will only install $prog from the $pkg's .SBUILD
  • Can have single or multiple entries

alias

{% hint style="info" %} It is possible to specify aliases with : as a separator, provided that the original $prog is the first value (Only used for METADATA)

{% code overflow="wrap" %}

#Example ONLY
# $pkg itself will always be a default value, so not needed if contains only 1 program and that 1 program is $pkg itself, however we can name it explictly if the prog is also known by another name with :
provides:
  - "prog-original:prog-alias"
  #Example:
  # - "chaos:chaos-cli" --> Chaos is same as `.pkg`, but since `chaos-cli` is also defined, searching for either chaos:chaos-cli will return the same result
  
#If a $pkg has multiple aliases, it can be specified by using : before each alias
provides:
  - "prog-original:prog-alias-1:prog-alias-2:prog-alias-3"

{% endcode %} {% endhint %}


symlink

{% hint style="info" %} It is possible to specify symlinks with == as a separator, provided that the original $prog is the first value (INSTALL_ONLY1)

{% code overflow="wrap" %}

#Example ONLY
# $pkg itself will always be a default value, so not needed if contains only 1 program and that 1 program is $pkg itself, however we can name it explictly if the prog is also meant to be Symlinked with known by another name with ==
provides:
  - "prog-original==prog-symlink"
  #Example:
  # - "busybox==whoami" --> busybox is the main program , but since `whoami` is also defined, soar will create a whoami symlink that points to buysbox
  
#If a $pkg has multiple symlinks, it can be specified in this way
provides:
  - "prog-original==prog-symlink-1"
  - "prog-original==prog-symlink-2"
  - "prog-original==prog-symlink-3"

{% endcode %} {% endhint %}

symlink-only

{% hint style="warning" %} It is possible to specify a symlink-only2 operation with => as a separator, provided that the original $prog is the first value (INSTALL_ONLY3)

This also means, Only the SYMLINK would be available in $PATH

{% code overflow="wrap" %}

provides:
  - "prog-original=>prog-new" # prog-original would get symlinked as prog-new
 #Example:
  # - "ripgrep=>rg" --> ripgrep is the main program , but since `rg` is also defined with =>, soar will symlink the ripgrep package as rg in BINDIR
  #Only renames the symlink, the original name will still be present in INSTALL_DIR
  #When Invoked from the cmdline, only rg would be found

{% endcode %} {% endhint %}


Footnotes

  1. Not supported or understood by the builder
    Rather, soar will parse & perform it

  2. The symlink, NOT the real package itself

  3. Not supported or understood by the builder,
    Rather, soar will parse & perform it
    Just use x_exec.run to do it & specify correct provides from the get-go\