MyNixOS website logo
Description

a faster debian repository.

apotiki generates debian repositories fast. its goal is to be a great companion to fpm and jenkins.

apotiki operates with the following features and constraints:

  • Supports a single debian release

  • Supports a single debian component

  • Supports an arbitrary number of architectures which need to be preprovisionned

  • Requires a valid PGP private key for signing

apotiki: a faster debian repository

apotiki

(image source)

apotiki generates debian repositories fast. its goal is to be a great companion to fpm and jenkins.

apotiki operates with the following features and constraints:

  • Supports a single debian release
  • Supports a single debian component
  • Supports an arbitrary number of architectures which need to be preprovisionned
  • Requires a valid PGP private key for signing

The Story

You operate a production environment and rely on software that is more recent than is available on a standard Debian or Ubuntu distribution ? Apotiki helps you distribute software by creating a separate debian repository which you can add to your apt sources.

Turns out there's already software available for this, such as freight, apotiki's angle is to work very fast for the most common use case.

Companion software

fpm is a great tool to build Debian packages with. It can produce packages from directories, gems, npm or pip libraries.

jenkins or travis-ci can produce artifacts by running scripts.

Using

apotiki has two modes of operation, try not to mix the two too much:

  • apotiki insert: pushes a list of packages, given on the command line to the repo
  • apotiki web: start up a web service on port 8000 to display the repository and accept new packages

Running apotiki with no arguments or help will tell you a bit about usage.

If you wish to submit packages to the repository with curl here is the relevant command line assuming your package file is package-foo.deb

curl -X POST -F "package=@/path/to/package-foo.deb" http://repo-host:8000/repo

Building

Apotiki is a haskell program and relies on both the ghc compiler and cabal. They are probably already available in your platform of choice.

Once cabal is installed, just run:

cabal install

Alternatively, you can build apotiki with docker. Just run:

sudo docker build .

The resulting container will have the built cabal executable.

Installing

You can either run cabal install locally or distribute the built executable available in dist/build/apotiki/apotiki.

Configuring

For now the configuration is a serialized haskell structure:

ApotikiConfig {
  keyPath = "/etc/apotiki.key",      -- path to a PGP private key
  architectures = ["amd64", "i386"], -- list of supported architectures
  component = "main",                -- debian release component
  release = "precise",               -- debian release name
  label = "Apotiki",                 -- release label
  origin = "Apotiki",                -- release origin
  repoDir = "/srv/repo"              -- repository location, expose via http
}

The PGP private key you wish to use can be exported with:

gpg --export-secret-keys [email protected] > /etc/apotiki.key

The config file path can be controlled with the APOTIKI_CONFIG environment variable.

Caveats

Error handling is suboptimal to say the least. we'll get there.

Metadata

Version

0.5.2

License

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows