Skip to content

Latest commit

 

History

History
82 lines (54 loc) · 9.31 KB

env_vars-x_exec.run.md

File metadata and controls

82 lines (54 loc) · 9.31 KB
icon description
gear
List of Environment Variables that are Accessible Inside x_exec.run

ENV_VARS (x_exec.run)

{% hint style="danger" %} Anything else that's NOT Listed here, should NOT be Accessible Inside x_exec.run context {% endhint %}

  • ${pkg} | {PKG}
  • Description: The raw value of .pkg from .SBUILD <ALWAYS Available>
  • ALWAYS USE ${PKG} for output, example: ${PKG} (Main Binary), ${PKG}.png (Icon), ${PKG}.desktop (Desktop) etc
  • ${pkg_id} | ${PKG_ID}
  • Description: The raw value of .pkg_id from .SBUILD <Empty if not Available>
  • ${pkg_type} | ${PKG_TYPE}
  • Description: The raw value of .pkg_type from .SBUILD <Empty if not Available>
  • ${pkg_ver} | ${PKG_VER}
  • Description: The raw value of .pkgver OR the output produced by x_exec.pkgverfrom.SBUILD <ALWAYS Available>
  • This is the same as the raw content of ${SBUILD_PKG}.version file
  • ${SBUILD_PKG}
  • Description: The raw value of .pkg + .pkg_type from .SBUILD <ALWAYS Available>
  • ${SBUILD_OUTDIR}
  • Description: The Root (Temporary) Working Directory x_exec.run is Run From <ALWAYS Available>
  • All NEEDED Files must exist in this Directory
  • ${SBUILD_TMPDIR}
  • Description: The SBUILD_TEMP Directory inside ${SBUILD_OUTDIR} (PATH: ${SBUILD_OUTDIR}/SBUILD_TEMP), used for storing NON-NEEDED Files <ALWAYS Available>
  • Use this dir to do Additional Steps, keep the main ${SBUILD_OUTDIR} clutter free
  • ${USER_AGENT}
  • Description: User-Agent from Host <Empty if not Available>
  • If available & inherited, the Runner will use it as the User Agent Header for all HTTP Requests.
  • If used --no-hostenv, then this ENV_VAR is NOT TO BE INHERITED/INSERTED AT ALL
  • Description: Github Token from Host <Empty if not Available>
  • If available & inherited, the Runner will use it as the Token to make Github API Requests.
  • If used --no-hostenv, then this ENV_VAR is NOT TO BE INHERITED/INSERTED AT ALL
  • Description: Gitlab Token from Host <Empty if not Available>
  • If available & inherited, the Runner will use it as the Token to make Gitlab API Requests.
  • If used --no-hostenv, then this ENV_VAR is NOT TO BE INHERITED/INSERTED AT ALL
  • Description: HuggingFaceHub Token from Host <Empty if not Available>
  • If available & inherited, the Runner will use it as the Token to make HF API Requests.
  • If used --no-hostenv, then this ENV_VAR is NOT TO BE INHERITED/INSERTED AT ALL

  • MISC

{% hint style="info" %} If --no-hostenvis used, the ENV VARS below are to be created from scratch based on the fallback that's described for each. {% endhint %}

  • LANG: The Locale Setting, If this is empty/non-existent (or used --no-hostenv) , Use C.UTF-8 (LANG=C.UTF-8)
  • LC_ALL: The Locale Setting, If this is empty/non-existent (or used --no-hostenv) , Use C.UTF-8 (LC_ALL=C.UTF-8)
  • PATH: The ${PATH} from HOST, if this is empty/non-existent (or used --no-hostenv), Use: ${SOAR_BINPATH}:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin (Example: PATH=/home/example/.local/share/soar/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin)
  • PWD: The Present Working Directory, this should be set to the full realpath of ${SBUILD_OUTDIR}, as the x_exec.run is run from this dir. <ALWAYS Available> (Example: PWD=/home/example/.local/share/soar/cache/sbuild/github.com.example.example.stable)
  • SHELL: The value of x_exec.shell after resolving with env so it prints full realpath of x_exec.shell <ALWAYS Available> (SHELL=/bin/bash)
  • TERM: The terminal emulator, this is needed as some CLI progs behave unexpectedly without it. If this is empty/non-existent (or used --no-hostenv), Use: XTERM (TERM=xterm)
  • USER: The current $USER (whoami) If this is empty/non-existent, it is to be determined & inserted manually. If used --no-hostenv, then this ENV_VAR is NOT TO BE INHERITED/INSERTED AT ALL