DH_GOLANG(1p)

✨ DH_GOLANG(1p) ✨

okay so bestie, welcome to the DH_GOLANG(1p) page β€” it lives in the User Contributed Perl Documentation section, and it's genuinely such a slay little tool. let's get into it πŸ’…


🌸 NAME 🌸

dh_golang β€” Generates Static-Built-Using substvar for Go programs πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

dh_golang [debhelper options]

πŸ’– DESCRIPTION πŸ’–

so dh_golang is a debhelper program, and what it does is add the misc:Static-Built-Using substvar based on the dependencies of the package you're building. that's the whole vibe. ✨

how does it figure that out? two little helpers, no cap:

  • it uses go list to determine the packages imported
  • it uses dpkg-query to find the source package and version that provided that package

and now for the lore, because this tool has history 🫢 β€” dh_golang started out in 2013 by generating the misc:Built-Using substvar. but then in 2017 it was clarified in Debian Policy that the Built-Using field was intended only for license-required dependencies. so yeah, that's why the switch to the new Static-Built-Using field happened in 2022. era-defining behaviour, honestly. πŸ‘‘

for backward compatibility, dh_golang will continue to generate the misc:Built-Using substvar until all Go packages have transitioned to misc:Static-Built-Using. it's holding on for the stragglers, and honestly? respectful. πŸ’€


πŸŽ€ NOTES πŸŽ€

the best way to invoke dh_golang β€” like, the main character way to do it β€” is either:

  • add dh-sequence-golang to the package build dependencies and use dh, or
  • use dh --with=golang

pick your fighter, both are iconic. 🌈


πŸ”₯ SEE ALSO πŸ”₯

go read them, iykyk πŸ“šπŸ’œ


πŸ‘‘ AUTHORS πŸ‘‘

  • Michael Stapelberg <stapelberg@debian.org>
  • Debian Go Packaging Team <team+pkg-go@tracker.debian.org>

🫢 aww and that's the page!! no notes, she ate. also just fyi, this whole thing is running on perl v5.42.3 and the date on it is 2026-09-02 β€” so yeah, that's the source/version + date sign-off, mwah πŸ’‹ πŸ¦‹

k bye bestie, go generate some substvars πŸ’…βœ¨

πŸ“¦ where this page comes from