Hello community, here is the log from the commit of package rubygem-cfa_grub2 for openSUSE:Factory checked in at 2016-07-16 22:12:24 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-cfa_grub2 (Old) and /work/SRC/openSUSE:Factory/.rubygem-cfa_grub2.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-cfa_grub2" Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-cfa_grub2/rubygem-cfa_grub2.changes 2016-05-13 09:22:20.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.rubygem-cfa_grub2.new/rubygem-cfa_grub2.changes 2016-07-16 22:12:27.000000000 +0200 @@ -1,0 +2,15 @@ +Wed Jul 13 07:40:52 UTC 2016 - [email protected] + +- Do not crash for submenu with double quotes (bnc#986005) +- Filter out non-bootable menuentries ( a Snapper help label, + using double quotes ) +- 0.5.1 + +------------------------------------------------------------------- +Mon Jul 11 13:40:06 UTC 2016 - [email protected] + +- extend grub.cfg model to construct also full path usable for + grub2-set-default (bnc#986005) +- 0.5.0 + +------------------------------------------------------------------- Old: ---- cfa_grub2-0.4.1.gem New: ---- cfa_grub2-0.5.1.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-cfa_grub2.spec ++++++ --- /var/tmp/diff_new_pack.YBE29q/_old 2016-07-16 22:12:28.000000000 +0200 +++ /var/tmp/diff_new_pack.YBE29q/_new 2016-07-16 22:12:28.000000000 +0200 @@ -17,7 +17,7 @@ Name: rubygem-cfa_grub2 -Version: 0.4.1 +Version: 0.5.1 Release: 0 %define mod_name cfa_grub2 %define mod_full_name %{mod_name}-%{version} ++++++ cfa_grub2-0.4.1.gem -> cfa_grub2-0.5.1.gem ++++++ 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/device_map.rb new/lib/cfa/grub2/device_map.rb --- old/lib/cfa/grub2/device_map.rb 2016-05-12 10:42:19.000000000 +0200 +++ new/lib/cfa/grub2/device_map.rb 2016-07-13 13:30:29.000000000 +0200 @@ -24,7 +24,7 @@ end def save(changes_only: false) - raise "Too much grub devices. Limit is 8." if grub_devices.size > 8 + raise "Too many grub devices. Limit is 8." if grub_devices.size > 8 super end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/cfa/grub2/grub_cfg.rb new/lib/cfa/grub2/grub_cfg.rb --- old/lib/cfa/grub2/grub_cfg.rb 2016-05-12 10:42:19.000000000 +0200 +++ new/lib/cfa/grub2/grub_cfg.rb 2016-07-13 13:30:29.000000000 +0200 @@ -12,8 +12,15 @@ # @private only internal parser class Parser def self.parse(string) - menu_lines = string.lines.grep(/menuentry\s*'/) - menu_lines.map { |line| line[/\s*menuentry\s*'([^']+)'.*/, 1] } + submenu = "" + string.lines.each_with_object([]) do |line, result| + case line + when /menuentry\s+'/ then result << parse_entry(line, submenu) + when /^}\s*\n/ then submenu = "" + when /submenu\s+'/ + submenu = line[/\s*submenu\s+'([^']+)'.*/, 1] + end + end end def self.serialize(_string) @@ -24,6 +31,15 @@ def self.empty [] end + + def self.parse_entry(line, submenu) + entry = line[/\s*menuentry\s+'([^']+)'.*/, 1] + { + title: entry, + path: submenu.empty? ? entry : "#{submenu}>#{entry}" + } + end + private_class_method :parse_entry end def initialize(file_handler: nil) @@ -31,7 +47,19 @@ end # @return [Array<String>] sections from grub.cfg in order as they appear + # @deprecated use instead boot_entries def sections + data.map { |p| p[:title] } + end + + # @return [Array<Hash>] return boot entries containing `title:` as shown + # on screen and `path:` whole path usable for grub2-set-default including + # also submenu part of path + # @note Some entries are not in fact bootable, such as the + # "run snaper rollback" hint-only entry on SUSE. They are ignored. + # As a hack, they are recognized by double quote delimiters while the + # regular entries use single quotes. + def boot_entries data end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2016-05-12 10:42:19.000000000 +0200 +++ new/metadata 2016-07-13 13:30:45.000000000 +0200 @@ -1,14 +1,14 @@ --- !ruby/object:Gem::Specification name: cfa_grub2 version: !ruby/object:Gem::Version - version: 0.4.1 + version: 0.5.1 platform: ruby authors: - Josef Reidinger autorequire: bindir: bin cert_chain: [] -date: 2016-05-12 00:00:00.000000000 Z +date: 2016-07-13 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.2.2 +rubygems_version: 2.4.5.1 signing_key: specification_version: 4 summary: Models for GRUB2 configuration files.
