Docker image with tools for developing and building debian packages.
> docker run -ti --rm -v $(pwd):/workdir \
-e "DEBEMAIL=$(git config --get user.email)" \
ghcr.io/pgils/debian-pkgdevel:bullseye
uid
andgid
of thebuilder
user in the container are automatically updated to match the ownership of the/workdir
directory.DEBEMAIL
should be set if you are editing Changelogs
> apt-get source htop
> cd htop-3.0.5/
> sudo apt-get build-dep -y .
> debuild -uc -us
makepkg
is a helper script to automate building custom packages. It can fetch sources based on a pkg.conf
file. See example-package/hello-world for an example.
Example building hello-world
:
> cd example-package/hello-world
> makepkg
❯ ./makepkg -h
usage: makepkg [-sqh]
-s, --source Only fetch sources and exit
-q, --quiet Do not output to stdout
-h, --help Print this help and exit
updpkgsum
downloads a distfile and writes it's SHA-256 checksum to pkg.conf
> cd example-package/hello-world
> updpkgsum
This example uses the output from
hello-world
makerepo
searches for .deb
files recursively, so these files need to be in a path below pwd
.
> makerepo output
This will produce packages, sources, and repository index files in output/
:
output
├── packages
│ ├── hello-world_0.0.1-1_arm64.deb
│ └── Packages.gz
└── sources
├── hello-world_0.0.1-1.debian.tar.xz
├── hello-world_0.0.1-1.dsc
├── hello-world_0.0.1.orig.tar.gz
└── Sources.gz
note that packages are not signed.
❯ ./makerepo -h
usage: makerepo [-qh] OUTPUT_DIR
-q, --quiet Do not output to stdout
-h, --help Print this help and exit