Hello community,

here is the log from the commit of package rubygem-cfa_grub2 for 
openSUSE:Factory checked in at 2018-09-04 22:49:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-cfa_grub2 (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-cfa_grub2.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-cfa_grub2"

Tue Sep  4 22:49:43 2018 rev:11 rq:629735 version:1.0.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-cfa_grub2/rubygem-cfa_grub2.changes      
2017-12-01 17:17:45.470506592 +0100
+++ /work/SRC/openSUSE:Factory/.rubygem-cfa_grub2.new/rubygem-cfa_grub2.changes 
2018-09-04 22:49:45.695683669 +0200
@@ -1,0 +2,18 @@
+Thu Aug 16 11:35:47 UTC 2018 - [email protected]
+
+- bnc#1053559
+  - fixed serial_console= to use new terminal= API
+- 1.0.1
+
+-------------------------------------------------------------------------
+Tue Jul 10 14:35:47 UTC 2018 - [email protected]
+
+- bnc#1053559
+  - backward incompatible change in API
+  - modified Grub2::Default#terminal and terminal= to handle multiple
+    values in GRUB_TERMINAL. Former one returns array (was string) of
+    strings since now. Later one expects array of strings as argument,
+    array items are joined into space separated value of the option.
+- 1.0.0
+
+-------------------------------------------------------------------------

Old:
----
  cfa_grub2-0.6.5.gem

New:
----
  cfa_grub2-1.0.1.gem

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

Other differences:
------------------
++++++ rubygem-cfa_grub2.spec ++++++
--- /var/tmp/diff_new_pack.Vx1ECW/_old  2018-09-04 22:49:46.411686129 +0200
+++ /var/tmp/diff_new_pack.Vx1ECW/_new  2018-09-04 22:49:46.411686129 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package rubygem-cfa_grub2
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 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:           rubygem-cfa_grub2
-Version:        0.6.5
+Version:        1.0.1
 Release:        0
 %define mod_name cfa_grub2
 %define mod_full_name %{mod_name}-%{version}
@@ -28,7 +28,7 @@
 Url:            http://github.com/config-files-api/config_files_api_grub2
 Source:         http://rubygems.org/gems/%{mod_full_name}.gem
 Summary:        Models for GRUB2 configuration files
-License:        LGPL-3.0
+License:        LGPL-3.0-only
 Group:          Development/Languages/Ruby
 
 %description

++++++ cfa_grub2-0.6.5.gem -> cfa_grub2-1.0.1.gem ++++++
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/cfa/grub2/default.rb new/lib/cfa/grub2/default.rb
--- old/lib/cfa/grub2/default.rb        2017-11-30 16:11:42.000000000 +0100
+++ new/lib/cfa/grub2/default.rb        2018-08-17 09:27:40.000000000 +0200
@@ -90,7 +90,7 @@
       end
 
       def recovery_entry
-        @recovery ||= BooleanValue.new(
+        @recovery_entry ||= BooleanValue.new(
           "GRUB_DISABLE_RECOVERY", self,
           # grub key is disable, so use reverse logic
           true_value: "false", false_value: "true"
@@ -102,29 +102,51 @@
           true_value: "y", false_value: "n")
       end
 
+      VALID_TERMINAL_OPTIONS = [:serial, :console, :gfxterm].freeze
+      # Reads value of GRUB_TERMINAL from /etc/default/grub
+      #
+      # GRUB_TERMINAL option allows multiple values as space separated string
+      #
+      # @return [Array<Symbol>, nil] an array of symbols where each symbol
+      #                              represents supported terminal definition
+      #                              nil if value is undefined or empty
       def terminal
-        value = value_for("GRUB_TERMINAL")
-        case value
-        when "", nil   then nil
-        when "console" then :console
-        when "serial"  then :serial
-        when "gfxterm" then :gfxterm
-        else
-          raise "unknown GRUB_TERMINAL option #{value.inspect}"
-        end
-      end
+        values = value_for("GRUB_TERMINAL")
 
-      VALID_TERMINAL_OPTIONS = [:serial, :console, :gfxterm].freeze
-      def terminal=(value)
-        if !VALID_TERMINAL_OPTIONS.include?(value)
-          raise ArgumentError, "invalid value #{value.inspect}"
-        end
+        return nil if values.nil? || values.empty?
+
+        values.split.map do |value|
+          msg = "unknown GRUB_TERMINAL option #{value.inspect}"
+          raise msg if !VALID_TERMINAL_OPTIONS.include?(value.to_sym)
 
-        generic_set("GRUB_TERMINAL", value.to_s)
+          value.to_sym
+        end
       end
 
+      # Sets GRUB_TERMINAL option
+      #
+      # Raises an ArgumentError exception in case of invalid value
+      #
+      # @param values [Array<Symbol>, nil] list of accepted terminal values
+      #                                    (@see VALID_TERMINAL_OPTIONS)
+      def terminal=(values)
+        values = [] if values.nil?
+
+        msg = "A value is invalid: #{values.inspect}".freeze
+        invalid = values.any? { |v| !VALID_TERMINAL_OPTIONS.include?(v) }
+        raise ArgumentError, msg if invalid
+
+        generic_set("GRUB_TERMINAL", values.join(" "))
+      end
+
+      # Sets GRUB_SERIAL_COMMAND option
+      #
+      # Updates GRUB_SERIAL_COMMAND with given value, also enables serial
+      # console in GRUB_TERMINAL
+      #
+      # @param value [String] value for GRUB_SERIAL_COMMAND
       def serial_console=(value)
-        self.terminal = :serial
+        self.terminal = (terminal || []) | [:serial]
         generic_set("GRUB_SERIAL_COMMAND", value)
       end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2017-11-30 16:11:47.000000000 +0100
+++ new/metadata        2018-08-17 09:27:58.000000000 +0200
@@ -1,14 +1,14 @@
 --- !ruby/object:Gem::Specification
 name: cfa_grub2
 version: !ruby/object:Gem::Version
-  version: 0.6.5
+  version: 1.0.1
 platform: ruby
 authors:
 - Josef Reidinger
 autorequire: 
 bindir: bin
 cert_chain: []
-date: 2017-11-30 00:00:00.000000000 Z
+date: 2018-08-17 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
   name: cfa
@@ -56,7 +56,7 @@
       version: 1.3.6
 requirements: []
 rubyforge_project: 
-rubygems_version: 2.6.11
+rubygems_version: 2.7.3
 signing_key: 
 specification_version: 4
 summary: Models for GRUB2 configuration files.


Reply via email to