Hello community, here is the log from the commit of package k3s for openSUSE:Factory checked in at 2020-08-04 20:18:33 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/k3s (Old) and /work/SRC/openSUSE:Factory/.k3s.new.3592 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "k3s" Tue Aug 4 20:18:33 2020 rev:3 rq:824323 version:0.4.0 Changes: -------- --- /work/SRC/openSUSE:Factory/k3s/k3s.changes 2019-05-06 13:29:01.217485200 +0200 +++ /work/SRC/openSUSE:Factory/.k3s.new.3592/k3s.changes 2020-08-04 20:18:47.508940386 +0200 @@ -1,0 +2,10 @@ +Tue Aug 4 11:41:14 UTC 2020 - Dirk Mueller <[email protected]> + +- add conflicts and minimal update-alternatives for new kubectl implementation + +------------------------------------------------------------------- +Mon Aug 3 17:02:25 UTC 2020 - Callum Farmer <[email protected]> + +- Fixes for %_libexecdir changing to /usr/libexec (bsc#1174075) + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ k3s.spec ++++++ --- /var/tmp/diff_new_pack.xDyc4O/_old 2020-08-04 20:18:48.660940906 +0200 +++ /var/tmp/diff_new_pack.xDyc4O/_new 2020-08-04 20:18:48.664940908 +0200 @@ -1,7 +1,7 @@ # # spec file for package k3s # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,6 +19,9 @@ # 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.14 + Name: k3s Version: 0.4.0 Release: 0 @@ -46,6 +49,9 @@ # Conflicts: cri-tools Conflicts: kubectl Conflicts: kubernetes-client +Conflicts: kubernetes-client-provider +Requires(post): update-alternatives +Requires(postun): update-alternatives %{?systemd_requires} %description @@ -74,6 +80,7 @@ %prep %setup -q +sed -e 's-@LIBEXECDIR@-%{_libexecdir}-g' -i %{PATCH0} %patch0 -p1 %build @@ -88,13 +95,14 @@ %{goinstall} %if %{build_kubectl} %{goinstall} ./cmd/kubectl +mv -v %{buildroot}%{_bindir}/kubectl %{buildroot}%{_bindir}/kubectl%{baseversion} %endif %{goinstall} ./vendor/k8s.io/kubernetes/cmd/hyperkube # Install symlinks pushd %{buildroot}%{_bindir} %if !%{build_kubectl} -ln -s k3s kubectl +ln -s k3s kubectl%{baseversion} %endif # ln -s k3s crictl popd @@ -113,16 +121,27 @@ ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rck3s-server ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rck3s-agent +# alternatives +ln -s -f %{_sysconfdir}/alternatives/kubectl %{buildroot}%{_bindir}/kubectl + %pre %service_add_pre k3s-server.service k3s-agent.service %post +export baseversion="%{baseversion}" +%{_sbindir}/update-alternatives \ + --install %{_bindir}/kubectl kubectl %{_bindir}/kubectl%{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 @@ -131,6 +150,7 @@ # %{_bindir}/crictl %{_bindir}/k3s %{_bindir}/kubectl +%{_bindir}/kubectl%{baseversion} %{_localstatedir}/lib/rancher %config %{_sysconfdir}/rancher %config(noreplace) %{_sysconfdir}/rancher/k3s/agent.conf @@ -139,6 +159,7 @@ %{_unitdir}/k3s-server.service %{_sbindir}/rck3s-agent %{_sbindir}/rck3s-server +%ghost %_sysconfdir/alternatives/kubectl %files hyperkube %{_bindir}/hyperkube ++++++ cni-bin-dir.patch ++++++ --- /var/tmp/diff_new_pack.xDyc4O/_old 2020-08-04 20:18:48.700940924 +0200 +++ /var/tmp/diff_new_pack.xDyc4O/_new 2020-08-04 20:18:48.700940924 +0200 @@ -6,7 +6,7 @@ } - hostLocal, err := exec.LookPath("host-local") -+ hostLocal, err := exec.LookPath("/usr/lib/cni/host-local") ++ hostLocal, err := exec.LookPath("@LIBEXECDIR@/cni/host-local") if err != nil { return nil, errors.Wrapf(err, "failed to find host-local") }
