Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package buildkit for openSUSE:Factory checked in at 2026-07-03 16:09:46 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/buildkit (Old) and /work/SRC/openSUSE:Factory/.buildkit.new.1982 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "buildkit" Fri Jul 3 16:09:46 2026 rev:29 rq:1363594 version:0.31.1 Changes: -------- --- /work/SRC/openSUSE:Factory/buildkit/buildkit.changes 2026-06-22 17:25:38.833820396 +0200 +++ /work/SRC/openSUSE:Factory/.buildkit.new.1982/buildkit.changes 2026-07-03 16:09:58.279799945 +0200 @@ -1,0 +2,13 @@ +Mon Jun 29 07:54:09 UTC 2026 - Bharti Gautam <[email protected]> + +- Update to version 0.31.1: + * Dockerfile: allow cross-compilation without binfmt helper + * user: limit size of parsed passwd/group files + * security: validate exec security modes + * feat: not fail on non-default ports + * ci: pin js-yaml install + * ci: tolerate empty test matrix includes + * vendor: migrate to github.com/gohugoio/hashstructure + * util/tracing: remove fallbacks for OTEL_TRACE_PARENT, OTEL_TRACE_STATE + +------------------------------------------------------------------- Old: ---- buildkit-0.31.0.obscpio New: ---- buildkit-0.31.1.obscpio buildkit-0.31.1.tar.zst ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ buildkit.spec ++++++ --- /var/tmp/diff_new_pack.1ovQaU/_old 2026-07-03 16:10:01.271903716 +0200 +++ /var/tmp/diff_new_pack.1ovQaU/_new 2026-07-03 16:10:01.275903855 +0200 @@ -23,7 +23,7 @@ %global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo} %global import_path %{provider_prefix} Name: buildkit -Version: 0.31.0 +Version: 0.31.1 Release: 0 Summary: Toolkit for converting source code to build artifacts License: Apache-2.0 ++++++ _service ++++++ --- /var/tmp/diff_new_pack.1ovQaU/_old 2026-07-03 16:10:01.379907462 +0200 +++ /var/tmp/diff_new_pack.1ovQaU/_new 2026-07-03 16:10:01.411908572 +0200 @@ -3,7 +3,7 @@ <param name="url">https://github.com/moby/buildkit.git</param> <param name="scm">git</param> <param name="filename">buildkit</param> - <param name="version">v0.31.0</param> + <param name="version">v0.31.1</param> <param name="changesgenerate">enable</param> <param name="versionrewrite-pattern">v(.*)</param> </service> ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.1ovQaU/_old 2026-07-03 16:10:01.479910930 +0200 +++ /var/tmp/diff_new_pack.1ovQaU/_new 2026-07-03 16:10:01.483911069 +0200 @@ -1,7 +1,7 @@ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/moby/buildkit.git</param> - <param name="changesrevision">933d1e71c2256a8b91c6accd0e61873da08c63d8</param> + <param name="changesrevision">8e99dc1f10bf903712c228b49405d6f9b3d835c8</param> </service> </servicedata> (No newline at EOF) ++++++ buildkit-0.31.0.obscpio -> buildkit-0.31.1.obscpio ++++++ ++++ 2224 lines of diff (skipped) ++++++ buildkit.obsinfo ++++++ --- /var/tmp/diff_new_pack.1ovQaU/_old 2026-07-03 16:10:19.720543545 +0200 +++ /var/tmp/diff_new_pack.1ovQaU/_new 2026-07-03 16:10:19.732543962 +0200 @@ -1,5 +1,5 @@ name: buildkit -version: 0.31.0 -mtime: 1781858225 -commit: 933d1e71c2256a8b91c6accd0e61873da08c63d8 +version: 0.31.1 +mtime: 1782517880 +commit: 8e99dc1f10bf903712c228b49405d6f9b3d835c8 ++++++ vendor.tar.zst ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/github.com/gohugoio/hashstructure/.gitignore new/vendor/github.com/gohugoio/hashstructure/.gitignore --- old/vendor/github.com/gohugoio/hashstructure/.gitignore 1970-01-01 01:00:00.000000000 +0100 +++ new/vendor/github.com/gohugoio/hashstructure/.gitignore 2026-06-27 01:51:20.000000000 +0200 @@ -0,0 +1 @@ +*.test \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/github.com/gohugoio/hashstructure/LICENSE new/vendor/github.com/gohugoio/hashstructure/LICENSE --- old/vendor/github.com/gohugoio/hashstructure/LICENSE 1970-01-01 01:00:00.000000000 +0100 +++ new/vendor/github.com/gohugoio/hashstructure/LICENSE 2026-06-27 01:51:20.000000000 +0200 @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 Mitchell Hashimoto + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/github.com/gohugoio/hashstructure/README.md new/vendor/github.com/gohugoio/hashstructure/README.md --- old/vendor/github.com/gohugoio/hashstructure/README.md 1970-01-01 01:00:00.000000000 +0100 +++ new/vendor/github.com/gohugoio/hashstructure/README.md 2026-06-27 01:51:20.000000000 +0200 @@ -0,0 +1,67 @@ +# hashstructure [](https://godoc.org/github.com/mitchellh/hashstructure) + +hashstructure is a Go library for creating a unique hash value +for arbitrary values in Go. + +This can be used to key values in a hash (for use in a map, set, etc.) +that are complex. The most common use case is comparing two values without +sending data across the network, caching values locally (de-dup), and so on. + +## Features + + * Hash any arbitrary Go value, including complex types. + + * Tag a struct field to ignore it and not affect the hash value. + + * Tag a slice type struct field to treat it as a set where ordering + doesn't affect the hash code but the field itself is still taken into + account to create the hash value. + + * Optionally, specify a custom hash function to optimize for speed, collision + avoidance for your data set, etc. + + * Optionally, hash the output of `.String()` on structs that implement fmt.Stringer, + allowing effective hashing of time.Time + + * Optionally, override the hashing process by implementing `Hashable`. + +## Installation + +Standard `go get`: + +``` +$ go get github.com/gohugoio/hashstructure +``` + +## Usage & Example + +For usage and examples see the [Godoc](http://godoc.org/github.com/mitchellh/hashstructure). + +A quick code example is shown below: + +```go +type ComplexStruct struct { + Name string + Age uint + Metadata map[string]interface{} +} + +v := ComplexStruct{ + Name: "mitchellh", + Age: 64, + Metadata: map[string]interface{}{ + "car": true, + "location": "California", + "siblings": []string{"Bob", "John"}, + }, +} + +hash, err := hashstructure.Hash(v, nil) +if err != nil { + panic(err) +} + +fmt.Printf("%d", hash) +// Output: +// 2307517237273902113 +``` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/github.com/gohugoio/hashstructure/errors.go new/vendor/github.com/gohugoio/hashstructure/errors.go --- old/vendor/github.com/gohugoio/hashstructure/errors.go 1970-01-01 01:00:00.000000000 +0100 +++ new/vendor/github.com/gohugoio/hashstructure/errors.go 2026-06-27 01:51:20.000000000 +0200 @@ -0,0 +1,22 @@ +package hashstructure + +import ( + "fmt" +) + +// ErrNotStringer is returned when there's an error with hash:"string" +type ErrNotStringer struct { + Field string +} + +// Error implements error for ErrNotStringer +func (ens *ErrNotStringer) Error() string { + return fmt.Sprintf("hashstructure: %s has hash:\"string\" set, but does not implement fmt.Stringer", ens.Field) +} + +// ErrFormat is returned when an invalid format is given to the Hash function. +type ErrFormat struct{} + +func (*ErrFormat) Error() string { + return "format must be one of the defined Format values in the hashstructure library" +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/github.com/gohugoio/hashstructure/hashstructure.go new/vendor/github.com/gohugoio/hashstructure/hashstructure.go --- old/vendor/github.com/gohugoio/hashstructure/hashstructure.go 1970-01-01 01:00:00.000000000 +0100 +++ new/vendor/github.com/gohugoio/hashstructure/hashstructure.go 2026-06-27 01:51:20.000000000 +0200 @@ -0,0 +1,571 @@ +package hashstructure + +import ( + "encoding/binary" + "fmt" + "hash" + "hash/fnv" + "math" + "reflect" + "time" + "unsafe" +) + +// HashOptions are options that are available for hashing. +type HashOptions struct { + // Hasher is the hash function to use. If this isn't set, it will + // default to FNV. + Hasher hash.Hash64 + + // TagName is the struct tag to look at when hashing the structure. + // By default this is "hash". + TagName string + + // ZeroNil is flag determining if nil pointer should be treated equal + // to a zero value of pointed type. By default this is false. + ZeroNil bool + + // IgnoreZeroValue is determining if zero value fields should be + // ignored for hash calculation. + IgnoreZeroValue bool + + // SlicesAsSets assumes that a `set` tag is always present for slices. + // Default is false (in which case the tag is used instead) + SlicesAsSets bool + + // UseStringer will attempt to use fmt.Stringer always. If the struct + // doesn't implement fmt.Stringer, it'll fall back to trying usual tricks. + // If this is true, and the "string" tag is also set, the tag takes + // precedence (meaning that if the type doesn't implement fmt.Stringer, we + // panic) + UseStringer bool +} + +// Hash returns the hash value of an arbitrary value. +// +// If opts is nil, then default options will be used. See HashOptions +// for the default values. The same *HashOptions value cannot be used +// concurrently. None of the values within a *HashOptions struct are +// safe to read/write while hashing is being done. +// +// The "format" is required and must be one of the format values defined +// by this library. You should probably just use "FormatV2". This allows +// generated hashes uses alternate logic to maintain compatibility with +// older versions. +// +// Notes on the value: +// +// - Unexported fields on structs are ignored and do not affect the +// hash value. +// +// - Adding an exported field to a struct with the zero value will change +// the hash value. +// +// For structs, the hashing can be controlled using tags. For example: +// +// struct { +// Name string +// UUID string `hash:"ignore"` +// } +// +// The available tag values are: +// +// - "ignore" or "-" - The field will be ignored and not affect the hash code. +// +// - "set" - The field will be treated as a set, where ordering doesn't +// affect the hash code. This only works for slices. +// +// - "string" - The field will be hashed as a string, only works when the +// field implements fmt.Stringer +func Hash(v interface{}, opts *HashOptions) (uint64, error) { + // Create default options + if opts == nil { + opts = &HashOptions{} + } + if opts.Hasher == nil { + opts.Hasher = fnv.New64() + } + if opts.TagName == "" { + opts.TagName = "hash" + } + + // Reset the hash + opts.Hasher.Reset() + + // Fast path for strings. + if s, ok := v.(string); ok { + return hashString(opts.Hasher, s) + } + + // Create our walker and walk the structure + w := &walker{ + h: opts.Hasher, + tag: opts.TagName, + zeronil: opts.ZeroNil, + ignorezerovalue: opts.IgnoreZeroValue, + sets: opts.SlicesAsSets, + stringer: opts.UseStringer, + } + return w.visit(reflect.ValueOf(v), nil) +} + +type walker struct { + h hash.Hash64 + tag string + zeronil bool + ignorezerovalue bool + sets bool + stringer bool + buf [16]byte // Reusable buffer for binary encoding +} + +type visitOpts struct { + // Flags are a bitmask of flags to affect behavior of this visit + Flags visitFlag + + // Information about the struct containing this field + Struct interface{} + StructField string +} + +var timeType = reflect.TypeOf(time.Time{}) + +// A direct hash calculation used for numeric and bool values. +func (w *walker) hashDirect(v any) (uint64, error) { + w.h.Reset() + + // Use direct byte manipulation for numbers instead of binary.Write to avoid allocations + switch val := v.(type) { + case int64: + binary.LittleEndian.PutUint64(w.buf[:8], uint64(val)) + w.h.Write(w.buf[:8]) + case uint64: + binary.LittleEndian.PutUint64(w.buf[:8], val) + w.h.Write(w.buf[:8]) + case int8: + w.buf[0] = byte(val) + w.h.Write(w.buf[:1]) + case uint8: + w.buf[0] = val + w.h.Write(w.buf[:1]) + case int16: + binary.LittleEndian.PutUint16(w.buf[:2], uint16(val)) + w.h.Write(w.buf[:2]) + case uint16: + binary.LittleEndian.PutUint16(w.buf[:2], val) + w.h.Write(w.buf[:2]) + case int32: + binary.LittleEndian.PutUint32(w.buf[:4], uint32(val)) + w.h.Write(w.buf[:4]) + case uint32: + binary.LittleEndian.PutUint32(w.buf[:4], val) + w.h.Write(w.buf[:4]) + case float32: + binary.LittleEndian.PutUint32(w.buf[:4], math.Float32bits(val)) + w.h.Write(w.buf[:4]) + case float64: + binary.LittleEndian.PutUint64(w.buf[:8], math.Float64bits(val)) + w.h.Write(w.buf[:8]) + case complex64: + binary.LittleEndian.PutUint32(w.buf[:4], math.Float32bits(real(val))) + binary.LittleEndian.PutUint32(w.buf[4:8], math.Float32bits(imag(val))) + w.h.Write(w.buf[:8]) + case complex128: + binary.LittleEndian.PutUint64(w.buf[:8], math.Float64bits(real(val))) + binary.LittleEndian.PutUint64(w.buf[8:16], math.Float64bits(imag(val))) + w.h.Write(w.buf[:16]) + default: + // Fallback to binary.Write for unsupported types, for instance enums + err := binary.Write(w.h, binary.LittleEndian, v) + return w.h.Sum64(), err + } + + return w.h.Sum64(), nil +} + +// A direct hash calculation used for strings. +func (w *walker) hashString(s string) (uint64, error) { + return hashString(w.h, s) +} + +// A direct hash calculation used for strings. +func hashString(h hash.Hash64, s string) (uint64, error) { + h.Reset() + + // Use zero-copy conversion from string to []byte using unsafe + if len(s) > 0 { + b := unsafe.Slice(unsafe.StringData(s), len(s)) + h.Write(b) + } + return h.Sum64(), nil +} + +func (w *walker) visit(v reflect.Value, opts *visitOpts) (uint64, error) { + t := reflect.TypeOf(0) + + // Loop since these can be wrapped in multiple layers of pointers + // and interfaces. + for { + // If we have an interface, dereference it. We have to do this up + // here because it might be a nil in there and the check below must + // catch that. + if v.Kind() == reflect.Interface { + v = v.Elem() + continue + } + + if v.Kind() == reflect.Ptr { + if w.zeronil { + t = v.Type().Elem() + } + v = reflect.Indirect(v) + continue + } + + break + } + + // If it is nil, treat it like a zero. + if !v.IsValid() { + v = reflect.Zero(t) + } + + if v.CanInt() { + i := v.Int() + switch v.Kind() { + case reflect.Int: + return w.hashDirect(i) + case reflect.Int8: + return w.hashDirect(int8(i)) + case reflect.Int16: + return w.hashDirect(int16(i)) + case reflect.Int32: + return w.hashDirect(int32(i)) + case reflect.Int64: + return w.hashDirect(i) + } + } + + if v.CanUint() { + u := v.Uint() + switch v.Kind() { + case reflect.Uint: + return w.hashDirect(u) + case reflect.Uint8: + return w.hashDirect(uint8(u)) + case reflect.Uint16: + return w.hashDirect(uint16(u)) + case reflect.Uint32: + return w.hashDirect(uint32(u)) + case reflect.Uint64: + return w.hashDirect(u) + } + } + + if v.CanFloat() { + f := v.Float() + switch v.Kind() { + case reflect.Float32: + return w.hashDirect(float32(f)) + case reflect.Float64: + return w.hashDirect(f) + } + } + + if v.CanComplex() { + c := v.Complex() + switch v.Kind() { + case reflect.Complex64: + return w.hashDirect(complex64(c)) + case reflect.Complex128: + return w.hashDirect(c) + } + } + + k := v.Kind() + + if k == reflect.Bool { + var tmp int8 + if v.Bool() { + tmp = 1 + } + return w.hashDirect(tmp) + } + + switch v.Type() { + case timeType: + w.h.Reset() + b, err := v.Interface().(time.Time).MarshalBinary() + if err != nil { + return 0, err + } + + w.h.Write(b) + return w.h.Sum64(), nil + } + + switch k { + case reflect.Array: + var h uint64 + l := v.Len() + for i := 0; i < l; i++ { + current, err := w.visit(v.Index(i), nil) + if err != nil { + return 0, err + } + + h = hashUpdateOrdered(w.h, h, current) + } + + return h, nil + + case reflect.Map: + var includeMap IncludableMap + var field string + + if v, ok := v.Interface().(IncludableMap); ok { + includeMap = v + } else if opts != nil && opts.Struct != nil { + if v, ok := opts.Struct.(IncludableMap); ok { + includeMap, field = v, opts.StructField + } + } + + // Build the hash for the map. We do this by XOR-ing all the key + // and value hashes. This makes it deterministic despite ordering. + var h uint64 + + k := reflect.New(v.Type().Key()).Elem() + vv := reflect.New(v.Type().Elem()).Elem() + + iter := v.MapRange() + + for iter.Next() { + k.SetIterKey(iter) + vv.SetIterValue(iter) + if includeMap != nil { + incl, err := includeMap.HashIncludeMap(field, k.Interface(), vv.Interface()) + if err != nil { + return 0, err + } + if !incl { + continue + } + } + + kh, err := w.visit(k, nil) + if err != nil { + return 0, err + } + vh, err := w.visit(vv, nil) + if err != nil { + return 0, err + } + + fieldHash := hashUpdateOrdered(w.h, kh, vh) + h = hashUpdateUnordered(h, fieldHash) + } + + // Important: read the docs for hashFinishUnordered + h = hashFinishUnordered(w.h, h) + + return h, nil + + case reflect.Struct: + var include Includable + var parent interface{} + + // Check if we can address this value first (more common case for pointer receivers) + if v.CanAddr() { + vptr := v.Addr() + parentptr := vptr.Interface() + if impl, ok := parentptr.(Includable); ok { + include = impl + } + + if impl, ok := parentptr.(Hashable); ok { + return impl.Hash() + } + // Only set parent if we'll need it for IncludableMap + parent = parentptr + } + + // Only box the value if we haven't already found an implementation via pointer + if include == nil && parent == nil { + parent = v.Interface() + if impl, ok := parent.(Includable); ok { + include = impl + } + + if impl, ok := parent.(Hashable); ok { + return impl.Hash() + } + } + + t := v.Type() + h, err := w.hashString(t.Name()) + if err != nil { + return 0, err + } + + l := v.NumField() + var fieldOpts visitOpts + // Defer boxing parent until we know we need it + if parent == nil { + parent = v.Interface() + } + fieldOpts.Struct = parent + + for i := 0; i < l; i++ { + if innerV := v.Field(i); v.CanSet() || t.Field(i).Name != "_" { + fieldType := t.Field(i) + if fieldType.PkgPath != "" { + // Unexported + continue + } + + tag := fieldType.Tag.Get(w.tag) + if tag == "ignore" || tag == "-" { + // Ignore this field + continue + } + + if w.ignorezerovalue { + if innerV.IsZero() { + continue + } + } + + // if string is set, use the string value + if tag == "string" || w.stringer { + if impl, ok := innerV.Interface().(fmt.Stringer); ok { + innerV = reflect.ValueOf(impl.String()) + } else if tag == "string" { + // We only show this error if the tag explicitly + // requests a stringer. + return 0, &ErrNotStringer{ + Field: v.Type().Field(i).Name, + } + } + } + + // Check if we implement includable and check it + if include != nil { + incl, err := include.HashInclude(fieldType.Name, innerV) + if err != nil { + return 0, err + } + if !incl { + continue + } + } + + fieldOpts.Flags = 0 + if tag == "set" { + fieldOpts.Flags |= visitFlagSet + } + + kh, err := w.hashString(fieldType.Name) + if err != nil { + return 0, err + } + + fieldOpts.StructField = fieldType.Name + vh, err := w.visit(innerV, &fieldOpts) + if err != nil { + return 0, err + } + + fieldHash := hashUpdateOrdered(w.h, kh, vh) + h = hashUpdateUnordered(h, fieldHash) + } + // Important: read the docs for hashFinishUnordered + h = hashFinishUnordered(w.h, h) + } + + return h, nil + + case reflect.Slice: + // We have two behaviors here. If it isn't a set, then we just + // visit all the elements. If it is a set, then we do a deterministic + // hash code. + var h uint64 + var set bool + if opts != nil { + set = (opts.Flags & visitFlagSet) != 0 + } + l := v.Len() + for i := 0; i < l; i++ { + current, err := w.visit(v.Index(i), nil) + if err != nil { + return 0, err + } + + if set || w.sets { + h = hashUpdateUnordered(h, current) + } else { + h = hashUpdateOrdered(w.h, h, current) + } + } + + if set { + // Important: read the docs for hashFinishUnordered + h = hashFinishUnordered(w.h, h) + } + + return h, nil + + case reflect.String: + return w.hashString(v.String()) + default: + return 0, fmt.Errorf("unknown kind to hash: %s", k) + } +} + +func hashUpdateOrdered(h hash.Hash64, a, b uint64) uint64 { + // For ordered updates, use a real hash function + h.Reset() + + var buf [16]byte + binary.LittleEndian.PutUint64(buf[0:8], a) + binary.LittleEndian.PutUint64(buf[8:16], b) + h.Write(buf[:]) + + return h.Sum64() +} + +func hashUpdateUnordered(a, b uint64) uint64 { + return a ^ b +} + +// After mixing a group of unique hashes with hashUpdateUnordered, it's always +// necessary to call hashFinishUnordered. Why? Because hashUpdateUnordered +// is a simple XOR, and calling hashUpdateUnordered on hashes produced by +// hashUpdateUnordered can effectively cancel out a previous change to the hash +// result if the same hash value appears later on. For example, consider: +// +// hashUpdateUnordered(hashUpdateUnordered("A", "B"), hashUpdateUnordered("A", "C")) = +// H("A") ^ H("B")) ^ (H("A") ^ H("C")) = +// (H("A") ^ H("A")) ^ (H("B") ^ H(C)) = +// H(B) ^ H(C) = +// hashUpdateUnordered(hashUpdateUnordered("Z", "B"), hashUpdateUnordered("Z", "C")) +// +// hashFinishUnordered "hardens" the result, so that encountering partially +// overlapping input data later on in a different context won't cancel out. +func hashFinishUnordered(h hash.Hash64, a uint64) uint64 { + h.Reset() + + var buf [8]byte + binary.LittleEndian.PutUint64(buf[:], a) + h.Write(buf[:]) + + return h.Sum64() +} + +// visitFlag is used as a bitmask for affecting visit behavior +type visitFlag uint + +const ( + visitFlagInvalid visitFlag = iota + visitFlagSet = iota << 1 +) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/github.com/gohugoio/hashstructure/include.go new/vendor/github.com/gohugoio/hashstructure/include.go --- old/vendor/github.com/gohugoio/hashstructure/include.go 1970-01-01 01:00:00.000000000 +0100 +++ new/vendor/github.com/gohugoio/hashstructure/include.go 2026-06-27 01:51:20.000000000 +0200 @@ -0,0 +1,22 @@ +package hashstructure + +// Includable is an interface that can optionally be implemented by +// a struct. It will be called for each field in the struct to check whether +// it should be included in the hash. +type Includable interface { + HashInclude(field string, v interface{}) (bool, error) +} + +// IncludableMap is an interface that can optionally be implemented by +// a struct. It will be called when a map-type field is found to ask the +// struct if the map item should be included in the hash. +type IncludableMap interface { + HashIncludeMap(field string, k, v interface{}) (bool, error) +} + +// Hashable is an interface that can optionally be implemented by a struct +// to override the hash value. This value will override the hash value for +// the entire struct. Entries in the struct will not be hashed. +type Hashable interface { + Hash() (uint64, error) +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/github.com/mitchellh/hashstructure/v2/LICENSE new/vendor/github.com/mitchellh/hashstructure/v2/LICENSE --- old/vendor/github.com/mitchellh/hashstructure/v2/LICENSE 2026-06-19 10:37:05.000000000 +0200 +++ new/vendor/github.com/mitchellh/hashstructure/v2/LICENSE 1970-01-01 01:00:00.000000000 +0100 @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2016 Mitchell Hashimoto - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/github.com/mitchellh/hashstructure/v2/README.md new/vendor/github.com/mitchellh/hashstructure/v2/README.md --- old/vendor/github.com/mitchellh/hashstructure/v2/README.md 2026-06-19 10:37:05.000000000 +0200 +++ new/vendor/github.com/mitchellh/hashstructure/v2/README.md 1970-01-01 01:00:00.000000000 +0100 @@ -1,76 +0,0 @@ -# hashstructure [](https://godoc.org/github.com/mitchellh/hashstructure) - -hashstructure is a Go library for creating a unique hash value -for arbitrary values in Go. - -This can be used to key values in a hash (for use in a map, set, etc.) -that are complex. The most common use case is comparing two values without -sending data across the network, caching values locally (de-dup), and so on. - -## Features - - * Hash any arbitrary Go value, including complex types. - - * Tag a struct field to ignore it and not affect the hash value. - - * Tag a slice type struct field to treat it as a set where ordering - doesn't affect the hash code but the field itself is still taken into - account to create the hash value. - - * Optionally, specify a custom hash function to optimize for speed, collision - avoidance for your data set, etc. - - * Optionally, hash the output of `.String()` on structs that implement fmt.Stringer, - allowing effective hashing of time.Time - - * Optionally, override the hashing process by implementing `Hashable`. - -## Installation - -Standard `go get`: - -``` -$ go get github.com/mitchellh/hashstructure/v2 -``` - -**Note on v2:** It is highly recommended you use the "v2" release since this -fixes some significant hash collisions issues from v1. In practice, we used -v1 for many years in real projects at HashiCorp and never had issues, but it -is highly dependent on the shape of the data you're hashing and how you use -those hashes. - -When using v2+, you can still generate weaker v1 hashes by using the -`FormatV1` format when calling `Hash`. - -## Usage & Example - -For usage and examples see the [Godoc](http://godoc.org/github.com/mitchellh/hashstructure). - -A quick code example is shown below: - -```go -type ComplexStruct struct { - Name string - Age uint - Metadata map[string]interface{} -} - -v := ComplexStruct{ - Name: "mitchellh", - Age: 64, - Metadata: map[string]interface{}{ - "car": true, - "location": "California", - "siblings": []string{"Bob", "John"}, - }, -} - -hash, err := hashstructure.Hash(v, hashstructure.FormatV2, nil) -if err != nil { - panic(err) -} - -fmt.Printf("%d", hash) -// Output: -// 2307517237273902113 -``` diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/github.com/mitchellh/hashstructure/v2/errors.go new/vendor/github.com/mitchellh/hashstructure/v2/errors.go --- old/vendor/github.com/mitchellh/hashstructure/v2/errors.go 2026-06-19 10:37:05.000000000 +0200 +++ new/vendor/github.com/mitchellh/hashstructure/v2/errors.go 1970-01-01 01:00:00.000000000 +0100 @@ -1,22 +0,0 @@ -package hashstructure - -import ( - "fmt" -) - -// ErrNotStringer is returned when there's an error with hash:"string" -type ErrNotStringer struct { - Field string -} - -// Error implements error for ErrNotStringer -func (ens *ErrNotStringer) Error() string { - return fmt.Sprintf("hashstructure: %s has hash:\"string\" set, but does not implement fmt.Stringer", ens.Field) -} - -// ErrFormat is returned when an invalid format is given to the Hash function. -type ErrFormat struct{} - -func (*ErrFormat) Error() string { - return "format must be one of the defined Format values in the hashstructure library" -} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/github.com/mitchellh/hashstructure/v2/hashstructure.go new/vendor/github.com/mitchellh/hashstructure/v2/hashstructure.go --- old/vendor/github.com/mitchellh/hashstructure/v2/hashstructure.go 2026-06-19 10:37:05.000000000 +0200 +++ new/vendor/github.com/mitchellh/hashstructure/v2/hashstructure.go 1970-01-01 01:00:00.000000000 +0100 @@ -1,482 +0,0 @@ -package hashstructure - -import ( - "encoding/binary" - "fmt" - "hash" - "hash/fnv" - "reflect" - "time" -) - -// HashOptions are options that are available for hashing. -type HashOptions struct { - // Hasher is the hash function to use. If this isn't set, it will - // default to FNV. - Hasher hash.Hash64 - - // TagName is the struct tag to look at when hashing the structure. - // By default this is "hash". - TagName string - - // ZeroNil is flag determining if nil pointer should be treated equal - // to a zero value of pointed type. By default this is false. - ZeroNil bool - - // IgnoreZeroValue is determining if zero value fields should be - // ignored for hash calculation. - IgnoreZeroValue bool - - // SlicesAsSets assumes that a `set` tag is always present for slices. - // Default is false (in which case the tag is used instead) - SlicesAsSets bool - - // UseStringer will attempt to use fmt.Stringer always. If the struct - // doesn't implement fmt.Stringer, it'll fall back to trying usual tricks. - // If this is true, and the "string" tag is also set, the tag takes - // precedence (meaning that if the type doesn't implement fmt.Stringer, we - // panic) - UseStringer bool -} - -// Format specifies the hashing process used. Different formats typically -// generate different hashes for the same value and have different properties. -type Format uint - -const ( - // To disallow the zero value - formatInvalid Format = iota - - // FormatV1 is the format used in v1.x of this library. This has the - // downsides noted in issue #18 but allows simultaneous v1/v2 usage. - FormatV1 - - // FormatV2 is the current recommended format and fixes the issues - // noted in FormatV1. - FormatV2 - - formatMax // so we can easily find the end -) - -// Hash returns the hash value of an arbitrary value. -// -// If opts is nil, then default options will be used. See HashOptions -// for the default values. The same *HashOptions value cannot be used -// concurrently. None of the values within a *HashOptions struct are -// safe to read/write while hashing is being done. -// -// The "format" is required and must be one of the format values defined -// by this library. You should probably just use "FormatV2". This allows -// generated hashes uses alternate logic to maintain compatibility with -// older versions. -// -// Notes on the value: -// -// * Unexported fields on structs are ignored and do not affect the -// hash value. -// -// * Adding an exported field to a struct with the zero value will change -// the hash value. -// -// For structs, the hashing can be controlled using tags. For example: -// -// struct { -// Name string -// UUID string `hash:"ignore"` -// } -// -// The available tag values are: -// -// * "ignore" or "-" - The field will be ignored and not affect the hash code. -// -// * "set" - The field will be treated as a set, where ordering doesn't -// affect the hash code. This only works for slices. -// -// * "string" - The field will be hashed as a string, only works when the -// field implements fmt.Stringer -// -func Hash(v interface{}, format Format, opts *HashOptions) (uint64, error) { - // Validate our format - if format <= formatInvalid || format >= formatMax { - return 0, &ErrFormat{} - } - - // Create default options - if opts == nil { - opts = &HashOptions{} - } - if opts.Hasher == nil { - opts.Hasher = fnv.New64() - } - if opts.TagName == "" { - opts.TagName = "hash" - } - - // Reset the hash - opts.Hasher.Reset() - - // Create our walker and walk the structure - w := &walker{ - format: format, - h: opts.Hasher, - tag: opts.TagName, - zeronil: opts.ZeroNil, - ignorezerovalue: opts.IgnoreZeroValue, - sets: opts.SlicesAsSets, - stringer: opts.UseStringer, - } - return w.visit(reflect.ValueOf(v), nil) -} - -type walker struct { - format Format - h hash.Hash64 - tag string - zeronil bool - ignorezerovalue bool - sets bool - stringer bool -} - -type visitOpts struct { - // Flags are a bitmask of flags to affect behavior of this visit - Flags visitFlag - - // Information about the struct containing this field - Struct interface{} - StructField string -} - -var timeType = reflect.TypeOf(time.Time{}) - -func (w *walker) visit(v reflect.Value, opts *visitOpts) (uint64, error) { - t := reflect.TypeOf(0) - - // Loop since these can be wrapped in multiple layers of pointers - // and interfaces. - for { - // If we have an interface, dereference it. We have to do this up - // here because it might be a nil in there and the check below must - // catch that. - if v.Kind() == reflect.Interface { - v = v.Elem() - continue - } - - if v.Kind() == reflect.Ptr { - if w.zeronil { - t = v.Type().Elem() - } - v = reflect.Indirect(v) - continue - } - - break - } - - // If it is nil, treat it like a zero. - if !v.IsValid() { - v = reflect.Zero(t) - } - - // Binary writing can use raw ints, we have to convert to - // a sized-int, we'll choose the largest... - switch v.Kind() { - case reflect.Int: - v = reflect.ValueOf(int64(v.Int())) - case reflect.Uint: - v = reflect.ValueOf(uint64(v.Uint())) - case reflect.Bool: - var tmp int8 - if v.Bool() { - tmp = 1 - } - v = reflect.ValueOf(tmp) - } - - k := v.Kind() - - // We can shortcut numeric values by directly binary writing them - if k >= reflect.Int && k <= reflect.Complex64 { - // A direct hash calculation - w.h.Reset() - err := binary.Write(w.h, binary.LittleEndian, v.Interface()) - return w.h.Sum64(), err - } - - switch v.Type() { - case timeType: - w.h.Reset() - b, err := v.Interface().(time.Time).MarshalBinary() - if err != nil { - return 0, err - } - - err = binary.Write(w.h, binary.LittleEndian, b) - return w.h.Sum64(), err - } - - switch k { - case reflect.Array: - var h uint64 - l := v.Len() - for i := 0; i < l; i++ { - current, err := w.visit(v.Index(i), nil) - if err != nil { - return 0, err - } - - h = hashUpdateOrdered(w.h, h, current) - } - - return h, nil - - case reflect.Map: - var includeMap IncludableMap - if opts != nil && opts.Struct != nil { - if v, ok := opts.Struct.(IncludableMap); ok { - includeMap = v - } - } - - // Build the hash for the map. We do this by XOR-ing all the key - // and value hashes. This makes it deterministic despite ordering. - var h uint64 - for _, k := range v.MapKeys() { - v := v.MapIndex(k) - if includeMap != nil { - incl, err := includeMap.HashIncludeMap( - opts.StructField, k.Interface(), v.Interface()) - if err != nil { - return 0, err - } - if !incl { - continue - } - } - - kh, err := w.visit(k, nil) - if err != nil { - return 0, err - } - vh, err := w.visit(v, nil) - if err != nil { - return 0, err - } - - fieldHash := hashUpdateOrdered(w.h, kh, vh) - h = hashUpdateUnordered(h, fieldHash) - } - - if w.format != FormatV1 { - // Important: read the docs for hashFinishUnordered - h = hashFinishUnordered(w.h, h) - } - - return h, nil - - case reflect.Struct: - parent := v.Interface() - var include Includable - if impl, ok := parent.(Includable); ok { - include = impl - } - - if impl, ok := parent.(Hashable); ok { - return impl.Hash() - } - - // If we can address this value, check if the pointer value - // implements our interfaces and use that if so. - if v.CanAddr() { - vptr := v.Addr() - parentptr := vptr.Interface() - if impl, ok := parentptr.(Includable); ok { - include = impl - } - - if impl, ok := parentptr.(Hashable); ok { - return impl.Hash() - } - } - - t := v.Type() - h, err := w.visit(reflect.ValueOf(t.Name()), nil) - if err != nil { - return 0, err - } - - l := v.NumField() - for i := 0; i < l; i++ { - if innerV := v.Field(i); v.CanSet() || t.Field(i).Name != "_" { - var f visitFlag - fieldType := t.Field(i) - if fieldType.PkgPath != "" { - // Unexported - continue - } - - tag := fieldType.Tag.Get(w.tag) - if tag == "ignore" || tag == "-" { - // Ignore this field - continue - } - - if w.ignorezerovalue { - if innerV.IsZero() { - continue - } - } - - // if string is set, use the string value - if tag == "string" || w.stringer { - if impl, ok := innerV.Interface().(fmt.Stringer); ok { - innerV = reflect.ValueOf(impl.String()) - } else if tag == "string" { - // We only show this error if the tag explicitly - // requests a stringer. - return 0, &ErrNotStringer{ - Field: v.Type().Field(i).Name, - } - } - } - - // Check if we implement includable and check it - if include != nil { - incl, err := include.HashInclude(fieldType.Name, innerV) - if err != nil { - return 0, err - } - if !incl { - continue - } - } - - switch tag { - case "set": - f |= visitFlagSet - } - - kh, err := w.visit(reflect.ValueOf(fieldType.Name), nil) - if err != nil { - return 0, err - } - - vh, err := w.visit(innerV, &visitOpts{ - Flags: f, - Struct: parent, - StructField: fieldType.Name, - }) - if err != nil { - return 0, err - } - - fieldHash := hashUpdateOrdered(w.h, kh, vh) - h = hashUpdateUnordered(h, fieldHash) - } - - if w.format != FormatV1 { - // Important: read the docs for hashFinishUnordered - h = hashFinishUnordered(w.h, h) - } - } - - return h, nil - - case reflect.Slice: - // We have two behaviors here. If it isn't a set, then we just - // visit all the elements. If it is a set, then we do a deterministic - // hash code. - var h uint64 - var set bool - if opts != nil { - set = (opts.Flags & visitFlagSet) != 0 - } - l := v.Len() - for i := 0; i < l; i++ { - current, err := w.visit(v.Index(i), nil) - if err != nil { - return 0, err - } - - if set || w.sets { - h = hashUpdateUnordered(h, current) - } else { - h = hashUpdateOrdered(w.h, h, current) - } - } - - if set && w.format != FormatV1 { - // Important: read the docs for hashFinishUnordered - h = hashFinishUnordered(w.h, h) - } - - return h, nil - - case reflect.String: - // Directly hash - w.h.Reset() - _, err := w.h.Write([]byte(v.String())) - return w.h.Sum64(), err - - default: - return 0, fmt.Errorf("unknown kind to hash: %s", k) - } - -} - -func hashUpdateOrdered(h hash.Hash64, a, b uint64) uint64 { - // For ordered updates, use a real hash function - h.Reset() - - // We just panic if the binary writes fail because we are writing - // an int64 which should never be fail-able. - e1 := binary.Write(h, binary.LittleEndian, a) - e2 := binary.Write(h, binary.LittleEndian, b) - if e1 != nil { - panic(e1) - } - if e2 != nil { - panic(e2) - } - - return h.Sum64() -} - -func hashUpdateUnordered(a, b uint64) uint64 { - return a ^ b -} - -// After mixing a group of unique hashes with hashUpdateUnordered, it's always -// necessary to call hashFinishUnordered. Why? Because hashUpdateUnordered -// is a simple XOR, and calling hashUpdateUnordered on hashes produced by -// hashUpdateUnordered can effectively cancel out a previous change to the hash -// result if the same hash value appears later on. For example, consider: -// -// hashUpdateUnordered(hashUpdateUnordered("A", "B"), hashUpdateUnordered("A", "C")) = -// H("A") ^ H("B")) ^ (H("A") ^ H("C")) = -// (H("A") ^ H("A")) ^ (H("B") ^ H(C)) = -// H(B) ^ H(C) = -// hashUpdateUnordered(hashUpdateUnordered("Z", "B"), hashUpdateUnordered("Z", "C")) -// -// hashFinishUnordered "hardens" the result, so that encountering partially -// overlapping input data later on in a different context won't cancel out. -func hashFinishUnordered(h hash.Hash64, a uint64) uint64 { - h.Reset() - - // We just panic if the writes fail - e1 := binary.Write(h, binary.LittleEndian, a) - if e1 != nil { - panic(e1) - } - - return h.Sum64() -} - -// visitFlag is used as a bitmask for affecting visit behavior -type visitFlag uint - -const ( - visitFlagInvalid visitFlag = iota - visitFlagSet = iota << 1 -) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/github.com/mitchellh/hashstructure/v2/include.go new/vendor/github.com/mitchellh/hashstructure/v2/include.go --- old/vendor/github.com/mitchellh/hashstructure/v2/include.go 2026-06-19 10:37:05.000000000 +0200 +++ new/vendor/github.com/mitchellh/hashstructure/v2/include.go 1970-01-01 01:00:00.000000000 +0100 @@ -1,22 +0,0 @@ -package hashstructure - -// Includable is an interface that can optionally be implemented by -// a struct. It will be called for each field in the struct to check whether -// it should be included in the hash. -type Includable interface { - HashInclude(field string, v interface{}) (bool, error) -} - -// IncludableMap is an interface that can optionally be implemented by -// a struct. It will be called when a map-type field is found to ask the -// struct if the map item should be included in the hash. -type IncludableMap interface { - HashIncludeMap(field string, k, v interface{}) (bool, error) -} - -// Hashable is an interface that can optionally be implemented by a struct -// to override the hash value. This value will override the hash value for -// the entire struct. Entries in the struct will not be hashed. -type Hashable interface { - Hash() (uint64, error) -} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vendor/modules.txt new/vendor/modules.txt --- old/vendor/modules.txt 2026-06-19 10:37:05.000000000 +0200 +++ new/vendor/modules.txt 2026-06-27 01:51:20.000000000 +0200 @@ -688,6 +688,9 @@ # github.com/gofrs/flock v0.13.0 ## explicit; go 1.24.0 github.com/gofrs/flock +# github.com/gohugoio/hashstructure v0.6.0 +## explicit; go 1.20 +github.com/gohugoio/hashstructure # github.com/golang-jwt/jwt/v5 v5.3.1 ## explicit; go 1.21 github.com/golang-jwt/jwt/v5 @@ -785,9 +788,6 @@ ## explicit; go 1.11 github.com/kylelemons/godebug/diff github.com/kylelemons/godebug/pretty -# github.com/mitchellh/hashstructure/v2 v2.0.2 -## explicit; go 1.14 -github.com/mitchellh/hashstructure/v2 # github.com/moby/docker-image-spec v1.3.1 ## explicit; go 1.18 github.com/moby/docker-image-spec/specs-go/v1
