Skip to content

Packages and Package Structure

vgmoose edited this page Dec 3, 2019 · 3 revisions

A "package" is a zip file that contains within it the files to-be-installed, relative to the root of the filesystem, as well as two additional files: info.json and manifest.install. These files tell libget how to track updates to the installed content within the package.

To generate a repo with packages, our build tool Spinarak is used, which uses many pkgbuild.json files to represent each individual package. It uses this information to generate a single repo.json that describes the package contents of the entire repo, alongside the many actual package files (zip files), which in turn contain an info.json for each package.

pkgbuild.json

This file is used in our internal metadata repos by Spinarak to generate the repo.json, manifest.install, and info.json files, which are used by libget.

libget itself does not interact with this file directly at this time. For info on its structure, see Spinarak's wiki

repo.json

This file is available on /repo.json from the main repository URL, and its format is described here. The package entry payload spec is as follows:

Key Type Description
name string Unique name of the package with no spaces. This field is used internally to track updates
version string Version number of the contents of the package. This field is used internally to display updates
category string Sets category of package, this info can be interpreted by the client
title string Human readable display name of the contents installed by the package
author string Author's display name, can be comma separated for multiple authors
url string A place on the Internet to find more information about this package
license string License this package is provided under. ("GPLv3", "MIT License", etc)
description string Short one-line description of the package
details string A detailed description of the package, can be as long as desired
changelog string A detailed history of changes made to this package over time, can be as long as desired

info.json

The info.json file is installed locally to the libget client alongside a manifest.install file. They can be located under the ./.get/packages/[PKGNAME]/ folder, relative to where the libget client is running. Prior to that, they exist only within a package's zip file.

When Spinarak is used, all of the information in this json is directly from the info payload section..

Although the entire info.json is saved to the disk when a package is installed, only the version key is ever read by a libget client. This key is used to compare against the version key on the server's repo.json, and if the locally installed version string doesn't match the one on the server, an update notification is displayed.

TODO: Use more of the fields from above in this info.json as well to track packages while offline (and a repo.json is unavailabel)

TODO: Use an incrementing internal integer versionCode that's separate from the string version, to know if an update is older or newer than the one on the server.

Key Type Description
version string Version number of the contents of the package. This field is used internally to display updates
Clone this wiki locally