Hello community, here is the log from the commit of package yast2-registration for openSUSE:Factory checked in at 2018-09-04 22:51:40 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-registration (Old) and /work/SRC/openSUSE:Factory/.yast2-registration.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-registration" Tue Sep 4 22:51:40 2018 rev:22 rq:633001 version:4.1.2 Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-registration/yast2-registration.changes 2018-07-24 17:28:11.959744296 +0200 +++ /work/SRC/openSUSE:Factory/.yast2-registration.new/yast2-registration.changes 2018-09-04 22:51:43.312087421 +0200 @@ -1,0 +2,26 @@ +Tue Sep 4 08:34:31 UTC 2018 - dgonza...@suse.com + +- Limit the registration code size to 512 characters (bsc#1098576) +- 4.1.2 + +------------------------------------------------------------------- +Fri Aug 31 10:12:16 UTC 2018 - lsle...@suse.cz + +- Better check the not installed addon products, some specific + repositories do not provide any product +- Fixes online migration on PPC (bsc#1103412) +- 4.1.1 + +------------------------------------------------------------------- +Mon Aug 20 09:28:58 CEST 2018 - sch...@suse.de + +- Switched license in spec file from SPDX2 to SPDX3 format. + +------------------------------------------------------------------- +Tue Aug 14 13:10:04 UTC 2018 - knut.anders...@suse.com + +- Modified addon selection filter for filtering all the testing + (not released) versions (bsc#1104450) +- 4.1.0 + +------------------------------------------------------------------- Old: ---- yast2-registration-4.0.43.tar.bz2 New: ---- yast2-registration-4.1.2.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-registration.spec ++++++ --- /var/tmp/diff_new_pack.HOUGrg/_old 2018-09-04 22:51:44.272090713 +0200 +++ /var/tmp/diff_new_pack.HOUGrg/_new 2018-09-04 22:51:44.276090727 +0200 @@ -17,7 +17,7 @@ Name: yast2-registration -Version: 4.0.43 +Version: 4.1.2 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -51,7 +51,7 @@ BuildRequires: yast2-devtools >= 3.1.39 BuildRequires: yast2-slp >= 3.1.9 BuildRequires: rubygem(rspec) -BuildRequires: rubygem(suse-connect) >= 0.2.22 +BuildRequires: rubygem(suse-connect) >= 0.3.11 BuildRequires: rubygem(yast-rake) >= 0.2.5 # updated product renames BuildRequires: yast2-packager >= 4.0.40 @@ -70,7 +70,7 @@ %endif Summary: YaST2 - Registration Module -License: GPL-2.0 +License: GPL-2.0-only Group: System/YaST Url: https://github.com/yast/yast-registration ++++++ yast2-registration-4.0.43.tar.bz2 -> yast2-registration-4.1.2.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-4.0.43/package/yast2-registration.changes new/yast2-registration-4.1.2/package/yast2-registration.changes --- old/yast2-registration-4.0.43/package/yast2-registration.changes 2018-07-18 16:46:49.000000000 +0200 +++ new/yast2-registration-4.1.2/package/yast2-registration.changes 2018-09-04 12:42:19.000000000 +0200 @@ -1,4 +1,30 @@ ------------------------------------------------------------------- +Tue Sep 4 08:34:31 UTC 2018 - dgonza...@suse.com + +- Limit the registration code size to 512 characters (bsc#1098576) +- 4.1.2 + +------------------------------------------------------------------- +Fri Aug 31 10:12:16 UTC 2018 - lsle...@suse.cz + +- Better check the not installed addon products, some specific + repositories do not provide any product +- Fixes online migration on PPC (bsc#1103412) +- 4.1.1 + +------------------------------------------------------------------- +Mon Aug 20 09:28:58 CEST 2018 - sch...@suse.de + +- Switched license in spec file from SPDX2 to SPDX3 format. + +------------------------------------------------------------------- +Tue Aug 14 13:10:04 UTC 2018 - knut.anders...@suse.com + +- Modified addon selection filter for filtering all the testing + (not released) versions (bsc#1104450) +- 4.1.0 + +------------------------------------------------------------------- Wed Jul 18 10:45:15 CEST 2018 - sch...@suse.de - Do not crash if getting zypp lock failed. (bnc#1043125) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-4.0.43/package/yast2-registration.spec new/yast2-registration-4.1.2/package/yast2-registration.spec --- old/yast2-registration-4.0.43/package/yast2-registration.spec 2018-07-18 16:46:49.000000000 +0200 +++ new/yast2-registration-4.1.2/package/yast2-registration.spec 2018-09-04 12:42:19.000000000 +0200 @@ -17,14 +17,14 @@ Name: yast2-registration -Version: 4.0.43 +Version: 4.1.2 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build Source0: %{name}-%{version}.tar.bz2 Group: System/YaST -License: GPL-2.0 +License: GPL-2.0-only # Y2Packager::ProductLicense Requires: yast2 >= 4.0.63 @@ -54,7 +54,7 @@ BuildRequires: yast2-devtools >= 3.1.39 BuildRequires: rubygem(yast-rake) >= 0.2.5 BuildRequires: rubygem(rspec) -BuildRequires: rubygem(suse-connect) >= 0.2.22 +BuildRequires: rubygem(suse-connect) >= 0.3.11 BuildRequires: yast2-slp >= 3.1.9 # updated product renames BuildRequires: yast2-packager >= 4.0.40 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-4.0.43/src/lib/registration/addon.rb new/yast2-registration-4.1.2/src/lib/registration/addon.rb --- old/yast2-registration-4.0.43/src/lib/registration/addon.rb 2018-07-18 16:46:49.000000000 +0200 +++ new/yast2-registration-4.1.2/src/lib/registration/addon.rb 2018-09-04 12:42:19.000000000 +0200 @@ -71,14 +71,21 @@ end # return add-ons which are registered but not installed in the system + # and are available to install # @return [Array<Addon>] the list of add-ons def registered_not_installed registered.select do |addon| - !SwMgmt.installed_products.find do |product| + installed = SwMgmt.installed_products.find do |product| product["name"] == addon.identifier && product["version_version"] == addon.version && product["arch"] == addon.arch end + + available = Yast::Pkg.ResolvableProperties(addon.identifier, :product, "").find do |p| + p["status"] == :available + end + + !installed && available end end @@ -266,8 +273,10 @@ Addon.registered.delete(self) if registered? end - def beta_release? - release_stage == "beta" + DEVELOPMENT_STAGES = ["alpha", "beta"].freeze + + def released? + release_stage == "released" end # get a product printable name (long name if present, fallbacks to the short name) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-4.0.43/src/lib/registration/ui/addon_selection_base_dialog.rb new/yast2-registration-4.1.2/src/lib/registration/ui/addon_selection_base_dialog.rb --- old/yast2-registration-4.0.43/src/lib/registration/ui/addon_selection_base_dialog.rb 2018-07-18 16:46:49.000000000 +0200 +++ new/yast2-registration-4.1.2/src/lib/registration/ui/addon_selection_base_dialog.rb 2018-09-04 12:42:19.000000000 +0200 @@ -24,10 +24,10 @@ Yast.import "Arch" class << self - attr_accessor :filter_beta + attr_accessor :filter_devel end - FILTER_BETAS_INITIALLY = true + FILTER_DEVEL_INITIALLY = true # constructor # @param registration [Registration::Registration] use this Registration object for @@ -39,10 +39,9 @@ # sort the addons @all_addons.sort!(&::Registration::ADDON_SORTER) - self.class.filter_beta = FILTER_BETAS_INITIALLY if self.class.filter_beta.nil? - + self.class.filter_devel = FILTER_DEVEL_INITIALLY if self.class.filter_devel.nil? preselect_recommended - filter_beta_releases(self.class.filter_beta) + filter_devel_releases(self.class.filter_devel) @old_selection = Addon.selected.dup end @@ -63,14 +62,14 @@ "#{addon.identifier}-#{addon.version}-#{addon.arch}" end - # Enables or disables beta addons filtering - # @param [Boolean] enable true for filtering beta releases - def filter_beta_releases(enable) - self.class.filter_beta = enable + # Enables or disables devel addons filtering + # @param [Boolean] enable true for filtering devel releases + def filter_devel_releases(enable) + self.class.filter_devel = enable if enable @addons = @all_addons.select do |a| a.registered? || a.selected? || a.auto_selected? || - !a.beta_release? + a.released? end else @addons = @all_addons @@ -88,13 +87,15 @@ # create the main dialog definition # @return [Yast::Term] the main UI dialog term def content - check_filter = self.class.filter_beta.nil? ? FILTER_BETAS_INITIALLY : self.class.filter_beta + check_filter = + self.class.filter_devel.nil? ? FILTER_DEVEL_INITIALLY : self.class.filter_devel vbox_elements = [Left(Heading(heading))] available_addons = @all_addons.reject(&:registered?) - unless available_addons.empty? || available_addons.select(&:beta_release?).empty? - vbox_elements.push(Left(CheckBox(Id(:filter_beta), Opt(:notify), - _("&Hide Beta Versions"), check_filter))) + unless available_addons.empty? || available_addons.all?(&:released?) + vbox_elements.push(Left(CheckBox(Id(:filter_devel), Opt(:notify), + # TRANSLATORS: Checkbox label, hides alpha or beta versions (not released yet) + _("&Hide Development Versions"), check_filter))) end vbox_elements.concat([addons_box, Left(Label(_("Details (English only)"))), details_widget]) @@ -215,8 +216,8 @@ ret = Stage.initial && !AbortConfirmation.run ? nil : :abort # when canceled switch to old selection Addon.selected.replace(@old_selection) if ret == :abort - when :filter_beta - filter_beta_releases(Yast::UI.QueryWidget(Id(ret), :Value)) + when :filter_devel + filter_devel_releases(Yast::UI.QueryWidget(Id(ret), :Value)) show_addons else handle_addon_selection(ret) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-4.0.43/src/lib/registration/ui/base_system_registration_dialog.rb new/yast2-registration-4.1.2/src/lib/registration/ui/base_system_registration_dialog.rb --- old/yast2-registration-4.0.43/src/lib/registration/ui/base_system_registration_dialog.rb 2018-07-18 16:46:49.000000000 +0200 +++ new/yast2-registration-4.1.2/src/lib/registration/ui/base_system_registration_dialog.rb 2018-09-04 12:42:19.000000000 +0200 @@ -65,6 +65,9 @@ Yast::GetInstArgs.enable_next || Yast::Mode.normal ) + # Limit the reg_code InputField to 512 (bsc#1098576) + Yast::UI.ChangeWidget(:reg_code, :InputMaxLength, 512) + # Set default action self.action = initial_action set_focus diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-4.0.43/test/addon_selection_dialog_test.rb new/yast2-registration-4.1.2/test/addon_selection_dialog_test.rb --- old/yast2-registration-4.0.43/test/addon_selection_dialog_test.rb 2018-07-18 16:46:49.000000000 +0200 +++ new/yast2-registration-4.1.2/test/addon_selection_dialog_test.rb 2018-09-04 12:42:19.000000000 +0200 @@ -18,13 +18,13 @@ end describe "#initialize" do - it "sets the beta filter to the previous state" do + it "sets the development filter to the previous state" do fake_ref = double.as_null_object registration = double(activated_products: [], get_addon_list: []) res = described_class.new(registration) - res.send(:filter_beta_releases, false) + res.send(:filter_devel_releases, false) - expect_any_instance_of(described_class).to receive(:filter_beta_releases).with(false) + expect_any_instance_of(described_class).to receive(:filter_devel_releases).with(false) described_class.new(fake_ref) end end @@ -33,11 +33,11 @@ subject { Registration::UI::AddonSelectionRegistrationDialog } let(:registration) { double(activated_products: [], get_addon_list: []) } - let(:filter_beta) { false } + let(:filter_devel) { false } let(:recommended_addon) { addon_generator("recommended" => true) } before do - allow(described_class).to receive(:filter_beta).and_return(filter_beta) + allow(described_class).to receive(:filter_devel).and_return(filter_devel) allow(Yast::UI).to receive(:TextMode).and_return(false) allow(Yast::UI).to receive(:UserInput).and_return(:next) allow_any_instance_of(described_class).to receive(:RichText).and_call_original @@ -142,27 +142,27 @@ expect(child.auto_selected?).to eq true end - context "when beta versions are not filtered" do + context "when development versions are not filtered" do let(:addon) do Registration::Addon.new( addon_generator ) end subject(:dialog) { described_class.new(registration) } - let(:filter_beta) { false } + let(:filter_devel) { false } it "sets the filter as not checked in the UI" do - allow(addon).to receive(:beta_release?).and_return(true) + allow(addon).to receive(:released?).and_return(false) allow(addon).to receive(:registered?).and_return(false) allow(Registration::Addon).to receive(:find_all).and_return([addon]) expect(dialog).to receive(:CheckBox) - .with(Yast::Term.new(:id, :filter_beta), anything, anything, filter_beta) + .with(Yast::Term.new(:id, :filter_devel), anything, anything, filter_devel) .and_call_original dialog.run end - it "displays beta add-ons" do - allow(addon).to receive(:beta_release?).and_return(true) + it "displays development add-ons" do + allow(addon).to receive(:released?).and_return(false) allow(Registration::Addon).to receive(:find_all).and_return([addon]) expect(subject).to receive(:RichText).with(Yast::Term.new(:id, :items), /#{addon.name}/) allow(subject).to receive(:RichText).and_call_original @@ -170,27 +170,27 @@ end end - context "when beta versions are filtered" do + context "when development versions are filtered" do let(:addon) do Registration::Addon.new( addon_generator ) end subject(:dialog) { described_class.new(registration) } - let(:filter_beta) { true } + let(:filter_devel) { true } it "sets the filter as checked in the UI" do - allow(addon).to receive(:beta_release?).and_return(true) + allow(addon).to receive(:released?).and_return(false) allow(addon).to receive(:registered?).and_return(false) allow(Registration::Addon).to receive(:find_all).and_return([addon]) expect(dialog).to receive(:CheckBox) - .with(Yast::Term.new(:id, :filter_beta), anything, anything, filter_beta) + .with(Yast::Term.new(:id, :filter_devel), anything, anything, filter_devel) .and_call_original dialog.run end - it "does not display beta add-ons that are not registered" do - allow(addon).to receive(:beta_release?).and_return(true) + it "does not display development add-ons that are not registered" do + allow(addon).to receive(:released?).and_return(false) allow(addon).to receive(:registered?).and_return(false) allow(Registration::Addon).to receive(:find_all).and_return([addon]) expect(subject).to receive(:RichText).with(Yast::Term.new(:id, :items), "") @@ -198,8 +198,8 @@ dialog.run end - it "display registered beta add-ons" do - allow(addon).to receive(:beta_release?).and_return(true) + it "display registered development add-ons" do + allow(addon).to receive(:released?).and_return(false) allow(addon).to receive(:registered?).and_return(true) allow(Registration::Addon).to receive(:find_all).and_return([addon]) expect(subject).to receive(:RichText).with(Yast::Term.new(:id, :items), /#{addon.name}/) @@ -207,8 +207,8 @@ dialog.run end - it "displays recommended beta add-ons" do - allow(addon).to receive(:beta_release?).and_return(true) + it "displays recommended development add-ons" do + allow(addon).to receive(:released?).and_return(false) allow(addon).to receive(:registered?).and_return(false) allow(addon).to receive(:recommended).and_return(true) allow(Registration::Addon).to receive(:find_all).and_return([addon]) @@ -217,8 +217,8 @@ dialog.run end - it "displays auto-selected beta add-ons" do - allow(addon).to receive(:beta_release?).and_return(true) + it "displays auto-selected development add-ons" do + allow(addon).to receive(:released?).and_return(false) allow(addon).to receive(:registered?).and_return(false) allow(addon).to receive(:recommended).and_return(false) allow(addon).to receive(:auto_selected?).and_return(true) @@ -229,7 +229,7 @@ end end - context "when there is no beta versions to filter" do + context "when there is no development versions to filter" do subject(:dialog) { described_class.new(registration) } it "shows no filter in the UI" do @@ -245,13 +245,13 @@ Registration::UI::AddonSelectionRegistrationDialog.new(registration) end - it "filters beta releases" do - expect(Yast::UI).to receive(:UserInput).and_return(:filter_beta, :next) + it "filters development releases" do + expect(Yast::UI).to receive(:UserInput).and_return(:filter_devel, :next) expect(Yast::UI).to receive(:QueryWidget) - .with(Yast::Term.new(:id, :filter_beta), :Value) + .with(Yast::Term.new(:id, :filter_devel), :Value) .and_return(true) - expect(subject).to receive(:filter_beta_releases).with(true) + expect(subject).to receive(:filter_devel_releases).with(true) expect(subject.send(:handle_dialog)).to_not eq :back end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-4.0.43/test/addon_spec.rb new/yast2-registration-4.1.2/test/addon_spec.rb --- old/yast2-registration-4.0.43/test/addon_spec.rb 2018-07-18 16:46:49.000000000 +0200 +++ new/yast2-registration-4.1.2/test/addon_spec.rb 2018-09-04 12:42:19.000000000 +0200 @@ -119,11 +119,29 @@ addon2 = addons.find { |addon| addon.name == "prod2" } expect(Registration::SwMgmt).to receive(:installed_products).and_return([]) + expect(Yast::Pkg).to receive(:ResolvableProperties).with(prod2.identifier, :product, "") + .and_return(["status" => :available]) reg_not_installed_addons = Registration::Addon.registered_not_installed expect(reg_not_installed_addons.size).to eql(1) expect(reg_not_installed_addons.first.name).to eql(addon2.name) end + + it "does not return addons without available products" do + prod = addon_generator("name" => "prod") + registration = double( + activated_products: [prod], + get_addon_list: [prod] + ) + + Registration::Addon.find_all(registration) + + expect(Registration::SwMgmt).to receive(:installed_products).and_return([]) + expect(Yast::Pkg).to receive(:ResolvableProperties).with(prod.identifier, :product, "") + .and_return([]) + + expect(Registration::Addon.registered_not_installed).to be_empty + end end describe "#unregistered" do @@ -196,19 +214,22 @@ end end - describe "#beta_release?" do - it "returns true if addon is beta release" do - product = addon_generator("release_stage" => "beta") - addon = Registration::Addon.new(product) + describe "#released?" do + it "returns false if addon is a testing release" do + alpha_product = addon_generator("release_stage" => "alpha") + alpha_addon = Registration::Addon.new(alpha_product) + beta_product = addon_generator("release_stage" => "beta") + beta_addon = Registration::Addon.new(beta_product) - expect(addon.beta_release?).to eq(true) + expect(alpha_addon.released?).to eq(false) + expect(beta_addon.released?).to eq(false) end - it "returns false if addon is not beta release" do - product = addon_generator("release_stage" => "production") + it "returns true if addon is a supported release" do + product = addon_generator("release_stage" => "released") addon = Registration::Addon.new(product) - expect(addon.beta_release?).to eq(false) + expect(addon.released?).to eq(true) end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-4.0.43/test/base_system_registration_dialog_test.rb new/yast2-registration-4.1.2/test/base_system_registration_dialog_test.rb --- old/yast2-registration-4.0.43/test/base_system_registration_dialog_test.rb 2018-07-18 16:46:49.000000000 +0200 +++ new/yast2-registration-4.1.2/test/base_system_registration_dialog_test.rb 2018-09-04 12:42:19.000000000 +0200 @@ -32,6 +32,7 @@ allow(Yast::Mode).to receive(:mode).and_return(mode) allow(Registration::Registration).to receive(:is_registered?).and_return(registered?) allow(Registration::UrlHelpers).to receive(:slp_discovery_feedback).and_return([]) + allow(Yast::UI).to receive(:ChangeWidget) end context "when system is not registered" do @@ -44,6 +45,14 @@ allow(Registration::Helpers).to receive(:reset_registration_status) end + it "limits the reg_code InputField to 512" do + allow(subject).to receive(:event_loop).and_return(nil) + + expect(Yast::UI).to receive(:ChangeWidget).with(:reg_code, :InputMaxLength, 512) + + subject.run + end + context "when user enters a correct regcode" do it "registers the base system with provided email and reg. code" do expect(Yast::UI).to receive(:QueryWidget).with(:email, :Value)