Skip to content

Tool for building building of debian packages via docker

Notifications You must be signed in to change notification settings

metux/docker-buildpackage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

91 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docker-buildpackage - easily build deb/apt packages

Prerequisites:

  • apt-based distro
  • working docker setup

Installation:

  • just clone the git repo (no system-wide installation yet)
  • check/adapt the target distro configs in cf/target/

What it does for you:

  • automatically debootstrap a build container base image
  • build deb's by launching a container, running the build inside it, pull out the deb's and cleanup again

Building a package:

  • chdir to your debianized source tree
  • call dck-buildpackage --target <target_name>
  • get big coffee ;-)
  • deb's are placed within $HOME/dckbp-apt-repo/

Regenerate apt repo index:

  • call dck-buildpackage --target <target_name>
  • creates an installable apt repo (needs an gpg key)
  • gpg key id can be set via $DCK_BUILDPACKAGE_SIGNKEY (otherwise use default)
  • if distro config sets $DISTRO_APT_USE_BUILT_REPO=1, the repo will automatically be added to the build containers

Autogenerated images:

  • apt download cache volumes: dckbp-aptacache-<target_name>
  • base images: dckbp-baseimage-<target_name>
  • build containers: dckbp-build-<target_name>-<uuid>

Cleanup:

  • temporary containers are removed automatically
  • apt caches remain until calling dck-buildpackage --cleanup

Environment variables:

Variable Description
$DCK_BUILDPACKAGE_SIGNKEY ID of the GPG key to be used for repo signing (if absent, use GPGs default sign key)
$DCK_BUILDPACKAGE_TARGET_REPO prefix of the generated apt repos. each target has its own repo in subdir named by target.
$DCK_BUILDPACKAGE_CONFDIR config directory (defaults ./cf relative to the dck-buildpackage main script)
$DCK_BUILDPACKAGE_TARBALL_CACHE cache dir for chroot tarballs (if set, don't remove tarballs and reused for image import)
$DISTRO_TARGET_REPO actual target repo directory, derived from $DCK_BUILDPACKAGE_TARGET_REPO if not given.

2DO:

  • publishing built packages to remote repos
  • a decent manpage :o
  • installable package of this tool
  • cloning git repos instead of using local source tree
  • should dck-buildpackage --cleanup also remove base images ?
  • support subdirs and dots in target names (docker names/tags are derived from that, and it doesn't like some chars in there)
  • add finer per-target configuration of base image, volume, container names
  • add cleanup for only one specific target
  • per package cache images, so deps need to be deployed only once
  • separate clean for only apt-cache, base images, containers, ...
  • command line option for separate configs
  • honor .gitignore in source trees (dont upload ignored files)

Maintainer:

License:

  • AGPLv3

About

Tool for building building of debian packages via docker

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages