commit c91e9b6b852e32dc1eb3dd8de53e61ed17443f88
Author: Vincent Batts <vbatts(a)redhat.com>
Date: Thu Nov 21 12:25:57 2013 -0500
accomdate the move of hostname command for rawhide
golang-f21-hostname.patch | 13 +++++++++++++
golang.spec | 11 +++++++++++
2 files changed, 24 insertions(+), 0 deletions(-)
---
diff --git a/golang-f21-hostname.patch b/golang-f21-hostname.patch
new file mode 100644
index 0000000..acc3c6c
--- /dev/null
+++ b/golang-f21-hostname.patch
@@ -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)
+ }
diff --git a/golang.spec b/golang.spec
index 2a87669..accbac7 100644
--- a/golang.spec
+++ b/golang.spec
@@ -32,7 +32,14 @@ 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
+%endif
+
BuildRequires: emacs xemacs xemacs-packages-extra
# We strip the meta dependency, but go does require glibc.
@@ -124,6 +131,10 @@ end
# increase verbosity of build
%patch0 -p1
+%if 0%{?fedora} >= 21
+%patch1 -p1
+%endif
+
# Fix BZ#1010271
%patch10 -p1
%patch11 -p1