deps: bump images to 0.164

We have an issue where `%post` scripts are not being executed due to our incorrect handling of Anaconda modules [1].

[1]: https://github.com/osbuild/bootc-image-builder/issues/968

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
This commit is contained in:
Simon de Vlieger 2025-07-21 12:25:08 +02:00 committed by Tomáš Hozza
parent d8db1e7c39
commit ccb4a3df88
89 changed files with 57336 additions and 56135 deletions

File diff suppressed because it is too large Load diff

View file

@ -3778,6 +3778,11 @@
"methods": [
"List"
]
},
"PerformMaintenance": {
"methods": [
"PerformMaintenance"
]
}
}
}

View file

@ -40,8 +40,9 @@ var newReservationSubBlocksClientHook clientHook
// ReservationSubBlocksCallOptions contains the retry settings for each method of ReservationSubBlocksClient.
type ReservationSubBlocksCallOptions struct {
Get []gax.CallOption
List []gax.CallOption
Get []gax.CallOption
List []gax.CallOption
PerformMaintenance []gax.CallOption
}
func defaultReservationSubBlocksRESTCallOptions() *ReservationSubBlocksCallOptions {
@ -70,6 +71,9 @@ func defaultReservationSubBlocksRESTCallOptions() *ReservationSubBlocksCallOptio
http.StatusServiceUnavailable)
}),
},
PerformMaintenance: []gax.CallOption{
gax.WithTimeout(600000 * time.Millisecond),
},
}
}
@ -80,6 +84,7 @@ type internalReservationSubBlocksClient interface {
Connection() *grpc.ClientConn
Get(context.Context, *computepb.GetReservationSubBlockRequest, ...gax.CallOption) (*computepb.ReservationSubBlocksGetResponse, error)
List(context.Context, *computepb.ListReservationSubBlocksRequest, ...gax.CallOption) *ReservationSubBlockIterator
PerformMaintenance(context.Context, *computepb.PerformMaintenanceReservationSubBlockRequest, ...gax.CallOption) (*Operation, error)
}
// ReservationSubBlocksClient is a client for interacting with Google Compute Engine API.
@ -127,6 +132,11 @@ func (c *ReservationSubBlocksClient) List(ctx context.Context, req *computepb.Li
return c.internalClient.List(ctx, req, opts...)
}
// PerformMaintenance allows customers to perform maintenance on a reservation subBlock
func (c *ReservationSubBlocksClient) PerformMaintenance(ctx context.Context, req *computepb.PerformMaintenanceReservationSubBlockRequest, opts ...gax.CallOption) (*Operation, error) {
return c.internalClient.PerformMaintenance(ctx, req, opts...)
}
// Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
type reservationSubBlocksRESTClient struct {
// The http endpoint to connect to.
@ -135,6 +145,9 @@ type reservationSubBlocksRESTClient struct {
// The http client.
httpClient *http.Client
// operationClient is used to call the operation-specific management service.
operationClient *ZoneOperationsClient
// The x-goog-* headers to be sent with each request.
xGoogHeaders []string
@ -163,6 +176,16 @@ func NewReservationSubBlocksRESTClient(ctx context.Context, opts ...option.Clien
}
c.setGoogleClientInfo()
o := []option.ClientOption{
option.WithHTTPClient(httpClient),
option.WithEndpoint(endpoint),
}
opC, err := NewZoneOperationsRESTClient(ctx, o...)
if err != nil {
return nil, err
}
c.operationClient = opC
return &ReservationSubBlocksClient{internalClient: c, CallOptions: callOpts}, nil
}
@ -194,6 +217,9 @@ func (c *reservationSubBlocksRESTClient) setGoogleClientInfo(keyval ...string) {
func (c *reservationSubBlocksRESTClient) Close() error {
// Replace httpClient with nil to force cleanup.
c.httpClient = nil
if err := c.operationClient.Close(); err != nil {
return err
}
return nil
}
@ -334,3 +360,63 @@ func (c *reservationSubBlocksRESTClient) List(ctx context.Context, req *computep
return it
}
// PerformMaintenance allows customers to perform maintenance on a reservation subBlock
func (c *reservationSubBlocksRESTClient) PerformMaintenance(ctx context.Context, req *computepb.PerformMaintenanceReservationSubBlockRequest, opts ...gax.CallOption) (*Operation, error) {
baseUrl, err := url.Parse(c.endpoint)
if err != nil {
return nil, err
}
baseUrl.Path += fmt.Sprintf("/compute/v1/projects/%v/zones/%v/%v/reservationSubBlocks/%v/performMaintenance", req.GetProject(), req.GetZone(), req.GetParentName(), req.GetReservationSubBlock())
params := url.Values{}
if req != nil && req.RequestId != nil {
params.Add("requestId", fmt.Sprintf("%v", req.GetRequestId()))
}
baseUrl.RawQuery = params.Encode()
// Build HTTP headers from client and context metadata.
hds := []string{"x-goog-request-params", fmt.Sprintf("%s=%v&%s=%v&%s=%v&%s=%v", "project", url.QueryEscape(req.GetProject()), "zone", url.QueryEscape(req.GetZone()), "parent_name", url.QueryEscape(req.GetParentName()), "reservation_sub_block", url.QueryEscape(req.GetReservationSubBlock()))}
hds = append(c.xGoogHeaders, hds...)
hds = append(hds, "Content-Type", "application/json")
headers := gax.BuildHeaders(ctx, hds...)
opts = append((*c.CallOptions).PerformMaintenance[0:len((*c.CallOptions).PerformMaintenance):len((*c.CallOptions).PerformMaintenance)], opts...)
unm := protojson.UnmarshalOptions{AllowPartial: true, DiscardUnknown: true}
resp := &computepb.Operation{}
e := gax.Invoke(ctx, func(ctx context.Context, settings gax.CallSettings) error {
if settings.Path != "" {
baseUrl.Path = settings.Path
}
httpReq, err := http.NewRequest("POST", baseUrl.String(), nil)
if err != nil {
return err
}
httpReq = httpReq.WithContext(ctx)
httpReq.Header = headers
buf, err := executeHTTPRequest(ctx, c.httpClient, httpReq, c.logger, nil, "PerformMaintenance")
if err != nil {
return err
}
if err := unm.Unmarshal(buf, resp); err != nil {
return err
}
return nil
}, opts...)
if e != nil {
return nil, e
}
op := &Operation{
&zoneOperationsHandle{
c: c.operationClient,
proto: resp,
project: req.GetProject(),
zone: req.GetZone(),
},
}
return op, nil
}

View file

@ -15,4 +15,4 @@
package internal
// Version is the current tagged release of the library.
const Version = "1.39.0"
const Version = "1.40.0"

View file

@ -619,6 +619,16 @@
"release_level": "preview",
"library_type": "GAPIC_AUTO"
},
"cloud.google.com/go/bigquery/v2/apiv2": {
"api_shortname": "bigquery",
"distribution_name": "cloud.google.com/go/bigquery/v2/apiv2",
"description": "BigQuery API",
"language": "go",
"client_library_type": "generated",
"client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/bigquery/v2/latest/apiv2",
"release_level": "preview",
"library_type": "GAPIC_AUTO"
},
"cloud.google.com/go/bigtable": {
"api_shortname": "bigtable",
"distribution_name": "cloud.google.com/go/bigtable",
@ -1669,6 +1679,16 @@
"release_level": "preview",
"library_type": "GAPIC_AUTO"
},
"cloud.google.com/go/maintenance/api/apiv1beta": {
"api_shortname": "maintenance",
"distribution_name": "cloud.google.com/go/maintenance/api/apiv1beta",
"description": "Maintenance API",
"language": "go",
"client_library_type": "generated",
"client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/maintenance/latest/api/apiv1beta",
"release_level": "preview",
"library_type": "GAPIC_AUTO"
},
"cloud.google.com/go/managedidentities/apiv1": {
"api_shortname": "managedidentities",
"distribution_name": "cloud.google.com/go/managedidentities/apiv1",
@ -1869,6 +1889,16 @@
"release_level": "preview",
"library_type": "GAPIC_AUTO"
},
"cloud.google.com/go/modelarmor/apiv1beta": {
"api_shortname": "modelarmor",
"distribution_name": "cloud.google.com/go/modelarmor/apiv1beta",
"description": "Model Armor API",
"language": "go",
"client_library_type": "generated",
"client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/modelarmor/latest/apiv1beta",
"release_level": "preview",
"library_type": "GAPIC_AUTO"
},
"cloud.google.com/go/monitoring/apiv3/v2": {
"api_shortname": "monitoring",
"distribution_name": "cloud.google.com/go/monitoring/apiv3/v2",
@ -2792,7 +2822,7 @@
"cloud.google.com/go/spanner/admin/instance/apiv1": {
"api_shortname": "spanner",
"distribution_name": "cloud.google.com/go/spanner/admin/instance/apiv1",
"description": "Cloud Spanner Instance Admin API",
"description": "Cloud Spanner API",
"language": "go",
"client_library_type": "generated",
"client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/spanner/latest/admin/instance/apiv1",
@ -2929,6 +2959,16 @@
"release_level": "stable",
"library_type": "GAPIC_AUTO"
},
"cloud.google.com/go/support/apiv2beta": {
"api_shortname": "cloudsupport",
"distribution_name": "cloud.google.com/go/support/apiv2beta",
"description": "Google Cloud Support API",
"language": "go",
"client_library_type": "generated",
"client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/support/latest/apiv2beta",
"release_level": "preview",
"library_type": "GAPIC_AUTO"
},
"cloud.google.com/go/talent/apiv4": {
"api_shortname": "jobs",
"distribution_name": "cloud.google.com/go/talent/apiv4",

View file

@ -1,26 +1,28 @@
version: "2"
run:
timeout: 1m
tests: true
linters:
disable-all: true
enable:
default: none
enable: # please keep this alphabetized
- asasalint
- asciicheck
- copyloopvar
- dupl
- errcheck
- forcetypeassert
- goconst
- gocritic
- gofmt
- goimports
- gosimple
- govet
- ineffassign
- misspell
- musttag
- revive
- staticcheck
- typecheck
- unused
issues:
exclude-use-default: false
max-issues-per-linter: 0
max-same-issues: 10

View file

@ -77,7 +77,7 @@ func newSink(fn func(prefix, args string), formatter Formatter) logr.LogSink {
write: fn,
}
// For skipping fnlogger.Info and fnlogger.Error.
l.Formatter.AddCallDepth(1)
l.AddCallDepth(1) // via Formatter
return l
}
@ -164,17 +164,17 @@ type fnlogger struct {
}
func (l fnlogger) WithName(name string) logr.LogSink {
l.Formatter.AddName(name)
l.AddName(name) // via Formatter
return &l
}
func (l fnlogger) WithValues(kvList ...any) logr.LogSink {
l.Formatter.AddValues(kvList)
l.AddValues(kvList) // via Formatter
return &l
}
func (l fnlogger) WithCallDepth(depth int) logr.LogSink {
l.Formatter.AddCallDepth(depth)
l.AddCallDepth(depth) // via Formatter
return &l
}

View file

@ -1,12 +1,6 @@
linters-settings:
govet:
check-shadowing: true
golint:
min-confidence: 0
gocyclo:
min-complexity: 45
maligned:
suggest-new: true
dupl:
threshold: 200
goconst:
@ -16,7 +10,7 @@ linters-settings:
linters:
enable-all: true
disable:
- maligned
- recvcheck
- unparam
- lll
- gochecknoinits
@ -29,9 +23,6 @@ linters:
- wrapcheck
- testpackage
- nlreturn
- gomnd
- exhaustivestruct
- goerr113
- errorlint
- nestif
- godot
@ -39,7 +30,6 @@ linters:
- paralleltest
- tparallel
- thelper
- ifshort
- exhaustruct
- varnamelen
- gci
@ -52,10 +42,15 @@ linters:
- forcetypeassert
- cyclop
# deprecated linters
- deadcode
- interfacer
- scopelint
- varcheck
- structcheck
- golint
- nosnakecase
#- deadcode
#- interfacer
#- scopelint
#- varcheck
#- structcheck
#- golint
#- nosnakecase
#- maligned
#- goerr113
#- ifshort
#- gomnd
#- exhaustivestruct

18
vendor/github.com/go-openapi/jsonpointer/errors.go generated vendored Normal file
View file

@ -0,0 +1,18 @@
package jsonpointer
type pointerError string
func (e pointerError) Error() string {
return string(e)
}
const (
// ErrPointer is an error raised by the jsonpointer package
ErrPointer pointerError = "JSON pointer error"
// ErrInvalidStart states that a JSON pointer must start with a separator ("/")
ErrInvalidStart pointerError = `JSON pointer must be empty or start with a "` + pointerSeparator
// ErrUnsupportedValueType indicates that a value of the wrong type is being set
ErrUnsupportedValueType pointerError = "only structs, pointers, maps and slices are supported for setting values"
)

View file

@ -39,9 +39,6 @@ import (
const (
emptyPointer = ``
pointerSeparator = `/`
invalidStart = `JSON pointer must be empty or start with a "` + pointerSeparator
notFound = `Can't find the pointer in the document`
)
var jsonPointableType = reflect.TypeOf(new(JSONPointable)).Elem()
@ -80,7 +77,7 @@ func (p *Pointer) parse(jsonPointerString string) error {
if jsonPointerString != emptyPointer {
if !strings.HasPrefix(jsonPointerString, pointerSeparator) {
err = errors.New(invalidStart)
err = errors.Join(ErrInvalidStart, ErrPointer)
} else {
referenceTokens := strings.Split(jsonPointerString, pointerSeparator)
p.referenceTokens = append(p.referenceTokens, referenceTokens[1:]...)
@ -128,7 +125,7 @@ func getSingleImpl(node any, decodedToken string, nameProvider *swag.NameProvide
rValue := reflect.Indirect(reflect.ValueOf(node))
kind := rValue.Kind()
if isNil(node) {
return nil, kind, fmt.Errorf("nil value has not field %q", decodedToken)
return nil, kind, fmt.Errorf("nil value has no field %q: %w", decodedToken, ErrPointer)
}
switch typed := node.(type) {
@ -146,7 +143,7 @@ func getSingleImpl(node any, decodedToken string, nameProvider *swag.NameProvide
case reflect.Struct:
nm, ok := nameProvider.GetGoNameForType(rValue.Type(), decodedToken)
if !ok {
return nil, kind, fmt.Errorf("object has no field %q", decodedToken)
return nil, kind, fmt.Errorf("object has no field %q: %w", decodedToken, ErrPointer)
}
fld := rValue.FieldByName(nm)
return fld.Interface(), kind, nil
@ -158,7 +155,7 @@ func getSingleImpl(node any, decodedToken string, nameProvider *swag.NameProvide
if mv.IsValid() {
return mv.Interface(), kind, nil
}
return nil, kind, fmt.Errorf("object has no key %q", decodedToken)
return nil, kind, fmt.Errorf("object has no key %q: %w", decodedToken, ErrPointer)
case reflect.Slice:
tokenIndex, err := strconv.Atoi(decodedToken)
@ -167,14 +164,14 @@ func getSingleImpl(node any, decodedToken string, nameProvider *swag.NameProvide
}
sLength := rValue.Len()
if tokenIndex < 0 || tokenIndex >= sLength {
return nil, kind, fmt.Errorf("index out of bounds array[0,%d] index '%d'", sLength-1, tokenIndex)
return nil, kind, fmt.Errorf("index out of bounds array[0,%d] index '%d': %w", sLength-1, tokenIndex, ErrPointer)
}
elem := rValue.Index(tokenIndex)
return elem.Interface(), kind, nil
default:
return nil, kind, fmt.Errorf("invalid token reference %q", decodedToken)
return nil, kind, fmt.Errorf("invalid token reference %q: %w", decodedToken, ErrPointer)
}
}
@ -194,7 +191,7 @@ func setSingleImpl(node, data any, decodedToken string, nameProvider *swag.NameP
case reflect.Struct:
nm, ok := nameProvider.GetGoNameForType(rValue.Type(), decodedToken)
if !ok {
return fmt.Errorf("object has no field %q", decodedToken)
return fmt.Errorf("object has no field %q: %w", decodedToken, ErrPointer)
}
fld := rValue.FieldByName(nm)
if fld.IsValid() {
@ -214,18 +211,18 @@ func setSingleImpl(node, data any, decodedToken string, nameProvider *swag.NameP
}
sLength := rValue.Len()
if tokenIndex < 0 || tokenIndex >= sLength {
return fmt.Errorf("index out of bounds array[0,%d] index '%d'", sLength, tokenIndex)
return fmt.Errorf("index out of bounds array[0,%d] index '%d': %w", sLength, tokenIndex, ErrPointer)
}
elem := rValue.Index(tokenIndex)
if !elem.CanSet() {
return fmt.Errorf("can't set slice index %s to %v", decodedToken, data)
return fmt.Errorf("can't set slice index %s to %v: %w", decodedToken, data, ErrPointer)
}
elem.Set(reflect.ValueOf(data))
return nil
default:
return fmt.Errorf("invalid token reference %q", decodedToken)
return fmt.Errorf("invalid token reference %q: %w", decodedToken, ErrPointer)
}
}
@ -244,7 +241,6 @@ func (p *Pointer) get(node any, nameProvider *swag.NameProvider) (any, reflect.K
}
for _, token := range p.referenceTokens {
decodedToken := Unescape(token)
r, knd, err := getSingleImpl(node, decodedToken, nameProvider)
@ -264,7 +260,10 @@ func (p *Pointer) set(node, data any, nameProvider *swag.NameProvider) error {
knd := reflect.ValueOf(node).Kind()
if knd != reflect.Ptr && knd != reflect.Struct && knd != reflect.Map && knd != reflect.Slice && knd != reflect.Array {
return errors.New("only structs, pointers, maps and slices are supported for setting values")
return errors.Join(
ErrUnsupportedValueType,
ErrPointer,
)
}
if nameProvider == nil {
@ -307,7 +306,7 @@ func (p *Pointer) set(node, data any, nameProvider *swag.NameProvider) error {
case reflect.Struct:
nm, ok := nameProvider.GetGoNameForType(rValue.Type(), decodedToken)
if !ok {
return fmt.Errorf("object has no field %q", decodedToken)
return fmt.Errorf("object has no field %q: %w", decodedToken, ErrPointer)
}
fld := rValue.FieldByName(nm)
if fld.CanAddr() && fld.Kind() != reflect.Interface && fld.Kind() != reflect.Map && fld.Kind() != reflect.Slice && fld.Kind() != reflect.Ptr {
@ -321,7 +320,7 @@ func (p *Pointer) set(node, data any, nameProvider *swag.NameProvider) error {
mv := rValue.MapIndex(kv)
if !mv.IsValid() {
return fmt.Errorf("object has no key %q", decodedToken)
return fmt.Errorf("object has no key %q: %w", decodedToken, ErrPointer)
}
if mv.CanAddr() && mv.Kind() != reflect.Interface && mv.Kind() != reflect.Map && mv.Kind() != reflect.Slice && mv.Kind() != reflect.Ptr {
node = mv.Addr().Interface()
@ -336,7 +335,7 @@ func (p *Pointer) set(node, data any, nameProvider *swag.NameProvider) error {
}
sLength := rValue.Len()
if tokenIndex < 0 || tokenIndex >= sLength {
return fmt.Errorf("index out of bounds array[0,%d] index '%d'", sLength, tokenIndex)
return fmt.Errorf("index out of bounds array[0,%d] index '%d': %w", sLength, tokenIndex, ErrPointer)
}
elem := rValue.Index(tokenIndex)
@ -347,7 +346,7 @@ func (p *Pointer) set(node, data any, nameProvider *swag.NameProvider) error {
node = elem.Interface()
default:
return fmt.Errorf("invalid token reference %q", decodedToken)
return fmt.Errorf("invalid token reference %q: %w", decodedToken, ErrPointer)
}
}
@ -404,10 +403,10 @@ func (p *Pointer) Offset(document string) (int64, error) {
return 0, err
}
default:
return 0, fmt.Errorf("invalid token %#v", tk)
return 0, fmt.Errorf("invalid token %#v: %w", tk, ErrPointer)
}
default:
return 0, fmt.Errorf("invalid token %#v", tk)
return 0, fmt.Errorf("invalid token %#v: %w", tk, ErrPointer)
}
}
return offset, nil
@ -437,16 +436,16 @@ func offsetSingleObject(dec *json.Decoder, decodedToken string) (int64, error) {
return offset, nil
}
default:
return 0, fmt.Errorf("invalid token %#v", tk)
return 0, fmt.Errorf("invalid token %#v: %w", tk, ErrPointer)
}
}
return 0, fmt.Errorf("token reference %q not found", decodedToken)
return 0, fmt.Errorf("token reference %q not found: %w", decodedToken, ErrPointer)
}
func offsetSingleArray(dec *json.Decoder, decodedToken string) (int64, error) {
idx, err := strconv.Atoi(decodedToken)
if err != nil {
return 0, fmt.Errorf("token reference %q is not a number: %v", decodedToken, err)
return 0, fmt.Errorf("token reference %q is not a number: %v: %w", decodedToken, err, ErrPointer)
}
var i int
for i = 0; i < idx && dec.More(); i++ {
@ -470,7 +469,7 @@ func offsetSingleArray(dec *json.Decoder, decodedToken string) (int64, error) {
}
if !dec.More() {
return 0, fmt.Errorf("token reference %q not found", decodedToken)
return 0, fmt.Errorf("token reference %q not found: %w", decodedToken, ErrPointer)
}
return dec.InputOffset(), nil
}

View file

@ -1,38 +0,0 @@
//go:build appengine
// +build appengine
package colorable
import (
"io"
"os"
_ "github.com/mattn/go-isatty"
)
// NewColorable returns new instance of Writer which handles escape sequence.
func NewColorable(file *os.File) io.Writer {
if file == nil {
panic("nil passed instead of *os.File to NewColorable()")
}
return file
}
// NewColorableStdout returns new instance of Writer which handles escape sequence for stdout.
func NewColorableStdout() io.Writer {
return os.Stdout
}
// NewColorableStderr returns new instance of Writer which handles escape sequence for stderr.
func NewColorableStderr() io.Writer {
return os.Stderr
}
// EnableColorsStdout enable colors if possible.
func EnableColorsStdout(enabled *bool) func() {
if enabled != nil {
*enabled = true
}
return func() {}
}

View file

@ -1,5 +1,5 @@
//go:build !windows && !appengine
// +build !windows,!appengine
//go:build !windows || appengine
// +build !windows appengine
package colorable

View file

@ -11,7 +11,7 @@ import (
"strconv"
"strings"
"sync"
"syscall"
syscall "golang.org/x/sys/windows"
"unsafe"
"github.com/mattn/go-isatty"
@ -73,7 +73,7 @@ type consoleCursorInfo struct {
}
var (
kernel32 = syscall.NewLazyDLL("kernel32.dll")
kernel32 = syscall.NewLazySystemDLL("kernel32.dll")
procGetConsoleScreenBufferInfo = kernel32.NewProc("GetConsoleScreenBufferInfo")
procSetConsoleTextAttribute = kernel32.NewProc("SetConsoleTextAttribute")
procSetConsoleCursorPosition = kernel32.NewProc("SetConsoleCursorPosition")
@ -87,8 +87,8 @@ var (
procCreateConsoleScreenBuffer = kernel32.NewProc("CreateConsoleScreenBuffer")
)
// Writer provides colorable Writer to the console
type Writer struct {
// writer provides colorable Writer to the console
type writer struct {
out io.Writer
handle syscall.Handle
althandle syscall.Handle
@ -98,7 +98,7 @@ type Writer struct {
mutex sync.Mutex
}
// NewColorable returns new instance of Writer which handles escape sequence from File.
// NewColorable returns new instance of writer which handles escape sequence from File.
func NewColorable(file *os.File) io.Writer {
if file == nil {
panic("nil passed instead of *os.File to NewColorable()")
@ -112,17 +112,17 @@ func NewColorable(file *os.File) io.Writer {
var csbi consoleScreenBufferInfo
handle := syscall.Handle(file.Fd())
procGetConsoleScreenBufferInfo.Call(uintptr(handle), uintptr(unsafe.Pointer(&csbi)))
return &Writer{out: file, handle: handle, oldattr: csbi.attributes, oldpos: coord{0, 0}}
return &writer{out: file, handle: handle, oldattr: csbi.attributes, oldpos: coord{0, 0}}
}
return file
}
// NewColorableStdout returns new instance of Writer which handles escape sequence for stdout.
// NewColorableStdout returns new instance of writer which handles escape sequence for stdout.
func NewColorableStdout() io.Writer {
return NewColorable(os.Stdout)
}
// NewColorableStderr returns new instance of Writer which handles escape sequence for stderr.
// NewColorableStderr returns new instance of writer which handles escape sequence for stderr.
func NewColorableStderr() io.Writer {
return NewColorable(os.Stderr)
}
@ -434,7 +434,7 @@ func atoiWithDefault(s string, def int) (int, error) {
}
// Write writes data on console
func (w *Writer) Write(data []byte) (n int, err error) {
func (w *writer) Write(data []byte) (n int, err error) {
w.mutex.Lock()
defer w.mutex.Unlock()
var csbi consoleScreenBufferInfo
@ -560,7 +560,7 @@ loop:
}
procSetConsoleCursorPosition.Call(uintptr(handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition)))
case 'E':
n, err = strconv.Atoi(buf.String())
n, err = atoiWithDefault(buf.String(), 1)
if err != nil {
continue
}
@ -569,7 +569,7 @@ loop:
csbi.cursorPosition.y += short(n)
procSetConsoleCursorPosition.Call(uintptr(handle), *(*uintptr)(unsafe.Pointer(&csbi.cursorPosition)))
case 'F':
n, err = strconv.Atoi(buf.String())
n, err = atoiWithDefault(buf.String(), 1)
if err != nil {
continue
}

View file

@ -1 +1 @@
153
156

View file

@ -1,7 +0,0 @@
package workload
// TODO: replace the Anaconda pipeline by the OS pipeline with the
// anaconda workload.
type Anaconda struct {
BaseWorkload
}

View file

@ -1,6 +0,0 @@
package workload
// TODO!
type SAP struct {
BaseWorkload
}

View file

@ -1,7 +0,0 @@
package workload
// TODO: replace the CommitServerTree pipeline by the OS pipeline with the
// StaticWebserver workload.
type StaticWebserver struct {
BaseWorkload
}

View file

@ -81,6 +81,18 @@ distros:
- "platform-python" # osbuild
- "systemd" # systemd-tmpfiles and systemd-sysusers
- "python3" # osbuild stages
conditions:
"some image types are rhel-only":
when:
not_distro_name: "rhel"
ignore_image_types:
- azure-cvm
- azure-rhui
- azure-sap-rhui
- azure-sapapps-rhui
- ec2
- ec2-sap
- ec2-ha
# rhel9 & cs9 share the same list
# of allowed profiles so a single
# allow list can be used
@ -111,6 +123,7 @@ distros:
iso_label_tmpl: "AlmaLinux-{{.Distro.MajorVersion}}-{{.Distro.MinorVersion}}-{{.Arch}}-dvd"
- &centos10
<<: *rhel10
name: centos-10
distro_like: rhel-10
product: "CentOS Stream"
@ -122,14 +135,6 @@ distros:
default_fs_type: "xfs"
defs_path: rhel-10
iso_label_tmpl: "CentOS-Stream-{{.Distro.MajorVersion}}-BaseOS-{{.Arch}}"
ignore_image_types:
- azure-cvm
- azure-rhui
- azure-sap-rhui
- azure-sapapps-rhui
- ec2
- ec2-sap
- ec2-ha
runner:
name: org.osbuild.centos10
build_packages:

View file

@ -38,6 +38,13 @@
- "rw"
- "coreos.no_persist_ip"
rpm_ostree_imgtype_common: &rpm_ostree_imgtype_common
rpm_ostree: true
supported_partitioning_modes:
- "" # empty string means default partitioning mode
- "auto-lvm"
- "lvm"
environments:
kvm: &kvm_env
packages:
@ -577,6 +584,13 @@ image_types:
- <<: *aarch64_platform
image_format: "vagrant_libvirt"
"server-vagrant-virtualbox": &server_vagrant_virtualbox
<<: *server_vagrant_libvirt
filename: "vagrant-virtualbox.box"
platforms:
- <<: *x86_64_bios_platform
image_format: "vagrant_virtualbox"
"server-qcow2": &server_qcow2
name_aliases: ["qcow2"]
filename: "disk.qcow2"
@ -747,10 +761,10 @@ image_types:
# NOTE: keep in sync with official fedora-iot definitions:
# https://pagure.io/fedora-iot/ostree/blob/main/f/fedora-iot-base.yaml
"iot-commit": &iot_commit
<<: *rpm_ostree_imgtype_common
name_aliases: ["fedora-iot-commit"]
filename: "commit.tar"
mime_type: "application/x-tar"
rpm_ostree: true
image_func: "iot_commit"
build_pipelines: ["build"]
payload_pipelines: ["os", "ostree-commit", "commit-archive"]
@ -911,7 +925,6 @@ image_types:
name_aliases: ["fedora-iot-container"]
filename: "container.tar"
mime_type: "application/x-tar"
rpm_ostree: true
image_func: "iot_container"
build_pipelines: ["build"]
payload_pipelines: ["os", "ostree-commit", "container-tree", "container"]
@ -922,12 +935,12 @@ image_types:
- *aarch64_installer_platform
"iot-raw-xz":
<<: *rpm_ostree_imgtype_common
name_aliases: ["iot-raw-image", "fedora-iot-raw-image"]
filename: "image.raw.xz"
compression: "xz"
mime_type: "application/xz"
default_size: 4_294_967_296 # 4 * datasizes.GibiByte
rpm_ostree: true
bootable: true
image_func: "iot"
ostree:
@ -1002,11 +1015,11 @@ image_types:
- *iot_base_partition_table_part_root_fstab_ro_aarch64
"iot-qcow2":
<<: *rpm_ostree_imgtype_common
name_aliases: ["iot-qcow2-image"]
filename: "image.qcow2"
mime_type: "application/x-qemu-disk"
default_size: 10_737_418_240 # 10 * datasizes.GibiByte
rpm_ostree: true
bootable: true
image_func: "iot"
ostree:
@ -1031,9 +1044,9 @@ image_types:
qcow2_compat: "1.1"
"iot-bootable-container":
<<: *rpm_ostree_imgtype_common
filename: "iot-bootable-container.tar"
mime_type: "application/x-tar"
rpm_ostree: true
image_func: "bootable_container"
build_pipelines: ["build"]
payload_pipelines: ["os", "ostree-commit", "ostree-encapsulate"]
@ -1468,10 +1481,10 @@ image_types:
- "dmidecode"
"iot-installer":
<<: *rpm_ostree_imgtype_common
name_aliases: ["fedora-iot-installer"]
filename: "installer.iso"
mime_type: "application/x-iso9660-image"
rpm_ostree: true
boot_iso: true
image_func: "iot_installer"
iso_label: "IoT"
@ -1497,6 +1510,11 @@ image_types:
version_less_than: "41"
shallow_merge:
iso_rootfs_type: "squashfs-ext4"
"x86_64 uses grub2":
when:
arch: "x86_64"
shallow_merge:
iso_boot_type: "grub2"
package_sets:
installer:
- *anaconda_pkgset
@ -1532,6 +1550,11 @@ image_types:
version_less_than: "41"
shallow_merge:
iso_rootfs_type: "squashfs-ext4"
"x86_64 uses grub2":
when:
arch: "x86_64"
shallow_merge:
iso_boot_type: "grub2"
package_sets:
installer:
- include:
@ -1628,6 +1651,11 @@ image_types:
version_less_than: "41"
shallow_merge:
iso_rootfs_type: "squashfs-ext4"
"x86_64 uses grub2":
when:
arch: "x86_64"
shallow_merge:
iso_boot_type: "grub2"
platforms:
- *x86_64_installer_platform
- *aarch64_installer_platform
@ -1807,9 +1835,9 @@ image_types:
- "fuse-libs"
"iot-simplified-installer":
<<: *rpm_ostree_imgtype_common
filename: "simplified-installer.iso"
mime_type: "application/x-iso9660-image"
rpm_ostree: true
bootable: true
boot_iso: true
default_size: 10_737_418_240 # 10 * datasizes.GibiByte

View file

@ -101,7 +101,7 @@ type DistroYAML struct {
imageConfig *distro.ImageConfig `yaml:"default"`
// ignore the given image types
IgnoreImageTypes []string `yaml:"ignore_image_types"`
Conditions map[string]distroConditions `yaml:"conditions"`
// XXX: remove this in favor of a better abstraction, this
// is currently needed because the manifest pkg has conditionals
@ -121,6 +121,18 @@ func (d *DistroYAML) ImageConfig() *distro.ImageConfig {
return d.imageConfig
}
func (d *DistroYAML) SkipImageType(imgTypeName, archName string) bool {
id := common.Must(distro.ParseID(d.Name))
for _, cond := range d.Conditions {
if cond.When.Eval(id, archName) && slices.Contains(cond.IgnoreImageTypes, imgTypeName) {
return true
}
}
return false
}
func (d *DistroYAML) runTemplates(nameVer string) error {
id, err := distro.ParseID(nameVer)
if err != nil {
@ -216,9 +228,6 @@ func NewDistroYAML(nameVer string) (*DistroYAML, error) {
if len(toplevel.ImageTypes) > 0 {
foundDistro.imageTypes = make(map[string]ImageTypeYAML, len(toplevel.ImageTypes))
for name := range toplevel.ImageTypes {
if slices.Contains(foundDistro.IgnoreImageTypes, name) {
continue
}
v := toplevel.ImageTypes[name]
v.name = name
if err := v.runTemplates(foundDistro); err != nil {
@ -252,6 +261,7 @@ type distroImageConfig struct {
// multiple whenConditions are considred AND
type whenCondition struct {
DistroName string `yaml:"distro_name,omitempty"`
NotDistroName string `yaml:"not_distro_name,omitempty"`
Architecture string `yaml:"arch,omitempty"`
VersionLessThan string `yaml:"version_less_than,omitempty"`
VersionGreaterOrEqual string `yaml:"version_greater_or_equal,omitempty"`
@ -264,6 +274,9 @@ func (wc *whenCondition) Eval(id *distro.ID, archStr string) bool {
if wc.DistroName != "" {
match = match && (wc.DistroName == id.Name)
}
if wc.NotDistroName != "" {
match = match && (wc.NotDistroName != id.Name)
}
if wc.Architecture != "" {
match = match && (wc.Architecture == archStr)
}
@ -306,6 +319,11 @@ type distroImageConfigConditions struct {
ShallowMerge *distro.ImageConfig `yaml:"shallow_merge,omitempty"`
}
type distroConditions struct {
When *whenCondition `yaml:"when"`
IgnoreImageTypes []string `yaml:"ignore_image_types"`
}
type ImageTypeYAML struct {
// This maps "pkgsKey" to their package sets. The
// map key here is a string that can either be:
@ -361,6 +379,8 @@ type ImageTypeYAML struct {
DiskImagePartTool *osbuild.PartTool `yaml:"disk_image_part_tool"`
DiskImageVPCForceSize *bool `yaml:"disk_image_vpc_force_size"`
SupportedPartitioningModes []disk.PartitioningMode `yaml:"supported_partitioning_modes"`
// name is set by the loader
name string
}

View file

@ -799,7 +799,7 @@ image_types:
- "insights-client"
- "subscription-manager-cockpit"
"vagrant-libvirt":
"vagrant-libvirt": &vagrant_libvirt
<<: *qcow2
filename: "vagrant-libvirt.box"
mime_type: "application/x-tar"
@ -813,10 +813,8 @@ image_types:
platforms:
- <<: *x86_64_bios_platform
image_format: "vagrant_libvirt"
qcow2_compat: ""
- <<: *aarch64_platform
image_format: "vagrant_libvirt"
qcow2_compat: ""
image_config:
<<: *qcow2_image_config
users:
@ -834,6 +832,13 @@ image_types:
data: |
vagrant ALL=(ALL) NOPASSWD: ALL
"vagrant-virtualbox":
<<: *vagrant_libvirt
filename: "vagrant-virtualbox.box"
platforms:
- <<: *x86_64_bios_platform
image_format: "vagrant_virtualbox"
oci:
<<: *qcow2
platforms:
@ -1525,6 +1530,12 @@ image_types:
required_partition_sizes: *default_required_dir_sizes
image_config:
iso_rootfs_type: "squashfs"
conditions:
"x86_64 uses grub2":
when:
arch: "x86_64"
shallow_merge:
iso_boot_type: "grub2"
installer_config:
additional_dracut_modules:
- "nvdimm" # non-volatile DIMM firmware (provides nfit, cuse, and nd_e820)

View file

@ -1511,8 +1511,58 @@ image_types:
- "rhui-azure-rhel8"
exclude:
- "firewalld"
# from the previous eapWorkload() workload, for simplicity
# this is now a normal packageset
- include:
- "java-1.8.0-openjdk"
- "java-1.8.0-openjdk-devel"
- "eap7-wildfly"
- "eap7-artemis-native-wildfly"
exclude:
# weak dependencies of the above eapWorkload packages
# that we don't need (and were not part of the original
# eapWorkload() package set (as it excluded weak deps)
- "graphite2"
- "libXdamage"
- "libXrandr"
- "libthai"
- "libXfixes"
- "atk"
- "fribidi"
- "jbigkit-libs"
- "hicolor-icon-theme"
- "libtiff"
- "gtk2"
- "harfbuzz"
- "libXinerama"
- "libatrie"
- "libXft"
- "pango"
- "gdk-pixbuf2-modules"
- "libXcursor"
conditions:
"rhel-8.8+ needs to exclude libjpeg-turbo as well":
when:
version_greater_or_equal: "8.8"
append:
exclude:
- "libjpeg-turbo"
"rhel-8.10 must exclude python3-{webencodings,html5lib":
when:
version_greater_or_equal: "8.10"
append:
exclude:
- "python3-webencodings"
- "python3-html5lib"
"image-installer":
image_config:
conditions:
"x86_64 uses syslinux":
when:
arch: "x86_64"
shallow_merge:
iso_boot_type: "syslinux"
package_sets:
<<: *bare_metal_pkgset
installer:
@ -1710,6 +1760,12 @@ image_types:
"edge-installer":
image_config:
iso_rootfs_type: "squashfs-ext4"
conditions:
"x86_64 uses syslinux":
when:
arch: "x86_64"
shallow_merge:
iso_boot_type: "syslinux"
package_sets:
installer:
# TODO: non-arch-specific package set handling for installers

View file

@ -1671,6 +1671,12 @@ image_types:
"image-installer":
image_config:
locale: "C.UTF-8"
conditions:
"x86_64 uses syslinux":
when:
arch: "x86_64"
shallow_merge:
iso_boot_type: "syslinux"
package_sets:
<<: *bare_metal_pkgset
installer:
@ -2144,6 +2150,12 @@ image_types:
image_config:
enabled_services: *enabled_services_edge
locale: "en_US.UTF-8"
conditions:
"x86_64 uses syslinux":
when:
arch: "x86_64"
shallow_merge:
iso_boot_type: "syslinux"
package_sets:
installer:
- *installer_pkgset
@ -2324,6 +2336,19 @@ image_types:
apply_network_config: false
datasource_list:
- "Azure"
conditions:
<<: *conditions_azure_image_config_base
"x86_64 shim package version lock":
# Lock the shim package to its installed version. This is necessary
# for UKI-based images that can become unbootable if the shim is
# upgraded to one signed by a newer certificate that does not exist
# in the system's database.
# See https://issues.redhat.com/browse/RHEL-93650
when:
arch: "x86_64"
shallow_merge:
versionlock_packages:
- "shim-x64"
package_sets:
os:
- include:

View file

@ -102,6 +102,9 @@ func newDistro(nameVer string) (distro.Distro, error) {
ar = newArchitecture(rd, pl.Arch.String())
rd.arches[pl.Arch.String()] = ar
}
if distroYAML.SkipImageType(imgTypeYAML.Name(), pl.Arch.String()) {
continue
}
it := newImageTypeFrom(rd, ar, imgTypeYAML)
if err := ar.addImageType(&pl, it); err != nil {
return nil, err

View file

@ -6,7 +6,6 @@ import (
"strings"
"github.com/osbuild/images/internal/workload"
"github.com/osbuild/images/pkg/arch"
"github.com/osbuild/images/pkg/blueprint"
"github.com/osbuild/images/pkg/container"
"github.com/osbuild/images/pkg/customizations/anaconda"
@ -155,9 +154,9 @@ func osCustomizations(t *imageType, osPackageSet rpmmd.PackageSet, options distr
osc.ChronyConfig = imageConfig.TimeSynchronization
}
// Relabel the tree, unless the `NoSElinux` flag is explicitly set to `true`
if imageConfig.NoSElinux == nil || imageConfig.NoSElinux != nil && !*imageConfig.NoSElinux {
osc.SElinux = "targeted"
// Relabel the tree, unless the `NoSELinux` flag is explicitly set to `true`
if imageConfig.NoSELinux == nil || imageConfig.NoSELinux != nil && !*imageConfig.NoSELinux {
osc.SELinux = "targeted"
osc.SELinuxForceRelabel = imageConfig.SELinuxForceRelabel
}
@ -317,6 +316,8 @@ func osCustomizations(t *imageType, osPackageSet rpmmd.PackageSet, options distr
osc.MountUnits = *imageConfig.MountUnits
}
osc.VersionlockPackages = imageConfig.VersionlockPackages
return osc, nil
}
@ -527,14 +528,15 @@ func liveInstallerImage(workload workload.Workload,
img.Filename = t.Filename()
// Enable grub2 BIOS iso on x86_64 only
if img.Platform.GetArch() == arch.ARCH_X86_64 {
img.ISOBoot = manifest.Grub2ISOBoot
}
if locale := t.getDefaultImageConfig().Locale; locale != nil {
img.Locale = *locale
}
if isoroot := t.getDefaultImageConfig().ISORootfsType; isoroot != nil {
img.RootfsType = *isoroot
}
if isoboot := t.getDefaultImageConfig().ISOBootType; isoboot != nil {
img.ISOBoot = *isoboot
}
installerConfig, err := t.getDefaultInstallerConfig()
if err != nil {
@ -548,11 +550,6 @@ func liveInstallerImage(workload workload.Workload,
}
}
imgConfig := t.getDefaultImageConfig()
if imgConfig != nil && imgConfig.IsoRootfsType != nil {
img.RootfsType = *imgConfig.IsoRootfsType
}
return img, nil
}
@ -639,14 +636,11 @@ func imageInstallerImage(workload workload.Workload,
img.Filename = t.Filename()
img.RootfsCompression = "xz" // This also triggers using the bcj filter
imgConfig := t.getDefaultImageConfig()
if imgConfig != nil && imgConfig.IsoRootfsType != nil {
img.RootfsType = *imgConfig.IsoRootfsType
if isoroot := t.getDefaultImageConfig().ISORootfsType; isoroot != nil {
img.RootfsType = *isoroot
}
// Enable grub2 BIOS iso on x86_64 only
if img.Platform.GetArch() == arch.ARCH_X86_64 {
img.ISOBoot = manifest.Grub2ISOBoot
if isoboot := t.getDefaultImageConfig().ISOBootType; isoboot != nil {
img.ISOBoot = *isoboot
}
return img, nil
@ -838,19 +832,15 @@ func iotInstallerImage(workload workload.Workload,
img.Filename = t.Filename()
img.RootfsCompression = "xz" // This also triggers using the bcj filter
imgConfig := t.getDefaultImageConfig()
if imgConfig != nil && imgConfig.IsoRootfsType != nil {
img.RootfsType = *imgConfig.IsoRootfsType
}
// Enable grub2 BIOS iso on x86_64 only
if img.Platform.GetArch() == arch.ARCH_X86_64 {
img.ISOBoot = manifest.Grub2ISOBoot
}
if locale := t.getDefaultImageConfig().Locale; locale != nil {
img.Locale = *locale
}
if isoroot := t.getDefaultImageConfig().ISORootfsType; isoroot != nil {
img.RootfsType = *isoroot
}
if isoboot := t.getDefaultImageConfig().ISOBootType; isoboot != nil {
img.ISOBoot = *isoboot
}
return img, nil
}

View file

@ -159,19 +159,8 @@ func (t *imageType) getPartitionTable(customizations *blueprint.Customizations,
return disk.NewCustomPartitionTable(partitioning, partOptions, rng)
}
partitioningMode := options.PartitioningMode
if t.ImageTypeYAML.RPMOSTree {
// IoT supports only LVM, force it.
// Raw is not supported, return an error if it is requested
// TODO Need a central location for logic like this
if partitioningMode == disk.RawPartitioningMode {
return nil, fmt.Errorf("partitioning mode raw not supported for %s on %s", t.Name(), t.arch.Name())
}
partitioningMode = disk.AutoLVMPartitioningMode
}
mountpoints := customizations.GetFilesystems()
return disk.NewPartitionTable(basePartitionTable, mountpoints, imageSize, partitioningMode, t.platform.GetArch(), t.ImageTypeYAML.RequiredPartitionSizes, rng)
return disk.NewPartitionTable(basePartitionTable, mountpoints, imageSize, options.PartitioningMode, t.platform.GetArch(), t.ImageTypeYAML.RequiredPartitionSizes, rng)
}
func (t *imageType) getDefaultImageConfig() *distro.ImageConfig {
@ -332,6 +321,10 @@ func (t *imageType) checkOptions(bp *blueprint.Blueprint, options distro.ImageOp
return warnings, fmt.Errorf("OSTree is not supported for %q", t.Name())
}
if len(t.ImageTypeYAML.SupportedPartitioningModes) > 0 && !slices.Contains(t.ImageTypeYAML.SupportedPartitioningModes, options.PartitioningMode) {
return warnings, fmt.Errorf("partitioning mode %s not supported for %q on %q", options.PartitioningMode, t.Name(), t.arch.distro.Name())
}
// we do not support embedding containers on ostree-derived images, only on commits themselves
if len(bp.Containers) > 0 && t.ImageTypeYAML.RPMOSTree && (t.Name() != "iot-commit" && t.Name() != "iot-container") {
return warnings, fmt.Errorf("embedding containers is not supported for %s on %s", t.Name(), t.arch.distro.Name())

View file

@ -46,7 +46,7 @@ type ImageConfig struct {
GPGKeyFiles []string `yaml:"gpgkey_files,omitempty"`
// Disable SELinux labelling
NoSElinux *bool `yaml:"no_selinux,omitempty"`
NoSELinux *bool `yaml:"no_selinux,omitempty"`
// Do not use. Forces auto-relabelling on first boot.
// See https://github.com/osbuild/osbuild/commit/52cb27631b587c1df177cd17625c5b473e1e85d2
@ -135,9 +135,18 @@ type ImageConfig struct {
// instead of writing to /etc/fstab
MountUnits *bool `yaml:"mount_units,omitempty"`
// IsoRootfsType defines what rootfs (squashfs, erofs,ext4)
// ISORootfsType defines what rootfs (squashfs, erofs,ext4)
// is used
IsoRootfsType *manifest.RootfsType `yaml:"iso_rootfs_type,omitempty"`
ISORootfsType *manifest.RootfsType `yaml:"iso_rootfs_type,omitempty"`
// ISOBootType defines what type of bootloader is used for the iso
ISOBootType *manifest.ISOBootType `yaml:"iso_boot_type,omitempty"`
// VersionlockPackges uses dnf versionlock to lock a package to the version
// that is installed during image build, preventing it from being updated.
// This is only supported for distributions that use dnf4, because osbuild
// only has a stage for dnf4 version locking.
VersionlockPackages []string `yaml:"versionlock_packages,omitempty"`
}
// shallowMerge creates a new struct by merging a child and a parent.

View file

@ -5,7 +5,6 @@ import (
"math/rand"
"github.com/osbuild/images/internal/workload"
"github.com/osbuild/images/pkg/arch"
"github.com/osbuild/images/pkg/blueprint"
"github.com/osbuild/images/pkg/container"
"github.com/osbuild/images/pkg/customizations/anaconda"
@ -154,9 +153,9 @@ func osCustomizations(
osc.ChronyConfig = imageConfig.TimeSynchronization
}
// Relabel the tree, unless the `NoSElinux` flag is explicitly set to `true`
if imageConfig.NoSElinux == nil || imageConfig.NoSElinux != nil && !*imageConfig.NoSElinux {
osc.SElinux = "targeted"
// Relabel the tree, unless the `NoSELinux` flag is explicitly set to `true`
if imageConfig.NoSELinux == nil || imageConfig.NoSELinux != nil && !*imageConfig.NoSELinux {
osc.SELinux = "targeted"
osc.SELinuxForceRelabel = imageConfig.SELinuxForceRelabel
}
@ -312,6 +311,8 @@ func osCustomizations(
osc.MountUnits = *imageConfig.MountUnits
}
osc.VersionlockPackages = imageConfig.VersionlockPackages
return osc, nil
}
@ -537,15 +538,11 @@ func EdgeInstallerImage(workload workload.Workload,
img.RootfsType = manifest.SquashfsRootfs
}
// Enable BIOS iso on x86_64 only
// Use grub2 on RHEL10, otherwise use syslinux
// NOTE: Will need to be updated for RHEL11 and later
if img.Platform.GetArch() == arch.ARCH_X86_64 {
if t.Arch().Distro().Releasever() == "10" {
img.ISOBoot = manifest.Grub2ISOBoot
} else {
img.ISOBoot = manifest.SyslinuxISOBoot
}
if locale := t.getDefaultImageConfig().Locale; locale != nil {
img.Locale = *locale
}
if isoboot := t.getDefaultImageConfig().ISOBootType; isoboot != nil {
img.ISOBoot = *isoboot
}
installerConfig, err := t.getDefaultInstallerConfig()
@ -585,10 +582,6 @@ func EdgeInstallerImage(workload workload.Workload,
img.Filename = t.Filename()
if locale := t.getDefaultImageConfig().Locale; locale != nil {
img.Locale = *locale
}
return img, nil
}
@ -774,15 +767,8 @@ func ImageInstallerImage(workload workload.Workload,
img.RootfsType = manifest.SquashfsRootfs
}
// Enable BIOS iso on x86_64 only
// Use grub2 on RHEL10, otherwise use syslinux
// NOTE: Will need to be updated for RHEL11 and later
if img.Platform.GetArch() == arch.ARCH_X86_64 {
if t.Arch().Distro().Releasever() == "10" {
img.ISOBoot = manifest.Grub2ISOBoot
} else {
img.ISOBoot = manifest.SyslinuxISOBoot
}
if isoboot := t.getDefaultImageConfig().ISOBootType; isoboot != nil {
img.ISOBoot = *isoboot
}
// put the kickstart file in the root of the iso

View file

@ -106,7 +106,6 @@ func mkAzureEap7RhuiImgType(rd *rhel.Distribution, a arch.Arch) *rhel.ImageType
it.Bootable = true
it.DefaultSize = 64 * datasizes.GibiByte
it.BasePartitionTables = partitionTables
it.Workload = eapWorkload()
return it
}

View file

@ -1,11 +1,12 @@
package rhel8
import (
"github.com/osbuild/images/pkg/arch"
"github.com/osbuild/images/pkg/distro"
"github.com/osbuild/images/pkg/distro/rhel"
)
func mkImageInstaller() *rhel.ImageType {
func mkImageInstaller(rd *rhel.Distribution, a arch.Arch) *rhel.ImageType {
it := rhel.NewImageType(
"image-installer",
"installer.iso",
@ -21,6 +22,7 @@ func mkImageInstaller() *rhel.ImageType {
it.Bootable = true
it.ISOLabelFn = distroISOLabelFunc
it.DefaultImageConfig = imageConfig(rd, a.String(), "image-installer")
it.DefaultInstallerConfig = &distro.InstallerConfig{
AdditionalDracutModules: []string{
"ifcfg",

View file

@ -141,7 +141,7 @@ func newDistro(name string, minor int) *rhel.Distribution {
mkEdgeOCIImgType(rd, arch.ARCH_X86_64),
mkEdgeCommitImgType(rd, arch.ARCH_X86_64),
mkEdgeInstallerImgType(rd, arch.ARCH_X86_64),
mkImageInstaller(),
mkImageInstaller(rd, arch.ARCH_X86_64),
)
gceX86Platform := &platform.X86{
@ -202,7 +202,7 @@ func newDistro(name string, minor int) *rhel.Distribution {
ImageFormat: platform.FORMAT_QCOW2,
},
},
mkOpenstackImgType(rd, arch.ARCH_X86_64),
mkOpenstackImgType(rd, arch.ARCH_AARCH64),
)
aarch64.AddImageTypes(
@ -218,10 +218,10 @@ func newDistro(name string, minor int) *rhel.Distribution {
aarch64.AddImageTypes(
bareMetalAarch64Platform,
mkEdgeOCIImgType(rd, arch.ARCH_X86_64),
mkEdgeCommitImgType(rd, arch.ARCH_X86_64),
mkEdgeInstallerImgType(rd, arch.ARCH_X86_64),
mkImageInstaller(),
mkEdgeOCIImgType(rd, arch.ARCH_AARCH64),
mkEdgeCommitImgType(rd, arch.ARCH_AARCH64),
mkEdgeInstallerImgType(rd, arch.ARCH_AARCH64),
mkImageInstaller(rd, arch.ARCH_AARCH64),
)
rawAarch64Platform := &platform.Aarch64{
@ -234,7 +234,7 @@ func newDistro(name string, minor int) *rhel.Distribution {
aarch64.AddImageTypes(
rawAarch64Platform,
mkAmiImgTypeAarch64(rd),
mkMinimalRawImgType(rd, arch.ARCH_X86_64),
mkMinimalRawImgType(rd, arch.ARCH_AARCH64),
)
ppc64le.AddImageTypes(

View file

@ -1,26 +0,0 @@
package rhel8
import "github.com/osbuild/images/internal/workload"
// rhel8Workload is a RHEL-8-specific implementation of the workload interface
// for internal workload variants.
type rhel8Workload struct {
workload.BaseWorkload
packages []string
}
func (w rhel8Workload) GetPackages() []string {
return w.packages
}
func eapWorkload() workload.Workload {
w := rhel8Workload{}
w.packages = []string{
"java-1.8.0-openjdk",
"java-1.8.0-openjdk-devel",
"eap7-wildfly",
"eap7-artemis-native-wildfly",
}
return &w
}

View file

@ -77,8 +77,8 @@ func (img *AnacondaLiveInstaller) InstantiateManifest(m *manifest.Manifest,
livePipeline.Biosdevname = (img.Platform.GetArch() == arch.ARCH_X86_64)
livePipeline.Locale = img.Locale
// The live installer has SElinux enabled and targeted
livePipeline.SElinux = "targeted"
// The live installer has SELinux enabled and targeted
livePipeline.SELinux = "targeted"
livePipeline.Checkpoint()

View file

@ -6,7 +6,6 @@ import (
"github.com/osbuild/images/pkg/container"
"github.com/osbuild/images/pkg/customizations/fsnode"
"github.com/osbuild/images/pkg/customizations/users"
"github.com/osbuild/images/pkg/disk"
"github.com/osbuild/images/pkg/manifest"
"github.com/osbuild/images/pkg/osbuild"
@ -26,21 +25,7 @@ type BootcDiskImage struct {
BuildContainerSource *container.SourceSpec
// Customizations
KernelOptionsAppend []string
// The users to put into the image, note that /etc/paswd (and friends)
// will become unmanaged state by bootc when used
Users []users.User
Groups []users.Group
// Custom directories and files to create in the image
Directories []*fsnode.Directory
Files []*fsnode.File
// SELinux policy, when set it enables the labeling of the tree with the
// selected profile
SELinux string
BuildSELinux string
OSCustomizations manifest.OSCustomizations
}
func NewBootcDiskImage(container container.SourceSpec, buildContainer container.SourceSpec) *BootcDiskImage {
@ -56,9 +41,9 @@ func (img *BootcDiskImage) InstantiateManifestFromContainers(m *manifest.Manifes
runner runner.Runner,
rng *rand.Rand) error {
policy := img.SELinux
if img.BuildSELinux != "" {
policy = img.BuildSELinux
policy := img.OSCustomizations.SELinux
if img.OSCustomizations.BuildSELinux != "" {
policy = img.OSCustomizations.BuildSELinux
}
var copyFilesFrom map[string][]string
@ -116,12 +101,12 @@ func (img *BootcDiskImage) InstantiateManifestFromContainers(m *manifest.Manifes
rawImage := manifest.NewRawBootcImage(buildPipeline, containers, img.Platform)
rawImage.PartitionTable = img.PartitionTable
rawImage.Users = img.Users
rawImage.Groups = img.Groups
rawImage.Files = img.Files
rawImage.Directories = img.Directories
rawImage.KernelOptionsAppend = img.KernelOptionsAppend
rawImage.SELinux = img.SELinux
rawImage.Users = img.OSCustomizations.Users
rawImage.Groups = img.OSCustomizations.Groups
rawImage.Files = img.OSCustomizations.Files
rawImage.Directories = img.OSCustomizations.Directories
rawImage.KernelOptionsAppend = img.OSCustomizations.KernelOptionsAppend
rawImage.SELinux = img.OSCustomizations.SELinux
rawImage.MountUnits = true // always use mount units for bootc disk images
// In BIB, we export multiple images from the same pipeline so we use the

View file

@ -44,9 +44,9 @@ func (img *BootcLegacyDiskImage) InstantiateManifestFromContainers(m *manifest.M
}
ostreeImg.Platform = img.bootcImg.Platform
ostreeImg.PartitionTable = img.bootcImg.PartitionTable
ostreeImg.OSTreeDeploymentCustomizations.KernelOptionsAppend = img.bootcImg.KernelOptionsAppend
ostreeImg.OSTreeDeploymentCustomizations.Users = img.bootcImg.Users
ostreeImg.OSTreeDeploymentCustomizations.Groups = img.bootcImg.Groups
ostreeImg.OSTreeDeploymentCustomizations.KernelOptionsAppend = img.bootcImg.OSCustomizations.KernelOptionsAppend
ostreeImg.OSTreeDeploymentCustomizations.Users = img.bootcImg.OSCustomizations.Users
ostreeImg.OSTreeDeploymentCustomizations.Groups = img.bootcImg.OSCustomizations.Groups
buildPipeline := manifest.NewBuildFromContainer(m, runner, containers, &manifest.BuildOptions{ContainerBuildable: true})
buildPipeline.Checkpoint()

View file

@ -76,11 +76,22 @@ func (img *DiskImage) InstantiateManifest(m *manifest.Manifest,
qcow2Pipeline := manifest.NewQCOW2(buildPipeline, rawImagePipeline)
qcow2Pipeline.Compat = img.Platform.GetQCOW2Compat()
vagrantPipeline := manifest.NewVagrant(buildPipeline, qcow2Pipeline)
vagrantPipeline := manifest.NewVagrant(buildPipeline, qcow2Pipeline, osbuild.VagrantProviderLibvirt, rng)
tarPipeline := manifest.NewTar(buildPipeline, vagrantPipeline, "archive")
tarPipeline.Format = osbuild.TarArchiveFormatUstar
imagePipeline = tarPipeline
case platform.FORMAT_VAGRANT_VIRTUALBOX:
vmdkPipeline := manifest.NewVMDK(buildPipeline, rawImagePipeline)
vmdkPipeline.SetFilename("box.vmdk")
vagrantPipeline := manifest.NewVagrant(buildPipeline, vmdkPipeline, osbuild.VagrantProviderVirtualBox, rng)
tarPipeline := manifest.NewTar(buildPipeline, vagrantPipeline, "archive")
tarPipeline.Format = osbuild.TarArchiveFormatUstar
tarPipeline.SetFilename(img.Filename)
imagePipeline = tarPipeline
case platform.FORMAT_VHD:
vpcPipeline := manifest.NewVPC(buildPipeline, rawImagePipeline)

View file

@ -86,7 +86,7 @@ type AnacondaInstaller struct {
// SELinux policy, when set it enables the labeling of the installer
// tree with the selected profile and selects the required package
// for depsolving
SElinux string
SELinux string
// Locale for the installer. This should be set to the same locale as the
// ISO OS payload, if known.
@ -167,8 +167,8 @@ func (p *AnacondaInstaller) getBuildPackages(Distro) []string {
)
}
if p.SElinux != "" {
packages = append(packages, "policycoreutils", fmt.Sprintf("selinux-policy-%s", p.SElinux))
if p.SELinux != "" {
packages = append(packages, "policycoreutils", fmt.Sprintf("selinux-policy-%s", p.SELinux))
}
return packages
@ -183,8 +183,8 @@ func (p *AnacondaInstaller) getPackageSetChain(Distro) []rpmmd.PackageSet {
packages = append(packages, "biosdevname")
}
if p.SElinux != "" {
packages = append(packages, fmt.Sprintf("selinux-policy-%s", p.SElinux))
if p.SELinux != "" {
packages = append(packages, fmt.Sprintf("selinux-policy-%s", p.SELinux))
}
return []rpmmd.PackageSet{
@ -192,7 +192,7 @@ func (p *AnacondaInstaller) getPackageSetChain(Distro) []rpmmd.PackageSet {
Include: append(packages, p.ExtraPackages...),
Exclude: p.ExcludePackages,
Repositories: append(p.repos, p.ExtraRepos...),
InstallWeakDeps: p.Type == AnacondaInstallerTypeLive,
InstallWeakDeps: true,
},
}
}
@ -328,10 +328,10 @@ func (p *AnacondaInstaller) payloadStages() []*osbuild.Stage {
stages = append(stages, osbuild.NewSELinuxConfigStage(&osbuild.SELinuxConfigStageOptions{State: osbuild.SELinuxStatePermissive}))
// SElinux is not supported on the non-live-installers (see the previous
// SELinux is not supported on the non-live-installers (see the previous
// stage setting SELinux to permissive. It's an error to set it to anything
// that isn't an empty string
if p.SElinux != "" {
if p.SELinux != "" {
panic("payload installers do not support SELinux policies")
}
@ -400,9 +400,9 @@ func (p *AnacondaInstaller) liveStages() []*osbuild.Stage {
dracutOptions := p.dracutStageOptions()
stages = append(stages, osbuild.NewDracutStage(dracutOptions))
if p.SElinux != "" {
if p.SELinux != "" {
stages = append(stages, osbuild.NewSELinuxStage(&osbuild.SELinuxStageOptions{
FileContexts: fmt.Sprintf("etc/selinux/%s/contexts/files/file_contexts", p.SElinux),
FileContexts: fmt.Sprintf("etc/selinux/%s/contexts/files/file_contexts", p.SELinux),
}))
}

View file

@ -58,6 +58,29 @@ const ( // ISOBoot type enum
Grub2ISOBoot // Boot with grub2 UEFI and grub2 BIOS
)
func (r *ISOBootType) UnmarshalJSON(data []byte) error {
var s string
if err := json.Unmarshal(data, &s); err != nil {
return err
}
switch s {
case "grub2-uefi", "":
*r = Grub2UEFIOnlyISOBoot
case "syslinux":
*r = SyslinuxISOBoot
case "grub2":
*r = Grub2ISOBoot
default:
return fmt.Errorf("unknown ISOBootType: %q", s)
}
return nil
}
func (r *ISOBootType) UnmarshalYAML(unmarshal func(any) error) error {
return common.UnmarshalYAMLviaJSON(r, unmarshal)
}
// An AnacondaInstallerISOTree represents a tree containing the anaconda installer,
// configuration in terms of a kickstart file, as well as an embedded
// payload to be installed, this payload can either be an ostree

View file

@ -85,9 +85,12 @@ type OSCustomizations struct {
MaskedServices []string
DefaultTarget string
// SELinux policy, when set it enables the labeling of the tree with the
// selected profile
SElinux string
// SELinux policy, when set it enables the labeling of the
// tree with the selected profile
SELinux string
// BuildSELinux policy, when set it enables the labeling of
// the *build tree* with the selected profile
BuildSELinux string
SELinuxForceRelabel *bool
@ -169,6 +172,12 @@ type OSCustomizations struct {
// MountUnits creates systemd .mount units to describe the filesystem
// instead of writing to /etc/fstab
MountUnits bool
// VersionlockPackges uses dnf versionlock to lock a package to the version
// that is installed during image build, preventing it from being updated.
// This is only supported for distributions that use dnf4, because osbuild
// only has a stage for dnf4 version locking.
VersionlockPackages []string
}
// OS represents the filesystem tree of the target image. This roughly
@ -253,8 +262,8 @@ func (p *OS) getPackageSetChain(Distro) []rpmmd.PackageSet {
customizationPackages = append(customizationPackages, "chrony")
}
if p.OSCustomizations.SElinux != "" {
customizationPackages = append(customizationPackages, fmt.Sprintf("selinux-policy-%s", p.OSCustomizations.SElinux))
if p.OSCustomizations.SELinux != "" {
customizationPackages = append(customizationPackages, fmt.Sprintf("selinux-policy-%s", p.OSCustomizations.SELinux))
}
if p.OSCustomizations.OpenSCAPRemediationConfig != nil {
@ -290,6 +299,11 @@ func (p *OS) getPackageSetChain(Distro) []rpmmd.PackageSet {
customizationPackages = append(customizationPackages, "firewalld")
}
if len(p.OSCustomizations.VersionlockPackages) > 0 {
// versionlocking packages requires dnf and the dnf plugin
customizationPackages = append(customizationPackages, "dnf", "python3-dnf-plugin-versionlock")
}
osRepos := append(p.repos, p.OSCustomizations.ExtraBaseRepos...)
// merge all package lists for the pipeline
@ -372,8 +386,8 @@ func (p *OS) getBuildPackages(distro Distro) []string {
if p.OSTreeRef != "" {
packages = append(packages, "rpm-ostree")
}
if p.OSCustomizations.SElinux != "" {
packages = append(packages, "policycoreutils", fmt.Sprintf("selinux-policy-%s", p.OSCustomizations.SElinux))
if p.OSCustomizations.SELinux != "" {
packages = append(packages, "policycoreutils", fmt.Sprintf("selinux-policy-%s", p.OSCustomizations.SELinux))
}
if len(p.OSCustomizations.CloudInit) > 0 {
switch distro {
@ -906,15 +920,23 @@ func (p *OS) serialize() osbuild.Pipeline {
pipeline.AddStage(osbuild.NewUpdateCATrustStage())
}
if len(p.OSCustomizations.VersionlockPackages) > 0 {
versionlockStageOptions, err := osbuild.GenDNF4VersionlockStageOptions(p.OSCustomizations.VersionlockPackages, p.packageSpecs)
if err != nil {
panic(err)
}
pipeline.AddStage(osbuild.NewDNF4VersionlockStage(versionlockStageOptions))
}
if p.OSCustomizations.MachineIdUninitialized {
pipeline.AddStage(osbuild.NewMachineIdStage(&osbuild.MachineIdStageOptions{
FirstBoot: osbuild.MachineIdFirstBootYes,
}))
}
if p.OSCustomizations.SElinux != "" {
if p.OSCustomizations.SELinux != "" {
pipeline.AddStage(osbuild.NewSELinuxStage(&osbuild.SELinuxStageOptions{
FileContexts: fmt.Sprintf("etc/selinux/%s/contexts/files/file_contexts", p.OSCustomizations.SElinux),
FileContexts: fmt.Sprintf("etc/selinux/%s/contexts/files/file_contexts", p.OSCustomizations.SELinux),
ForceAutorelabel: p.OSCustomizations.SELinuxForceRelabel,
}))
}
@ -1111,21 +1133,13 @@ func findESPMountpoint(pt *disk.PartitionTable) (string, error) {
//
// [1] https://gitlab.com/kraxel/virt-firmware/-/commit/ca385db4f74a4d542455b9d40c91c8448c7be90c
func maybeAddHMACandDirStage(packages []rpmmd.PackageSpec, espMountpoint, kernelVer string) ([]*osbuild.Stage, error) {
ukiDirectVer, err := rpmmd.GetVerStrFromPackageSpecList(packages, "uki-direct")
ukiDirect, err := rpmmd.GetPackage(packages, "uki-direct")
if err != nil {
// the uki-direct package isn't in the list: no override necessary
return nil, nil
}
// The GetVerStrFromPackageSpecList function returns
// <version>-<release>.<arch>. For the real package version, this doesn't
// appear to cause any issues with the version parser used by
// VersionLessThan. If a mock depsolver is used this can cause issues
// (Malformed version: 0-8.fk1.x86_64). Make sure we only use the <version>
// component to avoid issues.
ukiDirectVer = strings.SplitN(ukiDirectVer, "-", 2)[0]
if common.VersionLessThan(ukiDirectVer, "25.3") {
if common.VersionLessThan(ukiDirect.Version, "25.3") {
// generate hmac file using stage
kernelFilename := fmt.Sprintf("ffffffffffffffffffffffffffffffff-%s.efi", kernelVer)
kernelPath := filepath.Join(espMountpoint, "EFI", "Linux", kernelFilename)

View file

@ -1,17 +1,35 @@
package manifest
import (
"fmt"
"math/rand"
"github.com/osbuild/images/pkg/artifact"
"github.com/osbuild/images/pkg/osbuild"
)
type Vagrant struct {
Base
filename string
filename string
provider osbuild.VagrantProvider
macAddress string
imgPipeline FilePipeline
}
// Create a randomized mac address for each build, but generated with a potentially seeded
// PRNG.
// See: https://github.com/mirror/vbox/blob/b9657cd5351cf17432b664009cc25bb480dc64c1/src/VBox/Main/src-server/HostImpl.cpp#L3258-L3269
// for where this implementation comes from.
func virtualboxMacAddress(prng *rand.Rand) string {
manafacturer := "080027"
serial := make([]byte, 3)
prng.Read(serial)
return fmt.Sprintf("%s%x", manafacturer, serial)
}
func (p Vagrant) Filename() string {
return p.filename
}
@ -20,11 +38,16 @@ func (p *Vagrant) SetFilename(filename string) {
p.filename = filename
}
func NewVagrant(buildPipeline Build, imgPipeline FilePipeline) *Vagrant {
func NewVagrant(buildPipeline Build, imgPipeline FilePipeline, provider osbuild.VagrantProvider, prng *rand.Rand) *Vagrant {
p := &Vagrant{
Base: NewBase("vagrant", buildPipeline),
imgPipeline: imgPipeline,
filename: "image.box",
provider: provider,
// macAddress is only required when the provider is virtualbox, we set it always so we don't have to
// complicate flow in serialize
macAddress: virtualboxMacAddress(prng),
}
if buildPipeline != nil {
@ -39,8 +62,42 @@ func NewVagrant(buildPipeline Build, imgPipeline FilePipeline) *Vagrant {
func (p *Vagrant) serialize() osbuild.Pipeline {
pipeline := p.Base.serialize()
vagrantOptions := osbuild.NewVagrantStageOptions(p.provider)
// For the VirtualBox provider we need to inject the ovf stage as well
if p.provider == osbuild.VagrantProviderVirtualBox {
// TODO: find a way to avoid copying (by having the OVF stage take inputs?) as this can be
// slow and increase disk usage
inputName := "vmdk-tree"
pipeline.AddStage(osbuild.NewCopyStageSimple(
&osbuild.CopyStageOptions{
Paths: []osbuild.CopyStagePath{
{
From: fmt.Sprintf("input://%s/%s", inputName, p.imgPipeline.Export().Filename()),
To: "tree:///",
},
},
},
osbuild.NewPipelineTreeInputs(inputName, p.imgPipeline.Name()),
))
vagrantOptions.SyncedFolders = map[string]*osbuild.VagrantSyncedFolderStageOptions{
"/vagrant": &osbuild.VagrantSyncedFolderStageOptions{
Type: osbuild.VagrantSyncedFolderTypeRsync,
},
}
vagrantOptions.VirtualBox = &osbuild.VagrantVirtualBoxStageOptions{
MacAddress: p.macAddress,
}
pipeline.AddStage(osbuild.NewOVFStage(&osbuild.OVFStageOptions{
Vmdk: p.imgPipeline.Filename(),
}))
}
pipeline.AddStage(osbuild.NewVagrantStage(
osbuild.NewVagrantStageOptions(osbuild.VagrantProviderLibvirt),
vagrantOptions,
osbuild.NewVagrantStagePipelineFilesInputs(p.imgPipeline.Name(), p.imgPipeline.Filename()),
))

View file

@ -44,7 +44,7 @@ func defaultModuleStates() map[string]bool {
anaconda.ModuleLocalization: false,
anaconda.ModuleNetwork: true,
anaconda.ModulePayloads: true,
anaconda.ModuleRuntime: false,
anaconda.ModuleRuntime: true,
anaconda.ModuleSecurity: false,
anaconda.ModuleServices: false,
anaconda.ModuleStorage: true,

View file

@ -0,0 +1,70 @@
package osbuild
import (
"fmt"
"github.com/osbuild/images/internal/common"
"github.com/osbuild/images/pkg/rpmmd"
)
const dnf4VersionlockType = "org.osbuild.dnf4.versionlock"
type DNF4VersionlockOptions struct {
Add []string `json:"add"`
}
func (*DNF4VersionlockOptions) isStageOptions() {}
func (o *DNF4VersionlockOptions) validate() error {
if len(o.Add) == 0 {
return fmt.Errorf("%s: at least one package must be included in the 'add' list", dnf4VersionlockType)
}
return nil
}
func NewDNF4VersionlockStage(options *DNF4VersionlockOptions) *Stage {
if err := options.validate(); err != nil {
panic(err)
}
return &Stage{
Type: dnf4VersionlockType,
Options: options,
}
}
// GenDNF4VersionlockStageOptions creates DNF4VersionlockOptions for the provided
// packages at the specific EVR that is contained in the package spec list.
// Returns an error if:
// - Any of the package names does not appear in the package specs.
// - dnf4 is not in the package specs: we only support the feature in dnf4 for now.
// - The python3-dnf-plugin-versionlock package is not in the package specs:
// the plugin is required for the lock to be effective.
func GenDNF4VersionlockStageOptions(lockPackageNames []string, packageSpecs []rpmmd.PackageSpec) (*DNF4VersionlockOptions, error) {
// check that dnf4 and the plugin are included in the package specs
dnf, err := rpmmd.GetPackage(packageSpecs, "dnf")
if err != nil {
return nil, fmt.Errorf("%s: dnf version locking enabled for an image that does not contain dnf: %w", dnf4VersionlockType, err)
}
if common.VersionGreaterThanOrEqual(dnf.Version, "5") {
return nil, fmt.Errorf("%s: dnf version locking enabled for an image that includes dnf version %s: the feature requires dnf4", dnf4VersionlockType, dnf.Version)
}
if _, err := rpmmd.GetPackage(packageSpecs, "python3-dnf-plugin-versionlock"); err != nil {
return nil, fmt.Errorf("%s: dnf version locking enabled for an image that does not contain the versionlock plugin: %w", dnf4VersionlockType, err)
}
pkgNEVRs := make([]string, len(lockPackageNames))
for idx, pkgName := range lockPackageNames {
pkg, err := rpmmd.GetPackage(packageSpecs, pkgName)
if err != nil {
return nil, fmt.Errorf("%s: package %q not found in package list", dnf4VersionlockType, pkgName)
}
nevr := fmt.Sprintf("%s-%d:%s-%s", pkg.Name, pkg.Epoch, pkg.Version, pkg.Release)
pkgNEVRs[idx] = nevr
}
return &DNF4VersionlockOptions{
Add: pkgNEVRs,
}, nil
}

View file

@ -8,7 +8,17 @@ import (
const vmdkRegex = "^[a-zA-Z0-9+_.-]*$"
type OVFStageOptions struct {
Vmdk string `json:"vmdk"`
Vmdk string `json:"vmdk"`
VMWare *OVFVMWareStageOptions `json:"vmware,omitempty"`
VirtualBox *OVFVirtualBoxStageOptions `json:"virtualbox,omitempty"`
}
type OVFVMWareStageOptions struct {
OSType string `json:"os_type,omitempty"`
}
type OVFVirtualBoxStageOptions struct {
MacAddress string `json:"mac_address"`
}
func (OVFStageOptions) isStageOptions() {}

View file

@ -7,11 +7,28 @@ import (
type VagrantProvider string
const (
VagrantProviderLibvirt VagrantProvider = "libvirt"
VagrantProviderLibvirt VagrantProvider = "libvirt"
VagrantProviderVirtualBox VagrantProvider = "virtualbox"
)
type VagrantSyncedFolderType string
const (
VagrantSyncedFolderTypeRsync = "rsync"
)
type VagrantVirtualBoxStageOptions struct {
MacAddress string `json:"mac_address"`
}
type VagrantSyncedFolderStageOptions struct {
Type VagrantSyncedFolderType `json:"type"`
}
type VagrantStageOptions struct {
Provider VagrantProvider `json:"provider"`
Provider VagrantProvider `json:"provider"`
VirtualBox *VagrantVirtualBoxStageOptions `json:"virtualbox,omitempty"`
SyncedFolders map[string]*VagrantSyncedFolderStageOptions `json:"synced_folders,omitempty"`
}
func (VagrantStageOptions) isStageOptions() {}
@ -41,10 +58,14 @@ func NewVagrantStageOptions(provider VagrantProvider) *VagrantStageOptions {
}
func (o *VagrantStageOptions) validate() error {
if o.Provider != VagrantProviderLibvirt {
if o.Provider != VagrantProviderLibvirt && o.Provider != VagrantProviderVirtualBox {
return fmt.Errorf("unknown provider in vagrant stage options %s", o.Provider)
}
if o.Provider != VagrantProviderVirtualBox && len(o.SyncedFolders) > 0 {
return fmt.Errorf("syncedfolders are only available for the virtualbox provider not for %q", o.Provider)
}
return nil
}

View file

@ -21,6 +21,7 @@ const ( // image format enum
FORMAT_GCE
FORMAT_OVA
FORMAT_VAGRANT_LIBVIRT
FORMAT_VAGRANT_VIRTUALBOX
)
type Bootloader int
@ -81,6 +82,8 @@ func (f ImageFormat) String() string {
return "ova"
case FORMAT_VAGRANT_LIBVIRT:
return "vagrant_libvirt"
case FORMAT_VAGRANT_VIRTUALBOX:
return "vagrant_virtualbox"
default:
panic(fmt.Errorf("unknown image format %d", f))
}
@ -110,6 +113,8 @@ func (f *ImageFormat) UnmarshalJSON(data []byte) error {
*f = FORMAT_OVA
case "vagrant_libvirt":
*f = FORMAT_VAGRANT_LIBVIRT
case "vagrant_virtualbox":
*f = FORMAT_VAGRANT_VIRTUALBOX
default:
panic(fmt.Errorf("unknown image format %q", s))
}

View file

@ -236,13 +236,23 @@ func (ps *PackageSpec) GetNEVRA() string {
return fmt.Sprintf("%s-%s", ps.Name, ps.GetEVRA())
}
func GetVerStrFromPackageSpecList(pkgs []PackageSpec, packageName string) (string, error) {
func GetPackage(pkgs []PackageSpec, packageName string) (PackageSpec, error) {
for _, pkg := range pkgs {
if pkg.Name == packageName {
return fmt.Sprintf("%s-%s.%s", pkg.Version, pkg.Release, pkg.Arch), nil
return pkg, nil
}
}
return "", fmt.Errorf("package %q not found in the PackageSpec list", packageName)
return PackageSpec{}, fmt.Errorf("package %q not found in the PackageSpec list", packageName)
}
func GetVerStrFromPackageSpecList(pkgs []PackageSpec, packageName string) (string, error) {
pkg, err := GetPackage(pkgs, packageName)
if err != nil {
return "", err
}
return pkg.GetEVRA(), nil
}
func GetVerStrFromPackageSpecListPanic(pkgs []PackageSpec, packageName string) string {

View file

@ -35,6 +35,7 @@ import (
"errors"
"fmt"
"math/big"
"net"
"net/http"
"strings"
"sync"
@ -589,8 +590,9 @@ func (c *Client) TLSSNI02ChallengeCert(token string, opt ...CertOption) (tls.Cer
// TLSALPN01ChallengeCert creates a certificate for TLS-ALPN-01 challenge response.
// Servers can present the certificate to validate the challenge and prove control
// over a domain name. For more details on TLS-ALPN-01 see
// https://tools.ietf.org/html/draft-shoemaker-acme-tls-alpn-00#section-3
// over an identifier (either a DNS name or the textual form of an IPv4 or IPv6
// address). For more details on TLS-ALPN-01 see
// https://www.rfc-editor.org/rfc/rfc8737 and https://www.rfc-editor.org/rfc/rfc8738
//
// The token argument is a Challenge.Token value.
// If a WithKey option is provided, its private part signs the returned cert,
@ -598,9 +600,13 @@ func (c *Client) TLSSNI02ChallengeCert(token string, opt ...CertOption) (tls.Cer
// If no WithKey option is provided, a new ECDSA key is generated using P-256 curve.
//
// The returned certificate is valid for the next 24 hours and must be presented only when
// the server name in the TLS ClientHello matches the domain, and the special acme-tls/1 ALPN protocol
// the server name in the TLS ClientHello matches the identifier, and the special acme-tls/1 ALPN protocol
// has been specified.
func (c *Client) TLSALPN01ChallengeCert(token, domain string, opt ...CertOption) (cert tls.Certificate, err error) {
//
// Validation requests for IP address identifiers will use the reverse DNS form in the server name
// in the TLS ClientHello since the SNI extension is not supported for IP addresses.
// See RFC 8738 Section 6 for more information.
func (c *Client) TLSALPN01ChallengeCert(token, identifier string, opt ...CertOption) (cert tls.Certificate, err error) {
ka, err := keyAuth(c.Key.Public(), token)
if err != nil {
return tls.Certificate{}, err
@ -630,7 +636,7 @@ func (c *Client) TLSALPN01ChallengeCert(token, domain string, opt ...CertOption)
}
tmpl.ExtraExtensions = append(tmpl.ExtraExtensions, acmeExtension)
newOpt = append(newOpt, WithTemplate(tmpl))
return tlsChallengeCert([]string{domain}, newOpt)
return tlsChallengeCert(identifier, newOpt)
}
// popNonce returns a nonce value previously stored with c.addNonce
@ -749,10 +755,14 @@ func defaultTLSChallengeCertTemplate() *x509.Certificate {
}
// tlsChallengeCert creates a temporary certificate for TLS-ALPN challenges
// with the given SANs and auto-generated public/private key pair.
// The Subject Common Name is set to the first SAN to aid debugging.
// for the given identifier, using an auto-generated public/private key pair.
//
// If the provided identifier is a domain name, it will be used as a DNS type SAN and for the
// subject common name. If the provided identifier is an IP address it will be used as an IP type
// SAN.
//
// To create a cert with a custom key pair, specify WithKey option.
func tlsChallengeCert(san []string, opt []CertOption) (tls.Certificate, error) {
func tlsChallengeCert(identifier string, opt []CertOption) (tls.Certificate, error) {
var key crypto.Signer
tmpl := defaultTLSChallengeCertTemplate()
for _, o := range opt {
@ -776,9 +786,12 @@ func tlsChallengeCert(san []string, opt []CertOption) (tls.Certificate, error) {
return tls.Certificate{}, err
}
}
tmpl.DNSNames = san
if len(san) > 0 {
tmpl.Subject.CommonName = san[0]
if ip := net.ParseIP(identifier); ip != nil {
tmpl.IPAddresses = []net.IP{ip}
} else {
tmpl.DNSNames = []string{identifier}
tmpl.Subject.CommonName = identifier
}
der, err := x509.CreateCertificate(rand.Reader, tmpl, tmpl, key.Public(), key)

View file

@ -619,7 +619,7 @@ func (*certOptKey) privateCertOpt() {}
//
// In TLS ChallengeCert methods, the template is also used as parent,
// resulting in a self-signed certificate.
// The DNSNames field of t is always overwritten for tls-sni challenge certs.
// The DNSNames or IPAddresses fields of t are always overwritten for tls-alpn challenge certs.
func WithTemplate(t *x509.Certificate) CertOption {
return (*certOptTemplate)(t)
}

View file

@ -12,8 +12,6 @@ package errgroup
import (
"context"
"fmt"
"runtime"
"runtime/debug"
"sync"
)
@ -33,10 +31,6 @@ type Group struct {
errOnce sync.Once
err error
mu sync.Mutex
panicValue any // = PanicError | PanicValue; non-nil if some Group.Go goroutine panicked.
abnormal bool // some Group.Go goroutine terminated abnormally (panic or goexit).
}
func (g *Group) done() {
@ -56,22 +50,13 @@ func WithContext(ctx context.Context) (*Group, context.Context) {
return &Group{cancel: cancel}, ctx
}
// Wait blocks until all function calls from the Go method have returned
// normally, then returns the first non-nil error (if any) from them.
//
// If any of the calls panics, Wait panics with a [PanicValue];
// and if any of them calls [runtime.Goexit], Wait calls runtime.Goexit.
// Wait blocks until all function calls from the Go method have returned, then
// returns the first non-nil error (if any) from them.
func (g *Group) Wait() error {
g.wg.Wait()
if g.cancel != nil {
g.cancel(g.err)
}
if g.panicValue != nil {
panic(g.panicValue)
}
if g.abnormal {
runtime.Goexit()
}
return g.err
}
@ -81,53 +66,31 @@ func (g *Group) Wait() error {
// It blocks until the new goroutine can be added without the number of
// goroutines in the group exceeding the configured limit.
//
// The first goroutine in the group that returns a non-nil error, panics, or
// invokes [runtime.Goexit] will cancel the associated Context, if any.
// The first goroutine in the group that returns a non-nil error will
// cancel the associated Context, if any. The error will be returned
// by Wait.
func (g *Group) Go(f func() error) {
if g.sem != nil {
g.sem <- token{}
}
g.add(f)
}
func (g *Group) add(f func() error) {
g.wg.Add(1)
go func() {
defer g.done()
normalReturn := false
defer func() {
if normalReturn {
return
}
v := recover()
g.mu.Lock()
defer g.mu.Unlock()
if !g.abnormal {
if g.cancel != nil {
g.cancel(g.err)
}
g.abnormal = true
}
if v != nil && g.panicValue == nil {
switch v := v.(type) {
case error:
g.panicValue = PanicError{
Recovered: v,
Stack: debug.Stack(),
}
default:
g.panicValue = PanicValue{
Recovered: v,
Stack: debug.Stack(),
}
}
}
}()
err := f()
normalReturn = true
if err != nil {
// It is tempting to propagate panics from f()
// up to the goroutine that calls Wait, but
// it creates more problems than it solves:
// - it delays panics arbitrarily,
// making bugs harder to detect;
// - it turns f's panic stack into a mere value,
// hiding it from crash-monitoring tools;
// - it risks deadlocks that hide the panic entirely,
// if f's panic leaves the program in a state
// that prevents the Wait call from being reached.
// See #53757, #74275, #74304, #74306.
if err := f(); err != nil {
g.errOnce.Do(func() {
g.err = err
if g.cancel != nil {
@ -152,7 +115,19 @@ func (g *Group) TryGo(f func() error) bool {
}
}
g.add(f)
g.wg.Add(1)
go func() {
defer g.done()
if err := f(); err != nil {
g.errOnce.Do(func() {
g.err = err
if g.cancel != nil {
g.cancel(g.err)
}
})
}
}()
return true
}
@ -174,34 +149,3 @@ func (g *Group) SetLimit(n int) {
}
g.sem = make(chan token, n)
}
// PanicError wraps an error recovered from an unhandled panic
// when calling a function passed to Go or TryGo.
type PanicError struct {
Recovered error
Stack []byte // result of call to [debug.Stack]
}
func (p PanicError) Error() string {
if len(p.Stack) > 0 {
return fmt.Sprintf("recovered from errgroup.Group: %v\n%s", p.Recovered, p.Stack)
}
return fmt.Sprintf("recovered from errgroup.Group: %v", p.Recovered)
}
func (p PanicError) Unwrap() error { return p.Recovered }
// PanicValue wraps a value that does not implement the error interface,
// recovered from an unhandled panic when calling a function passed to Go or
// TryGo.
type PanicValue struct {
Recovered any
Stack []byte // result of call to [debug.Stack]
}
func (p PanicValue) String() string {
if len(p.Stack) > 0 {
return fmt.Sprintf("recovered from errgroup.Group: %v\n%s", p.Recovered, p.Stack)
}
return fmt.Sprintf("recovered from errgroup.Group: %v", p.Recovered)
}

View file

@ -319,6 +319,7 @@ const (
AUDIT_INTEGRITY_POLICY_RULE = 0x70f
AUDIT_INTEGRITY_RULE = 0x70d
AUDIT_INTEGRITY_STATUS = 0x70a
AUDIT_INTEGRITY_USERSPACE = 0x710
AUDIT_IPC = 0x517
AUDIT_IPC_SET_PERM = 0x51f
AUDIT_IPE_ACCESS = 0x58c
@ -843,9 +844,9 @@ const (
DM_UUID_FLAG = 0x4000
DM_UUID_LEN = 0x81
DM_VERSION = 0xc138fd00
DM_VERSION_EXTRA = "-ioctl (2023-03-01)"
DM_VERSION_EXTRA = "-ioctl (2025-01-17)"
DM_VERSION_MAJOR = 0x4
DM_VERSION_MINOR = 0x30
DM_VERSION_MINOR = 0x31
DM_VERSION_PATCHLEVEL = 0x0
DT_BLK = 0x6
DT_CHR = 0x2
@ -941,6 +942,8 @@ const (
ETHER_FLOW = 0x12
ETHTOOL_BUSINFO_LEN = 0x20
ETHTOOL_EROMVERS_LEN = 0x20
ETHTOOL_FAMILY_NAME = "ethtool"
ETHTOOL_FAMILY_VERSION = 0x1
ETHTOOL_FEC_AUTO = 0x2
ETHTOOL_FEC_BASER = 0x10
ETHTOOL_FEC_LLRS = 0x20
@ -1203,6 +1206,9 @@ const (
FAN_DENY = 0x2
FAN_ENABLE_AUDIT = 0x40
FAN_EPIDFD = -0x2
FAN_ERRNO_BITS = 0x8
FAN_ERRNO_MASK = 0xff
FAN_ERRNO_SHIFT = 0x18
FAN_EVENT_INFO_TYPE_DFID = 0x3
FAN_EVENT_INFO_TYPE_DFID_NAME = 0x2
FAN_EVENT_INFO_TYPE_ERROR = 0x5
@ -1210,6 +1216,7 @@ const (
FAN_EVENT_INFO_TYPE_NEW_DFID_NAME = 0xc
FAN_EVENT_INFO_TYPE_OLD_DFID_NAME = 0xa
FAN_EVENT_INFO_TYPE_PIDFD = 0x4
FAN_EVENT_INFO_TYPE_RANGE = 0x6
FAN_EVENT_METADATA_LEN = 0x18
FAN_EVENT_ON_CHILD = 0x8000000
FAN_FS_ERROR = 0x8000
@ -1240,6 +1247,7 @@ const (
FAN_OPEN_EXEC = 0x1000
FAN_OPEN_EXEC_PERM = 0x40000
FAN_OPEN_PERM = 0x10000
FAN_PRE_ACCESS = 0x100000
FAN_Q_OVERFLOW = 0x4000
FAN_RENAME = 0x10000000
FAN_REPORT_DFID_NAME = 0xc00
@ -2787,7 +2795,7 @@ const (
RTAX_UNSPEC = 0x0
RTAX_WINDOW = 0x3
RTA_ALIGNTO = 0x4
RTA_MAX = 0x1e
RTA_MAX = 0x1f
RTCF_DIRECTSRC = 0x4000000
RTCF_DOREDIRECT = 0x1000000
RTCF_LOG = 0x2000000
@ -2864,10 +2872,12 @@ const (
RTM_DELACTION = 0x31
RTM_DELADDR = 0x15
RTM_DELADDRLABEL = 0x49
RTM_DELANYCAST = 0x3d
RTM_DELCHAIN = 0x65
RTM_DELLINK = 0x11
RTM_DELLINKPROP = 0x6d
RTM_DELMDB = 0x55
RTM_DELMULTICAST = 0x39
RTM_DELNEIGH = 0x1d
RTM_DELNETCONF = 0x51
RTM_DELNEXTHOP = 0x69
@ -2917,11 +2927,13 @@ const (
RTM_NEWACTION = 0x30
RTM_NEWADDR = 0x14
RTM_NEWADDRLABEL = 0x48
RTM_NEWANYCAST = 0x3c
RTM_NEWCACHEREPORT = 0x60
RTM_NEWCHAIN = 0x64
RTM_NEWLINK = 0x10
RTM_NEWLINKPROP = 0x6c
RTM_NEWMDB = 0x54
RTM_NEWMULTICAST = 0x38
RTM_NEWNDUSEROPT = 0x44
RTM_NEWNEIGH = 0x1c
RTM_NEWNEIGHTBL = 0x40
@ -2987,11 +2999,12 @@ const (
RUSAGE_THREAD = 0x1
RWF_APPEND = 0x10
RWF_ATOMIC = 0x40
RWF_DONTCACHE = 0x80
RWF_DSYNC = 0x2
RWF_HIPRI = 0x1
RWF_NOAPPEND = 0x20
RWF_NOWAIT = 0x8
RWF_SUPPORTED = 0x7f
RWF_SUPPORTED = 0xff
RWF_SYNC = 0x4
RWF_WRITE_LIFE_NOT_SET = 0x0
SCHED_BATCH = 0x3
@ -3271,6 +3284,7 @@ const (
STATX_BTIME = 0x800
STATX_CTIME = 0x80
STATX_DIOALIGN = 0x2000
STATX_DIO_READ_ALIGN = 0x20000
STATX_GID = 0x10
STATX_INO = 0x100
STATX_MNT_ID = 0x1000
@ -3322,7 +3336,7 @@ const (
TASKSTATS_GENL_NAME = "TASKSTATS"
TASKSTATS_GENL_VERSION = 0x1
TASKSTATS_TYPE_MAX = 0x6
TASKSTATS_VERSION = 0xe
TASKSTATS_VERSION = 0xf
TCIFLUSH = 0x0
TCIOFF = 0x2
TCIOFLUSH = 0x2
@ -3503,6 +3517,7 @@ const (
TP_STATUS_WRONG_FORMAT = 0x4
TRACEFS_MAGIC = 0x74726163
TS_COMM_LEN = 0x20
UBI_IOCECNFO = 0xc01c6f06
UDF_SUPER_MAGIC = 0x15013346
UDP_CORK = 0x1
UDP_ENCAP = 0x64

View file

@ -372,6 +372,7 @@ const (
SO_RCVBUFFORCE = 0x21
SO_RCVLOWAT = 0x12
SO_RCVMARK = 0x4b
SO_RCVPRIORITY = 0x52
SO_RCVTIMEO = 0x14
SO_RCVTIMEO_NEW = 0x42
SO_RCVTIMEO_OLD = 0x14

View file

@ -373,6 +373,7 @@ const (
SO_RCVBUFFORCE = 0x21
SO_RCVLOWAT = 0x12
SO_RCVMARK = 0x4b
SO_RCVPRIORITY = 0x52
SO_RCVTIMEO = 0x14
SO_RCVTIMEO_NEW = 0x42
SO_RCVTIMEO_OLD = 0x14

View file

@ -378,6 +378,7 @@ const (
SO_RCVBUFFORCE = 0x21
SO_RCVLOWAT = 0x12
SO_RCVMARK = 0x4b
SO_RCVPRIORITY = 0x52
SO_RCVTIMEO = 0x14
SO_RCVTIMEO_NEW = 0x42
SO_RCVTIMEO_OLD = 0x14

View file

@ -371,6 +371,7 @@ const (
SO_RCVBUFFORCE = 0x21
SO_RCVLOWAT = 0x12
SO_RCVMARK = 0x4b
SO_RCVPRIORITY = 0x52
SO_RCVTIMEO = 0x14
SO_RCVTIMEO_NEW = 0x42
SO_RCVTIMEO_OLD = 0x14

View file

@ -365,6 +365,7 @@ const (
SO_RCVBUFFORCE = 0x21
SO_RCVLOWAT = 0x12
SO_RCVMARK = 0x4b
SO_RCVPRIORITY = 0x52
SO_RCVTIMEO = 0x14
SO_RCVTIMEO_NEW = 0x42
SO_RCVTIMEO_OLD = 0x14

View file

@ -371,6 +371,7 @@ const (
SO_RCVBUFFORCE = 0x21
SO_RCVLOWAT = 0x1004
SO_RCVMARK = 0x4b
SO_RCVPRIORITY = 0x52
SO_RCVTIMEO = 0x1006
SO_RCVTIMEO_NEW = 0x42
SO_RCVTIMEO_OLD = 0x1006

View file

@ -371,6 +371,7 @@ const (
SO_RCVBUFFORCE = 0x21
SO_RCVLOWAT = 0x1004
SO_RCVMARK = 0x4b
SO_RCVPRIORITY = 0x52
SO_RCVTIMEO = 0x1006
SO_RCVTIMEO_NEW = 0x42
SO_RCVTIMEO_OLD = 0x1006

View file

@ -371,6 +371,7 @@ const (
SO_RCVBUFFORCE = 0x21
SO_RCVLOWAT = 0x1004
SO_RCVMARK = 0x4b
SO_RCVPRIORITY = 0x52
SO_RCVTIMEO = 0x1006
SO_RCVTIMEO_NEW = 0x42
SO_RCVTIMEO_OLD = 0x1006

View file

@ -371,6 +371,7 @@ const (
SO_RCVBUFFORCE = 0x21
SO_RCVLOWAT = 0x1004
SO_RCVMARK = 0x4b
SO_RCVPRIORITY = 0x52
SO_RCVTIMEO = 0x1006
SO_RCVTIMEO_NEW = 0x42
SO_RCVTIMEO_OLD = 0x1006

View file

@ -426,6 +426,7 @@ const (
SO_RCVBUFFORCE = 0x21
SO_RCVLOWAT = 0x10
SO_RCVMARK = 0x4b
SO_RCVPRIORITY = 0x52
SO_RCVTIMEO = 0x12
SO_RCVTIMEO_NEW = 0x42
SO_RCVTIMEO_OLD = 0x12

View file

@ -430,6 +430,7 @@ const (
SO_RCVBUFFORCE = 0x21
SO_RCVLOWAT = 0x10
SO_RCVMARK = 0x4b
SO_RCVPRIORITY = 0x52
SO_RCVTIMEO = 0x12
SO_RCVTIMEO_NEW = 0x42
SO_RCVTIMEO_OLD = 0x12

View file

@ -430,6 +430,7 @@ const (
SO_RCVBUFFORCE = 0x21
SO_RCVLOWAT = 0x10
SO_RCVMARK = 0x4b
SO_RCVPRIORITY = 0x52
SO_RCVTIMEO = 0x12
SO_RCVTIMEO_NEW = 0x42
SO_RCVTIMEO_OLD = 0x12

View file

@ -362,6 +362,7 @@ const (
SO_RCVBUFFORCE = 0x21
SO_RCVLOWAT = 0x12
SO_RCVMARK = 0x4b
SO_RCVPRIORITY = 0x52
SO_RCVTIMEO = 0x14
SO_RCVTIMEO_NEW = 0x42
SO_RCVTIMEO_OLD = 0x14

View file

@ -434,6 +434,7 @@ const (
SO_RCVBUFFORCE = 0x21
SO_RCVLOWAT = 0x12
SO_RCVMARK = 0x4b
SO_RCVPRIORITY = 0x52
SO_RCVTIMEO = 0x14
SO_RCVTIMEO_NEW = 0x42
SO_RCVTIMEO_OLD = 0x14

View file

@ -473,6 +473,7 @@ const (
SO_RCVBUFFORCE = 0x100b
SO_RCVLOWAT = 0x800
SO_RCVMARK = 0x54
SO_RCVPRIORITY = 0x5b
SO_RCVTIMEO = 0x2000
SO_RCVTIMEO_NEW = 0x44
SO_RCVTIMEO_OLD = 0x2000

View file

@ -114,7 +114,7 @@ type Statx_t struct {
Atomic_write_unit_min uint32
Atomic_write_unit_max uint32
Atomic_write_segments_max uint32
_ [1]uint32
Dio_read_offset_align uint32
_ [9]uint64
}
@ -2226,8 +2226,11 @@ const (
NFT_PAYLOAD_LL_HEADER = 0x0
NFT_PAYLOAD_NETWORK_HEADER = 0x1
NFT_PAYLOAD_TRANSPORT_HEADER = 0x2
NFT_PAYLOAD_INNER_HEADER = 0x3
NFT_PAYLOAD_TUN_HEADER = 0x4
NFT_PAYLOAD_CSUM_NONE = 0x0
NFT_PAYLOAD_CSUM_INET = 0x1
NFT_PAYLOAD_CSUM_SCTP = 0x2
NFT_PAYLOAD_L4CSUM_PSEUDOHDR = 0x1
NFTA_PAYLOAD_UNSPEC = 0x0
NFTA_PAYLOAD_DREG = 0x1
@ -3802,7 +3805,16 @@ const (
ETHTOOL_MSG_PSE_GET = 0x24
ETHTOOL_MSG_PSE_SET = 0x25
ETHTOOL_MSG_RSS_GET = 0x26
ETHTOOL_MSG_USER_MAX = 0x2d
ETHTOOL_MSG_PLCA_GET_CFG = 0x27
ETHTOOL_MSG_PLCA_SET_CFG = 0x28
ETHTOOL_MSG_PLCA_GET_STATUS = 0x29
ETHTOOL_MSG_MM_GET = 0x2a
ETHTOOL_MSG_MM_SET = 0x2b
ETHTOOL_MSG_MODULE_FW_FLASH_ACT = 0x2c
ETHTOOL_MSG_PHY_GET = 0x2d
ETHTOOL_MSG_TSCONFIG_GET = 0x2e
ETHTOOL_MSG_TSCONFIG_SET = 0x2f
ETHTOOL_MSG_USER_MAX = 0x2f
ETHTOOL_MSG_KERNEL_NONE = 0x0
ETHTOOL_MSG_STRSET_GET_REPLY = 0x1
ETHTOOL_MSG_LINKINFO_GET_REPLY = 0x2
@ -3842,7 +3854,17 @@ const (
ETHTOOL_MSG_MODULE_NTF = 0x24
ETHTOOL_MSG_PSE_GET_REPLY = 0x25
ETHTOOL_MSG_RSS_GET_REPLY = 0x26
ETHTOOL_MSG_KERNEL_MAX = 0x2e
ETHTOOL_MSG_PLCA_GET_CFG_REPLY = 0x27
ETHTOOL_MSG_PLCA_GET_STATUS_REPLY = 0x28
ETHTOOL_MSG_PLCA_NTF = 0x29
ETHTOOL_MSG_MM_GET_REPLY = 0x2a
ETHTOOL_MSG_MM_NTF = 0x2b
ETHTOOL_MSG_MODULE_FW_FLASH_NTF = 0x2c
ETHTOOL_MSG_PHY_GET_REPLY = 0x2d
ETHTOOL_MSG_PHY_NTF = 0x2e
ETHTOOL_MSG_TSCONFIG_GET_REPLY = 0x2f
ETHTOOL_MSG_TSCONFIG_SET_REPLY = 0x30
ETHTOOL_MSG_KERNEL_MAX = 0x30
ETHTOOL_FLAG_COMPACT_BITSETS = 0x1
ETHTOOL_FLAG_OMIT_REPLY = 0x2
ETHTOOL_FLAG_STATS = 0x4
@ -3949,7 +3971,12 @@ const (
ETHTOOL_A_RINGS_TCP_DATA_SPLIT = 0xb
ETHTOOL_A_RINGS_CQE_SIZE = 0xc
ETHTOOL_A_RINGS_TX_PUSH = 0xd
ETHTOOL_A_RINGS_MAX = 0x10
ETHTOOL_A_RINGS_RX_PUSH = 0xe
ETHTOOL_A_RINGS_TX_PUSH_BUF_LEN = 0xf
ETHTOOL_A_RINGS_TX_PUSH_BUF_LEN_MAX = 0x10
ETHTOOL_A_RINGS_HDS_THRESH = 0x11
ETHTOOL_A_RINGS_HDS_THRESH_MAX = 0x12
ETHTOOL_A_RINGS_MAX = 0x12
ETHTOOL_A_CHANNELS_UNSPEC = 0x0
ETHTOOL_A_CHANNELS_HEADER = 0x1
ETHTOOL_A_CHANNELS_RX_MAX = 0x2
@ -4015,7 +4042,9 @@ const (
ETHTOOL_A_TSINFO_TX_TYPES = 0x3
ETHTOOL_A_TSINFO_RX_FILTERS = 0x4
ETHTOOL_A_TSINFO_PHC_INDEX = 0x5
ETHTOOL_A_TSINFO_MAX = 0x6
ETHTOOL_A_TSINFO_STATS = 0x6
ETHTOOL_A_TSINFO_HWTSTAMP_PROVIDER = 0x7
ETHTOOL_A_TSINFO_MAX = 0x7
ETHTOOL_A_CABLE_TEST_UNSPEC = 0x0
ETHTOOL_A_CABLE_TEST_HEADER = 0x1
ETHTOOL_A_CABLE_TEST_MAX = 0x1
@ -4613,6 +4642,7 @@ const (
NL80211_ATTR_AKM_SUITES = 0x4c
NL80211_ATTR_AP_ISOLATE = 0x60
NL80211_ATTR_AP_SETTINGS_FLAGS = 0x135
NL80211_ATTR_ASSOC_SPP_AMSDU = 0x14a
NL80211_ATTR_AUTH_DATA = 0x9c
NL80211_ATTR_AUTH_TYPE = 0x35
NL80211_ATTR_BANDS = 0xef
@ -4623,6 +4653,7 @@ const (
NL80211_ATTR_BSS_BASIC_RATES = 0x24
NL80211_ATTR_BSS = 0x2f
NL80211_ATTR_BSS_CTS_PROT = 0x1c
NL80211_ATTR_BSS_DUMP_INCLUDE_USE_DATA = 0x147
NL80211_ATTR_BSS_HT_OPMODE = 0x6d
NL80211_ATTR_BSSID = 0xf5
NL80211_ATTR_BSS_SELECT = 0xe3
@ -4682,6 +4713,7 @@ const (
NL80211_ATTR_DTIM_PERIOD = 0xd
NL80211_ATTR_DURATION = 0x57
NL80211_ATTR_EHT_CAPABILITY = 0x136
NL80211_ATTR_EMA_RNR_ELEMS = 0x145
NL80211_ATTR_EML_CAPABILITY = 0x13d
NL80211_ATTR_EXT_CAPA = 0xa9
NL80211_ATTR_EXT_CAPA_MASK = 0xaa
@ -4717,6 +4749,7 @@ const (
NL80211_ATTR_HIDDEN_SSID = 0x7e
NL80211_ATTR_HT_CAPABILITY = 0x1f
NL80211_ATTR_HT_CAPABILITY_MASK = 0x94
NL80211_ATTR_HW_TIMESTAMP_ENABLED = 0x144
NL80211_ATTR_IE_ASSOC_RESP = 0x80
NL80211_ATTR_IE = 0x2a
NL80211_ATTR_IE_PROBE_RESP = 0x7f
@ -4747,9 +4780,10 @@ const (
NL80211_ATTR_MAC_HINT = 0xc8
NL80211_ATTR_MAC_MASK = 0xd7
NL80211_ATTR_MAX_AP_ASSOC_STA = 0xca
NL80211_ATTR_MAX = 0x14d
NL80211_ATTR_MAX = 0x150
NL80211_ATTR_MAX_CRIT_PROT_DURATION = 0xb4
NL80211_ATTR_MAX_CSA_COUNTERS = 0xce
NL80211_ATTR_MAX_HW_TIMESTAMP_PEERS = 0x143
NL80211_ATTR_MAX_MATCH_SETS = 0x85
NL80211_ATTR_MAX_NUM_AKM_SUITES = 0x13c
NL80211_ATTR_MAX_NUM_PMKIDS = 0x56
@ -4774,9 +4808,12 @@ const (
NL80211_ATTR_MGMT_SUBTYPE = 0x29
NL80211_ATTR_MLD_ADDR = 0x13a
NL80211_ATTR_MLD_CAPA_AND_OPS = 0x13e
NL80211_ATTR_MLO_LINK_DISABLED = 0x146
NL80211_ATTR_MLO_LINK_ID = 0x139
NL80211_ATTR_MLO_LINKS = 0x138
NL80211_ATTR_MLO_SUPPORT = 0x13b
NL80211_ATTR_MLO_TTLM_DLINK = 0x148
NL80211_ATTR_MLO_TTLM_ULINK = 0x149
NL80211_ATTR_MNTR_FLAGS = 0x17
NL80211_ATTR_MPATH_INFO = 0x1b
NL80211_ATTR_MPATH_NEXT_HOP = 0x1a
@ -4809,12 +4846,14 @@ const (
NL80211_ATTR_PORT_AUTHORIZED = 0x103
NL80211_ATTR_POWER_RULE_MAX_ANT_GAIN = 0x5
NL80211_ATTR_POWER_RULE_MAX_EIRP = 0x6
NL80211_ATTR_POWER_RULE_PSD = 0x8
NL80211_ATTR_PREV_BSSID = 0x4f
NL80211_ATTR_PRIVACY = 0x46
NL80211_ATTR_PROBE_RESP = 0x91
NL80211_ATTR_PROBE_RESP_OFFLOAD = 0x90
NL80211_ATTR_PROTOCOL_FEATURES = 0xad
NL80211_ATTR_PS_STATE = 0x5d
NL80211_ATTR_PUNCT_BITMAP = 0x142
NL80211_ATTR_QOS_MAP = 0xc7
NL80211_ATTR_RADAR_BACKGROUND = 0x134
NL80211_ATTR_RADAR_EVENT = 0xa8
@ -4943,7 +4982,9 @@ const (
NL80211_ATTR_WIPHY_FREQ = 0x26
NL80211_ATTR_WIPHY_FREQ_HINT = 0xc9
NL80211_ATTR_WIPHY_FREQ_OFFSET = 0x122
NL80211_ATTR_WIPHY_INTERFACE_COMBINATIONS = 0x14c
NL80211_ATTR_WIPHY_NAME = 0x2
NL80211_ATTR_WIPHY_RADIOS = 0x14b
NL80211_ATTR_WIPHY_RETRY_LONG = 0x3e
NL80211_ATTR_WIPHY_RETRY_SHORT = 0x3d
NL80211_ATTR_WIPHY_RTS_THRESHOLD = 0x40
@ -4978,6 +5019,8 @@ const (
NL80211_BAND_ATTR_IFTYPE_DATA = 0x9
NL80211_BAND_ATTR_MAX = 0xd
NL80211_BAND_ATTR_RATES = 0x2
NL80211_BAND_ATTR_S1G_CAPA = 0xd
NL80211_BAND_ATTR_S1G_MCS_NSS_SET = 0xc
NL80211_BAND_ATTR_VHT_CAPA = 0x8
NL80211_BAND_ATTR_VHT_MCS_SET = 0x7
NL80211_BAND_IFTYPE_ATTR_EHT_CAP_MAC = 0x8
@ -5001,6 +5044,10 @@ const (
NL80211_BSS_BEACON_INTERVAL = 0x4
NL80211_BSS_BEACON_TSF = 0xd
NL80211_BSS_BSSID = 0x1
NL80211_BSS_CANNOT_USE_6GHZ_PWR_MISMATCH = 0x2
NL80211_BSS_CANNOT_USE_NSTR_NONPRIMARY = 0x1
NL80211_BSS_CANNOT_USE_REASONS = 0x18
NL80211_BSS_CANNOT_USE_UHB_PWR_MISMATCH = 0x2
NL80211_BSS_CAPABILITY = 0x5
NL80211_BSS_CHAIN_SIGNAL = 0x13
NL80211_BSS_CHAN_WIDTH_10 = 0x1
@ -5032,6 +5079,9 @@ const (
NL80211_BSS_STATUS = 0x9
NL80211_BSS_STATUS_IBSS_JOINED = 0x2
NL80211_BSS_TSF = 0x3
NL80211_BSS_USE_FOR = 0x17
NL80211_BSS_USE_FOR_MLD_LINK = 0x2
NL80211_BSS_USE_FOR_NORMAL = 0x1
NL80211_CHAN_HT20 = 0x1
NL80211_CHAN_HT40MINUS = 0x2
NL80211_CHAN_HT40PLUS = 0x3
@ -5117,7 +5167,8 @@ const (
NL80211_CMD_LEAVE_IBSS = 0x2c
NL80211_CMD_LEAVE_MESH = 0x45
NL80211_CMD_LEAVE_OCB = 0x6d
NL80211_CMD_MAX = 0x9b
NL80211_CMD_LINKS_REMOVED = 0x9a
NL80211_CMD_MAX = 0x9d
NL80211_CMD_MICHAEL_MIC_FAILURE = 0x29
NL80211_CMD_MODIFY_LINK_STA = 0x97
NL80211_CMD_NAN_MATCH = 0x78
@ -5161,6 +5212,7 @@ const (
NL80211_CMD_SET_COALESCE = 0x65
NL80211_CMD_SET_CQM = 0x3f
NL80211_CMD_SET_FILS_AAD = 0x92
NL80211_CMD_SET_HW_TIMESTAMP = 0x99
NL80211_CMD_SET_INTERFACE = 0x6
NL80211_CMD_SET_KEY = 0xa
NL80211_CMD_SET_MAC_ACL = 0x5d
@ -5180,6 +5232,7 @@ const (
NL80211_CMD_SET_SAR_SPECS = 0x8c
NL80211_CMD_SET_STATION = 0x12
NL80211_CMD_SET_TID_CONFIG = 0x89
NL80211_CMD_SET_TID_TO_LINK_MAPPING = 0x9b
NL80211_CMD_SET_TX_BITRATE_MASK = 0x39
NL80211_CMD_SET_WDS_PEER = 0x42
NL80211_CMD_SET_WIPHY = 0x2
@ -5247,6 +5300,7 @@ const (
NL80211_EXT_FEATURE_AIRTIME_FAIRNESS = 0x21
NL80211_EXT_FEATURE_AP_PMKSA_CACHING = 0x22
NL80211_EXT_FEATURE_AQL = 0x28
NL80211_EXT_FEATURE_AUTH_AND_DEAUTH_RANDOM_TA = 0x40
NL80211_EXT_FEATURE_BEACON_PROTECTION_CLIENT = 0x2e
NL80211_EXT_FEATURE_BEACON_PROTECTION = 0x29
NL80211_EXT_FEATURE_BEACON_RATE_HE = 0x36
@ -5262,6 +5316,7 @@ const (
NL80211_EXT_FEATURE_CQM_RSSI_LIST = 0xd
NL80211_EXT_FEATURE_DATA_ACK_SIGNAL_SUPPORT = 0x1b
NL80211_EXT_FEATURE_DEL_IBSS_STA = 0x2c
NL80211_EXT_FEATURE_DFS_CONCURRENT = 0x43
NL80211_EXT_FEATURE_DFS_OFFLOAD = 0x19
NL80211_EXT_FEATURE_ENABLE_FTM_RESPONDER = 0x20
NL80211_EXT_FEATURE_EXT_KEY_ID = 0x24
@ -5281,9 +5336,12 @@ const (
NL80211_EXT_FEATURE_OCE_PROBE_REQ_DEFERRAL_SUPPRESSION = 0x14
NL80211_EXT_FEATURE_OCE_PROBE_REQ_HIGH_TX_RATE = 0x13
NL80211_EXT_FEATURE_OPERATING_CHANNEL_VALIDATION = 0x31
NL80211_EXT_FEATURE_OWE_OFFLOAD_AP = 0x42
NL80211_EXT_FEATURE_OWE_OFFLOAD = 0x41
NL80211_EXT_FEATURE_POWERED_ADDR_CHANGE = 0x3d
NL80211_EXT_FEATURE_PROTECTED_TWT = 0x2b
NL80211_EXT_FEATURE_PROT_RANGE_NEGO_AND_MEASURE = 0x39
NL80211_EXT_FEATURE_PUNCT = 0x3e
NL80211_EXT_FEATURE_RADAR_BACKGROUND = 0x3c
NL80211_EXT_FEATURE_RRM = 0x1
NL80211_EXT_FEATURE_SAE_OFFLOAD_AP = 0x33
@ -5295,8 +5353,10 @@ const (
NL80211_EXT_FEATURE_SCHED_SCAN_BAND_SPECIFIC_RSSI_THOLD = 0x23
NL80211_EXT_FEATURE_SCHED_SCAN_RELATIVE_RSSI = 0xc
NL80211_EXT_FEATURE_SECURE_LTF = 0x37
NL80211_EXT_FEATURE_SECURE_NAN = 0x3f
NL80211_EXT_FEATURE_SECURE_RTT = 0x38
NL80211_EXT_FEATURE_SET_SCAN_DWELL = 0x5
NL80211_EXT_FEATURE_SPP_AMSDU_SUPPORT = 0x44
NL80211_EXT_FEATURE_STA_TX_PWR = 0x25
NL80211_EXT_FEATURE_TXQS = 0x1c
NL80211_EXT_FEATURE_UNSOL_BCAST_PROBE_RESP = 0x35
@ -5343,7 +5403,10 @@ const (
NL80211_FREQUENCY_ATTR_2MHZ = 0x16
NL80211_FREQUENCY_ATTR_4MHZ = 0x17
NL80211_FREQUENCY_ATTR_8MHZ = 0x18
NL80211_FREQUENCY_ATTR_ALLOW_6GHZ_VLP_AP = 0x21
NL80211_FREQUENCY_ATTR_CAN_MONITOR = 0x20
NL80211_FREQUENCY_ATTR_DFS_CAC_TIME = 0xd
NL80211_FREQUENCY_ATTR_DFS_CONCURRENT = 0x1d
NL80211_FREQUENCY_ATTR_DFS_STATE = 0x7
NL80211_FREQUENCY_ATTR_DFS_TIME = 0x8
NL80211_FREQUENCY_ATTR_DISABLED = 0x2
@ -5357,6 +5420,8 @@ const (
NL80211_FREQUENCY_ATTR_NO_160MHZ = 0xc
NL80211_FREQUENCY_ATTR_NO_20MHZ = 0x10
NL80211_FREQUENCY_ATTR_NO_320MHZ = 0x1a
NL80211_FREQUENCY_ATTR_NO_6GHZ_AFC_CLIENT = 0x1f
NL80211_FREQUENCY_ATTR_NO_6GHZ_VLP_CLIENT = 0x1e
NL80211_FREQUENCY_ATTR_NO_80MHZ = 0xb
NL80211_FREQUENCY_ATTR_NO_EHT = 0x1b
NL80211_FREQUENCY_ATTR_NO_HE = 0x13
@ -5364,8 +5429,11 @@ const (
NL80211_FREQUENCY_ATTR_NO_HT40_PLUS = 0xa
NL80211_FREQUENCY_ATTR_NO_IBSS = 0x3
NL80211_FREQUENCY_ATTR_NO_IR = 0x3
NL80211_FREQUENCY_ATTR_NO_UHB_AFC_CLIENT = 0x1f
NL80211_FREQUENCY_ATTR_NO_UHB_VLP_CLIENT = 0x1e
NL80211_FREQUENCY_ATTR_OFFSET = 0x14
NL80211_FREQUENCY_ATTR_PASSIVE_SCAN = 0x3
NL80211_FREQUENCY_ATTR_PSD = 0x1c
NL80211_FREQUENCY_ATTR_RADAR = 0x5
NL80211_FREQUENCY_ATTR_WMM = 0x12
NL80211_FTM_RESP_ATTR_CIVICLOC = 0x3
@ -5430,6 +5498,7 @@ const (
NL80211_IFTYPE_STATION = 0x2
NL80211_IFTYPE_UNSPECIFIED = 0x0
NL80211_IFTYPE_WDS = 0x5
NL80211_KCK_EXT_LEN_32 = 0x20
NL80211_KCK_EXT_LEN = 0x18
NL80211_KCK_LEN = 0x10
NL80211_KEK_EXT_LEN = 0x20
@ -5458,6 +5527,7 @@ const (
NL80211_MAX_SUPP_HT_RATES = 0x4d
NL80211_MAX_SUPP_RATES = 0x20
NL80211_MAX_SUPP_REG_RULES = 0x80
NL80211_MAX_SUPP_SELECTORS = 0x80
NL80211_MBSSID_CONFIG_ATTR_EMA = 0x5
NL80211_MBSSID_CONFIG_ATTR_INDEX = 0x3
NL80211_MBSSID_CONFIG_ATTR_MAX = 0x5
@ -5703,11 +5773,16 @@ const (
NL80211_RADAR_PRE_CAC_EXPIRED = 0x4
NL80211_RATE_INFO_10_MHZ_WIDTH = 0xb
NL80211_RATE_INFO_160_MHZ_WIDTH = 0xa
NL80211_RATE_INFO_16_MHZ_WIDTH = 0x1d
NL80211_RATE_INFO_1_MHZ_WIDTH = 0x19
NL80211_RATE_INFO_2_MHZ_WIDTH = 0x1a
NL80211_RATE_INFO_320_MHZ_WIDTH = 0x12
NL80211_RATE_INFO_40_MHZ_WIDTH = 0x3
NL80211_RATE_INFO_4_MHZ_WIDTH = 0x1b
NL80211_RATE_INFO_5_MHZ_WIDTH = 0xc
NL80211_RATE_INFO_80_MHZ_WIDTH = 0x8
NL80211_RATE_INFO_80P80_MHZ_WIDTH = 0x9
NL80211_RATE_INFO_8_MHZ_WIDTH = 0x1c
NL80211_RATE_INFO_BITRATE32 = 0x5
NL80211_RATE_INFO_BITRATE = 0x1
NL80211_RATE_INFO_EHT_GI_0_8 = 0x0
@ -5753,6 +5828,8 @@ const (
NL80211_RATE_INFO_HE_RU_ALLOC = 0x11
NL80211_RATE_INFO_MAX = 0x1d
NL80211_RATE_INFO_MCS = 0x2
NL80211_RATE_INFO_S1G_MCS = 0x17
NL80211_RATE_INFO_S1G_NSS = 0x18
NL80211_RATE_INFO_SHORT_GI = 0x4
NL80211_RATE_INFO_VHT_MCS = 0x6
NL80211_RATE_INFO_VHT_NSS = 0x7
@ -5770,14 +5847,19 @@ const (
NL80211_REKEY_DATA_KEK = 0x1
NL80211_REKEY_DATA_REPLAY_CTR = 0x3
NL80211_REPLAY_CTR_LEN = 0x8
NL80211_RRF_ALLOW_6GHZ_VLP_AP = 0x1000000
NL80211_RRF_AUTO_BW = 0x800
NL80211_RRF_DFS = 0x10
NL80211_RRF_DFS_CONCURRENT = 0x200000
NL80211_RRF_GO_CONCURRENT = 0x1000
NL80211_RRF_IR_CONCURRENT = 0x1000
NL80211_RRF_NO_160MHZ = 0x10000
NL80211_RRF_NO_320MHZ = 0x40000
NL80211_RRF_NO_6GHZ_AFC_CLIENT = 0x800000
NL80211_RRF_NO_6GHZ_VLP_CLIENT = 0x400000
NL80211_RRF_NO_80MHZ = 0x8000
NL80211_RRF_NO_CCK = 0x2
NL80211_RRF_NO_EHT = 0x80000
NL80211_RRF_NO_HE = 0x20000
NL80211_RRF_NO_HT40 = 0x6000
NL80211_RRF_NO_HT40MINUS = 0x2000
@ -5788,7 +5870,10 @@ const (
NL80211_RRF_NO_IR = 0x80
NL80211_RRF_NO_OFDM = 0x1
NL80211_RRF_NO_OUTDOOR = 0x8
NL80211_RRF_NO_UHB_AFC_CLIENT = 0x800000
NL80211_RRF_NO_UHB_VLP_CLIENT = 0x400000
NL80211_RRF_PASSIVE_SCAN = 0x80
NL80211_RRF_PSD = 0x100000
NL80211_RRF_PTMP_ONLY = 0x40
NL80211_RRF_PTP_ONLY = 0x20
NL80211_RXMGMT_FLAG_ANSWERED = 0x1
@ -5849,6 +5934,7 @@ const (
NL80211_STA_FLAG_MAX_OLD_API = 0x6
NL80211_STA_FLAG_MFP = 0x4
NL80211_STA_FLAG_SHORT_PREAMBLE = 0x2
NL80211_STA_FLAG_SPP_AMSDU = 0x8
NL80211_STA_FLAG_TDLS_PEER = 0x6
NL80211_STA_FLAG_WME = 0x3
NL80211_STA_INFO_ACK_SIGNAL_AVG = 0x23
@ -6007,6 +6093,13 @@ const (
NL80211_VHT_CAPABILITY_LEN = 0xc
NL80211_VHT_NSS_MAX = 0x8
NL80211_WIPHY_NAME_MAXLEN = 0x40
NL80211_WIPHY_RADIO_ATTR_FREQ_RANGE = 0x2
NL80211_WIPHY_RADIO_ATTR_INDEX = 0x1
NL80211_WIPHY_RADIO_ATTR_INTERFACE_COMBINATION = 0x3
NL80211_WIPHY_RADIO_ATTR_MAX = 0x4
NL80211_WIPHY_RADIO_FREQ_ATTR_END = 0x2
NL80211_WIPHY_RADIO_FREQ_ATTR_MAX = 0x2
NL80211_WIPHY_RADIO_FREQ_ATTR_START = 0x1
NL80211_WMMR_AIFSN = 0x3
NL80211_WMMR_CW_MAX = 0x2
NL80211_WMMR_CW_MIN = 0x1
@ -6038,6 +6131,7 @@ const (
NL80211_WOWLAN_TRIG_PKT_PATTERN = 0x4
NL80211_WOWLAN_TRIG_RFKILL_RELEASE = 0x9
NL80211_WOWLAN_TRIG_TCP_CONNECTION = 0xe
NL80211_WOWLAN_TRIG_UNPROTECTED_DEAUTH_DISASSOC = 0x14
NL80211_WOWLAN_TRIG_WAKEUP_PKT_80211 = 0xa
NL80211_WOWLAN_TRIG_WAKEUP_PKT_80211_LEN = 0xb
NL80211_WOWLAN_TRIG_WAKEUP_PKT_8023 = 0xc

View file

@ -285,10 +285,16 @@ type Taskstats struct {
_ [4]byte
Cpu_count uint64
Cpu_delay_total uint64
Cpu_delay_max uint64
Cpu_delay_min uint64
Blkio_count uint64
Blkio_delay_total uint64
Blkio_delay_max uint64
Blkio_delay_min uint64
Swapin_count uint64
Swapin_delay_total uint64
Swapin_delay_max uint64
Swapin_delay_min uint64
Cpu_run_real_total uint64
Cpu_run_virtual_total uint64
Ac_comm [32]int8
@ -324,11 +330,17 @@ type Taskstats struct {
Cpu_scaled_run_real_total uint64
Freepages_count uint64
Freepages_delay_total uint64
Freepages_delay_max uint64
Freepages_delay_min uint64
Thrashing_count uint64
Thrashing_delay_total uint64
Thrashing_delay_max uint64
Thrashing_delay_min uint64
Ac_btime64 uint64
Compact_count uint64
Compact_delay_total uint64
Compact_delay_max uint64
Compact_delay_min uint64
Ac_tgid uint32
_ [4]byte
Ac_tgetime uint64
@ -336,8 +348,12 @@ type Taskstats struct {
Ac_exe_inode uint64
Wpcopy_count uint64
Wpcopy_delay_total uint64
Wpcopy_delay_max uint64
Wpcopy_delay_min uint64
Irq_count uint64
Irq_delay_total uint64
Irq_delay_max uint64
Irq_delay_min uint64
}
type cpuMask uint32

View file

@ -300,10 +300,16 @@ type Taskstats struct {
Ac_nice uint8
Cpu_count uint64
Cpu_delay_total uint64
Cpu_delay_max uint64
Cpu_delay_min uint64
Blkio_count uint64
Blkio_delay_total uint64
Blkio_delay_max uint64
Blkio_delay_min uint64
Swapin_count uint64
Swapin_delay_total uint64
Swapin_delay_max uint64
Swapin_delay_min uint64
Cpu_run_real_total uint64
Cpu_run_virtual_total uint64
Ac_comm [32]int8
@ -338,19 +344,29 @@ type Taskstats struct {
Cpu_scaled_run_real_total uint64
Freepages_count uint64
Freepages_delay_total uint64
Freepages_delay_max uint64
Freepages_delay_min uint64
Thrashing_count uint64
Thrashing_delay_total uint64
Thrashing_delay_max uint64
Thrashing_delay_min uint64
Ac_btime64 uint64
Compact_count uint64
Compact_delay_total uint64
Compact_delay_max uint64
Compact_delay_min uint64
Ac_tgid uint32
Ac_tgetime uint64
Ac_exe_dev uint64
Ac_exe_inode uint64
Wpcopy_count uint64
Wpcopy_delay_total uint64
Wpcopy_delay_max uint64
Wpcopy_delay_min uint64
Irq_count uint64
Irq_delay_total uint64
Irq_delay_max uint64
Irq_delay_min uint64
}
type cpuMask uint64

View file

@ -276,10 +276,16 @@ type Taskstats struct {
_ [4]byte
Cpu_count uint64
Cpu_delay_total uint64
Cpu_delay_max uint64
Cpu_delay_min uint64
Blkio_count uint64
Blkio_delay_total uint64
Blkio_delay_max uint64
Blkio_delay_min uint64
Swapin_count uint64
Swapin_delay_total uint64
Swapin_delay_max uint64
Swapin_delay_min uint64
Cpu_run_real_total uint64
Cpu_run_virtual_total uint64
Ac_comm [32]uint8
@ -315,11 +321,17 @@ type Taskstats struct {
Cpu_scaled_run_real_total uint64
Freepages_count uint64
Freepages_delay_total uint64
Freepages_delay_max uint64
Freepages_delay_min uint64
Thrashing_count uint64
Thrashing_delay_total uint64
Thrashing_delay_max uint64
Thrashing_delay_min uint64
Ac_btime64 uint64
Compact_count uint64
Compact_delay_total uint64
Compact_delay_max uint64
Compact_delay_min uint64
Ac_tgid uint32
_ [4]byte
Ac_tgetime uint64
@ -327,8 +339,12 @@ type Taskstats struct {
Ac_exe_inode uint64
Wpcopy_count uint64
Wpcopy_delay_total uint64
Wpcopy_delay_max uint64
Wpcopy_delay_min uint64
Irq_count uint64
Irq_delay_total uint64
Irq_delay_max uint64
Irq_delay_min uint64
}
type cpuMask uint32

View file

@ -279,10 +279,16 @@ type Taskstats struct {
Ac_nice uint8
Cpu_count uint64
Cpu_delay_total uint64
Cpu_delay_max uint64
Cpu_delay_min uint64
Blkio_count uint64
Blkio_delay_total uint64
Blkio_delay_max uint64
Blkio_delay_min uint64
Swapin_count uint64
Swapin_delay_total uint64
Swapin_delay_max uint64
Swapin_delay_min uint64
Cpu_run_real_total uint64
Cpu_run_virtual_total uint64
Ac_comm [32]int8
@ -317,19 +323,29 @@ type Taskstats struct {
Cpu_scaled_run_real_total uint64
Freepages_count uint64
Freepages_delay_total uint64
Freepages_delay_max uint64
Freepages_delay_min uint64
Thrashing_count uint64
Thrashing_delay_total uint64
Thrashing_delay_max uint64
Thrashing_delay_min uint64
Ac_btime64 uint64
Compact_count uint64
Compact_delay_total uint64
Compact_delay_max uint64
Compact_delay_min uint64
Ac_tgid uint32
Ac_tgetime uint64
Ac_exe_dev uint64
Ac_exe_inode uint64
Wpcopy_count uint64
Wpcopy_delay_total uint64
Wpcopy_delay_max uint64
Wpcopy_delay_min uint64
Irq_count uint64
Irq_delay_total uint64
Irq_delay_max uint64
Irq_delay_min uint64
}
type cpuMask uint64

View file

@ -280,10 +280,16 @@ type Taskstats struct {
Ac_nice uint8
Cpu_count uint64
Cpu_delay_total uint64
Cpu_delay_max uint64
Cpu_delay_min uint64
Blkio_count uint64
Blkio_delay_total uint64
Blkio_delay_max uint64
Blkio_delay_min uint64
Swapin_count uint64
Swapin_delay_total uint64
Swapin_delay_max uint64
Swapin_delay_min uint64
Cpu_run_real_total uint64
Cpu_run_virtual_total uint64
Ac_comm [32]int8
@ -318,19 +324,29 @@ type Taskstats struct {
Cpu_scaled_run_real_total uint64
Freepages_count uint64
Freepages_delay_total uint64
Freepages_delay_max uint64
Freepages_delay_min uint64
Thrashing_count uint64
Thrashing_delay_total uint64
Thrashing_delay_max uint64
Thrashing_delay_min uint64
Ac_btime64 uint64
Compact_count uint64
Compact_delay_total uint64
Compact_delay_max uint64
Compact_delay_min uint64
Ac_tgid uint32
Ac_tgetime uint64
Ac_exe_dev uint64
Ac_exe_inode uint64
Wpcopy_count uint64
Wpcopy_delay_total uint64
Wpcopy_delay_max uint64
Wpcopy_delay_min uint64
Irq_count uint64
Irq_delay_total uint64
Irq_delay_max uint64
Irq_delay_min uint64
}
type cpuMask uint64

View file

@ -281,10 +281,16 @@ type Taskstats struct {
_ [4]byte
Cpu_count uint64
Cpu_delay_total uint64
Cpu_delay_max uint64
Cpu_delay_min uint64
Blkio_count uint64
Blkio_delay_total uint64
Blkio_delay_max uint64
Blkio_delay_min uint64
Swapin_count uint64
Swapin_delay_total uint64
Swapin_delay_max uint64
Swapin_delay_min uint64
Cpu_run_real_total uint64
Cpu_run_virtual_total uint64
Ac_comm [32]int8
@ -320,11 +326,17 @@ type Taskstats struct {
Cpu_scaled_run_real_total uint64
Freepages_count uint64
Freepages_delay_total uint64
Freepages_delay_max uint64
Freepages_delay_min uint64
Thrashing_count uint64
Thrashing_delay_total uint64
Thrashing_delay_max uint64
Thrashing_delay_min uint64
Ac_btime64 uint64
Compact_count uint64
Compact_delay_total uint64
Compact_delay_max uint64
Compact_delay_min uint64
Ac_tgid uint32
_ [4]byte
Ac_tgetime uint64
@ -332,8 +344,12 @@ type Taskstats struct {
Ac_exe_inode uint64
Wpcopy_count uint64
Wpcopy_delay_total uint64
Wpcopy_delay_max uint64
Wpcopy_delay_min uint64
Irq_count uint64
Irq_delay_total uint64
Irq_delay_max uint64
Irq_delay_min uint64
}
type cpuMask uint32

View file

@ -282,10 +282,16 @@ type Taskstats struct {
Ac_nice uint8
Cpu_count uint64
Cpu_delay_total uint64
Cpu_delay_max uint64
Cpu_delay_min uint64
Blkio_count uint64
Blkio_delay_total uint64
Blkio_delay_max uint64
Blkio_delay_min uint64
Swapin_count uint64
Swapin_delay_total uint64
Swapin_delay_max uint64
Swapin_delay_min uint64
Cpu_run_real_total uint64
Cpu_run_virtual_total uint64
Ac_comm [32]int8
@ -320,19 +326,29 @@ type Taskstats struct {
Cpu_scaled_run_real_total uint64
Freepages_count uint64
Freepages_delay_total uint64
Freepages_delay_max uint64
Freepages_delay_min uint64
Thrashing_count uint64
Thrashing_delay_total uint64
Thrashing_delay_max uint64
Thrashing_delay_min uint64
Ac_btime64 uint64
Compact_count uint64
Compact_delay_total uint64
Compact_delay_max uint64
Compact_delay_min uint64
Ac_tgid uint32
Ac_tgetime uint64
Ac_exe_dev uint64
Ac_exe_inode uint64
Wpcopy_count uint64
Wpcopy_delay_total uint64
Wpcopy_delay_max uint64
Wpcopy_delay_min uint64
Irq_count uint64
Irq_delay_total uint64
Irq_delay_max uint64
Irq_delay_min uint64
}
type cpuMask uint64

View file

@ -282,10 +282,16 @@ type Taskstats struct {
Ac_nice uint8
Cpu_count uint64
Cpu_delay_total uint64
Cpu_delay_max uint64
Cpu_delay_min uint64
Blkio_count uint64
Blkio_delay_total uint64
Blkio_delay_max uint64
Blkio_delay_min uint64
Swapin_count uint64
Swapin_delay_total uint64
Swapin_delay_max uint64
Swapin_delay_min uint64
Cpu_run_real_total uint64
Cpu_run_virtual_total uint64
Ac_comm [32]int8
@ -320,19 +326,29 @@ type Taskstats struct {
Cpu_scaled_run_real_total uint64
Freepages_count uint64
Freepages_delay_total uint64
Freepages_delay_max uint64
Freepages_delay_min uint64
Thrashing_count uint64
Thrashing_delay_total uint64
Thrashing_delay_max uint64
Thrashing_delay_min uint64
Ac_btime64 uint64
Compact_count uint64
Compact_delay_total uint64
Compact_delay_max uint64
Compact_delay_min uint64
Ac_tgid uint32
Ac_tgetime uint64
Ac_exe_dev uint64
Ac_exe_inode uint64
Wpcopy_count uint64
Wpcopy_delay_total uint64
Wpcopy_delay_max uint64
Wpcopy_delay_min uint64
Irq_count uint64
Irq_delay_total uint64
Irq_delay_max uint64
Irq_delay_min uint64
}
type cpuMask uint64

View file

@ -281,10 +281,16 @@ type Taskstats struct {
_ [4]byte
Cpu_count uint64
Cpu_delay_total uint64
Cpu_delay_max uint64
Cpu_delay_min uint64
Blkio_count uint64
Blkio_delay_total uint64
Blkio_delay_max uint64
Blkio_delay_min uint64
Swapin_count uint64
Swapin_delay_total uint64
Swapin_delay_max uint64
Swapin_delay_min uint64
Cpu_run_real_total uint64
Cpu_run_virtual_total uint64
Ac_comm [32]int8
@ -320,11 +326,17 @@ type Taskstats struct {
Cpu_scaled_run_real_total uint64
Freepages_count uint64
Freepages_delay_total uint64
Freepages_delay_max uint64
Freepages_delay_min uint64
Thrashing_count uint64
Thrashing_delay_total uint64
Thrashing_delay_max uint64
Thrashing_delay_min uint64
Ac_btime64 uint64
Compact_count uint64
Compact_delay_total uint64
Compact_delay_max uint64
Compact_delay_min uint64
Ac_tgid uint32
_ [4]byte
Ac_tgetime uint64
@ -332,8 +344,12 @@ type Taskstats struct {
Ac_exe_inode uint64
Wpcopy_count uint64
Wpcopy_delay_total uint64
Wpcopy_delay_max uint64
Wpcopy_delay_min uint64
Irq_count uint64
Irq_delay_total uint64
Irq_delay_max uint64
Irq_delay_min uint64
}
type cpuMask uint32

View file

@ -288,10 +288,16 @@ type Taskstats struct {
_ [4]byte
Cpu_count uint64
Cpu_delay_total uint64
Cpu_delay_max uint64
Cpu_delay_min uint64
Blkio_count uint64
Blkio_delay_total uint64
Blkio_delay_max uint64
Blkio_delay_min uint64
Swapin_count uint64
Swapin_delay_total uint64
Swapin_delay_max uint64
Swapin_delay_min uint64
Cpu_run_real_total uint64
Cpu_run_virtual_total uint64
Ac_comm [32]uint8
@ -327,11 +333,17 @@ type Taskstats struct {
Cpu_scaled_run_real_total uint64
Freepages_count uint64
Freepages_delay_total uint64
Freepages_delay_max uint64
Freepages_delay_min uint64
Thrashing_count uint64
Thrashing_delay_total uint64
Thrashing_delay_max uint64
Thrashing_delay_min uint64
Ac_btime64 uint64
Compact_count uint64
Compact_delay_total uint64
Compact_delay_max uint64
Compact_delay_min uint64
Ac_tgid uint32
_ [4]byte
Ac_tgetime uint64
@ -339,8 +351,12 @@ type Taskstats struct {
Ac_exe_inode uint64
Wpcopy_count uint64
Wpcopy_delay_total uint64
Wpcopy_delay_max uint64
Wpcopy_delay_min uint64
Irq_count uint64
Irq_delay_total uint64
Irq_delay_max uint64
Irq_delay_min uint64
}
type cpuMask uint32

View file

@ -289,10 +289,16 @@ type Taskstats struct {
Ac_nice uint8
Cpu_count uint64
Cpu_delay_total uint64
Cpu_delay_max uint64
Cpu_delay_min uint64
Blkio_count uint64
Blkio_delay_total uint64
Blkio_delay_max uint64
Blkio_delay_min uint64
Swapin_count uint64
Swapin_delay_total uint64
Swapin_delay_max uint64
Swapin_delay_min uint64
Cpu_run_real_total uint64
Cpu_run_virtual_total uint64
Ac_comm [32]uint8
@ -327,19 +333,29 @@ type Taskstats struct {
Cpu_scaled_run_real_total uint64
Freepages_count uint64
Freepages_delay_total uint64
Freepages_delay_max uint64
Freepages_delay_min uint64
Thrashing_count uint64
Thrashing_delay_total uint64
Thrashing_delay_max uint64
Thrashing_delay_min uint64
Ac_btime64 uint64
Compact_count uint64
Compact_delay_total uint64
Compact_delay_max uint64
Compact_delay_min uint64
Ac_tgid uint32
Ac_tgetime uint64
Ac_exe_dev uint64
Ac_exe_inode uint64
Wpcopy_count uint64
Wpcopy_delay_total uint64
Wpcopy_delay_max uint64
Wpcopy_delay_min uint64
Irq_count uint64
Irq_delay_total uint64
Irq_delay_max uint64
Irq_delay_min uint64
}
type cpuMask uint64

View file

@ -289,10 +289,16 @@ type Taskstats struct {
Ac_nice uint8
Cpu_count uint64
Cpu_delay_total uint64
Cpu_delay_max uint64
Cpu_delay_min uint64
Blkio_count uint64
Blkio_delay_total uint64
Blkio_delay_max uint64
Blkio_delay_min uint64
Swapin_count uint64
Swapin_delay_total uint64
Swapin_delay_max uint64
Swapin_delay_min uint64
Cpu_run_real_total uint64
Cpu_run_virtual_total uint64
Ac_comm [32]uint8
@ -327,19 +333,29 @@ type Taskstats struct {
Cpu_scaled_run_real_total uint64
Freepages_count uint64
Freepages_delay_total uint64
Freepages_delay_max uint64
Freepages_delay_min uint64
Thrashing_count uint64
Thrashing_delay_total uint64
Thrashing_delay_max uint64
Thrashing_delay_min uint64
Ac_btime64 uint64
Compact_count uint64
Compact_delay_total uint64
Compact_delay_max uint64
Compact_delay_min uint64
Ac_tgid uint32
Ac_tgetime uint64
Ac_exe_dev uint64
Ac_exe_inode uint64
Wpcopy_count uint64
Wpcopy_delay_total uint64
Wpcopy_delay_max uint64
Wpcopy_delay_min uint64
Irq_count uint64
Irq_delay_total uint64
Irq_delay_max uint64
Irq_delay_min uint64
}
type cpuMask uint64

View file

@ -307,10 +307,16 @@ type Taskstats struct {
Ac_nice uint8
Cpu_count uint64
Cpu_delay_total uint64
Cpu_delay_max uint64
Cpu_delay_min uint64
Blkio_count uint64
Blkio_delay_total uint64
Blkio_delay_max uint64
Blkio_delay_min uint64
Swapin_count uint64
Swapin_delay_total uint64
Swapin_delay_max uint64
Swapin_delay_min uint64
Cpu_run_real_total uint64
Cpu_run_virtual_total uint64
Ac_comm [32]uint8
@ -345,19 +351,29 @@ type Taskstats struct {
Cpu_scaled_run_real_total uint64
Freepages_count uint64
Freepages_delay_total uint64
Freepages_delay_max uint64
Freepages_delay_min uint64
Thrashing_count uint64
Thrashing_delay_total uint64
Thrashing_delay_max uint64
Thrashing_delay_min uint64
Ac_btime64 uint64
Compact_count uint64
Compact_delay_total uint64
Compact_delay_max uint64
Compact_delay_min uint64
Ac_tgid uint32
Ac_tgetime uint64
Ac_exe_dev uint64
Ac_exe_inode uint64
Wpcopy_count uint64
Wpcopy_delay_total uint64
Wpcopy_delay_max uint64
Wpcopy_delay_min uint64
Irq_count uint64
Irq_delay_total uint64
Irq_delay_max uint64
Irq_delay_min uint64
}
type cpuMask uint64

View file

@ -302,10 +302,16 @@ type Taskstats struct {
Ac_nice uint8
Cpu_count uint64
Cpu_delay_total uint64
Cpu_delay_max uint64
Cpu_delay_min uint64
Blkio_count uint64
Blkio_delay_total uint64
Blkio_delay_max uint64
Blkio_delay_min uint64
Swapin_count uint64
Swapin_delay_total uint64
Swapin_delay_max uint64
Swapin_delay_min uint64
Cpu_run_real_total uint64
Cpu_run_virtual_total uint64
Ac_comm [32]int8
@ -340,19 +346,29 @@ type Taskstats struct {
Cpu_scaled_run_real_total uint64
Freepages_count uint64
Freepages_delay_total uint64
Freepages_delay_max uint64
Freepages_delay_min uint64
Thrashing_count uint64
Thrashing_delay_total uint64
Thrashing_delay_max uint64
Thrashing_delay_min uint64
Ac_btime64 uint64
Compact_count uint64
Compact_delay_total uint64
Compact_delay_max uint64
Compact_delay_min uint64
Ac_tgid uint32
Ac_tgetime uint64
Ac_exe_dev uint64
Ac_exe_inode uint64
Wpcopy_count uint64
Wpcopy_delay_total uint64
Wpcopy_delay_max uint64
Wpcopy_delay_min uint64
Irq_count uint64
Irq_delay_total uint64
Irq_delay_max uint64
Irq_delay_min uint64
}
type cpuMask uint64

View file

@ -284,10 +284,16 @@ type Taskstats struct {
Ac_nice uint8
Cpu_count uint64
Cpu_delay_total uint64
Cpu_delay_max uint64
Cpu_delay_min uint64
Blkio_count uint64
Blkio_delay_total uint64
Blkio_delay_max uint64
Blkio_delay_min uint64
Swapin_count uint64
Swapin_delay_total uint64
Swapin_delay_max uint64
Swapin_delay_min uint64
Cpu_run_real_total uint64
Cpu_run_virtual_total uint64
Ac_comm [32]int8
@ -322,19 +328,29 @@ type Taskstats struct {
Cpu_scaled_run_real_total uint64
Freepages_count uint64
Freepages_delay_total uint64
Freepages_delay_max uint64
Freepages_delay_min uint64
Thrashing_count uint64
Thrashing_delay_total uint64
Thrashing_delay_max uint64
Thrashing_delay_min uint64
Ac_btime64 uint64
Compact_count uint64
Compact_delay_total uint64
Compact_delay_max uint64
Compact_delay_min uint64
Ac_tgid uint32
Ac_tgetime uint64
Ac_exe_dev uint64
Ac_exe_inode uint64
Wpcopy_count uint64
Wpcopy_delay_total uint64
Wpcopy_delay_max uint64
Wpcopy_delay_min uint64
Irq_count uint64
Irq_delay_total uint64
Irq_delay_max uint64
Irq_delay_min uint64
}
type cpuMask uint64

View file

@ -36,13 +36,13 @@ const (
)
// LookupAll only returns those Candidates whose import path
// finds all the nms.
func (ix *Index) LookupAll(pkg string, names ...string) map[string][]Candidate {
// finds all the names.
func (ix *Index) LookupAll(pkgName string, names ...string) map[string][]Candidate {
// this can be made faster when benchmarks show that it needs to be
names = uniquify(names)
byImpPath := make(map[string][]Candidate)
for _, nm := range names {
cands := ix.Lookup(pkg, nm, false)
cands := ix.Lookup(pkgName, nm, false)
for _, c := range cands {
byImpPath[c.ImportPath] = append(byImpPath[c.ImportPath], c)
}
@ -67,9 +67,9 @@ func uniquify(in []string) []string {
// Lookup finds all the symbols in the index with the given PkgName and name.
// If prefix is true, it finds all of these with name as a prefix.
func (ix *Index) Lookup(pkg, name string, prefix bool) []Candidate {
loc, ok := slices.BinarySearchFunc(ix.Entries, pkg, func(e Entry, pkg string) int {
return strings.Compare(e.PkgName, pkg)
func (ix *Index) Lookup(pkgName, name string, prefix bool) []Candidate {
loc, ok := slices.BinarySearchFunc(ix.Entries, pkgName, func(e Entry, pkg string) int {
return strings.Compare(e.PkgName, pkgName)
})
if !ok {
return nil // didn't find the package
@ -78,7 +78,7 @@ func (ix *Index) Lookup(pkg, name string, prefix bool) []Candidate {
// loc is the first entry for this package name, but there may be several
for i := loc; i < len(ix.Entries); i++ {
e := ix.Entries[i]
if e.PkgName != pkg {
if e.PkgName != pkgName {
break // end of sorted package names
}
nloc, ok := slices.BinarySearchFunc(e.Names, name, func(s string, name string) int {
@ -105,7 +105,7 @@ func (ix *Index) Lookup(pkg, name string, prefix bool) []Candidate {
continue // should never happen
}
px := Candidate{
PkgName: pkg,
PkgName: pkgName,
Name: flds[0],
Dir: string(e.Dir),
ImportPath: e.ImportPath,

View file

@ -5,4 +5,4 @@
package internal
// Version is the current tagged release of the library.
const Version = "0.240.0"
const Version = "0.241.0"

View file

@ -253,7 +253,7 @@
"location": "northamerica-south1"
}
],
"etag": "\"36383730363437323837383838393538333732\"",
"etag": "\"31353834363234393531343533373938353433\"",
"icons": {
"x16": "https://www.google.com/images/icons/product/cloud_storage-16.png",
"x32": "https://www.google.com/images/icons/product/cloud_storage-32.png"
@ -3306,6 +3306,11 @@
"location": "query",
"type": "string"
},
"filter": {
"description": "Filter the returned objects. Currently only supported for the contexts field. If delimiter is set, the returned prefixes are exempt from this filter.",
"location": "query",
"type": "string"
},
"includeFoldersAsPrefixes": {
"description": "Only applicable if delimiter is set to '/'. If true, will also include folders and managed folders (besides objects) in the returned prefixes.",
"location": "query",
@ -4539,7 +4544,7 @@
}
}
},
"revision": "20250605",
"revision": "20250629",
"rootUrl": "https://storage.googleapis.com/",
"schemas": {
"AdvanceRelocateBucketOperationRequest": {
@ -5932,6 +5937,20 @@
"description": "Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream.",
"type": "string"
},
"contexts": {
"description": "User-defined or system-defined object contexts. Each object context is a key-payload pair, where the key provides the identification and the payload holds the associated value and additional metadata.",
"properties": {
"custom": {
"additionalProperties": {
"$ref": "ObjectCustomContextPayload",
"description": "A single user-defined object context."
},
"description": "User-defined object contexts.",
"type": "object"
}
},
"type": "object"
},
"crc32c": {
"description": "CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see [Data Validation and Change Detection](https://cloud.google.com/storage/docs/data-validation).",
"type": "string"
@ -6201,6 +6220,27 @@
},
"type": "object"
},
"ObjectCustomContextPayload": {
"description": "The payload of a single user-defined object context.",
"id": "ObjectCustomContextPayload",
"properties": {
"createTime": {
"description": "The time at which the object context was created in RFC 3339 format.",
"format": "date-time",
"type": "string"
},
"updateTime": {
"description": "The time at which the object context was last updated in RFC 3339 format.",
"format": "date-time",
"type": "string"
},
"value": {
"description": "The value of the object context.",
"type": "string"
}
},
"type": "object"
},
"Objects": {
"description": "A list of objects.",
"id": "Objects",

View file

@ -2212,6 +2212,10 @@ type Object struct {
// ContentType: Content-Type of the object data. If an object is stored without
// a Content-Type, it is served as application/octet-stream.
ContentType string `json:"contentType,omitempty"`
// Contexts: User-defined or system-defined object contexts. Each object
// context is a key-payload pair, where the key provides the identification and
// the payload holds the associated value and additional metadata.
Contexts *ObjectContexts `json:"contexts,omitempty"`
// Crc32c: CRC32c checksum, as described in RFC 4960, Appendix B; encoded using
// base64 in big-endian byte order. For more information about using the CRC32c
// checksum, see Data Validation and Change Detection
@ -2340,6 +2344,30 @@ func (s Object) MarshalJSON() ([]byte, error) {
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}
// ObjectContexts: User-defined or system-defined object contexts. Each object
// context is a key-payload pair, where the key provides the identification and
// the payload holds the associated value and additional metadata.
type ObjectContexts struct {
// Custom: User-defined object contexts.
Custom map[string]ObjectCustomContextPayload `json:"custom,omitempty"`
// ForceSendFields is a list of field names (e.g. "Custom") to unconditionally
// include in API requests. By default, fields with empty or default values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Custom") to include in API
// requests with the JSON null value. By default, fields with empty values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
func (s ObjectContexts) MarshalJSON() ([]byte, error) {
type NoMethod ObjectContexts
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}
// ObjectCustomerEncryption: Metadata of customer-supplied encryption key, if
// the object is encrypted by such a key.
type ObjectCustomerEncryption struct {
@ -2531,6 +2559,35 @@ func (s ObjectAccessControls) MarshalJSON() ([]byte, error) {
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}
// ObjectCustomContextPayload: The payload of a single user-defined object
// context.
type ObjectCustomContextPayload struct {
// CreateTime: The time at which the object context was created in RFC 3339
// format.
CreateTime string `json:"createTime,omitempty"`
// UpdateTime: The time at which the object context was last updated in RFC
// 3339 format.
UpdateTime string `json:"updateTime,omitempty"`
// Value: The value of the object context.
Value string `json:"value,omitempty"`
// ForceSendFields is a list of field names (e.g. "CreateTime") to
// unconditionally include in API requests. By default, fields with empty or
// default values are omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-ForceSendFields for more
// details.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "CreateTime") to include in API
// requests with the JSON null value. By default, fields with empty values are
// omitted from API requests. See
// https://pkg.go.dev/google.golang.org/api#hdr-NullFields for more details.
NullFields []string `json:"-"`
}
func (s ObjectCustomContextPayload) MarshalJSON() ([]byte, error) {
type NoMethod ObjectCustomContextPayload
return gensupport.MarshalJSON(NoMethod(s), s.ForceSendFields, s.NullFields)
}
// Objects: A list of objects.
type Objects struct {
// Items: The list of items.
@ -10916,6 +10973,14 @@ func (c *ObjectsListCall) EndOffset(endOffset string) *ObjectsListCall {
return c
}
// Filter sets the optional parameter "filter": Filter the returned objects.
// Currently only supported for the contexts field. If delimiter is set, the
// returned prefixes are exempt from this filter.
func (c *ObjectsListCall) Filter(filter string) *ObjectsListCall {
c.urlParams_.Set("filter", filter)
return c
}
// IncludeFoldersAsPrefixes sets the optional parameter
// "includeFoldersAsPrefixes": Only applicable if delimiter is set to '/'. If
// true, will also include folders and managed folders (besides objects) in the

34
vendor/modules.txt vendored
View file

@ -1,7 +1,7 @@
# cel.dev/expr v0.23.0
## explicit; go 1.22.0
cel.dev/expr
# cloud.google.com/go v0.121.2
# cloud.google.com/go v0.121.3
## explicit; go 1.23.0
cloud.google.com/go/internal
cloud.google.com/go/internal/optional
@ -27,7 +27,7 @@ cloud.google.com/go/auth/internal/transport/cert
# cloud.google.com/go/auth/oauth2adapt v0.2.8
## explicit; go 1.23.0
cloud.google.com/go/auth/oauth2adapt
# cloud.google.com/go/compute v1.39.0
# cloud.google.com/go/compute v1.40.0
## explicit; go 1.23.0
cloud.google.com/go/compute/apiv1
cloud.google.com/go/compute/apiv1/computepb
@ -691,7 +691,7 @@ github.com/getsentry/sentry-go/logrus
github.com/go-jose/go-jose/v4
github.com/go-jose/go-jose/v4/cipher
github.com/go-jose/go-jose/v4/json
# github.com/go-logr/logr v1.4.2
# github.com/go-logr/logr v1.4.3
## explicit; go 1.18
github.com/go-logr/logr
github.com/go-logr/logr/funcr
@ -710,7 +710,7 @@ github.com/go-openapi/analysis/internal/flatten/sortref
# github.com/go-openapi/errors v0.22.1
## explicit; go 1.20
github.com/go-openapi/errors
# github.com/go-openapi/jsonpointer v0.21.0
# github.com/go-openapi/jsonpointer v0.21.1
## explicit; go 1.20
github.com/go-openapi/jsonpointer
# github.com/go-openapi/jsonreference v0.21.0
@ -948,8 +948,8 @@ github.com/letsencrypt/boulder/strictyaml
github.com/mailru/easyjson/buffer
github.com/mailru/easyjson/jlexer
github.com/mailru/easyjson/jwriter
# github.com/mattn/go-colorable v0.1.13
## explicit; go 1.15
# github.com/mattn/go-colorable v0.1.14
## explicit; go 1.18
github.com/mattn/go-colorable
# github.com/mattn/go-isatty v0.0.20
## explicit; go 1.15
@ -1053,7 +1053,7 @@ github.com/oracle/oci-go-sdk/v54/workrequests
## explicit; go 1.23.9
github.com/osbuild/blueprint/internal/common
github.com/osbuild/blueprint/pkg/blueprint
# github.com/osbuild/images v0.158.0
# github.com/osbuild/images v0.164.0
## explicit; go 1.23.9
github.com/osbuild/images/data/dependencies
github.com/osbuild/images/data/repositories
@ -1395,7 +1395,7 @@ go.opentelemetry.io/otel/trace
go.opentelemetry.io/otel/trace/embedded
go.opentelemetry.io/otel/trace/internal/telemetry
go.opentelemetry.io/otel/trace/noop
# golang.org/x/crypto v0.39.0
# golang.org/x/crypto v0.40.0
## explicit; go 1.23.0
golang.org/x/crypto/acme
golang.org/x/crypto/acme/autocert
@ -1424,12 +1424,12 @@ golang.org/x/crypto/sha3
# golang.org/x/exp v0.0.0-20250103183323-7d7fa50e5329
## explicit; go 1.22.0
golang.org/x/exp/slices
# golang.org/x/mod v0.25.0
# golang.org/x/mod v0.26.0
## explicit; go 1.23.0
golang.org/x/mod/internal/lazyregexp
golang.org/x/mod/module
golang.org/x/mod/semver
# golang.org/x/net v0.41.0
# golang.org/x/net v0.42.0
## explicit; go 1.23.0
golang.org/x/net/html
golang.org/x/net/html/atom
@ -1453,11 +1453,11 @@ golang.org/x/oauth2/google/internal/stsexchange
golang.org/x/oauth2/internal
golang.org/x/oauth2/jws
golang.org/x/oauth2/jwt
# golang.org/x/sync v0.15.0
# golang.org/x/sync v0.16.0
## explicit; go 1.23.0
golang.org/x/sync/errgroup
golang.org/x/sync/semaphore
# golang.org/x/sys v0.33.0
# golang.org/x/sys v0.34.0
## explicit; go 1.23.0
golang.org/x/sys/cpu
golang.org/x/sys/execabs
@ -1465,10 +1465,10 @@ golang.org/x/sys/plan9
golang.org/x/sys/unix
golang.org/x/sys/windows
golang.org/x/sys/windows/registry
# golang.org/x/term v0.32.0
# golang.org/x/term v0.33.0
## explicit; go 1.23.0
golang.org/x/term
# golang.org/x/text v0.26.0
# golang.org/x/text v0.27.0
## explicit; go 1.23.0
golang.org/x/text/cases
golang.org/x/text/internal
@ -1486,7 +1486,7 @@ golang.org/x/text/width
# golang.org/x/time v0.12.0
## explicit; go 1.23.0
golang.org/x/time/rate
# golang.org/x/tools v0.34.0
# golang.org/x/tools v0.35.0
## explicit; go 1.23.0
golang.org/x/tools/go/ast/astutil
golang.org/x/tools/imports
@ -1499,7 +1499,7 @@ golang.org/x/tools/internal/gopathwalk
golang.org/x/tools/internal/imports
golang.org/x/tools/internal/modindex
golang.org/x/tools/internal/stdlib
# google.golang.org/api v0.240.0
# google.golang.org/api v0.241.0
## explicit; go 1.23.0
google.golang.org/api/googleapi
google.golang.org/api/googleapi/transport
@ -1523,7 +1523,7 @@ google.golang.org/genproto/googleapis/type/calendarperiod
google.golang.org/genproto/googleapis/type/date
google.golang.org/genproto/googleapis/type/expr
google.golang.org/genproto/googleapis/type/timeofday
# google.golang.org/genproto/googleapis/api v0.0.0-20250528174236-200df99c418a
# google.golang.org/genproto/googleapis/api v0.0.0-20250603155806-513f23925822
## explicit; go 1.23.0
google.golang.org/genproto/googleapis/api
google.golang.org/genproto/googleapis/api/annotations