Skip to content

System Packages Guide

Artifact Keeper provides native repository support for major Linux package formats including Debian/APT, RPM/YUM/DNF, Alpine/APK, and OPKG.

Debian / APT

Artifact Keeper provides a full Debian package repository compatible with apt, apt-get, and dpkg.

Endpoint

http://localhost:8080/debian/{repo}

Repository Key

debian

Configuration

Add the Artifact Keeper repository to your APT sources:

Terminal window
# Add repository to sources.list.d
echo "deb [trusted=yes] http://localhost:8080/debian/stable main" | \
sudo tee /etc/apt/sources.list.d/artifact-keeper.list
# Update package index
sudo apt update

GPG Key Import

For signed repositories, import the GPG key:

Terminal window
# Download and add GPG key
curl -fsSL http://localhost:8080/debian/stable/key.gpg | \
sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/artifact-keeper.gpg
# Configure with signed repository
echo "deb [signed-by=/etc/apt/trusted.gpg.d/artifact-keeper.gpg] http://localhost:8080/debian/stable main" | \
sudo tee /etc/apt/sources.list.d/artifact-keeper.list
sudo apt update

Publishing Packages

Upload .deb packages to your repository:

Terminal window
# Using curl
curl -u username:password -X POST \
-F "file=@mypackage_1.0.0_amd64.deb" \
http://localhost:8080/api/artifacts/debian/stable
# Using the Artifact Keeper CLI
ak publish debian/stable mypackage_1.0.0_amd64.deb

Installing Packages

Once configured, install packages using standard APT commands:

Terminal window
# Install package
sudo apt install mypackage
# Install specific version
sudo apt install mypackage=1.0.0
# Search for packages
apt search mypackage
# Show package information
apt show mypackage

Multiple Distributions

Support multiple Debian distributions:

Terminal window
# Ubuntu focal
echo "deb [trusted=yes] http://localhost:8080/debian/ubuntu-focal main" | \
sudo tee /etc/apt/sources.list.d/artifact-keeper.list
# Debian bullseye
echo "deb [trusted=yes] http://localhost:8080/debian/debian-bullseye main" | \
sudo tee /etc/apt/sources.list.d/artifact-keeper.list

RPM / YUM / DNF

Artifact Keeper provides RPM repository support compatible with yum, dnf, and zypper.

Endpoint

http://localhost:8080/rpm/{repo}

Repository Key

rpm

Configuration

Create a repository configuration file:

Terminal window
# For YUM/DNF (RHEL, CentOS, Fedora)
sudo tee /etc/yum.repos.d/artifact-keeper.repo <<EOF
[artifact-keeper]
name=Artifact Keeper Repository
baseurl=http://localhost:8080/rpm/stable
enabled=1
gpgcheck=0
EOF
# For Zypper (openSUSE)
sudo zypper addrepo http://localhost:8080/rpm/stable artifact-keeper

GPG Key Import

For signed repositories:

Terminal window
# Import GPG key
sudo rpm --import http://localhost:8080/rpm/stable/repodata/repomd.xml.key
# Enable GPG checking
sudo tee /etc/yum.repos.d/artifact-keeper.repo <<EOF
[artifact-keeper]
name=Artifact Keeper Repository
baseurl=http://localhost:8080/rpm/stable
enabled=1
gpgcheck=1
gpgkey=http://localhost:8080/rpm/stable/repodata/repomd.xml.key
EOF

Publishing Packages

Upload .rpm packages to your repository:

Terminal window
# Using curl
curl -u username:password -X POST \
-F "file=@mypackage-1.0.0-1.x86_64.rpm" \
http://localhost:8080/api/artifacts/rpm/stable
# Using the Artifact Keeper CLI
ak publish rpm/stable mypackage-1.0.0-1.x86_64.rpm

Installing Packages

Install packages using YUM or DNF:

Terminal window
# YUM (RHEL 7, CentOS 7)
sudo yum install mypackage
# DNF (RHEL 8+, CentOS 8+, Fedora)
sudo dnf install mypackage
# Install specific version
sudo dnf install mypackage-1.0.0
# Search for packages
sudo dnf search mypackage
# Show package information
sudo dnf info mypackage

Zypper (openSUSE)

For openSUSE systems using Zypper:

Terminal window
# Refresh repositories
sudo zypper refresh
# Install package
sudo zypper install mypackage
# Search for packages
sudo zypper search mypackage

Alpine / APK

Artifact Keeper provides Alpine package repository support for apk.

Endpoint

http://localhost:8080/alpine/{repo}

Repository Key

alpine

Configuration

Add the repository to your APK configuration:

Terminal window
# Add repository (unsigned)
echo "http://localhost:8080/alpine/v3.18/main" | \
sudo tee -a /etc/apk/repositories
# Update package index
sudo apk update

Repository Signing

For signed repositories, import the public key:

Terminal window
# Download public key
curl -fsSL http://localhost:8080/alpine/v3.18/key.rsa.pub \
-o /etc/apk/keys/artifact-keeper.rsa.pub
# Add signed repository
echo "http://localhost:8080/alpine/v3.18/main" | \
sudo tee -a /etc/apk/repositories
sudo apk update

Publishing Packages

Upload .apk packages:

Terminal window
# Using curl
curl -u username:password -X POST \
-F "file=@mypackage-1.0.0-r0.apk" \
http://localhost:8080/api/artifacts/alpine/v3.18/main
# Using the Artifact Keeper CLI
ak publish alpine/v3.18/main mypackage-1.0.0-r0.apk

Installing Packages

Install packages using APK:

Terminal window
# Install package
sudo apk add mypackage
# Install specific version
sudo apk add mypackage=1.0.0-r0
# Search for packages
apk search mypackage
# Show package information
apk info mypackage

Multiple Alpine Versions

Support multiple Alpine versions:

Terminal window
# Alpine 3.18
echo "http://localhost:8080/alpine/v3.18/main" | \
sudo tee -a /etc/apk/repositories
# Alpine 3.19
echo "http://localhost:8080/alpine/v3.19/main" | \
sudo tee -a /etc/apk/repositories

OPKG

Artifact Keeper provides OPKG package repository support for OpenWrt and embedded Linux systems.

Endpoint

http://localhost:8080/opkg/{repo}

Repository Key

opkg

Configuration

Add the repository to your OPKG configuration:

Terminal window
# Add to custom feeds
echo "src/gz artifact_keeper http://localhost:8080/opkg/stable" | \
sudo tee -a /etc/opkg/customfeeds.conf
# Update package lists
opkg update

Publishing Packages

Upload .ipk packages:

Terminal window
# Using curl
curl -u username:password -X POST \
-F "file=@mypackage_1.0.0_mips.ipk" \
http://localhost:8080/api/artifacts/opkg/stable
# Using the Artifact Keeper CLI
ak publish opkg/stable mypackage_1.0.0_mips.ipk

Installing Packages

Install packages using OPKG:

Terminal window
# Install package
opkg install mypackage
# Install specific version
opkg install mypackage_1.0.0
# Search for packages
opkg find mypackage
# Show package information
opkg info mypackage

Architecture-Specific Feeds

Organize packages by architecture:

Terminal window
# MIPS architecture
echo "src/gz artifact_keeper_mips http://localhost:8080/opkg/mips" | \
sudo tee -a /etc/opkg/customfeeds.conf
# ARM architecture
echo "src/gz artifact_keeper_arm http://localhost:8080/opkg/arm" | \
sudo tee -a /etc/opkg/customfeeds.conf
opkg update

Repository Signing

For production deployments, sign your repositories to ensure package integrity and authenticity.

See the Repository Signing Guide for detailed instructions on:

  • Generating GPG keys for package signing
  • Signing individual packages
  • Signing repository metadata
  • Configuring clients to verify signatures
  • Key rotation and management

Integration with CI/CD

GitHub Actions Example

Build and publish packages automatically:

name: Build and Publish Package
on: [push]
jobs:
build-deb:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build Debian package
run: |
dpkg-buildpackage -us -uc -b
mv ../mypackage_*.deb .
- name: Publish to Artifact Keeper
run: |
curl -u ${{ secrets.REGISTRY_USERNAME }}:${{ secrets.REGISTRY_PASSWORD }} \
-X POST \
-F "file=@mypackage_1.0.0_amd64.deb" \
https://registry.example.com/api/artifacts/debian/stable
build-rpm:
runs-on: ubuntu-latest
container: fedora:latest
steps:
- uses: actions/checkout@v4
- name: Install build tools
run: dnf install -y rpm-build rpmdevtools
- name: Build RPM package
run: |
rpmdev-setuptree
rpmbuild -ba mypackage.spec
mv ~/rpmbuild/RPMS/x86_64/*.rpm .
- name: Publish to Artifact Keeper
run: |
curl -u ${{ secrets.REGISTRY_USERNAME }}:${{ secrets.REGISTRY_PASSWORD }} \
-X POST \
-F "file=@mypackage-1.0.0-1.x86_64.rpm" \
https://registry.example.com/api/artifacts/rpm/stable

GitLab CI Example

build:deb:
stage: build
image: debian:bullseye
script:
- apt-get update && apt-get install -y build-essential devscripts
- dpkg-buildpackage -us -uc -b
- mv ../mypackage_*.deb .
artifacts:
paths:
- mypackage_*.deb
publish:deb:
stage: deploy
script:
- |
curl -u $REGISTRY_USERNAME:$REGISTRY_PASSWORD \
-X POST \
-F "file=@mypackage_1.0.0_amd64.deb" \
https://registry.example.com/api/artifacts/debian/stable
dependencies:
- build:deb
only:
- main

Jenkins Pipeline Example

pipeline {
agent any
stages {
stage('Build') {
steps {
sh 'dpkg-buildpackage -us -uc -b'
sh 'mv ../mypackage_*.deb .'
}
}
stage('Publish') {
steps {
withCredentials([usernamePassword(
credentialsId: 'artifact-keeper',
usernameVariable: 'USERNAME',
passwordVariable: 'PASSWORD'
)]) {
sh '''
curl -u $USERNAME:$PASSWORD \
-X POST \
-F "file=@mypackage_1.0.0_amd64.deb" \
https://registry.example.com/api/artifacts/debian/stable
'''
}
}
}
}
}

Troubleshooting

Repository Not Found

If packages are not visible after publishing:

Terminal window
# Verify repository metadata was generated
curl http://localhost:8080/debian/stable/Packages
curl http://localhost:8080/rpm/stable/repodata/repomd.xml
curl http://localhost:8080/alpine/v3.18/main/APKINDEX.tar.gz
# Force metadata regeneration
curl -u username:password -X POST \
http://localhost:8080/api/repositories/debian/stable/reindex

GPG Verification Failures

If package installation fails with GPG errors:

Terminal window
# Debian/Ubuntu: verify key is imported
apt-key list
gpg --list-keys
# RHEL/CentOS: verify key is imported
rpm -q gpg-pubkey --qf '%{NAME}-%{VERSION}-%{RELEASE}\t%{SUMMARY}\n'
# Alpine: verify key exists
ls -la /etc/apk/keys/

Architecture Mismatch

Ensure packages match your system architecture:

Terminal window
# Check system architecture
uname -m
dpkg --print-architecture # Debian/Ubuntu
rpm -q --qf '%{ARCH}\n' bash # RHEL/CentOS
# Verify package architecture
dpkg-deb -I mypackage.deb | grep Architecture
rpm -qip mypackage.rpm | grep Architecture

Connection Issues

If unable to reach the repository:

Terminal window
# Test connectivity
curl -I http://localhost:8080/debian/stable/
# Check DNS resolution
nslookup registry.example.com
# Test with verbose output
apt update -o Debug::Acquire::http=true
yum install mypackage -v

Permission Denied

For authentication errors:

Terminal window
# Verify credentials
curl -u username:password http://localhost:8080/api/user/info
# Check repository permissions
curl -u username:password http://localhost:8080/api/repositories
# Use token authentication
curl -H "Authorization: Bearer $TOKEN" \
http://localhost:8080/api/artifacts/debian/stable

Best Practices

Version Naming

Follow distribution conventions:

Terminal window
# Debian: package_version_architecture.deb
mypackage_1.0.0_amd64.deb
mypackage_1.0.0-1_arm64.deb
# RPM: package-version-release.architecture.rpm
mypackage-1.0.0-1.x86_64.rpm
mypackage-1.0.0-2.el8.aarch64.rpm
# Alpine: package-version-release.apk
mypackage-1.0.0-r0.apk
mypackage-1.0.0-r1.apk
# OPKG: package_version_architecture.ipk
mypackage_1.0.0_mips.ipk
mypackage_1.0.0_arm.ipk

Repository Organization

Organize repositories by distribution and version:

Terminal window
# Debian
/debian/ubuntu-20.04
/debian/ubuntu-22.04
/debian/debian-11
/debian/debian-12
# RPM
/rpm/el7
/rpm/el8
/rpm/el9
/rpm/fedora-38
# Alpine
/alpine/v3.18
/alpine/v3.19
# OPKG
/opkg/openwrt-22.03
/opkg/openwrt-23.05

Package Metadata

Include comprehensive package metadata:

  • Clear package descriptions
  • Accurate dependency declarations
  • Changelog entries
  • Maintainer information
  • License information

Testing Before Production

Always test packages in a staging environment:

Terminal window
# Use separate repositories for testing
/debian/stable # Production
/debian/testing # Pre-production testing
/debian/unstable # Development builds

See Also