diff --git a/golang-github-prometheus-procfs.spec b/golang-github-prometheus-procfs.spec index 4ad38a7..175d497 100644 --- a/golang-github-prometheus-procfs.spec +++ b/golang-github-prometheus-procfs.spec @@ -30,11 +30,12 @@ Name: golang-%{provider}-%{project}-%{repo} Version: 0 -Release: 0.11.git%{shortcommit}%{?dist} +Release: 0.12.git%{shortcommit}%{?dist} Summary: Functions to retrieve system, kernel and process metrics from the /proc fs License: ASL 2.0 URL: https://%{provider_prefix} Source0: https://%{provider_prefix}/archive/%{commit}/%{repo}-%{shortcommit}.tar.gz +Patch0: golang-proc-pagesize.patch # If go_arches not defined fall through to implicit golang archs %if 0%{?go_arches:1} @@ -91,6 +92,7 @@ providing packages with %{import_path} prefix. %prep %setup -q -n %{repo}-%{commit} +%patch0 -p1 %build @@ -155,6 +157,9 @@ gotest %{import_path} %endif %changelog +* Mon Apr 11 2016 Than Ngo 0-0.12.git406e5b7 +- fix build issue on ppc64, use the syscall.Getpagesize to get correct pagesize + * Sun Apr 10 2016 Peter Robinson 0-0.10.git406e5b7 - Bump to upstream 406e5b7bfd8201a36e2bb5f7bdae0b03380c2ce8 - Spec cleanups diff --git a/golang-proc-pagesize.patch b/golang-proc-pagesize.patch new file mode 100644 index 0000000..8a74f38 --- /dev/null +++ b/golang-proc-pagesize.patch @@ -0,0 +1,19 @@ +diff -up procfs-406e5b7bfd8201a36e2bb5f7bdae0b03380c2ce8/proc_stat_test.go.than procfs-406e5b7bfd8201a36e2bb5f7bdae0b03380c2ce8/proc_stat_test.go +--- procfs-406e5b7bfd8201a36e2bb5f7bdae0b03380c2ce8/proc_stat_test.go.than 2016-04-11 06:37:23.590234409 -0400 ++++ procfs-406e5b7bfd8201a36e2bb5f7bdae0b03380c2ce8/proc_stat_test.go 2016-04-11 07:33:59.835360813 -0400 +@@ -1,5 +1,6 @@ + package procfs + ++import "syscall" + import "testing" + + func TestProcStat(t *testing.T) { +@@ -66,7 +67,7 @@ func TestProcStatResidentMemory(t *testi + t.Fatal(err) + } + +- if want, have := 1981*4096, s.ResidentMemory(); want != have { ++ if want, have := 1981*syscall.Getpagesize(), s.ResidentMemory(); want != have { + t.Errorf("want resident memory %d, have %d", want, have) + } + }