mirror of
https://abf.rosa.ru/djam/golang.git
synced 2025-02-23 16:52:54 +00:00
Update to 1.13
This commit is contained in:
parent
3fa4ffdad4
commit
78d77df2ad
3 changed files with 42 additions and 18 deletions
3
.abf.yml
3
.abf.yml
|
@ -1,3 +0,0 @@
|
||||||
sources:
|
|
||||||
go1.4.3.src.tar.gz: 486db10dc571a55c8d795365070f66d343458c48
|
|
||||||
go1.4.src.tar.gz: 6a7d9bd90550ae1e164d7803b3e945dc8309252b
|
|
|
@ -2,3 +2,7 @@ addFilter("binaryinfo-readelf-failed") # go binaries are suposedly ELF-complian
|
||||||
addFilter("statically-linked-binary") # go doesn't yet support dynamic linking
|
addFilter("statically-linked-binary") # go doesn't yet support dynamic linking
|
||||||
addFilter("unstripped-binary-or-object") # doesnt like stripping
|
addFilter("unstripped-binary-or-object") # doesnt like stripping
|
||||||
addFilter("devel-file-in-non-devel-package")
|
addFilter("devel-file-in-non-devel-package")
|
||||||
|
addFilter("E: missing-PT_GNU_STACK-section")
|
||||||
|
addFilter("E: zero-length")
|
||||||
|
addFilter("E: non-readable")
|
||||||
|
|
||||||
|
|
53
golang.spec
53
golang.spec
|
@ -27,14 +27,17 @@
|
||||||
%define __noautoreq '/bin/rc|/usr/bin/awk|libc.so'
|
%define __noautoreq '/bin/rc|/usr/bin/awk|libc.so'
|
||||||
|
|
||||||
Name: golang
|
Name: golang
|
||||||
Version: 1.4.3
|
Version: 1.13
|
||||||
Release: 3
|
Release: 1
|
||||||
Summary: The Go Programming Language
|
Summary: The Go Programming Language
|
||||||
Group: Development/Other
|
Group: Development/Other
|
||||||
License: BSD
|
License: BSD
|
||||||
URL: http://golang.org/
|
URL: http://golang.org/
|
||||||
Source0: https://storage.googleapis.com/golang/go%{version}.src.tar.gz
|
Source0: https://storage.googleapis.com/golang/go%{version}.src.tar.gz
|
||||||
Source3: macros.go
|
Source3: macros.go
|
||||||
|
#bootstrap
|
||||||
|
Source10: https://storage.googleapis.com/golang/go%{version}.linux-amd64.tar.gz
|
||||||
|
Source11: https://storage.googleapis.com/golang/go%{version}.linux-386.tar.gz
|
||||||
# for hostname
|
# for hostname
|
||||||
BuildRequires: net-tools
|
BuildRequires: net-tools
|
||||||
|
|
||||||
|
@ -72,35 +75,47 @@ end
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n go
|
#setup -q -n go
|
||||||
|
|
||||||
|
|
||||||
# setup go_arch (BSD-like scheme)
|
# setup go_arch (BSD-like scheme)
|
||||||
%ifarch %{ix86}
|
%ifarch %{ix86}
|
||||||
sed -i 's|GOARCH|386|' %{SOURCE3}
|
sed -i 's|GOARCH|386|' %{SOURCE3}
|
||||||
%define go_arch 386
|
%define go_arch 386
|
||||||
|
%setup -q -a11 -T -c -n go-bootstrap
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%ifarch x86_64
|
%ifarch x86_64
|
||||||
sed -i 's|GOARCH|amd64|' %{SOURCE3}
|
sed -i 's|GOARCH|amd64|' %{SOURCE3}
|
||||||
%define go_arch amd64
|
%define go_arch amd64
|
||||||
|
%setup -q -a10 -T -c -n go-bootstrap
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%setup -q -n go
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export CFLAGS="${RPM_OPT_FLAGS/-Wstrict-aliasing=2/} -Wno-error"
|
export CFLAGS="${RPM_OPT_FLAGS/-Wstrict-aliasing=2/} -Wno-error"
|
||||||
export LDFLAGS="$RPM_LD_FLAGS"
|
export LDFLAGS="$RPM_LD_FLAGS"
|
||||||
|
|
||||||
# set up final install location
|
# set up final install location
|
||||||
export GOROOT_FINAL=%{_libdir}/%{name}
|
export GOROOT_FINAL=%{_libdir}/%{name}
|
||||||
export GOROOT=$(pwd -P)
|
#export GOROOT=$(pwd -P)
|
||||||
|
export GOROOT=$RPM_BUILD_DIR/go-bootstrap/go
|
||||||
export GOBIN="$GOROOT"/bin
|
export GOBIN="$GOROOT"/bin
|
||||||
|
export GOROOT_BOOTSTRAP=$GOROOT
|
||||||
# TODO use the system linker to get the system link flags and build-id
|
# TODO use the system linker to get the system link flags and build-id
|
||||||
# when https://code.google.com/p/go/issues/detail?id=5221 is solved
|
# when https://code.google.com/p/go/issues/detail?id=5221 is solved
|
||||||
#export GO_LDFLAGS="-linkmode external -extldflags $RPM_LD_FLAGS"
|
#export GO_LDFLAGS="-linkmode external -extldflags $RPM_LD_FLAGS"
|
||||||
|
|
||||||
# build
|
# build
|
||||||
cd src
|
#cd src
|
||||||
|
#./make.bash
|
||||||
|
#cd ..
|
||||||
|
|
||||||
|
pushd src
|
||||||
./make.bash
|
./make.bash
|
||||||
cd ..
|
popd
|
||||||
|
|
||||||
# build static version of documentation
|
# build static version of documentation
|
||||||
export PATH="$PATH":"$GOROOT"/bin
|
export PATH="$PATH":"$GOROOT"/bin
|
||||||
|
@ -115,7 +130,7 @@ cd src
|
||||||
# For now test 3729,5603 doesn't pass so skiping it
|
# For now test 3729,5603 doesn't pass so skiping it
|
||||||
perl -pi -e 's/!windows/!windows,!linux/' ../misc/cgo/test/issue3729.go
|
perl -pi -e 's/!windows/!windows,!linux/' ../misc/cgo/test/issue3729.go
|
||||||
perl -pi -e 's/func Test3729/\/\/func Test3729/' ../misc/cgo/test/cgo_test.go
|
perl -pi -e 's/func Test3729/\/\/func Test3729/' ../misc/cgo/test/cgo_test.go
|
||||||
perl -pi -e 's/^package/\/\/ +build !linuxpackage/' ../misc/cgo/test/issue5603.go
|
perl -pi -e 's/^package/\/\/ +build !linux
package/' ../misc/cgo/test/issue5603.go
|
||||||
perl -pi -e 's/func Test5603/\/\/func Test5603/' ../misc/cgo/test/cgo_test.go
|
perl -pi -e 's/func Test5603/\/\/func Test5603/' ../misc/cgo/test/cgo_test.go
|
||||||
#./run.bash --no-rebuild
|
#./run.bash --no-rebuild
|
||||||
cd ..
|
cd ..
|
||||||
|
@ -123,13 +138,19 @@ cd ..
|
||||||
|
|
||||||
%install
|
%install
|
||||||
# create the top level directories
|
# create the top level directories
|
||||||
mkdir -p %{buildroot}%{_bindir}
|
install -d %{buildroot}%{_bindir}
|
||||||
mkdir -p %{buildroot}%{_libdir}/%{name}
|
install -d %{buildroot}%{_libdir}/%{name}
|
||||||
|
|
||||||
|
# remove all .bat
|
||||||
|
pushd src
|
||||||
|
rm -f *.bat
|
||||||
|
popd
|
||||||
|
|
||||||
|
|
||||||
# install everything into libdir (until symlink problems are fixed)
|
# install everything into libdir (until symlink problems are fixed)
|
||||||
# https://code.google.com/p/go/issues/detail?id=5830
|
# https://code.google.com/p/go/issues/detail?id=5830
|
||||||
cp -av api bin doc favicon.ico include lib pkg robots.txt src \
|
#cp -av api bin doc favicon.ico include lib pkg robots.txt src %{buildroot}%{_libdir}/%{name}
|
||||||
%{buildroot}%{_libdir}/%{name}
|
cp -av bin lib src pkg robots.txt %{buildroot}%{_libdir}/%{name}
|
||||||
|
|
||||||
# remove the unnecessary zoneinfo file (Go will always use the system one first)
|
# remove the unnecessary zoneinfo file (Go will always use the system one first)
|
||||||
rm -rfv %{buildroot}%{_libdir}/%{name}/lib/time
|
rm -rfv %{buildroot}%{_libdir}/%{name}/lib/time
|
||||||
|
@ -145,18 +166,20 @@ done
|
||||||
popd
|
popd
|
||||||
|
|
||||||
# gdbinit
|
# gdbinit
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/gdbinit.d
|
#mkdir -p %{buildroot}%{_sysconfdir}/gdbinit.d
|
||||||
|
install -d %{buildroot}%{_sysconfdir}/gdbinit.d
|
||||||
cp -av %{SOURCE100} %{buildroot}%{_sysconfdir}/gdbinit.d/golang
|
cp -av %{SOURCE100} %{buildroot}%{_sysconfdir}/gdbinit.d/golang
|
||||||
|
|
||||||
# prelink blacklist
|
# prelink blacklist
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/prelink.conf.d
|
#mkdir -p %{buildroot}%{_sysconfdir}/prelink.conf.d
|
||||||
|
install -d %{buildroot}%{_sysconfdir}/prelink.conf.d
|
||||||
cp -av %{SOURCE101} %{buildroot}%{_sysconfdir}/prelink.conf.d/golang.conf
|
cp -av %{SOURCE101} %{buildroot}%{_sysconfdir}/prelink.conf.d/golang.conf
|
||||||
|
|
||||||
# install RPM macros ($GOARCH prepared in %%prep section)
|
# install RPM macros ($GOARCH prepared in %%prep section)
|
||||||
install -Dm644 %{SOURCE3} %{buildroot}%{_sysconfdir}/rpm/macros.go
|
install -Dm644 %{SOURCE3} %{buildroot}%{_sysconfdir}/rpm/macros.go
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%doc AUTHORS CONTRIBUTORS LICENSE PATENTS VERSION
|
%doc api/ doc/ AUTHORS CONTRIBUTORS LICENSE PATENTS VERSION README.md
|
||||||
# go files
|
# go files
|
||||||
%{_libdir}/%{name}
|
%{_libdir}/%{name}
|
||||||
# bin symlinks
|
# bin symlinks
|
||||||
|
|
Loading…
Add table
Reference in a new issue