Merge branch 'master' into f20

Conflicts:
	golang.spec
This commit is contained in:
Vincent Batts 2013-11-21 14:46:08 -05:00
commit 6dfa9a88bc
2 changed files with 111 additions and 45 deletions

13
golang-f21-hostname.patch Normal file
View File

@ -0,0 +1,13 @@
Index: go/src/pkg/os/os_test.go
===================================================================
--- go.orig/src/pkg/os/os_test.go
+++ go/src/pkg/os/os_test.go
@@ -842,7 +842,7 @@ func run(t *testing.T, cmd []string) str
if err != nil {
t.Fatal(err)
}
- p, err := StartProcess("/bin/hostname", []string{"hostname"}, &ProcAttr{Files: []*File{nil, w, Stderr}})
+ p, err := StartProcess("/usr/bin/hostname", []string{"hostname"}, &ProcAttr{Files: []*File{nil, w, Stderr}})
if err != nil {
t.Fatal(err)
}

View File

@ -25,28 +25,41 @@
Name: golang
Version: 1.1.2
Release: 3%{?dist}
Release: 7%{?dist}
Summary: The Go Programming Language
License: BSD
URL: http://golang.org/
Source0: https://go.googlecode.com/files/go%{version}.src.tar.gz
# this command moved places
%if 0%{?fedora} >= 21
BuildRequires: /usr/bin/hostname
Patch1: golang-f21-hostname.patch
%else
BuildRequires: /bin/hostname
BuildRequires: emacs xemacs xemacs-packages-extra
%endif
BuildRequires: emacs
# xemacs on fedora only
%if 0%{?fedora} >= 0
BuildRequires: xemacs xemacs-packages-extra
%endif
# We strip the meta dependency, but go does require glibc.
# This is an odd issue, still looking for a better fix.
Requires: glibc
# `go doc ...` calls out to godoc in $PATH
# while godoc is in go1.1, it is moved to go.tools in go1.2
Requires: /usr/bin/godoc
Patch0: golang-1.1-verbose-build.patch
Patch10: golang-1.1.2-long-links.patch
Patch11: golang-1.1.2-ustar-split.patch
# Having godoc and the documentation separate was broken
Obsoletes: %{name}-godoc < 1.1-4
# Having documentation separate was broken
Obsoletes: %{name}-docs < 1.1-4
# RPM can't handle symlink -> dir with subpackages, so merge back
@ -61,6 +74,11 @@ Source101: golang-prelink.conf
%{summary}.
%package godoc
Summary: The Go Programming Language documentation tool
%description godoc
%{summary}.
# Restore this package if RPM gets fixed (bug #975909)
#%package data
#Summary: Required architecture-independent files for Go
@ -74,7 +92,10 @@ Source101: golang-prelink.conf
%package vim
Summary: Vim plugins for Go
# xemacs on fedora only
%if 0%{?fedora} >= 0
Requires: vim-filesystem
%endif
BuildArch: noarch
%description vim
@ -90,6 +111,8 @@ BuildArch: noarch
%{summary}.
# xemacs on fedora only
%if 0%{?fedora} >= 0
%package -n xemacs-%{name}
Summary: XEmacs add-on package for Go
Requires: xemacs(bin) >= %{_xemacs_version}
@ -98,6 +121,7 @@ BuildArch: noarch
%description -n xemacs-%{name}
%{summary}.
%endif
# Workaround old RPM bug of symlink-replaced-with-dir failure
@ -117,6 +141,10 @@ end
# increase verbosity of build
%patch0 -p1
%if 0%{?fedora} >= 21
%patch1 -p1
%endif
# Fix BZ#1010271
%patch10 -p1
%patch11 -p1
@ -152,9 +180,12 @@ cd ..
# compile for emacs and xemacs
cd misc
mv emacs/go-mode-load.el emacs/%{name}-init.el
# xemacs on fedora only
%if 0%{?fedora} >= 0
cp -av emacs xemacs
%{_emacs_bytecompile} emacs/go-mode.el
%{_xemacs_bytecompile} xemacs/go-mode.el
%endif
%{_emacs_bytecompile} emacs/go-mode.el
cd ..
@ -184,10 +215,10 @@ rm -rfv $RPM_BUILD_ROOT%{_libdir}/%{name}/lib/time
# remove the doc Makefile
rm -rfv $RPM_BUILD_ROOT%{_libdir}/%{name}/doc/Makefile
# add symlinks for binaries
# put binaries to bindir
pushd $RPM_BUILD_ROOT%{_bindir}
for z in $RPM_BUILD_ROOT%{_libdir}/%{name}/bin/*
do ln -s %{_libdir}/%{name}/bin/$(basename $z)
do mv $RPM_BUILD_ROOT%{_libdir}/%{name}/bin/$(basename $z) .
done
popd
@ -204,11 +235,14 @@ mkdir -p $RPM_BUILD_ROOT%{_emacs_sitestartdir}
cp -av misc/emacs/go-mode.* $RPM_BUILD_ROOT%{_emacs_sitelispdir}/%{name}
cp -av misc/emacs/%{name}-init.el $RPM_BUILD_ROOT%{_emacs_sitestartdir}
# xemacs on fedora only
%if 0%{?fedora} >= 0
# misc/xemacs
mkdir -p $RPM_BUILD_ROOT%{_xemacs_sitelispdir}/%{name}
mkdir -p $RPM_BUILD_ROOT%{_xemacs_sitestartdir}
cp -av misc/xemacs/go-mode.* $RPM_BUILD_ROOT%{_xemacs_sitelispdir}/%{name}
cp -av misc/xemacs/%{name}-init.el $RPM_BUILD_ROOT%{_xemacs_sitestartdir}
%endif
# misc/vim
mkdir -p $RPM_BUILD_ROOT%{_datadir}/vim/vimfiles
@ -228,15 +262,17 @@ mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/prelink.conf.d
cp -av %{SOURCE101} $RPM_BUILD_ROOT%{_sysconfdir}/prelink.conf.d/golang.conf
%files godoc
%{_bindir}/godoc
%files
%doc AUTHORS CONTRIBUTORS LICENSE PATENTS VERSION
# go files
%{_libdir}/%{name}
# bin symlinks
# binary executables
%{_bindir}/go
%{_bindir}/godoc
%{_bindir}/gofmt
# autocomplete
@ -261,20 +297,37 @@ cp -av %{SOURCE101} $RPM_BUILD_ROOT%{_sysconfdir}/prelink.conf.d/golang.conf
%{_emacs_sitestartdir}/*.el
# xemacs on fedora only
%if 0%{?fedora} >= 0
%files -n xemacs-%{name}
%doc AUTHORS CONTRIBUTORS LICENSE PATENTS
%{_xemacs_sitelispdir}/%{name}
%{_xemacs_sitestartdir}/*.el
%endif
%changelog
* Fri Sep 20 2013 Adam Miller <maxamillion@fedoraproject.org> - 1.1.2-3
* Thu Nov 21 2013 Vincent Batts <vbatts@redhat.com> - 1.1.2-7
- patch tests for testing on rawhide
- let the same spec work for rhel and fedora
* Wed Nov 20 2013 Vincent Batts <vbatts@redhat.com> - 1.1.2-6
- don't symlink /usr/bin out to ../lib..., move the file
- seperate out godoc, to accomodate the go.tools godoc
* Fri Sep 20 2013 Adam Miller <maxamillion@fedoraproject.org> - 1.1.2-5
- Pull upstream patches for BZ#1010271
- Add glibc requirement that got dropped because of meta dep fix
* Fri Aug 30 2013 Adam Miller <maxamillion@fedoraproject.org> - 1.1.2-2
* Fri Aug 30 2013 Adam Miller <maxamillion@fedoraproject.org> - 1.1.2-4
- fix the libc meta dependency (thanks to vbatts [at] redhat.com for the fix)
* Tue Aug 27 2013 Adam Miller <maxamillion@fedoraproject.org> - 1.1.2-3
- Revert incorrect merged changelog
* Tue Aug 27 2013 Adam Miller <maxamillion@fedoraproject.org> - 1.1.2-2
- This was reverted, just a placeholder changelog entry for bad merge
* Tue Aug 20 2013 Adam Miller <maxamillion@fedoraproject.org> - 1.1.2-1
- Update to latest upstream