remove testdata binaries for other architectures [release 1.10.1-2mamba;Tue Apr 24 2018]

This commit is contained in:
Silvan Calarco 2024-01-05 23:18:56 +01:00
parent fe7254a1db
commit 24bb3e3167
3 changed files with 139 additions and 0 deletions

View File

@ -1,2 +1,4 @@
# go
The Go programming language.

View File

@ -0,0 +1,14 @@
diff --git a/src/cmd/go/internal/work/init.go b/src/cmd/go/internal/work/init.go
index 7f894f5..a517887 100644
--- a/src/cmd/go/internal/work/init.go
+++ b/src/cmd/go/internal/work/init.go
@@ -111,7 +111,8 @@ func buildModeInit() {
ldBuildmode = "c-shared"
case "default":
switch platform {
- case "android/arm", "android/arm64", "android/amd64", "android/386":
+ case "linux/amd64", "linux/arm", "linux/arm64", "linux/386", "linux/ppc64le",
+ "android/arm", "android/arm64", "android/amd64", "android/386":
codegenArg = "-shared"
ldBuildmode = "pie"
case "darwin/arm", "darwin/arm64":

go.spec Normal file
View File

@ -0,0 +1,123 @@
#% define with_pie 1
Name: go
Version: 1.10.1
Release: 2mamba
Summary: The Go programming language
Group: Applications/Development
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <>
## GITSOURCE go1.10.1
Patch0: go-1.10.1-default-buildmode-pie.patch
License: BSD
BuildRequires: glibc-devel
BuildRequires: ldconfig
BuildRequires: libperl
BuildRequires: perl-devel
Conflicts: gcc-go
Provides: go
%if "%{with_pie}" == "1"
Conflicts: go
Conflicts: go-pie
BuildRoot: %{_tmppath}/%{name}-%{version}-root
The Go programming language.
%package pie
Group: Applications/Development
Summary: The Go programming language (with PIE enabled by default)
%description pie
The Go programming language (with PIE enabled by default).
%setup -q
%if "%{with_pie}" == "1"
%patch0 -p1
%define _use_internal_dependency_generator 0
%define __find_provides %{_builddir}/go-%{version}/
cat > %{_builddir}/go-%{version}/ <<_EOF
#! /bin/sh
%{_prefix}/lib/rpm/find-provides %{buildroot} %{_target_cpu}
chmod +x %{_builddir}/go-%{version}/
%define __find_requires %{_builddir}/go-%{version}/
cat > %{_builddir}/go-%{version}/ <<_EOF
#! /bin/sh
grep -v %{buildroot}%{_libdir}/go/src/ | \
%{_prefix}/lib/rpm/find-requires %{buildroot} %{_target_cpu} 2>/dev/null
chmod +x %{_builddir}/go-%{version}/
export GOPATH="`pwd`/"
export GOBIN="$GOROOT/bin"
cd "$GOPATH/src"
./make.bash --no-clean -v
PATH="$GOBIN:$PATH" go install -v -buildmode=shared std
%ifarch x86_64
PATH="$GOBIN:$PATH" go install -v -race std
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
export GOPATH="`pwd`/"
options=(!strip staticlibs)
install -d %{buildroot}{%{_bindir},%{_libdir}/go,%{_docdir}/go}
cp -a bin pkg src lib misc %{buildroot}%{_libdir}/go
cp -r doc/* %{buildroot}%{_docdir}/go
ln -sf %{_libdir}/go/bin/go %{buildroot}%{_bindir}/go
ln -sf %{_libdir}/go/bin/gofmt %{buildroot}%{_bindir}/gofmt
ln -sf %{_docdir}/go %{buildroot}%{_libdir}/go/doc
install -Dm644 LICENSE %{buildroot}%{_datadir}/licenses/go/LICENSE
install -Dm644 VERSION %{buildroot}%{_libdir}/go/VERSION
rm -rf %{buildroot}%{_libdir}/go/pkg/bootstrap
rm -rf %{buildroot}%{_libdir}/go/pkg/tool/*/api
rm -rf %{buildroot}%{_libdir}/go/src/*.rc
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%if "%{with_pie}" == "1"
%files pie
%dir %{_libdir}/go
%dir %{_datadir}/doc/go
* Tue Apr 24 2018 Silvan Calarco <> 1.10.1-2mamba
- remove testdata binaries for other architectures
* Thu Apr 19 2018 Silvan Calarco <> 1.10.1-1mamba
- package created using the webbuild interface