Bug 2260773 - Problem with rebuilding golang-github-prometheus-alertmanager on FC38, FC39
Summary: Problem with rebuilding golang-github-prometheus-alertmanager on FC38, FC39
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: golang-github-prometheus-alertmanager
Version: 39
Hardware: Unspecified
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Alejandro Sáez Morollón
QA Contact: Fedora Extras Quality Assurance
URL: https://gist.github.com/belonesox/831...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-01-28 17:49 UTC by stas-fomin@yandex.ru
Modified: 2024-04-18 09:00 UTC (History)
2 users (show)

Fixed In Version: golang-github-prometheus-alertmanager-0.27.0-1.fc41
Doc Type: ---
Doc Text:
Clone Of:
Environment:
Last Closed: 2024-04-18 09:00:34 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description stas-fomin@yandex.ru 2024-01-28 17:49:24 UTC
Problem with rebuilding golang-github-prometheus-alertmanager on FC38, FC39

Using toolbox with FC39 to demonstrate:

```

wget https://dl.fedoraproject.org/pub/fedora/linux/releases/39/Everything/source/tree/Packages/g/golang-github-prometheus-alertmanager-0.23.0-15.fc39.src.rpm 

toolbox create bug-prometeus-fc39 --distro fedora --release 39 -y 
toolbox -c bug-prometeus-fc39  run sudo dnf builddep -y ./golang-github-prometheus-alertmanager-0.23.0-15.fc39.src.rpm

toolbox -c bug-prometeus-fc39  run  sudo dnf install -y rpm-build

toolbox -c bug-prometeus-fc39  run  rpmbuild --rebuild ./golang-github-prometheus-alertmanager-0.23.0-15.fc39.src.rpm

```


We got

```

/usr/lib/golang/pkg/tool/linux_amd64/compile -o $WORK/b001/_pkg_.a -trimpath "$WORK/b001=>" -p main -complete -installsuffix shared -buildid -QZCO0
O1fW7TXN3Oi8Tr/-QZCO0O1fW7TXN3Oi8Tr -goversion go1.21.6 -c=4 -shared -nolocalimports -importcfg $WORK/b001/importcfg -pack ./_build/src/github.com/
prometheus/alertmanager/cmd/alertmanager/main.go
# github.com/prometheus/alertmanager/cmd/alertmanager
_build/src/github.com/prometheus/alertmanager/cmd/alertmanager/main.go:194:37: not enough arguments in call to webflag.AddFlags
        have (*"gopkg.in/alecthomas/kingpin.v2".Application)
        want (*"github.com/alecthomas/kingpin/v2".Application, string)
_build/src/github.com/prometheus/alertmanager/cmd/alertmanager/main.go:216:23: cannot use kingpin.CommandLine (variable of type *"gopkg.in/alecthom
as/kingpin.v2".Application) as *"github.com/alecthomas/kingpin/v2".Application value in argument to promlogflag.AddFlags
_build/src/github.com/prometheus/alertmanager/cmd/alertmanager/main.go:519:37: cannot use *webConfig (variable of type web.FlagConfig) as *web.Flag
Config value in argument to web.ListenAndServe
error: Bad exit status from /var/tmp/rpm-tmp.rqpddF (%build)

```

Same problem with FC38 (checked), and probably with Rawhide

Reproducible: Always

Steps to Reproduce:
wget https://dl.fedoraproject.org/pub/fedora/linux/releases/39/Everything/source/tree/Packages/g/golang-github-prometheus-alertmanager-0.23.0-15.fc39.src.rpm 

toolbox create bug-prometeus-fc39 --distro fedora --release 39 -y 
toolbox -c bug-prometeus-fc39  run sudo dnf builddep -y ./golang-github-prometheus-alertmanager-0.23.0-15.fc39.src.rpm

toolbox -c bug-prometeus-fc39  run  sudo dnf install -y rpm-build

toolbox -c bug-prometeus-fc39  run  rpmbuild --rebuild ./golang-github-prometheus-alertmanager-0.23.0-15.fc39.src.rpm

Actual Results:  
Build failed

Expected Results:  
Build success

Comment 1 Fedora Update System 2024-04-18 08:55:52 UTC
FEDORA-2024-8580c06716 (golang-github-prometheus-alertmanager-0.27.0-1.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-8580c06716

Comment 2 Fedora Update System 2024-04-18 09:00:34 UTC
FEDORA-2024-8580c06716 (golang-github-prometheus-alertmanager-0.27.0-1.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.