#!/usr/bin/env bash set -Eeuo pipefail source /opt/rust-package-builder/scripts/lib.sh OUT=${1:?output file required} PACKAGE=${2:?package name required} URL=$(trim_trailing_slash "$REPOSITORY_URL") export OUT PACKAGE URL OPNSENSE_REPOSITORY_URL REPO_DISTRIBUTION REPO_COMPONENT python3 <<'PY_END' import html, os out=os.environ['OUT'] package=os.environ['PACKAGE'] url=os.environ['URL'] dist=os.environ['REPO_DISTRIBUTION'] component=os.environ['REPO_COMPONENT'] opn_url=os.environ['OPNSENSE_REPOSITORY_URL'].rstrip('/') h=html.escape content=f''' {h(package)} — package repository

{h(package)} — package repository

Signed DEB and RPM packages for x86_64/amd64.

Repository active{h(url)}APT + RPM/DNF

Debian / Ubuntu

curl -fsSL {h(url)}/repo-key.gpg \\
  | sudo gpg --dearmor -o /usr/share/keyrings/{h(package)}.gpg

echo "deb [signed-by=/usr/share/keyrings/{h(package)}.gpg] {h(url)}/apt {h(dist)} {h(component)}" \\
  | sudo tee /etc/apt/sources.list.d/{h(package)}.list

sudo apt update
sudo apt install {h(package)}

RHEL / Rocky / Alma / Fedora

sudo rpm --import {h(url)}/repo-key.gpg

sudo tee /etc/yum.repos.d/{h(package)}.repo <<'REPO'
[{h(package)}]
name={h(package)} Repository
baseurl={h(url)}/rpm/$basearch
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey={h(url)}/repo-key.gpg
REPO

sudo dnf install {h(package)}

Docker discovery agent — separate Linux package

Install rustproxy-docker-agent on the Docker host (systemd, Docker Engine, amd64/x86_64). This is independent from the RustProxy server and has no FreeBSD pkg.

# Debian / Ubuntu (after adding the signed APT repo above)
sudo apt install rustproxy-docker-agent

# RHEL / Rocky / Alma / Fedora (after adding the DNF repo above)
sudo dnf install rustproxy-docker-agent

# Locally display the token and certificate fingerprint
sudo rustproxy-docker-agent info --show-token
sudo systemctl status rustproxy-docker-agent

Packages create persistent credentials and a systemd service; tokens are never printed to unattended package logs. Restrict the agent's HTTPS port to the RustProxy host.

OPNsense / FreeBSD pkg

The OPNsense plugin is published separately because it uses the FreeBSD pkg format.

{h(opn_url)}/

Native FreeBSD pkg (if enabled): {h(opn_url)}/freebsd/.

Repository files

Supported targets: Debian 12/13, Ubuntu 24.04/26.04, RHEL 9/10; architecture: amd64/x86_64.

''' with open(out, 'w', encoding='utf-8') as f: f.write(content) PY_END