Bug 2079705 - go-rpm-macros: incorrect installation of macro
Summary: go-rpm-macros: incorrect installation of macro
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: go-rpm-macros
Version: 37
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Alejandro Sáez Morollón
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-04-28 06:59 UTC by Mikhail Novosyolov
Modified: 2023-09-19 13:10 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-09-19 13:10:57 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Mikhail Novosyolov 2022-04-28 06:59:07 UTC
Hello. Spec file go-rpm-macros.spec has the following:

%install
<...>
install -m 0644 -vp   rpm/macros.d/macros.go-* \
                      %{buildroot}%{rpmmacrodir}
<...>
%ifarch %{golang_arches}
install -m 0644 -vp   rpm/macros.d/macros.go-compilers-golang \
                      %{buildroot}%{_rpmconfigdir}/macros.d/macros.go-compiler-golang
%endif

%ifarch %{gccgo_arches}
install -m 0644 -vp   rpm/macros.d/macros.go-compilers-gcc \
                      %{buildroot}%{_rpmconfigdir}/macros.d/macros.go-compiler-gcc
%endif
<...>

First all files are copied and then only a part of them is copied, but, if the architectire is inside %gccgo_arches, macros.go-compilers-golang* are still installed.

rpm/macros.d/macros.go-compilers-golang-pie and rpm/macros.d/macros.go-compilers-golang-nopie are also installeed, I'm not sure that the author's idea was to install them.

Comment 1 Mikhail Novosyolov 2022-04-28 07:01:18 UTC
golang* files are alphabetically loaded later than gccgo* and overwrite values from them.

Comment 3 Ben Cotton 2022-08-09 13:15:10 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 37 development cycle.
Changing version to 37.

Comment 4 Alejandro Sáez Morollón 2023-09-19 13:10:57 UTC
Thanks for the patch. I was checking the current go-rpm-macro and a similar fix was merged recently, so I'll close the bug.
Feel free to open it again if the fix doesn't cover it. 

For the record, the solution was added with the 8b2cbc54 commit.


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