Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package suseconnect-ng for openSUSE:Factory 
checked in at 2022-12-20 20:20:09
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/suseconnect-ng (Old)
 and      /work/SRC/openSUSE:Factory/.suseconnect-ng.new.1835 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "suseconnect-ng"

Tue Dec 20 20:20:09 2022 rev:17 rq:1043929 version:1.0.0~git14.17a7901

Changes:
--------
--- /work/SRC/openSUSE:Factory/suseconnect-ng/suseconnect-ng.changes    
2022-11-16 15:42:34.871661585 +0100
+++ /work/SRC/openSUSE:Factory/.suseconnect-ng.new.1835/suseconnect-ng.changes  
2022-12-20 20:20:53.662012208 +0100
@@ -1,0 +2,12 @@
+Tue Dec 13 12:57:16 UTC 2022 - tschm...@suse.com
+
+- Update to version 1.0.0~git14.17a7901:
+  * Don't write system_token to service credentials files
+  * Allow non-root users to use --version
+  * Add: ExcludeArch: %ix86 s390 ppc64 to the .spec file, so we skip builds 
for unsupported architectures.
+  * Update Dockerfile.yast
+  * Use openssl go for SLE and Leap 15.5+ builds
+  * Fix keepalive feature notice during installation
+  * Fix requires for all rhel clone distributions like alma, rocky...
+
+-------------------------------------------------------------------

Old:
----
  connect-ng-1.0.0~git0.faee7c196dc1.tar.xz

New:
----
  connect-ng-1.0.0~git14.17a7901.tar.xz

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

Other differences:
------------------
++++++ suseconnect-ng.spec ++++++
--- /var/tmp/diff_new_pack.PuPVjJ/_old  2022-12-20 20:20:54.110014663 +0100
+++ /var/tmp/diff_new_pack.PuPVjJ/_new  2022-12-20 20:20:54.114014685 +0100
@@ -23,7 +23,7 @@
 %bcond_with hwinfo
 
 Name:           suseconnect-ng
-Version:        1.0.0~git0.faee7c196dc1
+Version:        1.0.0~git14.17a7901
 Release:        0
 URL:            https://github.com/SUSE/connect-ng
 License:        LGPL-2.1-or-later
@@ -31,14 +31,23 @@
 Group:          System/Management
 Source:         connect-ng-%{version}.tar.xz
 Source1:        %name-rpmlintrc
-BuildRequires:  go >= 1.16
 BuildRequires:  golang-packaging
+# use FIPS compliant go version for SLE targets and Leap 15.5+ targets
+%if ( 0%{?is_opensuse} == 0 && 0%{?sle_version} ) || ( 0%{?is_opensuse} == 1 
&& 0%{?sle_version} >= 150500 )
+# temporary until BuildRequires: go-openssl >= 1.16 works
+BuildRequires:  go1.18-openssl
+%else
+BuildRequires:  go >= 1.16
+%endif
 BuildRequires:  ruby-devel
 BuildRequires:  zypper
+
 %if %{with hwinfo}
 %global test_hwinfo_args -test-hwinfo
+
+ExcludeArch:    %ix86 s390 ppc64
 # packages required only for hwinfo tests
-%ifarch %ix86 ia64 x86_64 %arm aarch64
+%ifarch ia64 x86_64 %arm aarch64
 BuildRequires:  dmidecode
 %endif
 %ifarch s390x
@@ -53,14 +62,14 @@
 Provides:       zypper-migration-plugin = 0.99
 Obsoletes:      zypper-search-packages-plugin < 0.99
 Provides:       zypper-search-packages-plugin = 0.99
-%if 0%{?fedora} || 0%{?rhel} || 0%{?centos_version}
-Requires:       ca-certificates
-%else
+%if 0%{?suse_version}
 Requires:       ca-certificates-mozilla
+%else
+Requires:       ca-certificates
 %endif
 Requires:       coreutils
 # ExclusiveArch from this package
-%ifarch %ix86 ia64 x86_64 %arm aarch64
+%ifarch ia64 x86_64 %arm aarch64
 Requires:       dmidecode
 %endif
 # ExclusiveArch from this package
@@ -69,7 +78,7 @@
 %endif
 Requires:       zypper
 # lscpu is only used on those
-%ifarch x86_64 aarch64
+%ifarch aarch64
 Requires:       util-linux
 %endif
 Recommends:     systemd
@@ -146,7 +155,7 @@
 # in pre blocks the old version is still installed. This way we can detect
 # if --keepalive was already present before
 kainfo=0
-helptext=$(SUSEConnect --help)
+helptext=$(test -x "$(type -p SUSEConnect)" && SUSEConnect --help)
 if [ $? -eq 0 ]; then
     echo "$helptext" | grep -q keepalive
     kainfo=$?

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.PuPVjJ/_old  2022-12-20 20:20:54.178015036 +0100
+++ /var/tmp/diff_new_pack.PuPVjJ/_new  2022-12-20 20:20:54.182015058 +0100
@@ -1,6 +1,6 @@
 <servicedata>
 <service name="tar_scm">
                 <param 
name="url">https://github.com/SUSE/connect-ng.git</param>
-              <param 
name="changesrevision">faee7c196dc1f8ccd3a703c6f9980b28893639b4</param></service></servicedata>
+              <param 
name="changesrevision">17a79019a857c17bd114523b699f2ba97da398a8</param></service></servicedata>
 (No newline at EOF)
 

++++++ connect-ng-1.0.0~git0.faee7c196dc1.tar.xz -> 
connect-ng-1.0.0~git14.17a7901.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/connect-ng-1.0.0~git0.faee7c196dc1/Dockerfile.yast 
new/connect-ng-1.0.0~git14.17a7901/Dockerfile.yast
--- old/connect-ng-1.0.0~git0.faee7c196dc1/Dockerfile.yast      2022-11-08 
14:03:58.000000000 +0100
+++ new/connect-ng-1.0.0~git14.17a7901/Dockerfile.yast  2022-12-13 
13:53:04.000000000 +0100
@@ -1,6 +1,6 @@
 FROM registry.opensuse.org/yast/head/containers/yast-ruby:latest
 
-RUN rm -r /usr/lib64/ruby/gems/*/gems/suse-connect-*
+RUN zypper rm -y suseconnect-ng libsuseconnect suseconnect-ruby-bindings
 
 # invalidate github cache
 ADD https://api.github.com/repos/yast/yast-registration/git/refs/heads/master 
version.json
@@ -10,6 +10,6 @@
 RUN git clone --depth 1 https://github.com/yast/yast-registration.git 
/yast-registration
 
 COPY out/libsuseconnect.so /usr/lib64
-COPY yast/lib /usr/lib64/ruby/vendor_ruby/2.7.0
+COPY yast/lib /usr/lib64/ruby/vendor_ruby/3.1.0
 CMD ["rake", "test:unit"]
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/connect-ng-1.0.0~git0.faee7c196dc1/internal/connect/credentials.go 
new/connect-ng-1.0.0~git14.17a7901/internal/connect/credentials.go
--- old/connect-ng-1.0.0~git0.faee7c196dc1/internal/connect/credentials.go      
2022-11-08 14:03:58.000000000 +0100
+++ new/connect-ng-1.0.0~git14.17a7901/internal/connect/credentials.go  
2022-12-13 13:53:04.000000000 +0100
@@ -111,7 +111,10 @@
                }
        }
        buf := bytes.Buffer{}
-       fmt.Fprintf(&buf, "username=%s\npassword=%s\nsystem_token=%s\n", 
c.Username, c.Password, c.SystemToken)
+       fmt.Fprintf(&buf, "username=%s\npassword=%s\n", c.Username, c.Password)
+       if c.SystemToken != "" {
+               fmt.Fprintf(&buf, "system_token=%s\n", c.SystemToken)
+       }
        return os.WriteFile(path, buf.Bytes(), 0600)
 }
 
@@ -137,7 +140,8 @@
                return err
        }
        path := serviceCredentialsFile(serviceName)
-       return CreateCredentials(c.Username, c.Password, c.SystemToken, path)
+       // the SystemToken is not written to service credential files
+       return CreateCredentials(c.Username, c.Password, "", path)
 }
 
 func removeSystemCredentials() error {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/connect-ng-1.0.0~git0.faee7c196dc1/internal/connect/credentials_test.go 
new/connect-ng-1.0.0~git14.17a7901/internal/connect/credentials_test.go
--- old/connect-ng-1.0.0~git0.faee7c196dc1/internal/connect/credentials_test.go 
2022-11-08 14:03:58.000000000 +0100
+++ new/connect-ng-1.0.0~git14.17a7901/internal/connect/credentials_test.go     
2022-12-13 13:53:04.000000000 +0100
@@ -66,6 +66,19 @@
        }
 }
 
+func TestWriteCredentialsEmptyToken(t *testing.T) {
+       CFG.FsRoot = t.TempDir()
+       if err := writeSystemCredentials("user1", "pass1", ""); err != nil {
+               t.Fatalf("Unexpected error: %s", err)
+       }
+       expected := "username=user1\npassword=pass1\n"
+       contents, _ := os.ReadFile(systemCredentialsFile())
+       got := string(contents)
+       if got != expected {
+               t.Errorf("Expected %#v, got %#v", expected, got)
+       }
+}
+
 func TestWriteReadDeleteService(t *testing.T) {
        CFG.FsRoot = t.TempDir()
        if err := writeSystemCredentials("user1", "pass1", "1234"); err != nil {
@@ -79,8 +92,8 @@
        if err != nil {
                t.Fatalf("Unexpected error: %s", err)
        }
-       if rc.Username != "user1" || rc.Password != "pass1" || rc.SystemToken 
!= "1234" {
-               t.Errorf("Got: %s and %s, expected user1 and pass1", 
rc.Username, rc.Password)
+       if rc.Username != "user1" || rc.Password != "pass1" || rc.SystemToken 
!= "" {
+               t.Errorf("Got: %s, %s, %s. Expected user1, pass1, \"\"", 
rc.Username, rc.Password, rc.SystemToken)
        }
        if err := removeServiceCredentials("service1"); err != nil {
                t.Errorf("Unexpected error: %s", err)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/connect-ng-1.0.0~git0.faee7c196dc1/suseconnect/suseconnect.go 
new/connect-ng-1.0.0~git14.17a7901/suseconnect/suseconnect.go
--- old/connect-ng-1.0.0~git0.faee7c196dc1/suseconnect/suseconnect.go   
2022-11-08 14:03:58.000000000 +0100
+++ new/connect-ng-1.0.0~git14.17a7901/suseconnect/suseconnect.go       
2022-12-13 13:53:04.000000000 +0100
@@ -85,6 +85,10 @@
        flag.StringVar(&email, "e", "", "")
 
        flag.Parse()
+       if version {
+               fmt.Println(connect.GetShortenedVersion())
+               os.Exit(0)
+       }
        if os.Geteuid() != 0 {
                fmt.Fprintln(os.Stderr, "Root privileges are required to 
register products and change software repositories.")
                os.Exit(1)
@@ -162,9 +166,6 @@
        } else if rollback {
                err := connect.Rollback()
                exitOnError(err)
-       } else if version {
-               fmt.Println(connect.GetShortenedVersion())
-               os.Exit(0)
        } else {
                if instanceDataFile != "" && connect.URLDefault() {
                        fmt.Print("Please use --instance-data only in 
combination ")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/connect-ng-1.0.0~git0.faee7c196dc1/suseconnect-ng.spec 
new/connect-ng-1.0.0~git14.17a7901/suseconnect-ng.spec
--- old/connect-ng-1.0.0~git0.faee7c196dc1/suseconnect-ng.spec  2022-11-08 
14:03:58.000000000 +0100
+++ new/connect-ng-1.0.0~git14.17a7901/suseconnect-ng.spec      2022-12-13 
13:53:04.000000000 +0100
@@ -31,13 +31,22 @@
 Source:         connect-ng-%{version}.tar.xz
 Source1:        %name-rpmlintrc
 BuildRequires:  golang-packaging
+# use FIPS compliant go version for SLE targets and Leap 15.5+ targets
+%if ( 0%{?is_opensuse} == 0 && 0%{?sle_version} ) || ( 0%{?is_opensuse} == 1 
&& 0%{?sle_version} >= 150500 )
+# temporary until BuildRequires: go-openssl >= 1.16 works
+BuildRequires:  go1.18-openssl
+%else
 BuildRequires:  go >= 1.16
+%endif
 BuildRequires:  zypper
 BuildRequires:  ruby-devel
+
 %if %{with hwinfo}
 %global test_hwinfo_args -test-hwinfo
+
+ExcludeArch: %ix86 s390 ppc64
 # packages required only for hwinfo tests
-%ifarch %ix86 ia64 x86_64 %arm aarch64
+%ifarch ia64 x86_64 %arm aarch64
 BuildRequires:  dmidecode
 %endif
 %ifarch s390x
@@ -46,20 +55,21 @@
 BuildRequires:  systemd
 %endif
 
+
 Obsoletes:      SUSEConnect < 1.0.0
 Provides:       SUSEConnect = 1.0.0
 Obsoletes:      zypper-migration-plugin < 0.99
 Provides:       zypper-migration-plugin = 0.99
 Obsoletes:      zypper-search-packages-plugin < 0.99
 Provides:       zypper-search-packages-plugin = 0.99
-%if 0%{?fedora} || 0%{?rhel} || 0%{?centos_version}
-Requires:       ca-certificates
-%else
+%if 0%{?suse_version}
 Requires:       ca-certificates-mozilla
+%else
+Requires:       ca-certificates
 %endif
 Requires:       coreutils
 # ExclusiveArch from this package
-%ifarch %ix86 ia64 x86_64 %arm aarch64
+%ifarch ia64 x86_64 %arm aarch64
 Requires:       dmidecode
 %endif
 # ExclusiveArch from this package
@@ -68,7 +78,7 @@
 %endif
 Requires:       zypper
 # lscpu is only used on those
-%ifarch x86_64 aarch64
+%ifarch aarch64
 Requires:       util-linux
 %endif
 Recommends:     systemd
@@ -143,7 +153,7 @@
 # in pre blocks the old version is still installed. This way we can detect
 # if --keepalive was already present before
 kainfo=0
-helptext=$(SUSEConnect --help)
+helptext=$(test -x "$(type -p SUSEConnect)" && SUSEConnect --help)
 if [ $? -eq 0 ]; then
     echo "$helptext" | grep -q keepalive
     kainfo=$?

Reply via email to