Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package k0sctl for openSUSE:Factory checked 
in at 2024-05-11 18:20:42
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/k0sctl (Old)
 and      /work/SRC/openSUSE:Factory/.k0sctl.new.1880 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "k0sctl"

Sat May 11 18:20:42 2024 rev:3 rq:1173079 version:0.17.8

Changes:
--------
--- /work/SRC/openSUSE:Factory/k0sctl/k0sctl.changes    2024-05-09 
13:12:19.782993547 +0200
+++ /work/SRC/openSUSE:Factory/.k0sctl.new.1880/k0sctl.changes  2024-05-11 
18:24:40.217800741 +0200
@@ -1,0 +2,14 @@
+Fri May 10 08:25:15 UTC 2024 - opensuse_buildserv...@ojkastl.de
+
+- Update to version 0.17.8:
+  * Add a hidden ignored --disable-upgrade-check flag (#708)
+  * Add a smoke-test for non-root login user (#707)
+  * Use sudo to upload k0s to /usr/local/bin (#706)
+
+-------------------------------------------------------------------
+Wed May 08 16:23:32 UTC 2024 - opensuse_buildserv...@ojkastl.de
+
+- Update to version 0.17.7:
+  * Use sudo when downloading k0s to /usr/local/bin (#702)
+
+-------------------------------------------------------------------

Old:
----
  k0sctl-0.17.6.obscpio

New:
----
  k0sctl-0.17.8.obscpio

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ k0sctl.spec ++++++
--- /var/tmp/diff_new_pack.RsrXmg/_old  2024-05-11 18:24:40.745819969 +0200
+++ /var/tmp/diff_new_pack.RsrXmg/_new  2024-05-11 18:24:40.745819969 +0200
@@ -20,7 +20,7 @@
 %define __arch_install_post export NO_BRP_STRIP_DEBUG=true
 
 Name:           k0sctl
-Version:        0.17.6
+Version:        0.17.8
 Release:        0
 Summary:        A bootstrapping and management tool for k0s clusters
 License:        Apache-2.0

++++++ _service ++++++
--- /var/tmp/diff_new_pack.RsrXmg/_old  2024-05-11 18:24:40.781821280 +0200
+++ /var/tmp/diff_new_pack.RsrXmg/_new  2024-05-11 18:24:40.785821426 +0200
@@ -2,7 +2,7 @@
   <service name="obs_scm" mode="manual">
     <param name="url">https://github.com/k0sproject/k0sctl.git</param>
     <param name="scm">git</param>
-    <param name="revision">v0.17.6</param>
+    <param name="revision">v0.17.8</param>
     <param name="versionformat">@PARENT_TAG@</param>
     <param name="versionrewrite-pattern">v(.*)</param>
     <param name="changesgenerate">enable</param>

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.RsrXmg/_old  2024-05-11 18:24:40.805822154 +0200
+++ /var/tmp/diff_new_pack.RsrXmg/_new  2024-05-11 18:24:40.809822300 +0200
@@ -1,6 +1,6 @@
 <servicedata>
 <service name="tar_scm">
                 <param 
name="url">https://github.com/k0sproject/k0sctl.git</param>
-              <param 
name="changesrevision">bb5034fad0f4d1a88c3e55ffa919bb1944fdb4bd</param></service></servicedata>
+              <param 
name="changesrevision">b061291724ccdfc4c7f54798f4e3bd93fdf68c1c</param></service></servicedata>
 (No newline at EOF)
 

++++++ k0sctl-0.17.6.obscpio -> k0sctl-0.17.8.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/k0sctl-0.17.6/.github/workflows/smoke.yml 
new/k0sctl-0.17.8/.github/workflows/smoke.yml
--- old/k0sctl-0.17.6/.github/workflows/smoke.yml       2024-05-08 
13:03:07.000000000 +0200
+++ new/k0sctl-0.17.8/.github/workflows/smoke.yml       2024-05-10 
09:22:38.000000000 +0200
@@ -67,6 +67,35 @@
           LINUX_IMAGE: ${{ matrix.image }}
         run: make smoke-basic
   
+  smoke-basic-rootless:
+    strategy:
+      matrix:
+        image:
+          - quay.io/k0sproject/bootloose-debian12
+          - quay.io/k0sproject/bootloose-ubuntu20.04
+    name: Basic 1+1 smoke (regular user login)
+    needs: build
+    runs-on: ubuntu-20.04
+
+    steps:
+
+      - uses: actions/checkout@v4
+      - name: Set up Go
+        uses: actions/setup-go@v5
+        with:
+          go-version-file: go.mod
+          check-latest: true
+
+      - {"name":"Compiled binary 
cache","uses":"actions/download-artifact@v4","with":{"name":"k0sctl","path":"."}}
+      - {"name":"K0sctl 
cache","uses":"actions/cache@v3","with":{"path":"/var/cache/k0sctl/k0s\n~/.cache/k0sctl/k0s\n","key":"k0sctl-cache"}}
+      - {"name":"Kubectl 
cache","uses":"actions/cache@v3","with":{"path":"smoke-test/kubectl\n","key":"kubectl-${{
 hashFiles('smoke-test/smoke.common.sh') }}","restore-keys":"kubectl-"}}
+      - {"name":"Make binaries executable","run":"chmod +x k0sctl || 
true\nchmod +x smoke-test/kubectl || true"}
+
+      - name: Run smoke tests
+        env:
+          LINUX_IMAGE: ${{ matrix.image }}
+        run: make smoke-basic-rootless
+  
   smoke-basic-idlike:
     name: Basic 1+1 smoke (ID_LIKE fallback)
     needs: build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/k0sctl-0.17.6/Makefile new/k0sctl-0.17.8/Makefile
--- old/k0sctl-0.17.6/Makefile  2024-05-08 13:03:07.000000000 +0200
+++ new/k0sctl-0.17.8/Makefile  2024-05-10 09:22:38.000000000 +0200
@@ -51,7 +51,7 @@
 clean:
        rm -rf bin/ k0sctl
 
-smoketests := smoke-basic smoke-files smoke-upgrade smoke-reset 
smoke-os-override smoke-init smoke-backup-restore smoke-dynamic 
smoke-basic-openssh smoke-dryrun smoke-downloadurl
+smoketests := smoke-basic smoke-basic-rootless smoke-files smoke-upgrade 
smoke-reset smoke-os-override smoke-init smoke-backup-restore smoke-dynamic 
smoke-basic-openssh smoke-dryrun smoke-downloadurl
 .PHONY: $(smoketests)
 $(smoketests): k0sctl
        $(MAKE) -C smoke-test $@
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/k0sctl-0.17.6/cmd/apply.go 
new/k0sctl-0.17.8/cmd/apply.go
--- old/k0sctl-0.17.6/cmd/apply.go      2024-05-08 13:03:07.000000000 +0200
+++ new/k0sctl-0.17.8/cmd/apply.go      2024-05-10 09:22:38.000000000 +0200
@@ -55,6 +55,7 @@
                redactFlag,
                retryIntervalFlag,
                retryTimeoutFlag,
+               ignoredUpgradeCheckFlag,
                analyticsFlag,
        },
        Before: actions(initLogging, initConfig, initManager, displayLogo, 
initAnalytics, displayCopyright, warnOldCache),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/k0sctl-0.17.6/cmd/flags.go 
new/k0sctl-0.17.8/cmd/flags.go
--- old/k0sctl-0.17.6/cmd/flags.go      2024-05-08 13:03:07.000000000 +0200
+++ new/k0sctl-0.17.8/cmd/flags.go      2024-05-10 09:22:38.000000000 +0200
@@ -27,9 +27,11 @@
        "gopkg.in/yaml.v2"
 )
 
-type ctxConfigKey struct{}
-type ctxManagerKey struct{}
-type ctxLogFileKey struct{}
+type (
+       ctxConfigKey  struct{}
+       ctxManagerKey struct{}
+       ctxLogFileKey struct{}
+)
 
 var (
        debugFlag = &cli.BoolFlag{
@@ -72,6 +74,13 @@
                EnvVars: []string{"DISABLE_TELEMETRY"},
        }
 
+       ignoredUpgradeCheckFlag = &cli.BoolFlag{
+               Name:    "disable-upgrade-check",
+               Usage:   "Do not check for a k0sctl upgrade",
+               EnvVars: []string{"DISABLE_UPGRADE_CHECK"},
+               Hidden:  true,
+       }
+
        concurrencyFlag = &cli.IntFlag{
                Name:  "concurrency",
                Usage: "Maximum number of hosts to configure in parallel, set 
to 0 for unlimited",
@@ -288,7 +297,7 @@
                }
        }
 
-       logFile, err := os.OpenFile(fn, 
os.O_RDWR|os.O_CREATE|os.O_APPEND|os.O_SYNC, 0600)
+       logFile, err := os.OpenFile(fn, 
os.O_RDWR|os.O_CREATE|os.O_APPEND|os.O_SYNC, 0o600)
        if err != nil {
                return nil, fmt.Errorf("Failed to open log %s: %s", fn, 
err.Error())
        }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/k0sctl-0.17.6/cmd/reset.go 
new/k0sctl-0.17.8/cmd/reset.go
--- old/k0sctl-0.17.6/cmd/reset.go      2024-05-08 13:03:07.000000000 +0200
+++ new/k0sctl-0.17.8/cmd/reset.go      2024-05-10 09:22:38.000000000 +0200
@@ -21,6 +21,7 @@
                redactFlag,
                retryIntervalFlag,
                retryTimeoutFlag,
+               ignoredUpgradeCheckFlag,
                analyticsFlag,
                &cli.BoolFlag{
                        Name:    "force",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/k0sctl-0.17.6/configurer/linux.go 
new/k0sctl-0.17.8/configurer/linux.go
--- old/k0sctl-0.17.6/configurer/linux.go       2024-05-08 13:03:07.000000000 
+0200
+++ new/k0sctl-0.17.8/configurer/linux.go       2024-05-10 09:22:38.000000000 
+0200
@@ -168,10 +168,10 @@
 }
 
 // DownloadK0s performs k0s binary download from github on the host
-func (l *Linux) DownloadK0s(h os.Host, path string, version *version.Version, 
arch string) error {
+func (l *Linux) DownloadK0s(h os.Host, path string, version *version.Version, 
arch string, opts ...exec.Option) error {
        v := strings.ReplaceAll(strings.TrimPrefix(version.String(), "v"), "+", 
"%2B")
        url := 
fmt.Sprintf("https://github.com/k0sproject/k0s/releases/download/v%[1]s/k0s-v%[1]s-%[2]s";,
 v, arch)
-       if err := l.DownloadURL(h, url, path); err != nil {
+       if err := l.DownloadURL(h, url, path, opts...); err != nil {
                return fmt.Errorf("failed to download k0s - check connectivity 
and k0s version validity: %w", err)
        }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/k0sctl-0.17.6/phase/download_k0s.go 
new/k0sctl-0.17.8/phase/download_k0s.go
--- old/k0sctl-0.17.6/phase/download_k0s.go     2024-05-08 13:03:07.000000000 
+0200
+++ new/k0sctl-0.17.8/phase/download_k0s.go     2024-05-10 09:22:38.000000000 
+0200
@@ -66,10 +66,10 @@
        if h.K0sDownloadURL != "" {
                expandedURL := h.ExpandTokens(h.K0sDownloadURL, 
p.Config.Spec.K0s.Version)
                log.Infof("%s: downloading k0s binary from %s", h, expandedURL)
-               if err := h.Configurer.DownloadURL(h, expandedURL, tmp); err != 
nil {
+               if err := h.Configurer.DownloadURL(h, expandedURL, tmp, 
exec.Sudo(h)); err != nil {
                        return fmt.Errorf("failed to download k0s binary: %w", 
err)
                }
-       } else if err := h.Configurer.DownloadK0s(h, tmp, 
p.Config.Spec.K0s.Version, h.Metadata.Arch); err != nil {
+       } else if err := h.Configurer.DownloadK0s(h, tmp, 
p.Config.Spec.K0s.Version, h.Metadata.Arch, exec.Sudo(h)); err != nil {
                return err
        }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/k0sctl-0.17.6/phase/upload_k0s.go 
new/k0sctl-0.17.8/phase/upload_k0s.go
--- old/k0sctl-0.17.6/phase/upload_k0s.go       2024-05-08 13:03:07.000000000 
+0200
+++ new/k0sctl-0.17.8/phase/upload_k0s.go       2024-05-10 09:22:38.000000000 
+0200
@@ -67,11 +67,11 @@
        }
 
        log.Infof("%s: uploading k0s binary from %s to %s", h, 
h.UploadBinaryPath, tmp)
-       if err := h.Upload(h.UploadBinaryPath, tmp); err != nil {
+       if err := h.Upload(h.UploadBinaryPath, tmp, exec.Sudo(h)); err != nil {
                return fmt.Errorf("upload k0s binary: %w", err)
        }
 
-       if err := h.Configurer.Touch(h, tmp, stat.ModTime()); err != nil {
+       if err := h.Configurer.Touch(h, tmp, stat.ModTime(), exec.Sudo(h)); err 
!= nil {
                return fmt.Errorf("failed to touch %s: %w", tmp, err)
        }
        if err := h.Execf(`chmod +x "%s"`, tmp, exec.Sudo(h)); err != nil {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/k0sctl-0.17.6/pkg/apis/k0sctl.k0sproject.io/v1beta1/cluster/host.go 
new/k0sctl-0.17.8/pkg/apis/k0sctl.k0sproject.io/v1beta1/cluster/host.go
--- old/k0sctl-0.17.6/pkg/apis/k0sctl.k0sproject.io/v1beta1/cluster/host.go     
2024-05-08 13:03:07.000000000 +0200
+++ new/k0sctl-0.17.8/pkg/apis/k0sctl.k0sproject.io/v1beta1/cluster/host.go     
2024-05-10 09:22:38.000000000 +0200
@@ -144,7 +144,7 @@
        ReadFile(os.Host, string) (string, error)
        FileExist(os.Host, string) bool
        Chmod(os.Host, string, string, ...exec.Option) error
-       DownloadK0s(os.Host, string, *version.Version, string) error
+       DownloadK0s(os.Host, string, *version.Version, string, ...exec.Option) 
error
        DownloadURL(os.Host, string, string, ...exec.Option) error
        InstallPackage(os.Host, ...string) error
        FileContains(os.Host, string, string) bool
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/k0sctl-0.17.6/smoke-test/Makefile 
new/k0sctl-0.17.8/smoke-test/Makefile
--- old/k0sctl-0.17.6/smoke-test/Makefile       2024-05-08 13:03:07.000000000 
+0200
+++ new/k0sctl-0.17.8/smoke-test/Makefile       2024-05-10 09:22:38.000000000 
+0200
@@ -22,6 +22,9 @@
 smoke-basic: $(bootloose) id_rsa_k0s k0sctl
        ./smoke-basic.sh
 
+smoke-basic-rootless: $(bootloose) id_rsa_k0s k0sctl
+       ./smoke-basic-rootless.sh
+
 smoke-basic-openssh: $(bootloose) id_rsa_k0s k0sctl
        ./smoke-basic-openssh.sh
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/k0sctl-0.17.6/smoke-test/k0sctl-rootless.yaml.tpl 
new/k0sctl-0.17.8/smoke-test/k0sctl-rootless.yaml.tpl
--- old/k0sctl-0.17.6/smoke-test/k0sctl-rootless.yaml.tpl       1970-01-01 
01:00:00.000000000 +0100
+++ new/k0sctl-0.17.8/smoke-test/k0sctl-rootless.yaml.tpl       2024-05-10 
09:22:38.000000000 +0200
@@ -0,0 +1,32 @@
+apiVersion: k0sctl.k0sproject.io/v1beta1
+kind: cluster
+spec:
+  hosts:
+    - role: controller
+      uploadBinary: true
+      os: "$OS_OVERRIDE"
+      ssh:
+        address: "127.0.0.1"
+        port: 9022
+        keyPath: ./id_rsa_k0s
+        user: ${SSH_USER}
+      hooks:
+        apply:
+          before:
+            - "echo hello > apply.hook"
+          after:
+            - "grep -q hello apply.hook"
+    - role: worker
+      uploadBinary: true
+      os: "$OS_OVERRIDE"
+      ssh:
+        address: "127.0.0.1"
+        port: 9023
+        keyPath: ./id_rsa_k0s
+        user: ${SSH_USER}
+  k0s:
+    version: "${K0S_VERSION}"
+    config:
+      spec:
+        telemetry:
+          enabled: false
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/k0sctl-0.17.6/smoke-test/k0sctl.yaml 
new/k0sctl-0.17.8/smoke-test/k0sctl.yaml
--- old/k0sctl-0.17.6/smoke-test/k0sctl.yaml    2024-05-08 13:03:07.000000000 
+0200
+++ new/k0sctl-0.17.8/smoke-test/k0sctl.yaml    2024-05-10 09:22:38.000000000 
+0200
@@ -27,4 +27,4 @@
     config:
       spec:
         telemetry:
-          enabled: false
\ No newline at end of file
+          enabled: false
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/k0sctl-0.17.6/smoke-test/smoke-basic-rootless.sh 
new/k0sctl-0.17.8/smoke-test/smoke-basic-rootless.sh
--- old/k0sctl-0.17.6/smoke-test/smoke-basic-rootless.sh        1970-01-01 
01:00:00.000000000 +0100
+++ new/k0sctl-0.17.8/smoke-test/smoke-basic-rootless.sh        2024-05-10 
09:22:38.000000000 +0200
@@ -0,0 +1,55 @@
+#!/usr/bin/env sh
+
+export SSH_USER=${SSH_USER:-"k0sctl-user"}
+K0SCTL_CONFIG="k0sctl-rootless.yaml"
+
+envsubst < "k0sctl-rootless.yaml.tpl" > "${K0SCTL_CONFIG}"
+
+set -e
+
+
+. ./smoke.common.sh
+trap cleanup EXIT
+
+deleteCluster
+createCluster
+
+for host in manager0 worker0; do
+  echo "* Creating ${SSH_USER} on ${host}"
+  bootloose ssh "root@${host}" -- groupadd --system k0sctl-admin
+  bootloose ssh "root@${host}" -- useradd -m -G k0sctl-admin -p '*' 
"${SSH_USER}"
+  bootloose ssh "root@${host}" -- echo "'%k0sctl-admin ALL=(ALL)NOPASSWD:ALL'" 
'>/etc/sudoers.d/k0sctl-admin'
+  bootloose ssh "root@${host}" -- chmod 0440 /etc/sudoers.d/k0sctl-admin
+  bootloose ssh "root@${host}" -- mkdir -p "/home/${SSH_USER}/.ssh"
+  bootloose ssh "root@${host}" -- cp '/root/.ssh/*' "/home/${SSH_USER}/.ssh/"
+  bootloose ssh "root@${host}" -- chown -R "${SSH_USER}:${SSH_USER}" 
"/home/${SSH_USER}/.ssh"
+done
+
+echo "* Starting apply"
+../k0sctl apply --config "${K0SCTL_CONFIG}" --kubeconfig-out applykubeconfig 
--debug
+echo "* Apply OK"
+
+echo "* Verify hooks were executed on the host"
+bootloose ssh root@manager0 -- grep -q hello "~${SSH_USER}/apply.hook"
+
+echo "* Verify 'k0sctl kubeconfig' output includes 'data' block"
+../k0sctl kubeconfig --config k0sctl.yaml | grep -v -- "-data"
+
+echo "* Run kubectl on controller"
+bootloose ssh root@manager0 -- k0s kubectl get nodes
+
+echo "* Downloading kubectl for local test"
+downloadKubectl
+
+echo "* Using the kubectl from apply"
+./kubectl --kubeconfig applykubeconfig get nodes
+
+echo "* Using k0sctl kubecofig locally"
+../k0sctl kubeconfig --config k0sctl.yaml > kubeconfig
+
+echo "* Output:"
+grep -v -- -data kubeconfig
+
+echo "* Running kubectl"
+./kubectl --kubeconfig kubeconfig get nodes
+echo "* Done"

++++++ k0sctl.obsinfo ++++++
--- /var/tmp/diff_new_pack.RsrXmg/_old  2024-05-11 18:24:40.953827543 +0200
+++ /var/tmp/diff_new_pack.RsrXmg/_new  2024-05-11 18:24:40.957827689 +0200
@@ -1,5 +1,5 @@
 name: k0sctl
-version: 0.17.6
-mtime: 1715166187
-commit: bb5034fad0f4d1a88c3e55ffa919bb1944fdb4bd
+version: 0.17.8
+mtime: 1715325758
+commit: b061291724ccdfc4c7f54798f4e3bd93fdf68c1c
 

++++++ vendor.tar.gz ++++++
/work/SRC/openSUSE:Factory/k0sctl/vendor.tar.gz 
/work/SRC/openSUSE:Factory/.k0sctl.new.1880/vendor.tar.gz differ: char 5, line 1

Reply via email to