chef 17.7.29-universal-mingw32 → 17.9.42-universal-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (322) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +3 -3
  3. data/README.md +1 -1
  4. data/distro/ruby_bin_folder/AMD64/Chef.PowerShell.Wrapper.dll +0 -0
  5. data/distro/ruby_bin_folder/AMD64/Chef.PowerShell.dll +0 -0
  6. data/distro/ruby_bin_folder/AMD64/Ijwhost.dll +0 -0
  7. data/distro/ruby_bin_folder/AMD64/concrt140.dll +0 -0
  8. data/distro/ruby_bin_folder/AMD64/host/fxr/5.0.0/hostfxr.dll +0 -0
  9. data/distro/ruby_bin_folder/AMD64/msvcp140.dll +0 -0
  10. data/distro/ruby_bin_folder/AMD64/msvcp140_1.dll +0 -0
  11. data/distro/ruby_bin_folder/AMD64/msvcp140_2.dll +0 -0
  12. data/distro/ruby_bin_folder/AMD64/msvcp140_atomic_wait.dll +0 -0
  13. data/distro/ruby_bin_folder/AMD64/msvcp140_codecvt_ids.dll +0 -0
  14. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Chef.PowerShell.Wrapper.Core.dll +0 -0
  15. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Chef.Powershell.Core.dll +0 -0
  16. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Chef.Powershell.Core.pdb +0 -0
  17. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Ijwhost.dll +0 -0
  18. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Microsoft.CSharp.dll +0 -0
  19. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Microsoft.NETCore.App.deps.json +180 -180
  20. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Microsoft.VisualBasic.Core.dll +0 -0
  21. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Microsoft.VisualBasic.dll +0 -0
  22. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Microsoft.Win32.Primitives.dll +0 -0
  23. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Microsoft.Win32.Registry.dll +0 -0
  24. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.AppContext.dll +0 -0
  25. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Buffers.dll +0 -0
  26. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Collections.Concurrent.dll +0 -0
  27. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Collections.Immutable.dll +0 -0
  28. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Collections.NonGeneric.dll +0 -0
  29. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Collections.Specialized.dll +0 -0
  30. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Collections.dll +0 -0
  31. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ComponentModel.Annotations.dll +0 -0
  32. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ComponentModel.DataAnnotations.dll +0 -0
  33. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ComponentModel.EventBasedAsync.dll +0 -0
  34. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ComponentModel.Primitives.dll +0 -0
  35. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ComponentModel.TypeConverter.dll +0 -0
  36. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ComponentModel.dll +0 -0
  37. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Configuration.dll +0 -0
  38. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Console.dll +0 -0
  39. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Core.dll +0 -0
  40. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Data.Common.dll +0 -0
  41. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Data.DataSetExtensions.dll +0 -0
  42. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Data.dll +0 -0
  43. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.Contracts.dll +0 -0
  44. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.Debug.dll +0 -0
  45. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.DiagnosticSource.dll +0 -0
  46. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.FileVersionInfo.dll +0 -0
  47. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.Process.dll +0 -0
  48. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.StackTrace.dll +0 -0
  49. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.TextWriterTraceListener.dll +0 -0
  50. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.Tools.dll +0 -0
  51. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.TraceSource.dll +0 -0
  52. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.Tracing.dll +0 -0
  53. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Drawing.Primitives.dll +0 -0
  54. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Drawing.dll +0 -0
  55. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Dynamic.Runtime.dll +0 -0
  56. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Formats.Asn1.dll +0 -0
  57. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Globalization.Calendars.dll +0 -0
  58. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Globalization.Extensions.dll +0 -0
  59. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Globalization.dll +0 -0
  60. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.Compression.Brotli.dll +0 -0
  61. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.Compression.FileSystem.dll +0 -0
  62. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.Compression.ZipFile.dll +0 -0
  63. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.Compression.dll +0 -0
  64. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.FileSystem.AccessControl.dll +0 -0
  65. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.FileSystem.DriveInfo.dll +0 -0
  66. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.FileSystem.Primitives.dll +0 -0
  67. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.FileSystem.Watcher.dll +0 -0
  68. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.FileSystem.dll +0 -0
  69. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.IsolatedStorage.dll +0 -0
  70. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.MemoryMappedFiles.dll +0 -0
  71. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.Pipes.AccessControl.dll +0 -0
  72. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.Pipes.dll +0 -0
  73. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.UnmanagedMemoryStream.dll +0 -0
  74. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.dll +0 -0
  75. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Linq.Expressions.dll +0 -0
  76. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Linq.Parallel.dll +0 -0
  77. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Linq.Queryable.dll +0 -0
  78. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Linq.dll +0 -0
  79. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Memory.dll +0 -0
  80. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.Http.Json.dll +0 -0
  81. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.Http.dll +0 -0
  82. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.HttpListener.dll +0 -0
  83. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.Mail.dll +0 -0
  84. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.NameResolution.dll +0 -0
  85. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.NetworkInformation.dll +0 -0
  86. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.Ping.dll +0 -0
  87. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.Primitives.dll +0 -0
  88. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.Requests.dll +0 -0
  89. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.Security.dll +0 -0
  90. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.ServicePoint.dll +0 -0
  91. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.Sockets.dll +0 -0
  92. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.WebClient.dll +0 -0
  93. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.WebHeaderCollection.dll +0 -0
  94. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.WebProxy.dll +0 -0
  95. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.WebSockets.Client.dll +0 -0
  96. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.WebSockets.dll +0 -0
  97. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.dll +0 -0
  98. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Numerics.Vectors.dll +0 -0
  99. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Numerics.dll +0 -0
  100. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ObjectModel.dll +0 -0
  101. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Private.CoreLib.dll +0 -0
  102. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Private.DataContractSerialization.dll +0 -0
  103. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Private.Uri.dll +0 -0
  104. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Private.Xml.Linq.dll +0 -0
  105. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Private.Xml.dll +0 -0
  106. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.DispatchProxy.dll +0 -0
  107. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.Emit.ILGeneration.dll +0 -0
  108. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.Emit.Lightweight.dll +0 -0
  109. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.Emit.dll +0 -0
  110. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.Extensions.dll +0 -0
  111. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.Metadata.dll +0 -0
  112. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.Primitives.dll +0 -0
  113. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.TypeExtensions.dll +0 -0
  114. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.dll +0 -0
  115. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Resources.Reader.dll +0 -0
  116. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Resources.ResourceManager.dll +0 -0
  117. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Resources.Writer.dll +0 -0
  118. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.CompilerServices.Unsafe.dll +0 -0
  119. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.CompilerServices.VisualC.dll +0 -0
  120. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Extensions.dll +0 -0
  121. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Handles.dll +0 -0
  122. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.InteropServices.RuntimeInformation.dll +0 -0
  123. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.InteropServices.dll +0 -0
  124. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Intrinsics.dll +0 -0
  125. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Loader.dll +0 -0
  126. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Numerics.dll +0 -0
  127. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Serialization.Formatters.dll +0 -0
  128. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Serialization.Json.dll +0 -0
  129. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Serialization.Primitives.dll +0 -0
  130. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Serialization.Xml.dll +0 -0
  131. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Serialization.dll +0 -0
  132. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.dll +0 -0
  133. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.AccessControl.dll +0 -0
  134. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Claims.dll +0 -0
  135. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Cryptography.Algorithms.dll +0 -0
  136. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Cryptography.Cng.dll +0 -0
  137. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Cryptography.Csp.dll +0 -0
  138. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Cryptography.Encoding.dll +0 -0
  139. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Cryptography.OpenSsl.dll +0 -0
  140. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Cryptography.Primitives.dll +0 -0
  141. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Cryptography.X509Certificates.dll +0 -0
  142. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Principal.Windows.dll +0 -0
  143. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Principal.dll +0 -0
  144. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.SecureString.dll +0 -0
  145. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.dll +0 -0
  146. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ServiceModel.Web.dll +0 -0
  147. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ServiceProcess.dll +0 -0
  148. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Text.Encoding.CodePages.dll +0 -0
  149. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Text.Encoding.Extensions.dll +0 -0
  150. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Text.Encoding.dll +0 -0
  151. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Text.Encodings.Web.dll +0 -0
  152. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Text.Json.dll +0 -0
  153. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Text.RegularExpressions.dll +0 -0
  154. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.Channels.dll +0 -0
  155. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.Overlapped.dll +0 -0
  156. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.Tasks.Dataflow.dll +0 -0
  157. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.Tasks.Extensions.dll +0 -0
  158. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.Tasks.Parallel.dll +0 -0
  159. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.Tasks.dll +0 -0
  160. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.Thread.dll +0 -0
  161. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.ThreadPool.dll +0 -0
  162. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.Timer.dll +0 -0
  163. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.dll +0 -0
  164. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Transactions.Local.dll +0 -0
  165. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Transactions.dll +0 -0
  166. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ValueTuple.dll +0 -0
  167. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Web.HttpUtility.dll +0 -0
  168. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Web.dll +0 -0
  169. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Windows.dll +0 -0
  170. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.Linq.dll +0 -0
  171. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.ReaderWriter.dll +0 -0
  172. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.Serialization.dll +0 -0
  173. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.XDocument.dll +0 -0
  174. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.XPath.XDocument.dll +0 -0
  175. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.XPath.dll +0 -0
  176. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.XmlDocument.dll +0 -0
  177. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.XmlSerializer.dll +0 -0
  178. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.dll +0 -0
  179. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.dll +0 -0
  180. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/WindowsBase.dll +0 -0
  181. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/clrcompression.dll +0 -0
  182. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/clretwrc.dll +0 -0
  183. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/clrjit.dll +0 -0
  184. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/coreclr.dll +0 -0
  185. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/createdump.exe +0 -0
  186. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/dbgshim.dll +0 -0
  187. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/hostfxr.dll +0 -0
  188. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/hostpolicy.dll +0 -0
  189. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/mscordaccore.dll +0 -0
  190. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/mscordaccore_amd64_amd64_5.0.521.16609.dll +0 -0
  191. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/mscordbi.dll +0 -0
  192. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/mscorlib.dll +0 -0
  193. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/mscorrc.dll +0 -0
  194. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/netstandard.dll +0 -0
  195. data/distro/ruby_bin_folder/AMD64/vccorlib140.dll +0 -0
  196. data/distro/ruby_bin_folder/AMD64/vcruntime140.dll +0 -0
  197. data/distro/ruby_bin_folder/AMD64/vcruntime140_1.dll +0 -0
  198. data/distro/ruby_bin_folder/x86/Chef.PowerShell.dll +0 -0
  199. data/distro/ruby_bin_folder/x86/Chef.Powershell.Wrapper.dll +0 -0
  200. data/distro/ruby_bin_folder/x86/concrt140.dll +0 -0
  201. data/distro/ruby_bin_folder/x86/msvcp140.dll +0 -0
  202. data/distro/ruby_bin_folder/x86/msvcp140_1.dll +0 -0
  203. data/distro/ruby_bin_folder/x86/msvcp140_2.dll +0 -0
  204. data/distro/ruby_bin_folder/x86/msvcp140_atomic_wait.dll +0 -0
  205. data/distro/ruby_bin_folder/x86/msvcp140_codecvt_ids.dll +0 -0
  206. data/distro/ruby_bin_folder/x86/shared/Microsoft.NETCore.App/5.0.0/Chef.PowerShell.Wrapper.Core.dll +0 -0
  207. data/distro/ruby_bin_folder/x86/shared/Microsoft.NETCore.App/5.0.0/Chef.Powershell.Core.dll +0 -0
  208. data/distro/ruby_bin_folder/x86/shared/Microsoft.NETCore.App/5.0.0/Chef.Powershell.Core.pdb +0 -0
  209. data/distro/ruby_bin_folder/x86/vccorlib140.dll +0 -0
  210. data/distro/ruby_bin_folder/x86/vcruntime140.dll +0 -0
  211. data/lib/chef/application/base.rb +1 -1
  212. data/lib/chef/application/exit_code.rb +7 -21
  213. data/lib/chef/chef_fs/file_system/chef_server/cookbook_file.rb +1 -1
  214. data/lib/chef/chef_fs/file_system/repository/base_file.rb +1 -1
  215. data/lib/chef/chef_fs/file_system/repository/file_system_entry.rb +1 -1
  216. data/lib/chef/compliance/default_attributes.rb +12 -2
  217. data/lib/chef/compliance/input_collection.rb +1 -1
  218. data/lib/chef/compliance/runner.rb +51 -5
  219. data/lib/chef/compliance/waiver_collection.rb +1 -1
  220. data/lib/chef/cookbook/syntax_check.rb +1 -1
  221. data/lib/chef/cookbook_uploader.rb +1 -1
  222. data/lib/chef/cookbook_version.rb +1 -1
  223. data/lib/chef/mixin/powershell_exec.rb +6 -5
  224. data/lib/chef/mixin/why_run.rb +8 -2
  225. data/lib/chef/powershell.rb +8 -6
  226. data/lib/chef/provider/cron.rb +2 -2
  227. data/lib/chef/provider/directory.rb +2 -2
  228. data/lib/chef/provider/ifconfig.rb +5 -5
  229. data/lib/chef/provider/mount/linux.rb +16 -2
  230. data/lib/chef/provider/mount/mount.rb +1 -1
  231. data/lib/chef/provider/package/dnf.rb +1 -1
  232. data/lib/chef/provider/package/powershell.rb +13 -10
  233. data/lib/chef/provider/package/yum/python_helper.rb +81 -25
  234. data/lib/chef/provider/package/yum.rb +39 -12
  235. data/lib/chef/provider/package/zypper.rb +2 -0
  236. data/lib/chef/provider/package.rb +63 -28
  237. data/lib/chef/provider/user/mac.rb +3 -3
  238. data/lib/chef/provider.rb +5 -2
  239. data/lib/chef/providers.rb +0 -1
  240. data/lib/chef/pwsh.rb +3 -2
  241. data/lib/chef/resource/apt_package.rb +2 -2
  242. data/lib/chef/resource/chef_client_config.rb +21 -1
  243. data/lib/chef/resource/chef_client_launchd.rb +1 -1
  244. data/lib/chef/resource/chocolatey_package.rb +3 -3
  245. data/lib/chef/resource/cron/cron.rb +75 -1
  246. data/lib/chef/resource/cron/cron_d.rb +2 -1
  247. data/lib/chef/resource/dnf_package.rb +4 -6
  248. data/lib/chef/resource/dpkg_package.rb +5 -0
  249. data/lib/chef/resource/execute.rb +1 -4
  250. data/lib/chef/resource/habitat/habitat_sup.rb +1 -1
  251. data/lib/chef/resource/habitat/habitat_sup_windows.rb +1 -1
  252. data/lib/chef/resource/homebrew_tap.rb +1 -5
  253. data/lib/chef/resource/inspec_waiver_file_entry.rb +1 -1
  254. data/lib/chef/resource/launchd.rb +2 -5
  255. data/lib/chef/resource/lwrp_base.rb +1 -1
  256. data/lib/chef/resource/macos_userdefaults.rb +5 -7
  257. data/lib/chef/resource/powershell_package_source.rb +8 -8
  258. data/lib/chef/resource/remote_file.rb +1 -1
  259. data/lib/chef/resource/rhsm_register.rb +31 -0
  260. data/lib/chef/resource/support/client.erb +7 -0
  261. data/lib/chef/resource/windows_feature_powershell.rb +8 -9
  262. data/lib/chef/resource/windows_task.rb +25 -10
  263. data/lib/chef/resource.rb +3 -3
  264. data/lib/chef/resource_reporter.rb +1 -1
  265. data/lib/chef/run_lock.rb +1 -1
  266. data/lib/chef/secret_fetcher/azure_key_vault.rb +4 -2
  267. data/lib/chef/secret_fetcher/hashi_vault.rb +37 -3
  268. data/lib/chef/util/dsc/configuration_generator.rb +1 -1
  269. data/lib/chef/version.rb +1 -1
  270. data/spec/functional/resource/cookbook_file_spec.rb +1 -1
  271. data/spec/functional/resource/dnf_package_spec.rb +138 -124
  272. data/spec/functional/resource/dpkg_package_spec.rb +16 -0
  273. data/spec/functional/resource/dsc_script_spec.rb +2 -2
  274. data/spec/functional/resource/macos_userdefaults_spec.rb +20 -0
  275. data/spec/functional/resource/template_spec.rb +1 -1
  276. data/spec/functional/resource/yum_package_spec.rb +789 -129
  277. data/spec/functional/resource/zypper_package_spec.rb +7 -0
  278. data/spec/integration/client/client_spec.rb +32 -1
  279. data/spec/spec_helper.rb +3 -3
  280. data/spec/support/platform_helpers.rb +1 -1
  281. data/spec/support/ruby_installer.rb +1 -1
  282. data/spec/support/shared/functional/file_resource.rb +2 -2
  283. data/spec/support/shared/functional/http.rb +9 -9
  284. data/spec/support/shared/unit/provider/useradd_based_user_provider.rb +1 -1
  285. data/spec/unit/application/base_spec.rb +40 -0
  286. data/spec/unit/compliance/runner_spec.rb +62 -1
  287. data/spec/unit/dsl/registry_helper_spec.rb +6 -6
  288. data/spec/unit/file_access_control_spec.rb +1 -1
  289. data/spec/unit/guard_interpreter/resource_guard_interpreter_spec.rb +1 -1
  290. data/spec/unit/lwrp_spec.rb +2 -2
  291. data/spec/unit/mixin/why_run_spec.rb +53 -0
  292. data/spec/unit/provider/dsc_script_spec.rb +8 -8
  293. data/spec/unit/provider/group/groupadd_spec.rb +1 -0
  294. data/spec/unit/provider/group/usermod_spec.rb +4 -4
  295. data/spec/unit/provider/ifconfig/aix_spec.rb +14 -14
  296. data/spec/unit/provider/ifconfig/debian_spec.rb +1 -1
  297. data/spec/unit/provider/ifconfig/redhat_spec.rb +1 -1
  298. data/spec/unit/provider/ifconfig_spec.rb +5 -3
  299. data/spec/unit/provider/mount/linux_spec.rb +16 -3
  300. data/spec/unit/provider/package/bff_spec.rb +1 -0
  301. data/spec/unit/provider/package/powershell_spec.rb +114 -114
  302. data/spec/unit/provider/package/rubygems_spec.rb +3 -0
  303. data/spec/unit/provider/package/solaris_spec.rb +1 -0
  304. data/spec/unit/provider/remote_file/cache_control_data_spec.rb +3 -3
  305. data/spec/unit/provider/service/arch_service_spec.rb +2 -2
  306. data/spec/unit/provider/service/debian_service_spec.rb +1 -0
  307. data/spec/unit/provider/service/gentoo_service_spec.rb +3 -2
  308. data/spec/unit/provider/service/macosx_spec.rb +1 -0
  309. data/spec/unit/provider/service/redhat_spec.rb +4 -1
  310. data/spec/unit/provider/service/simple_service_spec.rb +6 -4
  311. data/spec/unit/provider/service/upstart_service_spec.rb +3 -3
  312. data/spec/unit/provider/user/solaris_spec.rb +1 -1
  313. data/spec/unit/provider/user_spec.rb +2 -0
  314. data/spec/unit/resource/conditional_spec.rb +4 -4
  315. data/spec/unit/resource/dpkg_package_spec.rb +12 -0
  316. data/spec/unit/resource/rhsm_register_spec.rb +42 -0
  317. data/spec/unit/resource_spec.rb +2 -2
  318. data/spec/unit/secret_fetcher/hashi_vault_spec.rb +46 -0
  319. metadata +10 -10
  320. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/mscordaccore_amd64_amd64_5.0.20.51904.dll +0 -0
  321. data/lib/chef/provider/group/suse.rb +0 -82
  322. data/spec/unit/provider/group/suse_spec.rb +0 -90
@@ -36,6 +36,7 @@ class Chef
36
36
  allow_nils
37
37
  use_multipackage_api
38
38
  use_package_name_for_source
39
+ use_magic_version
39
40
 
40
41
  provides :package, platform_family: "fedora_derived"
41
42
 
@@ -64,6 +65,16 @@ class Chef
64
65
  current_resource
65
66
  end
66
67
 
68
+ def load_after_resource
69
+ # force the installed version array to repopulate
70
+ @current_version = []
71
+ @after_resource = Chef::Resource::YumPackage.new(new_resource.name)
72
+ after_resource.package_name(new_resource.package_name)
73
+ after_resource.version(get_current_versions)
74
+
75
+ after_resource
76
+ end
77
+
67
78
  def define_resource_requirements
68
79
  requirements.assert(:install, :upgrade, :remove, :purge) do |a|
69
80
  a.assertion { !new_resource.source || ::File.exist?(new_resource.source) }
@@ -80,9 +91,15 @@ class Chef
80
91
  end
81
92
  end
82
93
 
94
+ def magic_version_array
95
+ package_name_array.each_with_index.map do |pkg, i|
96
+ magical_version(i).version_with_arch
97
+ end
98
+ end
99
+
83
100
  def get_current_versions
84
101
  package_name_array.each_with_index.map do |pkg, i|
85
- installed_version(i).version_with_arch
102
+ current_version(i).version_with_arch
86
103
  end
87
104
  end
88
105
 
@@ -127,7 +144,7 @@ class Chef
127
144
  alias upgrade_package install_package
128
145
 
129
146
  def remove_package(names, versions)
130
- resolved_names = names.each_with_index.map { |name, i| installed_version(i).to_s unless name.nil? }
147
+ resolved_names = names.each_with_index.map { |name, i| magical_version(i).to_s unless name.nil? }
131
148
  yum(options, "-y", "remove", resolved_names)
132
149
  flushcache
133
150
  end
@@ -157,10 +174,10 @@ class Chef
157
174
  def resolved_package_lock_names(names)
158
175
  names.each_with_index.map do |name, i|
159
176
  unless name.nil?
160
- if installed_version(i).version.nil?
177
+ if magical_version(i).version.nil?
161
178
  available_version(i).name
162
179
  else
163
- installed_version(i).name
180
+ magical_version(i).name
164
181
  end
165
182
  end
166
183
  end
@@ -226,15 +243,25 @@ class Chef
226
243
  @available_version[index]
227
244
  end
228
245
 
246
+ def magical_version(index)
247
+ @magical_version ||= []
248
+ @magical_version[index] ||= if new_resource.source
249
+ python_helper.package_query(:whatinstalled, available_version(index).name, version: safe_version_array[index], arch: safe_arch_array[index], options: options)
250
+ else
251
+ python_helper.package_query(:whatinstalled, package_name_array[index], version: safe_version_array[index], arch: safe_arch_array[index], options: options)
252
+ end
253
+ @magical_version[index]
254
+ end
255
+
229
256
  # @return Array<Version>
230
- def installed_version(index)
231
- @installed_version ||= []
232
- @installed_version[index] ||= if new_resource.source
233
- python_helper.package_query(:whatinstalled, available_version(index).name, arch: safe_arch_array[index], options: options)
234
- else
235
- python_helper.package_query(:whatinstalled, package_name_array[index], arch: safe_arch_array[index], options: options)
236
- end
237
- @installed_version[index]
257
+ def current_version(index)
258
+ @current_version ||= []
259
+ @current_version[index] ||= if new_resource.source
260
+ python_helper.package_query(:whatinstalled, available_version(index).name, arch: safe_arch_array[index], options: options)
261
+ else
262
+ python_helper.package_query(:whatinstalled, package_name_array[index], arch: safe_arch_array[index], options: options)
263
+ end
264
+ @current_version[index]
238
265
  end
239
266
 
240
267
  def flushcache
@@ -113,6 +113,8 @@ class Chef
113
113
  end
114
114
  end
115
115
  nil
116
+ rescue
117
+ nil
116
118
  end
117
119
 
118
120
  def available_version(index)
@@ -107,7 +107,7 @@ class Chef
107
107
  end
108
108
  end
109
109
 
110
- action :install do
110
+ action :install, description: "Install a package. If a version is specified, install the specified version of the package." do
111
111
  unless target_version_array.any?
112
112
  logger.debug("#{new_resource} is already installed - nothing to do")
113
113
  return
@@ -136,7 +136,7 @@ class Chef
136
136
 
137
137
  private :install_description
138
138
 
139
- action :upgrade do
139
+ action :upgrade, description: "Install a package and ensure that a package is the latest version." do
140
140
  unless target_version_array.any?
141
141
  logger.debug("#{new_resource} no versions to upgrade - nothing to do")
142
142
  return
@@ -167,7 +167,7 @@ class Chef
167
167
 
168
168
  private :upgrade_description
169
169
 
170
- action :remove do
170
+ action :remove, description: "Remove a package." do
171
171
  if removing_package?
172
172
  description = new_resource.version ? "version #{new_resource.version} of " : ""
173
173
  converge_by("remove #{description}package #{current_resource.package_name}") do
@@ -202,7 +202,7 @@ class Chef
202
202
  end
203
203
  end
204
204
 
205
- action :purge do
205
+ action :purge, description: "Purge a package. This action typically removes the configuration files as well as the package." do
206
206
  if removing_package?
207
207
  description = new_resource.version ? "version #{new_resource.version} of" : ""
208
208
  converge_by("purge #{description} package #{current_resource.package_name}") do
@@ -438,47 +438,81 @@ class Chef
438
438
  @target_version_array ||=
439
439
  begin
440
440
  target_version_array = []
441
- each_package do |package_name, new_version, current_version, candidate_version|
441
+ each_package do |package_name, new_version, current_version, candidate_version, magic_version|
442
442
  case action
443
443
  when :upgrade
444
- if current_version.nil?
445
- # with use_magic_version there may be a package installed, but it fails the user's
446
- # requested new_resource.version constraints
444
+ if version_equals?(current_version, new_version)
445
+ # This is a short-circuit (mostly for the rubygems provider) to avoid needing to
446
+ # expensively query the candidate_version which must come later. This only checks
447
+ # exact matching, the check for fuzzy matching is later.
448
+ logger.trace("#{new_resource} #{package_name} #{new_version} is already installed")
449
+ target_version_array.push(nil)
450
+ elsif current_version.nil?
451
+ # This is a simple check to see if we have any currently installed version at all, this is
452
+ # safe to do before the allow_downgrade check so we check this before.
447
453
  logger.trace("#{new_resource} has no existing installed version. Installing install #{candidate_version}")
448
454
  target_version_array.push(candidate_version)
449
- elsif !use_magic_version? && version_equals?(current_version, new_version)
450
- # this is a short-circuit (mostly for the rubygems provider) to avoid needing to expensively query the candidate_version which must come later
451
- logger.trace("#{new_resource} #{package_name} #{new_version} is already installed")
455
+ elsif !allow_downgrade && version_compare(current_version, candidate_version) == 1
456
+ # This check for downgrading when allow_downgrade is false uses the current_version rather
457
+ # than the magic_version since we never want to downgrade even if the constraints are not met
458
+ # if the version is higher. This check does use the candidate_version and unlazies this so
459
+ # there will a perf hit on idempotent use when allow_downgrade is false which is unavoidable.
460
+ logger.trace("#{new_resource} #{package_name} has installed version #{current_version}, which is newer than available version #{candidate_version}. Skipping...)")
452
461
  target_version_array.push(nil)
462
+ elsif magic_version.nil?
463
+ # This is the check for fuzzy matching of the installed_version, where if the installed version
464
+ # does not match the desired version constraints (but is not an exact match) then we need to
465
+ # install the candidate_version (this must come after the allow_downgrade check)
466
+ logger.trace("#{new_resource} has an installed version that does not match the version constraint. Installing install #{candidate_version}")
467
+ target_version_array.push(candidate_version)
453
468
  elsif candidate_version.nil?
469
+ # This check necessarily unlazies the candidate_version and may be expensive (connecting to
470
+ # rubygems.org or whatever). It comes as late as possible.
454
471
  logger.trace("#{new_resource} #{package_name} has no candidate_version to upgrade to")
455
472
  target_version_array.push(nil)
456
473
  elsif version_equals?(current_version, candidate_version)
474
+ # This check sees if the candidate_version is already installed or if we should upgrade/update the
475
+ # package. This is the normal idempotent behavior of :upgrade and is inherently expensive due to
476
+ # unlazying the candidate_version. To prevent the perf hit the version may be specified with a full
477
+ # version constraint. Then the cookbook can roll the version forward and use :upgrade to force version
478
+ # pinning.
457
479
  logger.trace("#{new_resource} #{package_name} #{candidate_version} is already installed")
458
480
  target_version_array.push(nil)
459
- elsif !allow_downgrade && version_compare(current_version, candidate_version) == 1
460
- logger.trace("#{new_resource} #{package_name} has installed version #{current_version}, which is newer than available version #{candidate_version}. Skipping...)")
461
- target_version_array.push(nil)
462
481
  else
463
- logger.trace("#{new_resource} #{package_name} is out of date, will upgrade to #{candidate_version}")
482
+ logger.trace("#{new_resource} #{package_name} is out of date, will update to #{candidate_version}")
464
483
  target_version_array.push(candidate_version)
465
484
  end
466
485
 
467
486
  when :install
468
- if new_version && !use_magic_version?
487
+ if current_version && new_version && !allow_downgrade && version_compare(current_version, new_version) == 1
488
+ # This is the idempotency guard for downgrades when downgrades are not allowed. This should perhaps raise
489
+ # an exception since we were told to install an exact package version but we are silently refusing to do so
490
+ # because a higher version is already installed. Maybe we need a flag for users to apply their preferred
491
+ # declarative philosophy? This has to come early and outside of the two code paths below.
492
+ logger.warn("#{new_resource} #{package_name} has installed version #{current_version}, which is newer than available version #{new_version}. Skipping...)")
493
+ target_version_array.push(nil)
494
+ elsif new_version && !use_magic_version?
495
+ # This is for "non magic version using" subclasses to do comparisons between the current_version and the
496
+ # desired new_version. XXX: If we converted this to current_version_requirement_satisfied? and made it specific
497
+ # to the current version check and then eliminated the magic_version, we might be able to eliminate separate codepaths
498
+ # here, and eliminate the semantic confusion around the magic_version?
469
499
  if version_requirement_satisfied?(current_version, new_version)
470
500
  logger.trace("#{new_resource} #{package_name} #{current_version} satisfies #{new_version} requirement")
471
501
  target_version_array.push(nil)
472
- elsif current_version && !allow_downgrade && version_compare(current_version, new_version) == 1
473
- logger.warn("#{new_resource} #{package_name} has installed version #{current_version}, which is newer than available version #{new_version}. Skipping...)")
474
- target_version_array.push(nil)
475
502
  else
503
+ # XXX: some subclasses seem to depend on this behavior where the new_version can be different from the
504
+ # candidate_version and we install the new_version, it seems like the candidate_version should be fixed to
505
+ # be resolved correctly to the new_version for those providers. although it may just be unit test bugs.
506
+ # it would be more correct to use the candidate_version here, but then it needs to be the correctly resolved
507
+ # candidate_version against the new_version constraint.
476
508
  logger.trace("#{new_resource} #{package_name} #{current_version} needs updating to #{new_version}")
477
509
  target_version_array.push(new_version)
478
510
  end
479
- elsif current_version.nil?
480
- # with use_magic_version there may be a package installed, but it fails the user's
481
- # requested new_resource.version constraints
511
+ elsif magic_version.nil?
512
+ # This is for when we have a "magic version using" subclass and where the installed version does not match the
513
+ # constraint specified in the new_version, so we need to upgrade to the candidate_version. This is the only
514
+ # codepath in the :install branch which references the candidate_version so it is slow, but it is the path where
515
+ # we need to do work anyway. XXX: should we check for candidate_version.nil? somewhere around here?
482
516
  logger.trace("#{new_resource} #{package_name} not installed, installing #{candidate_version}")
483
517
  target_version_array.push(candidate_version)
484
518
  else
@@ -512,8 +546,8 @@ class Chef
512
546
  @packages_missing_candidates ||=
513
547
  begin
514
548
  missing = []
515
- each_package do |package_name, new_version, current_version, candidate_version|
516
- missing.push(package_name) if current_version.nil? && candidate_version.nil?
549
+ each_package do |package_name, new_version, current_version, candidate_version, magic_version|
550
+ missing.push(package_name) if magic_version.nil? && candidate_version.nil?
517
551
  end
518
552
  missing
519
553
  end
@@ -536,7 +570,7 @@ class Chef
536
570
  @forced_packages_missing_candidates ||=
537
571
  begin
538
572
  missing = []
539
- each_package do |package_name, new_version, current_version, candidate_version|
573
+ each_package do |package_name, new_version, current_version, candidate_version, magic_version|
540
574
  next if new_version.nil? || current_version.nil?
541
575
 
542
576
  if use_magic_version?
@@ -559,9 +593,10 @@ class Chef
559
593
  def each_package
560
594
  package_name_array.each_with_index do |package_name, i|
561
595
  candidate_version = candidate_version_array[i]
562
- current_version = use_magic_version? ? magic_version[i] : current_version_array[i]
596
+ current_version = current_version_array[i]
597
+ magic_version = use_magic_version? ? magic_version_array[i] : current_version_array[i]
563
598
  new_version = new_version_array[i]
564
- yield package_name, new_version, current_version, candidate_version
599
+ yield package_name, new_version, current_version, candidate_version, magic_version
565
600
  end
566
601
  end
567
602
 
@@ -623,7 +658,7 @@ class Chef
623
658
  end
624
659
 
625
660
  def allow_downgrade
626
- if new_resource.respond_to?("allow_downgrade")
661
+ if new_resource.respond_to?(:allow_downgrade)
627
662
  new_resource.allow_downgrade
628
663
  else
629
664
  true
@@ -339,7 +339,7 @@ class Chef
339
339
  end
340
340
 
341
341
  def locked?
342
- user_plist[:auth_authority].any? { |tag| tag == ";DisabledUser;" }
342
+ user_plist[:auth_authority].any?(";DisabledUser;")
343
343
  rescue
344
344
  false
345
345
  end
@@ -411,7 +411,7 @@ class Chef
411
411
  end
412
412
 
413
413
  def secure_token_enabled?
414
- user_plist[:auth_authority].any? { |tag| tag == ";SecureToken;" }
414
+ user_plist[:auth_authority].any?(";SecureToken;")
415
415
  rescue
416
416
  false
417
417
  end
@@ -505,7 +505,7 @@ class Chef
505
505
  end
506
506
 
507
507
  def admin_user?
508
- admin_group_plist[:group_members].any? { |mem| mem == user_plist[:guid][0] }
508
+ admin_group_plist[:group_members].any?(user_plist[:guid][0])
509
509
  rescue
510
510
  false
511
511
  end
data/lib/chef/provider.rb CHANGED
@@ -35,7 +35,6 @@ class Chef
35
35
  attr_accessor :after_resource
36
36
  attr_accessor :run_context
37
37
 
38
- attr_reader :recipe_name
39
38
  attr_reader :logger
40
39
 
41
40
  include Chef::Mixin::WhyRun
@@ -174,6 +173,10 @@ class Chef
174
173
  new_resource.cookbook_name
175
174
  end
176
175
 
176
+ def recipe_name
177
+ new_resource.recipe_name
178
+ end
179
+
177
180
  # hook that subclasses can use to do lazy validation for where properties aren't flexible enough
178
181
  def check_resource_semantics!; end
179
182
 
@@ -269,7 +272,7 @@ class Chef
269
272
  end
270
273
 
271
274
  def requirements
272
- @requirements ||= ResourceRequirements.new(@new_resource, run_context)
275
+ @requirements ||= ResourceRequirements.new(@new_resource, run_context, action || new_resource.action)
273
276
  end
274
277
 
275
278
  def description(description = "NOT_PASSED")
@@ -108,7 +108,6 @@ require_relative "provider/group/groupadd"
108
108
  require_relative "provider/group/groupmod"
109
109
  require_relative "provider/group/pw"
110
110
  require_relative "provider/group/solaris"
111
- require_relative "provider/group/suse"
112
111
  require_relative "provider/group/usermod"
113
112
  require_relative "provider/group/windows"
114
113
 
data/lib/chef/pwsh.rb CHANGED
@@ -24,15 +24,16 @@ class Chef
24
24
  # bindir directory.
25
25
  #
26
26
  # @param script [String] script to run
27
+ # @param timeout [Integer, nil] timeout in seconds.
27
28
  # @return [Object] output
28
- def initialize(script)
29
+ def initialize(script, timeout: -1)
29
30
  @dll = Pwsh.dll
30
31
  super
31
32
  end
32
33
 
33
34
  protected
34
35
 
35
- def exec(script)
36
+ def exec(script, timeout: -1)
36
37
  # Note that we need to override the location of the shared dotnet core library
37
38
  # location. With most .net core applications, you can simply publish them as a
38
39
  # "self-contained" application allowing consumers of the application to run them
@@ -43,7 +43,7 @@ class Chef
43
43
  **Install multiple packages at once**:
44
44
 
45
45
  ```ruby
46
- apt_package %(package1 package2 package3)
46
+ apt_package %w(package1 package2 package3)
47
47
  ```
48
48
 
49
49
  **Install without using recommend packages as a dependency**:
@@ -55,7 +55,7 @@ class Chef
55
55
  ```
56
56
  DOC
57
57
 
58
- description "Use the **apt_package** resource to manage packages on Debian and Ubuntu platforms."
58
+ description "Use the **apt_package** resource to manage packages on Debian, Ubuntu, and other platforms that use the APT package system."
59
59
 
60
60
  property :default_release, String,
61
61
  description: "The default release. For example: `stable`.",
@@ -87,6 +87,16 @@ class Chef
87
87
  ]
88
88
  end
89
89
  ```
90
+
91
+ **Report directly to the [Chef Automate data collector endpoint](/automate/data_collection/#configure-chef-infra-client-to-use-the-data-collector-endpoint-in-chef-automate).**
92
+
93
+ ```ruby
94
+ chef_client_config 'Create client.rb' do
95
+ chef_server_url 'https://chef.example.dmz'
96
+ data_collector_server_url 'https://automate.example.dmz'
97
+ data_collector_token 'TEST_TOKEN_TEST'
98
+ end
99
+ ```
90
100
  DOC
91
101
 
92
102
  # @todo policy_file or policy_group being set requires the other to be set so enforce that.
@@ -231,6 +241,14 @@ class Chef
231
241
  property :additional_config, String,
232
242
  description: "Additional text to add at the bottom of the client.rb config. This can be used to run custom Ruby or to add less common config options"
233
243
 
244
+ property :data_collector_server_url, String,
245
+ description: "The data collector URL (typically automate) to send node, converge, and compliance data. Note: If possible, use Chef Infra Server to do all data collection reporting, as this removes the need to distribute tokens to individual nodes.",
246
+ introduced: "17.8"
247
+
248
+ property :data_collector_token, String,
249
+ description: "The data collector token to interact with the data collector server URL (Automate). Note: If possible, use Chef Infra Server to do all data collection reporting, as this removes the need to distribute tokens to individual nodes.",
250
+ introduced: "17.8"
251
+
234
252
  action :create, description: "Create a client.rb config file for configuring #{ChefUtils::Dist::Infra::PRODUCT}." do
235
253
  unless ::Dir.exist?(new_resource.config_directory)
236
254
  directory new_resource.config_directory do
@@ -282,7 +300,9 @@ class Chef
282
300
  ssl_verify_mode: new_resource.ssl_verify_mode,
283
301
  start_handlers: format_handler(new_resource.start_handlers),
284
302
  additional_config: new_resource.additional_config,
285
- policy_persist_run_list: new_resource.policy_persist_run_list
303
+ policy_persist_run_list: new_resource.policy_persist_run_list,
304
+ data_collector_server_url: new_resource.data_collector_server_url,
305
+ data_collector_token: new_resource.data_collector_token
286
306
  )
287
307
  mode "0640"
288
308
  action :create
@@ -134,7 +134,7 @@ class Chef
134
134
  standard_error_path ::File.join(new_resource.log_directory, new_resource.log_file_name)
135
135
  program_arguments ["/bin/bash",
136
136
  "-c",
137
- "echo; echo #{ChefUtils::Dist::Infra::PRODUCT} launchd daemon config has been updated. Manually unloading and reloading the daemon; echo Now unloading the daemon; /bin/launchctl unload /Library/LaunchDaemons/com.#{ChefUtils::Dist::Infra::SHORT}.#{ChefUtils::Dist::Infra::CLIENT}.plist; sleep 2; echo Now loading the daemon; /bin/launchctl load /Library/LaunchDaemons/com.#{ChefUtils::Dist::Infra::SHORT}.#{ChefUtils::Dist::Infra::CLIENT}.plist"]
137
+ "echo; echo #{ChefUtils::Dist::Infra::PRODUCT} launchd daemon config has been updated. Manually unloading and reloading the daemon; echo Now unloading the daemon; sudo /bin/launchctl unload /Library/LaunchDaemons/com.#{ChefUtils::Dist::Infra::SHORT}.#{ChefUtils::Dist::Infra::CLIENT}.plist; sleep 2; echo Now loading the daemon; sudo /bin/launchctl load /Library/LaunchDaemons/com.#{ChefUtils::Dist::Infra::SHORT}.#{ChefUtils::Dist::Infra::CLIENT}.plist"]
138
138
  action :enable # enable creates the plist & triggers service restarts on change
139
139
  end
140
140
 
@@ -25,7 +25,7 @@ class Chef
25
25
 
26
26
  provides :chocolatey_package
27
27
 
28
- description "Use the **chocolatey_package** resource to manage packages using Chocolatey on the Microsoft Windows platform. Note: The Chocolatey package manager is not installed on Windows by default. You will need to install it prior to using this resource by adding the [Chocolatey cookbook](https://supermarket.chef.io/cookbooks/chocolatey/) to your node's run list."
28
+ description "Use the **chocolatey_package** resource to manage packages using the Chocolatey package manager on the Microsoft Windows platform. Note: The Chocolatey package manager is not installed on Windows by default. You will need to install it prior to using this resource by adding the [chocolatey cookbook](https://supermarket.chef.io/cookbooks/chocolatey/) to your node's run list. Warning: The **chocolatey_package** resource must be specified as `chocolatey_package` and cannot be shortened to `package` in a recipe."
29
29
  introduced "12.7"
30
30
  examples <<~DOC
31
31
  **Install a Chocolatey package**:
@@ -73,9 +73,9 @@ class Chef
73
73
  coerce: proc { |x| [x].flatten }
74
74
 
75
75
  # In the choco if we have the feature useEnhancedExitCodes turned on, then choco will provide enhanced exit codes(2: no results).
76
- # Choco exit codes https://chocolatey.org/docs/commandsinfo#exit-codes
76
+ # Choco exit codes https://docs.chocolatey.org/en-us/choco/commands/info#exit-codes
77
77
  property :returns, [Integer, Array],
78
- description: "The exit code(s) returned a chocolatey package that indicate success.",
78
+ description: "The exit code(s) returned by the `choco` command that indicate a successful action. See [Chocolatey Exit Codes](https://docs.chocolatey.org/en-us/choco/commands/info#exit-codes) for a complete list of exit codes used by Chocolatey.",
79
79
  default: [ 0, 2 ], desired_state: false,
80
80
  introduced: "12.18"
81
81
  end
@@ -20,6 +20,7 @@
20
20
  require_relative "../../resource"
21
21
  require_relative "../helpers/cron_validations"
22
22
  require_relative "../../provider/cron" # do not remove. we actually need this below
23
+ require "chef-utils/dist" unless defined?(ChefUtils::Dist)
23
24
 
24
25
  class Chef
25
26
  class Resource
@@ -30,7 +31,80 @@ class Chef
30
31
 
31
32
  provides :cron
32
33
 
33
- description "Use the **cron** resource to manage cron entries for time-based job scheduling. Properties for a schedule will default to * if not provided. The cron resource requires access to a crontab program, typically cron."
34
+ description "Use the **cron** resource to manage cron entries for time-based job scheduling. Properties for a schedule will default to * if not provided. The cron resource requires access to a crontab program, typically cron. Warning: The cron resource should only be used to modify an entry in a crontab file. The `cron_d` resource directly manages `cron.d` files. This resource ships in #{ChefUtils::Dist::Infra::PRODUCT} 14.4 or later and can also be found in the [cron](https://github.com/chef-cookbooks/cron) cookbook) for previous #{ChefUtils::Dist::Infra::PRODUCT} releases."
35
+
36
+ examples <<~'DOC'
37
+ **Run a program at a specified interval**
38
+
39
+ ```ruby
40
+ cron 'noop' do
41
+ hour '5'
42
+ minute '0'
43
+ command '/bin/true'
44
+ end
45
+ ```
46
+
47
+ **Run an entry if a folder exists**
48
+
49
+ ```ruby
50
+ cron 'ganglia_tomcat_thread_max' do
51
+ command "/usr/bin/gmetric
52
+ -n 'tomcat threads max'
53
+ -t uint32
54
+ -v '/usr/local/bin/tomcat-stat --thread-max'"
55
+ only_if { ::File.exist?('/home/jboss') }
56
+ end
57
+ ```
58
+
59
+ **Run every Saturday, 8:00 AM**
60
+
61
+ The following example shows a schedule that will run every hour at 8:00 each Saturday morning, and will then send an email to “admin@example.com” after each run.
62
+
63
+ ```ruby
64
+ cron 'name_of_cron_entry' do
65
+ minute '0'
66
+ hour '8'
67
+ weekday '6'
68
+ mailto 'admin@example.com'
69
+ action :create
70
+ end
71
+ ```
72
+
73
+ **Run once a week**
74
+
75
+ ```ruby
76
+ cron 'cookbooks_report' do
77
+ minute '0'
78
+ hour '0'
79
+ weekday '1'
80
+ user 'chefio'
81
+ mailto 'sysadmin@example.com'
82
+ home '/srv/supermarket/shared/system'
83
+ command %W{
84
+ cd /srv/supermarket/current &&
85
+ env RUBYLIB="/srv/supermarket/current/lib"
86
+ RAILS_ASSET_ID=`git rev-parse HEAD` RAILS_ENV="#{rails_env}"
87
+ bundle exec rake cookbooks_report
88
+ }.join(' ')
89
+ action :create
90
+ end
91
+ ```
92
+
93
+ **Run only in November**
94
+
95
+ The following example shows a schedule that will run at 8:00 PM, every weekday (Monday through Friday), but only in November:
96
+
97
+ ```ruby
98
+ cron 'name_of_cron_entry' do
99
+ minute '0'
100
+ hour '20'
101
+ day '*'
102
+ month '11'
103
+ weekday '1-5'
104
+ action :create
105
+ end
106
+ ```
107
+ DOC
34
108
 
35
109
  state_attrs :minute, :hour, :day, :month, :weekday, :user
36
110
 
@@ -18,6 +18,7 @@
18
18
  require_relative "../../resource"
19
19
  require_relative "../helpers/cron_validations"
20
20
  require "shellwords" unless defined?(Shellwords)
21
+ require "chef-utils/dist" unless defined?(ChefUtils::Dist)
21
22
 
22
23
  class Chef
23
24
  class Resource
@@ -29,7 +30,7 @@ class Chef
29
30
  provides :cron_d
30
31
 
31
32
  introduced "14.4"
32
- description "Use the **cron_d** resource to manage cron job files in the `/etc/cron.d` directory. This is similar to the 'cron' resource, but it does not use the monolithic /etc/crontab file."
33
+ description "Use the **cron_d** resource to manage cron job files in the `/etc/cron.d` directory. Warning: #{ChefUtils::Dist::Infra::PRODUCT} also ships with the **cron** resource for managing the monolithic `/etc/crontab` file on platforms that lack cron.d support. See the [cron resource](/resources/cron/) for information on using that resource."
33
34
  examples <<~DOC
34
35
  **Run a program on the fifth hour of the day**
35
36
 
@@ -68,12 +68,10 @@ class Chef
68
68
  end
69
69
  }
70
70
 
71
- def allow_downgrade(arg = nil)
72
- unless arg.nil?
73
- Chef.deprecated(:dnf_package_allow_downgrade, "the allow_downgrade property on the dnf_package provider is not used, DNF supports downgrades by default.")
74
- end
75
- true
76
- end
71
+ property :allow_downgrade, [ TrueClass, FalseClass ],
72
+ description: "Allow downgrading a package to satisfy requested version requirements.",
73
+ default: true,
74
+ desired_state: false
77
75
  end
78
76
  end
79
77
  end
@@ -37,6 +37,11 @@ class Chef
37
37
  property :response_file_variables, Hash,
38
38
  description: "A Hash of response file variables in the form of {'VARIABLE' => 'VALUE'}.",
39
39
  default: {}, desired_state: false
40
+
41
+ property :allow_downgrade, [ TrueClass, FalseClass ],
42
+ description: "Allow downgrading a package to satisfy requested version requirements.",
43
+ default: true,
44
+ desired_state: false
40
45
  end
41
46
  end
42
47
  end
@@ -346,7 +346,7 @@ class Chef
346
346
 
347
347
  By default, notifications are `:delayed`, that is they are queued up as they are
348
348
  triggered, and then executed at the very end of a Chef Infra Client run. To run
349
- kan action immediately, use `:immediately`:
349
+ an action immediately, use `:immediately`:
350
350
 
351
351
  ```ruby
352
352
  template '/etc/nagios3/configures-nagios.conf' do
@@ -517,9 +517,6 @@ class Chef
517
517
  name_property: true,
518
518
  description: "An optional property to set the command to be executed if it differs from the resource block's name. Note: Use the **execute** resource to run a single command. Use multiple **execute** resource blocks to run multiple commands."
519
519
 
520
- property :umask, [ String, Integer ],
521
- description: "The file mode creation mask, or umask."
522
-
523
520
  property :creates, String,
524
521
  description: "Prevent a command from creating a file when that file already exists."
525
522
 
@@ -284,7 +284,7 @@ class Chef
284
284
  if new_resource.peer
285
285
  peer_list = []
286
286
  new_resource.peer.each do |p|
287
- peer_list << if p !~ /.*:.*/
287
+ peer_list << if !/.*:.*/.match?(p)
288
288
  p + ":9632"
289
289
  else
290
290
  p
@@ -15,7 +15,7 @@
15
15
  # limitations under the License.
16
16
  #
17
17
 
18
- require "win32/service" if RUBY_PLATFORM =~ /mswin|mingw32|windows/
18
+ require "win32/service" if RUBY_PLATFORM.match?(/mswin|mingw32|windows/)
19
19
  require_relative "habitat_sup"
20
20
 
21
21
  class Chef