Skip to content

Debian/dh-make-golang

Folders and files

NameName
Last commit message
Last commit date
Feb 18, 2025
Nov 25, 2021
Nov 2, 2015
Jan 28, 2025
Mar 20, 2024
Aug 29, 2024
Sep 6, 2021
Mar 20, 2024
Oct 17, 2021
Oct 17, 2021
Jan 14, 2025
Jan 19, 2025
May 2, 2025
Jul 21, 2015
Jan 6, 2025
Feb 20, 2025
Feb 20, 2025
Mar 22, 2024
Apr 22, 2025
Mar 22, 2024
Jan 17, 2022
Feb 13, 2020
Aug 26, 2021
Feb 20, 2025
Mar 22, 2024
Feb 23, 2025
Mar 20, 2024

Repository files navigation

CI Test

dh-make-golang is a tool to automatically create Debian packaging for Go packages. Its goal is to automate away as much of the work as possible when creating a Debian package for a Go library package or Go program.

Overview

All you need to specify is a Go package name. In your current working directory, a new directory will be created containing a git repository. Inside that repository, you’ll find the Go package’s source code plus the necessary Debian packaging files to build a Debian package. The packaging adheres to the pkg-go packaging guidelines and hence can be placed alongside the other team-maintained packages in pkg-go, hosted on Debian’s salsa.

Usage/example

For an introductory example, see this annotated demonstration of how to use dh-make-golang.

dh-make-golang’s usage of the internet

dh-make-golang makes heavy use of online resources to improve the resulting package. In no particular order and depending on where your package is hosted, dh-make-golang may query:

  • By virtue of using go get, the specified Go package and all of its dependencies will be downloaded. This step can quickly cause dozens of megabytes to be transferred, so be careful if you are on a metered internet connection.
  • The output of filter-packages.sh, hosted on https://people.debian.org/~stapelberg/dh-make-golang/. This is used to figure out whether dependencies are already packaged in Debian, and whether you are about to duplicate somebody else’s work.
  • GitHub’s API, to get the license, repository creator, description and README for Go packages hosted on GitHub.