55 lines
2.2 KiB
Markdown
55 lines
2.2 KiB
Markdown
|
---
|
||
|
title: 'Hilde - The Repository Format'
|
||
|
date: '2021-06-27'
|
||
|
draft: true
|
||
|
---
|
||
|
|
||
|
Welcome to the second devlog of Hilde! In this post, I'll be explaining to both
|
||
|
myself and the reader what structure Hilde should conform to. This post will
|
||
|
describe the most advanced repository possible, and will hopefully allow me to
|
||
|
create a proper to-do list of features I have to implement. Note that this post
|
||
|
is mostly a re-write of
|
||
|
[this article](https://wiki.debian.org/DebianRepository/Format#Overview).
|
||
|
|
||
|
# Concepts
|
||
|
|
||
|
## Root
|
||
|
|
||
|
Each repo has a root from which it serves all files. I'll be referring to this
|
||
|
root as `$ROOT` from now on. This root is just the base URL for the repository.
|
||
|
Any package on the repo is part of a distribution, which is basically a way to
|
||
|
organize packages into categories. For example, the official Debian
|
||
|
repositories distinguish between `stable`, `stable/updates`, etc. Here, you can
|
||
|
also see that a distribution can contain forward slashes.
|
||
|
|
||
|
## Distributions
|
||
|
|
||
|
A distribution is located at `$ROOT/dists/$DIST`, where `$DIST` is the name of
|
||
|
the distribution. Each dist provides a `Release` file with an accompanying
|
||
|
`Release.gpg`. This GPG key is then used by the package manager to sign
|
||
|
the `Release` file. Additionally, the repo provides an `InRelease` file, which
|
||
|
is the same as the `Release` file, but already signed using the GPG key. Each
|
||
|
dist contains one or more components.
|
||
|
|
||
|
## Components
|
||
|
|
||
|
Each component is a further sub-category within a distribution. A component
|
||
|
contains one or more `binary-$ARCH` subdirectories, where `$ARCH` is the
|
||
|
architecture for the binary packages within. Source packages are located inside
|
||
|
a `source` subdirectory. For each `binary-$ARCH` & `source` directory, a
|
||
|
`Contents-$ARCH` (`Contents-source` resp.) file is provided. This file is
|
||
|
usually compressed using gzip, and consists of a list of all files contained
|
||
|
within all packages inside the component.
|
||
|
|
||
|
### `binary-$ARCH` & `source` directories
|
||
|
|
||
|
These directories contain a `Packages` & `Sources` files respectively, usually
|
||
|
provided in a compressed format. These files contain a control-file style list
|
||
|
of all the packages contained within the directory.
|
||
|
|
||
|
# Types of files
|
||
|
|
||
|
## Release files
|
||
|
|
||
|
|