[golang] cleaning up the cross-compile process and deps
by Vincent Batts
commit fa7c581616b0163d83c56953766c1550ae6ca243
Author: Vincent Batts <vbatts(a)redhat.com>
Date: Tue Jul 8 10:52:53 2014 -0400
cleaning up the cross-compile process and deps
bz1105901, bz1101508
golang.spec | 186 +++++++++--------------------------------------------------
1 files changed, 28 insertions(+), 158 deletions(-)
---
diff --git a/golang.spec b/golang.spec
index e3e9776..63263f2 100644
--- a/golang.spec
+++ b/golang.spec
@@ -39,7 +39,7 @@
Name: golang
Version: 1.3
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: The Go Programming Language
License: BSD
@@ -148,6 +148,7 @@ Provides: golang-bin = 386
# We strip the meta dependency, but go does require glibc.
# This is an odd issue, still looking for a better fix.
Requires: glibc
+Requires: gcc
Requires(post): %{_sbindir}/update-alternatives
Requires(postun): %{_sbindir}/update-alternatives
%description pkg-bin-linux-386
@@ -163,6 +164,7 @@ Provides: golang-bin = amd64
# We strip the meta dependency, but go does require glibc.
# This is an odd issue, still looking for a better fix.
Requires: glibc
+Requires: gcc
Requires(post): %{_sbindir}/update-alternatives
Requires(postun): %{_sbindir}/update-alternatives
%description pkg-bin-linux-amd64
@@ -178,6 +180,7 @@ Provides: golang-bin = arm
# We strip the meta dependency, but go does require glibc.
# This is an odd issue, still looking for a better fix.
Requires: glibc
+Requires: gcc
Requires(post): %{_sbindir}/update-alternatives
Requires(postun): %{_sbindir}/update-alternatives
%description pkg-bin-linux-arm
@@ -192,7 +195,6 @@ Requires(postun): %{_sbindir}/update-alternatives
Summary: Golang compiler toolchain to compile for linux 386
Requires: go = %{version}-%{release}
BuildArch: noarch
-Requires(post): golang-bin
%description pkg-linux-386
%{summary}
@@ -200,7 +202,6 @@ Requires(post): golang-bin
Summary: Golang compiler toolchain to compile for linux amd64
Requires: go = %{version}-%{release}
BuildArch: noarch
-Requires(post): golang-bin
%description pkg-linux-amd64
%{summary}
@@ -208,7 +209,6 @@ Requires(post): golang-bin
Summary: Golang compiler toolchain to compile for linux arm
Requires: go = %{version}-%{release}
BuildArch: noarch
-Requires(post): golang-bin
%description pkg-linux-arm
%{summary}
@@ -216,7 +216,6 @@ Requires(post): golang-bin
Summary: Golang compiler toolchain to compile for darwin 386
Requires: go = %{version}-%{release}
BuildArch: noarch
-Requires(post): golang-bin
%description pkg-darwin-386
%{summary}
@@ -224,7 +223,6 @@ Requires(post): golang-bin
Summary: Golang compiler toolchain to compile for darwin amd64
Requires: go = %{version}-%{release}
BuildArch: noarch
-Requires(post): golang-bin
%description pkg-darwin-amd64
%{summary}
@@ -232,7 +230,6 @@ Requires(post): golang-bin
Summary: Golang compiler toolchain to compile for windows 386
Requires: go = %{version}-%{release}
BuildArch: noarch
-Requires(post): golang-bin
%description pkg-windows-386
%{summary}
@@ -240,7 +237,6 @@ Requires(post): golang-bin
Summary: Golang compiler toolchain to compile for windows amd64
Requires: go = %{version}-%{release}
BuildArch: noarch
-Requires(post): golang-bin
%description pkg-windows-amd64
%{summary}
@@ -248,7 +244,6 @@ Requires(post): golang-bin
Summary: Golang compiler toolchain to compile for plan9 386
Requires: go = %{version}-%{release}
BuildArch: noarch
-Requires(post): golang-bin
%description pkg-plan9-386
%{summary}
@@ -256,7 +251,6 @@ Requires(post): golang-bin
Summary: Golang compiler toolchain to compile for plan9 amd64
Requires: go = %{version}-%{release}
BuildArch: noarch
-Requires(post): golang-bin
%description pkg-plan9-amd64
%{summary}
@@ -264,7 +258,6 @@ Requires(post): golang-bin
Summary: Golang compiler toolchain to compile for freebsd 386
Requires: go = %{version}-%{release}
BuildArch: noarch
-Requires(post): golang-bin
%description pkg-freebsd-386
%{summary}
@@ -272,7 +265,6 @@ Requires(post): golang-bin
Summary: Golang compiler toolchain to compile for freebsd amd64
Requires: go = %{version}-%{release}
BuildArch: noarch
-Requires(post): golang-bin
%description pkg-freebsd-amd64
%{summary}
@@ -280,7 +272,6 @@ Requires(post): golang-bin
Summary: Golang compiler toolchain to compile for freebsd arm
Requires: go = %{version}-%{release}
BuildArch: noarch
-Requires(post): golang-bin
%description pkg-freebsd-arm
%{summary}
@@ -288,7 +279,6 @@ Requires(post): golang-bin
Summary: Golang compiler toolchain to compile for netbsd 386
Requires: go = %{version}-%{release}
BuildArch: noarch
-Requires(post): golang-bin
%description pkg-netbsd-386
%{summary}
@@ -296,7 +286,6 @@ Requires(post): golang-bin
Summary: Golang compiler toolchain to compile for netbsd amd64
Requires: go = %{version}-%{release}
BuildArch: noarch
-Requires(post): golang-bin
%description pkg-netbsd-amd64
%{summary}
@@ -304,7 +293,6 @@ Requires(post): golang-bin
Summary: Golang compiler toolchain to compile for netbsd arm
Requires: go = %{version}-%{release}
BuildArch: noarch
-Requires(post): golang-bin
%description pkg-netbsd-arm
%{summary}
@@ -312,7 +300,6 @@ Requires(post): golang-bin
Summary: Golang compiler toolchain to compile for openbsd 386
Requires: go = %{version}-%{release}
BuildArch: noarch
-Requires(post): golang-bin
%description pkg-openbsd-386
%{summary}
@@ -320,7 +307,6 @@ Requires(post): golang-bin
Summary: Golang compiler toolchain to compile for openbsd amd64
Requires: go = %{version}-%{release}
BuildArch: noarch
-Requires(post): golang-bin
%description pkg-openbsd-amd64
%{summary}
@@ -330,7 +316,6 @@ Requires(post): golang-bin
#Summary: Golang compiler toolchain to compile for openbsd arm
#Requires: go = %{version}-%{release}
#BuildArch: noarch
-#Requires(post): golang-bin
#%description pkg-openbsd-arm
#%{summary}
@@ -399,7 +384,7 @@ pushd src
PATH="$(pwd -P)/../zz:$PATH" CC="gcc" \
GOOS=${goos} \
GOARCH=${goarch} \
- ./make.bash
+ ./make.bash --no-clean
done
done
popd
@@ -438,7 +423,7 @@ mkdir -p $RPM_BUILD_ROOT%{goroot}
# install everything into libdir (until symlink problems are fixed)
# https://code.google.com/p/go/issues/detail?id=5830
-cp -av api bin doc favicon.ico include lib pkg robots.txt src \
+cp -apv api bin doc favicon.ico include lib pkg robots.txt src misc VERSION \
$RPM_BUILD_ROOT%{goroot}
# remove the unnecessary zoneinfo file (Go will always use the system one first)
@@ -555,64 +540,14 @@ if [ $1 = 0 ]; then
fi
%endif
-# All these archives need to be newer than the corresponding source in goroot
-# https://bugzilla.redhat.com/show_bug.cgi?id=1099206
-%post pkg-linux-386
-GOROOT=%{goroot} GOOS=linux GOARCH=386 go install std
-
-%post pkg-linux-amd64
-GOROOT=%{goroot} GOOS=linux GOARCH=amd64 go install std
-
-%post pkg-linux-arm
-GOROOT=%{goroot} GOOS=linux GOARCH=arm go install std
-
-%post pkg-darwin-386
-GOROOT=%{goroot} GOOS=darwin GOARCH=386 go install std
-
-%post pkg-darwin-amd64
-GOROOT=%{goroot} GOOS=darwin GOARCH=amd64 go install std
-
-%post pkg-windows-386
-GOROOT=%{goroot} GOOS=windows GOARCH=386 go install std
-
-%post pkg-windows-amd64
-GOROOT=%{goroot} GOOS=windows GOARCH=amd64 go install std
-
-%post pkg-plan9-386
-GOROOT=%{goroot} GOOS=plan9 GOARCH=386 go install std
-
-%post pkg-plan9-amd64
-GOROOT=%{goroot} GOOS=plan9 GOARCH=amd64 go install std
-
-%post pkg-freebsd-386
-GOROOT=%{goroot} GOOS=freebsd GOARCH=386 go install std
-
-%post pkg-freebsd-amd64
-GOROOT=%{goroot} GOOS=freebsd GOARCH=amd64 go install std
-
-%post pkg-freebsd-arm
-GOROOT=%{goroot} GOOS=freebsd GOARCH=arm go install std
-
-%post pkg-netbsd-386
-GOROOT=%{goroot} GOOS=netbsd GOARCH=386 go install std
-
-%post pkg-netbsd-amd64
-GOROOT=%{goroot} GOOS=netbsd GOARCH=amd64 go install std
-
-%post pkg-netbsd-arm
-GOROOT=%{goroot} GOOS=netbsd GOARCH=arm go install std
-
-%post pkg-openbsd-386
-GOROOT=%{goroot} GOOS=openbsd GOARCH=386 go install std
-
-%post pkg-openbsd-amd64
-GOROOT=%{goroot} GOOS=openbsd GOARCH=amd64 go install std
#%post pkg-openbsd-arm
#GOROOT=%{goroot} GOOS=openbsd GOARCH=arm go install std
%files
-%doc AUTHORS CONTRIBUTORS LICENSE PATENTS VERSION
+%doc AUTHORS CONTRIBUTORS LICENSE PATENTS
+# VERSION has to be present in the GOROOT, for `go install std` to work
+%doc %{goroot}/VERSION
# go files
%dir %{goroot}
@@ -660,90 +595,6 @@ GOROOT=%{goroot} GOOS=openbsd GOARCH=amd64 go install std
%files src
%{goroot}/src/
-# files that are generated based on compile-time ARCH will go in that arch's pkg-bin-*
-%ifarch %{ix86}
-
-# this is wacky that now these files are generated in a different arch
-%exclude %{goroot}/src/pkg/runtime/zgoarch_386.go
-%exclude %{goroot}/src/pkg/runtime/zgoarch_amd64.go
-
-%exclude %{goroot}/src/pkg/runtime/zasm_linux_386.h
-%exclude %{goroot}/src/pkg/runtime/zmalloc_linux_386.c
-%exclude %{goroot}/src/pkg/runtime/zmprof_linux_386.c
-%exclude %{goroot}/src/pkg/runtime/znetpoll_linux_386.c
-%exclude %{goroot}/src/pkg/runtime/zruntime1_linux_386.c
-%exclude %{goroot}/src/pkg/runtime/zruntime_defs_linux_386.go
-%exclude %{goroot}/src/pkg/runtime/zsema_linux_386.c
-%exclude %{goroot}/src/pkg/runtime/zsigqueue_linux_386.c
-%exclude %{goroot}/src/pkg/runtime/zstring_linux_386.c
-%exclude %{goroot}/src/pkg/runtime/zsys_linux_386.s
-%exclude %{goroot}/src/pkg/runtime/ztime_linux_386.c
-%exclude %{goroot}/src/pkg/runtime/zalg_linux_386.c
-%exclude %{goroot}/src/pkg/runtime/zchan_linux_386.c
-%exclude %{goroot}/src/pkg/runtime/zcomplex_linux_386.c
-%exclude %{goroot}/src/pkg/runtime/zcpuprof_linux_386.c
-%exclude %{goroot}/src/pkg/runtime/zhashmap_linux_386.c
-%exclude %{goroot}/src/pkg/runtime/ziface_linux_386.c
-%exclude %{goroot}/src/pkg/runtime/zlfstack_linux_386.c
-%exclude %{goroot}/src/pkg/runtime/zrdebug_linux_386.c
-%exclude %{goroot}/src/pkg/runtime/zslice_linux_386.c
-%exclude %{goroot}/src/pkg/runtime/zsymtab_linux_386.c
-%endif
-
-%ifarch x86_64
-%exclude %{goroot}/src/pkg/runtime/zgoarch_amd64.go
-
-%exclude %{goroot}/src/pkg/runtime/zasm_linux_amd64.h
-%exclude %{goroot}/src/pkg/runtime/zmprof_linux_amd64.c
-%exclude %{goroot}/src/pkg/runtime/zmalloc_linux_amd64.c
-%exclude %{goroot}/src/pkg/runtime/znetpoll_linux_amd64.c
-%exclude %{goroot}/src/pkg/runtime/zsema_linux_amd64.c
-%exclude %{goroot}/src/pkg/runtime/zruntime1_linux_amd64.c
-%exclude %{goroot}/src/pkg/runtime/zruntime_defs_linux_amd64.go
-%exclude %{goroot}/src/pkg/runtime/zsigqueue_linux_amd64.c
-%exclude %{goroot}/src/pkg/runtime/zstring_linux_amd64.c
-%exclude %{goroot}/src/pkg/runtime/zsys_linux_amd64.s
-%exclude %{goroot}/src/pkg/runtime/ztime_linux_amd64.c
-%exclude %{goroot}/src/pkg/runtime/zalg_linux_amd64.c
-%exclude %{goroot}/src/pkg/runtime/zchan_linux_amd64.c
-%exclude %{goroot}/src/pkg/runtime/zcomplex_linux_amd64.c
-%exclude %{goroot}/src/pkg/runtime/zcpuprof_linux_amd64.c
-%exclude %{goroot}/src/pkg/runtime/zhashmap_linux_amd64.c
-%exclude %{goroot}/src/pkg/runtime/ziface_linux_amd64.c
-%exclude %{goroot}/src/pkg/runtime/zlfstack_linux_amd64.c
-%exclude %{goroot}/src/pkg/runtime/zrdebug_linux_amd64.c
-%exclude %{goroot}/src/pkg/runtime/zslice_linux_amd64.c
-%exclude %{goroot}/src/pkg/runtime/zsymtab_linux_amd64.c
-%endif
-
-%ifarch %{arm}
-%exclude %{goroot}/src/pkg/runtime/zgoarch_arm.go
-%exclude %{goroot}/src/pkg/runtime/zgoarch_amd64.go
-
-%exclude %{goroot}/src/pkg/runtime/zasm_linux_arm.h
-%exclude %{goroot}/src/pkg/runtime/znetpoll_linux_arm.c
-%exclude %{goroot}/src/pkg/runtime/zmalloc_linux_arm.c
-%exclude %{goroot}/src/pkg/runtime/zmprof_linux_arm.c
-%exclude %{goroot}/src/pkg/runtime/znoasm_arm_linux_arm.c
-%exclude %{goroot}/src/pkg/runtime/zruntime1_linux_arm.c
-%exclude %{goroot}/src/pkg/runtime/zruntime_defs_linux_arm.go
-%exclude %{goroot}/src/pkg/runtime/zsema_linux_arm.c
-%exclude %{goroot}/src/pkg/runtime/zsigqueue_linux_arm.c
-%exclude %{goroot}/src/pkg/runtime/zstring_linux_arm.c
-%exclude %{goroot}/src/pkg/runtime/zsys_linux_arm.s
-%exclude %{goroot}/src/pkg/runtime/ztime_linux_arm.c
-%exclude %{goroot}/src/pkg/runtime/zalg_linux_arm.c
-%exclude %{goroot}/src/pkg/runtime/zchan_linux_arm.c
-%exclude %{goroot}/src/pkg/runtime/zcomplex_linux_arm.c
-%exclude %{goroot}/src/pkg/runtime/zcpuprof_linux_arm.c
-%exclude %{goroot}/src/pkg/runtime/zhashmap_linux_arm.c
-%exclude %{goroot}/src/pkg/runtime/ziface_linux_arm.c
-%exclude %{goroot}/src/pkg/runtime/zlfstack_linux_arm.c
-%exclude %{goroot}/src/pkg/runtime/zrdebug_linux_arm.c
-%exclude %{goroot}/src/pkg/runtime/zslice_linux_arm.c
-%exclude %{goroot}/src/pkg/runtime/zsymtab_linux_arm.c
-%endif
-
%ifarch %{ix86}
%files pkg-bin-linux-386
@@ -755,6 +606,10 @@ GOROOT=%{goroot} GOOS=openbsd GOARCH=amd64 go install std
%{goroot}/pkg/obj/linux_386/*
%{goroot}/pkg/linux_386/runtime/cgo.a
%dir %{goroot}/pkg/tool/linux_386
+%{goroot}/pkg/tool/linux_386/5a
+%{goroot}/pkg/tool/linux_386/5c
+%{goroot}/pkg/tool/linux_386/5g
+%{goroot}/pkg/tool/linux_386/5l
%{goroot}/pkg/tool/linux_386/6a
%{goroot}/pkg/tool/linux_386/6c
%{goroot}/pkg/tool/linux_386/6g
@@ -805,10 +660,18 @@ GOROOT=%{goroot} GOOS=openbsd GOARCH=amd64 go install std
%{goroot}/pkg/obj/linux_amd64/*
%{goroot}/pkg/linux_amd64/runtime/cgo.a
%dir %{goroot}/pkg/tool/linux_amd64
+%{goroot}/pkg/tool/linux_amd64/5a
+%{goroot}/pkg/tool/linux_amd64/5c
+%{goroot}/pkg/tool/linux_amd64/5g
+%{goroot}/pkg/tool/linux_amd64/5l
%{goroot}/pkg/tool/linux_amd64/6a
%{goroot}/pkg/tool/linux_amd64/6c
%{goroot}/pkg/tool/linux_amd64/6g
%{goroot}/pkg/tool/linux_amd64/6l
+%{goroot}/pkg/tool/linux_amd64/8a
+%{goroot}/pkg/tool/linux_amd64/8c
+%{goroot}/pkg/tool/linux_amd64/8g
+%{goroot}/pkg/tool/linux_amd64/8l
%{goroot}/pkg/tool/linux_amd64/addr2line
%{goroot}/pkg/tool/linux_amd64/dist
%{goroot}/pkg/tool/linux_amd64/nm
@@ -859,6 +722,10 @@ GOROOT=%{goroot} GOOS=openbsd GOARCH=amd64 go install std
%{goroot}/pkg/tool/linux_arm/6c
%{goroot}/pkg/tool/linux_arm/6g
%{goroot}/pkg/tool/linux_arm/6l
+%{goroot}/pkg/tool/linux_arm/8a
+%{goroot}/pkg/tool/linux_arm/8c
+%{goroot}/pkg/tool/linux_arm/8g
+%{goroot}/pkg/tool/linux_arm/8l
%{goroot}/pkg/tool/linux_arm/addr2line
%{goroot}/pkg/tool/linux_arm/dist
%{goroot}/pkg/tool/linux_arm/nm
@@ -982,6 +849,9 @@ GOROOT=%{goroot} GOOS=openbsd GOARCH=amd64 go install std
%changelog
+* Tue Jul 08 2014 Vincent Batts <vbatts(a)fedoraproejct.org> - 1.3-3
+- `go install std` requires gcc, to build cgo. bz1105901, bz1101508
+
* Mon Jul 07 2014 Vincent Batts <vbatts(a)fedoraproejct.org> - 1.3-2
- archive/tar memory allocation improvements
9 years, 9 months
[Bug 1101654] New: Permission denied when running Fedora images on Ubuntu
by Red Hat Bugzilla
https://bugzilla.redhat.com/show_bug.cgi?id=1101654
Bug ID: 1101654
Summary: Permission denied when running Fedora images on Ubuntu
Product: Fedora
Version: 20
Component: docker-io
Assignee: lsm5(a)redhat.com
Reporter: sthorger(a)redhat.com
QA Contact: extras-qa(a)fedoraproject.org
CC: admiller(a)redhat.com, golang(a)lists.fedoraproject.org,
lsm5(a)redhat.com, mattdm(a)redhat.com,
mgoldman(a)redhat.com, s(a)shk.io, vbatts(a)redhat.com
Created attachment 899597
--> https://bugzilla.redhat.com/attachment.cgi?id=899597&action=edit
Example Dockerfile
Description of problem:
Trying to run a basic Docker image from Fedora on Ubuntu 14.04, gives the
following error message:
2014/05/27 17:00:26 exec: "/usr/bin/echo": stat /usr/bin/echo: permission
denied
Version-Release number of selected component (if applicable):
How reproducible:
Steps to Reproduce:
1. Build attach Dockerfile
2. Run
Actual results:
2014/05/27 17:00:26 exec: "/usr/bin/echo": stat /usr/bin/echo: permission
denied
Expected results:
Hello world!
Additional info:
Removing "User hello" or "RUN yum -y update" makes it work as expected
--
You are receiving this mail because:
You are on the CC list for the bug.
9 years, 9 months
[Bug 1114810] New: CVE-2014-3499 docker-io: docker: systemd socket activation results in privilege escalation [fedora-all]
by Red Hat Bugzilla
https://bugzilla.redhat.com/show_bug.cgi?id=1114810
Bug ID: 1114810
Summary: CVE-2014-3499 docker-io: docker: systemd socket
activation results in privilege escalation
[fedora-all]
Product: Fedora
Version: 20
Component: docker-io
Keywords: Security, SecurityTracking
Severity: high
Priority: high
Assignee: lsm5(a)switzerlandmail.ch
Reporter: tjay(a)redhat.com
QA Contact: extras-qa(a)fedoraproject.org
CC: admiller(a)redhat.com, golang(a)lists.fedoraproject.org,
hushan.jia(a)gmail.com, lsm5(a)switzerlandmail.ch,
mattdm(a)redhat.com, mgoldman(a)redhat.com, s(a)shk.io,
vbatts(a)redhat.com
Blocks: 1111687 (CVE-2014-3499)
This is an automatically created tracking bug! It was created to ensure
that one or more security vulnerabilities are fixed in affected versions
of Fedora.
For comments that are specific to the vulnerability please use bugs filed
against the "Security Response" product referenced in the "Blocks" field.
For more information see:
http://fedoraproject.org/wiki/Security/TrackingBugs
When creating a Bodhi update request, use the bodhi submission link noted
in the next comment(s). This will include the bug IDs of this tracking
bug as well as the relevant top-level CVE bugs.
Please also mention the CVE IDs being fixed in the RPM changelog and the
Bodhi notes field when available.
NOTE: this issue affects multiple supported versions of Fedora. While only
one tracking bug has been filed, please correct all affected versions at
the same time. If you need to fix the versions independent of each other,
you may clone this bug as appropriate.
[bug automatically created by: add-tracking-bugs]
Referenced Bugs:
https://bugzilla.redhat.com/show_bug.cgi?id=1111687
[Bug 1111687] CVE-2014-3499 docker: systemd socket activation results in
privilege escalation
--
You are receiving this mail because:
You are on the CC list for the bug.
9 years, 9 months