From c91e9b6b852e32dc1eb3dd8de53e61ed17443f88 Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Thu, 21 Nov 2013 12:25:57 -0500 Subject: [PATCH] accomdate the move of hostname command for rawhide --- golang-f21-hostname.patch | 13 +++++++++++++ golang.spec | 11 +++++++++++ 2 files changed, 24 insertions(+) create mode 100644 golang-f21-hostname.patch 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