Admin Guide

OpenNebula Innovation Team

Contents

1. Management Script Reference

All operations use /srv/apt-repo/repo-manage.sh. Run with sudo.

CommandDescription
create-project <name> Create a new project (component)
remove-project <name> Remove a project and all its packages
import <project> <distro> <path> Import .deb file(s) into a project
list <project> [distro] List packages in a project
remove <project> <distro> <pkg> Remove a single package
list-projects Show all configured projects
add-distro <codename> <desc> Add a new Ubuntu distribution
list-distros Show all configured distributions

2. Managing Projects

Create a project

sudo /srv/apt-repo/repo-manage.sh create-project myproject

This adds the project as a new component, updates the repository metadata, and automatically regenerates the landing page.

Remove a project

sudo /srv/apt-repo/repo-manage.sh remove-project myproject

This removes all packages from the project, cleans the database, and automatically regenerates the landing page.

List projects

sudo /srv/apt-repo/repo-manage.sh list-projects

3. Importing Packages

Import a single .deb file

sudo /srv/apt-repo/repo-manage.sh import cognit noble /tmp/opennebula_7.0.2-1_amd64.deb

Import all .deb files from a directory

sudo /srv/apt-repo/repo-manage.sh import cognit noble /tmp/build-output/

Import multiple files via glob

sudo /srv/apt-repo/repo-manage.sh import cognit noble /tmp/build/*.deb

List packages in a project

# All distributions
sudo /srv/apt-repo/repo-manage.sh list cognit

# Specific distribution
sudo /srv/apt-repo/repo-manage.sh list cognit noble

Remove a single package

sudo /srv/apt-repo/repo-manage.sh remove cognit noble opennebula

4. Managing Distributions

Distributions correspond to Ubuntu versions. The repo ships with jammy (22.04) and noble (24.04) by default.

Add a new distribution

sudo /srv/apt-repo/repo-manage.sh add-distro focal "Ubuntu 20.04"

This adds the distribution to all existing projects and updates the landing page. You can then import packages for that distribution normally.

Note: Packages must be compiled for the target distribution. A package built on Ubuntu 24.04 may not work on 20.04 due to different library versions. Make sure Jenkins builds for each target distribution.

List distributions

sudo /srv/apt-repo/repo-manage.sh list-distros

5. Landing Page (Auto-Generated)

The landing page is automatically regenerated every time you:

You never need to edit it manually. It always reflects the current state of the repository.

6. File Locations

PathPurpose
/srv/apt-repo/repo-manage.sh Management script
/srv/apt-repo/index.html Landing page (auto-generated)
/srv/apt-repo/docs/ Documentation
/srv/apt-repo/repo/ Repository root (reprepro)
/srv/apt-repo/repo/conf/distributions reprepro config (auto-managed)
/srv/apt-repo/repo/conf/distros.list Distribution list (codename|description)
/srv/apt-repo/repo/dists/ APT metadata (auto-generated)
/srv/apt-repo/repo/pool/ .deb files (managed by reprepro)
/etc/nginx/sites-available/apt-repo Nginx configuration