Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package google-osconfig-agent for 
openSUSE:Factory checked in at 2022-10-11 18:02:52
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/google-osconfig-agent (Old)
 and      /work/SRC/openSUSE:Factory/.google-osconfig-agent.new.2275 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "google-osconfig-agent"

Tue Oct 11 18:02:52 2022 rev:16 rq:1009546 version:20220829.00

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/google-osconfig-agent/google-osconfig-agent.changes  
    2022-09-12 19:09:00.350664100 +0200
+++ 
/work/SRC/openSUSE:Factory/.google-osconfig-agent.new.2275/google-osconfig-agent.changes
    2022-10-11 18:05:23.218069012 +0200
@@ -1,0 +2,8 @@
+Mon Oct 10 13:08:52 UTC 2022 - John Paul Adrian Glaubitz 
<adrian.glaub...@suse.com>
+
+- Update to version 20220829.00
+  * Fix exclude packages field processing (#440)
+- from version 20220824.00
+  * Check for exclusive patches. (#442)
+
+-------------------------------------------------------------------

Old:
----
  osconfig-20220801.00.tar.gz

New:
----
  osconfig-20220829.00.tar.gz

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

Other differences:
------------------
++++++ google-osconfig-agent.spec ++++++
--- /var/tmp/diff_new_pack.Y4gAuL/_old  2022-10-11 18:05:23.734069846 +0200
+++ /var/tmp/diff_new_pack.Y4gAuL/_new  2022-10-11 18:05:23.738069853 +0200
@@ -24,7 +24,7 @@
 %global import_path     %{provider_prefix}
 
 Name:           google-osconfig-agent
-Version:        20220801.00
+Version:        20220829.00
 Release:        0
 Summary:        Google Cloud Guest Agent
 License:        Apache-2.0

++++++ _service ++++++
--- /var/tmp/diff_new_pack.Y4gAuL/_old  2022-10-11 18:05:23.778069917 +0200
+++ /var/tmp/diff_new_pack.Y4gAuL/_new  2022-10-11 18:05:23.782069924 +0200
@@ -3,8 +3,8 @@
     <param name="url">https://github.com/GoogleCloudPlatform/osconfig</param>
     <param name="scm">git</param>
     <param name="exclude">.git</param>
-    <param name="versionformat">20220801.00</param>
-    <param name="revision">20220801.00</param>
+    <param name="versionformat">20220829.00</param>
+    <param name="revision">20220829.00</param>
     <param name="changesgenerate">enable</param>
   </service>
   <service name="recompress" mode="disabled">
@@ -15,7 +15,7 @@
     <param name="basename">osconfig</param>
   </service>
   <service name="go_modules" mode="disabled">
-    <param name="archive">osconfig-20220801.00.tar.gz</param>
+    <param name="archive">osconfig-20220829.00.tar.gz</param>
   </service>
 </services>
 

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.Y4gAuL/_old  2022-10-11 18:05:23.802069956 +0200
+++ /var/tmp/diff_new_pack.Y4gAuL/_new  2022-10-11 18:05:23.806069963 +0200
@@ -1,6 +1,6 @@
 <servicedata>
 <service name="tar_scm">
                 <param 
name="url">https://github.com/GoogleCloudPlatform/osconfig</param>
-              <param 
name="changesrevision">d4be26f6e2229ebd66d61a741cc4f4c2da0d8287</param></service></servicedata>
+              <param 
name="changesrevision">d29dee5600778aac20a266f6c97b3b4297d9bbca</param></service></servicedata>
 (No newline at EOF)
 

++++++ osconfig-20220801.00.tar.gz -> osconfig-20220829.00.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/osconfig-20220801.00/agentendpoint/patch_linux_test.go 
new/osconfig-20220829.00/agentendpoint/patch_linux_test.go
--- old/osconfig-20220801.00/agentendpoint/patch_linux_test.go  2022-08-01 
22:54:46.000000000 +0200
+++ new/osconfig-20220829.00/agentendpoint/patch_linux_test.go  2022-08-29 
16:08:52.000000000 +0200
@@ -17,28 +17,27 @@
 import (
        "reflect"
        "regexp"
+       "strings"
        "testing"
 
        "github.com/GoogleCloudPlatform/osconfig/ospatch"
 )
 
 func TestExcludeConversion(t *testing.T) {
-       strictString := "PackageName"
        regex, _ := regexp.Compile("PackageName")
        emptyRegex, _ := regexp.Compile("")
-       slashString := "/"
-       emptyString := ""
 
        tests := []struct {
                name  string
                input []string
                want  []*ospatch.Exclude
        }{
-               {name: "StrictStringConversion", input: 
[]string{"PackageName"}, want: 
[]*ospatch.Exclude{ospatch.CreateStringExclude(&strictString)}},
+               {name: "StrictStringConversion", input: 
[]string{"PackageName"}, want: CreateStringExcludes("PackageName")},
+               {name: "MultipleStringConversion", input: 
[]string{"PackageName1", "PackageName2"}, want: 
CreateStringExcludes("PackageName1", "PackageName2")},
                {name: "RegexConversion", input: []string{"/PackageName/"}, 
want: []*ospatch.Exclude{ospatch.CreateRegexExclude(regex)}},
                {name: "CornerCaseRegex", input: []string{"//"}, want: 
[]*ospatch.Exclude{ospatch.CreateRegexExclude(emptyRegex)}},
-               {name: "CornerCaseStrictString", input: []string{"/"}, want: 
[]*ospatch.Exclude{ospatch.CreateStringExclude(&slashString)}},
-               {name: "CornerCaseEmptyString", input: []string{""}, want: 
[]*ospatch.Exclude{ospatch.CreateStringExclude(&emptyString)}},
+               {name: "CornerCaseStrictString", input: []string{"/"}, want: 
CreateStringExcludes("/")},
+               {name: "CornerCaseEmptyString", input: []string{""}, want: 
CreateStringExcludes("")},
        }
 
        for _, tt := range tests {
@@ -48,8 +47,27 @@
                                t.Errorf("err = %v, want %v", err, nil)
                        }
                        if !reflect.DeepEqual(excludes, tt.want) {
-                               t.Errorf("convertInputToExcludes() = %v, want = 
%v", excludes, tt.want)
+                               t.Errorf("convertInputToExcludes() = %s, want = 
%s", toString(excludes), toString(tt.want))
                        }
                })
        }
 }
+
+func toString(excludes []*ospatch.Exclude) string {
+       results := make([]string, len(excludes))
+       for i, exc := range excludes {
+               results[i] = exc.String()
+       }
+
+       return strings.Join(results, ",")
+}
+
+func CreateStringExcludes(pkgs ...string) []*ospatch.Exclude {
+       excludes := make([]*ospatch.Exclude, len(pkgs))
+       for i := 0; i < len(pkgs); i++ {
+               pkg := pkgs[i]
+               excludes[i] = ospatch.CreateStringExclude(&pkg)
+       }
+
+       return excludes
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/osconfig-20220801.00/ospatch/exclude.go 
new/osconfig-20220829.00/ospatch/exclude.go
--- old/osconfig-20220801.00/ospatch/exclude.go 2022-08-01 22:54:46.000000000 
+0200
+++ new/osconfig-20220829.00/ospatch/exclude.go 2022-08-29 16:08:52.000000000 
+0200
@@ -15,6 +15,7 @@
 package ospatch
 
 import (
+       "fmt"
        "regexp"
 )
 
@@ -25,6 +26,10 @@
        strictString *string
 }
 
+func (exclude Exclude) String() string {
+       return fmt.Sprintf("{isRegexp: %t, regex: %+v, strictString: %s}", 
exclude.isRegexp, exclude.regex, *exclude.strictString)
+}
+
 // CreateRegexExclude returns new Exclude struct that represents exclusion 
with regex
 func CreateRegexExclude(regex *regexp.Regexp) *Exclude {
        return &Exclude{
@@ -35,9 +40,10 @@
 
 // CreateStringExclude returns new Exclude struct that represents exclusion 
with string
 func CreateStringExclude(strictString *string) *Exclude {
+       strictStringCopied := *strictString //copy the string for safety reason
        return &Exclude{
                isRegexp:     false,
-               strictString: strictString,
+               strictString: &strictStringCopied,
        }
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/osconfig-20220801.00/ospatch/updates_windows.go 
new/osconfig-20220829.00/ospatch/updates_windows.go
--- old/osconfig-20220801.00/ospatch/updates_windows.go 2022-08-01 
22:54:46.000000000 +0200
+++ new/osconfig-20220829.00/ospatch/updates_windows.go 2022-08-29 
16:08:52.000000000 +0200
@@ -189,7 +189,7 @@
        if err != nil {
                return nil, fmt.Errorf("GetWUAUpdateCollection error: %v", err)
        }
-       if len(classFilter) == 0 && len(kbExcludes) == 0 {
+       if len(classFilter) == 0 && len(kbExcludes) == 0 && 
len(exclusivePatches) == 0 {
                return updts, nil
        }
        defer updts.Release()

++++++ vendor.tar.gz ++++++

Reply via email to