Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package container-suseconnect for 
openSUSE:Factory checked in at 2026-11-20 14:49:01
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/container-suseconnect (Old)
 and      /work/SRC/openSUSE:Factory/.container-suseconnect.new.1251 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "container-suseconnect"

Fri Nov 20 14:49:01 2026 rev:13 rq:1398912 version:2.7.0

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/container-suseconnect/container-suseconnect.changes  
    2026-08-20 16:16:58.617817911 +0200
+++ 
/work/SRC/openSUSE:Factory/.container-suseconnect.new.1251/container-suseconnect.changes
    2026-11-20 14:51:35.487734507 +0100
@@ -1,0 +2,11 @@
+Fri Nov 20 07:56:49 UTC 2026 - Dirk Müller <[email protected]>
+
+- Update to version 2.7.0:
+  * make ADDITIONAL_MODULES compatible with white spaces
+  * Modernize for Go 1.27
+  * Switch to io stdlib and remove last dependency on github.com/mssola/capture
+  * Check for error before using the result (avoids a null pointer crash)
+  * Fix file descriptor leaks
+  * Modernize test suite
+
+-------------------------------------------------------------------

Old:
----
  container-suseconnect-2.6.0.tar.zst

New:
----
  container-suseconnect-2.7.0.tar.zst

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

Other differences:
------------------
++++++ container-suseconnect.spec ++++++
--- /var/tmp/diff_new_pack.WmFADb/_old  2026-11-20 14:51:36.505777592 +0100
+++ /var/tmp/diff_new_pack.WmFADb/_new  2026-11-20 14:51:36.507777676 +0100
@@ -24,7 +24,7 @@
 %global use_fips_mode 0%{?suse_version} >= 1500
 
 Name:           %{project}
-Version:        2.6.0
+Version:        2.7.0
 Release:        0
 Summary:        Provides access to repositories inside containers
 License:        Apache-2.0
@@ -35,7 +35,7 @@
 Source2:        container-suseconnect-rpmlintrc
 BuildRequires:  libzypp > 9.34
 BuildRequires:  zstd
-BuildRequires:  golang(API) = 1.26
+BuildRequires:  golang(API) = 1.27
 Requires:       libzypp > 9.34
 
 %description

++++++ _service ++++++
--- /var/tmp/diff_new_pack.WmFADb/_old  2026-11-20 14:51:36.542779157 +0100
+++ /var/tmp/diff_new_pack.WmFADb/_new  2026-11-20 14:51:36.547779369 +0100
@@ -6,7 +6,7 @@
         <param name="exclude">.git</param>
         <param name="versionformat">@PARENT_TAG@</param>
         <param name="versionrewrite-pattern">v(.*)</param>
-        <param name="revision">v2.6.0</param>
+        <param name="revision">v2.7.0</param>
         <param name="changesgenerate">enable</param>
     </service>
     <service mode="manual" name="set_version"/>

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.WmFADb/_old  2026-11-20 14:51:36.573780469 +0100
+++ /var/tmp/diff_new_pack.WmFADb/_new  2026-11-20 14:51:36.578780681 +0100
@@ -1,6 +1,6 @@
 <servicedata>
 <service name="tar_scm">
                 <param 
name="url">https://github.com/SUSE/container-suseconnect.git</param>
-              <param 
name="changesrevision">9bf71182c961ae8777fe9706512957fdf7414718</param></service></servicedata>
+              <param 
name="changesrevision">244276363c6d34d098e291c1d77d60da092418a8</param></service></servicedata>
 (No newline at EOF)
 

++++++ container-suseconnect-2.6.0.tar.zst -> 
container-suseconnect-2.7.0.tar.zst ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/container-suseconnect-2.6.0/Makefile 
new/container-suseconnect-2.7.0/Makefile
--- old/container-suseconnect-2.6.0/Makefile    2026-08-20 11:20:39.000000000 
+0200
+++ new/container-suseconnect-2.7.0/Makefile    2026-11-20 08:55:58.000000000 
+0100
@@ -2,8 +2,6 @@
 CS_BUILD_DIR := $(PWD)/build/container-suseconnect
 PROJECT := github.com/SUSE/container-suseconnect
 
-export GO111MODULE=auto
-
 ifneq "$(VERBOSE)" "1"
 GO_VERBOSE=
 .SILENT:
@@ -12,7 +10,7 @@
 all:
        rm -rf $(CS_BUILD_DIR)
        mkdir -p $(CS_BUILD_DIR)
-       GOBIN=$(CS_BUILD_DIR) go install -ldflags='-w -s' -a $(GO_VERBOSE) ./...
+       GOBIN=$(CS_BUILD_DIR) go install -ldflags='-w -s' $(GO_VERBOSE) ./...
 
 .PHONY: test
 test: test-unit validate-go
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/container-suseconnect-2.6.0/go.mod 
new/container-suseconnect-2.7.0/go.mod
--- old/container-suseconnect-2.6.0/go.mod      2026-08-20 11:20:39.000000000 
+0200
+++ new/container-suseconnect-2.7.0/go.mod      2026-11-20 08:55:58.000000000 
+0100
@@ -1,10 +1,7 @@
 module github.com/SUSE/container-suseconnect
 
-go 1.26.0
+go 1.27.0
 
-require (
-       github.com/mssola/capture v1.1.0
-       github.com/stretchr/testify v1.12.1
-)
+require github.com/stretchr/testify v1.12.1
 
 require go.yaml.in/yaml/v3 v3.0.5 // indirect
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/container-suseconnect-2.6.0/go.sum 
new/container-suseconnect-2.7.0/go.sum
--- old/container-suseconnect-2.6.0/go.sum      2026-08-20 11:20:39.000000000 
+0200
+++ new/container-suseconnect-2.7.0/go.sum      2026-11-20 08:55:58.000000000 
+0100
@@ -1,5 +1,3 @@
-github.com/mssola/capture v1.1.0 
h1:6eQlJabrKukAgp4+ytyEB+AACciMqA30H2WRhhHC0xk=
-github.com/mssola/capture v1.1.0/go.mod 
h1:pHi3j6hBxMY+w6folEomycA/3aUz/4VtXRlKJaBcY7E=
 github.com/stretchr/testify v1.12.1 
h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWDWE=
 github.com/stretchr/testify v1.12.1/go.mod 
h1:MDEgiDPPsNp5cuIrHPPCyornHKgEVbtFUmoNlxoYthg=
 go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw=
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/container-suseconnect-2.6.0/internal/logger.go 
new/container-suseconnect-2.7.0/internal/logger.go
--- old/container-suseconnect-2.6.0/internal/logger.go  2026-08-20 
11:20:39.000000000 +0200
+++ new/container-suseconnect-2.7.0/internal/logger.go  2026-11-20 
08:55:58.000000000 +0100
@@ -97,7 +97,7 @@
 
 // Log the given formatted string with its parameters, and return it
 // as a new error.
-func loggedError(errorCode int, format string, params ...interface{}) 
*SuseConnectError {
+func loggedError(errorCode int, format string, params ...any) 
*SuseConnectError {
        msg := fmt.Sprintf(format, params...)
        log.Print(msg)
        return &SuseConnectError{
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/container-suseconnect-2.6.0/internal/logger_test.go 
new/container-suseconnect-2.7.0/internal/logger_test.go
--- old/container-suseconnect-2.6.0/internal/logger_test.go     2026-08-20 
11:20:39.000000000 +0200
+++ new/container-suseconnect-2.7.0/internal/logger_test.go     2026-11-20 
08:55:58.000000000 +0100
@@ -23,16 +23,16 @@
        "testing"
 
        "github.com/stretchr/testify/assert"
+       "github.com/stretchr/testify/require"
 )
 
 func TestGetLogWriterFromRegularFile(t *testing.T) {
-       tempFile, err := os.CreateTemp("", "prefix")
-       assert.Nil(t, err)
-
-       defer os.Remove(tempFile.Name())
+       tempFile, err := os.CreateTemp(t.TempDir(), "prefix")
+       require.NoError(t, err)
+       defer tempFile.Close()
 
        w, err := getLogWriter(tempFile.Name())
-       assert.Nil(t, err)
+       require.NoError(t, err)
        assert.NotNil(t, w)
        w.Close()
 }
@@ -44,9 +44,7 @@
 }
 
 func TestGetLogWriterFromValidDir(t *testing.T) {
-       dir, err := os.MkdirTemp("", "")
-       assert.Nil(t, err)
-       defer os.RemoveAll(dir)
+       dir := t.TempDir()
 
        w, err := getLogWriter(dir)
        assert.EqualError(t, err, fmt.Sprintf("open %s: is a directory", dir))
@@ -54,9 +52,7 @@
 }
 
 func TestGetLogWriterFromMissingDir(t *testing.T) {
-       dir, err := os.MkdirTemp("", "")
-       assert.Nil(t, err)
-       defer os.RemoveAll(dir)
+       dir := t.TempDir()
 
        // ensure the path is terminated by / othewise it will be considered a 
file
        path := filepath.Join(dir, "does", "not", "exits") + 
string(filepath.Separator)
@@ -66,9 +62,7 @@
 }
 
 func TestGetLogWriterFromMissingDirFile(t *testing.T) {
-       dir, err := os.MkdirTemp("", "")
-       assert.Nil(t, err)
-       defer os.RemoveAll(dir)
+       dir := t.TempDir()
 
        path := filepath.Join(dir, "does", "not", "exits", "test.log")
        w, err := getLogWriter(path)
@@ -89,12 +83,10 @@
 }
 
 func TestGetLogWriterFromSymbolInName(t *testing.T) {
-       dir, err := os.MkdirTemp("", "")
-       assert.Nil(t, err)
-       defer os.RemoveAll(dir)
+       dir := t.TempDir()
 
        w, err := getLogWriter(filepath.Join(dir, "@"))
-       assert.Nil(t, err)
+       require.NoError(t, err)
        assert.NotNil(t, w)
        w.Close()
 }
@@ -116,29 +108,20 @@
 }
 
 func TestGetLogEnvIfNotSet(t *testing.T) {
-       // ensure no variable is set
-       os.Unsetenv(LogEnv)
+       t.Setenv(LogEnv, "")
        path := getLogEnv()
        assert.Empty(t, path)
 }
 
 func TestGetLogEnvIfSet(t *testing.T) {
-       // ensure no variable is set
-       os.Unsetenv(LogEnv)
-       err := os.Setenv(LogEnv, "/path/file.log")
-       assert.Nil(t, err)
-       defer os.Unsetenv(LogEnv)
+       t.Setenv(LogEnv, "/path/file.log")
 
        envPath := getLogEnv()
        assert.Equal(t, "/path/file.log", envPath)
 }
 
 func TestGetLogEnvTrimSpaces(t *testing.T) {
-       // ensure no variable is set
-       os.Unsetenv(LogEnv)
-       err := os.Setenv(LogEnv, "    /path/file.log    ")
-       assert.Nil(t, err)
-       defer os.Unsetenv(LogEnv)
+       t.Setenv(LogEnv, "    /path/file.log    ")
 
        envPath := getLogEnv()
        assert.Equal(t, "/path/file.log", envPath)
@@ -146,16 +129,11 @@
 
 // Ensures that the log is always written to a file and Stderr.
 func TestSetLoggerOutput(t *testing.T) {
-       // ensure no variable is set
-       os.Unsetenv(LogEnv)
+       tempFile, err := os.CreateTemp(t.TempDir(), "")
+       require.NoError(t, err)
+       defer tempFile.Close()
 
-       tempFile, err := os.CreateTemp("", "")
-       assert.Nil(t, err)
-       defer os.Remove(tempFile.Name())
-
-       err = os.Setenv(LogEnv, tempFile.Name())
-       assert.Nil(t, err)
-       defer os.Unsetenv(LogEnv)
+       t.Setenv(LogEnv, tempFile.Name())
 
        logLine := "This in a log entry in a file and Stderr"
 
@@ -166,11 +144,11 @@
                log.Println(logLine)
        })
 
-       assert.Nil(t, err, "Failed to capture Stderr")
+       require.NoError(t, err, "Failed to capture Stderr")
 
        buff := new(bytes.Buffer)
        _, err = buff.ReadFrom(tempFile)
-       assert.Nil(t, err, "Failed to read temp file")
+       require.NoError(t, err, "Failed to read temp file")
 
        fileData = buff.String()
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/container-suseconnect-2.6.0/internal/products.go 
new/container-suseconnect-2.7.0/internal/products.go
--- old/container-suseconnect-2.6.0/internal/products.go        2026-08-20 
11:20:39.000000000 +0200
+++ new/container-suseconnect-2.7.0/internal/products.go        2026-11-20 
08:55:58.000000000 +0100
@@ -166,9 +166,10 @@
        if err != nil {
                return products, err
        }
+       defer resp.Body.Close()
 
        if resp.StatusCode != 200 {
-               var payload map[string]interface{}
+               var payload map[string]any
                dec := json.NewDecoder(resp.Body)
 
                if err := dec.Decode(&payload); err == nil {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/container-suseconnect-2.6.0/internal/regionsrv/server.go 
new/container-suseconnect-2.7.0/internal/regionsrv/server.go
--- old/container-suseconnect-2.6.0/internal/regionsrv/server.go        
2026-08-20 11:20:39.000000000 +0200
+++ new/container-suseconnect-2.7.0/internal/regionsrv/server.go        
2026-11-20 08:55:58.000000000 +0100
@@ -77,10 +77,10 @@
 // used as a ContainerBuildConfig.
 func ReadConfigFromServer() (*ContainerBuildConfig, error) {
        addr, err := net.ResolveTCPAddr("tcp", containerBuildSrvAddress())
-       log.Printf("Trying to reach suse build server at '%v'", addr.String())
        if err != nil {
                return nil, err
        }
+       log.Printf("Trying to reach suse build server at '%v'", addr.String())
 
        conn, err := net.DialTCP("tcp", nil, addr)
        if err != nil {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/container-suseconnect-2.6.0/internal/regionsrv/zypper_test.go 
new/container-suseconnect-2.7.0/internal/regionsrv/zypper_test.go
--- old/container-suseconnect-2.6.0/internal/regionsrv/zypper_test.go   
2026-08-20 11:20:39.000000000 +0200
+++ new/container-suseconnect-2.7.0/internal/regionsrv/zypper_test.go   
2026-11-20 08:55:58.000000000 +0100
@@ -15,24 +15,19 @@
 package regionsrv
 
 import (
+       "io"
        "os"
        "strings"
        "testing"
-
-       "github.com/mssola/capture"
 )
 
 func TestParseStdinSuccessful(t *testing.T) {
        content := []byte("RESOLVEURL\nkey:value1\nanother:value2")
-       tmp, err := os.CreateTemp("", "file")
+       tmp, err := os.CreateTemp(t.TempDir(), "file")
        if err != nil {
                t.Fatalf("Initialization error: %v", err)
        }
-
-       defer func() {
-               tmp.Close()
-               os.Remove(tmp.Name())
-       }()
+       defer tmp.Close()
 
        if _, err := tmp.Write(content); err != nil {
                t.Fatalf("Initialization error: %v", err)
@@ -124,7 +119,7 @@
 
 func TestPrintFromConfiguration(t *testing.T) {
        withSuppressedLog(func() {
-               res := capture.All(func() {
+               stdout := captureStdout(t, func() {
                        printFromConfiguration("/path", &ContainerBuildConfig{
                                InstanceData: "instance data",
                                ServerFqdn:   "test.fqdn.com",
@@ -135,7 +130,7 @@
                        })
                })
 
-               lines := strings.Split(string(res.Stdout), "\n")
+               lines := strings.Split(stdout, "\n")
                expected := []string{
                        "RESOLVEDURL",
                        "X-Instance-Data:instance data",
@@ -154,3 +149,29 @@
                }
        })
 }
+
+func captureStdout(t *testing.T, fn func()) string {
+       t.Helper()
+
+       orig := os.Stdout
+       r, w, err := os.Pipe()
+       if err != nil {
+               t.Fatalf("Failed to create pipe: %v", err)
+       }
+       defer r.Close()
+
+       os.Stdout = w
+       defer func() {
+               os.Stdout = orig
+       }()
+
+       fn()
+       w.Close()
+
+       data, err := io.ReadAll(r)
+       if err != nil {
+               t.Fatalf("Failed to read captured stdout: %v", err)
+       }
+
+       return string(data)
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/container-suseconnect-2.6.0/internal/service.go 
new/container-suseconnect-2.7.0/internal/service.go
--- old/container-suseconnect-2.6.0/internal/service.go 2026-08-20 
11:20:39.000000000 +0200
+++ new/container-suseconnect-2.7.0/internal/service.go 2026-11-20 
08:55:58.000000000 +0100
@@ -20,6 +20,7 @@
        "os"
        "path/filepath"
        "regexp"
+       "slices"
        "strings"
 )
 
@@ -83,13 +84,9 @@
 // moduleEnabledInEnv returns true if the provided `identifier` is included in
 // the `ADDITIONAL_MODULES` environment variable, otherwise false.
 func moduleEnabledInEnv(identifier string) bool {
-       for _, i := range strings.Split(os.Getenv("ADDITIONAL_MODULES"), ",") {
-               if identifier == i {
-                       return true
-               }
-       }
-
-       return false
+       return 
slices.ContainsFunc(strings.Split(os.Getenv("ADDITIONAL_MODULES"), ","), func(s 
string) bool {
+               return identifier == strings.TrimSpace(s)
+       })
 }
 
 // moduleEnabledInProductFiles returns true if the provided `identifier` is
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/container-suseconnect-2.6.0/internal/service_test.go 
new/container-suseconnect-2.7.0/internal/service_test.go
--- old/container-suseconnect-2.6.0/internal/service_test.go    2026-08-20 
11:20:39.000000000 +0200
+++ new/container-suseconnect-2.7.0/internal/service_test.go    2026-11-20 
08:55:58.000000000 +0100
@@ -201,7 +201,7 @@
 }
 
 func TestServiceOutputSLE15WithCustomModules(t *testing.T) {
-       os.Setenv(
+       t.Setenv(
                "ADDITIONAL_MODULES",
                "sle-module-desktop-applications,sle-module-development-tools",
        )
@@ -615,3 +615,98 @@
                        ListProducts(buffer, products, "none")
                })
 }
+
+func TestModuleEnabledInEnv(t *testing.T) {
+       tests := []struct {
+               name       string
+               env        string
+               unsetEnv   bool
+               identifier string
+               expected   bool
+       }{
+               {
+                       name:       "env unset",
+                       unsetEnv:   true,
+                       identifier: "sle-module-containers",
+                       expected:   false,
+               },
+               {
+                       name:       "env empty",
+                       env:        "",
+                       identifier: "sle-module-containers",
+                       expected:   false,
+               },
+               {
+                       name:       "single module match",
+                       env:        "sle-module-containers",
+                       identifier: "sle-module-containers",
+                       expected:   true,
+               },
+               {
+                       name:       "single module mismatch",
+                       env:        "sle-module-containers",
+                       identifier: "sle-module-basesystem",
+                       expected:   false,
+               },
+               {
+                       name:       "partial prefix does not match",
+                       env:        "sle-module-containers",
+                       identifier: "sle-module",
+                       expected:   false,
+               },
+               {
+                       name:       "multiple modules first match",
+                       env:        
"sle-module-containers,sle-module-basesystem,sle-module-desktop-applications",
+                       identifier: "sle-module-containers",
+                       expected:   true,
+               },
+               {
+                       name:       "multiple modules middle match",
+                       env:        
"sle-module-containers,sle-module-basesystem,sle-module-desktop-applications",
+                       identifier: "sle-module-basesystem",
+                       expected:   true,
+               },
+               {
+                       name:       "multiple modules last match",
+                       env:        
"sle-module-containers,sle-module-basesystem,sle-module-desktop-applications",
+                       identifier: "sle-module-desktop-applications",
+                       expected:   true,
+               },
+               {
+                       name:       "multiple modules no match",
+                       env:        
"sle-module-containers,sle-module-basesystem,sle-module-desktop-applications",
+                       identifier: "sle-module-server-applications",
+                       expected:   false,
+               },
+               {
+                       name:       "whitespace around comma is trimmed",
+                       env:        "sle-module-containers, 
sle-module-basesystem",
+                       identifier: "sle-module-basesystem",
+                       expected:   true,
+               },
+               {
+                       name:       "case sensitive",
+                       env:        "sle-module-containers",
+                       identifier: "SLE-MODULE-CONTAINERS",
+                       expected:   false,
+               },
+       }
+
+       for _, tc := range tests {
+               t.Run(tc.name, func(t *testing.T) {
+                       if tc.unsetEnv {
+                               // t.Setenv ensures the original value is 
restored after the subtest.
+                               t.Setenv("ADDITIONAL_MODULES", "")
+                               os.Unsetenv("ADDITIONAL_MODULES")
+                       } else {
+                               t.Setenv("ADDITIONAL_MODULES", tc.env)
+                       }
+
+                       got := moduleEnabledInEnv(tc.identifier)
+                       if got != tc.expected {
+                               t.Fatalf("moduleEnabledInEnv(%q) with 
ADDITIONAL_MODULES=%q = %v, want %v",
+                                       tc.identifier, 
os.Getenv("ADDITIONAL_MODULES"), got, tc.expected)
+                       }
+               })
+       }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/container-suseconnect-2.6.0/internal/subscriptions.go 
new/container-suseconnect-2.7.0/internal/subscriptions.go
--- old/container-suseconnect-2.6.0/internal/subscriptions.go   2026-08-20 
11:20:39.000000000 +0200
+++ new/container-suseconnect-2.7.0/internal/subscriptions.go   2026-11-20 
08:55:58.000000000 +0100
@@ -63,6 +63,7 @@
        if err != nil {
                return codes, err
        }
+       defer resp.Body.Close()
 
        if resp.StatusCode == 404 {
                // We cannot request regcodes from a SMT server.

++++++ vendor.tar.zst ++++++
++++ 4205 lines of diff (skipped)

Reply via email to