Skip to content

Quick Start Guide

Brenek Harrison edited this page Jul 28, 2022 · 9 revisions

Creating a repository

The Blinky server will automatically setup the file system for any paths in the BLINKY_REPO_PATH environment variable (or the --repo-path cli argument). The format of RepoPath is the same as that of the Linux PATH environment variable, each path is separated with a colon (:). For example, /storage/repo1:/storage/repo2:/storage/repo3. The repository name will be the last segment of the path (ex. /storage/my_binary_repo -> my_binary_repo).

Accessing a repository

Blinky hosts all repos under the /repo subpath with the name and architecture (ex. http://localhost:9000/repos/my_custom_repo/x86_64). The following snippet shows the simplest configuration that can be put in /etc/pacman.conf to get the repository to work. Do note that it disables all signature checking, which reduces the security of the repository considerably.

[my_custom_repo]
SigLevel = Never # This disables all of Pacman's builtin security checks and should not be used in production.
Server = http://example.com/repo/$repo/$arch

The following sources have more information on the SigLevel of repositories: Pacman Package Signing (Arch Wiki), Pacman Man Pages.

Managing packages

The easiest way to manage packages on a Blinky server is with the Blinky CLI.

Logging in

After installation, the first item of business is to login to the server. This is done by using the blinky login sub-command, like so: blinky login http://<server_url>:<server_port>.

Adding the --default flag (blinky login --default <url>) will set the server that is being logged into as the default server to use for the other management sub-commands. Any server that is not the default will require the use of the --server flag.

Uploading a package

To upload a package to a repository, use blinky upload <repo_name> <package file 1> <package file 2>. Any number of packages can uploaded at once by simply specifying each file.

If a file that matches the package's name with .sig appended at the end exists, it will be uploaded as well as a signature file for that package.

Removing a package

To remove a package from a repository, use blinky remove <repo_name> <package name 1> <package name 2>. Any number of packages can be removed at once by specifying each package name.

Common Configuration Options

The following are some common configuration options that you may want to know about to quickly configure your Blinky instance.

Name ENV Var CLI Flag Description Default Value
RepoPath BLINKY_REPO_PATH --repo-path A colon-separated list of filepaths for each Pacman repository. $(pwd)/repo
HTTPPort BLINKY_PORT --http-port The port for the Blinky web server to bind to. 9000
ConfigDir BLINKY_CONFIG_DIR --config-dir The location to use for storing the database. /var/lib/blinky
RequireSignedPkgs BLINKY_SIGNED_PKGS --no-signed-pkgs Whether or not to require that all packages are uploaded with an accompanying signature file. True
APIUsername BLINKY_API_UNAME --api-uname The username to use to access the management API. Empty string
APIPassword BLINKY_API_PASSWD --api-passwd The password to use to access the management API. Empty string