Hello community, here is the log from the commit of package yast2-registration for openSUSE:Factory checked in at 2019-07-31 14:22:14 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-registration (Old) and /work/SRC/openSUSE:Factory/.yast2-registration.new.4126 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-registration" Wed Jul 31 14:22:14 2019 rev:36 rq:713019 version:4.2.5 Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-registration/yast2-registration.changes 2019-04-02 09:18:51.568560178 +0200 +++ /work/SRC/openSUSE:Factory/.yast2-registration.new.4126/yast2-registration.changes 2019-07-31 14:22:17.742473617 +0200 @@ -1,0 +2,36 @@ +Thu Jun 20 14:15:48 UTC 2019 - David Diaz <[email protected]> + +- Do not abort when an addon license is refused (bsc#1114018). +- 4.2.5 + +------------------------------------------------------------------- +Wed Jun 12 12:00:17 UTC 2019 - David Diaz <[email protected]> + +- Improve error message when migration products could not be found + during an offline upgrade (bsc#1078739). +- 4.2.4 + +------------------------------------------------------------------- +Tue Jun 4 18:36:37 UTC 2019 - Stasiek Michalski <[email protected]> + +- Add metainfo (fate#319035) +- Revamp spec +- Replace GenericName with Comment +- 4.2.3 + +------------------------------------------------------------------- +Mon Jun 3 09:26:29 UTC 2019 - David Diaz <[email protected]> + +- Update labels and help texts related to registration server, + replacing SMT by RMT since the former is not longer supported + (bsc#1129206, bsc#1136433). +- 4.2.2 + +------------------------------------------------------------------- +Thu May 30 13:37:19 UTC 2019 - Ladislav Slezák <[email protected]> + +- Properly display the openSUSE Leap to SLES migration summary + (bsc#1136325) +- 4.2.1 + +------------------------------------------------------------------- Old: ---- yast2-registration-4.2.0.tar.bz2 New: ---- yast2-registration-4.2.5.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-registration.spec ++++++ --- /var/tmp/diff_new_pack.5U7VM8/_old 2019-07-31 14:22:18.286472842 +0200 +++ /var/tmp/diff_new_pack.5U7VM8/_new 2019-07-31 14:22:18.290472836 +0200 @@ -17,13 +17,28 @@ Name: yast2-registration -Version: 4.2.0 +Version: 4.2.5 Release: 0 +Summary: YaST2 - Registration Module +License: GPL-2.0-only +Group: System/YaST +Url: https://github.com/yast/yast-registration -BuildRoot: %{_tmppath}/%{name}-%{version}-build Source0: %{name}-%{version}.tar.bz2 # Y2Packager::ProductLicense +BuildRequires: update-desktop-files +BuildRequires: yast2 >= 4.0.63 +BuildRequires: yast2-devtools >= 4.2.2 +BuildRequires: yast2-slp >= 3.1.9 +BuildRequires: rubygem(rspec) +BuildRequires: rubygem(suse-connect) >= 0.3.11 +BuildRequires: rubygem(yast-rake) >= 0.2.5 +# updated product renames +BuildRequires: yast2-packager >= 4.0.40 +BuildRequires: yast2-update >= 3.1.36 + +# Y2Packager::ProductLicense Requires: yast2 >= 4.0.63 # "dupAllowVendorChange" option in Pkg.SetSolverFlags() Requires: yast2-pkg-bindings >= 3.1.34 @@ -31,48 +46,29 @@ Requires: yast2-ruby-bindings >= 3.1.12 # SUSE::Connect::YaST.list_installer_updates Requires: rubygem(suse-connect) >= 0.2.37 - # NOTE: Workaround for bsc#947482, SUSEConnect is actually not needed by the # YaST registration module, it is used just to install the Connect dependencies. # # TODO: Remove it once the SUSEConnect dependencies are properly moved to the # suse-connect gem. Requires: SUSEConnect >= 0.2.37 - Requires: yast2-add-on >= 3.1.8 Requires: yast2-slp >= 3.1.9 -# packager/product_patterns.rb -Requires: yast2-packager >= 3.1.95 +# Packager ProductLicense#HandleLicenseDialogRet allowing "refuse" action +Requires: yast2-packager >= 4.2.16 Requires: yast2-update >= 3.1.36 -# Y2Packager::ProductLicense -BuildRequires: update-desktop-files -BuildRequires: yast2 >= 4.0.63 -BuildRequires: yast2-devtools >= 3.1.39 -BuildRequires: yast2-slp >= 3.1.9 -BuildRequires: rubygem(rspec) -BuildRequires: rubygem(suse-connect) >= 0.3.11 -BuildRequires: rubygem(yast-rake) >= 0.2.5 -# updated product renames -BuildRequires: yast2-packager >= 4.0.40 -BuildRequires: yast2-update >= 3.1.36 - BuildArch: noarch # SUSEConnect does not build for i586 and s390 and is not supported on those architectures # bsc#1088552 ExcludeArch: %ix86 s390 -Summary: YaST2 - Registration Module -License: GPL-2.0-only -Group: System/YaST -Url: https://github.com/yast/yast-registration - %description The registration module to register products and/or to fetch an update source (mirror) automatically. %prep -%setup -n %{name}-%{version} +%setup -q %build @@ -81,17 +77,16 @@ %install %yast_install +%yast_metainfo %files -%defattr(-,root,root) -%{yast_ybindir}/* -%{yast_desktopdir}/*.desktop -%{yast_clientdir}/*.rb -%{yast_ydatadir}/registration -%{yast_schemadir}/autoyast/rnc/*.rnc -%{yast_libdir}/registration -%{yast_libdir}/yast -%{yast_libdir}/yast/suse_connect.rb +%{yast_ybindir} +%{yast_desktopdir} +%{yast_metainfodir} +%{yast_clientdir} +%{yast_ydatadir} +%{yast_schemadir} +%{yast_libdir} %{yast_icondir} %doc %{yast_docdir} %license COPYING ++++++ yast2-registration-4.2.0.tar.bz2 -> yast2-registration-4.2.5.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-4.2.0/package/yast2-registration.changes new/yast2-registration-4.2.5/package/yast2-registration.changes --- old/yast2-registration-4.2.0/package/yast2-registration.changes 2019-04-01 12:24:45.000000000 +0200 +++ new/yast2-registration-4.2.5/package/yast2-registration.changes 2019-07-02 11:33:49.000000000 +0200 @@ -1,4 +1,40 @@ ------------------------------------------------------------------- +Thu Jun 20 14:15:48 UTC 2019 - David Diaz <[email protected]> + +- Do not abort when an addon license is refused (bsc#1114018). +- 4.2.5 + +------------------------------------------------------------------- +Wed Jun 12 12:00:17 UTC 2019 - David Diaz <[email protected]> + +- Improve error message when migration products could not be found + during an offline upgrade (bsc#1078739). +- 4.2.4 + +------------------------------------------------------------------- +Tue Jun 4 18:36:37 UTC 2019 - Stasiek Michalski <[email protected]> + +- Add metainfo (fate#319035) +- Revamp spec +- Replace GenericName with Comment +- 4.2.3 + +------------------------------------------------------------------- +Mon Jun 3 09:26:29 UTC 2019 - David Diaz <[email protected]> + +- Update labels and help texts related to registration server, + replacing SMT by RMT since the former is not longer supported + (bsc#1129206, bsc#1136433). +- 4.2.2 + +------------------------------------------------------------------- +Thu May 30 13:37:19 UTC 2019 - Ladislav Slezák <[email protected]> + +- Properly display the openSUSE Leap to SLES migration summary + (bsc#1136325) +- 4.2.1 + +------------------------------------------------------------------- Fri Mar 29 14:34:42 UTC 2019 - David Diaz <[email protected]> - Update the label used for the option to register the system diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-4.2.0/package/yast2-registration.spec new/yast2-registration-4.2.5/package/yast2-registration.spec --- old/yast2-registration-4.2.0/package/yast2-registration.spec 2019-04-01 12:24:45.000000000 +0200 +++ new/yast2-registration-4.2.5/package/yast2-registration.spec 2019-07-02 11:33:49.000000000 +0200 @@ -12,18 +12,33 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # Name: yast2-registration -Version: 4.2.0 +Version: 4.2.5 Release: 0 +Summary: YaST2 - Registration Module +License: GPL-2.0-only +Group: System/YaST +Url: https://github.com/yast/yast-registration -BuildRoot: %{_tmppath}/%{name}-%{version}-build Source0: %{name}-%{version}.tar.bz2 # Y2Packager::ProductLicense +BuildRequires: update-desktop-files +BuildRequires: yast2 >= 4.0.63 +BuildRequires: yast2-devtools >= 4.2.2 +BuildRequires: yast2-slp >= 3.1.9 +BuildRequires: rubygem(rspec) +BuildRequires: rubygem(suse-connect) >= 0.3.11 +BuildRequires: rubygem(yast-rake) >= 0.2.5 +# updated product renames +BuildRequires: yast2-packager >= 4.0.40 +BuildRequires: yast2-update >= 3.1.36 + +# Y2Packager::ProductLicense Requires: yast2 >= 4.0.63 # "dupAllowVendorChange" option in Pkg.SetSolverFlags() Requires: yast2-pkg-bindings >= 3.1.34 @@ -31,48 +46,29 @@ Requires: yast2-ruby-bindings >= 3.1.12 # SUSE::Connect::YaST.list_installer_updates Requires: rubygem(suse-connect) >= 0.2.37 - # NOTE: Workaround for bsc#947482, SUSEConnect is actually not needed by the # YaST registration module, it is used just to install the Connect dependencies. # # TODO: Remove it once the SUSEConnect dependencies are properly moved to the # suse-connect gem. Requires: SUSEConnect >= 0.2.37 - Requires: yast2-add-on >= 3.1.8 Requires: yast2-slp >= 3.1.9 -# packager/product_patterns.rb -Requires: yast2-packager >= 3.1.95 +# Packager ProductLicense#HandleLicenseDialogRet allowing "refuse" action +Requires: yast2-packager >= 4.2.16 Requires: yast2-update >= 3.1.36 -# Y2Packager::ProductLicense -BuildRequires: update-desktop-files -BuildRequires: yast2 >= 4.0.63 -BuildRequires: yast2-devtools >= 3.1.39 -BuildRequires: yast2-slp >= 3.1.9 -BuildRequires: rubygem(rspec) -BuildRequires: rubygem(suse-connect) >= 0.3.11 -BuildRequires: rubygem(yast-rake) >= 0.2.5 -# updated product renames -BuildRequires: yast2-packager >= 4.0.40 -BuildRequires: yast2-update >= 3.1.36 - BuildArch: noarch # SUSEConnect does not build for i586 and s390 and is not supported on those architectures # bsc#1088552 ExcludeArch: %ix86 s390 -Summary: YaST2 - Registration Module -License: GPL-2.0-only -Group: System/YaST -Url: https://github.com/yast/yast-registration - %description The registration module to register products and/or to fetch an update source (mirror) automatically. %prep -%setup -n %{name}-%{version} +%setup -q %build @@ -81,17 +77,16 @@ %install %yast_install +%yast_metainfo %files -%defattr(-,root,root) -%{yast_ybindir}/* -%{yast_desktopdir}/*.desktop -%{yast_clientdir}/*.rb -%{yast_ydatadir}/registration -%{yast_schemadir}/autoyast/rnc/*.rnc -%{yast_libdir}/registration -%{yast_libdir}/yast -%{yast_libdir}/yast/suse_connect.rb +%{yast_ybindir} +%{yast_desktopdir} +%{yast_metainfodir} +%{yast_clientdir} +%{yast_ydatadir} +%{yast_schemadir} +%{yast_libdir} %{yast_icondir} %doc %{yast_docdir} %license COPYING diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-4.2.0/src/desktop/add_extensions.desktop new/yast2-registration-4.2.5/src/desktop/add_extensions.desktop --- old/yast2-registration-4.2.0/src/desktop/add_extensions.desktop 2019-04-01 12:24:45.000000000 +0200 +++ new/yast2-registration-4.2.5/src/desktop/add_extensions.desktop 1970-01-01 01:00:00.000000000 +0100 @@ -1,16 +0,0 @@ -[Desktop Entry] -Type=Application -Categories=Settings;System;Qt;X-SuSE-YaST;X-SuSE-YaST-Software; - -X-SuSE-YaST-Call=scc -X-SuSE-YaST-Argument=select_extensions -X-SuSE-YaST-RootOnly=yes -X-SuSE-YaST-Group=Software -X-SuSE-YaST-Keywords=extensions,modules,software,registration,scc,package,repositories - -Icon=yast-addon-extension -Exec=/usr/bin/xdg-su -c "/sbin/yast2 scc select_extensions" - -Name=Add System Extensions or Modules -GenericName=Add System Extensions or Modules -StartupNotify=true diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-4.2.0/src/desktop/customer_center.desktop new/yast2-registration-4.2.5/src/desktop/customer_center.desktop --- old/yast2-registration-4.2.0/src/desktop/customer_center.desktop 2019-04-01 12:24:45.000000000 +0200 +++ new/yast2-registration-4.2.5/src/desktop/customer_center.desktop 1970-01-01 01:00:00.000000000 +0100 @@ -1,21 +0,0 @@ -[Desktop Entry] -Type=Application -Categories=Settings;System;Qt;X-SuSE-YaST;X-SuSE-YaST-Software; - -X-SuSE-YaST-Call=registration -X-SuSE-YaST-AutoInstClient=scc_auto -X-SuSE-YaST-RootOnly=false -X-SuSE-YaST-Group=Software -X-SuSE-YaST-AutoInst=all -X-SuSE-YaST-AutoInstClonable=false -X-SuSE-YaST-AutoInstRequires=lan,proxy -X-SuSE-YaST-AutoInstSchema=registration.rnc -X-SuSE-YaST-AutoInstResource=suse_register -X-SuSE-YaST-Keywords=scc,software,registration,smt,rmt,module,extension - -Icon=yast-product-registration -Exec=/usr/bin/xdg-su -c "/sbin/yast2 scc" - -Name=Product Registration -GenericName=Product Registration -StartupNotify=true diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-4.2.0/src/desktop/org.opensuse.yast.SCC.AddExtensions.desktop new/yast2-registration-4.2.5/src/desktop/org.opensuse.yast.SCC.AddExtensions.desktop --- old/yast2-registration-4.2.0/src/desktop/org.opensuse.yast.SCC.AddExtensions.desktop 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-registration-4.2.5/src/desktop/org.opensuse.yast.SCC.AddExtensions.desktop 2019-07-02 11:33:49.000000000 +0200 @@ -0,0 +1,17 @@ +[Desktop Entry] +Type=Application +Categories=Settings;System;Qt;X-SuSE-YaST;X-SuSE-YaST-Software; + +X-SuSE-YaST-Call=scc +X-SuSE-YaST-Argument=select_extensions +X-SuSE-YaST-RootOnly=yes +X-SuSE-YaST-Group=Software +X-SuSE-YaST-Keywords=extensions,modules,software,registration,scc,package,repositories + +Icon=yast-addon-extension +Exec=/usr/bin/xdg-su -c "/sbin/yast2 scc select_extensions" + +Name=YaST System Extensions +GenericName=System Extensions +Comment=Select System Extensions or Modules +StartupNotify=true diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-4.2.0/src/desktop/org.opensuse.yast.SCC.desktop new/yast2-registration-4.2.5/src/desktop/org.opensuse.yast.SCC.desktop --- old/yast2-registration-4.2.0/src/desktop/org.opensuse.yast.SCC.desktop 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-registration-4.2.5/src/desktop/org.opensuse.yast.SCC.desktop 2019-07-02 11:33:49.000000000 +0200 @@ -0,0 +1,22 @@ +[Desktop Entry] +Type=Application +Categories=Settings;System;Qt;X-SuSE-YaST;X-SuSE-YaST-Software; + +X-SuSE-YaST-Call=registration +X-SuSE-YaST-AutoInstClient=scc_auto +X-SuSE-YaST-RootOnly=false +X-SuSE-YaST-Group=Software +X-SuSE-YaST-AutoInst=all +X-SuSE-YaST-AutoInstClonable=false +X-SuSE-YaST-AutoInstRequires=lan,proxy +X-SuSE-YaST-AutoInstSchema=registration.rnc +X-SuSE-YaST-AutoInstResource=suse_register +X-SuSE-YaST-Keywords=scc,software,registration,smt,rmt,module,extension + +Icon=yast-product-registration +Exec=/usr/bin/xdg-su -c "/sbin/yast2 scc" + +Name=YaST Product Registration +GenericName=Product Registration +Comment=Register your Product with the Vendor +StartupNotify=true diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-4.2.0/src/lib/registration/addon.rb new/yast2-registration-4.2.5/src/lib/registration/addon.rb --- old/yast2-registration-4.2.0/src/lib/registration/addon.rb 2019-04-01 12:24:45.000000000 +0200 +++ new/yast2-registration-4.2.5/src/lib/registration/addon.rb 2019-07-02 11:33:49.000000000 +0200 @@ -309,12 +309,12 @@ } end - # is the addon available? SMT may have mirrored only some extensions, + # is the addon available? SMT/RMT may have mirrored only some extensions, # the not mirrored extensions are marked as not available # @return [Boolean] true if the addon is available to register def available? # explicitly check for false, undefined (nil) means it is available, - # it's only reported by SMT + # it's only reported by SMT/RMT @pure_addon.available != false end @@ -331,6 +331,13 @@ end end + # Whether the EULA acceptance is required + # + # @return [Boolean] true if a not empty EULA url is present; false otherwise + def eula_acceptance_needed? + !eula_url.to_s.strip.empty? + end + def self.dump_addons # dump the downloaded data to a file for easier debugging, # avoid write failures when running as an unprivileged user (rspec tests) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-4.2.0/src/lib/registration/clients/inst_migration_repos.rb new/yast2-registration-4.2.5/src/lib/registration/clients/inst_migration_repos.rb --- old/yast2-registration-4.2.0/src/lib/registration/clients/inst_migration_repos.rb 2019-04-01 12:24:45.000000000 +0200 +++ new/yast2-registration-4.2.5/src/lib/registration/clients/inst_migration_repos.rb 2019-07-02 11:33:49.000000000 +0200 @@ -45,7 +45,7 @@ # copy the old NCC/SCC credentials to inst-sys SwMgmt.copy_old_credentials(destdir) - # import the SMT certificate to inst-sys + # import the SMT/RMT certificate to inst-sys import_ssl_certificates end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-4.2.0/src/lib/registration/connect_helpers.rb new/yast2-registration-4.2.5/src/lib/registration/connect_helpers.rb --- old/yast2-registration-4.2.0/src/lib/registration/connect_helpers.rb 2019-04-01 12:24:45.000000000 +0200 +++ new/yast2-registration-4.2.5/src/lib/registration/connect_helpers.rb 2019-07-02 11:33:49.000000000 +0200 @@ -98,7 +98,7 @@ report_error(message_prefix + _("Connection to registration server failed."), error_code_message + error_msg) when 404 - # update the message when an old SMT server is found + # update the message when an old SMT/RMT server is found check_smt_api(error_msg) report_error(message_prefix + _("Connection to registration server failed."), error_code_message + error_msg) @@ -139,7 +139,7 @@ false rescue JSON::ParserError => e log.error "JSON parse error" - # update the message when an old SMT server is found + # update the message when an old SMT/RMT server is found check_smt_api(e.message) details_error(message_prefix + _("Cannot parse the data from server."), e.message) false @@ -287,10 +287,10 @@ # @param error_msg [String] the received error message, the content might be replaced def self.check_smt_api(error_msg) url = UrlHelpers.registration_url - # no SMT/custom server used + # no SMT/RMT/custom server used return if url == SUSE::Connect::YaST::DEFAULT_URL - # test old SMT instance + # test old SMT/RMT instance smt_status = SmtStatus.new(url, insecure: Helpers.insecure_registration) return unless smt_status.ncc_api_present? @@ -335,7 +335,7 @@ # 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 + # probably missing NCC->SCC sync, display a hint unless SMT/RMT is used if [nil, SUSE::Connect::YaST::DEFAULT_URL].include?(UrlHelpers.registration_url) msg += "\n\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-4.2.0/src/lib/registration/sw_mgmt.rb new/yast2-registration-4.2.5/src/lib/registration/sw_mgmt.rb --- old/yast2-registration-4.2.0/src/lib/registration/sw_mgmt.rb 2019-04-01 12:24:45.000000000 +0200 +++ new/yast2-registration-4.2.5/src/lib/registration/sw_mgmt.rb 2019-07-02 11:33:49.000000000 +0200 @@ -486,7 +486,7 @@ log.info "Copying the old credentials from previous installation" log.info "Copying #{file} to #{new_file}" - # SMT uses extra ACL permissions, make sure they are kept in the copied file, + # SMT/RMT uses extra ACL permissions, make sure they are kept in the copied file, # (use "cp -a ", ::FileUtils.cp(..., preserve: true) cannot be used as it preserves only # the traditional Unix file permissions, the extended ACLs are NOT copied!) Yast::Execute.locally!("cp", "-a", file, new_file) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-4.2.0/src/lib/registration/ui/addon_eula_dialog.rb new/yast2-registration-4.2.5/src/lib/registration/ui/addon_eula_dialog.rb --- old/yast2-registration-4.2.0/src/lib/registration/ui/addon_eula_dialog.rb 2019-04-01 12:24:45.000000000 +0200 +++ new/yast2-registration-4.2.5/src/lib/registration/ui/addon_eula_dialog.rb 2019-07-02 11:33:49.000000000 +0200 @@ -48,22 +48,17 @@ false ) - # Default: no EULA specified => accepted - eula_ret = :accepted - addons.each do |addon| - next unless addon.eula_url && !addon.eula_url.empty? + next unless addon.eula_acceptance_needed? + next if addon.registered? log.info "Addon '#{addon.name}' has an EULA at #{addon.eula_url}" eula_ret = accept_eula(addon) - # any declined license needs to be handled separately - break if eula_ret != :accepted + return eula_ret if eula_ret != :next end - # go back or abort if any EULA has not been accepted, let the user - # deselect the not accepted extension - eula_ret == :accepted ? :next : eula_ret + :next end private @@ -114,7 +109,7 @@ # @return [Symbol] :accepted, :back, :abort, :halt - user input def run_eula_dialog(eula_reader) base_product = false - cancel_action = "abort" + cancel_action = "refuse" ret = Yast::ProductLicense.HandleLicenseDialogRet(arg_ref(eula_reader.licenses), base_product, cancel_action) log.debug "EULA dialog result: #{ret}" @@ -123,17 +118,20 @@ # ask user to accept an addon EULA # @param [Addon] addon the addon - # @return [Symbol] :accepted, :back, :abort, :halt + # @return [Symbol] :back, :abort, :halt def accept_eula(addon) Dir.mktmpdir("extension-eula-") do |tmpdir| return :back unless download_eula(addon, tmpdir) + eula_reader = EulaReader.new(tmpdir) license = find_license(addon, eula_reader) - return :accepted if license && license.accepted? + return :next if license && license.accepted? setup_eula_dialog(addon, eula_reader, tmpdir) ret = run_eula_dialog(eula_reader) license.accept! if ret == :accepted + + return :next if [:accepted, :refused].include?(ret) ret end ensure diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-4.2.0/src/lib/registration/ui/autoyast_config_dialog.rb new/yast2-registration-4.2.5/src/lib/registration/ui/autoyast_config_dialog.rb --- old/yast2-registration-4.2.0/src/lib/registration/ui/autoyast_config_dialog.rb 2019-04-01 12:24:45.000000000 +0200 +++ new/yast2-registration-4.2.5/src/lib/registration/ui/autoyast_config_dialog.rb 2019-07-02 11:33:49.000000000 +0200 @@ -62,8 +62,8 @@ ) help_text += _( "<p>If your network deploys a custom registration server, set the " \ - "correct URL of the server\nand the location of the SMT " \ - "certificate in <b>SMT Server Settings</b>. Refer\nto your SMT " \ + "correct URL of the server\nand the location of the RMT " \ + "certificate in <b>RMT Server Settings</b>. Refer\nto your RMT " \ "manual for further assistance.</p>" ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-4.2.0/src/lib/registration/ui/base_system_registration_dialog.rb new/yast2-registration-4.2.5/src/lib/registration/ui/base_system_registration_dialog.rb --- old/yast2-registration-4.2.0/src/lib/registration/ui/base_system_registration_dialog.rb 2019-04-01 12:24:45.000000000 +0200 +++ new/yast2-registration-4.2.5/src/lib/registration/ui/base_system_registration_dialog.rb 2019-07-02 11:33:49.000000000 +0200 @@ -142,7 +142,7 @@ self.action = :register_scc end - # Handle selection the 'Register System via local SMT/RMT Server' option + # Handle selection the 'Register System via local RMT Server' option # # Set the dialog's action to :register_local def register_local_handler @@ -282,7 +282,7 @@ end # Example URL to be used in the :register_local UI - EXAMPLE_SMT_URL = "https://smt.example.com".freeze + EXAMPLE_RMT_URL = "https://rmt.example.com".freeze # Widgets for :register_local action # @@ -294,7 +294,7 @@ Id(:register_local), Opt(:notify), # TRANSLATORS: radio button - _("Register System via local SMT/RMT Server"), + _("Register System via local RMT Server"), action == :register_local ) ), @@ -608,7 +608,7 @@ VALID_CUSTOM_URL_SCHEMES = ["http", "https"].freeze - # Determine whether an URL is valid and suitable to be used as local SMT/RMT server + # Determine whether an URL is valid and suitable to be used as local RMT server # # @return [Boolean] true if it's valid; false otherwise. def valid_custom_url?(custom_url) @@ -630,7 +630,7 @@ # use an example URL if no server was found via SLP urls = slp_urls - urls.empty? ? [EXAMPLE_SMT_URL] : urls + urls.empty? ? [EXAMPLE_RMT_URL] : urls end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-4.2.0/src/lib/registration/ui/migration_repos_workflow.rb new/yast2-registration-4.2.5/src/lib/registration/ui/migration_repos_workflow.rb --- old/yast2-registration-4.2.0/src/lib/registration/ui/migration_repos_workflow.rb 2019-04-01 12:24:45.000000000 +0200 +++ new/yast2-registration-4.2.5/src/lib/registration/ui/migration_repos_workflow.rb 2019-07-02 11:33:49.000000000 +0200 @@ -335,11 +335,22 @@ def load_migrations_for_products(products, remote_product) log.info "Loading offline migrations for target product: #{remote_product.inspect}" log.info "Installed products: #{products.inspect}" + self.migrations = registration_ui.offline_migration_products(products, remote_product) if migrations.empty? - # TRANSLATORS: Error message - Yast::Report.Error(_("No migration product found.")) + msg = [ + # TRANSLATORS. Error message + _("No migration product found."), + # TRANSLATORS: Help message, %{product} is the product name + _("Please, boot the original system and make sure " \ + "that all registerable products are correctly registered.\n" \ + "Also check that the installed system is supported for upgrade to \n" \ + "%{product}.") % { product: Y2Packager::ProductUpgrade.new_base_product.display_name } + ] + + Yast::Report.Error(msg.join("\n\n")) + return Yast::Mode.auto ? :abort : :empty end @@ -541,16 +552,16 @@ end # check the system status at upgrade and return the symbol for the next step - # @return [Symabol] workflow symbol, :skip => do not use the SCC/SMT upgrade + # @return [Symabol] workflow symbol, :skip => do not use the SCC/SMT/RMT upgrade # (unregistered system or explicitly requested by user), :next => - # continue with the SCC/SMT based upgrade + # continue with the SCC/SMT/RMT based upgrade def system_upgrade_check log.info "System upgrade mode detected" # media based upgrade requested by user if Yast::Linuxrc.InstallInf("MediaUpgrade") == "1" explicit_media_upgrade return :skip - # the system is registered, continue with the SCC/SMT based upgrade + # the system is registered, continue with the SCC/SMT/RMT based upgrade elsif Registration.is_registered? log.info "The system is registered, using the registration server for upgrade" return :next @@ -611,7 +622,7 @@ # @return [String] translated message def media_upgrade(registered) # TRANSLATORS: Media based upgrade requested by user (1/3) - # User requested media based upgrade which does not use SCC/SMT + # User requested media based upgrade which does not use SCC/SMT/RMT # but the downloaded media (physical DVD or shared repo on a local server). ret = _("<h2>Media Based Upgrade</h2><p>The media based upgrade is requested. " \ "In this mode YaST will not contact the registration server to obtain " \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-4.2.0/src/lib/registration/ui/migration_selection_dialog.rb new/yast2-registration-4.2.5/src/lib/registration/ui/migration_selection_dialog.rb --- old/yast2-registration-4.2.0/src/lib/registration/ui/migration_selection_dialog.rb 2019-04-01 12:24:45.000000000 +0200 +++ new/yast2-registration-4.2.5/src/lib/registration/ui/migration_selection_dialog.rb 2019-07-02 11:33:49.000000000 +0200 @@ -273,17 +273,17 @@ product_name = CGI.escapeHTML(product.friendly_name) # explicitly check for false, the flag is not returned by SCC, this is - # a SMT specific check (in SCC all products are implicitly available) + # a SMT/RMT specific check (in SCC all products are implicitly available) if product.available == false - # a product can be unavailable only when using SMT, the default + # a product can be unavailable only when using SMT/RMT, the default # SCC URL should be never used url = UrlHelpers.registration_url || SUSE::Connect::YaST::DEFAULT_URL # TRANSLATORS: An error message displayed in the migration details. - # The product has not been mirrored to the SMT server and cannot be used - # for migration. The SMT admin has to mirror the product to allow + # The product has not been mirrored to the SMT/RMT server and cannot be used + # for migration. The SMT/RMT admin has to mirror the product to allow # using the selected migration. - # %{url} is the URL of the registration server (SMT) + # %{url} is the URL of the SMT/RMT registration server # %{product} is a full product name, e.g. "SUSE Linux Enterprise Server 12" return Yast::HTML.Colorize( _("ERROR: Product <b>%{product}</b> is not available at the " \ @@ -312,7 +312,8 @@ new_product_name = CGI.escapeHTML(new_product.friendly_name) installed_version = old_product["version_version"] - if installed_version == new_product.version + # check also the product name (when upgrading Leap 15.1 to SLES15-SP1 both are 15.1) + if installed_version == new_product.version && new_product.identifier == old_product["name"] # TRANSLATORS: Summary message, rich text format # %s is a product name, e.g. "SUSE Linux Enterprise Server 12" return _("%s <b>stays unchanged.</b>") % new_product_name @@ -320,8 +321,9 @@ old_product_name = SwMgmt.product_label(old_product) - # use Gem::Version for version compare - if Gem::Version.new(installed_version) < Gem::Version.new(new_product.version) + # use Gem::Version for version compare, the versions might be the same + # if the products are different + if Gem::Version.new(installed_version) <= Gem::Version.new(new_product.version) # TRANSLATORS: Summary message, rich text format # %{old_product} is a product name, e.g. "SUSE Linux Enterprise Server 12" # %{new_product} is a product name, e.g. "SUSE Linux Enterprise Server 12 SP1 x86_64" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-4.2.0/src/lib/registration/ui/registration_sync_workflow.rb new/yast2-registration-4.2.5/src/lib/registration/ui/registration_sync_workflow.rb --- old/yast2-registration-4.2.0/src/lib/registration/ui/registration_sync_workflow.rb 2019-04-01 12:24:45.000000000 +0200 +++ new/yast2-registration-4.2.5/src/lib/registration/ui/registration_sync_workflow.rb 2019-07-02 11:33:49.000000000 +0200 @@ -40,6 +40,12 @@ self.registration_ui = RegistrationUI.new(registration) end + # workaround for rollback from the Leap => SLES migration, + # maps installed => activated product + SYNC_FALLBACKS = { + "openSUSE" => "SLES" + }.freeze + # restore the registration status # @return [Symbol] :next on sucess, :abort on error def run_sequence @@ -52,7 +58,9 @@ activated = registration.activated_products.map(&:identifier) products = SwMgmt.installed_products.each_with_object([]) do |product, result| - result << product if activated.include?(product["name"]) + name = product["name"] + next unless activated.include?(name) || activated.include?(SYNC_FALLBACKS[name]) + result << product end # Ask the user about adding all the registered but not installed addons diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-4.2.0/src/lib/registration/ui/regservice_selection_dialog.rb new/yast2-registration-4.2.5/src/lib/registration/ui/regservice_selection_dialog.rb --- old/yast2-registration-4.2.0/src/lib/registration/ui/regservice_selection_dialog.rb 2019-04-01 12:24:45.000000000 +0200 +++ new/yast2-registration-4.2.5/src/lib/registration/ui/regservice_selection_dialog.rb 2019-07-02 11:33:49.000000000 +0200 @@ -18,7 +18,7 @@ module Registration module UI - # This class implements a SCC/SMT service selection dialog. + # This class implements a SCC/RMT service selection dialog. class RegserviceSelectionDialog < Yast::Dialogs::ServiceSelection Yast.import "UI" Yast.import "Label" @@ -27,14 +27,14 @@ # Run dialog # # The return value will be: - # * A service in case one SMT server was selected + # * A service in case one RMT server was selected # * :scc symbol if default SCC was selected # * :cancel symbol if the SCC was canceled (pressing the 'cancel' button) # # @example Select the default SCC service # Registration::UI::SelectionServiceDialog.run(services) #=> :scc # - # @example Select some SMT service + # @example Select some RMT service # Registration::UI::SelectionServiceDialog.run(services) # #=> #<Yast::SlpServiceClass::Service...> # diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-4.2.0/src/lib/registration/widgets/registration_code.rb new/yast2-registration-4.2.5/src/lib/registration/widgets/registration_code.rb --- old/yast2-registration-4.2.0/src/lib/registration/widgets/registration_code.rb 2019-04-01 12:24:45.000000000 +0200 +++ new/yast2-registration-4.2.5/src/lib/registration/widgets/registration_code.rb 2019-07-02 11:33:49.000000000 +0200 @@ -35,7 +35,7 @@ end def label - _("Registration Code or SMT Server URL") + _("Registration Code or RMT Server URL") end # Initialize the widget with stored values @@ -59,7 +59,7 @@ register end - # Try to register the system against SCC or a custom SMT depending on if + # Try to register the system against SCC or a custom RMT depending on if # the value is an URL or not. # # @return [Boolean] false if not attempted or failed and true if success @@ -95,7 +95,7 @@ def help _( "<p>\n" \ - "The SMT Server URL must use http or https protocol, " \ + "The RMT Server URL must use http or https protocol, " \ "other schemes are not supported." \ "</p>\n" ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-4.2.0/test/base_system_registration_dialog_test.rb new/yast2-registration-4.2.5/test/base_system_registration_dialog_test.rb --- old/yast2-registration-4.2.0/test/base_system_registration_dialog_test.rb 2019-04-01 12:24:45.000000000 +0200 +++ new/yast2-registration-4.2.5/test/base_system_registration_dialog_test.rb 2019-07-02 11:33:49.000000000 +0200 @@ -145,8 +145,8 @@ end end - context "when user enters a local SMT server" do - it "registers the system via local SMT server" do + context "when user enters a local RMT server" do + it "registers the system via local RMT server" do allow(Yast::UI).to receive(:QueryWidget).with(:custom_url, :Value) .and_return(custom_url) expect(Yast::UI).to receive(:UserInput).and_return(:register_local, :next) @@ -165,10 +165,10 @@ end end - context "when user enters an invalid local SMT server" do + context "when user enters an invalid local RMT server" do it "shows an error and does not try to register the system" do allow(Yast::UI).to receive(:QueryWidget).with(:custom_url, :Value) - .and_return("ftp://smt.suse.com") + .and_return("ftp://rmt.suse.com") expect(Yast::UI).to receive(:UserInput).and_return(:register_local, :next, :abort) expect(Registration::UI::AbortConfirmation).to receive(:run).and_return(true) expect(Yast::Report).to receive(:Error).with(_("Invalid URL.")).and_return(true) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-4.2.0/test/registration/ui/addon_eula_dialog_test.rb new/yast2-registration-4.2.5/test/registration/ui/addon_eula_dialog_test.rb --- old/yast2-registration-4.2.0/test/registration/ui/addon_eula_dialog_test.rb 2019-04-01 12:24:45.000000000 +0200 +++ new/yast2-registration-4.2.5/test/registration/ui/addon_eula_dialog_test.rb 2019-07-02 11:33:49.000000000 +0200 @@ -15,13 +15,129 @@ require "registration/ui/addon_eula_dialog" describe Registration::UI::AddonEulaDialog do - subject(:dialog) { described_class.new([addon]) } + subject(:dialog) { described_class.new(addons) } - let(:addon) do - addon_generator("name" => "SLES", "eula_url" => "https://suse.com/download/SLES/eula") + let(:params) { { "eula_url" => "http://example.addon-eula.url" } } + let(:addons) { [registered_addon, addon_wo_eula, addon_with_eula] } + + let(:addon_wo_eula) { Registration::Addon.new(addon_generator) } + let(:addon_with_eula) { Registration::Addon.new(addon_generator(params)) } + let(:second_addon_with_eula) { Registration::Addon.new(addon_generator(params)) } + let(:registered_addon) { Registration::Addon.new(addon_generator(params)) } + + let(:product_license) do + instance_double(Y2Packager::ProductLicense, accepted?: false, accept!: true) + end + + describe "#run" do + before do + allow(Yast::Wizard).to receive(:SetContents) + allow(dialog).to receive(:find_license).and_return(product_license) + allow(dialog).to receive(:download_eula).and_return(true) + registered_addon.registered + end + + context "when there are no EULA acceptances to show" do + let(:addons) { [registered_addon, addon_wo_eula] } + + it "does not display the EULA dialog" do + expect(Yast::ProductLicense).to_not receive(:DisplayLicenseDialogWithTitle) + + dialog.run + end + + it "returns :next" do + expect(dialog.run).to eq(:next) + end + end + + context "when there are EULA acceptances pending" do + let(:addons) { [addon_with_eula, second_addon_with_eula] } + let(:first_dialog_response) { :refused } + let(:second_dialog_response) { :accepted } + + before do + allow(Yast::ProductLicense).to receive(:HandleLicenseDialogRet) + .and_return(first_dialog_response, second_dialog_response) + end + + context "and the user wants to go back" do + let(:first_dialog_response) { :back } + + it "returns :back" do + expect(subject.run).to eq(:back) + end + end + + context "and the user wants to abort" do + let(:first_dialog_response) { :abort } + + it "returns :abort" do + expect(subject.run).to eq(:abort) + end + end + + context "but an EULA cannot be downloaded" do + before do + allow(dialog).to receive(:download_eula).and_return(false) + end + + it "does not display the eula dialog" do + expect(Yast::ProductLicense).to_not receive(:DisplayLicenseDialogWithTitle) + + dialog.run + end + + it "returns :back" do + expect(dialog.run).to eq(:back) + end + end + end + + context "when EULA is accepted" do + let(:addons) { [addon_with_eula] } + + before do + allow(Yast::ProductLicense).to receive(:HandleLicenseDialogRet) + .and_return(:accepted) + end + + it "sets it as accepted" do + expect(product_license).to receive(:accept!) + + subject.run + end + + it "returns :next" do + expect(dialog.run).to eq(:next) + + subject.run + end + end + + context "when EULA is refused" do + let(:addons) { [addon_with_eula] } + + before do + allow(Yast::ProductLicense).to receive(:HandleLicenseDialogRet) + .and_return(:refused) + end + + it "does not set it as accepted" do + expect(product_license).to_not receive(:accept!) + end + + it "returns :next" do + expect(dialog.run).to eq(:next) + end + end end describe "#accept_eula" do + let(:addon) do + addon_generator("name" => "SLES", "eula_url" => "https://suse.com/download/SLES/eula") + end + let(:addons) { [addon] } let(:eula_downloader) { instance_double(Registration::EulaDownloader, download: true) } let(:eula_reader) { instance_double(Registration::EulaReader, licenses: licenses_files) } let(:licenses_files) do @@ -78,8 +194,8 @@ context "when the license was previously accepted" do let(:accepted?) { true } - it "returns :accepted" do - expect(dialog.send(:accept_eula, addon)).to eq(:accepted) + it "returns :next" do + expect(dialog.send(:accept_eula, addon)).to eq(:next) end it "does not show the eula" do diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-4.2.0/test/regservice_selection_dialog_spec.rb new/yast2-registration-4.2.5/test/regservice_selection_dialog_spec.rb --- old/yast2-registration-4.2.0/test/regservice_selection_dialog_spec.rb 2019-04-01 12:24:45.000000000 +0200 +++ new/yast2-registration-4.2.5/test/regservice_selection_dialog_spec.rb 2019-07-02 11:33:49.000000000 +0200 @@ -30,7 +30,7 @@ allow(Yast::SlpServiceClass::DnsCache).to receive(:resolve) .and_return("somehost") allow(Yast::SLP).to receive(:GetUnicastAttrMap) - .and_return(type: "server", description: "SMT") + .and_return(type: "server", description: "RMT") end describe "#run" do diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-4.2.0/test/sw_mgmt_spec.rb new/yast2-registration-4.2.5/test/sw_mgmt_spec.rb --- old/yast2-registration-4.2.0/test/sw_mgmt_spec.rb 2019-04-01 12:24:45.000000000 +0200 +++ new/yast2-registration-4.2.5/test/sw_mgmt_spec.rb 2019-07-02 11:33:49.000000000 +0200 @@ -294,15 +294,15 @@ subject.copy_old_credentials(root_dir) end - it "copies old SMT credentials at upgrade" do - smt_credentials = File.join(root_dir, target_dir, "SMT-http_smt_example_com") + it "copies old SMT/RMT credentials at upgrade" do + credentials = File.join(root_dir, target_dir, "RMT-http_example_com") allow(Dir).to receive(:[]).with(File.join(root_dir, target_dir, "*")) - .and_return([smt_credentials]) + .and_return([credentials]) allow(SUSE::Connect::YaST).to receive(:credentials).and_return(OpenStruct.new) expect(Yast::Execute).to receive(:locally!) - .with("cp", "-a", smt_credentials, File.join(target_dir, "SMT-http_smt_example_com")) + .with("cp", "-a", credentials, File.join(target_dir, "RMT-http_example_com")) subject.copy_old_credentials(root_dir) end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-registration-4.2.0/test/url_helpers_spec.rb new/yast2-registration-4.2.5/test/url_helpers_spec.rb --- old/yast2-registration-4.2.0/test/url_helpers_spec.rb 2019-04-01 12:24:45.000000000 +0200 +++ new/yast2-registration-4.2.5/test/url_helpers_spec.rb 2019-07-02 11:33:49.000000000 +0200 @@ -158,13 +158,13 @@ end end - context " when the system has been already registered with SMT server" do + context "when the system has been already registered with RMT server" do before do allow(File).to receive(:exist?) .with("/mnt/etc/SUSEConnect").and_return(true) end - it "returns URL of SMT server" do + it "returns URL of RMT server" do expect(File).to receive(:exist?).with(fixtures_file("SUSEConnect")).and_return(true) expect(SUSE::Connect::Config).to receive(:new).with(suse_connect) .and_return(SUSE::Connect::Config.new(fixtures_file("SUSEConnect")))
