Hello community,
here is the log from the commit of package rubygem-mixlib-shellout for
openSUSE:Factory checked in at 2020-03-07 21:38:59
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-mixlib-shellout (Old)
and /work/SRC/openSUSE:Factory/.rubygem-mixlib-shellout.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-mixlib-shellout"
Sat Mar 7 21:38:59 2020 rev:22 rq:773792 version:3.0.9
Changes:
--------
---
/work/SRC/openSUSE:Factory/rubygem-mixlib-shellout/rubygem-mixlib-shellout.changes
2019-11-18 20:09:21.673623505 +0100
+++
/work/SRC/openSUSE:Factory/.rubygem-mixlib-shellout.new.26092/rubygem-mixlib-shellout.changes
2020-03-07 21:39:00.616303414 +0100
@@ -1,0 +2,6 @@
+Mon Feb 10 15:10:04 UTC 2020 - Stephan Kulow <[email protected]>
+
+- updated to version 3.0.9
+ no changelog found
+
+-------------------------------------------------------------------
Old:
----
mixlib-shellout-3.0.4.gem
New:
----
mixlib-shellout-3.0.9.gem
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rubygem-mixlib-shellout.spec ++++++
--- /var/tmp/diff_new_pack.HdIyAH/_old 2020-03-07 21:39:02.296304548 +0100
+++ /var/tmp/diff_new_pack.HdIyAH/_new 2020-03-07 21:39:02.320304565 +0100
@@ -1,7 +1,7 @@
#
# spec file for package rubygem-mixlib-shellout
#
-# Copyright (c) 2019 SUSE LLC.
+# Copyright (c) 2020 SUSE LLC
#
# 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-mixlib-shellout
-Version: 3.0.4
+Version: 3.0.9
Release: 0
%define mod_name mixlib-shellout
%define mod_full_name %{mod_name}-%{version}
++++++ mixlib-shellout-3.0.4.gem -> mixlib-shellout-3.0.9.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/mixlib/shellout/unix.rb
new/lib/mixlib/shellout/unix.rb
--- old/lib/mixlib/shellout/unix.rb 2019-06-07 01:26:21.000000000 +0200
+++ new/lib/mixlib/shellout/unix.rb 2019-12-30 03:41:46.000000000 +0100
@@ -53,14 +53,16 @@
# to the user's secondary groups
def sgids
return nil unless using_login?
+
user_name = Etc.getpwuid(uid).name
- all_seconderies.select { |g| g.mem.include?(user_name) }.map { |g|
g.gid }
+ all_seconderies.select { |g| g.mem.include?(user_name) }.map(&:gid)
end
# The environment variables that are deduced from simulating logon
# Only valid if login is used
def logon_environment
return {} unless using_login?
+
entry = Etc.getpwuid(uid)
# According to `man su`, the set fields are:
# $HOME, $SHELL, $USER, $LOGNAME, $PATH, and $IFS
@@ -269,6 +271,7 @@
# Keep this unbuffered for now
def write_to_child_stdin
return unless input
+
child_stdin << input
child_stdin.close # Kick things off
end
@@ -337,7 +340,7 @@
set_cwd
begin
- command.kind_of?(Array) ? exec(*command, close_others: true) :
exec(command, close_others: true)
+ command.is_a?(Array) ? exec(*command, close_others: true) :
exec(command, close_others: true)
raise "forty-two" # Should never get here
rescue Exception => e
@@ -365,6 +368,7 @@
def reap_errant_child
return if attempt_reap
+
@terminate_reason = "Command exceeded allowed execution time, process
terminated"
logger.error("Command exceeded allowed execution time, sending TERM")
if logger
Process.kill(:TERM, child_pgid)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/mixlib/shellout/version.rb
new/lib/mixlib/shellout/version.rb
--- old/lib/mixlib/shellout/version.rb 2019-06-07 01:26:21.000000000 +0200
+++ new/lib/mixlib/shellout/version.rb 2019-12-30 03:41:46.000000000 +0100
@@ -1,5 +1,5 @@
module Mixlib
class ShellOut
- VERSION = "3.0.4".freeze
+ VERSION = "3.0.9".freeze
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/mixlib/shellout/windows/core_ext.rb
new/lib/mixlib/shellout/windows/core_ext.rb
--- old/lib/mixlib/shellout/windows/core_ext.rb 2019-06-07 01:26:21.000000000
+0200
+++ new/lib/mixlib/shellout/windows/core_ext.rb 2019-12-30 03:41:46.000000000
+0100
@@ -73,19 +73,19 @@
[:pointer], :bool
attach_pfunc :LoadUserProfileW,
- [:handle, :pointer], :bool
+ %i{handle pointer}, :bool
attach_pfunc :UnloadUserProfile,
- [:handle, :handle], :bool
+ %i{handle handle}, :bool
ffi_lib :advapi32
attach_pfunc :LogonUserW,
- [:buffer_in, :buffer_in, :buffer_in, :ulong, :ulong, :pointer], :bool
+ %i{buffer_in buffer_in buffer_in ulong ulong pointer}, :bool
attach_pfunc :CreateProcessAsUserW,
- [:ulong, :buffer_in, :buffer_inout, :pointer, :pointer, :int,
- :ulong, :buffer_in, :buffer_in, :pointer, :pointer], :bool
+ %i{ulong buffer_in buffer_inout pointer pointer int
+ ulong buffer_in buffer_in pointer pointer}, :bool
ffi_lib :user32
@@ -93,7 +93,7 @@
[], :ulong
attach_pfunc :GetUserObjectInformationA,
- [:ulong, :uint, :buffer_out, :ulong, :pointer], :bool
+ %i{ulong uint buffer_out ulong pointer}, :bool
end
# Override Process.create to check for running in the Service window station
and doing
@@ -109,7 +109,11 @@
class << self
def create(args)
- unless args.kind_of?(Hash)
+ create3(args).first
+ end
+
+ def create3(args)
+ unless args.is_a?(Hash)
raise TypeError, "hash keyword arguments expected"
end
@@ -137,6 +141,7 @@
unless valid_keys.include?(key)
raise ArgumentError, "invalid key '#{key}'"
end
+
hash[key] = val
end
@@ -149,6 +154,7 @@
unless valid_si_keys.include?(key)
raise ArgumentError, "invalid startup_info key '#{key}'"
end
+
si_hash[key] = val
end
end
@@ -367,6 +373,7 @@
unless GetProfileType(ptr)
raise SystemCallError.new("GetProfileType", FFI.errno)
end
+
ptr.read_uint
end
@@ -374,6 +381,7 @@
unless LoadUserProfileW(token, profile_ptr)
raise SystemCallError.new("LoadUserProfileW", FFI.errno)
end
+
true
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/mixlib/shellout/windows.rb
new/lib/mixlib/shellout/windows.rb
--- old/lib/mixlib/shellout/windows.rb 2019-06-07 01:26:21.000000000 +0200
+++ new/lib/mixlib/shellout/windows.rb 2019-12-30 03:41:46.000000000 +0100
@@ -19,7 +19,7 @@
#
require "win32/process"
-require "mixlib/shellout/windows/core_ext"
+require_relative "windows/core_ext"
module Mixlib
class ShellOut
@@ -88,7 +88,7 @@
#
# Start the process
#
- process, profile, token = Process.create(create_process_args)
+ process, profile, token = Process.create3(create_process_args)
logger.debug(format_process(process, app_name, command_line,
timeout)) if logger
begin
# Start pushing data into input
@@ -110,6 +110,7 @@
unless GetExitCodeProcess(process.process_handle, exit_code)
raise get_last_error
end
+
@status = ThingThatLooksSortOfLikeAProcessStatus.new
@status.exitstatus = exit_code.unpack("l").first
@@ -170,8 +171,9 @@
def consume_output(open_streams, stdout_read, stderr_read)
return false if open_streams.length == 0
+
ready = IO.select(open_streams, nil, nil, READ_WAIT_TIME)
- return true if ! ready
+ return true unless ready
if ready.first.include?(stdout_read)
begin
@@ -227,6 +229,7 @@
# @return String
def combine_args(*args)
return args[0] if args.length == 1
+
args.map do |arg|
if arg =~ /[ \t\n\v"]/
arg = arg.gsub(/(\\*)"/, '\1\1\"') # interior quotes with N
preceeding backslashes need 2N+1 backslashes
@@ -321,10 +324,12 @@
return true unless quote
when "%"
return true if env
+
env = env_first_char = true
next
else
next unless env
+
if env_first_char
env_first_char = false
(env = false) && next if c !~ /[A-Za-z_]/
@@ -370,6 +375,7 @@
def unsafe_process?(name, logger)
return false unless system_required_processes.include? name
+
logger.debug(
"A request to kill a critical system process - #{name} - was
received and skipped."
)
@@ -383,6 +389,7 @@
def kill_process_tree(pid, wmi, logger)
wmi.query("select * from Win32_Process where
ParentProcessID=#{pid}").each do |instance|
next if unsafe_process?(instance.wmi_ole_object.name, logger)
+
child_pid = instance.wmi_ole_object.processid
kill_process_tree(child_pid, wmi, logger)
kill_process(instance, logger)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/mixlib/shellout.rb new/lib/mixlib/shellout.rb
--- old/lib/mixlib/shellout.rb 2019-06-07 01:26:21.000000000 +0200
+++ new/lib/mixlib/shellout.rb 2019-12-30 03:41:46.000000000 +0100
@@ -19,7 +19,7 @@
require "etc"
require "tmpdir"
require "fcntl"
-require "mixlib/shellout/exceptions"
+require_relative "shellout/exceptions"
module Mixlib
@@ -29,10 +29,10 @@
DEFAULT_READ_TIMEOUT = 600
if RUBY_PLATFORM =~ /mswin|mingw32|windows/
- require "mixlib/shellout/windows"
+ require_relative "shellout/windows"
include ShellOut::Windows
else
- require "mixlib/shellout/unix"
+ require_relative "shellout/unix"
include ShellOut::Unix
end
@@ -210,15 +210,17 @@
# TODO migrate to shellout/unix.rb
def uid
return nil unless user
- user.kind_of?(Integer) ? user : Etc.getpwnam(user.to_s).uid
+
+ user.is_a?(Integer) ? user : Etc.getpwnam(user.to_s).uid
end
# The gid that the subprocess will switch to. If the group attribute is
# given as a group name, it is converted to a gid by Etc.getgrnam
# TODO migrate to shellout/unix.rb
def gid
- return group.kind_of?(Integer) ? group : Etc.getgrnam(group.to_s).gid if
group
+ return group.is_a?(Integer) ? group : Etc.getgrnam(group.to_s).gid if
group
return Etc.getpwuid(uid).gid if using_login?
+
nil
end
@@ -231,6 +233,7 @@
# results when the command exited with an unexpected status.
def format_for_exception
return "Command execution failed. STDOUT/STDERR suppressed for sensitive
resource" if sensitive
+
msg = ""
msg << "#{@terminate_reason}\n" if @terminate_reason
msg << "---- Begin output of #{command} ----\n"
@@ -363,6 +366,7 @@
if login && !user
raise InvalidCommandOption, "cannot set login without specifying a
user"
end
+
super
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata 2019-06-07 01:26:21.000000000 +0200
+++ new/metadata 2019-12-30 03:41:46.000000000 +0100
@@ -1,14 +1,14 @@
--- !ruby/object:Gem::Specification
name: mixlib-shellout
version: !ruby/object:Gem::Version
- version: 3.0.4
+ version: 3.0.9
platform: ruby
authors:
- Chef Software Inc.
autorequire:
bindir: bin
cert_chain: []
-date: 2019-06-06 00:00:00.000000000 Z
+date: 2019-12-30 00:00:00.000000000 Z
dependencies: []
description: Run external commands on Unix or Windows
email: [email protected]