Files
kuberlr/kuberlr.spec
Dirk Mueller 2c35ecb422 - Update to version 0.6.1:
* chore(Dockerfile): use latest version of the Go base image
  * Improve error reporting
  * Set the right initial permissions for the download dirs
  * chore(deps): Bump github.com/go-viper/mapstructure/v2
  * chore(deps): Bump sigstore/cosign-installer from 3.9.0 to 3.9.1
  * chore(deps): Bump k8s.io/client-go from 0.33.1 to 0.33.2
  * chore(deps): Bump docker/setup-buildx-action from 3.11.0 to 3.11.1
  * chore(deps): Bump sigstore/cosign-installer from 3.8.2 to 3.9.0
  * chore(deps): Bump docker/setup-buildx-action from 3.10.0 to 3.11.0
  * chore(deps): Bump actions/attest-build-provenance from 2.3.0 to 2.4.0
  * chore(deps): Bump docker/build-push-action from 6.16.0 to 6.18.0
  * chore(deps): Bump k8s.io/client-go from 0.33.0 to 0.33.1
  * chore(deps): Bump actions/setup-go from 5.4.0 to 5.5.0
  * chore(deps): Bump golangci/golangci-lint-action from 7.0.0 to 8.0.0
  * chore(deps): update golangci-lint
  * chore(deps): Bump actions/attest-build-provenance from 2.2.3 to 2.3.0
  * chore(deps): Bump docker/build-push-action from 6.15.0 to 6.16.0
  * chore(deps): Bump k8s.io/client-go from 0.32.3 to 0.33.0
  * chore(deps): Bump sigstore/cosign-installer from 3.8.1 to 3.8.2
  * chore(deps): Bump golang.org/x/net from 0.36.0 to 0.38.0
  * chore(deps): Bump goreleaser/goreleaser-action from 6.2.1 to 6.3.0
  * chore(deps): Bump github.com/spf13/viper from 1.20.0 to 1.20.1
  * chore(deps): Bump golangci/golangci-lint-action from 6.5.2 to 7.0.0
  * chore(deps): Bump golangci/golangci-lint-action from 6.5.1 to 6.5.2
  * chore(deps): update to latest golangci
  * chore(deps): Bump actions/setup-go from 5.3.0 to 5.4.0
  * chore(deps): Bump docker/login-action from 3.3.0 to 3.4.0
  * chore(deps): Bump github.com/spf13/viper from 1.19.0 to 1.20.0
  * chore(deps): Bump golangci/golangci-lint-action from 6.5.0 to 6.5.1

OBS-URL: https://build.opensuse.org/package/show/devel:kubic/kuberlr?expand=0&rev=9
2025-11-17 16:45:02 +00:00

87 lines
2.5 KiB
RPMSpec

#
# spec file for package kuberlr
#
# Copyright (c) 2025 SUSE LLC and contributors
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define __arch_install_post export NO_BRP_STRIP_DEBUG=true
Name: kuberlr
Version: 0.6.1
Release: 0
Summary: A tool that simplifies the management of multiple versions of kubectl
License: Apache-2.0
Group: System/Management
URL: https://github.com/flavio/kuberlr
Source: %{name}-%{version}.tar.gz
Source1: vendor.tar.gz
BuildRequires: golang-packaging
BuildRequires: golang(API) = 1.25
Requires(post): %fillup_prereq
Requires(post): update-alternatives
Requires(postun): update-alternatives
%if 0%{?suse_version} <= 1500
Conflicts: kubernetes-client
%endif
Provides: kubernetes-client-provider = %{version}
%description
kuberlr (kube-ruler) is a simple wrapper for kubectl. Its main purpose is to
make it easy to manage clusters running different versions of kubernetes.
%prep
%setup -q -a1
%setup -q -T -D -a 1
%build
go build \
-mod=vendor \
-buildmode=pie \
-ldflags="-X=github.com/flavio/kuberlr/pkg/kuberlr.Version=%{version}" \
-o %{name} ./cmd/%{name}
%install
install -D -m 0755 %{name} "%{buildroot}/%{_bindir}/%{name}"
%if 0%{?suse_version} <= 1500
install -D -m 0644 %{name}.conf.example %{buildroot}/%{_sysconfdir}/%{name}.conf
%else
install -D -m 0644 %{name}.conf.example %{buildroot}/%{_distconfdir}/%{name}.conf
%endif
# update alternatives
ln -s %{_sysconfdir}/alternatives/kubectl %{buildroot}%{_bindir}/kubectl
%post
%{_sbindir}/update-alternatives \
--install %{_bindir}/kubectl kubectl %{_bindir}/kuberlr 1000
%postun
if [ ! -f %{_bindir}/%{name} ] ; then
update-alternatives --remove kubectl %{_bindir}/%{name}
fi
%files
%license LICENSE
%doc README.md
%{_bindir}/kubectl
%{_bindir}/%{name}
%ghost %{_sysconfdir}/alternatives/kubectl
%if 0%{?suse_version} <= 1500
%config %{_sysconfdir}/%{name}.conf
%else
%{_distconfdir}/%{name}.conf
%endif
%changelog