Hello community,
here is the log from the commit of package yast2-bootloader for openSUSE:Factory checked in at 2015-08-28 08:24:58
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-bootloader (Old)
and /work/SRC/openSUSE:Factory/.yast2-bootloader.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-bootloader"
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-bootloader/yast2-bootloader.changes 2015-08-21 12:42:41.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-bootloader.new/yast2-bootloader.changes 2015-08-28 08:24:59.000000000 +0200
@@ -1,0 +2,22 @@
+Thu Aug 27 13:21:25 UTC 2015 - jreidinger@suse.com
+
+- use extended partition to boot even for non software raids
+ (bnc#940765)
+- for separate boot partition with btrfs prefer MBR bootloader
+ location (bnc#940797)
+- 3.1.145
+
+-------------------------------------------------------------------
+Tue Aug 25 07:31:56 UTC 2015 - igonzalezsosa@suse.com
+
+- Add support for kernel parameter with multiple values
+ (bsc#882082)
+- 3.1.144
+
+-------------------------------------------------------------------
+Mon Aug 24 12:44:51 UTC 2015 - jreidinger@suse.com
+
+- fix removing password protection (bnc#942867)
+- 3.1.143
+
+-------------------------------------------------------------------
Old:
----
yast2-bootloader-3.1.142.tar.bz2
New:
----
yast2-bootloader-3.1.145.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-bootloader.spec ++++++
--- /var/tmp/diff_new_pack.iqAbod/_old 2015-08-28 08:25:00.000000000 +0200
+++ /var/tmp/diff_new_pack.iqAbod/_new 2015-08-28 08:25:00.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-bootloader
-Version: 3.1.142
+Version: 3.1.145
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
++++++ yast2-bootloader-3.1.142.tar.bz2 -> yast2-bootloader-3.1.145.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.142/package/yast2-bootloader.changes new/yast2-bootloader-3.1.145/package/yast2-bootloader.changes
--- old/yast2-bootloader-3.1.142/package/yast2-bootloader.changes 2015-08-19 15:07:13.000000000 +0200
+++ new/yast2-bootloader-3.1.145/package/yast2-bootloader.changes 2015-08-27 15:42:09.000000000 +0200
@@ -1,4 +1,26 @@
-------------------------------------------------------------------
+Thu Aug 27 13:21:25 UTC 2015 - jreidinger@suse.com
+
+- use extended partition to boot even for non software raids
+ (bnc#940765)
+- for separate boot partition with btrfs prefer MBR bootloader
+ location (bnc#940797)
+- 3.1.145
+
+-------------------------------------------------------------------
+Tue Aug 25 07:31:56 UTC 2015 - igonzalezsosa@suse.com
+
+- Add support for kernel parameter with multiple values
+ (bsc#882082)
+- 3.1.144
+
+-------------------------------------------------------------------
+Mon Aug 24 12:44:51 UTC 2015 - jreidinger@suse.com
+
+- fix removing password protection (bnc#942867)
+- 3.1.143
+
+-------------------------------------------------------------------
Wed Aug 19 12:42:41 UTC 2015 - jreidinger@suse.com
- do not require parted on target system (bnc#937066)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.142/package/yast2-bootloader.spec new/yast2-bootloader-3.1.145/package/yast2-bootloader.spec
--- old/yast2-bootloader-3.1.142/package/yast2-bootloader.spec 2015-08-19 15:07:13.000000000 +0200
+++ new/yast2-bootloader-3.1.145/package/yast2-bootloader.spec 2015-08-27 15:42:09.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-bootloader
-Version: 3.1.142
+Version: 3.1.145
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.142/src/include/bootloader/routines/misc.rb new/yast2-bootloader-3.1.145/src/include/bootloader/routines/misc.rb
--- old/yast2-bootloader-3.1.142/src/include/bootloader/routines/misc.rb 2015-08-19 15:07:13.000000000 +0200
+++ new/yast2-bootloader-3.1.145/src/include/bootloader/routines/misc.rb 2015-08-27 15:42:09.000000000 +0200
@@ -139,35 +139,51 @@
ret
end
- # get kernel parameter from kernel command line
+ # get kernel parameter values from kernel command line
+ #
# @param [String] line string original line
# @param [String] key string parameter key
- # @return [String] value, "false" if not present,
- # "true" if present key without value
+ # @return [String,Array<String>] value, "false" if not present or "true" if present without
+ # value. If the parameter has on more than 1 value, an array will be returned.
def getKernelParamFromLine(line, key)
# FIXME: this doesn't work with quotes and spaces
res = "false"
# we can get nil if params is not yet proposed, so return not there (bnc#902397)
return res unless line
params = line.split(" ").reject(&:empty?)
- params.each do |p|
- l = p.split("=")
- res = l[1] || "true" if l[0] == key
+ values = params.map { |p| kernel_param_parts(p) }.select { |p| p[0] == key }.map(&:last).uniq
+ if values.empty? # not present
+ "false"
+ elsif values.size == 1 # only one value
+ values.first
+ else # more than 1 value
+ values
end
- res
end
- def kernel_param_key(value)
- value.split("=").first
+ def kernel_param_key(param)
+ param.split("=").first
+ end
+
+ # Split kernel parameters into [key, value] form
+ #
+ # It also takes care about converting parameters without a value
+ # (ie. "quiet" will be ["quiet", "true"]).
+ #
+ # @param [String] param Parameter string in "key=value" form.
+ # @return [Array<String>] Parameter key and value.
+ def kernel_param_parts(param)
+ key, value = param.split("=")
+ [key, value || "true"]
end
# set kernel parameter to GRUB command line
# @param [String] line string original line
# @param [String] key string parameter key
- # @param [String] value string value, "false" to remove key,
- # "true" to add key without value
+ # @param [String,Array<String>] values string (or array of strings) containing values,
+ # "false" to remove key, "true" to add key without value
# @return [String] new kernel command line
- def setKernelParamToLine(line, key, value)
+ def setKernelParamToLine(line, key, values)
line ||= ""
# FIXME: this doesn't work with quotes and spaces
params = line.split(" ").reject(&:empty?)
@@ -182,25 +198,28 @@
k = kernel_param_key(param)
if k != key # not our param
res << param
- elsif value == "false"
+ elsif values == "false"
next # do nothing as we want to remove this param
elsif occurences[k] == 1 # last parameter with given key
done = true
- if value == "true"
+ if values == "true"
res << key
- elsif value != "false"
- res << Builtins.sformat("%1=%2", key, value)
+ elsif values != "false"
+ Array(values).each do |v|
+ res << Builtins.sformat("%1=%2", key, v)
+ end
end
else
occurences[k] -= 1
- res << param
end
end
if !done
- if value == "true"
+ if values == "true"
params << key
- elsif value != "false"
- params << Builtins.sformat("%1=%2", key, value)
+ elsif values != "false"
+ Array(values).each do |v|
+ params << Builtins.sformat("%1=%2", key, v)
+ end
end
end
params.join(" ")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.142/src/lib/bootloader/grub2pwd.rb new/yast2-bootloader-3.1.145/src/lib/bootloader/grub2pwd.rb
--- old/yast2-bootloader-3.1.142/src/lib/bootloader/grub2pwd.rb 2015-08-19 15:07:13.000000000 +0200
+++ new/yast2-bootloader-3.1.145/src/lib/bootloader/grub2pwd.rb 2015-08-27 15:42:09.000000000 +0200
@@ -114,7 +114,8 @@
def disable
return unless used_on_target?
- Yast::SCR.Execute(YAST_BASH_PATH, "rm '#{PWD_ENCRYPTION_FILE}'")
+ # operate on target as we have to remove password during installation from target grub2
+ Yast::SCR.Execute(Yast::Path.new(".target.bash"), "rm '#{PWD_ENCRYPTION_FILE}'")
end
def encrypt(password)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.142/src/lib/bootloader/stage1.rb new/yast2-bootloader-3.1.145/src/lib/bootloader/stage1.rb
--- old/yast2-bootloader-3.1.142/src/lib/bootloader/stage1.rb 2015-08-19 15:07:13.000000000 +0200
+++ new/yast2-bootloader-3.1.145/src/lib/bootloader/stage1.rb 2015-08-27 15:42:09.000000000 +0200
@@ -60,24 +60,30 @@
def propose_boot_location
raise "Boot partition disk not found" if boot_partition_disk.empty?
selected_location = :mbr
+ separate_boot = Yast::BootStorage.BootPartitionDevice != Yast::BootStorage.RootPartitionDevice
# there was check if boot device is on logical partition
# IMO it is good idea check MBR also in this case
# see bug #279837 comment #53
if boot_partition_on_mbr_disk?
- separate_boot = Yast::BootStorage.BootPartitionDevice != Yast::BootStorage.RootPartitionDevice
selected_location = separate_boot ? :boot : :root
elsif underlying_boot_partition_devices.size > 1
selected_location = :mbr
end
- if logical_boot? && extended_partition &&
- underlying_boot_partition_devices.size > 1
+ if logical_boot? && extended_partition
+ log.info "/boot is on logical partition and extended detected, extended proposed"
selected_location = :extended
end
- if logical_boot_with_btrfs?
- log.info "/boot is on logical parititon and uses btrfs, mbr is favored in this situration"
+ if boot_with_btrfs? && logical_boot?
+ log.info "/boot is on logical partition and uses btrfs, mbr is favored in this situation"
+ selected_location = :mbr
+ end
+
+ # for separate btrfs partition prefer MBR (bnc#940797)
+ if boot_with_btrfs? && separate_boot
+ log.info "separated /boot is used and uses btrfs, mbr is favored in this situation"
selected_location = :mbr
end
@@ -108,35 +114,29 @@
@logical_boot
end
- def logical_boot_with_btrfs?
+ def boot_with_btrfs?
init_boot_info unless @boot_initialized
- @logical_boot_with_btrfs
+ @boot_with_btrfs
end
def init_boot_info
boot_disk_map = target_map[boot_partition_disk] || {}
partitions_on_boot_partition_disk = boot_disk_map["partitions"] || []
@logical_boot = false
- @logical_boot_with_btrfs = false
+ @boot_with_btrfs = false
partitions_on_boot_partition_disk.each do |p|
if p["type"] == :extended
@extended = p["device"]
- elsif underlying_boot_partition_devices.include?(p["device"]) &&
- p["type"] == :logical
- # If any of the underlying_boot_partition_devices can be found on
- # the boot_partition_disk AND is a logical partition, set
- # is_logical to true.
- # For soft-RAID this will not match anyway ("/dev/[hs]da*" does not
- # match "/dev/md*").
- @logical_boot = true
- @logical_boot_with_btrfs = true if p["used_fs"] == :btrfs
+ elsif underlying_boot_partition_devices.include?(p["device"])
+ @boot_with_btrfs = true if p["used_fs"] == :btrfs
+ @logical_boot = true if p["type"] == :logical
end
end
log.info "/boot is in logical partition: #{@logical_boot}"
- log.info "/boot is in logical partition and use btrfs: #{@logical_boot_with_btrfs}"
+ log.info "/boot use btrfs: #{@boot_with_btrfs}"
log.info "The extended partition: #{@extended}"
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-bootloader-3.1.142/src/modules/BootCommon.rb new/yast2-bootloader-3.1.145/src/modules/BootCommon.rb
--- old/yast2-bootloader-3.1.142/src/modules/BootCommon.rb 2015-08-19 15:07:13.000000000 +0200
+++ new/yast2-bootloader-3.1.145/src/modules/BootCommon.rb 2015-08-27 15:42:09.000000000 +0200
@@ -555,8 +555,8 @@
publish :function => :remapGlobals, :type => "map