Hello community, here is the log from the commit of package yast2-kdump for openSUSE:Factory checked in at 2014-03-21 12:14:09 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-kdump (Old) and /work/SRC/openSUSE:Factory/.yast2-kdump.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "yast2-kdump" Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-kdump/yast2-kdump.changes 2014-03-01 14:38:34.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.yast2-kdump.new/yast2-kdump.changes 2014-03-21 12:14:25.000000000 +0100 @@ -1,0 +2,24 @@ +Wed Mar 19 13:28:54 CET 2014 - snwint@suse.de + +- kdump for all (bnc #869086, bnc #804512) +- 3.1.9 + +------------------------------------------------------------------- +Tue Mar 18 15:54:20 UTC 2014 - mvidner@suse.com + +- actually write the sysconfig data for kdumptool calibrate (FATE#315241) +- 3.1.8 + +------------------------------------------------------------------- +Thu Mar 13 09:41:09 UTC 2014 - vmoravec@suse.com + +- Fix wrong systemd unit name in Kdump module (bnc#867714) +- 3.1.7 + +------------------------------------------------------------------- +Mon Mar 3 14:04:12 UTC 2014 - jreidinger@suse.com + +- Do not stretch browse button (BNC#865352) +- 3.1.6 + +------------------------------------------------------------------- Old: ---- yast2-kdump-3.1.5.tar.bz2 New: ---- yast2-kdump-3.1.9.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-kdump.spec ++++++ --- /var/tmp/diff_new_pack.XJwJUj/_old 2014-03-21 12:14:27.000000000 +0100 +++ /var/tmp/diff_new_pack.XJwJUj/_new 2014-03-21 12:14:27.000000000 +0100 @@ -17,7 +17,7 @@ Name: yast2-kdump -Version: 3.1.5 +Version: 3.1.9 Release: 0 Url: https://github.com/yast/yast-kdump ++++++ yast2-kdump-3.1.5.tar.bz2 -> yast2-kdump-3.1.9.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-kdump-3.1.5/package/yast2-kdump.changes new/yast2-kdump-3.1.9/package/yast2-kdump.changes --- old/yast2-kdump-3.1.5/package/yast2-kdump.changes 2014-02-28 14:10:48.000000000 +0100 +++ new/yast2-kdump-3.1.9/package/yast2-kdump.changes 2014-03-19 14:30:26.000000000 +0100 @@ -1,4 +1,28 @@ ------------------------------------------------------------------- +Wed Mar 19 13:28:54 CET 2014 - snwint@suse.de + +- kdump for all (bnc #869086, bnc #804512) +- 3.1.9 + +------------------------------------------------------------------- +Tue Mar 18 15:54:20 UTC 2014 - mvidner@suse.com + +- actually write the sysconfig data for kdumptool calibrate (FATE#315241) +- 3.1.8 + +------------------------------------------------------------------- +Thu Mar 13 09:41:09 UTC 2014 - vmoravec@suse.com + +- Fix wrong systemd unit name in Kdump module (bnc#867714) +- 3.1.7 + +------------------------------------------------------------------- +Mon Mar 3 14:04:12 UTC 2014 - jreidinger@suse.com + +- Do not stretch browse button (BNC#865352) +- 3.1.6 + +------------------------------------------------------------------- Fri Feb 28 12:22:11 UTC 2014 - fisiu@opensuse.org - Enable all possible values for dump data format. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-kdump-3.1.5/package/yast2-kdump.spec new/yast2-kdump-3.1.9/package/yast2-kdump.spec --- old/yast2-kdump-3.1.5/package/yast2-kdump.spec 2014-02-28 14:10:48.000000000 +0100 +++ new/yast2-kdump-3.1.9/package/yast2-kdump.spec 2014-03-19 14:30:26.000000000 +0100 @@ -17,7 +17,7 @@ Name: yast2-kdump -Version: 3.1.5 +Version: 3.1.9 Release: 0 Url: https://github.com/yast/yast-kdump diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-kdump-3.1.5/src/include/kdump/uifunctions.rb new/yast2-kdump-3.1.9/src/include/kdump/uifunctions.rb --- old/yast2-kdump-3.1.5/src/include/kdump/uifunctions.rb 2014-02-28 14:10:48.000000000 +0100 +++ new/yast2-kdump-3.1.9/src/include/kdump/uifunctions.rb 2014-03-19 14:30:26.000000000 +0100 @@ -91,7 +91,7 @@ InputField(Id("dir"), _("&Directory for Saving Dumps")), VBox( Label(""), - PushButton(Id("select_dir"), Opt(:hstretch), _("B&rowse")) + PushButton(Id("select_dir"), _("B&rowse")) ) ) ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-kdump-3.1.5/src/modules/Kdump.rb new/yast2-kdump-3.1.9/src/modules/Kdump.rb --- old/yast2-kdump-3.1.5/src/modules/Kdump.rb 2014-02-28 14:10:48.000000000 +0100 +++ new/yast2-kdump-3.1.9/src/modules/Kdump.rb 2014-03-19 14:30:26.000000000 +0100 @@ -32,7 +32,10 @@ module Yast class KdumpClass < Module + include Yast::Logger + FADUMP_KEY = "KDUMP_FADUMP" + KDUMP_SERVICE_NAME = "kdump" def main textdomain "kdump" @@ -501,34 +504,15 @@ # @return [String] value of crashkernel def BuildCrashkernelValue - # if user doesn't modified or select don't modify - # return readed value + # If user didn't modify or select return old value. return @crashkernel_param_value if @crashkernel_list_ranges - crash_value = "" - crash_value = Ops.add(@allocated_memory, "M") - - # bnc#563905 problem with offset in crashkernel - if Arch.i386 || Arch.x86_64 || Arch.ia64 || Arch.ppc64 - Builtins.y2milestone( - "i386, x86_64, ia64 and ppc64 platforms are without offset" - ) - else - if Mode.normal - Popup.Error( - _("Unsupported architecture, \"crashkernel\" was not added") - ) - end - Builtins.y2error("Unsupported platform/architecture...") - end - - reserved_memory = Builtins.tostring( - Ops.multiply(2, Builtins.tointeger(@allocated_memory)) - ) + crash_value = @allocated_memory + "M" + reserved_memory = (@allocated_memory.to_i * 2).to_s + crash_value = reserved_memory + "M-:" + crash_value + log.info "built crashkernel value is #{crash_value}" - crash_value = Ops.add(Ops.add(reserved_memory, "M-:"), crash_value) - Builtins.y2milestone("builded crashkernel value is %1", crash_value) crash_value end @@ -542,7 +526,7 @@ def convertCrashkernelForXEN(crash) crash_value = "" if crash != "" - crash_value = Ops.add(getAllocatedMemory(crash), "M") + crash_value = Ops.add(getAllocatedMemory(crash), "M") # bnc#563905 problem with offset in crashkernel #if ((Arch::i386()) ||(Arch::x86_64()) || Arch::ppc64()) # crash_value = crash_value + "@16M"; @@ -669,17 +653,16 @@ end TEMPORARY_CONFIG_FILE = "/var/lib/YaST2/kdump.sysconfig" + TEMPORARY_CONFIG_PATH = Path.new(".temporary.sysconfig.kdump") def write_temporary_config_file - # In inst_sys there is not kdump_file - return unless FileUtils.Exists(@kdump_file) - - # FIXME parameterize Write instead of copying the old config - # NOTE make sure we do not lose 600 mode (cp is ok) - command = "cp #{@kdump_file} #{TEMPORARY_CONFIG_FILE}" - retcode = SCR.Execute(path(".target.bash"), command) - # if this fails the system is broken; SCR has logged the details - raise "cannot copy files" if retcode != 0 + SCR.RegisterAgent(TEMPORARY_CONFIG_PATH, + term(:ag_ini, + term(:SysConfigFile, TEMPORARY_CONFIG_FILE) + ) + ) + WriteKdumpSettingsTo(TEMPORARY_CONFIG_PATH, TEMPORARY_CONFIG_FILE) + SCR.UnregisterAgent(TEMPORARY_CONFIG_PATH) end PROPOSE_ALLOCATED_MEMORY_MB_COMMAND = "kdumptool --configfile #{TEMPORARY_CONFIG_FILE} calibrate" @@ -743,35 +726,33 @@ "[kdump] (ReadAvailableMemory) total phys. memory [MB]: %1", Builtins.tostring(@total_memory) ) - ProposeAllocatedMemory() true end + def log_settings_censoring_passwords(message) + debug_KDUMP_SETTINGS = deep_copy(@KDUMP_SETTINGS) + debug_KDUMP_SETTINGS["KDUMP_SAVEDIR"] = "********" + debug_KDUMP_SETTINGS["KDUMP_SMTP_PASSWORD"] = "********" + + log.info "-------------KDUMP_SETTINGS-------------------" + log.info "#{message}; here with censored passwords: #{debug_KDUMP_SETTINGS}" + log.info "---------------------------------------------" + end # Read current kdump configuration # - # @return [Boolean] successfull + # @return [Boolean] successful def ReadKdumpSettings @KDUMP_SETTINGS = deep_copy(@DEFAULT_CONFIG) - Builtins.foreach(SCR.Dir(path(".sysconfig.kdump"))) do |key| + SCR.Dir(path(".sysconfig.kdump")).each do |key| val = Convert.to_string( - SCR.Read(Builtins.add(path(".sysconfig.kdump"), key)) + SCR.Read(path(".sysconfig.kdump") + key) ) - Ops.set(@KDUMP_SETTINGS, key, val) if val != nil + @KDUMP_SETTINGS[key] = val end - debug_KDUMP_SETTINGS = deep_copy(@KDUMP_SETTINGS) - - # delete KDUMP_SAVEDIR - it can include password - Ops.set(debug_KDUMP_SETTINGS, "KDUMP_SAVEDIR", "********") - Ops.set(debug_KDUMP_SETTINGS, "KDUMP_SMTP_PASSWORD", "********") - Builtins.y2milestone("-------------KDUMP_SETTINGS-------------------") - Builtins.y2milestone( - "kdump configuration has been read without value \"KDUMP_SAVEDIR\" and \"KDUMP_SMTP_PASSWORD\": %1", - debug_KDUMP_SETTINGS - ) - Builtins.y2milestone("---------------------------------------------") + log_settings_censoring_passwords("kdump configuration has been read") @initial_kdump_settings = deep_copy(@KDUMP_SETTINGS) @@ -804,42 +785,35 @@ true end + # Writes a file in the /etc/sysconfig/kdump format + def WriteKdumpSettingsTo(scr_path, file_name) + log_settings_censoring_passwords("kdump configuration for writing") + + @KDUMP_SETTINGS.each do |option_key, option_val| + SCR.Write(scr_path + option_key, option_val) + end + SCR.Write(scr_path, nil) + + if checkPassword + Chmod(file_name, "600") + else + Chmod(file_name, "644") + end + end + # Write current kdump configuration # - # @return [Boolean] successfull + # @return [Boolean] successful def WriteKdumpSettings - debug_KDUMP_SETTINGS = deep_copy(@KDUMP_SETTINGS) - # delete KDUMP_SAVEDIR - it can include password - Ops.set(debug_KDUMP_SETTINGS, "KDUMP_SAVEDIR", "********") - Ops.set(debug_KDUMP_SETTINGS, "KDUMP_SMTP_PASSWORD", "********") - Builtins.y2milestone("-------------KDUMP_SETTINGS-------------------") - Builtins.y2milestone( - "kdump configuration for writing without value \"KDUMP_SAVEDIR\" and \"KDUMP_SMTP_PASSWORD\": %1", - debug_KDUMP_SETTINGS - ) - Builtins.y2milestone("---------------------------------------------") - - Builtins.foreach(@KDUMP_SETTINGS) do |option_key, option_val| - SCR.Write( - Builtins.add(path(".sysconfig.kdump"), option_key), - option_val - ) - end - SCR.Write(path(".sysconfig.kdump"), nil) + WriteKdumpSettingsTo(path(".sysconfig.kdump"), @kdump_file) if using_fadump_changed? && ! update_initrd return false end - if checkPassword - Chmod(@kdump_file, "600") - else - Chmod(@kdump_file, "644") - end true end - # Write kdump boot argument crashkernel # set kernel-kdump start at boot # @@ -905,14 +879,14 @@ Popup.Message(_("To apply changes a reboot is necessary.")) end - Service.Enable("boot.kdump") + Service.Enable(KDUMP_SERVICE_NAME) return result end # start kernel-kdump at boot - Service.Enable("boot.kdump") + Service.Enable(KDUMP_SERVICE_NAME) - Service.Restart("boot.kdump") if Service.Status("boot.kdump") == 0 + Service.Restart(KDUMP_SERVICE_NAME) if Service.Status(KDUMP_SERVICE_NAME) == 0 else if @crashkernel_param #delete crashkernel paramter from bootloader @@ -928,8 +902,8 @@ Popup.Message(_("To apply changes a reboot is necessary.")) end end - Service.Disable("boot.kdump") - Service.Stop("boot.kdump") if Service.Status("boot.kdump") == 0 + Service.Disable(KDUMP_SERVICE_NAME) + Service.Stop(KDUMP_SERVICE_NAME) if Service.Status(KDUMP_SERVICE_NAME) == 0 return result end true @@ -1174,6 +1148,7 @@ ReadAvailableMemory() # set default values for global variables ProposeGlobalVars() + ProposeAllocatedMemory() # add packages for installation AddPackages() -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org