Hello community,
here is the log from the commit of package yast2-bootloader for
openSUSE:Factory checked in at 2019-12-14 12:02:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-bootloader (Old)
and /work/SRC/openSUSE:Factory/.yast2-bootloader.new.4691 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-bootloader"
Sat Dec 14 12:02:19 2019 rev:283 rq:751215 version:4.2.13
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-bootloader/yast2-bootloader.changes
2019-10-03 14:06:27.664563082 +0200
+++
/work/SRC/openSUSE:Factory/.yast2-bootloader.new.4691/yast2-bootloader.changes
2019-12-14 12:02:28.655411713 +0100
@@ -1,0 +2,16 @@
+Tue Nov 26 12:22:50 UTC 2019 - David Diaz <[email protected]>
+
+- Abort the execution when the module run without enough
+ permissions (related to bsc#1137688).
+- 4.2.13
+
+-------------------------------------------------------------------
+Wed Nov 20 16:07:58 UTC 2019 - Ancor Gonzalez Sosa <[email protected]>
+
+- Improved detection of the root filesystem in non-standard
+ btrfs configurations (bsc#1151748, bsc#1124581).
+- If there is no file system mounted in "/" or "/boot", report the
+ error and quit instead of crashing.
+- 4.2.12
+
+-------------------------------------------------------------------
Old:
----
yast2-bootloader-4.2.11.tar.bz2
New:
----
yast2-bootloader-4.2.13.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-bootloader.spec ++++++
--- /var/tmp/diff_new_pack.fmJblq/_old 2019-12-14 12:02:29.795411543 +0100
+++ /var/tmp/diff_new_pack.fmJblq/_new 2019-12-14 12:02:29.799411543 +0100
@@ -17,7 +17,7 @@
Name: yast2-bootloader
-Version: 4.2.11
+Version: 4.2.13
Release: 0
Summary: YaST2 - Bootloader Configuration
License: GPL-2.0-or-later
++++++ yast2-bootloader-4.2.11.tar.bz2 -> yast2-bootloader-4.2.13.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-bootloader-4.2.11/package/yast2-bootloader.changes
new/yast2-bootloader-4.2.13/package/yast2-bootloader.changes
--- old/yast2-bootloader-4.2.11/package/yast2-bootloader.changes
2019-09-30 17:51:21.000000000 +0200
+++ new/yast2-bootloader-4.2.13/package/yast2-bootloader.changes
2019-11-27 09:40:52.000000000 +0100
@@ -1,4 +1,20 @@
-------------------------------------------------------------------
+Tue Nov 26 12:22:50 UTC 2019 - David Diaz <[email protected]>
+
+- Abort the execution when the module run without enough
+ permissions (related to bsc#1137688).
+- 4.2.13
+
+-------------------------------------------------------------------
+Wed Nov 20 16:07:58 UTC 2019 - Ancor Gonzalez Sosa <[email protected]>
+
+- Improved detection of the root filesystem in non-standard
+ btrfs configurations (bsc#1151748, bsc#1124581).
+- If there is no file system mounted in "/" or "/boot", report the
+ error and quit instead of crashing.
+- 4.2.12
+
+-------------------------------------------------------------------
Mon Sep 30 13:26:46 UTC 2019 - Josef Reidinger <[email protected]>
- Add to autoyast ability to set secure boot flag for UEFI
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-bootloader-4.2.11/package/yast2-bootloader.spec
new/yast2-bootloader-4.2.13/package/yast2-bootloader.spec
--- old/yast2-bootloader-4.2.11/package/yast2-bootloader.spec 2019-09-30
17:51:21.000000000 +0200
+++ new/yast2-bootloader-4.2.13/package/yast2-bootloader.spec 2019-11-27
09:40:52.000000000 +0100
@@ -17,7 +17,7 @@
Name: yast2-bootloader
-Version: 4.2.11
+Version: 4.2.13
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.11/src/lib/bootloader/config_dialog.rb
new/yast2-bootloader-4.2.13/src/lib/bootloader/config_dialog.rb
--- old/yast2-bootloader-4.2.11/src/lib/bootloader/config_dialog.rb
2019-09-30 17:51:21.000000000 +0200
+++ new/yast2-bootloader-4.2.13/src/lib/bootloader/config_dialog.rb
2019-11-27 09:40:52.000000000 +0100
@@ -26,6 +26,11 @@
def run
guarded_run
+ rescue ::Bootloader::NoRoot
+ Yast::Report.Error(
+ _("YaST cannot configure the bootloader because it failed to find the
root file system.")
+ )
+ :abort
rescue ::Bootloader::BrokenConfiguration, ::Bootloader::UnsupportedOption
=> e
msg = if e.is_a?(::Bootloader::BrokenConfiguration)
# TRANSLATORS: %s stands for readon why yast cannot process it
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-bootloader-4.2.11/src/modules/BootStorage.rb
new/yast2-bootloader-4.2.13/src/modules/BootStorage.rb
--- old/yast2-bootloader-4.2.11/src/modules/BootStorage.rb 2019-09-30
17:51:21.000000000 +0200
+++ new/yast2-bootloader-4.2.13/src/modules/BootStorage.rb 2019-11-27
09:40:52.000000000 +0100
@@ -259,8 +259,20 @@
end
# Find the filesystem mounted to given mountpoint.
+ #
+ # If the mountpoint is assigned to a Btrfs subvolume, it returns the
+ # corresponding filesystem. That's specially relevant in cases like
+ # bsc#1151748 or bsc#1124581, in which libstorage-ng gets confused by
+ # non-standard Btrfs configurations.
+ #
+ # @param mountpoint [String]
+ # @return [Y2Storage::Filesystems::Base, nil] nil if nothing is mounted in
+ # the given location
def find_mountpoint(mountpoint)
- staging.filesystems.find { |f| f.mount_path == mountpoint }
+ mp = Y2Storage::MountPoint.all(staging).find { |m| m.path == mountpoint }
+ return nil unless mp
+
+ mp.filesystem
end
# In a device graph, starting at *device* (inclusive), find the parents
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-bootloader-4.2.11/src/modules/Bootloader.rb
new/yast2-bootloader-4.2.13/src/modules/Bootloader.rb
--- old/yast2-bootloader-4.2.11/src/modules/Bootloader.rb 2019-09-30
17:51:21.000000000 +0200
+++ new/yast2-bootloader-4.2.13/src/modules/Bootloader.rb 2019-11-27
09:40:52.000000000 +0100
@@ -166,6 +166,19 @@
::Bootloader::BootloaderFactory.current =
::Bootloader::BootloaderFactory.proposed
::Bootloader::BootloaderFactory.current.propose
+ rescue Errno::EACCES
+ # If the access to any needed file (e.g., grub.cfg when using GRUB
bootloader) is not
+ # allowed, just abort the execution. Using Yast::Confirm.MustBeRoot
early in the
+ # wizard/client is not enough since it allows continue.
+
+ Yast2::Popup.show(
+ # TRANSLATORS: pop-up message, beware the line breaks
+ _("The module is running without enough privileges to perform all
possible actions.\n\n" \
+ "Cannot continue. Please, try again as root."),
+ headline: :error
+ )
+
+ return false
end
Progress.Finish
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-bootloader-4.2.11/test/boot_storage_test.rb
new/yast2-bootloader-4.2.13/test/boot_storage_test.rb
--- old/yast2-bootloader-4.2.11/test/boot_storage_test.rb 2019-09-30
17:51:21.000000000 +0200
+++ new/yast2-bootloader-4.2.13/test/boot_storage_test.rb 2019-11-27
09:40:52.000000000 +0100
@@ -136,4 +136,51 @@
)
end
end
+
+ describe ".boot_filesystems" do
+ before { devicegraph_stub(scenario) }
+
+ context "using only NFS storage" do
+ let(:scenario) { "nfs_root.xml" }
+
+ it "returns the NFS filesystem" do
+ fs = subject.boot_filesystem
+ expect(fs).to be_a Y2Storage::Filesystems::Nfs
+ expect(fs.mount_path).to eq "/"
+ end
+ end
+
+ context "with local storage and a separate boot" do
+ let(:scenario) { "separate_boot.yaml" }
+
+ it "returns the /boot filesystem" do
+ fs = subject.boot_filesystem
+ expect(fs).to be_a Y2Storage::Filesystems::BlkFilesystem
+ expect(fs.type.is?(:ext2)).to eq true
+ expect(fs.mount_path).to eq "/boot"
+ end
+ end
+
+ context "with local storage and no separate boot" do
+ let(:scenario) { "trivial.yaml" }
+
+ it "returns the root filesystem" do
+ fs = subject.boot_filesystem
+ expect(fs).to be_a Y2Storage::Filesystems::BlkFilesystem
+ expect(fs.type.is?(:btrfs)).to eq true
+ expect(fs.mount_path).to eq "/"
+ end
+ end
+
+ # Regression test for bsc#1124581 and bsc#1151748
+ context "with the root mount point located in a Btrfs subvolume" do
+ let(:scenario) { "root_in_subvolume.xml" }
+
+ it "returns the corresponding Btrfs filesystem" do
+ fs = subject.boot_filesystem
+ expect(fs).to be_a Y2Storage::Filesystems::BlkFilesystem
+ expect(fs.type.is?(:btrfs)).to eq true
+ end
+ end
+ end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/yast2-bootloader-4.2.11/test/data/root_in_subvolume.xml
new/yast2-bootloader-4.2.13/test/data/root_in_subvolume.xml
--- old/yast2-bootloader-4.2.11/test/data/root_in_subvolume.xml 1970-01-01
01:00:00.000000000 +0100
+++ new/yast2-bootloader-4.2.13/test/data/root_in_subvolume.xml 2019-11-27
09:40:52.000000000 +0100
@@ -0,0 +1,264 @@
+<?xml version="1.0"?>
+<!-- generated by libstorage-ng version 4.2.2, Starhammer, 2019-09-23 20:10:12
GMT -->
+<Devicegraph>
+ <Devices>
+ <Disk>
+ <sid>43</sid>
+ <name>/dev/nvme0n1</name>
+ <sysfs-name>nvme0n1</sysfs-name>
+
<sysfs-path>/devices/pci0000:00/0000:00:1d.0/0000:03:00.0/nvme/nvme0/nvme0n1</sysfs-path>
+ <region>
+ <length>976773168</length>
+ <block-size>512</block-size>
+ </region>
+ <topology/>
+ <udev-path>pci-0000:03:00.0-nvme-1</udev-path>
+ <udev-id>nvme-Samsung_SSD_970_EVO_Plus_500GB_S4P2NF0M617621K</udev-id>
+ <udev-id>nvme-eui.0025385691b0a960</udev-id>
+ <range>256</range>
+ </Disk>
+ <Gpt>
+ <sid>49</sid>
+ </Gpt>
+ <Partition>
+ <sid>50</sid>
+ <name>/dev/nvme0n1p1</name>
+ <sysfs-name>nvme0n1p1</sysfs-name>
+
<sysfs-path>/devices/pci0000:00/0000:00:1d.0/0000:03:00.0/nvme/nvme0/nvme0n1/nvme0n1p1</sysfs-path>
+ <region>
+ <start>2048</start>
+ <length>614400</length>
+ <block-size>512</block-size>
+ </region>
+ <topology/>
+ <udev-path>pci-0000:03:00.0-nvme-1-part1</udev-path>
+
<udev-id>nvme-Samsung_SSD_970_EVO_Plus_500GB_S4P2NF0M617621K-part1</udev-id>
+ <udev-id>nvme-eui.0025385691b0a960-part1</udev-id>
+ <type>primary</type>
+ <id>258</id>
+ </Partition>
+ <Partition>
+ <sid>51</sid>
+ <name>/dev/nvme0n1p2</name>
+ <sysfs-name>nvme0n1p2</sysfs-name>
+
<sysfs-path>/devices/pci0000:00/0000:00:1d.0/0000:03:00.0/nvme/nvme0/nvme0n1/nvme0n1p2</sysfs-path>
+ <region>
+ <start>616448</start>
+ <length>122880000</length>
+ <block-size>512</block-size>
+ </region>
+ <topology/>
+ <udev-path>pci-0000:03:00.0-nvme-1-part2</udev-path>
+
<udev-id>nvme-Samsung_SSD_970_EVO_Plus_500GB_S4P2NF0M617621K-part2</udev-id>
+ <udev-id>nvme-eui.0025385691b0a960-part2</udev-id>
+ <type>primary</type>
+ <id>131</id>
+ </Partition>
+ <Partition>
+ <sid>52</sid>
+ <name>/dev/nvme0n1p3</name>
+ <sysfs-name>nvme0n1p3</sysfs-name>
+
<sysfs-path>/devices/pci0000:00/0000:00:1d.0/0000:03:00.0/nvme/nvme0/nvme0n1/nvme0n1p3</sysfs-path>
+ <region>
+ <start>123496448</start>
+ <length>768000000</length>
+ <block-size>512</block-size>
+ </region>
+ <topology/>
+ <udev-path>pci-0000:03:00.0-nvme-1-part3</udev-path>
+
<udev-id>nvme-Samsung_SSD_970_EVO_Plus_500GB_S4P2NF0M617621K-part3</udev-id>
+ <udev-id>nvme-eui.0025385691b0a960-part3</udev-id>
+ <type>primary</type>
+ <id>131</id>
+ </Partition>
+ <Partition>
+ <sid>53</sid>
+ <name>/dev/nvme0n1p4</name>
+ <sysfs-name>nvme0n1p4</sysfs-name>
+
<sysfs-path>/devices/pci0000:00/0000:00:1d.0/0000:03:00.0/nvme/nvme0/nvme0n1/nvme0n1p4</sysfs-path>
+ <region>
+ <start>909182976</start>
+ <length>67584000</length>
+ <block-size>512</block-size>
+ </region>
+ <topology/>
+ <udev-path>pci-0000:03:00.0-nvme-1-part4</udev-path>
+
<udev-id>nvme-Samsung_SSD_970_EVO_Plus_500GB_S4P2NF0M617621K-part4</udev-id>
+ <udev-id>nvme-eui.0025385691b0a960-part4</udev-id>
+ <type>primary</type>
+ <id>131</id>
+ </Partition>
+ <Vfat>
+ <sid>57</sid>
+ <uuid>C7CF-2A32</uuid>
+ </Vfat>
+ <MountPoint>
+ <sid>58</sid>
+ <path>/boot/efi</path>
+ <mount-by>uuid</mount-by>
+ <mount-options>noatime</mount-options>
+ <mount-type>vfat</mount-type>
+ <active>true</active>
+ <in-etc-fstab>true</in-etc-fstab>
+ <freq>0</freq>
+ <passno>0</passno>
+ </MountPoint>
+ <Xfs>
+ <sid>59</sid>
+ <uuid>90898a15-7ed2-47bc-99c9-82314f7d0d53</uuid>
+ </Xfs>
+ <MountPoint>
+ <sid>60</sid>
+ <path>/home</path>
+ <mount-by>uuid</mount-by>
+ <mount-options>noatime</mount-options>
+ <mount-type>xfs</mount-type>
+ <active>true</active>
+ <in-etc-fstab>true</in-etc-fstab>
+ <freq>0</freq>
+ <passno>0</passno>
+ </MountPoint>
+ <Swap>
+ <sid>61</sid>
+ <uuid>a6ab4c65-8923-47ce-a98d-93b1ed58e0e9</uuid>
+ </Swap>
+ <MountPoint>
+ <sid>62</sid>
+ <path>swap</path>
+ <mount-by>uuid</mount-by>
+ <mount-options>noatime</mount-options>
+ <mount-type>swap</mount-type>
+ <active>true</active>
+ <in-etc-fstab>true</in-etc-fstab>
+ <freq>0</freq>
+ <passno>0</passno>
+ </MountPoint>
+ <Btrfs>
+ <sid>63</sid>
+ <uuid>34f2bafb-3c28-44c7-84e8-a07298ce524c</uuid>
+ <metadata-raid-level>SINGLE</metadata-raid-level>
+ <data-raid-level>SINGLE</data-raid-level>
+ </Btrfs>
+ <BtrfsSubvolume>
+ <sid>64</sid>
+ <id>5</id>
+ <path></path>
+ <default-btrfs-subvolume>true</default-btrfs-subvolume>
+ </BtrfsSubvolume>
+ <BtrfsSubvolume>
+ <sid>65</sid>
+ <id>257</id>
+ <path>@</path>
+ </BtrfsSubvolume>
+ <BtrfsSubvolume>
+ <sid>66</sid>
+ <id>265</id>
+ <path>@/.snapshots</path>
+ </BtrfsSubvolume>
+ <BtrfsSubvolume>
+ <sid>67</sid>
+ <id>266</id>
+ <path>@/.snapshots/1/snapshot</path>
+ </BtrfsSubvolume>
+ <BtrfsSubvolume>
+ <sid>68</sid>
+ <id>267</id>
+ <path>@/.snapshots/2/snapshot</path>
+ </BtrfsSubvolume>
+ <BtrfsSubvolume>
+ <sid>69</sid>
+ <id>268</id>
+ <path>@/.snapshots/3/snapshot</path>
+ </BtrfsSubvolume>
+ <MountPoint>
+ <sid>97</sid>
+ <path>/</path>
+ <mount-by>uuid</mount-by>
+ <mount-options>subvol=@,noatime,space_cache,autodefrag</mount-options>
+ <mount-type>btrfs</mount-type>
+ <active>true</active>
+ <in-etc-fstab>true</in-etc-fstab>
+ <freq>0</freq>
+ <passno>0</passno>
+ </MountPoint>
+ </Devices>
+ <Holders>
+ <User>
+ <source-sid>43</source-sid>
+ <target-sid>49</target-sid>
+ </User>
+ <Subdevice>
+ <source-sid>49</source-sid>
+ <target-sid>50</target-sid>
+ </Subdevice>
+ <Subdevice>
+ <source-sid>49</source-sid>
+ <target-sid>51</target-sid>
+ </Subdevice>
+ <Subdevice>
+ <source-sid>49</source-sid>
+ <target-sid>52</target-sid>
+ </Subdevice>
+ <Subdevice>
+ <source-sid>49</source-sid>
+ <target-sid>53</target-sid>
+ </Subdevice>
+ <FilesystemUser>
+ <source-sid>50</source-sid>
+ <target-sid>57</target-sid>
+ </FilesystemUser>
+ <User>
+ <source-sid>57</source-sid>
+ <target-sid>58</target-sid>
+ </User>
+ <FilesystemUser>
+ <source-sid>52</source-sid>
+ <target-sid>59</target-sid>
+ </FilesystemUser>
+ <User>
+ <source-sid>59</source-sid>
+ <target-sid>60</target-sid>
+ </User>
+ <FilesystemUser>
+ <source-sid>53</source-sid>
+ <target-sid>61</target-sid>
+ </FilesystemUser>
+ <User>
+ <source-sid>61</source-sid>
+ <target-sid>62</target-sid>
+ </User>
+ <Subdevice>
+ <source-sid>63</source-sid>
+ <target-sid>64</target-sid>
+ </Subdevice>
+ <FilesystemUser>
+ <source-sid>51</source-sid>
+ <target-sid>63</target-sid>
+ <id>1</id>
+ </FilesystemUser>
+ <Subdevice>
+ <source-sid>64</source-sid>
+ <target-sid>65</target-sid>
+ </Subdevice>
+ <Subdevice>
+ <source-sid>65</source-sid>
+ <target-sid>66</target-sid>
+ </Subdevice>
+ <Subdevice>
+ <source-sid>66</source-sid>
+ <target-sid>67</target-sid>
+ </Subdevice>
+ <Subdevice>
+ <source-sid>66</source-sid>
+ <target-sid>68</target-sid>
+ </Subdevice>
+ <Subdevice>
+ <source-sid>66</source-sid>
+ <target-sid>69</target-sid>
+ </Subdevice>
+ <User>
+ <source-sid>65</source-sid>
+ <target-sid>97</target-sid>
+ </User>
+ </Holders>
+</Devicegraph>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/yast2-bootloader-4.2.11/test/main_dialog_test.rb
new/yast2-bootloader-4.2.13/test/main_dialog_test.rb
--- old/yast2-bootloader-4.2.11/test/main_dialog_test.rb 2019-09-30
17:51:21.000000000 +0200
+++ new/yast2-bootloader-4.2.13/test/main_dialog_test.rb 2019-11-27
09:40:52.000000000 +0100
@@ -9,6 +9,7 @@
wizard = double.as_null_object
stub_const("Yast::Wizard", wizard)
+ @real_sequencer = Yast::Sequencer
sequencer = double.as_null_object
stub_const("Yast::Sequencer", sequencer)
@@ -112,5 +113,27 @@
expect(subject.run_auto).to eq :next
end
+
+ context "when no root filesystem is detected" do
+ before do
+ # Undo the global stub
+ stub_const("Yast::Sequencer", @real_sequencer)
+ allow(Bootloader::ReadDialog).to receive(:new).and_return
double("ReadDialog", run: :next)
+
+ allow(Yast::BootStorage).to
receive(:boot_filesystem).and_raise(Bootloader::NoRoot)
+ end
+
+ it "reports the corresponding error" do
+ expect(Yast::Report).to receive(:Error).with(/cannot configure the
bootloader/)
+
+ subject.run
+ end
+
+ it "returns :abort" do
+ allow(Yast::Report).to receive(:Error)
+
+ expect(subject.run).to eq :abort
+ end
+ end
end
end