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# 870787 : "SCC registration fails" (RESOLVED/DUPLICATE)
Changes:
--------
--- /work/SRC/SUSE:SLE-12:GA/yast2-registration/yast2-registration.changes 2014-03-28 12:01:38.000000000 +0100
+++ /mounts/work_src_done/SLE12/yast2-registration/yast2-registration.changes 2014-03-31 16:36:45.000000000 +0200
@@ -1,0 +2,16 @@
+Mon Mar 31 13:46:00 UTC 2014 - lslezak(a)suse.cz
+
+- fixes/enhancements:
+ - do not ask for credentials when the system is already
+ registered (avoid re-registration when going back)
+ - display details when registration fails
+ - register only the base product (add-ons use a different reg.
+ key, important in running system)
+- 3.1.25
+
+-------------------------------------------------------------------
+Fri Mar 28 10:39:38 UTC 2014 - lslezak(a)suse.cz
+
+- better error message for failed registration (bnc#870787#c2)
+
+-------------------------------------------------------------------
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:35269 MAIL:yast-commit@opensuse.org) (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-registration", Maintainer is "yast-commit(a)opensuse.org"
Old:
----
yast2-registration-3.1.24.tar.bz2
New:
----
yast2-registration-3.1.25.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-registration.spec ++++++
--- /var/tmp/diff_new_pack.V9dO69/_old 2014-03-31 17:22:56.000000000 +0200
+++ /var/tmp/diff_new_pack.V9dO69/_new 2014-03-31 17:22:56.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-registration
-Version: 3.1.24
+Version: 3.1.25
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
++++++ yast2-registration-3.1.24.tar.bz2 -> yast2-registration-3.1.25.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-3.1.24/package/yast2-registration.changes new/yast2-registration-3.1.25/package/yast2-registration.changes
--- old/yast2-registration-3.1.24/package/yast2-registration.changes 2014-03-28 11:34:37.000000000 +0100
+++ new/yast2-registration-3.1.25/package/yast2-registration.changes 2014-03-31 16:33:23.000000000 +0200
@@ -1,4 +1,20 @@
-------------------------------------------------------------------
+Mon Mar 31 13:46:00 UTC 2014 - lslezak(a)suse.cz
+
+- fixes/enhancements:
+ - do not ask for credentials when the system is already
+ registered (avoid re-registration when going back)
+ - display details when registration fails
+ - register only the base product (add-ons use a different reg.
+ key, important in running system)
+- 3.1.25
+
+-------------------------------------------------------------------
+Fri Mar 28 10:39:38 UTC 2014 - lslezak(a)suse.cz
+
+- better error message for failed registration (bnc#870787#c2)
+
+-------------------------------------------------------------------
Fri Mar 28 08:20:17 UTC 2014 - mfilka(a)suse.com
- bnc#870622
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-3.1.24/package/yast2-registration.spec new/yast2-registration-3.1.25/package/yast2-registration.spec
--- old/yast2-registration-3.1.24/package/yast2-registration.spec 2014-03-28 11:34:37.000000000 +0100
+++ new/yast2-registration-3.1.25/package/yast2-registration.spec 2014-03-31 16:33:23.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-registration
-Version: 3.1.24
+Version: 3.1.25
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-3.1.24/src/clients/inst_scc.rb new/yast2-registration-3.1.25/src/clients/inst_scc.rb
--- old/yast2-registration-3.1.24/src/clients/inst_scc.rb 2014-03-28 11:34:37.000000000 +0100
+++ new/yast2-registration-3.1.25/src/clients/inst_scc.rb 2014-03-31 16:33:23.000000000 +0200
@@ -120,7 +120,7 @@
end
# then register the product(s)
- products = ::Registration::SwMgmt.products_to_register
+ products = ::Registration::SwMgmt.base_products_to_register
product_services = Popup.Feedback(
n_("Registering Product...", "Registering Products...", products.size),
_("Contacting the SUSE Customer Center server")) do
@@ -594,35 +594,83 @@
end
end
+ def registered_dialog
+ VBox(
+ Heading(_("The system is already registered.")),
+ VSpacing(1),
+ Label(_("Note: Registering your system again will\n" +
+ "consume an additional subscription.")),
+ VSpacing(1),
+ PushButton(Id(:register), _("Register Again"))
+ )
+ end
+
+ def display_registered_dialog
+ Wizard.SetContents(
+ # dialog title
+ _("Registration Status"),
+ registered_dialog,
+ # FIXME: help text
+ "",
+ GetInstArgs.enable_back || Mode.normal,
+ GetInstArgs.enable_back || Mode.normal
+ )
+
+ Wizard.SetNextButton(:next, Label.FinishButton) if Mode.normal
+
+ continue_buttons = [:next, :back, :close, :abort, :register]
+
+ ret = nil
+ while !continue_buttons.include?(ret) do
+ ret = UI.UserInput
+ end
+
+ return ret
+ end
+
+ def registration_check
+ return :register unless ::Registration::Registration.is_registered?
+
+ display_registered_dialog
+ end
+
# UI workflow definition
def start_workflow
aliases = {
"register" => lambda { register_base_system() },
"select_addons" => lambda { select_addons() },
"register_addons" => lambda { register_addons() },
- "media_addons" => lambda { media_addons() }
+ "media_addons" => lambda { media_addons() },
+ # skip this when going back
+ "check" => [ lambda { registration_check() }, true ]
}
sequence = {
- "ws_start" => "register",
- "register" => {
- :abort => :abort,
+ "ws_start" => "check",
+ "check" => {
+ :abort => :abort,
+ :cancel => :abort,
+ :register => "register",
+ :next => :next
+ },
+ "register" => {
+ :abort => :abort,
:cancel => :abort,
- :skip => :next,
- :next => "select_addons"
+ :skip => :next,
+ :next => "select_addons"
},
"select_addons" => {
- :abort => :abort,
- :skip => "media_addons",
- :next => "register_addons"
+ :abort => :abort,
+ :skip => "media_addons",
+ :next => "register_addons"
},
"register_addons" => {
- :abort => :abort,
- :next => "media_addons"
+ :abort => :abort,
+ :next => "media_addons"
},
"media_addons" => {
- :abort => :abort,
- :next => :next
+ :abort => :abort,
+ :next => :next
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-3.1.24/src/clients/scc.rb new/yast2-registration-3.1.25/src/clients/scc.rb
--- old/yast2-registration-3.1.24/src/clients/scc.rb 2014-03-28 11:34:37.000000000 +0100
+++ new/yast2-registration-3.1.25/src/clients/scc.rb 2014-03-31 16:33:23.000000000 +0200
@@ -23,6 +23,7 @@
# this is just a wrapper for running the SCC client in installed system
+require "yast"
require "registration/sw_mgmt"
module Yast
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-3.1.24/src/clients/scc_auto.rb new/yast2-registration-3.1.25/src/clients/scc_auto.rb
--- old/yast2-registration-3.1.24/src/clients/scc_auto.rb 2014-03-28 11:34:37.000000000 +0100
+++ new/yast2-registration-3.1.25/src/clients/scc_auto.rb 2014-03-31 16:33:23.000000000 +0200
@@ -168,7 +168,7 @@
end
# register the base product
- products = ::Registration::SwMgmt.products_to_register
+ products = ::Registration::SwMgmt.base_products_to_register
Popup.Feedback(
n_("Registering Product...", "Registering Products...", products.size),
_("Contacting the SUSE Customer Center server")) do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-3.1.24/src/lib/registration/helpers.rb new/yast2-registration-3.1.25/src/lib/registration/helpers.rb
--- old/yast2-registration-3.1.24/src/lib/registration/helpers.rb 2014-03-28 11:34:37.000000000 +0100
+++ new/yast2-registration-3.1.25/src/lib/registration/helpers.rb 2014-03-31 16:33:23.000000000 +0200
@@ -74,22 +74,12 @@
# for details
# @return [String,nil] registration URL, nil means use the default
def self.registration_url
- if Yast::Mode.installation
- # boot command line if present
- boot_url = boot_reg_url
- return boot_url if boot_url
- end
-
- # SLP discovery
- # TODO FIXME: replace "true" by reading the SLP option from configuration file
- if Yast::Mode.installation || true
- slp_url = slp_service_url
- return slp_url if slp_url
- end
-
- # TODO FIXME: read the URL from configuration file to use the same URL
- # at re-registration at installed system
+ # TODO FIXME: handle autoyast mode as well, currently it is handled in scc_auto client
+ return reg_url_at_upgrade if Yast::Mode.update
+ return reg_url_at_installation if Yast::Mode.installation
+ return reg_url_at_runnig_system if Yast::Mode.normal
+ log.warn "Unknown mode: #{Mode.mode} using default URL"
# no custom URL, use the default
nil
end
@@ -130,6 +120,51 @@
private
+ # get registration URL in installation mode
+ def self.reg_url_at_installation
+ # boot command line if present
+ boot_url = boot_reg_url
+ return boot_url if boot_url
+
+ # SLP discovery
+ slp_url = slp_service_url
+ return slp_url if slp_url
+
+ # use the default
+ nil
+ end
+
+ # get registration URL in upgrade mode
+ def self.reg_url_at_upgrade
+ # boot command line if present
+ boot_url = boot_reg_url
+ return boot_url if boot_url
+
+ # TODO FIXME: read the URL from the old configuration file
+ # (old suse_register.conf or old SCC config file)
+
+ # try SLP if not registered
+ slp_url = slp_service_url
+ return slp_url if slp_url
+
+ # use the default
+ nil
+ end
+
+ # get registration URL in running system
+ def self.reg_url_at_runnig_system
+ # TODO FIXME: read the URL from configuration file to use the same URL
+ # at re-registration as in installation
+
+ # try SLP if not registered yet
+ slp_url = slp_service_url
+ return slp_url if slp_url
+
+ # use the default
+ nil
+ end
+
+
# return the boot command line parameter
def self.boot_reg_url
parameters = Yast::Linuxrc.InstallInf("Cmdline")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-3.1.24/src/lib/registration/registration.rb new/yast2-registration-3.1.25/src/lib/registration/registration.rb
--- old/yast2-registration-3.1.24/src/lib/registration/registration.rb 2014-03-28 11:34:37.000000000 +0100
+++ new/yast2-registration-3.1.25/src/lib/registration/registration.rb 2014-03-31 16:33:23.000000000 +0200
@@ -30,6 +30,8 @@
class Registration
include Yast::Logger
+ SCC_CREDENTIALS = SccApi::Credentials::DEFAULT_CREDENTIALS_DIR + "/SCCCredentials"
+
attr_accessor :url
def initialize(url = nil)
@@ -96,5 +98,8 @@
end
end
+ def self.is_registered?
+ File.exist?(SCC_CREDENTIALS)
+ end
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-3.1.24/src/lib/registration/scc_helpers.rb new/yast2-registration-3.1.25/src/lib/registration/scc_helpers.rb
--- old/yast2-registration-3.1.24/src/lib/registration/scc_helpers.rb 2014-03-28 11:34:37.000000000 +0100
+++ new/yast2-registration-3.1.25/src/lib/registration/scc_helpers.rb 2014-03-31 16:33:23.000000000 +0200
@@ -53,15 +53,16 @@
false
rescue SccApi::NotAuthorized
# Error popup
- Yast::Report.Error(_("The email address or the registration\ncode is not valid."))
+ Yast::Report.Error(_("The email address is not known or\nthe registration code is not valid."))
false
rescue Timeout::Error
# Error popup
Yast::Report.Error(_("Connection time out."))
false
rescue SccApi::ErrorResponse => e
- # TODO FIXME: display error details from the response
- Yast::Report.Error(_("Registration server error.\n\nRetry registration later."))
+ # error popup, a generic message when no details are available
+ message = JSON.parse(e.message)["localized_error"] || _("Unknown error")
+ Yast::Report.Error(message)
false
rescue SccApi::HttpError => e
case e.response
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-3.1.24/src/lib/registration/sw_mgmt.rb new/yast2-registration-3.1.25/src/lib/registration/sw_mgmt.rb
--- old/yast2-registration-3.1.24/src/lib/registration/sw_mgmt.rb 2014-03-28 11:34:37.000000000 +0100
+++ new/yast2-registration-3.1.25/src/lib/registration/sw_mgmt.rb 2014-03-31 16:33:23.000000000 +0200
@@ -55,7 +55,7 @@
# structure into a writable temporary directory and override the original
# location by "mount -o bind"
def self.zypp_config_writable!
- return if !Mode.installation || File.writable?(ZYPP_DIR)
+ return if !(Mode.installation || Mode.update) || File.writable?(ZYPP_DIR)
log.info "Copying libzypp config to a writable place"
@@ -69,14 +69,22 @@
`mount -o bind #{tmpdir}/zypp #{ZYPP_DIR}`
end
- def self.products_to_register
+ def self.base_products_to_register
# just for debugging:
# return [{"name" => "SLES", "arch" => "x86_64", "version" => "12-1.47"}]
# during installation the products are :selected,
# on a running system the products are :installed
+ # during upgrade use the newer selected product (same as in installation)
products = Pkg.ResolvableProperties("", :product, "").find_all do |p|
- p["status"] == :selected || p["status"] == :installed
+ if Mode.normal
+ # in installed system the base product has valid type
+ p["status"] == :installed && p["type"] == "base"
+ else
+ # however during installation it's not set yet
+ # but the base product comes from the first repository
+ p["status"] == :selected && p["source"] == 0
+ end
end
# filter out not needed data
@@ -84,7 +92,7 @@
{ "name" => p["name"], "arch" => p["arch"], "version" => p["version"]}
end
- log.info("Products to register: #{product_info}")
+ log.info("Base products to register: #{product_info}")
product_info
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-3.1.24/test/helpers_spec.rb new/yast2-registration-3.1.25/test/helpers_spec.rb
--- old/yast2-registration-3.1.24/test/helpers_spec.rb 2014-03-28 11:34:37.000000000 +0100
+++ new/yast2-registration-3.1.25/test/helpers_spec.rb 2014-03-31 16:33:23.000000000 +0200
@@ -23,6 +23,8 @@
context "at installation" do
before do
allow(yast_mode).to receive(:installation).and_return(true)
+ allow(yast_mode).to receive(:update).and_return(false)
+ allow(yast_mode).to receive(:normal).and_return(false)
end
context "no local registration server is announced via SLP" do
@@ -78,6 +80,8 @@
context "at installed system" do
before do
+ allow(yast_mode).to receive(:normal).and_return(true)
+ allow(yast_mode).to receive(:update).and_return(false)
allow(yast_mode).to receive(:installation).and_return(false)
# FIXME: stub SLP service discovery, later add config file reading
expect(yast_wfm).to receive(:call).with("discover_registration_services").and_return(nil)
continue with "q"...
Checked in at Mon Mar 31 17:23:05 CEST 2014 by ro
Remember to have fun...
--
To unsubscribe, e-mail: yast-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: yast-commit+help(a)opensuse.org