GOPHIAN-MAKE(1)
π GOPHIAN-MAKE(1) π
okay bestie, so gophian-make is a page from the General Commands Manual, and it's literally the "let's get this Go module ready to be a Debian package" girlie. she's got main character energy and she's here to help. π
β¨ NAME β¨
gophian-make β get a Go module all prepped and pretty for packaging in Debian π«Ά
πΈ SYNOPSIS πΈ
gophian make <IMPORTPATH> [OPTIONS]
π¦ DESCRIPTION π¦
so this subcommand is the one that gets a Debian package ready for Go software, and the way it does it is so iconic: it produces a DEP-14 and Go team compliant Git repository that has the latest appropriate upstream source imported, plus initial packaging files that have been filled out intelligently as best as possible. like, it literally does the homework for you. π
Before it even starts, Gophian will check if the IMPORTPATH you passed has already been packaged for Debian. this uses the same functionality as gophian-show(1) and gophian-search(1), which relies on the XS-Go-Import-Path field specified in Debian source packages. If it's found, Gophian will warn you, and unless the --no-warn-packaged option was passed, the program will exit. no cap, it just dips. π
If Gophian finds binary programs (files that start with "package 'main'") in the upstream code, it will prompt you to choose what type of package you intend to create. and you can skip that whole convo ahead of time by setting the --type option. so considerate fr fr.
- Library only β the package is only intended to be imported by other programs. The source package will be named after the library. this is most Go packages depended on by other projects. π
- Library and accompanying binaries β the package is intended to be imported by other programs, with a helper or side program(s), usually meant to be used alongside the library. The source package will be named after the library. For example, the main purpose of
github.com/go-git/go-gitis to be used by other code, but also includes a proof-of-concept CLI calledgo-git. β¨ - Binaries and accompanying library β the package is intended to be used by the end user as a program, but also supplies a library to programs that want to consume it. The source package will be named after the binary. For example, Docker is mainly used as a CLI, but is also intentionally developed by upstream in such a way that it is reusable to other projects, and so is also available as a library. π
- Binary only β the package is only intended to be used as a program by the end user, and no library package should be created. The source package will be named after the binary. this is most end-user programs written in Go. π
If no binary packages are found, the "Library only" package type is chosen automatically without prompting you. she just knows. π§
If you selected one of the package types that include one or more binaries, you will then be prompted to select which binaries you'd like to include in the generated d/control template. you should use this opportunity to check for and exclude any example programs that are not intended to be built. yes bestie, this is your moment to be picky. π
If you selected one of the package types "Binaries and accompanying library" or "Binary only", you will be prompted to choose which binary to name the source package after. this should usually be the name of the primary program intended to be used by the end user, which is often also the name of the upstream project itself.
Following this, Gophian will check for any existing Salsa repos under the Go team with this name of source package, and warn you if one has been found. The program will then exit unless the --no-warn-salsa flag was passed.
Gophian will also check for any open Intent to Package (ITP) or Request for Package (RFP) bugs matching the source package name and warn you. If found, this will be filled in the generated d/changelog for you. she's got you. π
Gophian will now prepare the packaging Git repository, importing the latest upstream source and generating the initial packaging files. It will also check for any unpackaged dependencies and test dependencies and warn you about them. so thorough, we stan. β
Once this is complete, it is strongly recommended you review all the Debian packaging files generated by Gophian and ensure all information is correct, and then fill in any missing information and complete any additional packaging work required.
π bestie please actually read what she generated, don't just ship it blind, ok? reviewing is the vibe.
π ARGUMENTS π
IMPORTPATHβ The import path of the Go package being Debianized.
π OPTIONS π
--type [l|l+b|b+l|b]β Select the type of software being packaged. Can be one of "Library only", "Library and accompanying binaries", "Binaries and accompanying library", or "Binaries only", denoted by"l","l+b","b+l", or"b"respectively.--name <NAME>β Name of package maintainer. UsesDEBFULLNAMEenvironment variable by default. (required)--email <EMAIL>β Email of package maintainer. UsesDEBEMAILenvironment variable by default. (required)--[no-]quietβ Don't print warnings. π€«--[no-]warn-packagedβ Warn if the given Go package has already been packaged for Debian. (default:true)--[no-]warn-salsaβ Warn if the package already has a repo under the Go team namespace on Salsa. (default:true)--[no-]itpβ Generate an ITP template as well. (default:false)--[no-]todoβ Generate adebian/TODOfile. (default:false)--[no-]pristine-tarβ Create apristine-tarbranch and delta file. (default:false)--[no-]gpg-signβ GPG sign the commit that merges the upstream tarball into the packaging branch. If not passed to Gophian, then it will not be passed togitnorgbpand they will use their configured defaults.--[no-]include-upstream-historyβ Include upstream git history. Upstream will be tracked with the'upstreamvcs'remote, and commits that import new package versions will include the upstream commit or tag as a parent. (default:false)--git-remote [ssh|https]β Protocol to use when setting Git remote. (default:ssh)--debian-branch <BRANCH>β Name of Debian packaging branch. (default:debian/unstable)--upstream-branch <BRANCH>β Name of upstream branch. (default:upstream/latest)--source-name <NAME>β Manually set name of source package.--helpβ Show help message and exit.
π ENVIRONMENT π
DEBFULLNAMEβ Used for--name.DEBEMAILβ Used for--email.GOPHIAN_ITPβ Used for--[no-]itp.GOPHIAN_TODOβ Used for--[no-]todo.GOPHIAN_PRISTINE_TARβ Used for--[no-]pristine-tar.GOPHIAN_REMOTEβ Used for--git-remote.GOPHIAN_GPG_SIGNβ Used for--[no-]gpg-sign.GOPHIAN_DEBIAN_BRANCHβ Used for--debian-branch.GOPHIAN_UPSTREAM_BRANCHβ Used for--upstream-branch.
π«Ά SEE ALSO π«Ά
gophian(1), gophian-license-text(1)
and that's the whole thing bestie, go slay some packaging. πβ¨ this page came straight out of the General Commands Manual and it's dated 2025-12-25 β happy packaging, and remember: Gophian said it, so it's canon. ππ
π¦ where this page comes from
- ubuntu resolute: gophian 0.7.0-1 Β· GPL-3.0-or-later
- ubuntu stonking: gophian 0.7.0-1 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms