Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:SchoolGuy:branches:devel:kubic
k3s
k3s.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File k3s.spec of Package k3s
# # spec file for package k3s # # Copyright (c) 2022 SUSE LLC # # 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/ # # To workaround https://github.com/rancher/k3s/issues/231, build kubectl %define build_kubectl 1 # baseversion - version of kubernetes for this package %define baseversion 1.23 # Define custom version %define corrected_version %(echo "%{version}" | tr '+' '-') Name: k3s Version: 1.23.5+k3s1 Release: 0 Summary: A container orchestration system based on a reduced Kubernetes feature set License: Apache-2.0 Group: System/Management URL: https://k3s.io Source0: %{name}-%{version}.tar.gz Source1: k3s-server.service Source2: k3s-agent.service Source3: server.conf Source4: agent.conf BuildRequires: btrfsprogs BuildRequires: btrfsprogs-static BuildRequires: c_compiler BuildRequires: gawk BuildRequires: gcc BuildRequires: git BuildRequires: golang-packaging BuildRequires: jq BuildRequires: libbtrfs-devel BuildRequires: pkgconfig BuildRequires: systemd-rpm-macros BuildRequires: yq BuildRequires: zstd BuildRequires: golang(API) = 1.17 BuildRequires: pkgconfig(libseccomp) BuildRequires: pkgconfig(libselinux) BuildRequires: pkgconfig(sqlite3) BuildRequires: pkgconfig(zlib) Requires: conntrack-tools Requires: iptables %{?systemd_requires} %description k3s is a container orchestration system for automating application deployment, scaling, and management. It is a Kubernetes-compliant distribution that differs from the original Kubernetes (colloquially "k8s") in that: * Legacy, alpha, or non-default features are removed. * Most in-tree plugins (cloud providers and storage plugins) were removed, since they can be replaced with out-of-tree addons. * sqlite3 is the default storage mechanism. etcd3 is still available, but not the default. * There is a new launcher that handles a lot of the complexity of TLS and options. %prep # % autosetup -n % {name}-% {corrected_version} -a 5 %autosetup -n %{name} sed -i 's#exec.LookPath("host-local")#exec.LookPath("%{_libexecdir}/cni/host-local")#' pkg/agent/config/config.go %build SKIP_CNI=true ./scripts/build SKIP_BUILDROOT=true SKIP_IMAGE=true SKIP_AIRGAP=true ./scripts/package echo %{_arch} %if "%{_arch}" == "aarch64" mv dist/artifacts/%{name}-arm64 dist/artifacts/%{name} %endif %if "%{_arch}" == "arm" mv dist/artifacts/%{name}-armhf dist/artifacts/%{name} %endif %if "%{_arch}" == "s390x" mv dist/artifacts/%{name}-s390x dist/artifacts/%{name} %endif %if "%{_arch}" == "ppc64le" mv dist/artifacts/%{name}-ppc64le dist/artifacts/%{name} %endif %if "%{_arch}" == "i386" mv dist/artifacts/%{name}-386 dist/artifacts/%{name} %endif %install install -D -m 644 dist/artifacts/k3s %{buildroot}%{_bindir}/k3s mkdir -p %{buildroot}%{_localstatedir}/lib/rancher/k3s mkdir -p %{buildroot}%{_localstatedir}/lib/rancher/k3s/server/manifests mkdir -p %{buildroot}%{_sysconfdir}/rancher/k3s install -D -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/rancher/k3s/server.conf install -D -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/rancher/k3s/agent.conf mkdir -p %{buildroot}%{_unitdir} install -D -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/k3s-server.service install -D -m 644 %{SOURCE2} %{buildroot}%{_unitdir}/k3s-agent.service mkdir -p %{buildroot}%{_sbindir} ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rck3s-server ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rck3s-agent %pre %service_add_pre k3s-server.service k3s-agent.service %post export baseversion="%{baseversion}" %service_add_post k3s-server.service k3s-agent.service %preun %service_del_preun k3s-server.service k3s-agent.service %postun if [ ! -f %{_bindir}/kubectl%{baseversion} ] ; then update-alternatives --remove kubectl %{_bindir}/kubectl%{baseversion} fi %service_del_postun k3s-server.service k3s-agent.service %files %license LICENSE %doc README.md %attr(755, root, root) %{_bindir}/k3s %{_localstatedir}/lib/rancher %config %{_sysconfdir}/rancher %config(noreplace) %{_sysconfdir}/rancher/k3s/agent.conf %config(noreplace) %{_sysconfdir}/rancher/k3s/server.conf %{_unitdir}/k3s-agent.service %{_unitdir}/k3s-server.service %{_sbindir}/rck3s-agent %{_sbindir}/rck3s-server %changelog
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor