[Rpm-maint] [rpm-software-management/rpm] Missing build id, Generating build-id links failed (#367)

Mark Wielaard mark at klomp.org
Sun Dec 10 12:19:56 UTC 2017


On Sun, Dec 10, 2017 at 09:34:25AM +0100, Tzafrir Cohen wrote:
> On Fri, Dec 08, 2017 at 12:35:44AM +0100, Mark Wielaard wrote:
> > At least the Fedora go toolchain should be able to generate proper build-ids these days.
> > If not, see these (old) notes:
> > https://fedoraproject.org/wiki/PackagingDrafts/Go#Build_ID
> 
> So is the official answer to use gccgo?

I don't know if that is an official answer, but gccgo certainly produces
more conforming ELF objects.

> I recently ran into this issue and found no good answer. I ended up
> using the following Makefile snippet:
> 
> BUILD_ID=$(shell head -c20 /dev/urandom|od -An -tx1|tr -d ' \n')
> BUILD_ID_OPT=-B 0x$(BUILD_ID)
> BUILD_ARGS=-ldflags "-X main.version=$(VERSION) -X main.commit=$(COMMIT) -X main.buildtime=$(BUILD_TIME) $(BUILD_ID_OPT)"
> 
> (Yes, not a reproducible build if I use buildtime, but useful so far)

I believe that is what Fedora also uses. Or a variant that is reproducible.

You can also of course undefine the _missing_build_ids_terminate_build macro
in your spec file to work around such toolchain issues.

Cheers,

Mark


More information about the Rpm-maint mailing list