Skip to content

Debpic lets you easily build Debian packages in an isolated Docker environment.

Notifications You must be signed in to change notification settings

aidan-gallagher/debpic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DEBPIC: DEbian Build Package In Container

alt text
debpic Code style: black codecov License: LGPL v3

Introduction

Debpic lets you build Debian packages in an isolated Docker environment.

See the man page for an introduction and usage instructions.

The Debian wiki has a list of similar tools.

Overview

Tasks Steps
Build package debpic
Configure Container
Different linux distribution debpic --distribution debian:11
Local apt repository debpic --local-repository ~/mydebs
Private apt repository (configure) Write deb822 format sources to /etc/debpic/sources.list.d/MyServer.sources
Private apt repository (use) debpic --sources MyServer
Install extra packages debpic --extra-pkg gdb
Run Container
Use DEB_BUILD_OPTIONS DEB_BUILD_OPTIONS="nocheck no_lto" debpic
Run command in container debpic "my command"
Pass args to dpkg-buildpackage debpic -- -b
Hook script (Configure) Write script to /etc/debpic/hooks/myscript
Hook script (Use) debpic --hook myscript
Interactive mode debpic --interactive
Open VSCode in container debpic --vscode
Set destination directory debpic --destination ~/my_built_packages
User Experience Info
Jenkins integration See Using With Jenkins.
Tab completion Yes
Man page Yes
Coloured output Yes
Caching Container is cached. Ccache enabled by default.
Config file ~/.config/debpic/debpic.conf
Built package location ./built_packages/
Include extra tools Edit ./developer-packages.txt

Simple Usage

To build any debian package - Navigate to the root directory of the source code for the debian package and run the following command.

debpic -- -b --no-sign
  • the -b tells dpkg-buildpackage to only build the binary package which will gets past the problem error: can't build with source format '3.0 (quilt)': no upstream tarball ...
  • the --no-sign tells dpkg-buildpackage to not sign the package which gets past the problem error: failed to sign ...

Installation

  1. Add the apt repository.
echo "deb https://aidangallagher.co.uk/apt-repo/ unstable main" | sudo tee /etc/apt/sources.list.d/debpic.list
  1. Add gpg key for apt repository.
gpg --keyserver keyserver.ubuntu.com --recv-keys 9945693042DB91DF

gpg --export 9945693042DB91DF | sudo tee /etc/apt/trusted.gpg.d/debpic.gpg > /dev/null
  1. Install debpic.
sudo apt update && sudo apt install debpic

NOTE: If you prefer you can download the debpic debian package directly from github.

  1. Configure docker to run as non-root user. See official docker documentation for more details.
sudo usermod -aG docker $USER
newgrp docker
  1. Optionally - configure git to globally ignore generated built_packages directory.
echo built_packages >> ~/.config/git/ignore

Documentation

For more information see the documentation.

About

Debpic lets you easily build Debian packages in an isolated Docker environment.

Resources

Stars

Watchers

Forks