Merge pull request #28505 from containers/renovate/github.com-containers-libhvee-0.x

Update module github.com/containers/libhvee to v0.11.0
This commit is contained in:
Ashley Cui 2026-04-15 15:18:25 -04:00 • committed by GitHub
commit e4243b6148
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
33 changed files with 30 additions and 43 deletions

2
go.mod
View file

@ -12,7 +12,7 @@ require (
github.com/checkpoint-restore/go-criu/v7 v7.2.0
github.com/containers/buildah v1.42.1-0.20260318164928-eb9c9b9d2fc8
github.com/containers/gvisor-tap-vsock v0.8.8
github.com/containers/libhvee v0.10.1-0.20250829163521-178d10e67860
github.com/containers/libhvee v0.11.0
github.com/containers/ocicrypt v1.2.1
github.com/containers/psgo v1.10.0
github.com/containers/winquit v1.1.0

4
go.sum
View file

@ -61,8 +61,8 @@ github.com/containers/common v0.64.2 h1:1xepE7QwQggUXxmyQ1Dbh6Cn0yd7ktk14sN3McSW
github.com/containers/common v0.64.2/go.mod h1:o29GfYy4tefUuShm8mOn2AiL5Mpzdio+viHI7n24KJ4=
github.com/containers/gvisor-tap-vsock v0.8.8 h1:5FznbOYMIuaCv8B6zQ7M6wjqP63Lasy0A6GpViEnjTg=
github.com/containers/gvisor-tap-vsock v0.8.8/go.mod h1:m/PzhZWAS6T9pCRH1fLkq2OqbEd6QEUZWjm3FS5F+CE=
github.com/containers/libhvee v0.10.1-0.20250829163521-178d10e67860 h1:YOhl3KCie5f4vLmW3N6nnpucD6Wot0bHj2hSzL8ugU8=
github.com/containers/libhvee v0.10.1-0.20250829163521-178d10e67860/go.mod h1:/A6jL8HXzYB4aUQEjlyYImaQTgSw2jYZunSVCwqgaCI=
github.com/containers/libhvee v0.11.0 h1:lh9sN2vl0pWrozAjvudsJaKLN1H6YXaohSn/cCxSSLI=
github.com/containers/libhvee v0.11.0/go.mod h1:4eTPJpxhHsXWaKXF5KI3/IuN1U/wbTvupLzKfSB8p0E=
github.com/containers/libtrust v0.0.0-20230121012942-c1716e8a8d01 h1:Qzk5C6cYglewc+UyGf6lc8Mj2UaPTHy/iF2De0/77CA=
github.com/containers/libtrust v0.0.0-20230121012942-c1716e8a8d01/go.mod h1:9rfv8iPl1ZP7aqh9YA68wnZv2NUDbXdcdPHVz0pFbPY=
github.com/containers/luksy v0.0.0-20251208191447-ca096313c38f h1:DWGVgZ9ToKBOMiBMv//ilrKPKEy4tQG752XtTJXYUQ0=

View file

@ -1,5 +1,4 @@
//go:build windows
// +build windows
package hypervctl

View file

@ -1,5 +1,4 @@
//go:build windows
// +build windows
package hypervctl

View file

@ -1,5 +1,4 @@
//go:build windows
// +build windows
package hypervctl

View file

@ -1,5 +1,4 @@
//go:build windows
// +build windows
package hypervctl

View file

@ -1,5 +1,4 @@
//go:build windows
// +build windows
package hypervctl

View file

@ -1,5 +1,4 @@
//go:build windows
// +build windows
package hypervctl

View file

@ -1,5 +1,4 @@
//go:build windows
// +build windows
package hypervctl

View file

@ -1,5 +1,4 @@
//go:build windows
// +build windows
package hypervctl

View file

@ -1,5 +1,4 @@
//go:build windows
// +build windows
package hypervctl

View file

@ -1,5 +1,4 @@
//go:build windows
// +build windows
package hypervctl

View file

@ -1,5 +1,4 @@
//go:build windows
// +build windows
package hypervctl

View file

@ -1,5 +1,4 @@
//go:build windows
// +build windows
package hypervctl

View file

@ -1,5 +1,4 @@
//go:build windows
// +build windows
package hypervctl

View file

@ -1,5 +1,4 @@
//go:build windows
// +build windows
package hypervctl

View file

@ -1,5 +1,4 @@
//go:build windows
// +build windows
package hypervctl

View file

@ -1,5 +1,4 @@
//go:build windows
// +build windows
package hypervctl

View file

@ -1,5 +1,4 @@
//go:build windows
// +build windows
package hypervctl

View file

@ -1,5 +1,4 @@
//go:build windows
// +build windows
package hypervctl

View file

@ -1,5 +1,4 @@
//go:build windows
// +build windows
package hypervctl

View file

@ -1,5 +1,4 @@
//go:build windows
// +build windows
package hypervctl
@ -8,7 +7,6 @@ import (
"errors"
"fmt"
"os"
"strings"
"time"
"github.com/containers/libhvee/pkg/kvp/ginsu"
@ -196,6 +194,9 @@ func (vm *VirtualMachine) kvpOperation(op string, key string, value string, nowa
err = &wmiext.JobError{ErrorCode: int(ret)}
}
if jobErr, ok := err.(*wmiext.JobError); ok && jobErr.Description != "" {
return errors.New(jobErr.Error())
}
return translateKvpError(err, illegalSuggestion)
}
@ -217,9 +218,9 @@ func waitVMResult(res int32, service *wmiext.Service, job *wmiext.Instance, erro
}
if err != nil {
desc, _ := job.GetAsString("ErrorDescription")
desc = strings.ReplaceAll(desc, "\n", " ")
return fmt.Errorf("%s: %w (%s)", errorMsg, err, desc)
if jobErr, ok := err.(*wmiext.JobError); ok && jobErr.Description != "" {
return errors.New(jobErr.Error())
}
}
return err

View file

@ -1,5 +1,4 @@
//go:build windows
// +build windows
package hypervctl

View file

@ -1,5 +1,4 @@
//go:build windows
// +build windows
package hypervctl

View file

@ -1,5 +1,4 @@
//go:build windows
// +build windows
package wmiext

View file

@ -1,5 +1,4 @@
//go:build windows
// +build windows
package wmiext
@ -341,7 +340,7 @@ func convertTimeToDataTime(time *time.Time) ole.VARIANT {
_, offset := time.Zone()
// convert to minutes
offset /= 60
//yyyymmddHHMMSS.mmmmmmsUUU
// yyyymmddHHMMSS.mmmmmmsUUU
s := fmt.Sprintf("%s%+04d", time.Format("20060102150405.000000"), offset)
return ole.NewVariant(ole.VT_BSTR, int64(uintptr(unsafe.Pointer(ole.SysAllocStringLen(s)))))
}

View file

@ -1,5 +1,4 @@
//go:build windows
// +build windows
package wmiext

View file

@ -1,5 +1,4 @@
//go:build windows
// +build windows
package wmiext

View file

@ -1,5 +1,4 @@
//go:build windows
// +build windows
package wmiext

View file

@ -1,5 +1,4 @@
//go:build windows
// +build windows
package wmiext

View file

@ -1,18 +1,22 @@
//go:build windows
// +build windows
package wmiext
import (
"fmt"
"strings"
"time"
)
type JobError struct {
ErrorCode int
ErrorCode int
Description string
}
func (err *JobError) Error() string {
if err.Description != "" {
return fmt.Sprintf("Job failed with error code: %d. Description: %s", err.ErrorCode, err.Description)
}
return fmt.Sprintf("Job failed with error code: %d", err.ErrorCode)
}
@ -46,7 +50,17 @@ func WaitJob(service *Service, job *Instance) error {
}
if result.(int32) != 0 {
return &JobError{ErrorCode: int(result.(int32))}
desc := ""
if desc, err = job.GetAsString("ErrorDescription"); err == nil {
desc = strings.ReplaceAll(desc, "\n", " ")
desc = strings.TrimSpace(desc)
}
return &JobError{
ErrorCode: int(result.(int32)),
Description: desc,
}
}
return nil

View file

@ -1,5 +1,4 @@
//go:build windows
// +build windows
package wmiext
@ -112,7 +111,7 @@ const (
)
func CoSetProxyBlanket(service *ole.IUnknown) (err error) {
res, _, _ := procCoSetProxyBlanket.Call( //CoSetProxyBlanket(
res, _, _ := procCoSetProxyBlanket.Call( // CoSetProxyBlanket(
uintptr(unsafe.Pointer(service)), // [in] IUnknown *pProxy,
uintptr(RPC_C_AUTHN_WINNT), // [in] DWORD dwAuthnSvc,
uintptr(RPC_C_AUTHZ_NONE), // [in] DWORD dwAuthzSvc,

4
vendor/modules.txt vendored
View file

@ -121,8 +121,8 @@ github.com/containers/common/pkg/strongunits
# github.com/containers/gvisor-tap-vsock v0.8.8
## explicit; go 1.24.0
github.com/containers/gvisor-tap-vsock/pkg/types
# github.com/containers/libhvee v0.10.1-0.20250829163521-178d10e67860
## explicit; go 1.23.3
# github.com/containers/libhvee v0.11.0
## explicit; go 1.25.0
github.com/containers/libhvee/pkg/hypervctl
github.com/containers/libhvee/pkg/kvp/ginsu
github.com/containers/libhvee/pkg/wmiext