https://bugzilla.redhat.com/show_bug.cgi?id=1342329
Bug ID: 1342329 Summary: [PATCH] Fix compiler bootstrap Product: Fedora Version: rawhide Component: golang Assignee: vbatts@redhat.com Reporter: walters@redhat.com QA Contact: extras-qa@fedoraproject.org CC: admiller@redhat.com, amurdaca@redhat.com, golang@lists.fedoraproject.org, jcajka@redhat.com, lemenkov@gmail.com, renich@woralelandia.com, s@shk.io, vbatts@redhat.com
I'm trying to use rpmdistro-gitoverlay to build the fedora golang dist-git in CentOS Atomic Host Continuous (https://ci.centos.org/job/atomic-rdgo-centos7/)
I hit a bug in the patch for the bootstrap path - this is really a patch for a patch, but leaving polish for later.
From 75b16e09cec3d2376ed9847ae2adfc0fea3be80c Mon Sep 17 00:00:00 2001 From: Colin Walters walters@verbum.org Date: Thu, 2 Jun 2016 14:50:57 -0400 Subject: [PATCH] Fix compiler bootstrap
--- 0001-Fix-compiler-bootstrap.patch | 46 +++++++++++++++++++++++++++++++++++++++ golang.spec | 3 +++ 2 files changed, 49 insertions(+) create mode 100644 0001-Fix-compiler-bootstrap.patch
diff --git a/0001-Fix-compiler-bootstrap.patch b/0001-Fix-compiler-bootstrap.patch new file mode 100644 index 0000000..7edd6fc --- /dev/null +++ b/0001-Fix-compiler-bootstrap.patch @@ -0,0 +1,46 @@ +From 46e66eca16d0fba59c430ce83f1ed3c8ee639e77 Mon Sep 17 00:00:00 2001 +From: Colin Walters walters@verbum.org +Date: Thu, 2 Jun 2016 14:46:27 -0400 +Subject: [PATCH] Fix compiler bootstrap + +--- + src/make.bash | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +diff --git a/src/make.bash b/src/make.bash +index de8995f..f127b2a 100755 +--- a/src/make.bash ++++ b/src/make.bash +@@ -112,13 +112,13 @@ echo '##### Building Go bootstrap tool.' + echo cmd/dist + export GOROOT="$(cd .. && pwd)" + GOROOT_BOOTSTRAP=${GOROOT_BOOTSTRAP:-$HOME/go1.4} +-if [ -x "$GOROOT_BOOTSTRAP/bin/${GOHOSTOS}_${GOHOSTARCH}/go" ]; then +- rm -f cmd/dist/dist +- GOROOT="$GOROOT_BOOTSTRAP" GOOS="" GOARCH="" "$GOROOT_BOOTSTRAP/bin/${GOHOSTOS}_${GOHOSTARCH}/go" build -o cmd/dist/dist ./cmd/dist +-elif [ -x "$GOROOT_BOOTSTRAP/bin/go" ]; then +- rm -f cmd/dist/dist +- GOROOT="$GOROOT_BOOTSTRAP" GOOS="" GOARCH="" "$GOROOT_BOOTSTRAP/bin/go" build -o cmd/dist/dist ./cmd/dist +-else ++for gopath in "$GOROOT_BOOTSTRAP/bin/${GOHOSTOS}_${GOHOSTARCH}/go" "$GOROOT_BOOTSTRAP/bin/go"; do ++ if test -x ${gopath}; then ++ BOOTSTRAP_COMPILER=${gopath} ++ break ++ fi ++done ++if test -z "${BOOTSTRAP_COMPILER:-}"; then + echo "ERROR: Cannot find $GOROOT_BOOTSTRAP/bin/${GOHOSTOS}_${GOHOSTARCH}/go." >&2 + echo "ERROR: or $GOROOT_BOOTSTRAP/bin/${GOHOSTOS}_${GOHOSTARCH}/go." >&2 + echo "Set $GOROOT_BOOTSTRAP to a working Go tree >= Go 1.4." >&2 +@@ -130,7 +130,7 @@ if [ "$GOROOT_BOOTSTRAP" == "$GOROOT" ]; then + exit 1 + fi + rm -f cmd/dist/dist +-GOROOT="$GOROOT_BOOTSTRAP" GOOS="" GOARCH="" "$GOROOT_BOOTSTRAP/bin/go" build -o cmd/dist/dist ./cmd/dist ++GOROOT="$GOROOT_BOOTSTRAP" GOOS="" GOARCH="" "${BOOTSTRAP_COMPILER}" build -o cmd/dist/dist ./cmd/dist + + # -e doesn't propagate out of eval, so check success by hand. + eval $(./cmd/dist/dist env -p || echo FAIL=true) +-- +1.8.3.1 + diff --git a/golang.spec b/golang.spec index c9ac2ff..f2b8f9f 100644 --- a/golang.spec +++ b/golang.spec @@ -128,6 +128,8 @@ Patch213: go1.5beta1-disable-TestGdbPython.patch # later run `go test -a std`. This makes it only use the zoneinfo.zip where needed in tests. Patch215: ./go1.5-zoneinfo_testing_only.patch
+Patch300: 0001-Fix-compiler-bootstrap.patch + # Having documentation separate was broken Obsoletes: %{name}-docs < 1.1-4
@@ -249,6 +251,7 @@ Summary: Golang shared object libraries %patch213 -p1
%patch215 -p1 +%patch300 -p1
%build # print out system information
https://bugzilla.redhat.com/show_bug.cgi?id=1342329
Jakub Čajka jcajka@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|vbatts@redhat.com |jcajka@redhat.com
https://bugzilla.redhat.com/show_bug.cgi?id=1342329
Jakub Čajka jcajka@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |CLOSED Resolution|--- |WONTFIX Last Closed| |2016-06-03 02:30:21
--- Comment #1 from Jakub Čajka jcajka@redhat.com --- I'm aware of this issue(bootstrap of Fedora golang fails with go1.4). I have caused it while forward porting patches a while back. As it is not affecting Fedora in any way and rebuilding Fedora on CentOS is not really supported(actually you are really lucky if it builds without any other changes to srpm on CentOS). I'm going to close this as wontfix, but I will include fixed patch when I will be doing respin of the package next time(BZ#1342090 I guess).
If you want (s)rpm with fixed patch for CentOS, you might look at my COPR repository https://copr.fedorainfracloud.org/coprs/jcajka/golang1.6/
https://bugzilla.redhat.com/show_bug.cgi?id=1342329
--- Comment #2 from Colin Walters walters@redhat.com --- (In reply to Jakub Čajka from comment #1)
I'm aware of this issue(bootstrap of Fedora golang fails with go1.4). I have caused it while forward porting patches a while back. As it is not affecting Fedora in any way and rebuilding Fedora on CentOS is not really supported
I've been working on making it supported. All the packages which pull from dist-git in https://github.com/CentOS/sig-atomic-buildscripts/blob/master/overlay.yml support it.
(actually you are really lucky if it builds without any other changes to srpm on CentOS).
Since I am actually doing this, I can say most of the time it works, the main pain point is newer macros in Fedora for python etc.
I'm going to close this as wontfix, but I will include fixed patch when I will be doing respin of the package next time(BZ#1342090 I guess).
That seems odd, but okay. In the meantime I guess I can keep the fork on gitlab around.
But I don't quite understand why you'd mark the bug as WONTFIX this only to fix it later.
If you want (s)rpm with fixed patch for CentOS, you might look at my COPR repository https://copr.fedorainfracloud.org/coprs/jcajka/golang1.6/
I'd rather not cross the bridge of starting to depend on COPRs for this project quite yet. I think rpmdistro-gitoverlay is in many ways a better model (although COPR has some nice features too).
One option would be rebuilding from your dist-git, but now that I look at this your changes in:
http://copr-dist-git.fedorainfracloud.org/cgit/jcajka/golang1.6/golang.git/c...
Are very likely to break other dependent packages, since I am pulling go-srpm-macros, but you've changed things for golang to Provide them.
https://bugzilla.redhat.com/show_bug.cgi?id=1342329
Adam Miller admiller@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|CLOSED |ASSIGNED Resolution|WONTFIX |--- Keywords| |Reopened
--- Comment #3 from Adam Miller admiller@redhat.com --- Jakub - You mentioned in Comment 1 that you will include the patch but then CLOSED:WONTFIX. I'm confused, are you planning include the fix for or not?
https://bugzilla.redhat.com/show_bug.cgi?id=1342329
Ian McLeod imcleod@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |imcleod@redhat.com
--- Comment #4 from Ian McLeod imcleod@redhat.com --- If the general goal here is to allow a shared SRPM to work between rawhide/Fedora and the CentOS SIGs, then I'd like to add an enthusiastic +1. Having commonality for golang should help both groups up the stack with things like docker and kube.
(Keep in mind that the SIG process is different than EPEL. RHEL packages can be overridden and front-run the RHEL versions.)
To be clear, I'm not suggesting that a Fedora package maintainer is generally obliged to make the SRPM continue to work downstream. However, that's not the situation here. We have people in the broader community actively trying to make this work and keep it working. I think we should encourage that.
Thoughts?
golang@lists.fedoraproject.org