registry-token-server build failure on %{gopath} macro

Bug #1983114 reported by Scott Little
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Critical
Scott Little

Bug Description

Brief Description
-----------------
registry-token-server doesn't build reliably.

I suspect it needs a 'BuildRequires go-srpm-macros' to gain reliable access to the %{gopath} macro.

Severity
--------
Critical

Steps to Reproduce
------------------
build-pkgs
build-pkgs --dep-test registry-token-server

Expected Behavior
------------------
registry-token-server builds reliably

Actual Behavior
----------------
sometimes registry-token-server fails to build

Reproducibility
---------------
Perhaps 25% ???
Might depend on build order... before or after golang-1.17.5

System Configuration
--------------------
N/A

Branch/Pull Time/Commit
-----------------------
July 28, 2022

Last Pass
---------

Timestamp/Logs
--------------
19:38:08 ERROR: Exception(/localdisk/loadbuild/jenkins/rc-7.0-flock/20220728T184055Z/std/rpmbuild/SRPMS/registry-token-server-1.0.0-1.tis.15.src.rpm) Config(mock/b0) 0 minutes 4 seconds
19:38:08 INFO: Results and/or logs in: /localdisk/loadbuild/jenkins/rc-7.0-flock/20220728T184055Z/std/results/jenkins-rc-7.0-flock-4.0-std/registry-token-server-1.0.0-1.tis.15
19:38:08 ERROR: Command failed:
19:38:08 # bash --login -c /usr/bin/rpmbuild -bb --target x86_64 --nodeps /builddir/build/SPECS/registry-token-server.spec
...
+ GOPATH='/builddir/build/BUILD/registry-token-server-1.0.0/_build:%{gopath}'
+ go env -w GO111MODULE=auto
BUILDSTDERR: go: GOPATH entry is relative; must be absolute path: "%{gopath}".
BUILDSTDERR: For more details see: 'go help gopath'
BUILDSTDERR: error: Bad exit status from /var/tmp/rpm-tmp.6sDMHt (%build)
RPM build errors:
BUILDSTDERR: Bad exit status from /var/tmp/rpm-tmp.6sDMHt (%build)
Child return code was: 1
EXCEPTION: [Error()]
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/mockbuild/trace_decorator.py", line 96, in trace
    result = func(*args, **kw)
  File "/usr/lib/python3.6/site-packages/mockbuild/util.py", line 736, in do_with_status
    raise exception.Error("Command failed: \n # %s\n%s" % (command, output), child.returncode)
mockbuild.exception.Error: Command failed:
 # bash --login -c /usr/bin/rpmbuild -bb --target x86_64 --nodeps /builddir/build/SPECS/registry-token-server.spec

Test Activity
-------------
Build

Workaround
----------
N/A

Ghada Khalil (gkhalil)
tags: added: stx.build
Scott Little (slittle1)
tags: added: stx.7.0
Scott Little (slittle1)
Changed in starlingx:
assignee: nobody → Scott Little (slittle1)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to containers (r/stx.7.0)

Fix proposed to branch: r/stx.7.0
Review: https://review.opendev.org/c/starlingx/containers/+/852276

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to containers (r/stx.7.0)

Reviewed: https://review.opendev.org/c/starlingx/containers/+/852276
Committed: https://opendev.org/starlingx/containers/commit/ba8978571793949e5dcf4a799e52b1779573a0b6
Submitter: "Zuul (22348)"
Branch: r/stx.7.0

commit ba8978571793949e5dcf4a799e52b1779573a0b6
Author: ChantYuCN <email address hidden>
Date: Thu Jun 23 02:50:27 2022 +0000

    fix: drop the relative gopath

    Currently, go environment can't premit the relative gopath

    Closes-Bug: #1979583
    Closes-Bug: #1983114

    (cherry picked from commit db5133212286b1efb876be5a7fb147a3e7fc3459)
    Signed-off-by: ChantYuCN <email address hidden>
    Signed-off-by: Scott Little <email address hidden>
    Change-Id: I23ba0633f84eec112f1921803491b5d7a40ebbff

Scott Little (slittle1)
Changed in starlingx:
status: New → Fix Released
Ghada Khalil (gkhalil)
Changed in starlingx:
importance: Undecided → Critical
tags: added: in-r-stx70
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.