The package rpms/cadvisor.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/cadvisor.git/commit/?id=33807eca8....
Change:
-ExcludeArch: aarch64
Thanks.
Full change:
============
commit 33807eca89a8d56c93162352ce62ad6cc6e6dc86
Author: Robert-Andr Mauchin <zebob.m(a)gmail.com>
Date: Sat May 18 00:51:20 2019 +0200
Release 0.33.1
Signed-off-by: Robert-Andr Mauchin <zebob.m(a)gmail.com>
diff --git a/.gitignore b/.gitignore
index 051e871..a80f4ef 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
/cadvisor-546a377.tar.gz
+/cadvisor-0.33.1.tar.gz
diff --git a/0001-Fix-for-using-with-newer-github.com-opencontainers-r.patch
b/0001-Fix-for-using-with-newer-github.com-opencontainers-r.patch
new file mode 100644
index 0000000..cd72124
--- /dev/null
+++ b/0001-Fix-for-using-with-newer-github.com-opencontainers-r.patch
@@ -0,0 +1,47 @@
+From 3002cc7a7635ee6ec552c4833ac2c5d550c95111 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= <zebob.m(a)gmail.com>
+Date: Sat, 18 May 2019 00:03:26 +0200
+Subject: [PATCH] Fix for using with newer
github.com/opencontainers/runc
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Robert-Andr Mauchin <zebob.m(a)gmail.com>
+---
+ validate/validate.go | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/validate/validate.go b/validate/validate.go
+index b2db5580..2f3a60eb 100644
+--- a/validate/validate.go
++++ b/validate/validate.go
+@@ -139,7 +139,7 @@ func validateCpuCfsBandwidth(available_cgroups map[string]int) string
{
+ if !ok {
+ return "\tCpu cfs bandwidth status unknown: cpu cgroup not enabled.\n"
+ }
+- mnt, err := cgroups.FindCgroupMountpoint("cpu")
++ mnt, err := cgroups.FindCgroupMountpoint("", "cpu")
+ if err != nil {
+ return "\tCpu cfs bandwidth status unknown: cpu cgroup not mounted.\n"
+ }
+@@ -156,7 +156,7 @@ func validateMemoryAccounting(available_cgroups map[string]int)
string {
+ if !ok {
+ return "\tHierarchical memory accounting status unknown: memory cgroup not
enabled.\n"
+ }
+- mnt, err := cgroups.FindCgroupMountpoint("memory")
++ mnt, err := cgroups.FindCgroupMountpoint("", "memory")
+ if err != nil {
+ return "\tHierarchical memory accounting status unknown: memory cgroup not
mounted.\n"
+ }
+@@ -216,7 +216,7 @@ func validateDockerInfo() (string, string) {
+ func validateCgroupMounts() (string, string) {
+ const recommendedMount = "/sys/fs/cgroup"
+ desc := fmt.Sprintf("\tAny cgroup mount point that is detectible and accessible is
supported. %s is recommended as a standard location.\n", recommendedMount)
+- mnt, err := cgroups.FindCgroupMountpoint("cpu")
++ mnt, err := cgroups.FindCgroupMountpoint("", "cpu")
+ if err != nil {
+ out := "Could not locate cgroup mount point.\n"
+ out += desc
+--
+2.21.0
+
diff --git a/0001-Use-github.com-influxdata-influxdb1-client-as-influx.patch
b/0001-Use-github.com-influxdata-influxdb1-client-as-influx.patch
new file mode 100644
index 0000000..6c50af5
--- /dev/null
+++ b/0001-Use-github.com-influxdata-influxdb1-client-as-influx.patch
@@ -0,0 +1,43 @@
+From 367ec2ea0734a99590f714a70e608354562535ae Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= <zebob.m(a)gmail.com>
+Date: Fri, 17 May 2019 23:26:05 +0200
+Subject: [PATCH] Use
github.com/influxdata/influxdb1-client as influx client
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Robert-Andr Mauchin <zebob.m(a)gmail.com>
+---
+ storage/influxdb/influxdb.go | 9 +--------
+ 1 file changed, 1 insertion(+), 8 deletions(-)
+
+diff --git a/storage/influxdb/influxdb.go b/storage/influxdb/influxdb.go
+index 9f019c84..5ea3a0d7 100644
+--- a/storage/influxdb/influxdb.go
++++ b/storage/influxdb/influxdb.go
+@@ -26,7 +26,7 @@ import (
+ "github.com/google/cadvisor/storage"
+ "github.com/google/cadvisor/version"
+
+- influxdb "github.com/influxdb/influxdb/client"
++ influxdb "github.com/influxdata/influxdb1-client"
+ )
+
+ func init() {
+@@ -347,13 +347,6 @@ func checkResponseForErrors(response *influxdb.Response) error {
+ if result.Err != nil {
+ return fmt.Errorf(msg, result.Err)
+ }
+- if result.Series != nil {
+- for _, row := range result.Series {
+- if row.Err != nil {
+- return fmt.Errorf(msg, row.Err)
+- }
+- }
+- }
+ }
+ }
+ return nil
+--
+2.21.0
+
diff --git a/add-chglog b/add-chglog
deleted file mode 100755
index 513026a..0000000
--- a/add-chglog
+++ /dev/null
@@ -1,117 +0,0 @@
-#!/usr/bin/python -t
-# -*- mode: Python; indent-tabs-mode: nil; coding: utf-8 -*-
-#
-# Copyright (c) 2005-2013 Fedora Project
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import re
-import subprocess
-import sys
-import textwrap
-import time
-from optparse import OptionParser
-
-
-__version__ = "1.0.12"
-
-class SpecFile:
- def __init__(self, filename):
- self.filename = filename
- f = None
- try:
- f = open(filename,"r")
- self.lines = f.readlines()
- finally:
- f and f.close()
-
- _changelog_pattern = re.compile(r"^%changelog(\s|$)", re.I)
-
- def addChangelogEntry(self, evr, entry, email):
- for i in range(len(self.lines)):
- if SpecFile._changelog_pattern.match(self.lines[i]):
- if len(evr):
- evrstring = ' - %s' % evr
- else:
- evrstring = ''
- date = time.strftime("%a %b %d %Y", time.gmtime())
- newchangelogentry = "* %s %s%s\n%s\n\n" % \
- (date, email, evrstring, entry)
- self.lines[i] += newchangelogentry
- return
-
- def writeFile(self, filename):
- f = open(filename, "w")
- f.writelines(self.lines)
- f.close()
-
- def debugdiff(self, old, new):
- print ('%s\n-%s\n+%s\n' % (self.filename, old, new))
-
-if __name__ == "__main__":
- usage = '''Usage: %prog [OPTION]... SPECFILE...'''
-
- userstring = subprocess.Popen("rpmdev-packager 2>/dev/null", shell =
True,
- stdout = subprocess.PIPE).communicate()[0]
- userstring = userstring.strip() or None
-
- parser = OptionParser(usage=usage)
- parser.add_option("-c", "--comment", default='-
rebuilt',
- help="changelog comment (default: \"-
rebuilt\")")
- parser.add_option("-u", "--userstring", default=userstring,
- help="user name+email string (default: output from "+
- "rpmdev-packager(1))")
- (opts, args) = parser.parse_args()
-
- if not args:
- parser.error('No specfiles specified')
-
- if not opts.userstring:
- parser.error('Userstring required, see option -u')
-
- # Grab bullet, insert one if not found.
- bullet_re = re.compile(r'^([^\s\w])\s', re.UNICODE)
- bullet = "-"
- match = bullet_re.search(opts.comment)
- if match:
- bullet = match.group(1)
- else:
- opts.comment = bullet + " " + opts.comment
-
- # Format comment.
- if opts.comment.find("\n") == -1:
- wrapopts = { "subsequent_indent": (len(bullet)+1) * " ",
- "break_long_words": False }
- if sys.version_info[:2] > (2, 5):
- wrapopts["break_on_hyphens"] = False
- opts.comment = textwrap.fill(opts.comment, 80, **wrapopts)
-
- for aspec in args:
- try:
- s = SpecFile(aspec)
- except:
- # Not actually a parser error, but... meh.
- parser.error(sys.exc_info()[1])
-
- # Get EVR for changelog entry.
- cmd = ("rpm", "-q", "--specfile",
"--define", "dist %{nil}",
- "--qf=%|epoch?{%{epoch}:}:{}|%{version}-%{release}\n", aspec)
- popen = subprocess.Popen(cmd, stdout = subprocess.PIPE)
- evr = str(popen.communicate()[0]).split("\n")[0]
-
- s.addChangelogEntry(evr, opts.comment, opts.userstring)
- s.writeFile(aspec)
-
-sys.exit(0)
diff --git a/cadvisor.spec b/cadvisor.spec
index 3dcd69a..6f5803e 100644
--- a/cadvisor.spec
+++ b/cadvisor.spec
@@ -1,373 +1,143 @@
-# If any of the following macros should be set otherwise,
-# you can wrap any of them with the following conditions:
-# - %%if 0%%{centos} == 7
-# - %%if 0%%{?rhel} == 7
-# - %%if 0%%{?fedora} == 23
-# Or just test for particular distribution:
-# - %%if 0%%{centos}
-# - %%if 0%%{?rhel}
-# - %%if 0%%{?fedora}
-#
-# Be aware, on centos, both %%rhel and %%centos are set. If you want to test
-# rhel specific macros, you can use %%if 0%%{?rhel} && 0%%{?centos} == 0
condition.
-# (Don't forget to replace double percentage symbol with single one in order to apply
a condition)
-
-# Generate devel rpm
-%global with_devel 1
-# Build project from bundled dependencies
-%global with_bundled 1
-# Build with debug info rpm
-%global with_debug 0
-# Run tests in check section
-# No test files so far
-%global with_check 0
-# Generate unit-test rpm
-%global with_unit_test 0
-
-%if 0%{?with_debug}
-%global _dwz_low_mem_die_limit 0
-%else
-%global debug_package %{nil}
-%endif
+# Generated by go2rpm
+%bcond_without check
-%global provider github
-%global provider_tld com
-%global project google
-%global repo cadvisor
#
https://github.com/google/cadvisor
-%global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo}
-%global import_path %{provider_prefix}
-%global commit 546a3771589bdb356777c646c6eca24914fdd48b
-%global shortcommit %(c=%{commit}; echo ${c:0:7})
-
-Name: %{repo}
-Version: 0.22.2
-Release: 9%{?dist}
-Summary: Analyzes resource usage and performance characteristics of running
containers
-License: ASL 2.0
-URL: https://%{provider_prefix}
-Source0:
https://%{provider_prefix}/archive/%{commit}/%{repo}-%{shortcommit}.tar.gz
-Source1: cadvisor
-Source2: cadvisor.service
+%global goipath
github.com/google/cadvisor
+Version: 0.33.1
-# e.g. el6 has ppc64 arch without gcc-go, so EA tag is required
-# arm does not have zfs-fuse
-ExclusiveArch: %{ix86} x86_64 aarch64 ppc64le
-ExcludeArch: aarch64
-# 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}
-
-BuildRequires: git
-BuildRequires: systemd
-BuildRequires: glibc-static
-
-%if ! 0%{?with_bundled}
-#BuildRequires: docker-io-pkg-devel
-#BuildRequires: docker-io-devel
-# indirect deps of docker
-#BuildRequires:
golang(github.com/Sirupsen/logrus)
-
-BuildRequires:
golang(github.com/SeanDolphin/bqschema)
-BuildRequires:
golang(github.com/Shopify/sarama)
-BuildRequires:
golang(github.com/abbot/go-http-auth)
-BuildRequires:
golang(github.com/aws/aws-sdk-go/aws)
-BuildRequires:
golang(github.com/aws/aws-sdk-go/aws/ec2metadata)
-BuildRequires:
golang(github.com/aws/aws-sdk-go/aws/session)
-BuildRequires:
golang(github.com/docker/docker/pkg/mount)
-BuildRequires:
golang(github.com/docker/go-units)
-BuildRequires:
golang(github.com/fsouza/go-dockerclient)
-BuildRequires:
golang(github.com/garyburd/redigo/redis)
-BuildRequires:
golang(github.com/golang/glog)
-BuildRequires:
golang(github.com/influxdb/influxdb/client)
-BuildRequires:
golang(github.com/mistifyio/go-zfs)
-BuildRequires:
golang(github.com/opencontainers/runc/libcontainer)
-BuildRequires:
golang(github.com/opencontainers/runc/libcontainer/cgroups)
-BuildRequires:
golang(github.com/opencontainers/runc/libcontainer/cgroups/fs)
-BuildRequires:
golang(github.com/opencontainers/runc/libcontainer/configs)
-BuildRequires:
golang(github.com/prometheus/client_golang/prometheus)
-BuildRequires:
golang(github.com/stretchr/testify/assert)
-BuildRequires:
golang(github.com/stretchr/testify/mock)
-BuildRequires:
golang(golang.org/x/exp/inotify)
-BuildRequires:
golang(golang.org/x/oauth2)
-BuildRequires:
golang(golang.org/x/oauth2/jwt)
-BuildRequires:
golang(google.golang.org/api/bigquery/v2)
-BuildRequires:
golang(google.golang.org/cloud/compute/metadata)
-BuildRequires: golang(gopkg.in/olivere/elastic.v2)
-%endif
-
-%description
-%{summary}
+%gometa
+%global common_description %{expand:
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
+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.
-
-%if 0%{?with_devel}
-%package devel
-Summary: %{summary}
-BuildArch: noarch
-
-%if 0%{?with_check}
-#BuildRequires: docker-io-pkg-devel
-BuildRequires:
golang(github.com/Shopify/sarama)
-BuildRequires:
golang(github.com/abbot/go-http-auth)
-BuildRequires:
golang(github.com/aws/aws-sdk-go/aws)
-BuildRequires:
golang(github.com/aws/aws-sdk-go/aws/ec2metadata)
-BuildRequires:
golang(github.com/aws/aws-sdk-go/aws/session)
-BuildRequires:
golang(github.com/docker/docker/pkg/mount)
-BuildRequires:
golang(github.com/docker/go-units)
-BuildRequires:
golang(github.com/fsouza/go-dockerclient)
-BuildRequires:
golang(github.com/garyburd/redigo/redis)
-BuildRequires:
golang(github.com/golang/glog)
-BuildRequires:
golang(github.com/influxdb/influxdb/client)
-BuildRequires:
golang(github.com/mistifyio/go-zfs)
-BuildRequires:
golang(github.com/opencontainers/runc/libcontainer)
-BuildRequires:
golang(github.com/opencontainers/runc/libcontainer/cgroups)
-BuildRequires:
golang(github.com/opencontainers/runc/libcontainer/cgroups/fs)
-BuildRequires:
golang(github.com/opencontainers/runc/libcontainer/configs)
-BuildRequires:
golang(github.com/prometheus/client_golang/prometheus)
-BuildRequires:
golang(github.com/stretchr/testify/assert)
-BuildRequires:
golang(github.com/stretchr/testify/mock)
-BuildRequires:
golang(golang.org/x/exp/inotify)
-BuildRequires:
golang(golang.org/x/oauth2)
-BuildRequires:
golang(golang.org/x/oauth2/jwt)
-BuildRequires:
golang(google.golang.org/api/bigquery/v2)
-BuildRequires:
golang(google.golang.org/cloud/compute/metadata)
-BuildRequires: golang(gopkg.in/olivere/elastic.v2)
-%endif
+resource isolation parameters, historical resource usage, histograms of complete
+historical resource usage and network statistics. This data is exported by
+container and machine-wide.
-#Requires: docker-io-pkg-devel
-Requires:
golang(github.com/Shopify/sarama)
-Requires:
golang(github.com/abbot/go-http-auth)
-Requires:
golang(github.com/aws/aws-sdk-go/aws)
-Requires:
golang(github.com/aws/aws-sdk-go/aws/ec2metadata)
-Requires:
golang(github.com/aws/aws-sdk-go/aws/session)
-Requires:
golang(github.com/docker/docker/pkg/mount)
-Requires:
golang(github.com/docker/go-units)
-Requires:
golang(github.com/fsouza/go-dockerclient)
-Requires:
golang(github.com/garyburd/redigo/redis)
-Requires:
golang(github.com/golang/glog)
-Requires:
golang(github.com/influxdb/influxdb/client)
-Requires:
golang(github.com/mistifyio/go-zfs)
-Requires:
golang(github.com/opencontainers/runc/libcontainer)
-Requires:
golang(github.com/opencontainers/runc/libcontainer/cgroups)
-Requires:
golang(github.com/opencontainers/runc/libcontainer/cgroups/fs)
-Requires:
golang(github.com/opencontainers/runc/libcontainer/configs)
-Requires:
golang(github.com/prometheus/client_golang/prometheus)
-Requires:
golang(github.com/stretchr/testify/assert)
-Requires:
golang(github.com/stretchr/testify/mock)
-Requires:
golang(golang.org/x/exp/inotify)
-Requires:
golang(golang.org/x/oauth2)
-Requires:
golang(golang.org/x/oauth2/jwt)
-Requires:
golang(google.golang.org/api/bigquery/v2)
-Requires:
golang(google.golang.org/cloud/compute/metadata)
-Requires: golang(gopkg.in/olivere/elastic.v2)
-
-Provides: golang(%{import_path}/api) = %{version}-%{release}
-Provides: golang(%{import_path}/cache) = %{version}-%{release}
-Provides: golang(%{import_path}/cache/memory) = %{version}-%{release}
-Provides: golang(%{import_path}/client) = %{version}-%{release}
-Provides: golang(%{import_path}/client/v2) = %{version}-%{release}
-Provides: golang(%{import_path}/collector) = %{version}-%{release}
-Provides: golang(%{import_path}/container) = %{version}-%{release}
-Provides: golang(%{import_path}/container/docker) = %{version}-%{release}
-Provides: golang(%{import_path}/container/libcontainer) = %{version}-%{release}
-Provides: golang(%{import_path}/container/raw) = %{version}-%{release}
-Provides: golang(%{import_path}/events) = %{version}-%{release}
-Provides: golang(%{import_path}/fs) = %{version}-%{release}
-Provides: golang(%{import_path}/healthz) = %{version}-%{release}
-Provides: golang(%{import_path}/http) = %{version}-%{release}
-Provides: golang(%{import_path}/http/mux) = %{version}-%{release}
-Provides: golang(%{import_path}/info/v1) = %{version}-%{release}
-Provides: golang(%{import_path}/info/v1/test) = %{version}-%{release}
-Provides: golang(%{import_path}/info/v2) = %{version}-%{release}
-Provides: golang(%{import_path}/integration/framework) = %{version}-%{release}
-Provides: golang(%{import_path}/integration/tests/api) = %{version}-%{release}
-Provides: golang(%{import_path}/integration/tests/healthz) = %{version}-%{release}
-Provides: golang(%{import_path}/manager) = %{version}-%{release}
-Provides: golang(%{import_path}/metrics) = %{version}-%{release}
-Provides: golang(%{import_path}/pages) = %{version}-%{release}
-Provides: golang(%{import_path}/pages/static) = %{version}-%{release}
-Provides: golang(%{import_path}/storage) = %{version}-%{release}
-Provides: golang(%{import_path}/storage/bigquery) = %{version}-%{release}
-Provides: golang(%{import_path}/storage/bigquery/client) = %{version}-%{release}
-Provides: golang(%{import_path}/storage/elasticsearch) = %{version}-%{release}
-Provides: golang(%{import_path}/storage/influxdb) = %{version}-%{release}
-Provides: golang(%{import_path}/storage/kafka) = %{version}-%{release}
-Provides: golang(%{import_path}/storage/redis) = %{version}-%{release}
-Provides: golang(%{import_path}/storage/statsd) = %{version}-%{release}
-Provides: golang(%{import_path}/storage/statsd/client) = %{version}-%{release}
-Provides: golang(%{import_path}/storage/stdout) = %{version}-%{release}
-Provides: golang(%{import_path}/storage/test) = %{version}-%{release}
-Provides: golang(%{import_path}/summary) = %{version}-%{release}
-Provides: golang(%{import_path}/utils) = %{version}-%{release}
-Provides: golang(%{import_path}/utils/cloudinfo) = %{version}-%{release}
-Provides: golang(%{import_path}/utils/container) = %{version}-%{release}
-Provides: golang(%{import_path}/utils/cpuload) = %{version}-%{release}
-Provides: golang(%{import_path}/utils/cpuload/netlink) = %{version}-%{release}
-Provides: golang(%{import_path}/utils/machine) = %{version}-%{release}
-Provides: golang(%{import_path}/utils/oomparser) = %{version}-%{release}
-Provides: golang(%{import_path}/utils/procfs) = %{version}-%{release}
-Provides: golang(%{import_path}/utils/sysfs) = %{version}-%{release}
-Provides: golang(%{import_path}/utils/sysfs/fakesysfs) = %{version}-%{release}
-Provides: golang(%{import_path}/utils/sysinfo) = %{version}-%{release}
-Provides: golang(%{import_path}/validate) = %{version}-%{release}
-Provides: golang(%{import_path}/version) = %{version}-%{release}
-
-%description devel
-%{summary}
+cAdvisor has native support for Docker containers and should support just about
+any other container type out of the box. We strive for support across the board
+so feel free to open an issue if that is not the case. cAdvisor's container
+abstraction is based on lmctfy's so containers are inherently nested
+hierarchically.}
-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.
-
-This package contains library source intended for
-building other packages which use import path with
-%{import_path} prefix.
-%endif
+%global golicenses LICENSE
+%global godocs docs AUTHORS CHANGELOG.md CONTRIBUTING.md README.md
-%if 0%{?with_unit_test} && 0%{?with_devel}
-%package unit-test
-Summary: Unit tests for %{name} package
-# If gccgo_arches does not fit or is not defined fall through to golang
+Name: cadvisor
+Release: 1%{?dist}
+Summary: Analyzes resource usage and performance characteristics of running
containers
-%if 0%{?with_check}
-#Here comes all BuildRequires: PACKAGE the unit tests
-#in %%check section need for running
-BuildRequires:
golang(github.com/kr/pretty)
+# Upstream license specification: Apache-2.0
+License: ASL 2.0
+URL: %{gourl}
+Source0: %{gosource}
+Source1: cadvisor
+Source2: cadvisor.service
+# Use
github.com/influxdata/influxdb1-client as influx client
+Patch0: 0001-Use-github.com-influxdata-influxdb1-client-as-influx.patch
+Patch1: 0001-Fix-for-using-with-newer-github.com-opencontainers-r.patch
+
+BuildRequires: git-core
+BuildRequires: systemd
+BuildRequires: glibc-static
+BuildRequires:
golang(cloud.google.com/go/compute/metadata)
+BuildRequires:
golang(github.com/abbot/go-http-auth)
+BuildRequires:
golang(github.com/aws/aws-sdk-go/aws)
+BuildRequires:
golang(github.com/aws/aws-sdk-go/aws/ec2metadata)
+BuildRequires:
golang(github.com/aws/aws-sdk-go/aws/session)
+BuildRequires:
golang(github.com/blang/semver)
+BuildRequires:
golang(github.com/containerd/containerd/api/services/containers/v1)
+BuildRequires:
golang(github.com/containerd/containerd/api/services/tasks/v1)
+BuildRequires:
golang(github.com/containerd/containerd/api/services/version/v1)
+BuildRequires:
golang(github.com/containerd/containerd/containers)
+BuildRequires:
golang(github.com/containerd/containerd/errdefs)
+BuildRequires:
golang(github.com/containerd/containerd/namespaces)
+BuildRequires:
golang(github.com/containerd/containerd/pkg/dialer)
+BuildRequires:
golang(github.com/coreos/rkt/api/v1alpha)
+BuildRequires:
golang(github.com/docker/docker/api/types)
+BuildRequires:
golang(github.com/docker/docker/api/types/container)
+BuildRequires:
golang(github.com/docker/docker/client)
+BuildRequires:
golang(github.com/docker/docker/pkg/mount)
+BuildRequires:
golang(github.com/docker/docker/pkg/parsers/operatingsystem)
+BuildRequires:
golang(github.com/docker/go-connections/tlsconfig)
+BuildRequires:
golang(github.com/docker/go-units)
+BuildRequires:
golang(github.com/euank/go-kmsg-parser/kmsgparser)
+BuildRequires:
golang(github.com/garyburd/redigo/redis)
+BuildRequires:
golang(github.com/gogo/protobuf/types)
+BuildRequires:
golang(github.com/influxdata/influxdb1-client)
+BuildRequires:
golang(github.com/karrick/godirwalk)
+BuildRequires:
golang(github.com/mesos/mesos-go/api/v1/lib)
+BuildRequires:
golang(github.com/mesos/mesos-go/api/v1/lib/agent)
+BuildRequires:
golang(github.com/mesos/mesos-go/api/v1/lib/agent/calls)
+BuildRequires:
golang(github.com/mesos/mesos-go/api/v1/lib/client)
+BuildRequires:
golang(github.com/mesos/mesos-go/api/v1/lib/encoding/codecs)
+BuildRequires:
golang(github.com/mesos/mesos-go/api/v1/lib/httpcli)
+BuildRequires:
golang(github.com/mindprince/gonvml)
+BuildRequires:
golang(github.com/mistifyio/go-zfs)
+BuildRequires:
golang(github.com/opencontainers/runc/libcontainer)
+BuildRequires:
golang(github.com/opencontainers/runc/libcontainer/cgroups)
+BuildRequires:
golang(github.com/opencontainers/runc/libcontainer/cgroups/fs)
+BuildRequires:
golang(github.com/opencontainers/runc/libcontainer/configs)
+BuildRequires:
golang(github.com/opencontainers/runtime-spec/specs-go)
+BuildRequires:
golang(github.com/pkg/errors)
+BuildRequires:
golang(github.com/prometheus/client_golang/prometheus)
+BuildRequires:
golang(github.com/prometheus/client_golang/prometheus/promhttp)
+BuildRequires:
golang(github.com/prometheus/client_model/go)
+BuildRequires:
golang(github.com/prometheus/common/expfmt)
+BuildRequires:
golang(github.com/prometheus/common/model)
+BuildRequires:
golang(github.com/Rican7/retry)
+BuildRequires:
golang(github.com/Rican7/retry/strategy)
+BuildRequires:
golang(github.com/SeanDolphin/bqschema)
+BuildRequires:
golang(github.com/Shopify/sarama)
+BuildRequires:
golang(github.com/sigma/go-inotify)
+BuildRequires:
golang(github.com/stretchr/testify/assert)
+BuildRequires:
golang(github.com/stretchr/testify/mock)
+BuildRequires:
golang(golang.org/x/net/context)
+BuildRequires:
golang(golang.org/x/oauth2)
+BuildRequires:
golang(golang.org/x/oauth2/jwt)
+BuildRequires:
golang(golang.org/x/sys/unix)
+BuildRequires:
golang(google.golang.org/api/bigquery/v2)
+BuildRequires:
golang(google.golang.org/grpc)
+BuildRequires: golang(gopkg.in/olivere/elastic.v2)
+BuildRequires: golang(k8s.io/klog)
+BuildRequires: golang(k8s.io/utils/clock)
+
+%if %{with check}
+# Tests
+BuildRequires:
golang(github.com/containerd/typeurl)
+BuildRequires:
golang(github.com/kr/pretty)
+BuildRequires:
golang(github.com/opencontainers/runc/libcontainer/system)
+BuildRequires:
golang(github.com/stretchr/testify/require)
+BuildRequires: golang(k8s.io/utils/clock/testing)
%endif
-# test subpackage tests code from devel subpackage
-Requires: %{name}-devel = %{version}-%{release}
-Requires:
golang(github.com/kr/pretty)
-
-%description unit-test
-%{summary}
+%description
+%{common_description}
-This package contains unit tests for project
-providing packages with %{import_path} prefix.
-%endif
+%gopkg
%prep
-%autosetup -Sgit -n %{repo}-%{commit}
+%goprep
+%patch0 -p1
+%patch1 -p1
+find . -name "*.go" -exec sed -i
"s|github.com/containerd/containerd/dialer|github.com/containerd/containerd/pkg/dialer|"
"{}" +;
%build
-mkdir -p
src/github.com/google
-ln -s ../../../
src/github.com/google/cadvisor
-
-%if ! 0%{?with_bundled}
-export GOPATH=$(pwd):%{gopath}
-%else
-export GOPATH=$(pwd):$(pwd)/Godeps/_workspace:%{gopath}
-%endif
-
-%gobuild -o bin/cadvisor %{import_path}
+%gobuild -o %{gobuilddir}/bin/cadvisor %{goipath}
%install
-# main package binary
-install -d -p %{buildroot}%{_bindir}
-install -p -m 0755 bin/cadvisor %{buildroot}%{_bindir}
+%gopkginstall
+install -m 0755 -vd %{buildroot}%{_bindir}
+install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/
-# install systemd/sysconfig
+# install systemd/sysconfig
install -d -m 0755 %{buildroot}%{_sysconfdir}/sysconfig/
install -p -m 0660 %{SOURCE1} %{buildroot}%{_sysconfdir}/sysconfig/%{name}
install -d -m 0755 %{buildroot}%{_unitdir}
install -p -m 0644 %{SOURCE2} %{buildroot}%{_unitdir}/%{name}.service
-# source codes for building projects
-%if 0%{?with_devel}
-install -d -p %{buildroot}/%{gopath}/src/%{import_path}/
-echo "%%dir %%{gopath}/src/%%{import_path}/." >> devel.file-list
-# find all *.go but no *_test.go files and generate devel.file-list
-for file in $(find . -iname "*.go" \! -iname "*_test.go" | grep -v
"./Godeps") ; do
- echo "%%dir %%{gopath}/src/%%{import_path}/$(dirname $file)" >>
devel.file-list
- install -d -p %{buildroot}/%{gopath}/src/%{import_path}/$(dirname $file)
- cp -pav $file %{buildroot}/%{gopath}/src/%{import_path}/$file
- echo "%%{gopath}/src/%%{import_path}/$file" >> devel.file-list
-done
-%endif
-
-# testing files for this project
-%if 0%{?with_unit_test} && 0%{?with_devel}
-install -d -p %{buildroot}/%{gopath}/src/%{import_path}/
-# find all *_test.go files and generate unit-test.file-list
-for file in $(find . -iname "*_test.go"); do
- echo "%%dir %%{gopath}/src/%%{import_path}/$(dirname $file)" >>
devel.file-list
- install -d -p %{buildroot}/%{gopath}/src/%{import_path}/$(dirname $file)
- cp -pav $file %{buildroot}/%{gopath}/src/%{import_path}/$file
- echo "%%{gopath}/src/%%{import_path}/$file" >> unit-test.file-list
-done
-
-for file in $(find . -iname "*.json" | grep -v "./Godeps") \
- ./fs/test_resources/diskstats \
- ./metrics/testdata/prometheus_metrics \
- ./utils/machine/testdata/cpuinfo \
- ./utils/oomparser/*.txt; do
- install -d -p %{buildroot}/%{gopath}/src/%{import_path}/$(dirname $file)
- cp -pav $file %{buildroot}/%{gopath}/src/%{import_path}/$file
- echo "%%{gopath}/src/%%{import_path}/$file" >> unit-test.file-list
-done
-%endif
-
-%if 0%{?with_devel}
-sort -u -o devel.file-list devel.file-list
-%endif
-
-%check
-%if 0%{?with_check} && 0%{?with_unit_test} && 0%{?with_devel}
-%if ! 0%{?with_bundled}
-export GOPATH=%{buildroot}/%{gopath}:%{gopath}
-%else
-export GOPATH=%{buildroot}/%{gopath}:$(pwd)/Godeps/_workspace:%{gopath}
-%endif
-
-%if ! 0%{?gotest:1}
-%global gotest go test
-%endif
-
-%gotest %{import_path}/api
-%gotest %{import_path}/cache/memory
-%gotest %{import_path}/client
-%gotest %{import_path}/client/v2
-#%%gotest %{import_path}/collector
-# undefined: FactoryForMockContainerHandler
-#%%gotest %{import_path}/container
-%gotest %{import_path}/container/raw
-%gotest %{import_path}/events
-%gotest %{import_path}/fs
-%gotest %{import_path}/info/v1
-# requires root
-#%%gotest %%{import_path}/integration/tests/api
-# mostly likely requires kubernetes running
-#%%gotest %%{import_path}/integration/tests/healthz
-#%%gotest %{import_path}/manager
-%gotest %{import_path}/metrics
-%gotest %{import_path}/storage/influxdb
-%gotest %{import_path}/summary
-%gotest %{import_path}/utils
-%gotest %{import_path}/utils/machine
-%gotest %{import_path}/utils/oomparser
-%gotest %{import_path}/utils/sysinfo
-%endif
-
%post
%systemd_post cadvisor.service
@@ -375,34 +145,26 @@ export
GOPATH=%{buildroot}/%{gopath}:$(pwd)/Godeps/_workspace:%{gopath}
%systemd_preun cadvisor.service
%postun
-%systemd_postun
+%systemd_postun cadvisor.service
-#define license tag if not already defined
-%{!?_licensedir:%global license %doc}
+%if %{with check}
+%check
+%gocheck -d integration/tests/api -d integration/tests/healthz -d machine
+%endif
%files
%license LICENSE
-%doc CHANGELOG.md README.md CONTRIBUTING.md AUTHORS
-%doc Godeps/Godeps.json
-%{_bindir}/cadvisor
+%doc docs AUTHORS CHANGELOG.md CONTRIBUTING.md README.md
+%{_bindir}/*
%{_unitdir}/%{name}.service
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
-%if 0%{?with_devel}
-%files devel -f devel.file-list
-%license LICENSE
-%doc CHANGELOG.md README.md CONTRIBUTING.md AUTHORS
-%doc Godeps/Godeps.json
-%dir %{gopath}/src/%{provider}.%{provider_tld}/%{project}
-%endif
-
-%if 0%{?with_unit_test} && 0%{?with_devel}
-%files unit-test -f unit-test.file-list
-%license LICENSE
-%doc CHANGELOG.md README.md CONTRIBUTING.md AUTHORS
-%endif
+%gopkgfiles
%changelog
+* Sun May 12 11:27:06 CEST 2019 Robert-Andr Mauchin <zebob.m(a)gmail.com> - 0.33.1-1
+- Release 0.33.1
+
* Thu Jan 31 2019 Fedora Release Engineering <releng(a)fedoraproject.org> - 0.22.2-9
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
diff --git a/getsource.sh b/getsource.sh
deleted file mode 100755
index 869c470..0000000
--- a/getsource.sh
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/bin/sh
-
-NAME=cadvisor
-GIT_COMMIT="$1"
-GIT_SHORT="${GIT_COMMIT:0:7}"
-GIT_VERSION="$2"
-
-set -o errexit
-set -o nounset
-set -o pipefail
-set -x
-
-SPEC="${NAME}.spec"
-
-curl -s -L
https://github.com/google/${NAME}/archive/${GIT_COMMIT}.tar.gz >
${NAME}-${GIT_SHORT}.tar.gz
-
-if [[ "${GIT_VERSION}" =~ ^([0-9]+)\.([0-9]+)(\.)?([0-9]+)?(-.*)?$ ]]; then
- git_major=${BASH_REMATCH[1]}
- git_minor=${BASH_REMATCH[2]}
- git_really_minor=${BASH_REMATCH[4]}
- since_tag=${BASH_REMATCH[5]}
-else
- echo "Failed to parse version!"
- /bin/false
-fi
-
-if [[ "${since_tag}" =~ ^-([0-9]+)-.*$ ]]; then
- since_tag=${BASH_REMATCH[1]}
-else
- since_tag=0
-fi
-
-version="${git_major}.${git_minor}"
-if [[ -n ${git_really_minor} ]]; then
- version="${version}.${git_really_minor}"
-fi
-
-#put the git hash in as the commit
-sed -i -e "s/%global commit\t\t[[:xdigit:]]\{40\}/%global
commit\t\t${GIT_COMMIT}/" ${SPEC}
-#update the version with the latest tag
-sed -i -e
"s/Version:\t[[:digit:]]\+\.[[:digit:]]\+\(\.[[:digit:]]\+\)\?/Version:\t${version}/"
${SPEC}
-#update the release with since_tag
-sed -i -e "s/Release:\t[[:digit:]]\+\.[[:digit:]]\+/Release:\t${since_tag}.0/"
${SPEC}
-
-#increment the version number
-./add-chglog --comment="Bump to upstream ${GIT_COMMIT}" --userstring="Eric
Paris <eparis(a)redhat.com>" ${SPEC}
-
-fedpkg clog
-
-echo "****Don't forget to run: fedpkg new-sources
${NAME}-${GIT_SHORT}.tar.gz"
diff --git a/sources b/sources
index 3bfb044..9c935bd 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-70474920ee42b2af3ae413bb642cdd67 cadvisor-546a377.tar.gz
+SHA512 (cadvisor-0.33.1.tar.gz) =
659b8c48f74ef34044c7b3d9a41d42338c9c90fa443bdf7766001ae570aab8ed61efa948d1d01c324b6f03a0d1bf3d3fb1483d40bfc3b7e67f768253e3638de5