%global provider github %global provider_tld com %global project google %global repo cadvisor #%global commit 0.44.0 %global import_path %{provider}.%{provider_tld}/%{project}/%{repo} %global gopath %{_datadir}/gocode %global shortcommit %(c=%{commit}; echo ${c:0:8}) %global debug_package %{nil} Name: %{repo} Version: 0.44.0 Release: beta%{?dist} Summary: Analyzes resource usage and performance characteristics of running containers License: ASL 2.0 URL: https://%{import_path} Source0: https://%{import_path}/archive/%{commit}/%{repo}-%{shortcommit}.tar.gz Source1: cadvisor Source2: cadvisor.service #BuildRequires: docker-io-pkg-devel BuildRequires: systemd BuildRequires: golang >= 1.2.1-3 ExclusiveArch: x86_64 %description %{summary} cAdvisor (Container Advisor) provides container users an understanding of the resource usage and performance characteristics of their running containers. It is a running daemon that collects, aggregates, processes, and exports information about running containers. Specifically, for each container it keeps resource isolation parameters, historical resource usage, histograms of complete historical resource usage and network statistics. This data is exported by container and machine-wide. cAdvisor currently supports lmctfy containers as well as Docker containers (those that use the default libcontainer execdriver). Other container backends can also be added. cAdvisor's container abstraction is based on lmctfy's so containers are inherently nested hierarchically. %prep %setup -n %{name}-%{commit} -q %build mkdir _build pushd _build mkdir -p src/github.com/google ln -s $(dirs +1 -l) src/github.com/google/cadvisor popd GOPATH=$(pwd)/Godeps/_workspace:$(pwd)/_build:%{gopath} make build %install # main package binary install -d -p %{buildroot}%{_bindir} install -p -m0755 cadvisor %{buildroot}%{_bindir} # install systemd/sysconfig install -d -m0755 %{buildroot}%{_sysconfdir}/sysconfig/ install -p -m0660 %{SOURCE1} %{buildroot}%{_sysconfdir}/sysconfig/%{name} install -d -m0755 %{buildroot}%{_unitdir} install -p -m0644 %{SOURCE2} %{buildroot}%{_unitdir}/%{name}.service %check # skip check #GOPATH=$(pwd)/Godeps/_workspace:$(pwd)/_build:%{gopath} make test %post %systemd_post cadvisor.service %preun %systemd_preun cadvisor.service %postun %systemd_postun %files %doc AUTHORS CHANGELOG.md CONTRIBUTING.md LICENSE README.md %{_bindir}/cadvisor %{_unitdir}/%{name}.service %config(noreplace) %{_sysconfdir}/sysconfig/%{name} %changelog * Wed Jun 15 2022 Tomas Dabasinskas - 0.44.0-beta - Beta build for epel7 * Mon Oct 06 2014 jchaloup - 0.4.1-0.3.git6906a8ce - Move cadvisor.service and cadvisor config file from patch into repo * Sun Oct 05 2014 Eric Paris - 0.4.1-0.2.git6906a8ce - Fix cadvisor storage driver since upstream removed 'memory' * Wed Oct 01 2014 jchaloup - 0.4.1-0.1.git6906a8ce - Bump to upstream 6906a8ce90e9f00d6a1a8b7530b83bf083622036 - remove -devel subpackage - remove golang dependencies and build with Godeps directory - adding go test in check section * Fri Sep 19 2014 Lokesh Mandvekar - 0.3.0-0.3.git9d158c3 - own parent directory of - preserve timestamps of copied files in -devel - use _unitdir macro for systemd install path * Fri Sep 12 2014 Eric Paris - 0.2.0-1 - First package for Fedora