[yast-commit] [ci_new_pac] JFYI yast2-registration -> sle12
Script 'mail_helper' called by ro Hello packager, This is just FYI. Your package was checked in in distribution "sle12" by autobuild-member: ro. Here comes the log... ---------------------------%<------------------------------ Hi, here is the log from ci_new_pac /mounts/work_src_done/SLE12/yast2-registration -> sle12 ## BNC# 882039 : "[UPGRADE] Upgrade process modifies data on installed system and does not restore them" (ASSIGNED/) ## BNC# 885506 : "Error add-on product during upgrade (build 506)" (NEEDINFO/) ## BNC# 888158 : "Replace "Email" with "E-mail address"" (NEW/) ## BNC# 886850 : "internal error when failed SSL certificate does not include "Organization (O)" attribute" (RESOLVED/FIXED) Changes: -------- --- /work/SRC/SUSE:SLE-12:GA/yast2-registration/yast2-registration.changes 2014-07-10 16:39:21.000000000 +0200 +++ /mounts/work_src_done/SLE12/yast2-registration/yast2-registration.changes 2014-07-23 13:12:06.000000000 +0200 @@ -1,0 +2,11 @@ +Tue Jul 22 15:45:44 UTC 2014 - lslezak@suse.cz + +- do not cache the base product upgrade, always do the upgrade + (bnc#882039) +- fixed error code handling, display an additional hint when + upgrade from SLE11 fails (bnc#885506) +- use "E-mail Address" label (bnc#888158) +- handle missing SSL certificate attributes (bnc#886850) +- 3.1.91 + +------------------------------------------------------------------- calling whatdependson for sle12-i586 Packages directly triggered for rebuild: - yast2-registration ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/SUSE:SLE-12:GA/yast2-registration (Old) and /mounts/work_src_done/SLE12/yast2-registration (BS:build ID:41681 MAIL:yast-commit@opensuse.org) (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "yast2-registration", Maintainer is "yast-commit@opensuse.org" Old: ---- yast2-registration-3.1.90.tar.bz2 New: ---- yast2-registration-3.1.91.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-registration.spec ++++++ --- /var/tmp/diff_new_pack.NVsp1w/_old 2014-07-23 16:45:53.000000000 +0200 +++ /var/tmp/diff_new_pack.NVsp1w/_new 2014-07-23 16:45:53.000000000 +0200 @@ -17,7 +17,7 @@ Name: yast2-registration -Version: 3.1.90 +Version: 3.1.91 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build ++++++ yast2-registration-3.1.90.tar.bz2 -> yast2-registration-3.1.91.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-3.1.90/package/yast2-registration.changes new/yast2-registration-3.1.91/package/yast2-registration.changes --- old/yast2-registration-3.1.90/package/yast2-registration.changes 2014-07-10 15:37:28.000000000 +0200 +++ new/yast2-registration-3.1.91/package/yast2-registration.changes 2014-07-23 13:08:50.000000000 +0200 @@ -1,4 +1,15 @@ ------------------------------------------------------------------- +Tue Jul 22 15:45:44 UTC 2014 - lslezak@suse.cz + +- do not cache the base product upgrade, always do the upgrade + (bnc#882039) +- fixed error code handling, display an additional hint when + upgrade from SLE11 fails (bnc#885506) +- use "E-mail Address" label (bnc#888158) +- handle missing SSL certificate attributes (bnc#886850) +- 3.1.91 + +------------------------------------------------------------------- Thu Jul 10 07:21:36 UTC 2014 - lslezak@suse.cz - skip SLP discovery if SMT is used, use the URL from config file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-3.1.90/package/yast2-registration.spec new/yast2-registration-3.1.91/package/yast2-registration.spec --- old/yast2-registration-3.1.90/package/yast2-registration.spec 2014-07-10 15:37:28.000000000 +0200 +++ new/yast2-registration-3.1.91/package/yast2-registration.spec 2014-07-23 13:08:50.000000000 +0200 @@ -17,7 +17,7 @@ Name: yast2-registration -Version: 3.1.90 +Version: 3.1.91 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-3.1.90/src/clients/inst_scc.rb new/yast2-registration-3.1.91/src/clients/inst_scc.rb --- old/yast2-registration-3.1.90/src/clients/inst_scc.rb 2014-07-10 15:37:28.000000000 +0200 +++ new/yast2-registration-3.1.91/src/clients/inst_scc.rb 2014-07-23 13:08:50.000000000 +0200 @@ -187,6 +187,7 @@ end if ret == :skip && confirm_skipping + log.info "Skipping registration on user request" @registration_skipped = true return ret end @@ -196,12 +197,9 @@ end def refresh_base_product - options = ::Registration::Storage::InstallationOptions.instance - return true if options.base_registered - init_registration - upgraded = ::Registration::SccHelpers.catch_registration_errors do + upgraded = ::Registration::SccHelpers.catch_registration_errors(show_update_hint: true) do # then register the product(s) base_product = ::Registration::SwMgmt.base_product_to_register product_services = Popup.Feedback( @@ -213,8 +211,6 @@ @registration.upgrade_product(base_product) end - options.base_registered = true - # select repositories to use in installation (e.g. enable/disable Updates) select_repositories(product_services) end @@ -293,7 +289,7 @@ # label text describing the registration (1/2) # use \n to split to more lines if needed (use max. 76 chars/line) info = _("Please enter a registration or evaluation code for this product and your\n" + - "User Name/EMail from the SUSE Customer Center in the fields below.\n" + + "User Name/E-mail address from the SUSE Customer Center in the fields below.\n" + "Access to security and general software updates is only possible on\n" + "a registered system.") @@ -327,7 +323,7 @@ VSpacing(UI.TextMode ? 1 : 2), HSquash( VBox( - MinWidth(REG_CODE_WIDTH, InputField(Id(:email), _("&Email"), options.email)), + MinWidth(REG_CODE_WIDTH, InputField(Id(:email), _("&E-mail Address"), options.email)), VSpacing(0.5), MinWidth(REG_CODE_WIDTH, InputField(Id(:reg_code), _("Registration &Code"), options.reg_code)) ) @@ -512,7 +508,7 @@ init_registration product_succeed = registration_order.map do |product| - ::Registration::SccHelpers.catch_registration_errors("#{product.label}\n") do + ::Registration::SccHelpers.catch_registration_errors(message_prefix: "#{product.label}\n") do product_service = Popup.Feedback( _(CONTACTING_MESSAGE), # %s is name of given product diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-3.1.90/src/lib/registration/connect_helpers.rb new/yast2-registration-3.1.91/src/lib/registration/connect_helpers.rb --- old/yast2-registration-3.1.90/src/lib/registration/connect_helpers.rb 2014-07-10 15:37:29.000000000 +0200 +++ new/yast2-registration-3.1.91/src/lib/registration/connect_helpers.rb 2014-07-23 13:08:50.000000000 +0200 @@ -49,8 +49,10 @@ Yast.import "Popup" Yast.import "Report" - # @param prefix[String] Prefix before error like affected product or addon - def self.catch_registration_errors(prefix = "", &block) + # @param message_prefix [String] Prefix before error like affected product or addon + # @param show_update_hint [Boolean] true if an extra hint for registration update + # should be displayed + def self.catch_registration_errors(message_prefix: "", show_update_hint: false, &block) begin # reset the previous SSL errors Storage::SSLErrors.instance.reset @@ -77,17 +79,42 @@ Yast::Report.Error(_("Connection time out.")) false rescue SUSE::Connect::ApiError => e - log.error "Received error: #{e.code}: #{e.response.body}" - case e.response - when Net::HTTPUnauthorized, Net::HTTPUnprocessableEntity + log.error "Received error: #{e.response.inspect}" + case e.code + when 401 + if show_update_hint + # TRANSLATORS: additional hint for an error message + msg = _("Check that this system is known to the registration server.") + + # probably missing NCC->SCC sync, display a hint unless SMT is used + if Helpers.registration_url.nil? + msg += "\n\n" + # TRANSLATORS: additional hint for an error message + msg += _("If you are upgrading from SLE11 make sure the SCC server\n" \ + "knows the old NCC registration. Synchronization from NCC to SCC\n" \ + "might take very long time.\n\n" \ + "If the SLE11 system was installed recently you could log into\n" \ + "%s to speed up the synchronization process.\n" \ + "Just wait several minutes after logging in and then retry \n" \ + "the upgrade again.") % \ + SUSE::Connect::Client::DEFAULT_URL + end + + # add the hint to the error details + e.message << "\n\n\n" + msg + report_error(message_prefix + _("Registration failed."), e) + else + report_error(message_prefix + _("The email address is not known or\nthe registration code is not valid."), e) + end + when 422 # Error popup - report_error(prefix + _("The email address is not known or\nthe registration code is not valid."), e) - when Net::HTTPClientError - report_error(prefix + _("Registration client error."), e) - when Net::HTTPServerError - report_error(prefix + _("Registration server error.\nRetry registration later."), e) + report_error(message_prefix + _("The email address is not known or\nthe registration code is not valid."), e) + when 400..499 + report_error(message_prefix + _("Registration client error."), e) + when 500..599 + report_error(message_prefix + _("Registration server error.\nRetry registration later."), e) else - report_error(prefix + _("Registration failed."), e) + report_error(message_prefix + _("Registration failed."), e) end false rescue ::Registration::ServiceError => e @@ -175,12 +202,13 @@ end def self.cert_name_details(x509_name) + details = [] # label followed by the SSL certificate identification - details = [ INDENT + _("Common Name (CN): ") + Helpers.find_name_attribute(x509_name, "CN") ] + details << INDENT + _("Common Name (CN): ") + (Helpers.find_name_attribute(x509_name, "CN") || "") # label followed by the SSL certificate identification - details << INDENT + _("Organization (O): ") + Helpers.find_name_attribute(x509_name, "O") + details << INDENT + _("Organization (O): ") + (Helpers.find_name_attribute(x509_name, "O") || "") # label followed by the SSL certificate identification - details << INDENT + _("Organization Unit (OU): ") + Helpers.find_name_attribute(x509_name, "OU") + details << INDENT + _("Organization Unit (OU): ") + (Helpers.find_name_attribute(x509_name, "OU") || "") end def self.import_ssl_certificate(cert) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-3.1.90/src/lib/registration/sw_mgmt.rb new/yast2-registration-3.1.91/src/lib/registration/sw_mgmt.rb --- old/yast2-registration-3.1.90/src/lib/registration/sw_mgmt.rb 2014-07-10 15:37:29.000000000 +0200 +++ new/yast2-registration-3.1.91/src/lib/registration/sw_mgmt.rb 2014-07-23 13:08:50.000000000 +0200 @@ -271,12 +271,19 @@ log.info "Copying the old NCC credentials from previous installation" log.info "Copying #{ncc_file} to #{new_file}" ::FileUtils.cp(ncc_file, new_file) + + credentials = SUSE::Connect::Credentials.read(new_file) + # note: SUSE::Connect::Credentials override #to_s, the password is filtered out + log.info "Using previous NCC credentials: #{credentials.inspect}" end if File.exist?(scc_file) log.info "Copying the old SCC credentials from previous installation" log.info "Copying #{scc_file} to #{new_file}" ::FileUtils.cp(scc_file, new_file) + credentials = SUSE::Connect::Credentials.read(new_file) + # note: SUSE::Connect::Credentials override #to_s, the password is filtered out + log.info "Using previous SCC credentials: #{credentials.inspect}" end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-3.1.90/src/lib/registration/ui/import_certificate_dialog.rb new/yast2-registration-3.1.91/src/lib/registration/ui/import_certificate_dialog.rb --- old/yast2-registration-3.1.90/src/lib/registration/ui/import_certificate_dialog.rb 2014-07-10 15:37:29.000000000 +0200 +++ new/yast2-registration-3.1.91/src/lib/registration/ui/import_certificate_dialog.rb 2014-07-23 13:08:50.000000000 +0200 @@ -23,6 +23,8 @@ # @note the text messages need to be translated at runtime via _() call OPENSSL_ERROR_MESSAGES = { # SSL error message + 10 => N_("Certificate has expired"), + # SSL error message 18 => N_("Self signed certificate"), # SSL error message 19 => N_("Self signed certificate in certificate chain") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-3.1.90/test/helpers_spec.rb new/yast2-registration-3.1.91/test/helpers_spec.rb --- old/yast2-registration-3.1.90/test/helpers_spec.rb 2014-07-10 15:37:29.000000000 +0200 +++ new/yast2-registration-3.1.91/test/helpers_spec.rb 2014-07-23 13:08:50.000000000 +0200 @@ -66,16 +66,25 @@ context "at installed system" do before do allow(yast_mode).to receive(:mode).and_return("normal") - - # FIXME: stub SLP service discovery, later add config file reading - expect(yast_wfm).to receive(:call).with("discover_registration_services").and_return(nil) + allow(yast_wfm).to receive(:call).with("discover_registration_services").and_return(nil) end it "ignores Linuxrc boot parameters" do # must not ask Linuxrc at all expect(yast_linuxrc).to receive(:InstallInf).never + # stub config file reading + expect_any_instance_of(SUSE::Connect::Config).to receive(:url) expect(Registration::Helpers.registration_url).to be_nil end + + it "reads the URL from config file if present" do + # must not ask Linuxrc at all + expect(yast_linuxrc).to receive(:InstallInf).never + # stub config file reading + url = "https://example.com" + expect_any_instance_of(SUSE::Connect::Config).to receive(:url).twice.and_return(url) + expect(Registration::Helpers.registration_url).to eq(url) + end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-3.1.90/test/sw_mgmt_spec.rb new/yast2-registration-3.1.91/test/sw_mgmt_spec.rb --- old/yast2-registration-3.1.90/test/sw_mgmt_spec.rb 2014-07-10 15:37:29.000000000 +0200 +++ new/yast2-registration-3.1.91/test/sw_mgmt_spec.rb 2014-07-23 13:08:50.000000000 +0200 @@ -157,6 +157,7 @@ expect(FileUtils).to receive(:cp).with(File.join(root_dir, target_dir, "NCCcredentials"), File.join(target_dir, "SCCcredentials")) + expect(SUSE::Connect::Credentials).to receive(:read) expect { Registration::SwMgmt.copy_old_credentials(root_dir) }.to_not raise_error end @@ -167,6 +168,7 @@ expect(FileUtils).to receive(:cp).with(File.join(root_dir, target_dir, "SCCcredentials"), File.join(target_dir, "SCCcredentials")) + expect(SUSE::Connect::Credentials).to receive(:read) expect { Registration::SwMgmt.copy_old_credentials(root_dir) }.to_not raise_error end continue with "q"... Checked in at Wed Jul 23 16:46:32 CEST 2014 by ro Remember to have fun... -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
ro