Hello community, here is the log from the commit of package rubygem-facter for openSUSE:Factory checked in at 2016-01-28 17:24:56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-facter (Old) and /work/SRC/openSUSE:Factory/.rubygem-facter.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "rubygem-facter" Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-facter/rubygem-facter.changes 2015-11-28 15:19:31.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.rubygem-facter.new/rubygem-facter.changes 2016-01-28 17:25:48.000000000 +0100 @@ -1,0 +2,12 @@ +Wed Jan 27 17:13:56 UTC 2016 - tampakrap@opensuse.org + +- Version bump 2.4.6, see + http://docs.puppetlabs.com/facter/2.4/release_notes.html#facter-246 + +------------------------------------------------------------------- +Fri Jan 22 16:47:49 UTC 2016 - kstreitova@suse.com + +- Version bump 2.4.5, see + http://docs.puppetlabs.com/facter/2.4/release_notes.html#facter-245 + +------------------------------------------------------------------- Old: ---- facter-2.4.4.gem New: ---- facter-2.4.6.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-facter.spec ++++++ --- /var/tmp/diff_new_pack.7N3t2b/_old 2016-01-28 17:25:49.000000000 +0100 +++ /var/tmp/diff_new_pack.7N3t2b/_new 2016-01-28 17:25:49.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package rubygem-facter # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2016 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 @@ -24,7 +24,7 @@ # Name: rubygem-facter -Version: 2.4.4 +Version: 2.4.6 Release: 0 %define mod_name facter %define mod_full_name %{mod_name}-%{version} ++++++ facter-2.4.4.gem -> facter-2.4.6.gem ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/facter/core/execution/posix.rb new/lib/facter/core/execution/posix.rb --- old/lib/facter/core/execution/posix.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/lib/facter/core/execution/posix.rb 1970-01-01 01:00:00.000000000 +0100 @@ -11,11 +11,11 @@ def which(bin) if absolute_path?(bin) - return bin if File.executable?(bin) + return bin if File.executable?(bin) and File.file?(bin) else search_paths.each do |dir| dest = File.join(dir, bin) - return dest if File.executable?(dest) + return dest if File.executable?(dest) and File.file?(dest) end end nil diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/facter/gid.rb new/lib/facter/gid.rb --- old/lib/facter/gid.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/lib/facter/gid.rb 1970-01-01 01:00:00.000000000 +0100 @@ -10,7 +10,7 @@ Facter.add(:gid) do confine do - Facter::Core::Execution.which('id') && Facter.value(:kernel) != "SunOS" + Facter::Core::Execution.which('id') && !["SunOS", "windows"].include?(Facter.value(:kernel)) end setcode { Facter::Core::Execution.exec('id -ng') } end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/facter/processors/os.rb new/lib/facter/processors/os.rb --- old/lib/facter/processors/os.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/lib/facter/processors/os.rb 1970-01-01 01:00:00.000000000 +0100 @@ -112,7 +112,7 @@ # get each physical processor Facter::Util::WMI.execquery("select * from Win32_Processor").each do |proc| # not supported before 2008 - if proc.respond_to?(:NumberOfLogicalProcessors) + if proc.ole_respond_to?(:NumberOfLogicalProcessors) processor_num = proc.NumberOfLogicalProcessors else processor_num = 1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/facter/util/virtual.rb new/lib/facter/util/virtual.rb --- old/lib/facter/util/virtual.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/lib/facter/util/virtual.rb 1970-01-01 01:00:00.000000000 +0100 @@ -162,7 +162,7 @@ path = Pathname.new('/proc/1/cgroup') return false unless path.readable? begin - in_lxc = path.readlines.any? {|l| l.split(":")[2].to_s.start_with? '/lxc/' } + in_lxc = path.readlines.any? {|l| l.split(":")[2].to_s.include? '/lxc' } rescue Errno::EPERM => exc # If we get "operation not permitted" here, it probably means we are # running OpenVZ. We are not running LXC anyway, so... @@ -179,7 +179,7 @@ path = Pathname.new('/proc/1/cgroup') return false unless path.readable? begin - in_docker = path.readlines.any? {|l| l.split(":")[2].to_s.start_with? '/docker/' } + in_docker = path.readlines.any? {|l| l.split(":")[2].to_s.include? '/docker' } rescue Errno::EPERM => exc # This can fail under OpenVZ, just like in .lxc? return false diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/facter/version.rb new/lib/facter/version.rb --- old/lib/facter/version.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/lib/facter/version.rb 1970-01-01 01:00:00.000000000 +0100 @@ -1,6 +1,6 @@ module Facter if not defined? FACTERVERSION then - FACTERVERSION = '2.4.4' + FACTERVERSION = '2.4.6' end # Returns the running version of Facter. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 1970-01-01 01:00:00.000000000 +0100 +++ new/metadata 1970-01-01 01:00:00.000000000 +0100 @@ -1,7 +1,7 @@ --- !ruby/object:Gem::Specification name: facter version: !ruby/object:Gem::Version - version: 2.4.4 + version: 2.4.6 prerelease: platform: ruby authors: @@ -9,7 +9,7 @@ autorequire: bindir: bin cert_chain: [] -date: 2015-05-19 00:00:00.000000000 Z +date: 2016-01-26 00:00:00.000000000 Z dependencies: [] description: You can prove anything with facts! email: info@puppetlabs.com @@ -201,6 +201,7 @@ - spec/fixtures/cpuinfo/two_multicore-grep - spec/fixtures/virtual/proc_1_cgroup/in_a_container - spec/fixtures/virtual/proc_1_cgroup/not_in_a_container +- spec/fixtures/virtual/proc_1_cgroup/in_a_docker_container_with_systemd_slices - spec/fixtures/virtual/proc_1_cgroup/in_a_docker_container - spec/fixtures/virtual/proc_self_status/vserver_2_1/guest - spec/fixtures/virtual/proc_self_status/vserver_2_1/host @@ -549,6 +550,7 @@ - spec/fixtures/cpuinfo/two_multicore-grep - spec/fixtures/virtual/proc_1_cgroup/in_a_container - spec/fixtures/virtual/proc_1_cgroup/not_in_a_container +- spec/fixtures/virtual/proc_1_cgroup/in_a_docker_container_with_systemd_slices - spec/fixtures/virtual/proc_1_cgroup/in_a_docker_container - spec/fixtures/virtual/proc_self_status/vserver_2_1/guest - spec/fixtures/virtual/proc_self_status/vserver_2_1/host diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec/fixtures/virtual/proc_1_cgroup/in_a_docker_container_with_systemd_slices new/spec/fixtures/virtual/proc_1_cgroup/in_a_docker_container_with_systemd_slices --- old/spec/fixtures/virtual/proc_1_cgroup/in_a_docker_container_with_systemd_slices 1970-01-01 01:00:00.000000000 +0100 +++ new/spec/fixtures/virtual/proc_1_cgroup/in_a_docker_container_with_systemd_slices 1970-01-01 01:00:00.000000000 +0100 @@ -0,0 +1,10 @@ +10:hugetlb:/ +9:perf_event:/ +8:blkio:/system.slice/docker-8255e18aa44c5809a33db5f324a4b34e3a73b246394e4070cff752cd84d79a6d.scope +7:net_cls:/ +6:freezer:/system.slice/docker-8255e18aa44c5809a33db5f324a4b34e3a73b246394e4070cff752cd84d79a6d.scope +5:devices:/system.slice/docker-8255e18aa44c5809a33db5f324a4b34e3a73b246394e4070cff752cd84d79a6d.scope +4:memory:/system.slice/docker-8255e18aa44c5809a33db5f324a4b34e3a73b246394e4070cff752cd84d79a6d.scope +3:cpuacct,cpu:/system.slice/docker-8255e18aa44c5809a33db5f324a4b34e3a73b246394e4070cff752cd84d79a6d.scope +2:cpuset:/system.slice/docker-8255e18aa44c5809a33db5f324a4b34e3a73b246394e4070cff752cd84d79a6d.scope +1:name=systemd:/system.slice/docker-8255e18aa44c5809a33db5f324a4b34e3a73b246394e4070cff752cd84d79a6d.scope diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec/unit/core/execution/posix_spec.rb new/spec/unit/core/execution/posix_spec.rb --- old/spec/unit/core/execution/posix_spec.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/spec/unit/core/execution/posix_spec.rb 1970-01-01 01:00:00.000000000 +0100 @@ -16,6 +16,7 @@ context "and provided with an absolute path" do it "should return the binary if executable" do + File.expects(:file?).with('/opt/foo').returns true File.expects(:executable?).with('/opt/foo').returns true subject.which('/opt/foo').should == '/opt/foo' end @@ -24,12 +25,21 @@ File.expects(:executable?).with('/opt/foo').returns false subject.which('/opt/foo').should be_nil end + + it "should return nil if the binary is not a file" do + File.expects(:file?).with('/opt/foo').returns false + File.expects(:executable?).with('/opt/foo').returns true + subject.which('/opt/foo').should be_nil + end end context "and not provided with an absolute path" do it "should return the absolute path if found" do + File.expects(:file?).with('/bin/foo').never File.expects(:executable?).with('/bin/foo').returns false + File.expects(:file?).with('/sbin/foo').returns true File.expects(:executable?).with('/sbin/foo').returns true + File.expects(:file?).with('/usr/sbin/foo').never File.expects(:executable?).with('/usr/sbin/foo').never subject.which('foo').should == '/sbin/foo' end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec/unit/gid_spec.rb new/spec/unit/gid_spec.rb --- old/spec/unit/gid_spec.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/spec/unit/gid_spec.rb 1970-01-01 01:00:00.000000000 +0100 @@ -39,4 +39,13 @@ Facter.fact(:gid).value.should == nil end end + + describe "on windows systems" do + it "is not supported" do + Facter.fact(:kernel).stubs(:value).returns("windows") + Facter::Core::Execution.expects(:which).with('id').returns(true) + + Facter.fact(:gid).value.should == nil + end + end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec/unit/processors/os_spec.rb new/spec/unit/processors/os_spec.rb --- old/spec/unit/processors/os_spec.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/spec/unit/processors/os_spec.rb 1970-01-01 01:00:00.000000000 +0100 @@ -221,6 +221,7 @@ before :each do proc = stubs 'proc' proc.stubs(:Name).returns("Intel(R) Celeron(R) processor") + proc.stubs(:ole_respond_to?).with(:NumberOfLogicalProcessors).returns(false) load(Array.new(2, proc)) end @@ -235,6 +236,7 @@ before :each do proc = stubs 'proc' proc.stubs(:NumberOfLogicalProcessors).returns(2) + proc.stubs(:ole_respond_to?).with(:NumberOfLogicalProcessors).returns(true) proc.stubs(:Name).returns("Intel(R) Celeron(R) processor") load(Array.new(2, proc)) end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec/unit/util/virtual_spec.rb new/spec/unit/util/virtual_spec.rb --- old/spec/unit/util/virtual_spec.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/spec/unit/util/virtual_spec.rb 1970-01-01 01:00:00.000000000 +0100 @@ -368,6 +368,17 @@ end end + context '/proc/1/cgroup has at least one hierarchy with docker underneath a systemd slice parent' do + before :each do + fakepath = Pathname.new(File.join(fixture_path, 'in_a_docker_container_with_systemd_slices')) + Pathname.stubs(:new).with('/proc/1/cgroup').returns(fakepath) + end + + it 'is true' do + subject.should be_true + end + end + context '/proc/1/cgroup has no hierarchies rooted in /docker/' do before :each do fakepath = Pathname.new(File.join(fixture_path, 'not_in_a_container'))