Hello community, here is the log from the commit of package SUSEConnect for openSUSE:Factory checked in at 2018-11-12 09:36:40 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/SUSEConnect (Old) and /work/SRC/openSUSE:Factory/.SUSEConnect.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "SUSEConnect" Mon Nov 12 09:36:40 2018 rev:15 rq:647590 version:0.3.14 Changes: -------- --- /work/SRC/openSUSE:Factory/SUSEConnect/SUSEConnect.changes 2018-09-26 15:59:26.368700461 +0200 +++ /work/SRC/openSUSE:Factory/.SUSEConnect.new/SUSEConnect.changes 2018-11-12 09:36:42.625595454 +0100 @@ -1,0 +2,25 @@ +Fri Nov 9 13:06:50 UTC 2018 - [email protected] + +- Output proper message when SUSEConnect is called without parameters (bsc#959561) +- Default to https URI when no protocol prefix is provided for --url +- Support transactional-update systems (fate#326482) + +------------------------------------------------------------------- +Tue Oct 23 15:52:51 UTC 2018 - [email protected] + +- Changed "openssl" recommendation to "openssl(cli)" + on SLE 12 SP3+ and SLE 15+ (bsc#1101470). + +------------------------------------------------------------------- +Mon Oct 22 15:59:04 UTC 2018 - [email protected] + +- Update to 0.3.14 + - Fix s390 activation fails due to unavailable 'dmidecode' bsc#1112702 + +------------------------------------------------------------------- +Fri Sep 28 15:41:23 UTC 2018 - [email protected] + +- Update to 0.3.13 + - Fix migration targets sorting (bsc#1104183) + +------------------------------------------------------------------- Old: ---- suse-connect-0.3.12.gem New: ---- suse-connect-0.3.14.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ SUSEConnect.spec ++++++ --- /var/tmp/diff_new_pack.KQpXm2/_old 2018-11-12 09:36:46.933589236 +0100 +++ /var/tmp/diff_new_pack.KQpXm2/_new 2018-11-12 09:36:46.933589236 +0100 @@ -17,7 +17,7 @@ Name: SUSEConnect -Version: 0.3.12 +Version: 0.3.14 Release: 0 %define mod_name suse-connect %define mod_full_name %{mod_name}-%{version} @@ -39,7 +39,12 @@ Recommends: gawk Recommends: gpg2 Recommends: grep +# Allows for installing openssl 1.0 without needing to remove SUSEConnect. See bsc#1101470. +%if 0%{?sle_version} < 120200 Recommends: openssl +%else +Recommends: openssl(cli) +%endif Recommends: sed Recommends: curl Requires: zypper(auto-agree-with-product-licenses) ++++++ SUSEConnect.5 ++++++ --- /var/tmp/diff_new_pack.KQpXm2/_old 2018-11-12 09:36:46.953589207 +0100 +++ /var/tmp/diff_new_pack.KQpXm2/_new 2018-11-12 09:36:46.953589207 +0100 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "SUSECONNECT" "5" "April 2017" "" "SUSEConnect" +.TH "SUSECONNECT" "5" "February 2017" "" "SUSEConnect" . .SH "NAME" \fBSUSEConnect\fR \- SUSE Customer Center registration tool config file ++++++ SUSEConnect.8 ++++++ --- /var/tmp/diff_new_pack.KQpXm2/_old 2018-11-12 09:36:46.969589184 +0100 +++ /var/tmp/diff_new_pack.KQpXm2/_new 2018-11-12 09:36:46.969589184 +0100 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "SUSECONNECT" "8" "June 2017" "" "SUSEConnect" +.TH "SUSECONNECT" "8" "May 2017" "" "SUSEConnect" . .SH "NAME" \fBSUSEConnect\fR \- SUSE Customer Center registration tool ++++++ suse-connect-0.3.12.gem -> suse-connect-0.3.14.gem ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/README.md new/README.md --- old/README.md 2018-09-14 12:15:18.000000000 +0200 +++ new/README.md 2018-11-09 14:18:48.000000000 +0100 @@ -58,7 +58,7 @@ Run RSpec -* `docker run --privileged --rm -t connect.12sp0 su nobody -c rspec` +* `docker run --privileged --rm -t connect.12sp0 rspec` Run Cucumber @@ -66,8 +66,8 @@ Run Rubocop -* `docker run --privileged --rm -t connect.12sp0 su nobody -c rubocop` +* `docker run --privileged --rm -t connect.12sp0 rubocop` -Or run whole set of tests together +Run integration tests & cucumber -* `docker run --privileged --rm -t connect.12sp0 sh docker/runall.sh` +* `docker run --privileged --rm -t connect.12sp0 sh docker/integration.sh` Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/suse/connect/api.rb new/lib/suse/connect/api.rb --- old/lib/suse/connect/api.rb 2018-09-14 12:15:18.000000000 +0200 +++ new/lib/suse/connect/api.rb 2018-11-09 14:18:48.000000000 +0100 @@ -12,6 +12,7 @@ class Api # Set desired API version and forward it in accept headers (see connection.rb#json_request) VERSION = 'v4' + PRODUCT_NOT_INSTALLED_INDEX = 9000 # Returns a new instance of SUSE::Connect::Api # @@ -220,7 +221,18 @@ online: '/connect/systems/products/migrations', offline: '/connect/systems/products/offline_migrations' } - @connection.post(endpoints.fetch(kind), auth: auth, params: payload) + result = @connection.post(endpoints.fetch(kind), auth: auth, params: payload) + # sort migration targets by product and version + if result.body.is_a?(Array) + products_list = products.sort_by! { |product| product.isbase ? 0 : 1 }.map(&:identifier).uniq + result.body.sort_by! do |suggested_products| + [ + products_list.index(suggested_products[0]['identifier']) || PRODUCT_NOT_INSTALLED_INDEX, + -suggested_products[0]['version'].to_f + ] + end + end + result end # List available Installer-Updates repositories for the given product diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/suse/connect/cli.rb new/lib/suse/connect/cli.rb --- old/lib/suse/connect/cli.rb 2018-09-14 12:15:18.000000000 +0200 +++ new/lib/suse/connect/cli.rb 2018-11-09 14:18:48.000000000 +0100 @@ -37,13 +37,13 @@ end else if @config.instance_data_file && @config.url_default? - log.error 'Please use --instance-data only in combination with --url pointing to your SMT server' + log.error 'Please use --instance-data only in combination with --url pointing to your RMT or SMT server' exit(1) elsif @config.token && @config.instance_data_file log.error 'Please use either --regcode or --instance-data' exit(1) elsif @config.url_default? && [email protected] && !status.activated_base_product? - log.error 'Please register your system using the --regcode parameter, or provide the --url parameter to register against SMT.' + puts @opts exit(1) else Client.new(@config).register! diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/suse/connect/connection.rb new/lib/suse/connect/connection.rb --- old/lib/suse/connect/connection.rb 2018-09-14 12:15:18.000000000 +0200 +++ new/lib/suse/connect/connection.rb 2018-11-09 14:18:48.000000000 +0100 @@ -19,6 +19,7 @@ attr_accessor :debug, :http, :auth, :language def initialize(endpoint, language: nil, insecure: false, debug: false, verify_callback: nil) + endpoint = prefix_protocol(endpoint) uri = URI.parse(endpoint) http = Net::HTTP.new(uri.host, uri.port) if http.proxy? @@ -55,6 +56,14 @@ private + def prefix_protocol(endpoint) + if endpoint[%r{^(http|https):\/\/}] + endpoint + else + "https://#{endpoint}" + end + end + def json_request(method, path, params = {}) request = VERB_TO_CLASS[method].new(path) add_headers(request) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/suse/connect/hwinfo/base.rb new/lib/suse/connect/hwinfo/base.rb --- old/lib/suse/connect/hwinfo/base.rb 2018-09-14 12:15:18.000000000 +0200 +++ new/lib/suse/connect/hwinfo/base.rb 2018-11-09 14:18:48.000000000 +0100 @@ -48,7 +48,7 @@ matches = execute('dmidecode -t system', false).match(regex).to_a[2..4].to_a.compact return nil unless matches.length == 1 matches[0].capitalize - rescue SUSE::Connect::SystemCallError + rescue SUSE::Connect::SystemCallError, Errno::ENOENT nil end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/suse/connect/product.rb new/lib/suse/connect/product.rb --- old/lib/suse/connect/product.rb 2018-09-14 12:15:18.000000000 +0200 +++ new/lib/suse/connect/product.rb 2018-11-09 14:18:48.000000000 +0100 @@ -12,6 +12,7 @@ product.version = old_product.version product.arch = old_product.arch product.release_type = old_product.release_type + product.isbase = !!product.isbase product end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/suse/connect/remote/product.rb new/lib/suse/connect/remote/product.rb --- old/lib/suse/connect/remote/product.rb 2018-09-14 12:15:18.000000000 +0200 +++ new/lib/suse/connect/remote/product.rb 2018-11-09 14:18:48.000000000 +0100 @@ -13,6 +13,7 @@ super # TODO: ensure we have array here self.extensions = extensions.map { |ext| self.class.new(ext) } if extensions + self.isbase ||= (product_hash['product_type'] == 'base') end def to_params diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/suse/connect/status.rb new/lib/suse/connect/status.rb --- old/lib/suse/connect/status.rb 2018-09-14 12:15:18.000000000 +0200 +++ new/lib/suse/connect/status.rb 2018-11-09 14:18:48.000000000 +0100 @@ -36,6 +36,7 @@ end def print_extensions_list + @binary = root_fs_writable? ? 'SUSEConnect' : 'transactional-update register' puts render('extensions_list.text') end @@ -81,6 +82,10 @@ "#{product.identifier}/#{product.version}/#{product.arch}" end + def root_fs_writable? + system('test -w /') + end + def text_product_status file = File.read File.join(File.dirname(__FILE__), 'templates/product_statuses.text.erb') template = ERB.new(file, 0, '-<>') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/suse/connect/templates/extension_item.text.erb new/lib/suse/connect/templates/extension_item.text.erb --- old/lib/suse/connect/templates/extension_item.text.erb 2018-09-14 12:15:18.000000000 +0200 +++ new/lib/suse/connect/templates/extension_item.text.erb 2018-11-09 14:18:48.000000000 +0100 @@ -1,11 +1,11 @@ <%= indent(level) %>\e[1m<%= extension[:name] %>\e[0m<% if extension[:installed] %> \e[32m(Installed)\e[0m -<%= indent(level) %>Deactivate with: SUSEConnect \e[31m-d\e[0m -p <%= extension[:activation_code] %><% +<%= indent(level) %>Deactivate with: <%= @binary %> \e[31m-d\e[0m -p <%= extension[:activation_code] %><% else %><% if extension[:activated] %> \e[33m(Activated)\e[0m<% end %> -<%= indent(level) %>Activate with: SUSEConnect<%= ' ' if any_installed %> -p <%= extension[:activation_code] %><% unless extension[:free] %> -r \e[32m\e[1mADDITIONAL REGCODE\e[0m<% +<%= indent(level) %>Activate with: <%= @binary %><%= ' ' if any_installed %> -p <%= extension[:activation_code] %><% unless extension[:free] %> -r \e[32m\e[1mADDITIONAL REGCODE\e[0m<% end %><% end %> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/suse/connect/version.rb new/lib/suse/connect/version.rb --- old/lib/suse/connect/version.rb 2018-09-14 12:15:18.000000000 +0200 +++ new/lib/suse/connect/version.rb 2018-11-09 14:18:48.000000000 +0100 @@ -1,5 +1,5 @@ module SUSE module Connect - VERSION = '0.3.12' + VERSION = '0.3.14' end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2018-09-14 12:15:18.000000000 +0200 +++ new/metadata 2018-11-09 14:18:48.000000000 +0100 @@ -1,14 +1,14 @@ --- !ruby/object:Gem::Specification name: suse-connect version: !ruby/object:Gem::Version - version: 0.3.12 + version: 0.3.14 platform: ruby authors: - SUSE Customer Center Team autorequire: bindir: bin cert_chain: [] -date: 2018-09-14 00:00:00.000000000 Z +date: 2018-11-09 00:00:00.000000000 Z dependencies: [] description: This package provides a command line tool and rubygem library for connecting a client system to the SUSE Customer Center. It will connect the system to your @@ -86,7 +86,7 @@ version: '0' requirements: [] rubyforge_project: -rubygems_version: 2.6.13 +rubygems_version: 2.7.3 signing_key: specification_version: 4 summary: SUSE Connect utility to register a system with the SUSE Customer Center
