Skip to content
This repository was archived by the owner on May 11, 2025. It is now read-only.

Docker images for Debian package building

License

Notifications You must be signed in to change notification settings

pgils/docker-debian-pkgdevel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Debian pkgdevel

build status

Docker image with tools for developing and building debian packages.

Usage

Starting the container

> docker run -ti --rm -v $(pwd):/workdir \
    -e "DEBEMAIL=$(git config --get user.email)" \
    ghcr.io/pgils/debian-pkgdevel:bullseye
  • uid and gid of the builder user in the container are automatically updated to match the ownership of the /workdir directory.
  • DEBEMAIL should be set if you are editing Changelogs

(Re)building package from source repositories

> apt-get source htop
> cd htop-3.0.5/
> sudo apt-get build-dep -y .
> debuild -uc -us

Building custom packages with makepkg

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 usage

❯ ./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

Updating checksum with updpkgsum

updpkgsum downloads a distfile and writes it's SHA-256 checksum to pkg.conf

> cd example-package/hello-world
> updpkgsum

Generating repositories with makerepo

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 usage

❯ ./makerepo -h

  usage: makerepo [-qh] OUTPUT_DIR

    -q, --quiet         Do not output to stdout
    -h, --help          Print this help and exit

About

Docker images for Debian package building

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors 2

  •  
  •