apotiki: a faster debian repository

[ library, mit, program, system ] [ Propose Tags ]

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:

[Skip to Readme]
Versions [RSS] [faq] 0.5.1, 0.5.2
Dependencies aeson (>=, attoparsec (>=, base (==4.6.*), binary (>=, bytestring (>=, containers (>=, crypto-api (==, cryptohash (>=0.9.1), directory (>=, http-types (>=0.8.3), old-time (>=, openpgp (>=0.6.1), openpgp-asciiarmor (>=0.1), openpgp-crypto-api (>=0.6.3), scotty (>=0.6.2), strict (>=0.3.2), tar (>=, text (>=, transformers (>=, wai-extra (>=, wai-middleware-static (>=, zlib (>= [details]
License MIT
Author Pierre-Yves Ritschard
Maintainer pyr@spootnik.org
Category System
Home page https://github.com/pyr/apotiki
Uploaded by pyr at 2014-01-24T22:51:39Z
Distributions NixOS:0.5.2
Executables apotiki
Downloads 1788 total (8 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs available [build log]
Successful builds reported [all 2 reports]




Maintainer's Corner

For package maintainers and hackage trustees


Readme for apotiki-0.5.2

[back to package description]

apotiki: a faster debian repository


(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.


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


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.


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


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 repository-key@your.domain > /etc/apotiki.key

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


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