Hello community, here is the log from the commit of package machinery for openSUSE:Factory checked in at 2015-11-28 15:19:00 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/machinery (Old) and /work/SRC/openSUSE:Factory/.machinery.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "machinery" Changes: -------- --- /work/SRC/openSUSE:Factory/machinery/machinery.changes 2015-11-22 11:02:28.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.machinery.new/machinery.changes 2015-11-28 15:19:03.000000000 +0100 @@ -1,0 +2,19 @@ +Tue Nov 24 13:17:18 CET 2015 - [email protected] + +- update to version 1.16.2 + * Fix crash when the user does not have enough permissions to create the image + directory for the `build` command (gh#SUSE/machinery#1667) + * Fix wrong hint for docker containers while running `analyze` command + * Add a new hint when using the `--public` option for the `serve` command that it + makes all descriptions publicly available + * Fix Machinery failing to inspect changed config files in case of restrictive + permissions (gh#SUSE/machinery#1609) + * Remove hint for `show`, when `inspect` is run with `--show` option + * Fix repository inspection on hosts that have a LANGUAGE variable set + * Empty scopes now display a message in HTML & CLI views (gh#SUSE/machinery#1615) + * Fix SLES 11 SP4 os inspector output to be similar to SLES 11 SP3 + * Fix Autoyast export on openSUSE Leap and Tumbleweed (gh#SUSE/machinery#1627) + * Allow building of openSUSE Leap and Tumbleweed on openSUSE Leap and Tumbleweed + * Allow building of SLES11 and SLES12 on openSUSE Leap + +------------------------------------------------------------------- Old: ---- machinery-tool-1.16.1.gem New: ---- machinery-tool-1.16.2.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ machinery.spec ++++++ --- /var/tmp/diff_new_pack.nbXMQN/_old 2015-11-28 15:19:04.000000000 +0100 +++ /var/tmp/diff_new_pack.nbXMQN/_new 2015-11-28 15:19:04.000000000 +0100 @@ -17,7 +17,7 @@ Name: machinery -Version: 1.16.1 +Version: 1.16.2 Release: 0 %define binary_name machinery %define mod_name machinery-tool @@ -68,7 +68,7 @@ BuildRequires: %{rubygem mimemagic <= 0.4} BuildRequires: %{rubygem mimemagic >= 0.3.0} BuildRequires: %{rubygem nokogiri <= 1.7} -BuildRequires: %{rubygem nokogiri >= 1.6.0} +BuildRequires: %{rubygem nokogiri >= 1.6.3} BuildRequires: %{rubygem sinatra <= 1.5} BuildRequires: %{rubygem sinatra >= 1.4.6} BuildRequires: %{rubygem tilt <= 3} @@ -93,7 +93,7 @@ Requires: %{rubygem mimemagic <= 0.4} Requires: %{rubygem mimemagic >= 0.3.0} Requires: %{rubygem nokogiri <= 1.7} -Requires: %{rubygem nokogiri >= 1.6.0} +Requires: %{rubygem nokogiri >= 1.6.3} Requires: %{rubygem sinatra <= 1.5} Requires: %{rubygem sinatra >= 1.4.6} Requires: %{rubygem tilt <= 3} @@ -122,7 +122,7 @@ BuildRequires: rubygem(mimemagic) <= 0.4 BuildRequires: rubygem(mimemagic) >= 0.3.0 BuildRequires: rubygem(nokogiri) <= 1.7 -BuildRequires: rubygem(nokogiri) >= 1.6.0 +BuildRequires: rubygem(nokogiri) >= 1.6.3 BuildRequires: rubygem(sinatra) <= 1.5 BuildRequires: rubygem(sinatra) >= 1.4.6 BuildRequires: rubygem(tilt) <= 3 @@ -174,7 +174,7 @@ gem "json", "~> 1.8.0" %endif gem "abstract_method", "~> 1.2.1" -gem "nokogiri", "~> 1.6.0" +gem "nokogiri", "~> 1.6.3" gem "gli", "~> 2.11" gem "json-schema", "~> 2.2.4" gem "haml", "~> 4.0.5" @@ -196,8 +196,6 @@ bundle install --standalone --local -rm -rf vendor .bundle Gemfile Gemfile.lock - # Remove references to the build directory to prevent the following RPMLint error: # E: file-contains-buildroot (Badness: 10000) rm -rf bundle/ruby/%{rb_ver}/extensions/*/%{rb_ver}/nokogiri-*/mkmf.log ++++++ machinery-tool-1.16.1.gem -> machinery-tool-1.16.2.gem ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/.git_revision new/.git_revision --- old/.git_revision 2015-11-09 17:57:30.000000000 +0100 +++ new/.git_revision 2015-11-24 13:19:37.000000000 +0100 @@ -1 +1 @@ -e2a5941fcf2ffbbcbd765e23e860fc417592fdd1 \ No newline at end of file +4afb989b21b401f983686603e6521c112630cac9 \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/NEWS new/NEWS --- old/NEWS 2015-11-09 17:57:30.000000000 +0100 +++ new/NEWS 2015-11-24 13:19:37.000000000 +0100 @@ -1,6 +1,25 @@ # Machinery Release Notes +## Version 1.16.2 - Tue Nov 24 13:17:18 CET 2015 - [email protected] + +* Fix crash when the user does not have enough permissions to create the image + directory for the `build` command (gh#SUSE/machinery#1667) +* Fix wrong hint for docker containers while running `analyze` command + (gh#SUSE/machinery#1632) +* Add a new hint when using the `--public` option for the `serve` command that it + makes all descriptions publicly available +* Fix Machinery failing to inspect changed config files in case of restrictive + permissions (gh#SUSE/machinery#1609) +* Remove hint for `show`, when `inspect` is run with `--show` option + (gh#SUSE/machinery#1648) +* Fix repository inspection on hosts that have a LANGUAGE variable set +* Empty scopes now display a message in HTML & CLI views (gh#SUSE/machinery#1615) +* Fix SLES 11 SP4 os inspector output to be similar to SLES 11 SP3 +* Fix Autoyast export on openSUSE Leap and Tumbleweed (gh#SUSE/machinery#1627) +* Allow building of openSUSE Leap and Tumbleweed on openSUSE Leap and Tumbleweed +* Allow building of SLES11 and SLES12 on openSUSE Leap + ## Version 1.16.1 - Mon Nov 09 17:55:15 CET 2015 - [email protected] * Fix type recognition in case of empty files for config- and changed-managed-files Files old/checksums.yaml.gz and new/checksums.yaml.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/html/partials/changed_managed_files.html.haml new/html/partials/changed_managed_files.html.haml --- old/html/partials/changed_managed_files.html.haml 2015-11-09 17:57:30.000000000 +0100 +++ new/html/partials/changed_managed_files.html.haml 2015-11-24 13:19:37.000000000 +0100 @@ -1,4 +1,4 @@ -- if changed_managed_files && changed_managed_files.files.length > 0 +- if changed_managed_files %div %a.scope_anchor{ id: "changed_managed_files" } .scope#changed_managed_files_container{ "data-scope" => "changed_managed_files" } @@ -10,32 +10,35 @@ .row.scope_content.collapse.in .col-xs-1 .col-xs-11 - %table.table.table-striped.table-hover.table-condensed.files-table.filterable - %thead - %tr - %th Name - %th Package Name - %th.medium Package Version - %th.medium Changes - %th.small Mode - %th.small User - %th.small Group - %tbody - - changed_managed_files.files.each do |file| + - if count == 0 + There are no changed managed files. + - if count > 0 + %table.table.table-striped.table-hover.table-condensed.files-table.filterable + %thead %tr - %td - - if file.on_disk? - %a.file-download{ href: "#" } - = file.name - - else - %span - = file.name - %td= file.package_name - %td= file.package_version - %td - = file.changes.join(",") - - if file.error_message - %span{ title: file.error_message } (details) - %td= file.mode - %td= file.user - %td= file.group + %th Name + %th Package Name + %th.medium Package Version + %th.medium Changes + %th.small Mode + %th.small User + %th.small Group + %tbody + - changed_managed_files.files.each do |file| + %tr + %td + - if file.on_disk? + %a.file-download{ href: "#" } + = file.name + - else + %span + = file.name + %td= file.package_name + %td= file.package_version + %td + = file.changes.join(",") + - if file.error_message + %span{ title: file.error_message } (details) + %td= file.mode + %td= file.user + %td= file.group diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/html/partials/config_files.html.haml new/html/partials/config_files.html.haml --- old/html/partials/config_files.html.haml 2015-11-09 17:57:30.000000000 +0100 +++ new/html/partials/config_files.html.haml 2015-11-24 13:19:37.000000000 +0100 @@ -1,4 +1,4 @@ -- if config_files && config_files.files.length > 0 +- if config_files %div %a.scope_anchor{ id: "config_files" } .scope#config_files_container{ "data-scope" => "config_files" } @@ -8,50 +8,56 @@ :title => "Config Files", :count => "#{count} #{Machinery.pluralize(count, "file")}" .row.scope_content.collapse.in - - config_files.files.each do |file| - - if file.diff - .diff{ style: "display: none", "data-config-file-diff" => file.diff.file } - %span.diff-summary - #{file.diff.additions} additions & #{file.diff.deletions} deletions - %table.diff - - file.diff.lines.each do |line| - %tr{ class: line.type } - %td.active.linenumber= line.original_line_number - %td.linenumber= line.new_line_number - %td - = line.content - .col-md-1 - .col-md-11 - %table.table.table-striped.table-hover.table-condensed.files-table.filterable - %thead - %tr - %th Name - %th.medium Package Name - %th.medium Package Version - %th.medium Changes - %th.small Mode - %th.small User - %th.small Group - %tbody - - config_files.files.each do |file| - %tr - %td - %span - - if file.on_disk? - %a.file-download{ href: "#" } - = file.name - - else + .col-xs-1 + .col-xs-11 + - if count == 0 + There are no config files. + - if count > 0 + - config_files.files.each do |file| + - if file.diff + .diff{ style: "display: none", "data-config-file-diff" => file.diff.file } + %span.diff-summary + #{file.diff.additions} additions & #{file.diff.deletions} deletions + %table.diff + - file.diff.lines.each do |line| + %tr{ class: line.type } + %td.active.linenumber= line.original_line_number + %td.linenumber= line.new_line_number + %td + = line.content + .col-md-1 + .col-md-11 + %table.table.table-striped.table-hover.table-condensed.files-table.filterable + %thead + %tr + %th Name + %th.medium Package Name + %th.medium Package Version + %th.medium Changes + %th.small Mode + %th.small User + %th.small Group + %tbody + - config_files.files.each do |file| + %tr + %td %span - = file.name - - if file.diff - %a.diff-toggle{ "data-config-file" => file.name, "data-toggle" => "popover" } - Show diff - %td= file.package_name - %td= file.package_version - %td - = file.changes.join(",") - - if file.error_message - %span{ title: file.error_message } (details) - %td= file.mode - %td= file.user - %td= file.group + - if file.on_disk? + %a.file-download{ href: "#" } + = file.name + - else + %span + = file.name + - if file.diff + %a.diff-toggle{ "data-config-file" => file.name, + "data-toggle" => "popover" } + Show diff + %td= file.package_name + %td= file.package_version + %td + = file.changes.join(",") + - if file.error_message + %span{ title: file.error_message } (details) + %td= file.mode + %td= file.user + %td= file.group diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/html/partials/packages.html.haml new/html/partials/packages.html.haml --- old/html/partials/packages.html.haml 2015-11-09 17:57:30.000000000 +0100 +++ new/html/partials/packages.html.haml 2015-11-24 13:19:37.000000000 +0100 @@ -10,21 +10,24 @@ .row.scope_content.collapse.in .col-xs-1 .col-xs-11 - %table.table.table-striped.table-hover.table-condensed.filterable - %thead - %tr - %th Name - %th.medium Version - %th.medium Release - %th.medium Arch - %th.medium Vendor - %th Checksum - %tbody - - packages.each do |package| + - if packages.length == 0 + There are no packages. + - if packages.length > 0 + %table.table.table-striped.table-hover.table-condensed.filterable + %thead %tr - %td= package.name - %td= package.version - %td= package.release - %td= package.arch - %td= package.vendor - %td= package.checksum + %th Name + %th.medium Version + %th.medium Release + %th.medium Arch + %th.medium Vendor + %th Checksum + %tbody + - packages.each do |package| + %tr + %td= package.name + %td= package.version + %td= package.release + %td= package.arch + %td= package.vendor + %td= package.checksum diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/html/partials/patterns.html.haml new/html/partials/patterns.html.haml --- old/html/partials/patterns.html.haml 2015-11-09 17:57:30.000000000 +0100 +++ new/html/partials/patterns.html.haml 2015-11-24 13:19:37.000000000 +0100 @@ -9,15 +9,18 @@ .row.scope_content.collapse.in .col-xs-1 .col-xs-11 - %table.table.table-striped.table-hover.table-condensed.filterable - %thead - %tr - %th Name - %th.medium Version - %th.medium Release - %tbody - - patterns.each do |pattern| + - if patterns.length == 0 + There are no patterns. + - if patterns.length > 0 + %table.table.table-striped.table-hover.table-condensed.filterable + %thead %tr - %td= pattern.name - %td= pattern.version - %td= pattern.release + %th Name + %th.medium Version + %th.medium Release + %tbody + - patterns.each do |pattern| + %tr + %td= pattern.name + %td= pattern.version + %td= pattern.release diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/html/partials/repositories.html.haml new/html/partials/repositories.html.haml --- old/html/partials/repositories.html.haml 2015-11-09 17:57:30.000000000 +0100 +++ new/html/partials/repositories.html.haml 2015-11-24 13:19:37.000000000 +0100 @@ -10,26 +10,29 @@ .row.scope_content.collapse.in .col-xs-1 .col-xs-11 - %table.table.table-striped.table-hover.table-condensed.filterable - %thead - %tr - %th Name - %th Alias - %th.small Type - %th URL - %th.small Enabled - %th.small Autorefresh - %th.small GPG Check - %th.small Priority - %tbody - - repositories.each do |repo| + - if count == 0 + There are no repositories. + - if count > 0 + %table.table.table-striped.table-hover.table-condensed.filterable + %thead %tr - %td= repo.name - %td= repo.alias - %td= repo.type - %td - %a{ href: repo.url }= repo.url - %td= repo.enabled - %td= repo.autorefresh - %td= repo.gpgcheck - %td= repo.priority + %th Name + %th Alias + %th.small Type + %th URL + %th.small Enabled + %th.small Autorefresh + %th.small GPG Check + %th.small Priority + %tbody + - repositories.each do |repo| + %tr + %td= repo.name + %td= repo.alias + %td= repo.type + %td + %a{ href: repo.url }= repo.url + %td= repo.enabled + %td= repo.autorefresh + %td= repo.gpgcheck + %td= repo.priority diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/html/partials/services.html.haml new/html/partials/services.html.haml --- old/html/partials/services.html.haml 2015-11-09 17:57:30.000000000 +0100 +++ new/html/partials/services.html.haml 2015-11-24 13:19:37.000000000 +0100 @@ -10,14 +10,17 @@ .row.scope_content.collapse.in .col-xs-1 .col-xs-11 - %table.table.table-striped.table-hover.table-condensed.filterable - %thead - %tr - %th Name - %th.medium State - %tbody - - services.services.each do |service| + - if count == 0 + There are no services. + - if count > 0 + %table.table.table-striped.table-hover.table-condensed.filterable + %thead %tr - %td= service.name - %td{ class: "#{services.init_system}_#{service.state}" } - = service.state + %th Name + %th.medium State + %tbody + - services.services.each do |service| + %tr + %td= service.name + %td{ class: "#{services.init_system}_#{service.state}" } + = service.state diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/html/partials/unmanaged_files.html.haml new/html/partials/unmanaged_files.html.haml --- old/html/partials/unmanaged_files.html.haml 2015-11-09 17:57:30.000000000 +0100 +++ new/html/partials/unmanaged_files.html.haml 2015-11-24 13:19:37.000000000 +0100 @@ -1,4 +1,4 @@ -- if unmanaged_files && unmanaged_files.files.length > 0 +- if unmanaged_files %div %a.scope_anchor{ id: "unmanaged_files" } .scope#unmanaged_files_container{ "data-scope" => "unmanaged_files" } @@ -10,19 +10,22 @@ .row.scope_content.collapse.in .col-xs-1 .col-xs-11 - %table.table.table-striped.table-hover.table-condensed.files-table.filterable - %thead - %tr - %th Name - %th.medium Type - %tbody - - unmanaged_files.files.each do |file| + - if count == 0 + There are no unmanaged files. + - if count > 0 + %table.table.table-striped.table-hover.table-condensed.files-table.filterable + %thead %tr - %td - - if file.on_disk? - %a.file-download{ href: "#" } - = file.name - - else - %span - = file.name - %td= file.type + %th Name + %th.medium Type + %tbody + - unmanaged_files.files.each do |file| + %tr + %td + - if file.on_disk? + %a.file-download{ href: "#" } + = file.name + - else + %span + = file.name + %td= file.type diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/build_task.rb new/lib/build_task.rb --- old/lib/build_task.rb 2015-11-09 17:57:30.000000000 +0100 +++ new/lib/build_task.rb 2015-11-24 13:19:37.000000000 +0100 @@ -28,7 +28,12 @@ config = KiwiConfig.new(system_description, options) config.write(tmp_config_dir) - FileUtils.mkdir_p(output_path) + begin + FileUtils.mkdir_p(output_path) + rescue Errno::EACCES + raise Machinery::Errors::BuildDirectoryCreateError.new(output_path, CurrentUser.new.username) + end + if tmp_image_dir.start_with?("/tmp/") && tmp_config_dir.start_with?("/tmp/") tmp_script = write_kiwi_wrapper(tmp_config_dir, tmp_image_dir, output_path, img_extension) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/cli.rb new/lib/cli.rb --- old/lib/cli.rb 2015-11-09 17:57:30.000000000 +0100 +++ new/lib/cli.rb 2015-11-24 13:19:37.000000000 +0100 @@ -155,11 +155,11 @@ end def self.check_container_name!(image, name) - if image.include?("/") && name.include?("/") + if image == name && !SystemDescription.valid_name?(name) raise Machinery::Errors::InvalidCommandLine.new( "Error: System description name '#{name}' is invalid. By default Machinery" \ " uses the image name as description name if the parameter `--name` is not" \ - " provided.\nIf the image name consist a slash the `--name=NAME` parameter" \ + " provided.\nIf the image name contains a slash the `--name=NAME` parameter" \ " is mandatory. Valid characters are 'a-zA-Z0-9_:.-'." ) end @@ -616,7 +616,7 @@ inspect_options ) - Hint.print(:show_data, name: name) + Hint.print(:show_data, name: name) if options[:show] == false if !options["extract-files"] || Inspector.all_scopes.count != scope_list.count Hint.print(:do_complete_inspection, name: name, host: host) @@ -920,6 +920,10 @@ if options[:public] ip = "0.0.0.0" + + Machinery::Ui.warn("The --public option makes ALL of your system descriptions publicly " \ + "available. Take care if there are system descriptions that should not be read by " \ + "others!\n\n") else ip = "127.0.0.1" end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/compare_task.rb new/lib/compare_task.rb --- old/lib/compare_task.rb 2015-11-09 17:57:30.000000000 +0100 +++ new/lib/compare_task.rb 2015-11-24 13:19:37.000000000 +0100 @@ -70,9 +70,10 @@ identical = false if description1[scope] || description2[scope] end end - output = "Compared descriptions are identical.\n" + output if identical && common_scopes - - if !identical_scopes.empty? + if identical && common_scopes + output = "\n" + output unless output.empty? + output = "Compared descriptions are identical." + output + elsif !identical_scopes.empty? phrase = Machinery::pluralize(identical_scopes.count, "scope is", "scopes are") output += "Following #{phrase} identical in both descriptions: " + identical_scopes.join(",") end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/current_user.rb new/lib/current_user.rb --- old/lib/current_user.rb 2015-11-09 17:57:30.000000000 +0100 +++ new/lib/current_user.rb 2015-11-24 13:19:37.000000000 +0100 @@ -17,6 +17,10 @@ # Represents the user under which Machinery is running. class CurrentUser + def username + ENV["USER"] + end + def is_root? Process.euid == 0 end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/exceptions.rb new/lib/exceptions.rb --- old/lib/exceptions.rb 2015-11-09 17:57:30.000000000 +0100 +++ new/lib/exceptions.rb 2015-11-24 13:19:37.000000000 +0100 @@ -65,7 +65,14 @@ end.compact.first || "<HOSTNAME>" formatted_scopes = Machinery::Ui.internal_scope_list_to_string(@scopes) - cmd = "#{Hint.program_name} inspect --extract-files --scope=#{formatted_scopes.delete(" ")}" + if @description["environment"]["system_type"] == "docker" + inspect_cmd = "inspect-container" + else + inspect_cmd = "inspect" + end + + cmd = "#{Hint.program_name} #{inspect_cmd} --extract-files " \ + "--scope=#{formatted_scopes.delete(" ")}" cmd += " --name='#{@description.name}'" if hostname != @description.name cmd += " #{hostname}" @@ -147,5 +154,16 @@ @message = message end end + class BuildDirectoryCreateError < MachineryError + def initialize(directory, user) + @directory = directory + @user = user + end + + def to_s + "Could not create build directory '#{@directory}' because the user '#{@user}' does not " \ + "have sufficient permissions." + end + end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/helper.rb new/lib/helper.rb --- old/lib/helper.rb 2015-11-09 17:57:30.000000000 +0100 +++ new/lib/helper.rb 2015-11-24 13:19:37.000000000 +0100 @@ -55,10 +55,6 @@ with_env "LC_ALL" => "C", &block end -def with_utf8_locale(&block) - with_env "LC_ALL" => "en_US.UTF-8", &block -end - def with_env(env) # ENV isn't a Hash, but a weird Hash-like object. Calling #to_hash on it # will copy its items into a newly created Hash instance. This approach diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/kiwi_config.rb new/lib/kiwi_config.rb --- old/lib/kiwi_config.rb 2015-11-09 17:57:30.000000000 +0100 +++ new/lib/kiwi_config.rb 2015-11-24 13:19:37.000000000 +0100 @@ -194,6 +194,12 @@ when OsSles11 boot = "vmxboot/suse-SLES11" bootloader = "grub" + when OsOpenSuseTumbleweed + boot = "vmxboot/suse-tumbleweed" + bootloader = "grub2" + when OsOpenSuseLeap + boot = "vmxboot/suse-leap42.1" + bootloader = "grub2" else raise Machinery::Errors::ExportFailed.new( "Export is not possible because the operating system " \ @@ -344,15 +350,11 @@ end def enable_dhcp(output_location) - case @system_description.os - when OsSles11 - write_dhcp_network_config(output_location, "eth0") - when OsSles12 - write_dhcp_network_config(output_location, "lan0") - write_persistent_net_rules(output_location) - when OsOpenSuse13_1 - write_dhcp_network_config(output_location, "lan0") - write_persistent_net_rules(output_location) + if @system_description.os.is_a?(OsSles11) + write_dhcp_network_config(output_location, "eth0") + else + write_dhcp_network_config(output_location, "lan0") + write_persistent_net_rules(output_location) end puts "DHCP in built image will be enabled for the first device" end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/local_system.rb new/lib/local_system.rb --- old/lib/local_system.rb 2015-11-09 17:57:30.000000000 +0100 +++ new/lib/local_system.rb 2015-11-24 13:19:37.000000000 +0100 @@ -84,7 +84,7 @@ message = <<EOF You are running Machinery on a platform we do not explicitly support and test. It still could work very well. If you run into issues or would like to provide us feedback, you are welcome to file an issue at https://github.com/SUSE/machinery/issues/new or write an email to [email protected]. -Oficially supported operating systems are: '#{supported_oses}' +Officially supported operating systems are: '#{supported_oses}' To disable this message in the machinery configuration use 'machinery config perform-support-check=false' EOF @@ -132,7 +132,11 @@ else cheetah_class = LoggedCheetah end - with_utf8_locale do + + with_env( + "LANGUAGE" => "", + "LC_ALL" => locale + ) do cheetah_class.run(*args) end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/remote_system.rb new/lib/remote_system.rb --- old/lib/remote_system.rb 2015-11-09 17:57:30.000000000 +0100 +++ new/lib/remote_system.rb 2015-11-24 13:19:37.000000000 +0100 @@ -78,8 +78,8 @@ sudo = ["sudo", "-n"] if options[:privileged] && remote_user != "root" cmds = [ - "ssh", "#{remote_user}@#{host}", "-o", "LogLevel=ERROR", sudo, "LC_ALL=#{locale}", - *piped_args, options + "ssh", "#{remote_user}@#{host}", "-o", "LogLevel=ERROR", sudo, "LANGUAGE=", + "LC_ALL=#{locale}", *piped_args, options ].compact.flatten cheetah_class.run(*cmds) rescue Cheetah::ExecutionFailed => e diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/renderer.rb new/lib/renderer.rb --- old/lib/renderer.rb 2015-11-09 17:57:30.000000000 +0100 +++ new/lib/renderer.rb 2015-11-24 13:19:37.000000000 +0100 @@ -253,8 +253,12 @@ private def print_indented(s) - s.split("\n").each do |line| - @buffer += " " * @indent + line + "\n" + s.split("\n", -1).each do |line| + if line.empty? + @buffer += "\n" + else + @buffer += " " * @indent + line + "\n" + end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/rpm_database.rb new/lib/rpm_database.rb --- old/lib/rpm_database.rb 2015-11-09 17:57:30.000000000 +0100 +++ new/lib/rpm_database.rb 2015-11-24 13:19:37.000000000 +0100 @@ -35,6 +35,7 @@ def changed_files(&block) return @changed_files if @changed_files + check_requirements out = @system.run_script_with_progress("changed_files.sh", &block) result = out.each_line.map do |line| @@ -166,7 +167,8 @@ out = @system.run_command( "stat", "--printf", "%a:%U:%G:%u:%g:%F:%n\\n", *cur_files, - stdout: :capture + stdout: :capture, + privileged: true ) out.each_line do |l| path, values = parse_stat_line(l) @@ -197,4 +199,12 @@ ret.merge!(get_file_properties(cur_files)) unless cur_files.empty? ret end + + private + + def check_requirements + @system.check_requirement("rpm", "--version") + @system.check_requirement("stat", "--version") + @system.check_requirement("find", "--version") + end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/system_description.rb new/lib/system_description.rb --- old/lib/system_description.rb 2015-11-09 17:57:30.000000000 +0100 +++ new/lib/system_description.rb 2015-11-24 13:19:37.000000000 +0100 @@ -72,18 +72,16 @@ description end - def validate_name(name) - if ! /^[\w\.:-]*$/.match(name) - raise Machinery::Errors::SystemDescriptionError.new( - "System description name '#{name}' is invalid. " + - "Only 'a-zA-Z0-9_:.-' are valid characters." - ) - end + def valid_name?(name) + !!/^[\w:-][\w\.:-]*$/.match(name) + end - if name.start_with?(".") + def validate_name(name) + unless valid_name?(name) raise Machinery::Errors::SystemDescriptionError.new( - "System description name '#{name}' is invalid. " + - "A dot is not allowed as first character." + "System description name '#{name}' is invalid. " \ + "Only 'a-zA-Z0-9_:.-' are valid characters and a dot " \ + "is not allowed at the begginning." ) end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/version.rb new/lib/version.rb --- old/lib/version.rb 2015-11-09 17:57:30.000000000 +0100 +++ new/lib/version.rb 2015-11-24 13:19:37.000000000 +0100 @@ -17,6 +17,6 @@ module Machinery - VERSION = "1.16.1" + VERSION = "1.16.2" end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/machinery-helper/version.go new/machinery-helper/version.go --- old/machinery-helper/version.go 2015-11-09 17:57:30.000000000 +0100 +++ new/machinery-helper/version.go 2015-11-24 13:19:37.000000000 +0100 @@ -2,4 +2,4 @@ package main -const VERSION = "e2a5941fcf2ffbbcbd765e23e860fc417592fdd1" +const VERSION = "4afb989b21b401f983686603e6521c112630cac9" Files old/man/generated/machinery.1.gz and new/man/generated/machinery.1.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/man/generated/machinery.1.html new/man/generated/machinery.1.html --- old/man/generated/machinery.1.html 2015-11-09 17:57:30.000000000 +0100 +++ new/man/generated/machinery.1.html 2015-11-24 13:19:37.000000000 +0100 @@ -905,7 +905,7 @@ <li><p>When inspecting as non-root the user has to have the following command whitelist given in the sudoers file:</p> -<p>machinery ALL=(ALL) NOPASSWD: /usr/bin/find,/usr/bin/cat,/bin/cat,/usr/bin/rsync,/bin/rpm -Va *,/bin/tar --create *</p></li> +<p>machinery ALL=(ALL) NOPASSWD: /usr/bin/find,/usr/bin/cat,/bin/cat,/usr/bin/rsync,/bin/rpm -Va *,/bin/tar --create *,/usr/bin/stat</p></li> <li><p>To add a remote <code>machinery</code> user run as root:</p> <h1><code>useradd -m machinery -c "remote user for machinery"</code></h1> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2015-11-09 17:57:30.000000000 +0100 +++ new/metadata 2015-11-24 13:19:37.000000000 +0100 @@ -1,14 +1,14 @@ --- !ruby/object:Gem::Specification name: machinery-tool version: !ruby/object:Gem::Version - version: 1.16.1 + version: 1.16.2 platform: ruby authors: - SUSE autorequire: bindir: bin cert_chain: [] -date: 2015-11-09 00:00:00.000000000 Z +date: 2015-11-24 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: cheetah @@ -58,14 +58,14 @@ requirements: - - "~>" - !ruby/object:Gem::Version - version: 1.6.0 + version: 1.6.3 type: :runtime prerelease: false version_requirements: !ruby/object:Gem::Requirement requirements: - - "~>" - !ruby/object:Gem::Version - version: 1.6.0 + version: 1.6.3 - !ruby/object:Gem::Dependency name: gli requirement: !ruby/object:Gem::Requirement diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plugins/changed_managed_files/changed_managed_files_inspector.rb new/plugins/changed_managed_files/changed_managed_files_inspector.rb --- old/plugins/changed_managed_files/changed_managed_files_inspector.rb 2015-11-09 17:57:30.000000000 +0100 +++ new/plugins/changed_managed_files/changed_managed_files_inspector.rb 2015-11-24 13:19:37.000000000 +0100 @@ -24,7 +24,6 @@ end def inspect(filter, options = {}) - system.check_requirement("find", "--version") system.check_retrieve_files_dependencies if options[:extract_changed_managed_files] @system = system diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plugins/changed_managed_files/changed_managed_files_renderer.rb new/plugins/changed_managed_files/changed_managed_files_renderer.rb --- old/plugins/changed_managed_files/changed_managed_files_renderer.rb 2015-11-09 17:57:30.000000000 +0100 +++ new/plugins/changed_managed_files/changed_managed_files_renderer.rb 2015-11-24 13:19:37.000000000 +0100 @@ -27,7 +27,10 @@ list do file_status = description["changed_managed_files"].extracted - if !file_status.nil? + + if files.empty? + puts "There are no changed managed files." + elsif !file_status.nil? puts "Files extracted: #{file_status ? "yes" : "no"}" end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plugins/config_files/config_files_inspector.rb new/plugins/config_files/config_files_inspector.rb --- old/plugins/config_files/config_files_inspector.rb 2015-11-09 17:57:30.000000000 +0100 +++ new/plugins/config_files/config_files_inspector.rb 2015-11-24 13:19:37.000000000 +0100 @@ -17,13 +17,6 @@ class ConfigFilesInspector < Inspector has_priority 80 - # checks if all required binaries are present - def check_requirements(check_rsync) - @system.check_requirement("rpm", "--version") - @system.check_requirement("stat", "--version") - @system.check_requirement("find", "--version") - @system.check_retrieve_files_dependencies if check_rsync - end # returns a hash with entries for changed config files def config_file_changes(pkg) @@ -45,7 +38,7 @@ def inspect(filter, options = {}) do_extract = options[:extract_changed_config_files] - check_requirements(do_extract) + system.check_retrieve_files_dependencies if do_extract count = 0 files = @system.rpm_database.changed_files do |chunk| diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plugins/config_files/config_files_renderer.rb new/plugins/config_files/config_files_renderer.rb --- old/plugins/config_files/config_files_renderer.rb 2015-11-09 17:57:30.000000000 +0100 +++ new/plugins/config_files/config_files_renderer.rb 2015-11-24 13:19:37.000000000 +0100 @@ -31,10 +31,14 @@ list do file_status = description["config_files"].extracted - if !file_status.nil? + files = description["config_files"].files + + if files.empty? + puts "There are no config files." + elsif !file_status.nil? puts "Files extracted: #{file_status ? "yes" : "no"}" end - files = description["config_files"].files + if files files.each do |p| item_content = "#{p.name} (#{p.package_name}-#{p.package_version}, " \ @@ -78,7 +82,7 @@ path = File.join(diffs_dir, name + ".diff") if File.exists?(path) - puts "Diff:\n#{File.read(path)}" + puts "Diff:\n#{File.read(path).chomp}" else Machinery::Ui.warn "Diff for #{name} was not found on disk." end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plugins/environment/environment_inspector.rb new/plugins/environment/environment_inspector.rb --- old/plugins/environment/environment_inspector.rb 2015-11-09 17:57:30.000000000 +0100 +++ new/plugins/environment/environment_inspector.rb 2015-11-24 13:19:37.000000000 +0100 @@ -43,7 +43,7 @@ end all_locales = output.split - locale = ["en_US.utf8"].find { |l| all_locales.include?(l) } + locale = all_locales.find { |l| l.downcase.match(/en_us.utf.?8/) } locale || "C" end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plugins/os/os_inspector.rb new/plugins/os/os_inspector.rb --- old/plugins/os/os_inspector.rb 2015-11-09 17:57:30.000000000 +0100 +++ new/plugins/os/os_inspector.rb 2015-11-24 13:19:37.000000000 +0100 @@ -99,6 +99,13 @@ if result["pretty_name"] =~ /^openSUSE.*Leap/ result["pretty_name"] = "openSUSE Leap" end + + # converts SLES11 SP4 result to SP3 style + # the results are different because SP4 has an os-release + if result["pretty_name"] =~ /^SUSE Linux Enterprise Server 11 (SP\d)$/ + result["pretty_name"] = "SUSE Linux Enterprise Server 11" + result["version"] = "11 #{$1}" + end end # return pretty_name as name as it contains the actual full length # name instead of an abbreviation diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plugins/os/os_model.rb new/plugins/os/os_model.rb --- old/plugins/os/os_model.rb 2015-11-09 17:57:30.000000000 +0100 +++ new/plugins/os/os_model.rb 2015-11-24 13:19:37.000000000 +0100 @@ -178,7 +178,7 @@ end end -class OsOpenSuseTumbleweed < Os +class OsOpenSuseTumbleweed < OsSuse def display_name "#{name} (#{architecture})" end @@ -188,11 +188,11 @@ end def self.buildable_systems - [OsOpenSuse13_2] + [OsOpenSuse13_2, OsOpenSuseTumbleweed, OsOpenSuseLeap] end end -class OsOpenSuseLeap < Os +class OsOpenSuseLeap < OsSuse def display_name "#{name} (#{architecture})" end @@ -202,7 +202,7 @@ end def self.buildable_systems - [OsOpenSuse13_2, OsOpenSuseLeap] + [OsOpenSuse13_1, OsOpenSuse13_2, OsOpenSuseLeap, OsOpenSuseTumbleweed, OsSles12, OsSles11] end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plugins/packages/packages_renderer.rb new/plugins/packages/packages_renderer.rb --- old/plugins/packages/packages_renderer.rb 2015-11-09 17:57:30.000000000 +0100 +++ new/plugins/packages/packages_renderer.rb 2015-11-24 13:19:37.000000000 +0100 @@ -23,6 +23,10 @@ def content(description) return unless description.packages + if description.packages.empty? + puts "There are no packages." + end + list do description.packages.each do |p| item "#{p.name}-#{p.version}-#{p.release}.#{p.arch} (#{p.vendor})" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plugins/patterns/patterns_renderer.rb new/plugins/patterns/patterns_renderer.rb --- old/plugins/patterns/patterns_renderer.rb 2015-11-09 17:57:30.000000000 +0100 +++ new/plugins/patterns/patterns_renderer.rb 2015-11-24 13:19:37.000000000 +0100 @@ -19,6 +19,10 @@ def content(description) return unless description.patterns + if description.patterns.empty? + puts "There are no patterns." + end + list do description.patterns.each do |p| item "#{p.name}" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plugins/repositories/repositories_renderer.rb new/plugins/repositories/repositories_renderer.rb --- old/plugins/repositories/repositories_renderer.rb 2015-11-09 17:57:30.000000000 +0100 +++ new/plugins/repositories/repositories_renderer.rb 2015-11-24 13:19:37.000000000 +0100 @@ -20,7 +20,7 @@ return unless description.repositories if description.repositories.empty? - puts "System has no repositories" + puts "There are no repositories." end list do diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plugins/services/services_renderer.rb new/plugins/services/services_renderer.rb --- old/plugins/services/services_renderer.rb 2015-11-09 17:57:30.000000000 +0100 +++ new/plugins/services/services_renderer.rb 2015-11-24 13:19:37.000000000 +0100 @@ -19,6 +19,10 @@ def content(description) return unless description["services"] + if description["services"].services.empty? + puts "There are no services." + end + list do description["services"].services.each do |p| item "#{p.name}: #{p.state}" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/plugins/unmanaged_files/unmanaged_files_renderer.rb new/plugins/unmanaged_files/unmanaged_files_renderer.rb --- old/plugins/unmanaged_files/unmanaged_files_renderer.rb 2015-11-09 17:57:30.000000000 +0100 +++ new/plugins/unmanaged_files/unmanaged_files_renderer.rb 2015-11-24 13:19:37.000000000 +0100 @@ -21,15 +21,18 @@ list do file_status = description["unmanaged_files"].extracted - if !file_status.nil? + + if description["unmanaged_files"].files.empty? + puts "There are no unmanaged files." + elsif !file_status.nil? puts "Files extracted: #{file_status ? "yes" : "no"}" end if description["unmanaged_files"].files description["unmanaged_files"].files.each do |p| - if p.user && p.group + if description["unmanaged_files"].extracted item "#{p.name} (#{p.type})" do - puts "User/Group: #{p.user}:#{p.group}" + puts "User/Group: #{p.user}:#{p.group}" if p.user || p.group puts "Mode: #{p.mode}" if p.mode puts "Size: #{number_to_human_size(p.size)}" if p.size puts "Files: #{p.files}" if p.files
