Hello community, here is the log from the commit of package yast2-storage-ng for openSUSE:Factory checked in at 2020-11-23 15:36:25 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/yast2-storage-ng (Old) and /work/SRC/openSUSE:Factory/.yast2-storage-ng.new.5913 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-storage-ng" Mon Nov 23 15:36:25 2020 rev:91 rq:849680 version:4.3.22 Changes: -------- --- /work/SRC/openSUSE:Factory/yast2-storage-ng/yast2-storage-ng.changes 2020-11-13 18:57:18.645995032 +0100 +++ /work/SRC/openSUSE:Factory/.yast2-storage-ng.new.5913/yast2-storage-ng.changes 2020-11-23 16:28:04.344702825 +0100 @@ -1,0 +2,16 @@ +Fri Nov 20 12:53:43 UTC 2020 - Josef Reidinger <jreidin...@suse.com> + +- print properly help to avoid accidental opening of module by bash + completion (bsc#1172340) +- 4.3.22 + +------------------------------------------------------------------- +Wed Nov 18 16:30:03 UTC 2020 - Stefan Hundhammer <shundham...@suse.com> + +- Improved error handling for mounting /sys/firmware/efi/efivars + (bsc#1174029): + - Also check in /proc/filesystems if efivarfs is supported + - Don't throw exception if a mount fails, just display a warning +- 4.3.21 + +------------------------------------------------------------------- Old: ---- yast2-storage-ng-4.3.20.tar.bz2 New: ---- yast2-storage-ng-4.3.22.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-storage-ng.spec ++++++ --- /var/tmp/diff_new_pack.3yMOjz/_old 2020-11-23 16:28:05.096704223 +0100 +++ /var/tmp/diff_new_pack.3yMOjz/_new 2020-11-23 16:28:05.096704223 +0100 @@ -17,7 +17,7 @@ Name: yast2-storage-ng -Version: 4.3.20 +Version: 4.3.22 Release: 0 Summary: YaST2 - Storage Configuration License: GPL-2.0-only OR GPL-3.0-only ++++++ yast2-storage-ng-4.3.20.tar.bz2 -> yast2-storage-ng-4.3.22.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-ng-4.3.20/package/yast2-storage-ng.changes new/yast2-storage-ng-4.3.22/package/yast2-storage-ng.changes --- old/yast2-storage-ng-4.3.20/package/yast2-storage-ng.changes 2020-11-11 17:47:24.000000000 +0100 +++ new/yast2-storage-ng-4.3.22/package/yast2-storage-ng.changes 2020-11-20 14:25:47.000000000 +0100 @@ -1,4 +1,20 @@ ------------------------------------------------------------------- +Fri Nov 20 12:53:43 UTC 2020 - Josef Reidinger <jreidin...@suse.com> + +- print properly help to avoid accidental opening of module by bash + completion (bsc#1172340) +- 4.3.22 + +------------------------------------------------------------------- +Wed Nov 18 16:30:03 UTC 2020 - Stefan Hundhammer <shundham...@suse.com> + +- Improved error handling for mounting /sys/firmware/efi/efivars + (bsc#1174029): + - Also check in /proc/filesystems if efivarfs is supported + - Don't throw exception if a mount fails, just display a warning +- 4.3.21 + +------------------------------------------------------------------- Wed Nov 11 14:44:26 UTC 2020 - Martin Vidner <mvid...@suse.com> - Untranslated error message in 'Edit Btrfs subvolumes'/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-ng-4.3.20/package/yast2-storage-ng.spec new/yast2-storage-ng-4.3.22/package/yast2-storage-ng.spec --- old/yast2-storage-ng-4.3.20/package/yast2-storage-ng.spec 2020-11-11 17:47:24.000000000 +0100 +++ new/yast2-storage-ng-4.3.22/package/yast2-storage-ng.spec 2020-11-20 14:25:47.000000000 +0100 @@ -16,7 +16,7 @@ # Name: yast2-storage-ng -Version: 4.3.20 +Version: 4.3.22 Release: 0 Summary: YaST2 - Storage Configuration License: GPL-2.0-only OR GPL-3.0-only diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-ng-4.3.20/src/clients/partitioner.rb new/yast2-storage-ng-4.3.22/src/clients/partitioner.rb --- old/yast2-storage-ng-4.3.20/src/clients/partitioner.rb 2020-11-11 17:47:24.000000000 +0100 +++ new/yast2-storage-ng-4.3.22/src/clients/partitioner.rb 2020-11-20 14:25:47.000000000 +0100 @@ -19,9 +19,14 @@ require "yast" require "y2partitioner/clients/main" +require "y2partitioner/cli" # To test with simulated hardware (from a bug report?), use # yast2 partitioner_testing foo.xml # yast2 partitioner_testing foo.yml -Y2Partitioner::Clients::Main.new.run +if Yast::WFM.Args.empty? + Y2Partitioner::Clients::Main.new.run +else + Y2Partitioner::CLI.run +end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-ng-4.3.20/src/lib/y2partitioner/cli.rb new/yast2-storage-ng-4.3.22/src/lib/y2partitioner/cli.rb --- old/yast2-storage-ng-4.3.20/src/lib/y2partitioner/cli.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-storage-ng-4.3.22/src/lib/y2partitioner/cli.rb 2020-11-20 14:25:47.000000000 +0100 @@ -0,0 +1,34 @@ +# Copyright (c) 2014 SUSE LLC. +# All Rights Reserved. + +# This program is free software; you can redistribute it and/or +# modify it under the terms of version 2 or 3 of the GNU General +# Public License as published by the Free Software Foundation. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, contact SUSE LLC. + +# To contact Novell about this file by physical or electronic mail, +# you may find current contact information at www.suse.com + +Yast.import "CommandLine" + +module Y2Partitioner + # CLI support for storage-ng. It just say that there is no one. + class CLI + extend Yast::I18n + + def self.run + cmdline_description = { + "id" => "partitioner" + } + + Yast::CommandLine.Run(cmdline_description) + end + end +end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-ng-4.3.20/src/lib/y2storage/clients/inst_prepdisk.rb new/yast2-storage-ng-4.3.22/src/lib/y2storage/clients/inst_prepdisk.rb --- old/yast2-storage-ng-4.3.20/src/lib/y2storage/clients/inst_prepdisk.rb 2020-11-11 17:47:24.000000000 +0100 +++ new/yast2-storage-ng-4.3.22/src/lib/y2storage/clients/inst_prepdisk.rb 2020-11-20 14:25:47.000000000 +0100 @@ -28,6 +28,7 @@ Yast.import "Installation" Yast.import "FileUtils" Yast.import "Mode" +Yast.import "Report" module Y2Storage module Clients @@ -36,10 +37,15 @@ # target system and any other action handled by libstorage. class InstPrepdisk include Yast + include Yast::I18n include Yast::Logger EFIVARS_PATH = "/sys/firmware/efi/efivars".freeze + def initialize + textdomain "storage" + end + def run return :auto if Mode.update @@ -67,7 +73,7 @@ mount_in_target("/dev", "devtmpfs", "-t devtmpfs") mount_in_target("/proc", "proc", "-t proc") mount_in_target("/sys", "sysfs", "-t sysfs") - mount_in_target(EFIVARS_PATH, "efivarfs", "-t efivarfs") if File.exist?(EFIVARS_PATH) + mount_in_target(EFIVARS_PATH, "efivarfs", "-t efivarfs") if mount_efivars? mount_in_target("/run", "/run", "--bind") true @@ -83,12 +89,36 @@ log.info "Cmd: mount #{options} #{device} #{target_path}" if !SCR.Execute(path(".target.mount"), [device, target_path], options) - raise ".target.mount failed" + # TRANSLATORS: %s is the path of a system mount like "/dev", "/proc", "/sys" + Yast::Report.Warning(_("Could not mount %s") % path) end nil end + # Check if efivars should be mounted, i.e. if /sys/firmware/efi/efivars + # exists and the system supports the efivarfs filesystem type. + # + # @return [Boolean] true if efivarfs should be mounted + def mount_efivars? + File.exist?(EFIVARS_PATH) && efivarfs_support? + end + + # Check if the efivarfs filesystem type is supported on this system, + # i.e. if /proc/filesystems contains a line with "efivarfs". + # + # Notice that a system might have the /sys/firmware/efi/efivars file, + # but no support for the efivarfs filesystem to actually mount it. + # See https://bugzilla.suse.com/show_bug.cgi?id=1174029 + # + # @return [Boolean] true if efivarfs is supported + def efivarfs_support? + File.readlines("/proc/filesystems").any? { |line| line =~ /efivarfs/ } + rescue Errno::ENOENT => e + log.error("Can't check efivarfss support: #{e}") + false + end + def manager Y2Storage::StorageManager.instance end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-ng-4.3.20/test/y2partitioner/cli_test.rb new/yast2-storage-ng-4.3.22/test/y2partitioner/cli_test.rb --- old/yast2-storage-ng-4.3.20/test/y2partitioner/cli_test.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/yast2-storage-ng-4.3.22/test/y2partitioner/cli_test.rb 2020-11-20 14:25:47.000000000 +0100 @@ -0,0 +1,32 @@ +#! /usr/bin/rspec +# Copyright (c) 2020 SUSE LLC. +# All Rights Reserved. + +# This program is free software; you can redistribute it and/or +# modify it under the terms of version 2 or 3 of the GNU General +# Public License as published by the Free Software Foundation. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, contact SUSE LLC. + +# To contact SUSE about this file by physical or electronic mail, +# you may find current contact information at www.suse.com + +require_relative "../spec_helper" + +require "y2partitioner/cli" + +describe Y2Partitioner::CLI do + describe ".run" do + it "prints command line output" do + expect(Yast::CommandLine).to receive(:Run) + + described_class.run + end + end +end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-storage-ng-4.3.20/test/y2storage/clients/inst_prepdisk_test.rb new/yast2-storage-ng-4.3.22/test/y2storage/clients/inst_prepdisk_test.rb --- old/yast2-storage-ng-4.3.20/test/y2storage/clients/inst_prepdisk_test.rb 2020-11-11 17:47:24.000000000 +0100 +++ new/yast2-storage-ng-4.3.22/test/y2storage/clients/inst_prepdisk_test.rb 2020-11-20 14:25:47.000000000 +0100 @@ -84,4 +84,40 @@ end end end + + describe "#efivarvs_support?" do + it "returns true if efivarfs is in /proc/filesystems" do + allow(File).to receive(:readlines).and_return(["ext2", "efivarfs"]) + expect(client.send(:efivarfs_support?)).to be true + end + + it "returns false if efivarfs is not in /proc/filesystems" do + allow(File).to receive(:readlines).and_return(["ext2", "xfs"]) + expect(client.send(:efivarfs_support?)).to be false + end + + it "returns false if /proc/filesystems does not exist" do + allow(File).to receive(:readlines).and_raise Errno::ENOENT + expect(client.send(:efivarfs_support?)).to be false + end + end + + describe "#mount_in_target" do + before do + # Make sure the check for the mount point is successful + allow(Yast::FileUtils).to receive(:Exists).and_return(true) + end + + it "Does not show a warning dialog if the mount was successful" do + allow(Yast::SCR).to receive(:Execute).and_return(true) + expect(Yast::Report).not_to receive(:Warning) + client.send(:mount_in_target, "/proc", "proc", "") + end + + it "Shows a warning dialog if the mount failed" do + allow(Yast::SCR).to receive(:Execute).and_return(false) + expect(Yast::Report).to receive(:Warning) + client.send(:mount_in_target, "/proc", "proc", "") + end + end end _______________________________________________ openSUSE Commits mailing list -- commit@lists.opensuse.org To unsubscribe, email commit-le...@lists.opensuse.org List Netiquette: https://en.opensuse.org/openSUSE:Mailing_list_netiquette List Archives: https://lists.opensuse.org/archives/list/commit@lists.opensuse.org