It is the URL that is used as base to build the URLs to download all the files from the external repository. It must be in a format so that the following gives the URLs of the manifest file and the package definition files:
${REPO_URL}/manifest
${REPO_URL}/packages/${APP}The URL can point to any HTTP(S) server, as long as the URLs above correctly provide the desired files. Ideally, to prevent unnecessary traffic and slow repository updates, the server should support the Last-Modified/If-Modified-Since HTTP headers.
As an example, the base URL of an external repository hosted in a GitHub repository would be:
https://raw.githubusercontent.com/<user-organization>/<repository>/<branch>
This is the most important file in an external repository, since without it nothing else would work. Its first line must always contain the base URL of the repository. The following lines must contain the names of the package definition files present in the packages path, one per line, ideally sorted and without repetition. They can also be commented (starting with #), in which case the package definition file is considered deprecated. No file declared in the manifest should be missing, or else the caching mechanism will break.
A package definition file is a bash script whose purpose is to define the required information about a package. Since it is not meant to be executed by itself, but rather sourced by deb-get, it does not need to have the bash shebang or be set as executable. It also does not have the .sh extension.
Create a package definition file named <the-package-name> in the packages path in the repository, where <the-package-name> must be exactly the Package: name shown using apt show. Then add <the-package-name> to the manifest file.
The variables defined in the package definition file are the following:
DEFVER: An integer greater than or equal to1that represents the version of the package definition. It must be incremented every timeASC_KEY_URL,GPG_KEY_URL,APT_REPO_URL,APT_REPO_OPTIONSorPPAare added, changed or removed, or the package installation method changes.ARCHS_SUPPORTED: A space-separated list of supported architectures, following the format used bydpkg --print-architecture.CODENAMES_SUPPORTED: A space-separated list of supported upstream codenames, supporting the values fromUPSTREAM_CODENAME.ASC_KEY_URL: A URL to the ASCII-armored keyring file.GPG_KEY_URL: A URL to the binary keyring file.GPG_KEY_ID: The Key ID to be fetched from a keyserver.APT_LIST_NAME: The name of the*.listfile, without the extension.APT_REPO_URL: The repository URL, the distribution codename and any following components for the line that will be printed to the*.listfile.APT_REPO_OPTIONS: The space-separated extra options, such asarch=orby-hash=for the line that will be printed to the*.listfile.PPA: The PPA address, following the format used byapt-add-repository, including theppa:prefix.URL: The URL to the*.debfile that will be downloaded. The name of the file must be the last thing at the end of it.VERSION_PUBLISHED: The version of the package.EULA: An End User License Agreement message for packages that have them.PRETTY_NAME: The brand name of the software.WEBSITE: A URL to the official website for the software.SUMMARY: A brief description of what the software is and does.
ARCHS_SUPPORTED, CODENAMES_SUPPORTED, APT_LIST_NAME, APT_REPO_OPTIONS and EULA are optional and can be omitted when not needed. ARCHS_SUPPORTED defaults to amd64, and APT_LIST_NAME defaults to ${APP}. The URLs must use the HTTPS protocol whenever possible (i.e. except when using HTTPS would not work). To ensure the optimal performance of the commands prettylist and csvlist, if more complex operations (such as curl, unroll_url or grep over the GitHub releases JSON file) are needed to define the variables (most likely URL and VERSION_PUBLISHED), they (and the variables that depend on them) must be wrapped by the following condition:
if [ "${ACTION}" != prettylist ]; then
# Code goes here
fiAPT_REPO_URL, PPA, PRETTY_NAME, WEBSITE, SUMMARY and the calls to get_github_releases or get_website must never be wrapped by the condition above.
The environment variables available to the package definition file are the following:
CACHE_DIR: The path todeb-getcache,/var/cache/deb-get.HOST_CPU: The CPU architecture of the host system, as output byuname -m. Supported values areaarch64,armv7landx86_64.HOST_ARCH: The CPU architecture of the host system, as output bydpkg --print-architecture.OS_ID: The id of the OS, as output bylsb_release --id --short. Supported values areDebian,Linuxmint,Neon,Pop,UbuntuandZorin.OS_ID_PRETTY: The brand name of the OS.OS_CODENAME: The codename of the OS, as output bylsb_release --codename --short.UPSTREAM_ID: The id of the upstream distribution. Supported values areubuntuanddebian.UPSTREAM_CODENAME: The codename of the upstream distribution. Supported values arebuster(10),bullseye(11),bookworm(12),trixie(13),sid(unstable),focal(20.04),jammy(22.04),noble(24.04),oracular(24.10) andplucky(25.04).UPSTREAM_RELEASE: The release version of the upstream distribution.ACTION: The command being executed bydeb-get. Supported values areupdate,upgrade,show,install,reinstall,remove,purge,prettylistandfix-installed.ACTIONforcsvlistisprettylist.APP: The name of the package.CACHE_FILE: The path to the cached file forwebsiteandgithubpackages.
The helper functions available to the package definition file are the following:
unroll_url: Handles redirection and returns the final URL.get_github_releases: SetsMETHODtogithuband saves the GitHub releases' download links extracted from the GitHub API JSON toCACHE_FILE.get_gitlab_releases: SetsMETHODtogitlaband saves the GitLab releases' URLs from the GitLab API toCACHE_FILE.get_website: SetsMETHODtowebsiteand saves the HTML file toCACHE_FILE.
Use the following package definition templates as reference for adding a new package to the repository, according to the installation method of the package. The package definition files already implemented in the main repository can serve as further reference.
If the keyring file is in the ASCII-armored format (extension *.asc), use this template:
DEFVER=1
ARCHS_SUPPORTED="amd64 arm64 armhf"
CODENAMES_SUPPORTED="buster bullseye bookworm trixie sid focal jammy lunar mantic noble"
ASC_KEY_URL=""
APT_LIST_NAME=""
APT_REPO_URL=""
APT_REPO_OPTIONS="arch=${HOST_ARCH}"
EULA=""
PRETTY_NAME=""
WEBSITE=""
SUMMARY=""If the keyring file is in the binary format instead (extension *.gpg), use this template:
DEFVER=1
ARCHS_SUPPORTED="amd64 arm64 armhf"
CODENAMES_SUPPORTED="buster bullseye bookworm trixie sid focal jammy lunar mantic noble"
GPG_KEY_URL=""
APT_LIST_NAME=""
APT_REPO_URL=""
APT_REPO_OPTIONS="arch=${HOST_ARCH}"
EULA=""
PRETTY_NAME=""
WEBSITE=""
SUMMARY=""If the keyring file must be fetched from a keyserver by ID use this template:
DEFVER=1
ARCHS_SUPPORTED="amd64 arm64 armhf"
CODENAMES_SUPPORTED="buster bullseye bookworm trixie sid focal jammy lunar mantic noble"
GPG_KEY_ID=""
APT_LIST_NAME=""
APT_REPO_URL=""
APT_REPO_OPTIONS="arch=${HOST_ARCH}"
EULA=""
PRETTY_NAME=""
WEBSITE=""
SUMMARY=""DEFVER=1
PPA="ppa:<person>/<archive>"
EULA=""
PRETTY_NAME=""
WEBSITE=""
SUMMARY=""Replace <user-organization> and <repository> with the correct values:
DEFVER=1
ARCHS_SUPPORTED="amd64 arm64 armhf"
CODENAMES_SUPPORTED="buster bullseye bookworm trixie sid focal jammy lunar mantic noble"
get_github_releases "<user-organization>/<repository>" "latest"
if [ "${ACTION}" != prettylist ]; then
URL=$(grep -m 1 "browser_download_url.*\.deb\"" "${CACHE_FILE}" | cut -d <delimiter> -f <field>)
VERSION_PUBLISHED=$(cut -d <delimiter> -f <field> <<< "${URL/v/}")
fi
EULA=""
PRETTY_NAME=""
WEBSITE=""
SUMMARY=""DEFVER=1
ARCHS_SUPPORTED="amd64 arm64 armhf"
CODENAMES_SUPPORTED="buster bullseye bookworm trixie sid focal jammy lunar mantic noble"
get_website "<website>"
if [ "${ACTION}" != prettylist ]; then
URL=$(grep -m 1 "<pattern>" "${CACHE_FILE}" | cut -d <delimiter> -f <field>)
VERSION_PUBLISHED=$(cut -d <delimiter> -f <field> <<< "${URL}")
fi
EULA=""
PRETTY_NAME=""
WEBSITE=""
SUMMARY=""DEFVER=1
ARCHS_SUPPORTED="amd64 arm64 armhf"
CODENAMES_SUPPORTED="buster bullseye bookworm trixie sid focal jammy lunar mantic noble"
if [ "${ACTION}" != prettylist ]; then
URL=$(unroll_url "<website>")
VERSION_PUBLISHED=$(cut -d <delimiter> -f <field> <<< "${URL}")
fi
EULA=""
PRETTY_NAME=""
WEBSITE=""
SUMMARY=""