Bug 1763889

Summary: go-rpm-macros: consider including `-trimpath` compiler flag
Product: [Fedora] Fedora Reporter: Carl George <carl>
Component: go-rpm-macrosAssignee: Nicolas Mailhot <nicolas.mailhot>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: carl, go-sig, jcajka, ngompa13, nicolas.mailhot, quantum.analyst, zebob.m
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-04-29 21:01:31 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Carl George 2019-10-21 20:16:13 UTC
Description of problem:
Go 1.13 adds a new build flag `-trimpath`.  It removes all file system paths from the compiled executable to improve build reproducibility.  While doing some packaging work for another project, it was suggested that we use this flag.  However, attempting an RPM build with it resulted in an error.

error: Empty %files file /builddir/build/BUILD/caddy-2.0.0~beta6/debugsourcefiles.list

I don't understand enough about go compiler flags to take this further on my own, but I'd like to discuss if this flag is worthwhile to include in Fedora, and if so how to get debugsourcefiles.list to cooperate with it.  If we can sort out how to make it work, I'm happy to send a pull request to https://pagure.io/go-rpm-macros to implement it.

Additional info:
https://golang.org/doc/go1.13#go-command
https://github.com/caddyserver/dist/pull/2#discussion_r337188271

Comment 1 Ben Cotton 2020-02-11 17:51:05 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 32 development cycle.
Changing version to 32.

Comment 2 Fedora Program Management 2021-04-29 15:59:07 UTC
This message is a reminder that Fedora 32 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 32 on 2021-05-25.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '32'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 32 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 3 Carl George 🤠 2021-04-29 21:01:31 UTC
Looks like this was decided against.

https://pagure.io/go-rpm-macros/issue/25