Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package yast2-kdump for openSUSE:Factory checked in at 2022-08-23 14:25:51 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-kdump (Old) and /work/SRC/openSUSE:Factory/.yast2-kdump.new.2083 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-kdump" Tue Aug 23 14:25:51 2022 rev:111 rq:992023 version:4.5.3 Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-kdump/yast2-kdump.changes 2022-05-12 22:57:48.484591196 +0200 +++ /work/SRC/openSUSE:Factory/.yast2-kdump.new.2083/yast2-kdump.changes 2022-08-23 14:26:26.275198548 +0200 @@ -1,0 +2,16 @@ +Mon Aug 1 11:53:29 UTC 2022 - David Diaz <dgonza...@suse.com> + +- Allow using kdump auto resize (related to jsc#SLE-18441) +- 4.5.3 + +------------------------------------------------------------------- +Tue Jul 26 15:20:39 UTC 2022 - Ladislav Slez??k <lsle...@suse.cz> + +- Removed kdump RPM dependency, the package is checked and + installed at runtime. This removes the package from the YaST + container (related to bsc#1199840) +- For the inst-sys dependencies the respective skelcd-control-* + packages have been updated. +- 4.5.2 + +------------------------------------------------------------------- Old: ---- yast2-kdump-4.5.1.tar.bz2 New: ---- yast2-kdump-4.5.3.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-kdump.spec ++++++ --- /var/tmp/diff_new_pack.XUB3Y2/_old 2022-08-23 14:26:26.795199693 +0200 +++ /var/tmp/diff_new_pack.XUB3Y2/_new 2022-08-23 14:26:26.803199710 +0200 @@ -17,7 +17,7 @@ Name: yast2-kdump -Version: 4.5.1 +Version: 4.5.3 Release: 0 Summary: Configuration of kdump License: GPL-2.0-only @@ -43,14 +43,6 @@ # SpaceCalculation.GetPartitionInfo Requires: yast2-packager # do not use old installation with wrong finish order - -%ifarch ppc -Recommends: kdump -%else -Requires: kdump -%endif -Recommends: makedumpfile - Conflicts: yast2-installation < 3.1.198 Supplements: (yast2 and kdump) ++++++ yast2-kdump-4.5.1.tar.bz2 -> yast2-kdump-4.5.3.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-kdump-4.5.1/.github/workflows/ci.yml new/yast2-kdump-4.5.3/.github/workflows/ci.yml --- old/yast2-kdump-4.5.1/.github/workflows/ci.yml 2022-05-10 13:59:24.000000000 +0200 +++ new/yast2-kdump-4.5.3/.github/workflows/ci.yml 2022-08-01 14:01:10.000000000 +0200 @@ -22,6 +22,10 @@ - name: Git Checkout uses: actions/checkout@v1 + - name: Git Fix + # fix the ownership to pass a git security check + run: chown "$UID" . + # just for easier debugging... - name: Inspect Installed Packages run: rpm -qa | sort diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-kdump-4.5.1/package/yast2-kdump.changes new/yast2-kdump-4.5.3/package/yast2-kdump.changes --- old/yast2-kdump-4.5.1/package/yast2-kdump.changes 2022-05-10 13:59:24.000000000 +0200 +++ new/yast2-kdump-4.5.3/package/yast2-kdump.changes 2022-08-01 14:01:10.000000000 +0200 @@ -1,4 +1,20 @@ ------------------------------------------------------------------- +Mon Aug 1 11:53:29 UTC 2022 - David Diaz <dgonza...@suse.com> + +- Allow using kdump auto resize (related to jsc#SLE-18441) +- 4.5.3 + +------------------------------------------------------------------- +Tue Jul 26 15:20:39 UTC 2022 - Ladislav Slez??k <lsle...@suse.cz> + +- Removed kdump RPM dependency, the package is checked and + installed at runtime. This removes the package from the YaST + container (related to bsc#1199840) +- For the inst-sys dependencies the respective skelcd-control-* + packages have been updated. +- 4.5.2 + +------------------------------------------------------------------- Tue May 10 10:04:49 UTC 2022 - Imobach Gonzalez Sosa <igonzalezs...@suse.com> - Do not limit to kdumptool MaxLow when using fadump (related diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-kdump-4.5.1/package/yast2-kdump.spec new/yast2-kdump-4.5.3/package/yast2-kdump.spec --- old/yast2-kdump-4.5.1/package/yast2-kdump.spec 2022-05-10 13:59:24.000000000 +0200 +++ new/yast2-kdump-4.5.3/package/yast2-kdump.spec 2022-08-01 14:01:10.000000000 +0200 @@ -17,7 +17,7 @@ Name: yast2-kdump -Version: 4.5.1 +Version: 4.5.3 Release: 0 Summary: Configuration of kdump License: GPL-2.0-only @@ -43,14 +43,6 @@ # SpaceCalculation.GetPartitionInfo Requires: yast2-packager # do not use old installation with wrong finish order - -%ifarch ppc -Recommends: kdump -%else -Requires: kdump -%endif -Recommends: makedumpfile - Conflicts: yast2-installation < 3.1.198 Supplements: (yast2 and kdump) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-kdump-4.5.1/src/autoyast-rnc/kdump.rnc new/yast2-kdump-4.5.3/src/autoyast-rnc/kdump.rnc --- old/yast2-kdump-4.5.1/src/autoyast-rnc/kdump.rnc 2022-05-10 13:59:24.000000000 +0200 +++ new/yast2-kdump-4.5.3/src/autoyast-rnc/kdump.rnc 2022-08-01 14:01:10.000000000 +0200 @@ -36,6 +36,7 @@ element KDUMP_CPUS { STRING }? & element KDUMP_COMMANDLINE { STRING }? & element KDUMP_COMMANDLINE_APPEND { STRING }? & + element KDUMP_AUTO_RESIZE { STRING }? & element KDUMP_CONTINUE_ON_ERROR { STRING }? & element KDUMP_REQUIRED_PROGRAMS { STRING }? & element KDUMP_PRESCRIPT { STRING }? & diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-kdump-4.5.1/src/include/kdump/dialogs.rb new/yast2-kdump-4.5.3/src/include/kdump/dialogs.rb --- old/yast2-kdump-4.5.1/src/include/kdump/dialogs.rb 2022-05-10 13:59:24.000000000 +0200 +++ new/yast2-kdump-4.5.3/src/include/kdump/dialogs.rb 2022-08-01 14:01:10.000000000 +0200 @@ -523,25 +523,8 @@ end def kdump_memory_widget - widgets = [ - Left( - HBox( - Left(Label(_("Total System Memory [MiB]:"))), - Left(Label(Id("total_memory"), "0123456789")), - HStretch() - ) - ), - VSpacing(1), - Left( - HBox( - Left(Label(_("Usable Memory [MiB]:"))), - Left(ReplacePoint(Id("usable_memory_rp"), usable_memory_widget)), - HStretch() - ) - ), - VSpacing(1), - Left(ReplacePoint(Id("allocated_low_memory_rp"), low_memory_widget)) - ] + high_widgets = [] + if Kdump.high_memory_supported? high_min = Kdump.memory_limits[:min_high].to_i high_max = Kdump.memory_limits[:max_high].to_i @@ -551,8 +534,8 @@ min: high_min, max: high_max, default: high_default) - widgets << VSpacing(1) - widgets << Left( + high_widgets << VSpacing(1) + high_widgets << Left( IntField( Id("allocated_high_memory"), Opt(:notify), @@ -562,9 +545,39 @@ 0 ) ) - widgets << Left(Label(high_range)) + high_widgets << Left(Label(high_range)) end - VBox(*widgets) + + VBox( + Left( + CheckBox( + Id(:auto_resize), + Opt(:notify), + _("&Automatically Resize at Boot"), + false + ) + ), + VSpacing(1), + Left( + HBox( + Left(Label(_("Total System Memory [MiB]:"))), + Left(Label(Id("total_memory"), "0123456789")), + HStretch() + ) + ), + VBox( + Id(:allocated_memory_box), + Left( + HBox( + Left(Label(_("Usable Memory [MiB]:"))), + Left(ReplacePoint(Id("usable_memory_rp"), usable_memory_widget)), + HStretch() + ) + ), + VSpacing(1), + *high_widgets + ) + ) end def DisBackButton(_key) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-kdump-4.5.1/src/include/kdump/uifunctions.rb new/yast2-kdump-4.5.3/src/include/kdump/uifunctions.rb --- old/yast2-kdump-4.5.1/src/include/kdump/uifunctions.rb 2022-05-10 13:59:24.000000000 +0200 +++ new/yast2-kdump-4.5.3/src/include/kdump/uifunctions.rb 2022-08-01 14:01:10.000000000 +0200 @@ -1333,14 +1333,27 @@ # Updates the free memory displayed in the UI def update_usable_memory - value = Kdump.total_memory - allocated_memory + value = if UI.QueryWidget(Id(:auto_resize), :Value) + "---" + else + Kdump.total_memory - allocated_memory + end + UI.ReplaceWidget(Id("usable_memory_rp"), usable_memory_widget(value)) end # Function initializes option # "KdumpMemory" def InitKdumpMemory(_key) + if Kdump.using_fadump? + UI.ChangeWidget(Id(:auto_resize), :Enabled, false) + auto_resize = false + else + auto_resize = Kdump.KDUMP_SETTINGS["KDUMP_AUTO_RESIZE"] == "yes" + end + UI.ChangeWidget(Id(:auto_resize), :Value, auto_resize) if Kdump.total_memory > 0 + UI.ChangeWidget(Id(:allocated_memory_box), :Enabled, !auto_resize) UI.ChangeWidget( Id("total_memory"), :Value, @@ -1360,12 +1373,9 @@ end update_usable_memory else + UI.ChangeWidget(Id(:allocated_memory_box), :Enabled, false) UI.ChangeWidget(Id("total_memory"), :Value, "0") UI.ChangeWidget(Id("usable_memory"), :Value, "0") - UI.ChangeWidget(Id("allocated_low_memory"), :Enabled, false) - if Kdump.high_memory_supported? - UI.ChangeWidget(Id("allocated_high_memory"), :Enabled, false) - end end nil @@ -1383,6 +1393,10 @@ UI.ChangeWidget(Id(ret), :Value, send(ret.to_sym) + remaining) end update_usable_memory + elsif ret == :auto_resize + value = UI.QueryWidget(Id(ret), :Value) + UI.ChangeWidget(Id(:allocated_memory_box), :Enabled, !value) + update_usable_memory end nil @@ -1405,6 +1419,8 @@ # Store function for option # "KdumpMemory" def StoreKdumpMemory(_key, _event) + Kdump.KDUMP_SETTINGS["KDUMP_AUTO_RESIZE"] = + UI.QueryWidget(Id(:auto_resize), :Value) ? "yes" : "no" Kdump.allocated_memory[:low] = Builtins.tostring( UI.QueryWidget(Id("allocated_low_memory"), :Value) ) @@ -1439,14 +1455,20 @@ def HandleFADump(_key, event) return if event["ID"] != "use_fadump" + use_fadump_value = UI.QueryWidget(Id("use_fadump"), :Value) + # If cannot adjust the fadump usage - if !Kdump.use_fadump(UI.QueryWidget(Id("use_fadump"), :Value)) + if !Kdump.use_fadump(use_fadump_value) UI.ChangeWidget(Id("use_fadump"), :Value, false) return end - refresh_kdump_memory + UI.ChangeWidget(Id(:auto_resize), :Value, false) + UI.ChangeWidget(Id(:allocated_memory_box), :Enabled, true) + UI.ChangeWidget(Id(:auto_resize), :Enabled, !use_fadump_value) + update_usable_memory + refresh_kdump_memory nil end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-kdump-4.5.1/src/modules/Kdump.rb new/yast2-kdump-4.5.3/src/modules/Kdump.rb --- old/yast2-kdump-4.5.1/src/modules/Kdump.rb 2022-05-10 13:59:24.000000000 +0200 +++ new/yast2-kdump-4.5.3/src/modules/Kdump.rb 2022-08-01 14:01:10.000000000 +0200 @@ -149,6 +149,7 @@ "KDUMP_CPUS" => "", "KDUMP_COMMANDLINE" => "", "KDUMP_COMMANDLINE_APPEND" => "", + "KDUMP_AUTO_RESIZE" => "yes", "KEXEC_OPTIONS" => "", "KDUMP_IMMEDIATE_REBOOT" => "yes", "KDUMP_COPY_KERNEL" => "yes", @@ -1144,9 +1145,22 @@ end result = [] - high = @allocated_memory[:high] - result << high + "M,high" if high && high.to_i != 0 - low = @allocated_memory[:low] + if @KDUMP_SETTINGS["KDUMP_AUTO_RESIZE"] == "yes" + maxsize = total_memory / 2 + if high_memory_supported? + low = memory_limits[:default_low] + high = memory_limits[:max_high] + high = (maxsize - low.to_i).to_s if high.to_i > maxsize + else + high = memory_limits[:min_high] + low = memory_limits[:max_low] + low = maxsize.to_s if low.to_i > maxsize + end + else + high = @allocated_memory[:high] + low = @allocated_memory[:low] + end + result << "#{high}M,high" if high && high.to_i != 0 # Add the ',low' suffix only there is a ',high' one result << (result.empty? ? "#{low}M" : "#{low}M,low") if low && low.to_i != 0 @@ -1169,8 +1183,13 @@ end result = [] - high = @allocated_memory[:high] - low = @allocated_memory[:low] + if @KDUMP_SETTINGS["KDUMP_AUTO_RESIZE"] == "yes" + high = memory_limits[:default_high] + low = memory_limits[:default_low] + else + high = @allocated_memory[:high] + low = @allocated_memory[:low] + end sum = 0 sum += low.to_i if low sum += high.to_i if high diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-kdump-4.5.1/test/kdump_test.rb new/yast2-kdump-4.5.3/test/kdump_test.rb --- old/yast2-kdump-4.5.1/test/kdump_test.rb 2022-05-10 13:59:24.000000000 +0200 +++ new/yast2-kdump-4.5.3/test/kdump_test.rb 2022-08-01 14:01:10.000000000 +0200 @@ -433,13 +433,16 @@ end context "during autoinstallation" do - let(:bootlader_kernel_params) { ["73M,high"] } - let(:bootlader_xen_kernel_params) { ["73M\\<4G"] } + let(:bootloader_kernel_params) { ["2047M,high"] } + let(:bootloader_kernel_params_noauto) { ["73M,high"] } + let(:bootloader_xen_kernel_params) { ["73M\\<4G"] } before do allow(Yast::Mode).to receive(:autoinst).and_return true allow(Yast::Kdump.calibrator).to receive(:default_low).and_return 0 allow(Yast::Kdump.calibrator).to receive(:default_high).and_return 73 + allow(Yast::Kdump.calibrator).to receive(:max_high).and_return 4092 + allow(Yast::Kdump.calibrator).to receive(:total_memory).and_return 4095 Yast::Kdump.Import(profile) end @@ -483,10 +486,27 @@ it "writes a proposed crashkernel in the bootloader and enables the service" do expect(Yast::Bootloader) .to receive(:modify_kernel_params) - .with(:common, :recovery, "crashkernel" => bootlader_kernel_params) + .with(:common, :recovery, "crashkernel" => bootloader_kernel_params) expect(Yast::Bootloader) .to receive(:modify_kernel_params) - .with(:xen_host, "crashkernel" => bootlader_xen_kernel_params) + .with(:xen_host, "crashkernel" => bootloader_xen_kernel_params) + expect(Yast::Bootloader).to receive(:Write) + expect(Yast::Service).to receive(:Enable).with("kdump") + + Yast::Kdump.WriteKdumpBootParameter + end + end + + context "if kdump is requested, no value for crashkernel is supplied, and auto-resize is disabled" do + let(:profile) { { "add_crash_kernel" => true, "general" => { "KDUMP_AUTO_RESIZE" => "no" } } } + + it "writes a proposed crashkernel in the bootloader and enables the service" do + expect(Yast::Bootloader) + .to receive(:modify_kernel_params) + .with(:common, :recovery, "crashkernel" => bootloader_kernel_params_noauto) + expect(Yast::Bootloader) + .to receive(:modify_kernel_params) + .with(:xen_host, "crashkernel" => bootloader_xen_kernel_params) expect(Yast::Bootloader).to receive(:Write) expect(Yast::Service).to receive(:Enable).with("kdump") @@ -527,13 +547,16 @@ end context "during autoupgrade" do - let(:bootlader_kernel_params) { ["75M,high"] } - let(:bootlader_xen_kernel_params) { ["75M\\<4G"] } + let(:bootloader_kernel_params) { ["1968M,high"] } + let(:bootloader_kernel_params_noauto) { ["75M,high"] } + let(:bootloader_xen_kernel_params) { ["75M\\<4G"] } before do allow(Yast::Mode).to receive(:autoupgrade).and_return true allow(Yast::Kdump.calibrator).to receive(:default_low).and_return 0 allow(Yast::Kdump.calibrator).to receive(:default_high).and_return 75 + allow(Yast::Kdump.calibrator).to receive(:max_high).and_return 1968 + allow(Yast::Kdump.calibrator).to receive(:total_memory).and_return 4095 Yast::Kdump.Import(profile) end @@ -577,10 +600,27 @@ it "rewrites the bootloader crashkernel settings and enables the service" do expect(Yast::Bootloader) .to receive(:modify_kernel_params) - .with(:common, :recovery, "crashkernel" => bootlader_kernel_params) + .with(:common, :recovery, "crashkernel" => bootloader_kernel_params) expect(Yast::Bootloader) .to receive(:modify_kernel_params) - .with(:xen_host, "crashkernel" => bootlader_xen_kernel_params) + .with(:xen_host, "crashkernel" => bootloader_xen_kernel_params) + expect(Yast::Bootloader).to receive(:Write) + expect(Yast::Service).to receive(:Enable).with("kdump") + + Yast::Kdump.WriteKdumpBootParameter + end + end + + context "if kdump is requested, no value for crashkernel is supplied, and auto-resize is disabled" do + let(:profile) { { "add_crash_kernel" => true, "general" => { "KDUMP_AUTO_RESIZE" => "no" } } } + + it "rewrites the bootloader crashkernel settings and enables the service" do + expect(Yast::Bootloader) + .to receive(:modify_kernel_params) + .with(:common, :recovery, "crashkernel" => bootloader_kernel_params_noauto) + expect(Yast::Bootloader) + .to receive(:modify_kernel_params) + .with(:xen_host, "crashkernel" => bootloader_xen_kernel_params) expect(Yast::Bootloader).to receive(:Write) expect(Yast::Service).to receive(:Enable).with("kdump") @@ -773,6 +813,63 @@ end end end + + context "on a system with no low/high distinction" do + let(:bootloader_kernel_params) { ["650M"] } + let(:bootloader_xen_kernel_params) { ["93M\\<4G"] } + + before do + allow(Yast::Kdump.calibrator).to receive(:default_low).and_return 93 + allow(Yast::Kdump.calibrator).to receive(:max_low).and_return 650 + allow(Yast::Kdump.calibrator).to receive(:default_high).and_return 0 + allow(Yast::Kdump.calibrator).to receive(:max_high).and_return 0 + allow(Yast::Kdump.calibrator).to receive(:total_memory).and_return 2047 + end + + context "during autoinstallation" do + before do + allow(Yast::Mode).to receive(:autoinst).and_return true + Yast::Kdump.Import(profile) + end + + let(:profile) { { "add_crash_kernel" => true } } + + it "writes a proposed crashkernel in the bootloader and enables the service" do + expect(Yast::Bootloader) + .to receive(:modify_kernel_params) + .with(:common, :recovery, "crashkernel" => bootloader_kernel_params) + expect(Yast::Bootloader) + .to receive(:modify_kernel_params) + .with(:xen_host, "crashkernel" => bootloader_xen_kernel_params) + expect(Yast::Bootloader).to receive(:Write) + expect(Yast::Service).to receive(:Enable).with("kdump") + + Yast::Kdump.WriteKdumpBootParameter + end + end + + context "during autoupgrade" do + before do + allow(Yast::Mode).to receive(:autoupgrade).and_return true + Yast::Kdump.Import(profile) + end + + let(:profile) { { "add_crash_kernel" => true } } + + it "rewrites the bootloader crashkernel settings and enables the service" do + expect(Yast::Bootloader) + .to receive(:modify_kernel_params) + .with(:common, :recovery, "crashkernel" => bootloader_kernel_params) + expect(Yast::Bootloader) + .to receive(:modify_kernel_params) + .with(:xen_host, "crashkernel" => bootloader_xen_kernel_params) + expect(Yast::Bootloader).to receive(:Write) + expect(Yast::Service).to receive(:Enable).with("kdump") + + Yast::Kdump.WriteKdumpBootParameter + end + end + end end describe ".Update" do @@ -828,9 +925,14 @@ allow(Yast::Mode).to receive(:autoinst).and_return true end let(:profile) do - { "add_crash_kernel" => true, + { + "add_crash_kernel" => true, "crash_kernel" => "256M", - "general" => { "KDUMP_SAVEDIR"=>"file:///var/dummy" } } + "general" => { + "KDUMP_SAVEDIR" => "file:///var/dummy", + "KDUMP_AUTO_RESIZE" => "no" + } + } end # bnc#995750 it "does not override imported AutoYaST settings" do