Hello, as we have gcc5 with gcc-go in f22, I have tried to build docker-io on both 64bit BE and LE. It does build, even test are failing in same way as on x86 :). Only man pages are missing as golang-github-cpuguy83-go-md2man is missing due to dependency on golang.
I haven't tried to do any actual testing, as there are no fedora-ppc images for docker yet.
Bit rough fedora git patch fellows.(clean solution also depends how gcc-go will be handled in fedora)(should apply cleanly against http://pkgs.fedoraproject.org/cgit/docker-io.git/commit/?id=b12666ec5e307972...)
Jakub
-----------
diff --git a/docker-gccgo.patch b/docker-gccgo.patch new file mode 100644 index 0000000..8ff9b7e --- /dev/null +++ b/docker-gccgo.patch @@ -0,0 +1,12 @@ +diff -up docker-5ebfacda4747fb0b2473841dff9b9b771b3bcb53/hack/make.sh.gccgo docker-5ebfacda4747fb0b2473841dff9b9b771b3bcb53/hack/make.sh +--- docker-5ebfacda4747fb0b2473841dff9b9b771b3bcb53/hack/make.sh.gccgo 2015-03-20 13:11:07.567000000 +0100 ++++ docker-5ebfacda4747fb0b2473841dff9b9b771b3bcb53/hack/make.sh 2015-03-20 13:11:24.111000000 +0100 +@@ -114,7 +114,7 @@ EXTLDFLAGS_STATIC='-static' + # with options like -race. + ORIG_BUILDFLAGS=( -a -tags "netgo static_build $DOCKER_BUILDTAGS" -installsuffix netgo ) + # see https://github.com/golang/go/issues/9369#issuecomment-69864440 for why -installsuffix is necessary here +-BUILDFLAGS=( $BUILDFLAGS "${ORIG_BUILDFLAGS[@]}" ) ++BUILDFLAGS=( $BUILDFLAGS "${ORIG_BUILDFLAGS[@]}" -compiler gccgo -gccgoflags "$RPM_OPT_FLAGS" ) + # Test timeout. + : ${TIMEOUT:=30m} + TESTFLAGS+=" -test.timeout=${TIMEOUT}" diff --git a/docker-io.spec b/docker-io.spec index 334e6a5..b0727bf 100644 --- a/docker-io.spec +++ b/docker-io.spec @@ -15,6 +15,7 @@ %global shortcommit %(c=%{commit}; echo ${c:0:7})
%global tar_import_path code.google.com/p/go/src/pkg/archive/tar +%global gopath /usr/share/gocode
Name: %{repo}-io Version: 1.5.0 @@ -22,7 +23,6 @@ Release: 20.git%{shortcommit}%{?dist} Summary: Automates deployment of containerized applications License: ASL 2.0 URL: http://www.docker.com -ExclusiveArch: x86_64 %{arm} #Source0: https://%%7Bimport_path%7D/archive/%%7Bcommit%7D/%%7Brepo%7D-%%7Bshortcommit... Source0: https://github.com/lsm5/docker/archive/%%7Bcommit%7D/%%7Brepo%7D-%%7Bshortco... Source1: %{repo}.service @@ -31,13 +31,15 @@ Source3: %{repo}-storage.sysconfig Source4: %{repo}-logrotate.sh Source5: README.%{repo}-logrotate Source6: %{repo}-network.sysconfig +Patch0: docker-gccgo.patch BuildRequires: glibc-static -BuildRequires: golang >= 1.3.3 -BuildRequires: go-md2man +#BuildRequires: golang >= 1.3.3 +#BuildRequires: go-md2man BuildRequires: device-mapper-devel BuildRequires: btrfs-progs-devel BuildRequires: sqlite-devel BuildRequires: pkgconfig(systemd) +BuildRequires: gcc-go libgo-static %if 0%{?fedora} >= 21 # Resolves: rhbz#1165615 Requires: device-mapper-libs >= 1.02.90-1 @@ -70,13 +72,15 @@ and tests on a laptop will run at scale, in production*, on VMs, bare-metal servers, OpenStack clusters, public instances, or combinations of the above.
%package devel -BuildRequires: golang >= 1.2.1-3 -Requires: golang >= 1.2.1-3 +#BuildRequires: golang >= 1.2.1-3 +#Requires: golang >= 1.2.1-3 +BuildRequires: gcc-go +Requires: gcc-go Provides: %{repo}-devel = %{version}-%{release} Provides: %{name}-pkg-devel = %{version}-%{release} Provides: %{repo}-pkg-devel = %{version}-%{release} Provides: golang(%{import_path}/vendor/src/%{tar_import_path}) = %{version}-%{release} -Summary: A golang registry for global request variables (source libraries) +Summary: A golang registry for global request variables (source libraries) Provides: golang(%{import_path}) = %{version}-%{release} Provides: golang(%{import_path}/builder) = %{version}-%{release} Provides: golang(%{import_path}/builder/parser) = %{version}-%{release} @@ -210,6 +214,7 @@ This package installs %{summary}.
%prep %setup -q -n %{repo}-%{commit} +%patch0 -p1 -b .gccgo cp %{SOURCE5} .
%build @@ -222,7 +227,7 @@ export DOCKER_BUILDTAGS="selinux btrfs_noversion" export GOPATH=$(pwd)/_build:$(pwd)/vendor:%{gopath}
DEBUG=1 hack/make.sh dynbinary -docs/man/md2man-all.sh +#docs/man/md2man-all.sh cp contrib/syntax/vim/LICENSE LICENSE-vim-syntax cp contrib/syntax/vim/README.md README-vim-syntax.md
@@ -239,10 +244,10 @@ for x in bundles/*-dev; do \ done
# install manpages -install -d %{buildroot}%{_mandir}/man1 -install -p -m 644 docs/man/man1/docker*.1 %{buildroot}%{_mandir}/man1 -install -d %{buildroot}%{_mandir}/man5 -install -p -m 644 docs/man/man5/Dockerfile.5 %{buildroot}%{_mandir}/man5 +#install -d %{buildroot}%{_mandir}/man1 +#install -p -m 644 docs/man/man1/docker*.1 %{buildroot}%{_mandir}/man1 +#install -d %{buildroot}%{_mandir}/man5 +#install -p -m 644 docs/man/man5/Dockerfile.5 %{buildroot}%{_mandir}/man5
# install bash completion install -dp %{buildroot}%{_datadir}/bash-completion/completions @@ -287,14 +292,14 @@ install -p -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/sysconfig/docker-storage
# sources install -d -p %{buildroot}%{gopath}/src/%{import_path} -rm -rf pkg/symlink/testdata +#rm -rf pkg/symlink/testdata
# install tar_import_path to devel package install -d -p %{buildroot}%{gopath}/src/%{import_path}/vendor/src/%{tar_import_path} cp -rpav vendor/src/%{tar_import_path}/* %{buildroot}%{gopath}/src/%{import_path}/vendor/src/%{tar_import_path}
# remove dirs that won't be installed in devel -rm -rf vendor docs _build bundles contrib/init hack project +#rm -rf vendor docs _build bundles contrib/init hack project
# install sources to devel for dir in */ ; do @@ -305,15 +310,12 @@ done install -dp %{buildroot}%{_sysconfdir}/%{repo}
%check -[ ! -e /run/docker.sock ] || { - mkdir test_dir - pushd test_dir - git clone https://%%7Bimport_path%7D - pushd docker - make test - popd - popd -} + +export DOCKER_GITCOMMIT="%{shortcommit}/%{version}" +export DOCKER_BUILDTAGS="selinux btrfs_noversion" +export GOPATH=$(pwd)/_build:$(pwd)/vendor:%{gopath} + +DEBUG=1 hack/make.sh test-unit test-integration test-integration-cli test-docker-py || :
%pre getent passwd dockerroot > /dev/null || %{_sbindir}/useradd -r -d %{_sharedstatedir}/docker -s /sbin/nologin -c "Docker User" dockerroot @@ -334,8 +336,8 @@ exit 0 %config(noreplace) %{_sysconfdir}/sysconfig/docker %config(noreplace) %{_sysconfdir}/sysconfig/docker-network %config(noreplace) %{_sysconfdir}/sysconfig/docker-storage -%{_mandir}/man1/docker*.1.gz -%{_mandir}/man5/Dockerfile.5.gz +#%{_mandir}/man1/docker*.1.gz +#%{_mandir}/man5/Dockerfile.5.gz %{_bindir}/docker %{_libexecdir}/docker %{_unitdir}/docker.service
On Fri, Mar 20, 2015 at 11:08 AM, Jakub Cajka jcajka@redhat.com wrote:
Hello, as we have gcc5 with gcc-go in f22, I have tried to build docker-io on both 64bit BE and LE. It does build, even test are failing in same way as on x86 :). Only man pages are missing as golang-github-cpuguy83-go-md2man is missing due to dependency on golang.
I haven't tried to do any actual testing, as there are no fedora-ppc images for docker yet.
Bit rough fedora git patch fellows.(clean solution also depends how gcc-go will be handled in fedora)(should apply cleanly against http://pkgs.fedoraproject.org/cgit/docker-io.git/commit/?id=b12666ec5e307972...)
Did you send this patch to the docker-io package maintainers or open a bug? Fedora secondary architectures build from the canonical Fedora pkg-git repos, so this would need to be applied there before PowerPC can pick it up.
josh
On Fri, Mar 20, 2015 at 3:14 PM, Josh Boyer jwboyer@fedoraproject.org wrote:
On Fri, Mar 20, 2015 at 11:08 AM, Jakub Cajka jcajka@redhat.com wrote:
Hello, as we have gcc5 with gcc-go in f22, I have tried to build docker-io on both 64bit BE and LE. It does build, even test are failing in same way as on x86 :). Only man pages are missing as golang-github-cpuguy83-go-md2man is missing due to dependency on golang.
I haven't tried to do any actual testing, as there are no fedora-ppc images for docker yet.
Bit rough fedora git patch fellows.(clean solution also depends how gcc-go will be handled in fedora)(should apply cleanly against http://pkgs.fedoraproject.org/cgit/docker-io.git/commit/?id=b12666ec5e307972...)
Did you send this patch to the docker-io package maintainers or open a bug? Fedora secondary architectures build from the canonical Fedora pkg-git repos, so this would need to be applied there before PowerPC can pick it up.
There's still a lot more work to be done before we can send it up stream, at the moment it's just to provide a central starting point for testing locally before bundling it all together to enable in mainline.
There's also conversations to be had as to had as to whether we move all archtectures to gcc-go or wait for golang 1.5 in (probably) F-23 and just use that. It's too late for F-22 cycle anyway IMO.
Peter
On Fri, 20 Mar 2015 15:22:17 +0000 Peter Robinson pbrobinson@gmail.com wrote:
On Fri, Mar 20, 2015 at 3:14 PM, Josh Boyer jwboyer@fedoraproject.org wrote:
On Fri, Mar 20, 2015 at 11:08 AM, Jakub Cajka jcajka@redhat.com wrote:
Hello, as we have gcc5 with gcc-go in f22, I have tried to build docker-io on both 64bit BE and LE. It does build, even test are failing in same way as on x86 :). Only man pages are missing as golang-github-cpuguy83-go-md2man is missing due to dependency on golang.
I haven't tried to do any actual testing, as there are no fedora-ppc images for docker yet.
Bit rough fedora git patch fellows.(clean solution also depends how gcc-go will be handled in fedora)(should apply cleanly against http://pkgs.fedoraproject.org/cgit/docker-io.git/commit/?id=b12666ec5e307972...)
Did you send this patch to the docker-io package maintainers or open a bug? Fedora secondary architectures build from the canonical Fedora pkg-git repos, so this would need to be applied there before PowerPC can pick it up.
There's still a lot more work to be done before we can send it up stream, at the moment it's just to provide a central starting point for testing locally before bundling it all together to enable in mainline.
There's also conversations to be had as to had as to whether we move all archtectures to gcc-go or wait for golang 1.5 in (probably) F-23 and just use that. It's too late for F-22 cycle anyway IMO.
yes, as Peter says, it is an exercise to play with and eventually get it integrated
Dan
On 03/20/2015 08:52 PM, Peter Robinson wrote: [snip]
There's also conversations to be had as to had as to whether we move all archtectures to gcc-go or wait for golang 1.5 in (probably) F-23 and just use that. It's too late for F-22 cycle anyway IMO.
Will it be acceptable to have gccgo for ppc64 and s390x archs only based on relative stability of gccgo over golang ? Or it's completely unacceptable to have different set of build tools based on archs ?
Just wanted to hear everyone's thoughts here.
Peter _______________________________________________ ppc mailing list ppc@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/ppc
On Wed, 15 Apr 2015 20:24:56 +0530 Pradipta Kumar Banerjee bpradip@in.ibm.com wrote:
On 03/20/2015 08:52 PM, Peter Robinson wrote: [snip]
There's also conversations to be had as to had as to whether we move all archtectures to gcc-go or wait for golang 1.5 in (probably) F-23 and just use that. It's too late for F-22 cycle anyway IMO.
Will it be acceptable to have gccgo for ppc64 and s390x archs only based on relative stability of gccgo over golang ? Or it's completely unacceptable to have different set of build tools based on archs ?
Just wanted to hear everyone's thoughts here.
I think it is acceptable to let the secondary architecture maintainers decide what toolset they will use if they both provide same functions, but differ on the set of supported arches. The prerequisite is that mainline Fedora agrees on rules that will allow (or enforce) using some set of macros instead of hard-coded compiler in the spec files by writing that in the Go packaging guidelines.
Dan