commit 65d81de485f49249fc5ae38bdb75cfa47f4947ed Author: Sergey Zhemoytel Date: Sun Aug 6 01:50:55 2023 +0300 Imported from SRPM diff --git a/.abf.yml b/.abf.yml new file mode 100644 index 0000000..097de44 --- /dev/null +++ b/.abf.yml @@ -0,0 +1,2 @@ +sources: + kubepug-1.5.1.tar.gz: 419a544350d57e8b09c9c7bae0bccdffd07d1277 diff --git a/kubepug.spec b/kubepug.spec new file mode 100644 index 0000000..f45ba93 --- /dev/null +++ b/kubepug.spec @@ -0,0 +1,46 @@ +%define debug %nil +%define debug_package %nil + +Name: kubepug +Version: 1.5.1 +Release: 1 +Summary: Kubernetes PreUpGrade (Checker) +URL: https://github.com/rikatz/kubepug +Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz +License: Apache-2.0 +Group: Development/Other +BuildRequires: go +BuildRequires: git-core +BuildRequires: upx + +%description +KubePug/Deprecations is intended to be a kubectl plugin, +which: + +- Downloads a swagger.json from a specific Kubernetes +version +- Parses this Json finding deprecation notices +- Verifies the current kubernetes cluster or input files +checking whether exists objects in this deprecated API +Versions, allowing the user to check before migrating + +%prep +%setup -q + +%build +CGO_ENABLED=0 go build -trimpath -ldflags "-X sigs.k8s.io/release-utils/version.gitVersion=%{version}" -o ./bin/kubepug . +upx bin/%{name} + +# gen completion +./bin/%{name} completion bash > %{name}.completion + +%install +install -Dm0755 bin/%{name} %{buildroot}%{_bindir}/%{name} +install -Dm0644 %{name}.completion %{buildroot}%{_datadir}/bash-completion/completions/%{name} + +%files +%doc README.md LICENSE +%{_bindir}/%{name} +%{_datadir}/bash-completion/completions/%{name} + +