Created attachment 1898536 [details] Log of a docker build run that shows the error Description of problem: When I try to setup a build environment on fresh Fedora 36 for one of my go projects, I get the following error while installing the packages: Error: Transaction test error: file /usr/share/gocode/src/github.com/prometheus/common/config/config_test.go conflicts between attempted installs of golang-github-prometheus-common-promlog-devel-0.30.0-5.fc36.noarch and golang-github-prometheus-common-devel-0.35.0-1.fc36.noarch file /usr/share/gocode/src/github.com/prometheus/common/config/http_config.go conflicts between attempted installs of golang-github-prometheus-common-promlog-devel-0.30.0-5.fc36.noarch and golang-github-prometheus-common-devel-0.35.0-1.fc36.noarch file /usr/share/gocode/src/github.com/prometheus/common/config/http_config_test.go conflicts between attempted installs of golang-github-prometheus-common-promlog-devel-0.30.0-5.fc36.noarch and golang-github-prometheus-common-devel-0.35.0-1.fc36.noarch file /usr/share/gocode/src/github.com/prometheus/common/config/tls_config_test.go conflicts between attempted installs of golang-github-prometheus-common-promlog-devel-0.30.0-5.fc36.noarch and golang-github-prometheus-common-devel-0.35.0-1.fc36.noarch file /usr/share/gocode/src/github.com/prometheus/common/promlog/log.go conflicts between attempted installs of golang-github-prometheus-common-promlog-devel-0.30.0-5.fc36.noarch and golang-github-prometheus-common-devel-0.35.0-1.fc36.noarch Version-Release number of selected component (if applicable): 0.30.0 How reproducible: Steps to Reproduce: 1. Take a fresh Fedora 36 installation 2. Run: yum -y update && yum clean all 3. Run: yum -y install redhat-lsb rubygem-ronn-ng rpmdevtools rpmlint rpm-build rpm-sign gzip curl man-db binutils wget golang git golang-github-prometheus-common-promlog-devel golang-github-prometheus-client-model-devel go-rpm-macros openssh-clients copr-cli gnupg Actual results: Error: Transaction test error: file /usr/share/gocode/src/github.com/prometheus/common/config/config_test.go conflicts between attempted installs of golang-github-prometheus-common-promlog-devel-0.30.0-5.fc36.noarch and golang-github-prometheus-common-devel-0.35.0-1.fc36.noarch file /usr/share/gocode/src/github.com/prometheus/common/config/http_config.go conflicts between attempted installs of golang-github-prometheus-common-promlog-devel-0.30.0-5.fc36.noarch and golang-github-prometheus-common-devel-0.35.0-1.fc36.noarch file /usr/share/gocode/src/github.com/prometheus/common/config/http_config_test.go conflicts between attempted installs of golang-github-prometheus-common-promlog-devel-0.30.0-5.fc36.noarch and golang-github-prometheus-common-devel-0.35.0-1.fc36.noarch file /usr/share/gocode/src/github.com/prometheus/common/config/tls_config_test.go conflicts between attempted installs of golang-github-prometheus-common-promlog-devel-0.30.0-5.fc36.noarch and golang-github-prometheus-common-devel-0.35.0-1.fc36.noarch file /usr/share/gocode/src/github.com/prometheus/common/promlog/log.go conflicts between attempted installs of golang-github-prometheus-common-promlog-devel-0.30.0-5.fc36.noarch and golang-github-prometheus-common-devel-0.35.0-1.fc36.noarch Expected results: The named packages are installed and usable Additional info: I found this problem when I tried to build this docker file: https://github.com/imker25/samba_exporter/blob/main/build/rpm-publish/Dockerfile.fedora36 Log from the docker build is attached to this bug But I can reproduce it on a VM with Fedora 36 as well.
Hm. Looks like the 0.35 update[1] didn't include the -promlog-devel package. The 0.30 update[2] did. [1] https://koji.fedoraproject.org/koji/buildinfo?buildID=1991099 [2] https://koji.fedoraproject.org/koji/buildinfo?buildID=1923279 So that's why the two versions don't match even though the have the same SRPM name. @zebob.m is this something you're aware of?
(I am not the primary maintainer of this package. I am helping out as a member of the Go SIG.) Thank you for the report! It looks like the golang-github-prometheus-common-promlog-devel subpackage was combined with golang-github-prometheus-common-devel but the proper Provides and Obsoletes that ensure a smooth update path were not added. This is causing conflicts, because dnf is trying to install the new merged golang-github-prometheus-common-devel package at the same time as the old golang-github-prometheus-common-promlog-devel before this merge occurred. I have submitted a PR[1] to add the correct Obsoletes and virtual Provides to the package. The virtual Provides will make it so golang-github-prometheus-common-promlog-devel points to the new combined golang-github-prometheus-common-devel. However, you should still remove golang-github-prometheus-common-promlog-devel from the list of packages in your Containerfile. Keeping that old package name there is redundant and will stop working when we remove this compatibility layer in a future release. Do note that this usecase is not really supported. The golang-*-devel packages are only intended to be used in the buildsystem for building Go applications that Fedora ships. Also, you should not rely on the package names; your package should directly Require the `golang(*)` Provides (e.g. `golang(github.com/prometheus/common/config`) for the import paths it needs. [1]: https://src.fedoraproject.org/rpms/golang-github-prometheus-common/pull-request/2
FEDORA-2022-339c22eeaf has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2022-339c22eeaf
FEDORA-2022-339c22eeaf has been pushed to the Fedora 38 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2022-454cac1718 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-454cac1718
FEDORA-2022-ed6d183a58 has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-ed6d183a58
FEDORA-2022-454cac1718 has been pushed to the Fedora 37 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2022-454cac1718` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-454cac1718 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2022-ed6d183a58 has been pushed to the Fedora 36 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2022-ed6d183a58` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-ed6d183a58 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
(In reply to Maxwell G from comment #2) Hello Maxwell, thanks for your response > (I am not the primary maintainer of this package. I am helping out as a > member of the Go SIG.) > > Thank you for the report! > > It looks like the golang-github-prometheus-common-promlog-devel subpackage > was combined with golang-github-prometheus-common-devel but the proper > Provides and Obsoletes that ensure a smooth update path were not added. This > is causing conflicts, because dnf is trying to install the new merged > golang-github-prometheus-common-devel package at the same time as the old > golang-github-prometheus-common-promlog-devel before this merge occurred. > > I have submitted a PR[1] to add the correct Obsoletes and virtual Provides > to the package. The virtual Provides will make it so > golang-github-prometheus-common-promlog-devel points to the new combined > golang-github-prometheus-common-devel. However, you should still remove > golang-github-prometheus-common-promlog-devel from the list of packages in > your Containerfile. Keeping that old package name there is redundant and > will stop working when we remove this compatibility layer in a future > release. I tested the preview package, and was able to install it. So this is working fine. But I guess there are more open issues with golang packages right now. Since after installing the named package from the testing channel with 'sudo dnf install golang-github-prometheus-common-promlog-devel --enablerepo=updates-testing --refresh ', I now get a bunch of very similar errors when running simple 'sudo dnf upgrade -y' on my test system. The affected packages now are: compat-golang-github-godbus-dbus-5-devel-5.0.6-1.fc36.noarch.rpm golang-github-gddo-httputil-devel-0-0.11.20210109git17b648f.fc36.noarch.rpm golang-github-godbus-dbus-devel-5.0.6-1.fc36.noarch.rpm golang-github-gorilla-mux-devel-1.8.0-4.fc36.noarch.rpm golang-github-hashicorp-immutable-radix-devel-1.3.0-4.fc36.noarch.rpm golang-github-gogo-protobuf-devel-1.3.2-3.fc35.noarch.rpm golang-github-hashicorp-memberlist-devel-0.2.2-5.fc35.noarch.rpm golang-github-ishidawataru-sctp-devel-0-0.9.20200727git00ab2ac.fc36.noarch.rpm golang-github-mistifyio-zfs-devel-2.1.1-10.20190627gitf784269.fc36.noarch.rpm golang-github-opencontainers-digest-devel-1.0.0-5.fc36.noarch.rpm Should I file a new bug, or are you already aware of this new issues? > Do note that this usecase is not really supported. The golang-*-devel > packages are only intended to be used in the buildsystem for building Go > applications that Fedora ships. Also, you should not rely on the package > names; your package should directly Require the `golang(*)` Provides (e.g. > `golang(github.com/prometheus/common/config`) for the import paths it needs. > Thanks for this hint. But, shipping my software for fedora is what I try to do. I build the container image, I originally found this bug while trying to rebuild it, because I want to create and test build a source rpm package. If both works, I upload it to copr ( https://copr.fedorainfracloud.org/coprs/imker25/samba-exporter/ ), so it can be used by fedora users. But, I will rework my setup so it uses wildcards instead of fixed package names if you suggest so. > [1]: > https://src.fedoraproject.org/rpms/golang-github-prometheus-common/pull- > request/2
(In reply to tobi from comment #9) > (In reply to Maxwell G from comment #2) > Hello Maxwell, > > thanks for your response Sure. > I tested the preview package, and was able to install it. So this is working > fine. Great! > But I guess there are more open issues with golang packages right now. Since > after installing the named package from the testing channel with 'sudo dnf > install golang-github-prometheus-common-promlog-devel > --enablerepo=updates-testing --refresh ', I now get a bunch of very similar > errors when running simple 'sudo dnf upgrade -y' on my test system. > > The affected packages now are: > compat-golang-github-godbus-dbus-5-devel-5.0.6-1.fc36.noarch.rpm > > golang-github-gddo-httputil-devel-0-0.11.20210109git17b648f.fc36.noarch.rpm > > golang-github-godbus-dbus-devel-5.0.6-1.fc36.noarch.rpm > > golang-github-gorilla-mux-devel-1.8.0-4.fc36.noarch.rpm > > golang-github-hashicorp-immutable-radix-devel-1.3.0-4.fc36.noarch.rpm > > golang-github-gogo-protobuf-devel-1.3.2-3.fc35.noarch.rpm > > golang-github-hashicorp-memberlist-devel-0.2.2-5.fc35.noarch.rpm > > golang-github-ishidawataru-sctp-devel-0-0.9.20200727git00ab2ac.fc36.noarch. > rpm > > golang-github-mistifyio-zfs-devel-2.1.1-10.20190627gitf784269.fc36.noarch. > rpm > > golang-github-opencontainers-digest-devel-1.0.0-5.fc36.noarch.rpm > > > Should I file a new bug, or are you already aware of this new issues? What are the errors? Can you please provide logs? I'll probably ask you to file separate issues, but I'd first like to see what the problem is. > > Do note that this usecase is not really supported. The golang-*-devel > > packages are only intended to be used in the buildsystem for building Go > > applications that Fedora ships. Also, you should not rely on the package > > names; your package should directly Require the `golang(*)` Provides (e.g. > > `golang(github.com/prometheus/common/config`) for the import paths it needs. > > > Thanks for this hint. But, shipping my software for fedora is what I try to > do. I build the container image, I originally found this bug while trying to > rebuild it, because I want to create and test build a source rpm package. If both works, I upload it to copr ( https://copr.fedorainfracloud.org/coprs/imker25/samba-exporter/ ), so it can be used by fedora users. I'm not telling you to stop packaging for Fedora. I'm saying that the golang-*-devel packages are meant to be installed in ephemeral build environments (e.g. containers or mock chroots) and not on user systems. Therefore, they may not always have smooth update paths. I'll try to prevent these issues in the future. > If both works, I upload it to copr ( https://copr.fedorainfracloud.org/coprs/imker25/samba-exporter/ ), so it can be used by fedora users. > But, I will rework my setup so it uses wildcards instead of fixed package names if you suggest so. I'm not telling you to use wildcards. * was supposed to be a placeholder for the actual import paths. It looks like your package already does this. ``` BuildRequires: golang(github.com/go-kit/log/level) BuildRequires: golang(github.com/prometheus/client_golang/prometheus) BuildRequires: golang(github.com/prometheus/client_golang/prometheus/collectors) BuildRequires: golang(github.com/prometheus/client_golang/prometheus/promhttp) BuildRequires: golang(github.com/prometheus/client_model/go) BuildRequires: golang(golang.org/x/sys/unix) BuildRequires: golang(gopkg.in/alecthomas/kingpin.v2) ``` Instead of manually running `dnf install` with the static package names to install the build deps, you should use `dnf builddep --spec name.spec`.
Created attachment 1912987 [details] New error, since this bug is fixed
Hello Maxwell, > What are the errors? Can you please provide logs? I'll probably ask you to file separate issues, but I'd first like to see what the problem is. I just uploaded the 'New error, since this bug is fixed' attachment. It contains the requested log. > Instead of manually running `dnf install` with the static package names to install the build deps, you should use `dnf builddep --spec name.spec`. Thanks, this seems to work for me.
Yup, I see the problem. It looks like golang-google-grpc[0] and golang-cloud-google[1] have this same problem. [0]: https://src.fedoraproject.org/rpms/golang-google-grpc/c/ba73dc9208c638eb7b3f6e159d234427db74544c?branch=rawhide [1]: https://src.fedoraproject.org/rpms/golang-cloud-google/c/8235c1c1f6dd737c7aa51d9fecbc9acdca740a3e?branch=rawhide @eclipseo, in the future, if you're going to remove `%global goipath<suffix>` lines, please add the proper Provides and Obsoletes like I did in [2]. I maintain that this usecase is not supported, but I think we should try to avoid breaking users' setups if we can. [2]: https://src.fedoraproject.org/rpms/golang-github-prometheus-common/c/14e5c6bcc45814d99c487931524e60ee29fd0866?branch=rawhide
@imker, can you please try the following command and then update your system and report if it fixes the issue? ``` sudo dnf install --nogpgcheck 'https://kojipkgs.fedoraproject.org//work/tasks/2771/92202771/golang-google-grpc-devel-1.48.0-7.fc36.noarch.rpm' 'https://kojipkgs.fedoraproject.org//work/tasks/9482/92199482/golang-cloud-google-devel-0.103.0-1.fc36.noarch.rpm' ``` (`--nogpgcheck` is necessary when installing packages directly from the buildsystem.)
(In reply to Maxwell G from comment #14) > @imker, can you please try the following command and then > update your system and report if it fixes the issue? > > ``` > sudo dnf install --nogpgcheck > 'https://kojipkgs.fedoraproject.org//work/tasks/2771/92202771/golang-google- > grpc-devel-1.48.0-7.fc36.noarch.rpm' > 'https://kojipkgs.fedoraproject.org//work/tasks/9482/92199482/golang-cloud- > google-devel-0.103.0-1.fc36.noarch.rpm' > ``` Yes, this fixed the issue. Now I'm able to run regular system updates again on the test machine. Thanks a lot
FEDORA-2022-586da054f3 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2022-586da054f3
FEDORA-2022-874f135b5f has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-874f135b5f
FEDORA-2022-586da054f3 has been pushed to the Fedora 38 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2022-9403ae3058 has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-9403ae3058
FEDORA-2022-874f135b5f has been pushed to the Fedora 37 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2022-874f135b5f` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-874f135b5f See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2022-035fd68aa5 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2022-035fd68aa5
FEDORA-2022-035fd68aa5 has been pushed to the Fedora 38 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2022-6405cfc890 has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-6405cfc890
FEDORA-2022-2b3555c75c has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-2b3555c75c
FEDORA-2022-9403ae3058 has been pushed to the Fedora 36 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2022-9403ae3058` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-9403ae3058 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2022-6405cfc890 has been pushed to the Fedora 36 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2022-6405cfc890` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-6405cfc890 See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2022-454cac1718 has been pushed to the Fedora 37 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2022-2b3555c75c has been pushed to the Fedora 37 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2022-2b3555c75c` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-2b3555c75c See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.
FEDORA-2022-874f135b5f has been pushed to the Fedora 37 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2022-2b3555c75c has been pushed to the Fedora 37 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2022-ed6d183a58 has been pushed to the Fedora 36 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2022-9403ae3058 has been pushed to the Fedora 36 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2022-6405cfc890 has been pushed to the Fedora 36 stable repository. If problem still persists, please make note of it in this bug report.
FEDORA-2023-64dc068a03 has been submitted as an update to Fedora 40. https://bodhi.fedoraproject.org/updates/FEDORA-2023-64dc068a03
FEDORA-2023-64dc068a03 has been pushed to the Fedora 40 stable repository. If problem still persists, please make note of it in this bug report.