From c2670ffa1618e3689d647177c07a9c55d28b36ad Mon Sep 17 00:00:00 2001 From: Max Brodeur-Urbas <35381493+MaxBrodeurUrbas@users.noreply.github.com> Date: Wed, 2 Mar 2022 10:32:07 -0800 Subject: [PATCH] [main] upgrading node-problem-detector to v0.8.10 (#2343) * upgrading ndp to v0.8.10 * upgrading node-problem-detector to v0.8.10 * adding changelog for node-problem-detector * fixing release number for node-problem-detector * splitting patch file in two for cleanliness --- .../001-remove_arm64_build.patch | 56 +++++++++++++++++++ ...d.patch => 002-remove_windows_build.patch} | 17 +++--- ....patch => 003-add_mariner_OSVersion.patch} | 0 .../node-problem-detector.signatures.json | 2 +- .../node-problem-detector.spec | 13 +++-- cgmanifest.json | 4 +- 6 files changed, 78 insertions(+), 14 deletions(-) create mode 100644 SPECS/node-problem-detector/001-remove_arm64_build.patch rename SPECS/node-problem-detector/{remove_windows_build.patch => 002-remove_windows_build.patch} (59%) rename SPECS/node-problem-detector/{add_mariner_OSVersion.patch => 003-add_mariner_OSVersion.patch} (100%) diff --git a/SPECS/node-problem-detector/001-remove_arm64_build.patch b/SPECS/node-problem-detector/001-remove_arm64_build.patch new file mode 100644 index 0000000000..d6b7a18c5e --- /dev/null +++ b/SPECS/node-problem-detector/001-remove_arm64_build.patch @@ -0,0 +1,56 @@ +diff -Naur a/Makefile b/Makefile +--- a/Makefile 2021-05-14 17:05:59.000000000 -0700 ++++ b/Makefile 2022-02-24 11:53:35.220842944 -0800 +@@ -22,8 +22,8 @@ + all: build + + # PLATFORMS is the set of OS_ARCH that NPD can build against. +-LINUX_PLATFORMS=linux_amd64 linux_arm64 +-PLATFORMS=$(LINUX_PLATFORMS) windows_amd64 ++LINUX_PLATFORMS=linux_amd64 ++PLATFORMS=$(LINUX_PLATFORMS) + + # VERSION is the version of the binary. + VERSION?=$(shell if [ -d .git ]; then echo `git describe --tags --dirty`; else echo "UNKNOWN"; fi) +@@ -147,7 +147,7 @@ + + output/linux_amd64/bin/%: $(PKG_SOURCES) + GOOS=linux GOARCH=amd64 CGO_ENABLED=$(CGO_ENABLED) GO111MODULE=on \ +- CC=x86_64-linux-gnu-gcc go build \ ++ go build \ + -mod vendor \ + -o $@ \ + -ldflags '-X $(PKG)/pkg/version.version=$(VERSION)' \ +@@ -157,29 +157,12 @@ + + output/linux_amd64/test/bin/%: $(PKG_SOURCES) + GOOS=linux GOARCH=amd64 CGO_ENABLED=$(CGO_ENABLED) GO111MODULE=on \ +- CC=x86_64-linux-gnu-gcc go build \ ++ go build \ + -mod vendor \ + -o $@ \ + -tags "$(LINUX_BUILD_TAGS)" \ + ./test/e2e/$(subst -,,$*) + +-output/linux_arm64/bin/%: $(PKG_SOURCES) +- GOOS=linux GOARCH=arm64 CGO_ENABLED=$(CGO_ENABLED) GO111MODULE=on \ +- CC=aarch64-linux-gnu-gcc go build \ +- -mod vendor \ +- -o $@ \ +- -ldflags '-X $(PKG)/pkg/version.version=$(VERSION)' \ +- -tags "$(LINUX_BUILD_TAGS)" \ +- ./cmd/$(subst -,,$*) +- touch $@ +- +-output/linux_arm64/test/bin/%: $(PKG_SOURCES) +- GOOS=linux GOARCH=arm64 CGO_ENABLED=$(CGO_ENABLED) GO111MODULE=on \ +- CC=aarch64-linux-gnu-gcc go build \ +- -mod vendor \ +- -o $@ \ +- -tags "$(LINUX_BUILD_TAGS)" \ +- ./test/e2e/$(subst -,,$*) + + # In the future these targets should be deprecated. + ./bin/log-counter: $(PKG_SOURCES) + + diff --git a/SPECS/node-problem-detector/remove_windows_build.patch b/SPECS/node-problem-detector/002-remove_windows_build.patch similarity index 59% rename from SPECS/node-problem-detector/remove_windows_build.patch rename to SPECS/node-problem-detector/002-remove_windows_build.patch index 5c0d003c4b..fa44940d9c 100644 --- a/SPECS/node-problem-detector/remove_windows_build.patch +++ b/SPECS/node-problem-detector/002-remove_windows_build.patch @@ -1,12 +1,13 @@ diff -Naur a/Makefile b/Makefile --- a/Makefile 2021-05-14 17:05:59.000000000 -0700 -+++ b/Makefile 2021-06-15 12:31:28.612040696 -0700 -@@ -123,25 +123,9 @@ - BINARIES_LINUX_ONLY += bin/log-counter ++++ b/Makefile 2022-02-24 11:53:35.220842944 -0800 +@@ -125,26 +125,9 @@ endif --ALL_BINARIES = $(foreach binary, $(BINARIES) $(BINARIES_LINUX_ONLY), ./$(binary)) $(foreach binary, $(BINARIES) $(BINARIES_LINUX_ONLY), output/linux_amd64/$(binary)) $(foreach binary, $(BINARIES), output/windows_amd64/$(binary).exe) -+ALL_BINARIES = $(foreach binary, $(BINARIES) $(BINARIES_LINUX_ONLY), ./$(binary)) $(foreach binary, $(BINARIES) $(BINARIES_LINUX_ONLY), output/linux_amd64/$(binary)) + ALL_BINARIES = $(foreach binary, $(BINARIES) $(BINARIES_LINUX_ONLY), ./$(binary)) \ +- $(foreach platform, $(LINUX_PLATFORMS), $(foreach binary, $(BINARIES) $(BINARIES_LINUX_ONLY), output/$(platform)/$(binary))) \ +- $(foreach binary, $(BINARIES), output/windows_amd64/$(binary).exe) ++ $(foreach platform, $(LINUX_PLATFORMS), $(foreach binary, $(BINARIES) $(BINARIES_LINUX_ONLY), output/$(platform)/$(binary))) ALL_TARBALLS = $(foreach platform, $(PLATFORMS), $(NPD_NAME_VERSION)-$(platform).tar.gz) -output/windows_amd64/bin/%.exe: $(PKG_SOURCES) @@ -26,5 +27,7 @@ diff -Naur a/Makefile b/Makefile - ./test/e2e/$(subst -,,$*) - output/linux_amd64/bin/%: $(PKG_SOURCES) - GOOS=linux GOARCH=amd64 CGO_ENABLED=$(CGO_ENABLED) GO111MODULE=on go build \ - -mod vendor \ + GOOS=linux GOARCH=amd64 CGO_ENABLED=$(CGO_ENABLED) GO111MODULE=on \ + go build \ + + diff --git a/SPECS/node-problem-detector/add_mariner_OSVersion.patch b/SPECS/node-problem-detector/003-add_mariner_OSVersion.patch similarity index 100% rename from SPECS/node-problem-detector/add_mariner_OSVersion.patch rename to SPECS/node-problem-detector/003-add_mariner_OSVersion.patch diff --git a/SPECS/node-problem-detector/node-problem-detector.signatures.json b/SPECS/node-problem-detector/node-problem-detector.signatures.json index eb85ec4d6c..93490d25f4 100644 --- a/SPECS/node-problem-detector/node-problem-detector.signatures.json +++ b/SPECS/node-problem-detector/node-problem-detector.signatures.json @@ -1,5 +1,5 @@ { "Signatures": { - "node-problem-detector-0.8.8.tar.gz": "29b40175a96b524ecc8bb4bf85e12309b789d9c16b5b242af3f0e20b6c89b6df" + "node-problem-detector-0.8.10.tar.gz": "bd11c36c5bdeb9ad82b52284bfcfdf63b655301ebd708a351c0ec526c1bf0c22" } } \ No newline at end of file diff --git a/SPECS/node-problem-detector/node-problem-detector.spec b/SPECS/node-problem-detector/node-problem-detector.spec index a8a568b1a0..ca6ba59aef 100644 --- a/SPECS/node-problem-detector/node-problem-detector.spec +++ b/SPECS/node-problem-detector/node-problem-detector.spec @@ -1,15 +1,16 @@ Summary: Kubernetes daemon to detect and report node issues Name: node-problem-detector -Version: 0.8.8 +Version: 0.8.10 Release: 1%{?dist} License: ASL 2.0 Vendor: Microsoft Corporation Distribution: Mariner Group: System Environment/Daemons URL: https://github.com/kubernetes/node-problem-detector -Source0: https://github.com/kubernetes/%{name}/archive/refs/tags/%{name}-%{version}.tar.gz -Patch0: remove_windows_build.patch -Patch1: add_mariner_OSVersion.patch +Source0: https://github.com/kubernetes/%{name}/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz +Patch0: 001-remove_arm64_build.patch +Patch1: 002-remove_windows_build.patch +Patch2: 003-add_mariner_OSVersion.patch BuildRequires: golang BuildRequires: systemd-devel ExclusiveArch: x86_64 @@ -61,6 +62,10 @@ make test %config(noreplace) %{_sysconfdir}/node-problem-detector.d/* %changelog +* Fri Feb 25 2022 Max Brodeur-Urbas - 0.8.10-1 +- Upgrading to v0.8.10 +- Disable arm64 builds in Makefile with remove_arm64_build.patch. + * Tue Jun 15 2021 Henry Beberman - 0.8.8-1 - Add node-problem-detector spec. - Add Mariner to OSVersion detection and disable exe builds in makefile. diff --git a/cgmanifest.json b/cgmanifest.json index 77a4a026ec..0a341f05d6 100644 --- a/cgmanifest.json +++ b/cgmanifest.json @@ -14613,8 +14613,8 @@ "type": "other", "other": { "name": "node-problem-detector", - "version": "0.8.8", - "downloadUrl": "https://github.com/kubernetes/node-problem-detector/archive/refs/tags/v0.8.8.tar.gz" + "version": "0.8.10", + "downloadUrl": "https://github.com/kubernetes/node-problem-detector/archive/refs/tags/v0.8.10.tar.gz" } } },