You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

169 lines
7.7 KiB

  1. From 21f5154399fc33959a4f3c42e29cade6757015c9 Mon Sep 17 00:00:00 2001
  2. From: Valentin Rothberg <rothberg@redhat.com>
  3. Date: Tue, 5 Jan 2021 10:44:16 +0100
  4. Subject: [PATCH] vendor containers/psgo@v1.5.2
  5. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
  6. ---
  7. go.mod | 2 +-
  8. go.sum | 4 ++--
  9. .../internal/capabilities/capabilities.go | 2 +-
  10. .../containers/psgo/internal/dev/tty.go | 5 ++--
  11. .../containers/psgo/internal/proc/status.go | 2 +-
  12. .../psgo/internal/process/process.go | 4 ++--
  13. vendor/github.com/containers/psgo/psgo.go | 24 +++++++++----------
  14. vendor/modules.txt | 2 +-
  15. 8 files changed, 23 insertions(+), 22 deletions(-)
  16. --- a/go.mod
  17. +++ b/go.mod
  18. @@ -14,7 +14,7 @@ require (
  19. github.com/containers/common v0.29.0
  20. github.com/containers/conmon v2.0.20+incompatible
  21. github.com/containers/image/v5 v5.9.0
  22. - github.com/containers/psgo v1.5.1
  23. + github.com/containers/psgo v1.5.2
  24. github.com/containers/storage v1.24.1
  25. github.com/coreos/go-systemd/v22 v22.1.0
  26. github.com/cri-o/ocicni v0.2.1-0.20201102180012-75c612fda1a2
  27. --- a/go.sum
  28. +++ b/go.sum
  29. @@ -109,8 +109,8 @@ github.com/containers/libtrust v0.0.0-20
  30. github.com/containers/libtrust v0.0.0-20190913040956-14b96171aa3b/go.mod h1:9rfv8iPl1ZP7aqh9YA68wnZv2NUDbXdcdPHVz0pFbPY=
  31. github.com/containers/ocicrypt v1.0.3 h1:vYgl+RZ9Q3DPMuTfxmN+qp0X2Bj52uuY2vnt6GzVe1c=
  32. github.com/containers/ocicrypt v1.0.3/go.mod h1:CUBa+8MRNL/VkpxYIpaMtgn1WgXGyvPQj8jcy0EVG6g=
  33. -github.com/containers/psgo v1.5.1 h1:MQNb7FLbXqBdqz6u4lI2QWizVz4RSTzs1+Nk9XT1iVA=
  34. -github.com/containers/psgo v1.5.1/go.mod h1:2ubh0SsreMZjSXW1Hif58JrEcFudQyIy9EzPUWfawVU=
  35. +github.com/containers/psgo v1.5.2 h1:3aoozst/GIwsrr/5jnFy3FrJay98uujPCu9lTuSZ/Cw=
  36. +github.com/containers/psgo v1.5.2/go.mod h1:2ubh0SsreMZjSXW1Hif58JrEcFudQyIy9EzPUWfawVU=
  37. github.com/containers/storage v1.23.6/go.mod h1:haFs0HRowKwyzvWEx9EgI3WsL8XCSnBDb5f8P5CAxJY=
  38. github.com/containers/storage v1.23.7/go.mod h1:cUT2zHjtx+WlVri30obWmM2gpqpi8jfPsmIzP1TVpEI=
  39. github.com/containers/storage v1.24.0 h1:Fo2LkF7tkMLmo38sTZ/G8wHjcn8JfUFPfyTxM4WwMfk=
  40. --- a/vendor/github.com/containers/psgo/internal/capabilities/capabilities.go
  41. +++ b/vendor/github.com/containers/psgo/internal/capabilities/capabilities.go
  42. @@ -13,7 +13,7 @@
  43. // limitations under the License.
  44. // Package capabilities provides a mapping from common kernel bit masks to the
  45. -// alphanumerical represenation of kernel capabilities. See capabilities(7)
  46. +// alphanumerical representation of kernel capabilities. See capabilities(7)
  47. // for additional information.
  48. package capabilities
  49. --- a/vendor/github.com/containers/psgo/internal/dev/tty.go
  50. +++ b/vendor/github.com/containers/psgo/internal/dev/tty.go
  51. @@ -113,8 +113,9 @@ func TTYs() (*[]TTY, error) {
  52. }
  53. s := fi.Sys().(*syscall.Stat_t)
  54. t := TTY{
  55. - Minor: minDevNum(s.Rdev),
  56. - Major: majDevNum(s.Rdev),
  57. + // Rdev is type uint32 on mips arch so we have to cast to uint64
  58. + Minor: minDevNum(uint64(s.Rdev)),
  59. + Major: majDevNum(uint64(s.Rdev)),
  60. Path: dev,
  61. }
  62. ttys = append(ttys, t)
  63. --- a/vendor/github.com/containers/psgo/internal/proc/status.go
  64. +++ b/vendor/github.com/containers/psgo/internal/proc/status.go
  65. @@ -24,7 +24,7 @@ import (
  66. "github.com/pkg/errors"
  67. )
  68. -// Status is a direct translation of a `/proc/[pid]/status`, wich provides much
  69. +// Status is a direct translation of a `/proc/[pid]/status`, which provides much
  70. // of the information in /proc/[pid]/stat and /proc/[pid]/statm in a format
  71. // that's easier for humans to parse.
  72. type Status struct {
  73. --- a/vendor/github.com/containers/psgo/internal/process/process.go
  74. +++ b/vendor/github.com/containers/psgo/internal/process/process.go
  75. @@ -31,9 +31,9 @@ type Process struct {
  76. Pid string
  77. // Stat contains data from /proc/$pid/stat.
  78. Stat proc.Stat
  79. - // Status containes data from /proc/$pid/status.
  80. + // Status contains data from /proc/$pid/status.
  81. Status proc.Status
  82. - // CmdLine containes data from /proc/$pid/cmdline.
  83. + // CmdLine contains data from /proc/$pid/cmdline.
  84. CmdLine []string
  85. // Label containers data from /proc/$pid/attr/current.
  86. Label string
  87. --- a/vendor/github.com/containers/psgo/psgo.go
  88. +++ b/vendor/github.com/containers/psgo/psgo.go
  89. @@ -482,7 +482,7 @@ func JoinNamespaceAndProcessInfoByPidsWi
  90. // catch race conditions
  91. continue
  92. }
  93. - return nil, errors.Wrapf(err, "error extracing PID namespace")
  94. + return nil, errors.Wrapf(err, "error extracting PID namespace")
  95. }
  96. if _, exists := nsMap[ns]; !exists {
  97. nsMap[ns] = true
  98. @@ -759,7 +759,7 @@ func processVSZ(p *process.Process, ctx
  99. }
  100. // parseCAP parses cap (a string bit mask) and returns the associated set of
  101. -// capabilities. If all capabilties are set, "full" is returned. If no
  102. +// capabilities. If all capabilities are set, "full" is returned. If no
  103. // capability is enabled, "none" is returned.
  104. func parseCAP(cap string) (string, error) {
  105. mask, err := strconv.ParseUint(cap, 16, 64)
  106. @@ -777,36 +777,36 @@ func parseCAP(cap string) (string, error
  107. return strings.Join(caps, ","), nil
  108. }
  109. -// processCAPAMB returns the set of ambient capabilties associated with
  110. -// process p. If all capabilties are set, "full" is returned. If no
  111. +// processCAPAMB returns the set of ambient capabilities associated with
  112. +// process p. If all capabilities are set, "full" is returned. If no
  113. // capability is enabled, "none" is returned.
  114. func processCAPAMB(p *process.Process, ctx *psContext) (string, error) {
  115. return parseCAP(p.Status.CapAmb)
  116. }
  117. -// processCAPINH returns the set of inheritable capabilties associated with
  118. -// process p. If all capabilties are set, "full" is returned. If no
  119. +// processCAPINH returns the set of inheritable capabilities associated with
  120. +// process p. If all capabilities are set, "full" is returned. If no
  121. // capability is enabled, "none" is returned.
  122. func processCAPINH(p *process.Process, ctx *psContext) (string, error) {
  123. return parseCAP(p.Status.CapInh)
  124. }
  125. -// processCAPPRM returns the set of permitted capabilties associated with
  126. -// process p. If all capabilties are set, "full" is returned. If no
  127. +// processCAPPRM returns the set of permitted capabilities associated with
  128. +// process p. If all capabilities are set, "full" is returned. If no
  129. // capability is enabled, "none" is returned.
  130. func processCAPPRM(p *process.Process, ctx *psContext) (string, error) {
  131. return parseCAP(p.Status.CapPrm)
  132. }
  133. -// processCAPEFF returns the set of effective capabilties associated with
  134. -// process p. If all capabilties are set, "full" is returned. If no
  135. +// processCAPEFF returns the set of effective capabilities associated with
  136. +// process p. If all capabilities are set, "full" is returned. If no
  137. // capability is enabled, "none" is returned.
  138. func processCAPEFF(p *process.Process, ctx *psContext) (string, error) {
  139. return parseCAP(p.Status.CapEff)
  140. }
  141. -// processCAPBND returns the set of bounding capabilties associated with
  142. -// process p. If all capabilties are set, "full" is returned. If no
  143. +// processCAPBND returns the set of bounding capabilities associated with
  144. +// process p. If all capabilities are set, "full" is returned. If no
  145. // capability is enabled, "none" is returned.
  146. func processCAPBND(p *process.Process, ctx *psContext) (string, error) {
  147. return parseCAP(p.Status.CapBnd)
  148. --- a/vendor/modules.txt
  149. +++ b/vendor/modules.txt
  150. @@ -160,7 +160,7 @@ github.com/containers/ocicrypt/keywrap/p
  151. github.com/containers/ocicrypt/keywrap/pkcs7
  152. github.com/containers/ocicrypt/spec
  153. github.com/containers/ocicrypt/utils
  154. -# github.com/containers/psgo v1.5.1
  155. +# github.com/containers/psgo v1.5.2
  156. github.com/containers/psgo
  157. github.com/containers/psgo/internal/capabilities
  158. github.com/containers/psgo/internal/cgroups