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# 874745 : "Registration fails when the server SSL certificate is not known" (ASSIGNED/) ## BNC# 874997 : "reg_url bootparam ignored" (RESOLVED/FIXED) Changes: -------- --- /work/SRC/SUSE:SLE-12:GA/yast2-registration/yast2-registration.changes 2014-04-24 11:35:49.000000000 +0200 +++ /mounts/work_src_done/SLE12/yast2-registration/yast2-registration.changes 2014-04-29 15:37:26.000000000 +0200 @@ -1,0 +2,14 @@ +Thu Apr 24 16:05:17 UTC 2014 - lslezak@suse.cz + +- "reg_ssl_verify=0" boot parameter disables SSL checks (part of + bnc#874745) +- reuse already known "regurl" parameter (instead "reg_url" cannot + be used as it conflicts with it) (bnc#874997) +- 3.1.39 + +------------------------------------------------------------------- +Thu Apr 24 07:53:57 UTC 2014 - lslezak@suse.cz + +- use "is_update_repo" flag for finding update repositories + +------------------------------------------------------------------- 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:36980 MAIL:yast-commit@opensuse.org) (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "yast2-registration", Maintainer is "yast-commit@opensuse.org" Old: ---- yast2-registration-3.1.38.tar.bz2 New: ---- yast2-registration-3.1.39.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-registration.spec ++++++ --- /var/tmp/diff_new_pack.78Rj0V/_old 2014-04-30 12:57:50.000000000 +0200 +++ /var/tmp/diff_new_pack.78Rj0V/_new 2014-04-30 12:57:50.000000000 +0200 @@ -17,7 +17,7 @@ Name: yast2-registration -Version: 3.1.38 +Version: 3.1.39 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build ++++++ yast2-registration-3.1.38.tar.bz2 -> yast2-registration-3.1.39.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-3.1.38/package/yast2-registration.changes new/yast2-registration-3.1.39/package/yast2-registration.changes --- old/yast2-registration-3.1.38/package/yast2-registration.changes 2014-04-23 13:21:07.000000000 +0200 +++ new/yast2-registration-3.1.39/package/yast2-registration.changes 2014-04-29 15:35:47.000000000 +0200 @@ -1,4 +1,18 @@ ------------------------------------------------------------------- +Thu Apr 24 16:05:17 UTC 2014 - lslezak@suse.cz + +- "reg_ssl_verify=0" boot parameter disables SSL checks (part of + bnc#874745) +- reuse already known "regurl" parameter (instead "reg_url" cannot + be used as it conflicts with it) (bnc#874997) +- 3.1.39 + +------------------------------------------------------------------- +Thu Apr 24 07:53:57 UTC 2014 - lslezak@suse.cz + +- use "is_update_repo" flag for finding update repositories + +------------------------------------------------------------------- Wed Apr 23 07:29:37 UTC 2014 - lslezak@suse.cz - use "suse-connect" gem as the backend (to share the code with diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-3.1.38/package/yast2-registration.spec new/yast2-registration-3.1.39/package/yast2-registration.spec --- old/yast2-registration-3.1.38/package/yast2-registration.spec 2014-04-23 13:21:07.000000000 +0200 +++ new/yast2-registration-3.1.39/package/yast2-registration.spec 2014-04-29 15:35:47.000000000 +0200 @@ -17,7 +17,7 @@ Name: yast2-registration -Version: 3.1.38 +Version: 3.1.39 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-3.1.38/src/lib/registration/helpers.rb new/yast2-registration-3.1.39/src/lib/registration/helpers.rb --- old/yast2-registration-3.1.38/src/lib/registration/helpers.rb 2014-04-23 13:21:07.000000000 +0200 +++ new/yast2-registration-3.1.39/src/lib/registration/helpers.rb 2014-04-29 15:35:47.000000000 +0200 @@ -171,14 +171,8 @@ # return the boot command line parameter def self.boot_reg_url - parameters = Yast::Linuxrc.InstallInf("Cmdline") - return nil unless parameters - - registration_param = parameters.split.grep(/\A#{BOOT_PARAM}=/i).last - return nil unless registration_param - - reg_url = registration_param.split('=', 2).last - log.info "Boot reg_url option: #{reg_url.inspect}" + reg_url = Yast::Linuxrc.InstallInf("regurl") + log.info "Boot regurl option: #{reg_url.inspect}" reg_url end @@ -209,5 +203,17 @@ end end + # check if insecure registration is requested + # (the "reg_ssl_verify=0" boot commandline option is used) + def self.insecure_registration + # check the boot parameter only at installation/update + return false unless Yast::Mode.installation || Yast::Mode.update + + reg_ssl_verify = Yast::Linuxrc.InstallInf("reg_ssl_verify") + log.info "Boot reg_ssl_verify option: #{reg_ssl_verify.inspect}" + + reg_ssl_verify == "0" + end + end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-3.1.38/src/lib/registration/registration.rb new/yast2-registration-3.1.39/src/lib/registration/registration.rb --- old/yast2-registration-3.1.38/src/lib/registration/registration.rb 2014-04-23 13:21:07.000000000 +0200 +++ new/yast2-registration-3.1.39/src/lib/registration/registration.rb 2014-04-29 15:35:47.000000000 +0200 @@ -114,6 +114,11 @@ default_params[:url] = @url end + if Helpers.insecure_registration + log.warn "SSL certificate check disabled via reg_ssl boot parameter" + default_params[:insecure] = true + end + default_params.merge(params) end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-3.1.38/src/lib/registration/sw_mgmt.rb new/yast2-registration-3.1.39/src/lib/registration/sw_mgmt.rb --- old/yast2-registration-3.1.38/src/lib/registration/sw_mgmt.rb 2014-04-23 13:21:07.000000000 +0200 +++ new/yast2-registration-3.1.39/src/lib/registration/sw_mgmt.rb 2014-04-29 15:35:47.000000000 +0200 @@ -199,9 +199,9 @@ log.info "Service repositories: #{repos}" if only_updates - # TODO FIXME: curently just check the name, - # later use a new libzypp flag for detecting update repos - repos.select!{|repo| repo["name"].match(/update/i)} + # leave only update repositories + repos.select!{|repo| repo["is_update_repo"]} + log.info "Found update repositories: #{repos}" end repos diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-3.1.38/test/helpers_spec.rb new/yast2-registration-3.1.39/test/helpers_spec.rb --- old/yast2-registration-3.1.38/test/helpers_spec.rb 2014-04-23 13:21:07.000000000 +0200 +++ new/yast2-registration-3.1.39/test/helpers_spec.rb 2014-04-29 15:35:47.000000000 +0200 @@ -28,31 +28,16 @@ end context "no local registration server is announced via SLP" do - it "returns 'reg_url' boot parameter from Linuxrc" do + it "returns 'regurl' boot parameter from Linuxrc" do url = "https://example.com/register" - expect(yast_linuxrc).to receive(:InstallInf).with("Cmdline").and_return("splash=silent reg_url=#{url} vga=0x314") + expect(yast_linuxrc).to receive(:InstallInf).with("regurl").and_return(url) # make sure no SLP discovery is executed, the boot parameter has higher priority expect(yast_wfm).to receive(:call).with("discover_registration_services").never expect(Registration::Helpers.registration_url).to eq(url) end - it "uses the last 'reg_url' boot parameter from Linuxrc" do - url1 = "https://example.com/register" - url2 = "https://foo.org/registration" - expect(yast_linuxrc).to receive(:InstallInf).with("Cmdline").and_return("splash=silent reg_url=#{url1} reg_url=#{url2} vga=0x314") - # make sure no SLP discovery is executed, the boot parameter has higher priority - expect(yast_wfm).to receive(:call).with("discover_registration_services").never - expect(Registration::Helpers.registration_url).to eq(url2) - end - it "returns nil when no custom URL is required in Linuxrc" do - expect(yast_linuxrc).to receive(:InstallInf).with("Cmdline").and_return("splash=silent vga=0x314") - expect(yast_wfm).to receive(:call).with("discover_registration_services").and_return(nil) - expect(Registration::Helpers.registration_url).to be_nil - end - - it "returns nil when no boot command line is defined in Linuxrc" do - expect(yast_linuxrc).to receive(:InstallInf).with("Cmdline").and_return(nil) + expect(yast_linuxrc).to receive(:InstallInf).with("regurl").and_return(nil) expect(yast_wfm).to receive(:call).with("discover_registration_services").and_return(nil) expect(Registration::Helpers.registration_url).to be_nil end @@ -61,7 +46,7 @@ context "no boot parameter is used and a SLP server is announced" do before do # no boot parameter passed, it would have higher priority - expect(yast_linuxrc).to receive(:InstallInf).with("Cmdline").and_return("splash=silent vga=0x314") + expect(yast_linuxrc).to receive(:InstallInf).with("regurl").and_return(nil) end it "returns the SLP server selected by user" do @@ -157,4 +142,52 @@ expect(Registration::Helpers.base_version("12-1")).to eq("12") end end + + describe ".insecure_registration" do + let(:yast_mode) { double("Yast::Mode") } + let(:yast_linuxrc) { double("Yast::Linuxrc") } + + before do + stub_const("Yast::Mode", yast_mode) + stub_const("Yast::Linuxrc", yast_linuxrc) + end + + context "outside installation/update" do + before do + allow(yast_mode).to receive(:installation).and_return(false) + allow(yast_mode).to receive(:update).and_return(false) + end + + it "returns false and does not check boot parameters" do + expect(yast_linuxrc).to receive(:InstallInf).never + expect(Registration::Helpers.insecure_registration).to eq(false) + end + end + + context "at installation" do + before do + allow(yast_mode).to receive(:installation).and_return(true) + allow(yast_mode).to receive(:update).and_return(false) + end + + it "returns false when reg_ssl_verify option is not used at boot commandline" do + expect(yast_linuxrc).to receive(:InstallInf).with("reg_ssl_verify"). + and_return(nil) + expect(Registration::Helpers.insecure_registration).to eq(false) + end + + it "returns false when reg_ssl_verify=1 boot option is used" do + expect(yast_linuxrc).to receive(:InstallInf).with("reg_ssl_verify"). + and_return("1") + expect(Registration::Helpers.insecure_registration).to eq(false) + end + + it "returns true when reg_ssl_verify=0 boot option is used" do + expect(yast_linuxrc).to receive(:InstallInf).with("reg_ssl_verify"). + and_return("0") + expect(Registration::Helpers.insecure_registration).to eq(true) + end + end + end + end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-3.1.38/test/registration_spec.rb new/yast2-registration-3.1.39/test/registration_spec.rb --- old/yast2-registration-3.1.38/test/registration_spec.rb 2014-04-23 13:21:07.000000000 +0200 +++ new/yast2-registration-3.1.39/test/registration_spec.rb 2014-04-29 15:35:47.000000000 +0200 @@ -12,6 +12,7 @@ stub_const("Yast::WFM", yast_wfm) yast_wfm.stub(:GetLanguage).and_return("en") + allow(Registration::Helpers).to receive(:insecure_registration).and_return(false) end describe ".register" do @@ -30,7 +31,7 @@ Registration::Registration.new.register("email", reg_code, "sles-12-x86_64") end end - + describe ".register_products" do it "registers the selected product and returns added zypp services" do product = { @@ -39,7 +40,7 @@ "version" => "12", "release_type" => "DVD" } - + source = SUSE::Connect::Source.new("service", "https://example.com") service = SUSE::Connect::Service.new([source], [], []) @@ -54,10 +55,11 @@ )) .and_return(service) ) + expect(Registration::SwMgmt).to receive(:add_services) expect(SUSE::Connect::Credentials).to receive(:read) .with(SUSE::Connect::Credentials::GLOBAL_CREDENTIALS_FILE) - + service_list = Registration::Registration.new.register_products([product]) expect(service_list).to eq([service]) end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-3.1.38/test/sw_mgmt_spec.rb new/yast2-registration-3.1.39/test/sw_mgmt_spec.rb --- old/yast2-registration-3.1.38/test/sw_mgmt_spec.rb 2014-04-23 13:21:07.000000000 +0200 +++ new/yast2-registration-3.1.39/test/sw_mgmt_spec.rb 2014-04-29 15:35:47.000000000 +0200 @@ -42,7 +42,7 @@ 2 => { "alias"=>"SLES:SLES12-Updates", "autorefresh"=>true, "base_urls"=>["https://nu.novell.com/suse/x86_64/update/SLE-SERVER/12"], - "enabled"=>true, "is_update_repo"=>false, "keeppackages"=>false, + "enabled"=>true, "is_update_repo"=>true, "keeppackages"=>false, "mirror_list"=>"", "name"=>"SLES12-Updates", "priority"=>99, "product_dir"=> "", "service"=>service_name, "type"=>"YUM", "url"=>"https://nu.novell.com/suse/x86_64/update/SLE-SERVER/12" @@ -51,7 +51,7 @@ 3 => { "alias"=>"Another:SLES12-Updates", "autorefresh"=>true, "base_urls"=>["https://nu.novell.com/suse/x86_64/update/SLE-SERVER/12"], - "enabled"=>true, "is_update_repo"=>false, "keeppackages"=>false, + "enabled"=>true, "is_update_repo"=>true, "keeppackages"=>false, "mirror_list"=>"", "name"=>"SLES12-Updates", "priority"=>99, "product_dir"=> "", "service"=> "Another", "type"=>"YUM", "url"=>"https://nu.novell.com/suse/x86_64/update/SLE-SERVER/12" continue with "q"... Checked in at Wed Apr 30 12:58:14 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