%global _dwz_low_mem_die_limit 0 %global provider github %global provider_tld com %global project openshift %global repo eventrouter # https://github.com/openshift/eventrouter %global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo} %global import_path %{provider_prefix} %global build_path %{build_gopath}/src/%{import_path} %global commit 7c289ccf0ee93cf32ed19685bbd005a5c69749f1 %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global build_gopath %{_builddir}/%{repo}-%{shortcommit}-go %global upstream_ver 0.2 %global rpm_ver %(v=%{upstream_ver}; echo ${v//-/_}) %if ! 0%{?gobuild:1} %define gobuild(o:) go build -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n')" -a -v -x %{?**}; %endif Name: %{project}-%{repo} Version: %{rpm_ver} Release: 4.git%{shortcommit}%{?dist} Summary: An active watcher forwarding Kubernetes events to various sinks. License: ASL 2.0 URL: https://github.com/openshift/eventrouter Source0: https://%{provider}.%{provider_tld}/%{project}/%{repo}/archive/%{commit}/%{repo}-%{shortcommit}.tar.gz # e.g. el6 has ppc64 arch without gcc-go, so EA tag is required ExclusiveArch: %{?go_arches:%{go_arches}}%{!?go_arches:%{ix86} x86_64 aarch64 %{arm} ppc64le s390x} # If go_compiler is not set to 1, there is no virtual provide. Use golang instead. BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang} %description %{summary} %prep %setup -q -n %{repo}-%{commit} %build mkdir -p src/%{provider}.%{provider_tld}/%{project} # Link the extracted source directories to the expected GOPATH layout ln -s ../../../ src/%{provider}.%{provider_tld}/%{project}/%{repo} export GOPATH=$(pwd):%{build_gopath} %gobuild -o bin/eventrouter %{import_path} %install mkdir -p %{buildroot}/%{_binddir} install -D -p -m 0755 bin/eventrouter %{buildroot}%{_bindir}/eventrouter %files %{_bindir}/eventrouter %changelog * Tue Oct 22 2019 Rich Megginson - 0.2-4.git7c289cc - Resolves: rhbz#1701495: Eventrouter pod in CrashLoopBackOff status: "runtime error: invalid memory address or nil pointer dereference" - Add support for prometheus counters for "Info" type and unknown types * Mon Dec 03 2018 Rich Megginson - 0.2-1.gited73fb6 - update to 0.2 * Tue Sep 19 2017 Jan Wozniak - 0.1-1.git5bd9251 - Initial commit