diff --git a/1000-add-riscv64-support-for-crc32-and-procfs.patch b/1000-add-riscv64-support-for-crc32-and-procfs.patch deleted file mode 100644 index a2302962e975fb315d5e4fbea28a96ad7435bc03..0000000000000000000000000000000000000000 --- a/1000-add-riscv64-support-for-crc32-and-procfs.patch +++ /dev/null @@ -1,185 +0,0 @@ -From 7d847af2666ca6204d66b253b87019eb961f5812 Mon Sep 17 00:00:00 2001 -From: misaka00251 -Date: Fri, 1 Sep 2023 16:25:48 +0800 -Subject: [PATCH] Add riscv64 support for crc32 & procfs - ---- - .../klauspost/crc32/crc32_generic.go | 2 +- - .../github.com/prometheus/procfs/cpuinfo.go | 40 +++++++++++++++++++ - .../prometheus/procfs/cpuinfo_riscvx.go | 20 ++++++++++ - .../github.com/prometheus/procfs/cpuinfo.go | 41 +++++++++++++++++++ - .../prometheus/procfs/cpuinfo_riscvx.go | 20 +++++++++ - 5 files changed, 121 insertions(+), 1 deletion(-) - create mode 100644 cmd/vendor/github.com/prometheus/procfs/cpuinfo_riscvx.go - create mode 100644 vendor/github.com/prometheus/procfs/cpuinfo_riscvx.go - -diff --git a/cmd/vendor/github.com/klauspost/crc32/crc32_generic.go b/cmd/vendor/github.com/klauspost/crc32/crc32_generic.go -index c4d06a2..e2673f5 100644 ---- a/cmd/vendor/github.com/klauspost/crc32/crc32_generic.go -+++ b/cmd/vendor/github.com/klauspost/crc32/crc32_generic.go -@@ -2,7 +2,7 @@ - // Use of this source code is governed by a BSD-style - // license that can be found in the LICENSE file. - --// +build 386 arm arm64 ppc64 ppc64le appengine loong64 -+// +build 386 arm arm64 ppc64 ppc64le appengine loong64 riscv64 - - package crc32 - -diff --git a/cmd/vendor/github.com/prometheus/procfs/cpuinfo.go b/cmd/vendor/github.com/prometheus/procfs/cpuinfo.go -index 2c2a27f..ad9761b 100644 ---- a/cmd/vendor/github.com/prometheus/procfs/cpuinfo.go -+++ b/cmd/vendor/github.com/prometheus/procfs/cpuinfo.go -@@ -443,6 +443,46 @@ func parseCPUInfoPPC(info []byte) ([]CPUInfo, error) { - return cpuinfo, nil - } - -+func parseCPUInfoRISCV(info []byte) ([]CPUInfo, error) { -+ scanner := bufio.NewScanner(bytes.NewReader(info)) -+ -+ firstLine := firstNonEmptyLine(scanner) -+ if !strings.HasPrefix(firstLine, "processor") || !strings.Contains(firstLine, ":") { -+ return nil, errors.New("invalid cpuinfo file: " + firstLine) -+ } -+ field := strings.SplitN(firstLine, ": ", 2) -+ v, err := strconv.ParseUint(field[1], 0, 32) -+ if err != nil { -+ return nil, err -+ } -+ firstcpu := CPUInfo{Processor: uint(v)} -+ cpuinfo := []CPUInfo{firstcpu} -+ i := 0 -+ -+ for scanner.Scan() { -+ line := scanner.Text() -+ if !strings.Contains(line, ":") { -+ continue -+ } -+ field := strings.SplitN(line, ": ", 2) -+ switch strings.TrimSpace(field[0]) { -+ case "processor": -+ v, err := strconv.ParseUint(field[1], 0, 32) -+ if err != nil { -+ return nil, err -+ } -+ i = int(v) -+ cpuinfo = append(cpuinfo, CPUInfo{}) // start of the next processor -+ cpuinfo[i].Processor = uint(v) -+ case "hart": -+ cpuinfo[i].CoreID = field[1] -+ case "isa": -+ cpuinfo[i].ModelName = field[1] -+ } -+ } -+ return cpuinfo, nil -+} -+ - // firstNonEmptyLine advances the scanner to the first non-empty line - // and returns the contents of that line - func firstNonEmptyLine(scanner *bufio.Scanner) string { -diff --git a/cmd/vendor/github.com/prometheus/procfs/cpuinfo_riscvx.go b/cmd/vendor/github.com/prometheus/procfs/cpuinfo_riscvx.go -new file mode 100644 -index 0000000..1c9b731 ---- /dev/null -+++ b/cmd/vendor/github.com/prometheus/procfs/cpuinfo_riscvx.go -@@ -0,0 +1,20 @@ -+// Copyright 2020 The Prometheus Authors -+// Licensed under the Apache License, Version 2.0 (the "License"); -+// you may not use this file except in compliance with the License. -+// You may obtain a copy of the License at -+// -+// http://www.apache.org/licenses/LICENSE-2.0 -+// -+// Unless required by applicable law or agreed to in writing, software -+// distributed under the License is distributed on an "AS IS" BASIS, -+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -+// See the License for the specific language governing permissions and -+// limitations under the License. -+ -+//go:build linux && (riscv || riscv64) -+// +build linux -+// +build riscv riscv64 -+ -+package procfs -+ -+var parseCPUInfo = parseCPUInfoRISCV -diff --git a/vendor/github.com/prometheus/procfs/cpuinfo.go b/vendor/github.com/prometheus/procfs/cpuinfo.go -index 81db195..abd85d8 100644 ---- a/vendor/github.com/prometheus/procfs/cpuinfo.go -+++ b/vendor/github.com/prometheus/procfs/cpuinfo.go -@@ -444,6 +444,46 @@ func parseCPUInfoPPC(info []byte) ([]CPUInfo, error) { - return cpuinfo, nil - } - -+func parseCPUInfoRISCV(info []byte) ([]CPUInfo, error) { -+ scanner := bufio.NewScanner(bytes.NewReader(info)) -+ -+ firstLine := firstNonEmptyLine(scanner) -+ if !strings.HasPrefix(firstLine, "processor") || !strings.Contains(firstLine, ":") { -+ return nil, errors.New("invalid cpuinfo file: " + firstLine) -+ } -+ field := strings.SplitN(firstLine, ": ", 2) -+ v, err := strconv.ParseUint(field[1], 0, 32) -+ if err != nil { -+ return nil, err -+ } -+ firstcpu := CPUInfo{Processor: uint(v)} -+ cpuinfo := []CPUInfo{firstcpu} -+ i := 0 -+ -+ for scanner.Scan() { -+ line := scanner.Text() -+ if !strings.Contains(line, ":") { -+ continue -+ } -+ field := strings.SplitN(line, ": ", 2) -+ switch strings.TrimSpace(field[0]) { -+ case "processor": -+ v, err := strconv.ParseUint(field[1], 0, 32) -+ if err != nil { -+ return nil, err -+ } -+ i = int(v) -+ cpuinfo = append(cpuinfo, CPUInfo{}) // start of the next processor -+ cpuinfo[i].Processor = uint(v) -+ case "hart": -+ cpuinfo[i].CoreID = field[1] -+ case "isa": -+ cpuinfo[i].ModelName = field[1] -+ } -+ } -+ return cpuinfo, nil -+} -+ - // firstNonEmptyLine advances the scanner to the first non-empty line - // and returns the contents of that line - func firstNonEmptyLine(scanner *bufio.Scanner) string { -diff --git a/vendor/github.com/prometheus/procfs/cpuinfo_riscvx.go b/vendor/github.com/prometheus/procfs/cpuinfo_riscvx.go -new file mode 100644 -index 0000000..1c9b731 ---- /dev/null -+++ b/vendor/github.com/prometheus/procfs/cpuinfo_riscvx.go -@@ -0,0 +1,20 @@ -+// Copyright 2020 The Prometheus Authors -+// Licensed under the Apache License, Version 2.0 (the "License"); -+// you may not use this file except in compliance with the License. -+// You may obtain a copy of the License at -+// -+// http://www.apache.org/licenses/LICENSE-2.0 -+// -+// Unless required by applicable law or agreed to in writing, software -+// distributed under the License is distributed on an "AS IS" BASIS, -+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -+// See the License for the specific language governing permissions and -+// limitations under the License. -+ -+//go:build linux && (riscv || riscv64) -+// +build linux -+// +build riscv riscv64 -+ -+package procfs -+ -+var parseCPUInfo = parseCPUInfoRISCV --- -2.39.2 (Apple Git-143) - diff --git a/Add-loong64-support-for-runc-procfs-and-crc32.patch b/Add-loong64-support-for-runc-procfs-and-crc32.patch deleted file mode 100644 index 0a71acb83d1c9776da4b60581d45c9a34946185a..0000000000000000000000000000000000000000 --- a/Add-loong64-support-for-runc-procfs-and-crc32.patch +++ /dev/null @@ -1,200 +0,0 @@ -From 1740c129b687031aac3f9383ca242d82877a3a4a Mon Sep 17 00:00:00 2001 -From: Jingyun Hua -Date: Tue, 6 Jun 2023 12:58:28 +0000 -Subject: [PATCH] Add loong64 support for runc,procfs and crc32 - -Signed-off-by: Jingyun Hua ---- - .../klauspost/crc32/crc32_generic.go | 2 +- - .../libcontainer/system/syscall_linux_64.go | 2 +- - .../github.com/prometheus/procfs/cpuinfo.go | 36 +++++++++++++++++++ - .../prometheus/procfs/cpuinfo_loong64.go | 19 ++++++++++ - .../libcontainer/system/syscall_linux_64.go | 2 +- - .../github.com/prometheus/procfs/cpuinfo.go | 36 +++++++++++++++++++ - .../prometheus/procfs/cpuinfo_loong64.go | 19 ++++++++++ - 7 files changed, 113 insertions(+), 3 deletions(-) - create mode 100644 cmd/vendor/github.com/prometheus/procfs/cpuinfo_loong64.go - create mode 100644 vendor/github.com/prometheus/procfs/cpuinfo_loong64.go - -diff --git a/cmd/vendor/github.com/klauspost/crc32/crc32_generic.go b/cmd/vendor/github.com/klauspost/crc32/crc32_generic.go -index d6f8f85..c4d06a2 100644 ---- a/cmd/vendor/github.com/klauspost/crc32/crc32_generic.go -+++ b/cmd/vendor/github.com/klauspost/crc32/crc32_generic.go -@@ -2,7 +2,7 @@ - // Use of this source code is governed by a BSD-style - // license that can be found in the LICENSE file. - --// +build 386 arm arm64 ppc64 ppc64le appengine -+// +build 386 arm arm64 ppc64 ppc64le appengine loong64 - - package crc32 - -diff --git a/cmd/vendor/github.com/opencontainers/runc/libcontainer/system/syscall_linux_64.go b/cmd/vendor/github.com/opencontainers/runc/libcontainer/system/syscall_linux_64.go -index e05e30a..14d33f1 100644 ---- a/cmd/vendor/github.com/opencontainers/runc/libcontainer/system/syscall_linux_64.go -+++ b/cmd/vendor/github.com/opencontainers/runc/libcontainer/system/syscall_linux_64.go -@@ -1,5 +1,5 @@ - // +build linux --// +build arm64 amd64 mips mipsle mips64 mips64le ppc ppc64 ppc64le riscv64 s390x -+// +build arm64 amd64 mips mipsle mips64 mips64le ppc ppc64 ppc64le riscv64 s390x loong64 - - package system - -diff --git a/cmd/vendor/github.com/prometheus/procfs/cpuinfo.go b/cmd/vendor/github.com/prometheus/procfs/cpuinfo.go -index 31d42f7..2c2a27f 100644 ---- a/cmd/vendor/github.com/prometheus/procfs/cpuinfo.go -+++ b/cmd/vendor/github.com/prometheus/procfs/cpuinfo.go -@@ -362,6 +362,42 @@ func parseCPUInfoMips(info []byte) ([]CPUInfo, error) { - return cpuinfo, nil - } - -+func parseCPUInfoLoong(info []byte) ([]CPUInfo, error) { -+ scanner := bufio.NewScanner(bytes.NewReader(info)) -+ // find the first "processor" line -+ firstLine := firstNonEmptyLine(scanner) -+ if !strings.HasPrefix(firstLine, "system type") || !strings.Contains(firstLine, ":") { -+ return nil, errors.New("invalid cpuinfo file: " + firstLine) -+ } -+ field := strings.SplitN(firstLine, ": ", 2) -+ cpuinfo := []CPUInfo{} -+ systemType := field[1] -+ i := 0 -+ for scanner.Scan() { -+ line := scanner.Text() -+ if !strings.Contains(line, ":") { -+ continue -+ } -+ field := strings.SplitN(line, ": ", 2) -+ switch strings.TrimSpace(field[0]) { -+ case "processor": -+ v, err := strconv.ParseUint(field[1], 0, 32) -+ if err != nil { -+ return nil, err -+ } -+ i = int(v) -+ cpuinfo = append(cpuinfo, CPUInfo{}) // start of the next processor -+ cpuinfo[i].Processor = uint(v) -+ cpuinfo[i].VendorID = systemType -+ case "CPU Family": -+ cpuinfo[i].CPUFamily = field[1] -+ case "Model Name": -+ cpuinfo[i].ModelName = field[1] -+ } -+ } -+ return cpuinfo, nil -+} -+ - func parseCPUInfoPPC(info []byte) ([]CPUInfo, error) { - scanner := bufio.NewScanner(bytes.NewReader(info)) - -diff --git a/cmd/vendor/github.com/prometheus/procfs/cpuinfo_loong64.go b/cmd/vendor/github.com/prometheus/procfs/cpuinfo_loong64.go -new file mode 100644 -index 0000000..d88442f ---- /dev/null -+++ b/cmd/vendor/github.com/prometheus/procfs/cpuinfo_loong64.go -@@ -0,0 +1,19 @@ -+// Copyright 2022 The Prometheus Authors -+// Licensed under the Apache License, Version 2.0 (the "License"); -+// you may not use this file except in compliance with the License. -+// You may obtain a copy of the License at -+// -+// http://www.apache.org/licenses/LICENSE-2.0 -+// -+// Unless required by applicable law or agreed to in writing, software -+// distributed under the License is distributed on an "AS IS" BASIS, -+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -+// See the License for the specific language governing permissions and -+// limitations under the License. -+ -+//go:build linux -+// +build linux -+ -+package procfs -+ -+var parseCPUInfo = parseCPUInfoLoong -diff --git a/vendor/github.com/opencontainers/runc/libcontainer/system/syscall_linux_64.go b/vendor/github.com/opencontainers/runc/libcontainer/system/syscall_linux_64.go -index e05e30a..14d33f1 100644 ---- a/vendor/github.com/opencontainers/runc/libcontainer/system/syscall_linux_64.go -+++ b/vendor/github.com/opencontainers/runc/libcontainer/system/syscall_linux_64.go -@@ -1,5 +1,5 @@ - // +build linux --// +build arm64 amd64 mips mipsle mips64 mips64le ppc ppc64 ppc64le riscv64 s390x -+// +build arm64 amd64 mips mipsle mips64 mips64le ppc ppc64 ppc64le riscv64 s390x loong64 - - package system - -diff --git a/vendor/github.com/prometheus/procfs/cpuinfo.go b/vendor/github.com/prometheus/procfs/cpuinfo.go -index 31d42f7..2c2a27f 100644 ---- a/vendor/github.com/prometheus/procfs/cpuinfo.go -+++ b/vendor/github.com/prometheus/procfs/cpuinfo.go -@@ -362,6 +362,42 @@ func parseCPUInfoMips(info []byte) ([]CPUInfo, error) { - return cpuinfo, nil - } - -+func parseCPUInfoLoong(info []byte) ([]CPUInfo, error) { -+ scanner := bufio.NewScanner(bytes.NewReader(info)) -+ // find the first "processor" line -+ firstLine := firstNonEmptyLine(scanner) -+ if !strings.HasPrefix(firstLine, "system type") || !strings.Contains(firstLine, ":") { -+ return nil, errors.New("invalid cpuinfo file: " + firstLine) -+ } -+ field := strings.SplitN(firstLine, ": ", 2) -+ cpuinfo := []CPUInfo{} -+ systemType := field[1] -+ i := 0 -+ for scanner.Scan() { -+ line := scanner.Text() -+ if !strings.Contains(line, ":") { -+ continue -+ } -+ field := strings.SplitN(line, ": ", 2) -+ switch strings.TrimSpace(field[0]) { -+ case "processor": -+ v, err := strconv.ParseUint(field[1], 0, 32) -+ if err != nil { -+ return nil, err -+ } -+ i = int(v) -+ cpuinfo = append(cpuinfo, CPUInfo{}) // start of the next processor -+ cpuinfo[i].Processor = uint(v) -+ cpuinfo[i].VendorID = systemType -+ case "CPU Family": -+ cpuinfo[i].CPUFamily = field[1] -+ case "Model Name": -+ cpuinfo[i].ModelName = field[1] -+ } -+ } -+ return cpuinfo, nil -+} -+ - func parseCPUInfoPPC(info []byte) ([]CPUInfo, error) { - scanner := bufio.NewScanner(bytes.NewReader(info)) - -diff --git a/vendor/github.com/prometheus/procfs/cpuinfo_loong64.go b/vendor/github.com/prometheus/procfs/cpuinfo_loong64.go -new file mode 100644 -index 0000000..d88442f ---- /dev/null -+++ b/vendor/github.com/prometheus/procfs/cpuinfo_loong64.go -@@ -0,0 +1,19 @@ -+// Copyright 2022 The Prometheus Authors -+// Licensed under the Apache License, Version 2.0 (the "License"); -+// you may not use this file except in compliance with the License. -+// You may obtain a copy of the License at -+// -+// http://www.apache.org/licenses/LICENSE-2.0 -+// -+// Unless required by applicable law or agreed to in writing, software -+// distributed under the License is distributed on an "AS IS" BASIS, -+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -+// See the License for the specific language governing permissions and -+// limitations under the License. -+ -+//go:build linux -+// +build linux -+ -+package procfs -+ -+var parseCPUInfo = parseCPUInfoLoong --- -2.33.0 - diff --git a/add-parameters-to-solve-the-strip.patch b/add-parameters-to-solve-the-strip.patch deleted file mode 100644 index cdbda07d966cd4406b1b01997b29549f2511e49c..0000000000000000000000000000000000000000 --- a/add-parameters-to-solve-the-strip.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 0bd8cba374f1c735f48945fb14f165f087d49bd1 Mon Sep 17 00:00:00 2001 -From: jxy_git -Date: Tue, 7 Mar 2023 16:54:00 +0800 -Subject: [PATCH] add parameters to solve the strip - ---- - build/build.sh | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -diff --git a/build/build.sh b/build/build.sh -index b8cae39..79cec50 100755 ---- a/build/build.sh -+++ b/build/build.sh -@@ -37,12 +37,12 @@ if [ "${go_version:0:3}" = "1.4" ]; then - fi - - ldflags=" -- -X ${repo_path}/version.Version${ldseparator}${version} -- -X ${repo_path}/version.Revision${ldseparator}${revision} -- -X ${repo_path}/version.Branch${ldseparator}${branch} -- -X ${repo_path}/version.BuildUser${ldseparator}${BUILD_USER} -- -X ${repo_path}/version.BuildDate${ldseparator}${BUILD_DATE} -- -X ${repo_path}/version.GoVersion${ldseparator}${go_version}" -+ -w -s -linkmode=external -extldflags '-Wl,-z,relro -Wl,-z,now -pie' -X ${repo_path}/version.Version${ldseparator}${version} -+ -w -s -linkmode=external -extldflags '-Wl,-z,relro -Wl,-z,now -pie' -X ${repo_path}/version.Revision${ldseparator}${revision} -+ -w -s -linkmode=external -extldflags '-Wl,-z,relro -Wl,-z,now -pie' -X ${repo_path}/version.Branch${ldseparator}${branch} -+ -w -s -linkmode=external -extldflags '-Wl,-z,relro -Wl,-z,now -pie' -X ${repo_path}/version.BuildUser${ldseparator}${BUILD_USER} -+ -w -s -linkmode=external -extldflags '-Wl,-z,relro -Wl,-z,now -pie' -X ${repo_path}/version.BuildDate${ldseparator}${BUILD_DATE} -+ -w -s -linkmode=external -extldflags '-Wl,-z,relro -Wl,-z,now -pie' -X ${repo_path}/version.GoVersion${ldseparator}${go_version}" - - echo ">> building cadvisor" - --- -2.39.1 - diff --git a/backport-Set-verbosity-after-flag-definition.patch b/backport-Set-verbosity-after-flag-definition.patch deleted file mode 100644 index 937ea915aeb50e5b9d260946ec084810d109b854..0000000000000000000000000000000000000000 --- a/backport-Set-verbosity-after-flag-definition.patch +++ /dev/null @@ -1,33 +0,0 @@ -From a5141527ab5fd51c1776547ab806a7098f1cc952 Mon Sep 17 00:00:00 2001 -From: jiangxinyu -Date: Thu, 19 Sep 2024 13:37:57 +0800 -Subject: [PATCH] Set verbosity after flag definition -Reference: https://github.com/google/cadvisor/pull/3384/commits/20317bfa449ae54cb2f9135482f08fb70a01c16f - ---- - cmd/cadvisor.go | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/cmd/cadvisor.go b/cmd/cadvisor.go -index 505d091..b474512 100644 ---- a/cmd/cadvisor.go -+++ b/cmd/cadvisor.go -@@ -141,13 +141,13 @@ func (ml *metricSetValue) Set(value string) error { - func init() { - flag.Var(&ignoreMetrics, "disable_metrics", "comma-separated list of `metrics` to be disabled. Options are 'accelerator', 'cpu_topology','disk', 'diskIO', 'network', 'tcp', 'udp', 'percpu', 'sched', 'process', 'hugetlb', 'referenced_memory', 'resctrl'.") - -- // Default logging verbosity to V(2) -- flag.Set("v", "2") - } - - func main() { - klog.InitFlags(nil) - defer klog.Flush() -+ // Default logging verbosity to V(2) -+ _ = flag.Set("v", "2") - flag.Parse() - - if *versionFlag { --- -2.46.0 - diff --git a/cadvisor-0.53.0.tar.gz b/cadvisor-0.53.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..3743637aaf4a9c37696bc272c539a19c4a9f0826 Binary files /dev/null and b/cadvisor-0.53.0.tar.gz differ diff --git a/vendor.tar.gz b/cadvisor-vendor.tar.gz similarity index 35% rename from vendor.tar.gz rename to cadvisor-vendor.tar.gz index 63630548a393718e16a8f8599b6a33ae92ef5d36..093d08dc684e3de5419820c8dbdb4be81d174f76 100644 Binary files a/vendor.tar.gz and b/cadvisor-vendor.tar.gz differ diff --git a/cadvisor.spec b/cadvisor.spec index 897789f585c76a5fb75035fa899c076e5e1aff56..2b492f7f15a0375ea94a98c820fb6e407b3a99bc 100644 --- a/cadvisor.spec +++ b/cadvisor.spec @@ -1,21 +1,16 @@ %define debug_package %{nil} Name: cadvisor -Version: 0.37.0 -Release: 6 +Version: 0.53.0 +Release: 1 Summary: Analyzes resource usage and performance characteristics of running containers. -License: ASL 2.0 +License: Apache-2.0 URL: https://github.com/google/cadvisor - -Source0: https://github.com/google/cadvisor/archive/v%{version}.tar.gz -Source1: vendor.tar.gz -#source2 version sys@v0.0.0-20220908164124-27713097b956 -Source2: sys.tar.gz -Patch0: use_preinstalled_go-bindata.patch -Patch1: add-parameters-to-solve-the-strip.patch -Patch2: Add-loong64-support-for-runc-procfs-and-crc32.patch -Patch3: backport-Set-verbosity-after-flag-definition.patch -Patch1000: 1000-add-riscv64-support-for-crc32-and-procfs.patch +Source0: https://github.com/google/cadvisor/archive/v%{version}/%{name}-%{version}.tar.gz +# tar -xvf Source0 +# cd cmd && run 'go mod vendor' in it +# tar -czvf cadvisor-vendor.tar.gz vendor +Source1: cadvisor-vendor.tar.gz BuildRequires: golang >= 1.13 @@ -33,28 +28,17 @@ and network statistics. This data is exported by container and machine-wide. %prep -%setup -q -T -n %{name}-%{version} -b 0 -b 1 -%patch 0 -p1 -%patch 1 -p1 -%patch 2 -p1 -%patch 3 -p1 -%ifarch loongarch64 -rm -rf vendor/golang.org/x/sys -rm -rf cmd/vendor/golang.org/x/sys/ -tar -xf %{SOURCE2} -C vendor/golang.org/x/ -tar -xf %{SOURCE2} -C cmd/vendor/golang.org/x/ -%endif -%ifarch riscv64 -%patch1000 -p1 -%endif +%setup -n %{name}-%{version} +tar -xzvf %{SOURCE1} +mv vendor/ cmd/ +sed -i 's/^build: assets/build:/' Makefile %build export GOFLAGS="-mod=vendor -buildmode=pie" make build %install -install -D -m 755 cadvisor %{buildroot}%{_bindir}/cadvisor - +install -D -m 755 _output/%{name} %{buildroot}%{_bindir}/cadvisor %files %defattr(-,root,root,-) @@ -62,6 +46,10 @@ install -D -m 755 cadvisor %{buildroot}%{_bindir}/cadvisor %changelog +* Fri Nov 28 2025 jiangxinyu - 0.53.0-1 +- Update package to version 0.53.0 +- fix potential hang on containerd client.LoadContainer + * Thu Sep 19 2024 jiangxinyu - 0.37.0-6 - Type:bugfix - ID:NA diff --git a/sys.tar.gz b/sys.tar.gz deleted file mode 100644 index 40a278ee856ba1d96d9f392d4e024426faf5881f..0000000000000000000000000000000000000000 Binary files a/sys.tar.gz and /dev/null differ diff --git a/use_preinstalled_go-bindata.patch b/use_preinstalled_go-bindata.patch deleted file mode 100644 index aa54e656d5f8c67b6a92bdba830e2d17e19acac2..0000000000000000000000000000000000000000 --- a/use_preinstalled_go-bindata.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/build/assets.sh b/build/assets.sh -index fe51acd..9fa77ce 100644 ---- a/build/assets.sh -+++ b/build/assets.sh -@@ -28,11 +28,6 @@ TEMPLATES_PACKAGE="pages" - - FORCE="${FORCE:-}" # Force assets to be rebuilt if FORCE=true - --# Install while in a temp dir to avoid polluting go.mod/go.sum --pushd "${TMPDIR:-/tmp}" > /dev/null --go get -u github.com/kevinburke/go-bindata/... --popd > /dev/null -- - build_asset () { - local package=$1 - local output_path=$2 diff --git a/v0.37.0.tar.gz b/v0.37.0.tar.gz deleted file mode 100644 index db9e3e3fac9415c27781a1595889ea05ff2dac77..0000000000000000000000000000000000000000 Binary files a/v0.37.0.tar.gz and /dev/null differ