HarbourMaster

PortMaster Package Manager

This is the script backend that handles listing available ports, downloading and installing/uninstalling ports for our PortMaster GUI

How it works:

port.json

Most of what harbourmaster uses is a file called <portname>.port.json , this contains all the information required for a port. Without this file, harbourmaster cannot properly add the port to PortMaster.

An example annotated json file is included . All ports must have a .port.json file and will be a requirement of submission to PortMaster.

We have an easy to use webpage for adding port.json file directly to your ports zip files, it all runs locally in your webbrowser so its easy to use.

Listing available ports:

Harbourmaster has a list of sources where it fetches ports from, by default it comes with:

Source Description Source File
PortMaster This draws from the default portmaster repository, it uses the PortMasterV1 protocol. 020_portmaster.source.json
PortMaster Runtimes This is where runtimes for different runtimes live, it uses the GitHubRawReleaseV1 protocol. 021_runtimes.source.json

With these two sources portmaster behaves as usual.

What makes portmaster different is it is now possible to install additional port sources, so that additional repositories of ports can be sourced.

Source Description Source File
Kloptops This is a source for my own testing port releases, it uses the GitHubRepoV1 protocol. 050_kloptops.source.json

Note : additional sources can be added, make a PR to get yours added

Installing ports:

Harbourmaster follows a specific process to identify and fetch the appropriate port for downloading.

Here's an overview of the steps involved:

By following this process, Harbourmaster reliably identifies, fetches, and verifies ports from the specified sources, ensuring the integrity and consistency of the downloaded files.

Keeping track of installed ports:

Harbourmaster keeps track of installed ports by examining the ports folder and reading the <portname>.port.json files associated with each port. These JSON files provide information about the specific files and directories related to each port.

During this process, Harbourmaster performs the following checks and actions:

By performing these checks and actions, Harbourmaster maintains an accurate record of installed ports, identifies broken ports, detects newly installed ports, and ensures the integrity of the associated files and directories. This also allows Harbourmaster to work with ports that are manually unzipped into the ports folder.

Known Ports:

Some ports, because of their nature, cannot or do not exist on PortMaster. So that harbourmaster can work as intended, we create a .port.json for them in the known-ports directory. Please create a PR for any that you come across that we don't know about.

Commands available:

Command Effect
harbourmaster update downloads the latest ports information
harbourmaster portsmd [filters] generate a ports.md file compatible with PortMaster.sh
harbourmaster list [filters] list available ports
harbourmaster ports list installed, broken, and unknown ports.
harbourmaster install http[s]://<url>.zip[.md5/md5sum] downloads a port from the specified url. If the url ends with md5/md5sum it assumes the url without the md5 is the ports zipfile. It will check the md5 against what is downloaded.
harbourmaster install [source/]<portname>.zip downloads and installs the port from available sources.
harbourmaster uninstall <portname>.zip Uninstall specified port.
harbourmaster runtimes_list List available runtime environments
harbourmaster runtimes_check <runtime> Installs the specified runtime if it is not installed
harbourmaster upgrade harbourmaster Updates harbourmaster against the latest version on github

Python libraries used: