Gunnar

nordisk/holger

.nornir/deb-rpm-native-metadata-for-idiots.md

# Serving .deb / .rpm packages — for absolute beginners

> **Class:** `idiot`. No jargon, nothing assumed. You have a folder of `.deb` or
> `.rpm` files and you want `apt` / `dnf` on another machine to install from it —
> offline, through holger. This spells it out. The grown-up version is
> [`deb-rpm-native-metadata-guide`](deb-rpm-native-metadata-guide.md).

## What you're about to do

`.deb` files are Linux packages for Debian and Ubuntu. `.rpm` files are the same
idea for Red Hat and Fedora. Normally your machine downloads them from the internet.
Holger lets you keep a pile of them **inside** a network with no internet, and hands
them out exactly the way `apt` and `dnf` already expect — so the normal install
commands just work.

The good news: **holger builds the "catalogue" for you automatically.** `apt` and
`dnf` won't install anything until they can read a catalogue (a list of every package
and what it needs). You do not have to write that list. Holger opens each `.deb` /
`.rpm`, reads the real details out of it — what it's called, what it needs to run
(its "dependencies"), who made it, a one-line description — and builds the catalogue
from that. You just supply the package files.

## The whole thing in one breath

> Drop your `.deb` / `.rpm` files into a holger archive, start holger, and point
> `apt` / `dnf` at it. Holger reads each package and writes the catalogue itself, so
> the ordinary `apt install` / `dnf install` commands work — with no internet.

## Step by step

You need a terminal (the black window where you type) and holger built. If holger
isn't built yet, do the beginner walk-through in [`for-idiots`](for-idiots.md) first.

**1. Gather your packages.** Put all your `.deb` files (or all your `.rpm` files) in
one folder. That's it — no renaming, no special layout.

**2. Pack them into a holger archive.** Holger stores packages in one sealed file
called a `.znippy`. The holger **agent** makes it from your folder — the
[`agent-guide`](agent-guide.md) shows the one command. You do **not** need any
special "plugin" or option; a plain pile of packages is exactly what holger expects.

**3. Tell holger to serve it.** Add a few lines to holger's config file
(`holger.ron`) naming your archive as a repository, and start the server. The
[`serve-guide`](serve-guide.md) has a first config you can copy.

**4. Point your other machine at it.**

For Debian / Ubuntu, add one line to the machine's apt sources (the
`[trusted=yes]` tells apt "I trust this, don't ask for a signature" — right for a
private offline setup):

```
deb [trusted=yes] http://your-holger-server:8081/debrepo stable main
```

then:

```
apt update
apt install <the-package-you-want>
```

For Red Hat / Fedora, add a little `.repo` file pointing at holger (with
`gpgcheck=0` for the same "it's mine, don't ask" reason), then:

```
dnf install <the-package-you-want>
```

That's the whole job. `apt` / `dnf` reads holger's auto-built catalogue, downloads
the package from your sealed archive, and installs it — no internet involved.

## Why this is nicer than it used to be

Older holger could only guess a package's name and version from its **filename**. It
couldn't tell `apt` what a package *needs* to run, so complex installs could stall.
Now holger looks **inside** each package and reads the real information, so
dependency-heavy installs resolve properly. You don't do anything different — it just
works better.

## If something doesn't install

- **Double-check the URL and port** in your apt source / `.repo` file match how you
  started holger (the default port is `8081`).
- **Run `apt update` again** after any change — apt caches the catalogue.
- Holger can't be tricked or crashed by a weird package: if one file is broken it's
  quietly skipped, the rest still serve. So a failed install is almost always the URL
  or a missing package in your folder, not holger choking.
- Want a login so not just anyone can use it? See
  [`auth-for-idiots`](auth-for-idiots.md).