🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.debian.bugs.dist
Article #6068

Bug#1155234: golang-github-prometheus-common: installed sources import gopkg.in/alecthomas/kingpin.v2, which its own go.mod does...

#6068
From: Juan Manuel Méndez Rey
Date: Wed, 25 Nov 2026 11:20
34 lines
3152 bytes
Source: golang-github-prometheus-common
Version: 0.69.0-1
Severity: normal

The sources installed by golang-github-prometheus-common-dev and the
go.mod installed next to them disagree about kingpin:

  promslog/flag/flag.go:23   kingpin "gopkg.in/alecthomas/kingpin.v2"
  go.mod:6                   github.com/alecthomas/kingpin/v2 v2.4.0

A GOPATH build never reads that go.mod, so the mismatch is invisible. A
module-aware build reads it and stops with:

  no required module provides package gopkg.in/alecthomas/kingpin.v2

so promslog/flag cannot be used from any package built with dh-go. I hit
it while measuring a dh-go port of prometheus-alertmanager.

The import rewrite is no longer needed. golang-gopkg-alecthomas-kingpin.v2-dev
2.4.0-1 installs the real module at
usr/share/gocode/src/github.com/alecthomas/kingpin/v2/ with its own
go.mod, and keeps gopkg.in/alecthomas/kingpin.v2 as a symlink to it. So
upstream's own import path resolves in both build modes today, and
reverting the rewrite would fix this without breaking GOPATH consumers.

The same rewrite is applied across the archive, about 40 source packages
in sid build-depend on golang-gopkg-alecthomas-kingpin.v2-dev, so this
will come up again as packages move to dh-go. I am reporting it here because
prometheus-common is the one that blocks first, being a dependency of
most of them.

Juan
Technical Details
Message-ID: <O3jcB-e3D6-11@gated-at.bofh.it>
Path: mbox-mo1.pugleaf.net!news-lon.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lon.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod
From: Juan Manuel Méndez Rey <juan.mendezr@proton.me>
Newsgroups: linux.debian.bugs.dist
Subject: Bug#1155234: golang-github-prometheus-common: installed sources import gopkg.in/alecthomas/kingpin.v2, which its own go.mod does not require
Date: Wed, 25 Nov 2026 12:20:01 +0100
Message-ID: <O3jcB-e3D6-11@gated-at.bofh.it>
X-Original-To: submit@bugs.debian.org
X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org  Wed Nov 25 11:17:08 2026
Old-Return-Path: <debbugs@buxtehude.debian.org>
X-Spam-Flag: NO
X-Spam-Score: -1.451
Reply-To: Juan Manuel Méndez Rey <juan.mendezr@proton.me>, 1155234@bugs.debian.org
Resent-To: debian-bugs-dist@lists.debian.org
Resent-Cc: team+pkg-go@tracker.debian.org
X-Debian-Pr-Message: report 1155234
X-Debian-Pr-Package: src:golang-github-prometheus-common
X-Debian-Pr-Source: golang-github-prometheus-common
Feedback-ID: 176548819:user:proton
X-Pm-Message-ID: be4dd3dfc3d509a01ceca784062f285c16833414
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Debian-Message: from BTS
X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/2004878
List-ID: <debian-bugs-dist.lists.debian.org>
List-URL: <https://lists.debian.org/debian-bugs-dist/>
Approved: robomod@news.nic.it
Lines: 34
Organization: linux.* mail to news gateway
Sender: robomod@news.nic.it
X-Original-Date: Wed, 25 Nov 2026 11:15:12 +0000
X-Original-Message-ID: <1795605311.89838b6e@dhgo-dep-bugs.juan.mendezr>