Script 'mail_helper' called by kukuk Hello packager, This is just FYI. Your package was checked in in distribution "sle12" by autobuild-member: kukuk. Here comes the log... ---------------------------%<------------------------------ Hi, here is the log from ci_new_pac /mounts/work_src_done/SLE12/yast2 -> sle12 ## BNC# 870949 : "SuseFirewall start failure during installation (build 230)" (RESOLVED/FIXED) Changes: -------- --- /work/SRC/SUSE:SLE-12:GA/yast2/yast2.changes 2014-03-28 16:29:19.000000000 +0100 +++ /mounts/work_src_done/SLE12/yast2/yast2.changes 2014-03-31 22:03:25.000000000 +0200 @@ -1,0 +2,12 @@ +Mon Mar 31 19:48:07 UTC 2014 - vmoravec@suse.com + +- Fix failing tests +- 3.1.36 + +------------------------------------------------------------------- +Mon Mar 31 14:54:17 UTC 2014 - vmoravec@suse.com + +- Fix enabling services in inst-sys (bnc#870949) +- 3.1.35 + +------------------------------------------------------------------- calling whatdependson for sle12-i586 Packages directly triggered for rebuild: - yast2 - at least 73 other packages ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/SUSE:SLE-12:GA/yast2 (Old) and /mounts/work_src_done/SLE12/yast2 (BS:build ID:35287 MAIL:yast-commit@opensuse.org) (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "yast2", Maintainer is "yast-commit@opensuse.org" Old: ---- yast2-3.1.34.tar.bz2 New: ---- yast2-3.1.36.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2.spec ++++++ --- /var/tmp/diff_new_pack.TUqQTd/_old 2014-04-01 09:57:09.000000000 +0200 +++ /var/tmp/diff_new_pack.TUqQTd/_new 2014-04-01 09:57:09.000000000 +0200 @@ -17,7 +17,7 @@ Name: yast2 -Version: 3.1.34 +Version: 3.1.36 Release: 0 URL: https://github.com/yast/yast-yast2 ++++++ yast2-3.1.34.tar.bz2 -> yast2-3.1.36.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.34/library/runlevel/src/modules/Service.rb new/yast2-3.1.36/library/runlevel/src/modules/Service.rb --- old/yast2-3.1.34/library/runlevel/src/modules/Service.rb 2014-03-28 14:20:52.000000000 +0100 +++ new/yast2-3.1.36/library/runlevel/src/modules/Service.rb 2014-03-31 21:53:25.000000000 +0200 @@ -402,7 +402,7 @@ when :not_found error << "Service '#{service_name}' not found" else - error.prepend("Attempt to `#{event}` service '#{service_name}' failed. ") + error.prepend("Attempt to `#{event}` service '#{service_name}' failed.\nERROR: ") end self.error = error log.error(error) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.34/library/runlevel/test/service_test.rb new/yast2-3.1.36/library/runlevel/test/service_test.rb --- old/yast2-3.1.34/library/runlevel/test/service_test.rb 2014-03-28 14:20:52.000000000 +0100 +++ new/yast2-3.1.36/library/runlevel/test/service_test.rb 2014-03-31 21:53:25.000000000 +0200 @@ -3,6 +3,8 @@ require_relative 'test_helper' module Yast + import 'Service' + describe Service do include SystemdServiceStubs diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.34/library/runlevel/test/test_helper.rb new/yast2-3.1.36/library/runlevel/test/test_helper.rb --- old/yast2-3.1.34/library/runlevel/test/test_helper.rb 2014-03-28 14:20:52.000000000 +0100 +++ new/yast2-3.1.36/library/runlevel/test/test_helper.rb 2014-03-31 21:53:25.000000000 +0200 @@ -1,13 +1,11 @@ #!/usr/bin/env rspec -require 'rspec' - -require "yast" +# We need the stubs used for SystemdService tests +require_relative "../../systemd/test/test_helper" ENV["Y2DIR"] = File.expand_path("../../src", __FILE__) -Yast.import 'Service' +require "yast" + -# We need the stubs used for SystemdService tests -require_relative "../../systemd/test/test_helper" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.34/library/systemd/src/lib/yast2/systemd_unit.rb new/yast2-3.1.36/library/systemd/src/lib/yast2/systemd_unit.rb --- old/yast2-3.1.34/library/systemd/src/lib/yast2/systemd_unit.rb 2014-03-28 14:20:52.000000000 +0100 +++ new/yast2-3.1.36/library/systemd/src/lib/yast2/systemd_unit.rb 2014-03-31 21:53:25.000000000 +0200 @@ -4,6 +4,7 @@ require 'forwardable' module Yast + import 'Mode' ### # Use this class always as a parent class for implementing various systemd units. @@ -59,9 +60,10 @@ def initialize full_unit_name, properties={} @unit_name, @unit_type = full_unit_name.split(".") raise "Missing unit type suffix" unless unit_type - log.warn "Unsupported unit type '#{unit_type}'" unless SUPPORTED_TYPES.member?(unit_type) + log.warn "Unsupported unit type '#{unit_type}'" unless SUPPORTED_TYPES.member?(unit_type) @input_properties = properties.merge!(DEFAULT_PROPERTIES) + @properties = show @error = self.properties.error @name = id.to_s.split(".").first.to_s @@ -74,7 +76,7 @@ end def show - Properties.new(self) + Mode.installation ? InstallationProperties.new(self) : Properties.new(self) end def status @@ -118,7 +120,9 @@ end def command command_name, options={} - Systemctl.execute("#{command_name} #{unit_name}.#{unit_type} #{options[:options]}") + command = "#{command_name} #{unit_name}.#{unit_type} #{options[:options]}" + log.info "`#{Systemctl::CONTROL} #{command}`" + Systemctl.execute(command) end private @@ -127,8 +131,6 @@ error.clear command_result = yield error << command_result.stderr - return false unless error.empty? - refresh! command_result.exit.zero? end @@ -139,10 +141,12 @@ def initialize systemd_unit super() self[:systemd_unit] = systemd_unit - raw_output = load_systemd_properties + raw_output = load_systemd_properties + self[:raw] = raw_output.stdout self[:error] = raw_output.stderr + self[:exit] = raw_output.exit - if !raw_output.exit.zero? + if !exit.zero? || !error.empty? message = "Failed to get properties for unit '#{systemd_unit.unit_name}' ; " message << "Command `#{raw_output.command}` returned error: #{error}" log.error(message) @@ -150,7 +154,6 @@ return end - self[:raw] = raw_output.stdout extract_properties self[:active?] = active_state == "active" self[:running?] = sub_state == "running" @@ -175,5 +178,41 @@ systemd_unit.command("show", :options => properties.join) end end + + # systemd command `systemctl show` is not available during installation + # and will return error "Running in chroot, ignoring request." Therefore, we must + # avoid calling it in the installation workflow. To keep the API partially + # consistent, this class offers a replacement for the Properties above. + # + # It has two goals: + # 1. Checks for existence of the unit based on the stderr from the command + # `systemctl is-enabled` + # 2. Retrieves the status enabled|disabled which is needed in the installation + # system. There are currently only 3 commands available for systemd in + # inst-sys/chroot: `systemctl enable|disable|is-enabled`. The rest will return + # the error message mentioned above in this comment. + # + # Once the inst-sys has running dbus/systemd, this class definition can be removed + # together with the condition for Mode.installation in the SystemdUnit#show. + class InstallationProperties < OpenStruct + include Yast::Logger + + def initialize systemd_unit + super() + self[:systemd_unit] = systemd_unit + status = get_status + self[:raw] = status.stdout + self[:error] = status.stderr + self[:exit] = status.exit + self[:enabled?] = status.exit.zero? + self[:not_found?] = status.stderr.empty? ? false : true + end + + private + + def get_status + systemd_unit.command("is-enabled") + end + end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.34/library/systemd/test/systemd_socket_test.rb new/yast2-3.1.36/library/systemd/test/systemd_socket_test.rb --- old/yast2-3.1.34/library/systemd/test/systemd_socket_test.rb 2014-03-28 14:20:52.000000000 +0100 +++ new/yast2-3.1.36/library/systemd/test/systemd_socket_test.rb 2014-03-31 21:53:25.000000000 +0200 @@ -1,6 +1,7 @@ #!/usr/bin/env rspec - +require 'yast' require_relative "test_helper" +require 'yast2/systemd_unit' module Yast import 'SystemdSocket' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.34/library/systemd/test/systemd_unit_test.rb new/yast2-3.1.36/library/systemd/test/systemd_unit_test.rb --- old/yast2-3.1.34/library/systemd/test/systemd_unit_test.rb 2014-03-28 14:20:52.000000000 +0100 +++ new/yast2-3.1.36/library/systemd/test/systemd_unit_test.rb 2014-03-31 21:53:25.000000000 +0200 @@ -1,7 +1,6 @@ #!/usr/bin/env rspec require_relative 'test_helper' -require 'yast2/systemd_unit' module Yast describe SystemdUnit do @@ -20,6 +19,44 @@ stub_services end + context "Installation system without full support of systemd" do + before do + Yast::Mode.stub(:installation).and_return(true) + end + + describe "#properties" do + it "returns struct with restricted installation properties" do + allow_any_instance_of(SystemdUnit).to receive(:command) + .with("is-enabled sshd.service").and_return( + OpenStruct.new('stderr'=>'', 'stdout'=>'enabled', 'exit'=>0) + ) + unit = SystemdUnit.new("sshd.service") + expect(unit.properties).to be_a(SystemdUnit::InstallationProperties) + end + + describe "#enabled?" do + it "returns true if service is enabled" do + allow_any_instance_of(SystemdUnit).to receive(:command) + .with("is-enabled sshd.service").and_return( + OpenStruct.new('stderr'=>'', 'stdout'=>'enabled', 'exit'=>0) + ) + unit = SystemdUnit.new("sshd.service") + expect(unit.enabled?).to be_true + end + + it "returns false if service is disabled" do + stub_unit_command(:success=>false) + allow_any_instance_of(SystemdUnit).to receive(:command) + .with("is-enabled sshd.service").and_return( + OpenStruct.new('stderr'=>'', 'stdout'=>'disabled', 'exit'=>1) + ) + unit = SystemdUnit.new("sshd.service") + expect(unit.enabled?).to be_false + end + end + end + end + describe "#properties" do it "always returns struct including default properties" do unit = SystemdUnit.new("iscsi.socket") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.34/library/systemd/test/test_helper.rb new/yast2-3.1.36/library/systemd/test/test_helper.rb --- old/yast2-3.1.34/library/systemd/test/test_helper.rb 2014-03-28 14:20:52.000000000 +0100 +++ new/yast2-3.1.36/library/systemd/test/test_helper.rb 2014-03-31 21:53:25.000000000 +0200 @@ -1,9 +1,15 @@ require 'rspec' -ENV["Y2DIR"] = File.expand_path("../../src", __FILE__) +ENV["Y2DIR"] = File.expand_path("../../src", __FILE__) unless ENV["Y2DIR"] require "yast" +require 'yast2/systemd_unit' + +Yast.import 'SystemdSocket' +Yast.import 'SystemdService' +Yast.import 'SystemdTarget' + module SystemctlStubs def stub_systemctl unit diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.34/package/yast2.changes new/yast2-3.1.36/package/yast2.changes --- old/yast2-3.1.34/package/yast2.changes 2014-03-28 14:20:52.000000000 +0100 +++ new/yast2-3.1.36/package/yast2.changes 2014-03-31 21:53:25.000000000 +0200 @@ -1,4 +1,16 @@ ------------------------------------------------------------------- +Mon Mar 31 19:48:07 UTC 2014 - vmoravec@suse.com + +- Fix failing tests +- 3.1.36 + +------------------------------------------------------------------- +Mon Mar 31 14:54:17 UTC 2014 - vmoravec@suse.com + +- Fix enabling services in inst-sys (bnc#870949) +- 3.1.35 + +------------------------------------------------------------------- Fri Mar 28 13:13:54 UTC 2014 - vmoravec@suse.com - Add more systemd unit commands to SystemdService diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-3.1.34/package/yast2.spec new/yast2-3.1.36/package/yast2.spec --- old/yast2-3.1.34/package/yast2.spec 2014-03-28 14:20:52.000000000 +0100 +++ new/yast2-3.1.36/package/yast2.spec 2014-03-31 21:53:25.000000000 +0200 @@ -17,7 +17,7 @@ Name: yast2 -Version: 3.1.34 +Version: 3.1.36 Release: 0 URL: https://github.com/yast/yast-yast2 continue with "q"... Checked in at Tue Apr 1 09:58:21 CEST 2014 by kukuk Remember to have fun... -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org