Hello community,

here is the log from the commit of package yast2-bootloader for 
openSUSE:Factory checked in at 2020-01-04 19:20:56
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-bootloader (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-bootloader.new.6675 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-bootloader"

Sat Jan  4 19:20:56 2020 rev:284 rq:760667 version:4.2.15

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-bootloader/yast2-bootloader.changes        
2019-12-14 12:02:28.655411713 +0100
+++ 
/work/SRC/openSUSE:Factory/.yast2-bootloader.new.6675/yast2-bootloader.changes  
    2020-01-04 19:21:05.389130553 +0100
@@ -1,0 +2,14 @@
+Fri Jan  3 13:08:10 UTC 2020 - Josef Reidinger <[email protected]>
+
+- deduplicate kernel parameters after merging them
+  (bsc#1130954, bsc#1043103, bsc#1132328, bsc#1134895)
+- 4.2.15
+
+-------------------------------------------------------------------
+Mon Dec 30 14:51:02 UTC 2019 - Josef Reidinger <[email protected]>
+
+- Report proper error when /etc/default/grub missing and allow
+  user to repropose it (bsc#1100755)
+- 4.2.14
+
+-------------------------------------------------------------------

Old:
----
  yast2-bootloader-4.2.13.tar.bz2

New:
----
  yast2-bootloader-4.2.15.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ yast2-bootloader.spec ++++++
--- /var/tmp/diff_new_pack.KCA30P/_old  2020-01-04 19:21:06.125130879 +0100
+++ /var/tmp/diff_new_pack.KCA30P/_new  2020-01-04 19:21:06.129130880 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package yast2-bootloader
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-bootloader
-Version:        4.2.13
+Version:        4.2.15
 Release:        0
 Summary:        YaST2 - Bootloader Configuration
 License:        GPL-2.0-or-later

++++++ yast2-bootloader-4.2.13.tar.bz2 -> yast2-bootloader-4.2.15.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-bootloader-4.2.13/package/yast2-bootloader.changes 
new/yast2-bootloader-4.2.15/package/yast2-bootloader.changes
--- old/yast2-bootloader-4.2.13/package/yast2-bootloader.changes        
2019-11-27 09:40:52.000000000 +0100
+++ new/yast2-bootloader-4.2.15/package/yast2-bootloader.changes        
2020-01-03 14:22:31.000000000 +0100
@@ -1,4 +1,18 @@
 -------------------------------------------------------------------
+Fri Jan  3 13:08:10 UTC 2020 - Josef Reidinger <[email protected]>
+
+- deduplicate kernel parameters after merging them
+  (bsc#1130954, bsc#1043103, bsc#1132328, bsc#1134895)
+- 4.2.15
+
+-------------------------------------------------------------------
+Mon Dec 30 14:51:02 UTC 2019 - Josef Reidinger <[email protected]>
+
+- Report proper error when /etc/default/grub missing and allow
+  user to repropose it (bsc#1100755)
+- 4.2.14
+
+-------------------------------------------------------------------
 Tue Nov 26 12:22:50 UTC 2019 - David Diaz <[email protected]>
 
 - Abort the execution when the module run without enough
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-bootloader-4.2.13/package/yast2-bootloader.spec 
new/yast2-bootloader-4.2.15/package/yast2-bootloader.spec
--- old/yast2-bootloader-4.2.13/package/yast2-bootloader.spec   2019-11-27 
09:40:52.000000000 +0100
+++ new/yast2-bootloader-4.2.15/package/yast2-bootloader.spec   2020-01-03 
14:22:31.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-bootloader
-Version:        4.2.13
+Version:        4.2.15
 Release:        0
 Summary:        YaST2 - Bootloader Configuration
 License:        GPL-2.0-or-later
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-bootloader-4.2.13/src/lib/bootloader/grub2base.rb 
new/yast2-bootloader-4.2.15/src/lib/bootloader/grub2base.rb
--- old/yast2-bootloader-4.2.13/src/lib/bootloader/grub2base.rb 2019-11-27 
09:40:52.000000000 +0100
+++ new/yast2-bootloader-4.2.15/src/lib/bootloader/grub2base.rb 2020-01-03 
14:22:31.000000000 +0100
@@ -98,7 +98,12 @@
     def read
       super
 
-      grub_default.load
+      begin
+        grub_default.load
+      rescue Errno::ENOENT
+        raise BrokenConfiguration, _("File /etc/default/grub missing on 
system")
+      end
+
       grub_cfg = CFA::Grub2::GrubCfg.new
       begin
         grub_cfg.load
@@ -251,8 +256,10 @@
       default_serialize.gsub!(/mitigations=\S+/, "") if 
other_params.parameter("mitigations")
 
       new_kernel_params = default_serialize + " " + other_params.serialize
+      # deduplicate identicatel parameter. Keep always the last one ( so 
reverse is needed ).
+      new_params = new_kernel_params.split.reverse.uniq.reverse.join(" ")
 
-      default_params.replace(new_kernel_params)
+      default_params.replace(new_params)
     end
 
     def merge_attributes(default, other)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-bootloader-4.2.13/test/grub2base_test.rb 
new/yast2-bootloader-4.2.15/test/grub2base_test.rb
--- old/yast2-bootloader-4.2.13/test/grub2base_test.rb  2019-11-27 
09:40:52.000000000 +0100
+++ new/yast2-bootloader-4.2.15/test/grub2base_test.rb  2020-01-03 
14:22:31.000000000 +0100
@@ -58,6 +58,14 @@
 
       expect(subject.trusted_boot).to eq false
     end
+
+    it "raises BrokenConfiguration if /etc/default/grub missing" do
+      default = double
+      allow(default).to receive(:load).and_raise(Errno::ENOENT)
+      allow(::CFA::Grub2::Default).to receive(:new).and_return(default)
+
+      expect { subject.read }.to raise_error(::Bootloader::BrokenConfiguration)
+    end
   end
 
   describe "write" do
@@ -468,13 +476,13 @@
       expect(subject.grub_default.os_prober).to be_disabled
     end
 
-    it "for kernel line place subject params and then merged ones" do
-      subject.grub_default.kernel_params.replace("verbose debug=true 
resume=/dev/sda1")
-      other.grub_default.kernel_params.replace("silent noresume debug=false 3")
+    it "for kernel line place subject params and then merged ones and 
deduplicate" do
+      subject.grub_default.kernel_params.replace("nosplash verbose debug=true 
resume=/dev/sda1")
+      other.grub_default.kernel_params.replace("nosplash silent noresume 
debug=false 3")
 
       subject.merge(other)
 
-      expect(subject.grub_default.kernel_params.serialize).to eq "verbose 
debug=true silent noresume debug=false 3"
+      expect(subject.grub_default.kernel_params.serialize).to eq "verbose 
debug=true nosplash silent noresume debug=false 3"
     end
 
     it "use grub2 password configuration specified in merged object" do


Reply via email to