diff --git a/go.mod b/go.mod index 3cf13955f4..089310c5ba 100644 --- a/go.mod +++ b/go.mod @@ -20,7 +20,7 @@ require ( github.com/operator-framework/api v0.45.0 github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.93.1 github.com/prometheus/client_golang v1.24.1 - github.com/regclient/regclient v0.11.5 + github.com/regclient/regclient v0.11.6 github.com/sirupsen/logrus v1.10.2 github.com/stretchr/testify v1.12.1 github.com/urfave/cli/v3 v3.11.0 @@ -78,7 +78,7 @@ require ( github.com/huandu/xstrings v1.5.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/compress v1.19.1 // indirect + github.com/klauspost/compress v1.19.2 // indirect github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/go-wordwrap v1.0.1 // indirect @@ -101,7 +101,7 @@ require ( github.com/spf13/cast v1.7.0 // indirect github.com/spf13/cobra v1.10.2 // indirect github.com/spf13/pflag v1.0.10 // indirect - github.com/ulikunitz/xz v0.5.15 // indirect + github.com/ulikunitz/xz v0.5.16 // indirect github.com/x448/float16 v0.8.4 // indirect github.com/xlab/treeprint v1.2.0 // indirect go.uber.org/multierr v1.11.0 // indirect diff --git a/go.sum b/go.sum index 3237995b39..6be444b2e2 100644 --- a/go.sum +++ b/go.sum @@ -126,8 +126,8 @@ github.com/joshdk/go-junit v1.0.0 h1:S86cUKIdwBHWwA6xCmFlf3RTLfVXYQfvanM5Uh+K6GE github.com/joshdk/go-junit v1.0.0/go.mod h1:TiiV0PqkaNfFXjEiyjWM3XXrhVyCa1K4Zfga6W52ung= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/klauspost/compress v1.19.1 h1:VsB4HPswih7mmZ8WleSFQ75c/Ui1M4trX5oAsJnhSlk= -github.com/klauspost/compress v1.19.1/go.mod h1:cwPg85FWrGar70rWktvGQj8/hthj3wpl0PGDogxkrSQ= +github.com/klauspost/compress v1.19.2 h1:hMRETovs/pu/dVWN7zIT1PGG8t509MwT6bO7XSi26R8= +github.com/klauspost/compress v1.19.2/go.mod h1:cwPg85FWrGar70rWktvGQj8/hthj3wpl0PGDogxkrSQ= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -158,8 +158,8 @@ github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 h1:n6/ github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00/go.mod h1:Pm3mSP3c5uWn86xMLZ5Sa7JB9GsEZySvHYXCTK4E9q4= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/olareg/olareg v0.2.1 h1:RPHGIaqlVWPbKAsOYUj7e2WfEEW5M7F8I6hKMrwd4jU= -github.com/olareg/olareg v0.2.1/go.mod h1:dhr8QetC7U7jJ2m93oxDhEEOKCRbPgOK1oGyKfB4QNo= +github.com/olareg/olareg v0.2.2 h1:H29V0+V2bIW4nRF3B1QAvooXts5eYS9dmQsD/chrBf0= +github.com/olareg/olareg v0.2.2/go.mod h1:NxhWTjHaFU51m1+kwi2MZnakJlITH0s1tzdzCT3dXRQ= github.com/onsi/ginkgo/v2 v2.32.1 h1:6tlvcDm/3sE8lGJbZ4+d4mO3RLy24/tQWOFzVSQNIfw= github.com/onsi/ginkgo/v2 v2.32.1/go.mod h1:+aXOY+vzZ5mu2iI2HpTZUPmM//oQfsNFX6gU9kNcA44= github.com/onsi/gomega v1.43.0 h1:VlG/1FxqNxhSO+lq/OHBNaaqwiBK/mO8JbVkX9Y+FeU= @@ -191,8 +191,8 @@ github.com/prometheus/common v0.70.1 h1:1HvjP4D5oL3t8RsPlwxA9onvvStjtIHYE5XuuwOi github.com/prometheus/common v0.70.1/go.mod h1:VdFUQDMZK3VLkurFUVhia6uys/0suUp86TJz5qbJRhc= github.com/prometheus/procfs v0.21.1 h1:GljZCt+zSTS+NZq88cyQ1LjZ+RCHp3uVuabBWA5+OJI= github.com/prometheus/procfs v0.21.1/go.mod h1:aB55Cww9pdSJVHk0hUf0inxWyyjPogFIjmHKYgMKmtY= -github.com/regclient/regclient v0.11.5 h1:OHRsXO0F3qHGfa4HEUv+EkMH9NXNcCTBKjNzyC/UhIA= -github.com/regclient/regclient v0.11.5/go.mod h1:DZUOfIT14WFTK2Pj4vjd93avy9O4Fdpjrf9ir23TbRE= +github.com/regclient/regclient v0.11.6 h1:IUcd3slMqo1CaLQ3JcE0W039gUv7uYZpY5FsyAYowXA= +github.com/regclient/regclient v0.11.6/go.mod h1:c20PYhof9UIPpWS6TgZq/qPt3vCdaU1TCbqauZ39iF0= github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= @@ -228,8 +228,8 @@ github.com/tidwall/pretty v1.2.1 h1:qjsOFOWWQl+N3RsoF5/ssm1pHmJJwhjlSbZ51I6wMl4= github.com/tidwall/pretty v1.2.1/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY= github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28= -github.com/ulikunitz/xz v0.5.15 h1:9DNdB5s+SgV3bQ2ApL10xRc35ck0DuIX/isZvIk+ubY= -github.com/ulikunitz/xz v0.5.15/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= +github.com/ulikunitz/xz v0.5.16 h1:ld6NyySjx5lowVKwJvMRLnW5nxKX/xnpSiFYZ/Lxur0= +github.com/ulikunitz/xz v0.5.16/go.mod h1:H9Rt/W6/Qj27PGauhQc6nfCDy7vHpzsOThBSaYDoEhw= github.com/urfave/cli/v3 v3.11.0 h1:P/euJp99kb9p0tlVY+iYTLYYTAQlfl0hR2gUO1Img1Q= github.com/urfave/cli/v3 v3.11.0/go.mod h1:ysVLtOEmg2tOy6PknnYVhDoouyC/6N42TMeoMzskhso= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= diff --git a/vendor/github.com/klauspost/compress/huff0/decompress_amd64.go b/vendor/github.com/klauspost/compress/huff0/decompress_amd64.go index 2d6ef64be1..7035d656d9 100644 --- a/vendor/github.com/klauspost/compress/huff0/decompress_amd64.go +++ b/vendor/github.com/klauspost/compress/huff0/decompress_amd64.go @@ -1,222 +1,49 @@ //go:build amd64 && !appengine && !noasm && gc -// This file contains the specialisation of Decoder.Decompress4X -// and Decoder.Decompress1X that use an asm implementation of thir main loops. +// amd64 stubs and dispatch for the asm loops used by decompress_asm.go. package huff0 import ( - "errors" - "fmt" - "github.com/klauspost/compress/internal/cpuinfo" ) -// decompress4x_main_loop_x86 is an x86 assembler implementation +// decompress4x_main_loop_amd64 is an x86 assembler implementation // of Decompress4X when tablelog > 8. // //go:noescape func decompress4x_main_loop_amd64(ctx *decompress4xContext) -// decompress4x_8b_loop_x86 is an x86 assembler implementation +// decompress4x_8b_main_loop_amd64 is an x86 assembler implementation // of Decompress4X when tablelog <= 8 which decodes 4 entries // per loop. // //go:noescape func decompress4x_8b_main_loop_amd64(ctx *decompress4xContext) -// fallback8BitSize is the size where using Go version is faster. -const fallback8BitSize = 800 - -type decompress4xContext struct { - pbr *[4]bitReaderShifted - peekBits uint8 - out *byte - dstEvery int - tbl *dEntrySingle - decoded int - limit *byte -} - -// Decompress4X will decompress a 4X encoded stream. -// The length of the supplied input must match the end of a block exactly. -// The *capacity* of the dst slice must match the destination size of -// the uncompressed data exactly. -func (d *Decoder) Decompress4X(dst, src []byte) ([]byte, error) { - if len(d.dt.single) == 0 { - return nil, errors.New("no table loaded") - } - if len(src) < 6+(4*1) { - return nil, errors.New("input too small") - } - - use8BitTables := d.actualTableLog <= 8 - if cap(dst) < fallback8BitSize && use8BitTables { - return d.decompress4X8bit(dst, src) - } - - var br [4]bitReaderShifted - // Decode "jump table" - start := 6 - for i := range 3 { - length := int(src[i*2]) | (int(src[i*2+1]) << 8) - if start+length >= len(src) { - return nil, errors.New("truncated input (or invalid offset)") - } - err := br[i].init(src[start : start+length]) - if err != nil { - return nil, err - } - start += length - } - err := br[3].init(src[start:]) - if err != nil { - return nil, err - } - - // destination, offset to match first output - dstSize := cap(dst) - dst = dst[:dstSize] - out := dst - dstEvery := (dstSize + 3) / 4 - - const tlSize = 1 << tableLogMax - const tlMask = tlSize - 1 - single := d.dt.single[:tlSize] - - var decoded int - - if len(out) > 4*4 && !(br[0].off < 4 || br[1].off < 4 || br[2].off < 4 || br[3].off < 4) { - ctx := decompress4xContext{ - pbr: &br, - peekBits: uint8((64 - d.actualTableLog) & 63), // see: bitReaderShifted.peekBitsFast() - out: &out[0], - dstEvery: dstEvery, - tbl: &single[0], - limit: &out[dstEvery-4], // Always stop decoding when first buffer gets here to avoid writing OOB on last. - } - if use8BitTables { - decompress4x_8b_main_loop_amd64(&ctx) - } else { - decompress4x_main_loop_amd64(&ctx) - } - - decoded = ctx.decoded - out = out[decoded/4:] - } - - // Decode remaining. - remainBytes := dstEvery - (decoded / 4) - for i := range br { - offset := dstEvery * i - endsAt := min(offset+remainBytes, len(out)) - br := &br[i] - bitsLeft := br.remaining() - for bitsLeft > 0 { - br.fill() - if offset >= endsAt { - return nil, errors.New("corruption detected: stream overrun 4") - } - - // Read value and increment offset. - val := br.peekBitsFast(d.actualTableLog) - v := single[val&tlMask].entry - nBits := uint8(v) - br.advance(nBits) - bitsLeft -= uint(nBits) - out[offset] = uint8(v >> 8) - offset++ - } - if offset != endsAt { - return nil, fmt.Errorf("corruption detected: short output block %d, end %d != %d", i, offset, endsAt) - } - decoded += offset - dstEvery*i - err = br.close() - if err != nil { - return nil, err - } - } - if dstSize != decoded { - return nil, errors.New("corruption detected: short output block") - } - return dst, nil -} - -// decompress4x_main_loop_x86 is an x86 assembler implementation +// decompress1x_main_loop_amd64 is an x86 assembler implementation // of Decompress1X when tablelog > 8. // //go:noescape func decompress1x_main_loop_amd64(ctx *decompress1xContext) -// decompress4x_main_loop_x86 is an x86 with BMI2 assembler implementation +// decompress1x_main_loop_bmi2 is an x86 with BMI2 assembler implementation // of Decompress1X when tablelog > 8. // //go:noescape func decompress1x_main_loop_bmi2(ctx *decompress1xContext) -type decompress1xContext struct { - pbr *bitReaderShifted - peekBits uint8 - out *byte - outCap int - tbl *dEntrySingle - decoded int +func decompress4x_main_loop_asm(ctx *decompress4xContext) { + decompress4x_main_loop_amd64(ctx) } -// Error reported by asm implementations -const error_max_decoded_size_exeeded = -1 - -// Decompress1X will decompress a 1X encoded stream. -// The cap of the output buffer will be the maximum decompressed size. -// The length of the supplied input must match the end of a block exactly. -func (d *Decoder) Decompress1X(dst, src []byte) ([]byte, error) { - if len(d.dt.single) == 0 { - return nil, errors.New("no table loaded") - } - var br bitReaderShifted - err := br.init(src) - if err != nil { - return dst, err - } - maxDecodedSize := cap(dst) - dst = dst[:maxDecodedSize] - - const tlSize = 1 << tableLogMax - const tlMask = tlSize - 1 - - if maxDecodedSize >= 4 { - ctx := decompress1xContext{ - pbr: &br, - out: &dst[0], - outCap: maxDecodedSize, - peekBits: uint8((64 - d.actualTableLog) & 63), // see: bitReaderShifted.peekBitsFast() - tbl: &d.dt.single[0], - } - - if cpuinfo.HasBMI2() { - decompress1x_main_loop_bmi2(&ctx) - } else { - decompress1x_main_loop_amd64(&ctx) - } - if ctx.decoded == error_max_decoded_size_exeeded { - return nil, ErrMaxDecodedSizeExceeded - } - - dst = dst[:ctx.decoded] - } +func decompress4x_8b_main_loop_asm(ctx *decompress4xContext) { + decompress4x_8b_main_loop_amd64(ctx) +} - // br < 8, so uint8 is fine - bitsLeft := uint8(br.off)*8 + 64 - br.bitsRead - for bitsLeft > 0 { - br.fill() - if len(dst) >= maxDecodedSize { - br.close() - return nil, ErrMaxDecodedSizeExceeded - } - v := d.dt.single[br.peekBitsFast(d.actualTableLog)&tlMask] - nBits := uint8(v.entry) - br.advance(nBits) - bitsLeft -= nBits - dst = append(dst, uint8(v.entry>>8)) +func decompress1x_main_loop_asm(ctx *decompress1xContext) { + if cpuinfo.HasBMI2() { + decompress1x_main_loop_bmi2(ctx) + } else { + decompress1x_main_loop_amd64(ctx) } - return dst, br.close() } diff --git a/vendor/github.com/klauspost/compress/huff0/decompress_amd64.s b/vendor/github.com/klauspost/compress/huff0/decompress_amd64.s index c4c7ab2d1f..c5d4a710a0 100644 --- a/vendor/github.com/klauspost/compress/huff0/decompress_amd64.s +++ b/vendor/github.com/klauspost/compress/huff0/decompress_amd64.s @@ -1,6 +1,6 @@ -// Code generated by command: go run gen.go -out ../decompress_amd64.s -pkg=huff0. DO NOT EDIT. +// Code generated by command: go run gen.go -out ../decompress.s -arch amd64,arm64 -pkg=huff0. DO NOT EDIT. -//go:build amd64 && !appengine && !noasm && gc +//go:build !appengine && !noasm && gc // func decompress4x_main_loop_amd64(ctx *decompress4xContext) TEXT ·decompress4x_main_loop_amd64(SB), $0-8 diff --git a/vendor/github.com/klauspost/compress/huff0/decompress_arm64.go b/vendor/github.com/klauspost/compress/huff0/decompress_arm64.go new file mode 100644 index 0000000000..8ba3c810e6 --- /dev/null +++ b/vendor/github.com/klauspost/compress/huff0/decompress_arm64.go @@ -0,0 +1,37 @@ +//go:build arm64 && !appengine && !noasm && gc + +// arm64 stubs and dispatch for the asm loops used by decompress_asm.go. +// The asm (decompress_arm64.s) is generated by the avo arm64 lowering +// printer from the same source as the amd64 asm; see _generate/gen.go. +package huff0 + +// decompress4x_main_loop_arm64 is an arm64 assembler implementation +// of Decompress4X when tablelog > 8. +// +//go:noescape +func decompress4x_main_loop_arm64(ctx *decompress4xContext) + +// decompress4x_8b_main_loop_arm64 is an arm64 assembler implementation +// of Decompress4X when tablelog <= 8 which decodes 4 entries +// per loop. +// +//go:noescape +func decompress4x_8b_main_loop_arm64(ctx *decompress4xContext) + +// decompress1x_main_loop_arm64 is an arm64 assembler implementation +// of Decompress1X when tablelog > 8. +// +//go:noescape +func decompress1x_main_loop_arm64(ctx *decompress1xContext) + +func decompress4x_main_loop_asm(ctx *decompress4xContext) { + decompress4x_main_loop_arm64(ctx) +} + +func decompress4x_8b_main_loop_asm(ctx *decompress4xContext) { + decompress4x_8b_main_loop_arm64(ctx) +} + +func decompress1x_main_loop_asm(ctx *decompress1xContext) { + decompress1x_main_loop_arm64(ctx) +} diff --git a/vendor/github.com/klauspost/compress/huff0/decompress_arm64.s b/vendor/github.com/klauspost/compress/huff0/decompress_arm64.s new file mode 100644 index 0000000000..e16012721a --- /dev/null +++ b/vendor/github.com/klauspost/compress/huff0/decompress_arm64.s @@ -0,0 +1,851 @@ +// Code generated by command: go run gen.go -out ../decompress.s -arch amd64,arm64 -pkg=huff0. DO NOT EDIT. +// EXPERIMENTAL arm64 output lowered from an amd64 avo program. + +//go:build arm64 && !appengine && !noasm && gc + +// func decompress4x_main_loop_amd64(ctx *decompress4xContext) +TEXT ·decompress4x_main_loop_arm64(SB), $0-8 + // Preload values + MOVD ctx+0(FP), R0 + MOVBU 8(R0), R6 + MOVD 16(R0), R3 + MOVD 48(R0), R5 + MOVD 24(R0), R7 + MOVD 32(R0), R8 + MOVD (R0), R9 + + // Main loop +main_loop: + MOVD $0, R2 + CMP R5, R3 + CSET GE, R16 + BFI $0, R16, $8, R2 + + // br0.fillFast32() + MOVD 32(R9), R10 + MOVBU 40(R9), R11 + CMP $0x20, R11 + BLS skip_fill0 + MOVD 24(R9), R0 + SUB $0x20, R11, R11 + SUB $0x04, R0, R0 + MOVD (R9), R12 + + // b.value |= uint64(low) << (b.bitsRead & 63) + ADD R12, R0, R15 + MOVWU (R15), R12 + MOVD R11, R1 + LSL R1, R12, R12 + MOVD R0, 24(R9) + ORR R12, R10, R10 + + // exhausted += (br0.off < 4) + CMP $0x04, R0 + CSINC HS, R2, R2, R16 + BFI $0, R16, $8, R2 + +skip_fill0: + // val0 := br0.peekTopBits(peekBits) + MOVD R10, R12 + MOVD R6, R1 + LSR R1, R12, R12 + + // v0 := table[val0&mask] + ADD R12<<1, R8, R15 + MOVHU (R15), R1 + + // br0.advance(uint8(v0.entry) + UBFX $8, R1, $8, R16 + BFI $0, R16, $8, R0 + LSL R1, R10, R10 + ADD R1, R11, R15 + BFI $0, R15, $8, R11 + + // val1 := br0.peekTopBits(peekBits) + MOVD R6, R1 + MOVD R10, R12 + LSR R1, R12, R12 + + // v1 := table[val1&mask] + ADD R12<<1, R8, R15 + MOVHU (R15), R1 + + // br0.advance(uint8(v1.entry)) + UBFX $8, R1, $8, R16 + BFI $8, R16, $8, R0 + LSL R1, R10, R10 + ADD R1, R11, R15 + BFI $0, R15, $8, R11 + + // these two writes get coalesced + // out[id * dstEvery + 0] = uint8(v0.entry >> 8) + // out[id * dstEvery + 1] = uint8(v1.entry >> 8) + MOVH R0, (R3) + + // update the bitreader structure + MOVD R10, 32(R9) + MOVB R11, 40(R9) + + // br1.fillFast32() + MOVD 80(R9), R10 + MOVBU 88(R9), R11 + CMP $0x20, R11 + BLS skip_fill1 + MOVD 72(R9), R0 + SUB $0x20, R11, R11 + SUB $0x04, R0, R0 + MOVD 48(R9), R12 + + // b.value |= uint64(low) << (b.bitsRead & 63) + ADD R12, R0, R15 + MOVWU (R15), R12 + MOVD R11, R1 + LSL R1, R12, R12 + MOVD R0, 72(R9) + ORR R12, R10, R10 + + // exhausted += (br1.off < 4) + CMP $0x04, R0 + CSINC HS, R2, R2, R16 + BFI $0, R16, $8, R2 + +skip_fill1: + // val0 := br1.peekTopBits(peekBits) + MOVD R10, R12 + MOVD R6, R1 + LSR R1, R12, R12 + + // v0 := table[val0&mask] + ADD R12<<1, R8, R15 + MOVHU (R15), R1 + + // br1.advance(uint8(v0.entry) + UBFX $8, R1, $8, R16 + BFI $0, R16, $8, R0 + LSL R1, R10, R10 + ADD R1, R11, R15 + BFI $0, R15, $8, R11 + + // val1 := br1.peekTopBits(peekBits) + MOVD R6, R1 + MOVD R10, R12 + LSR R1, R12, R12 + + // v1 := table[val1&mask] + ADD R12<<1, R8, R15 + MOVHU (R15), R1 + + // br1.advance(uint8(v1.entry)) + UBFX $8, R1, $8, R16 + BFI $8, R16, $8, R0 + LSL R1, R10, R10 + ADD R1, R11, R15 + BFI $0, R15, $8, R11 + + // these two writes get coalesced + // out[id * dstEvery + 0] = uint8(v0.entry >> 8) + // out[id * dstEvery + 1] = uint8(v1.entry >> 8) + ADD R7, R3, R15 + MOVH R0, (R15) + + // update the bitreader structure + MOVD R10, 80(R9) + MOVB R11, 88(R9) + + // br2.fillFast32() + MOVD 128(R9), R10 + MOVBU 136(R9), R11 + CMP $0x20, R11 + BLS skip_fill2 + MOVD 120(R9), R0 + SUB $0x20, R11, R11 + SUB $0x04, R0, R0 + MOVD 96(R9), R12 + + // b.value |= uint64(low) << (b.bitsRead & 63) + ADD R12, R0, R15 + MOVWU (R15), R12 + MOVD R11, R1 + LSL R1, R12, R12 + MOVD R0, 120(R9) + ORR R12, R10, R10 + + // exhausted += (br2.off < 4) + CMP $0x04, R0 + CSINC HS, R2, R2, R16 + BFI $0, R16, $8, R2 + +skip_fill2: + // val0 := br2.peekTopBits(peekBits) + MOVD R10, R12 + MOVD R6, R1 + LSR R1, R12, R12 + + // v0 := table[val0&mask] + ADD R12<<1, R8, R15 + MOVHU (R15), R1 + + // br2.advance(uint8(v0.entry) + UBFX $8, R1, $8, R16 + BFI $0, R16, $8, R0 + LSL R1, R10, R10 + ADD R1, R11, R15 + BFI $0, R15, $8, R11 + + // val1 := br2.peekTopBits(peekBits) + MOVD R6, R1 + MOVD R10, R12 + LSR R1, R12, R12 + + // v1 := table[val1&mask] + ADD R12<<1, R8, R15 + MOVHU (R15), R1 + + // br2.advance(uint8(v1.entry)) + UBFX $8, R1, $8, R16 + BFI $8, R16, $8, R0 + LSL R1, R10, R10 + ADD R1, R11, R15 + BFI $0, R15, $8, R11 + + // these two writes get coalesced + // out[id * dstEvery + 0] = uint8(v0.entry >> 8) + // out[id * dstEvery + 1] = uint8(v1.entry >> 8) + ADD R7<<1, R3, R15 + MOVH R0, (R15) + + // update the bitreader structure + MOVD R10, 128(R9) + MOVB R11, 136(R9) + + // br3.fillFast32() + MOVD 176(R9), R10 + MOVBU 184(R9), R11 + CMP $0x20, R11 + BLS skip_fill3 + MOVD 168(R9), R0 + SUB $0x20, R11, R11 + SUB $0x04, R0, R0 + MOVD 144(R9), R12 + + // b.value |= uint64(low) << (b.bitsRead & 63) + ADD R12, R0, R15 + MOVWU (R15), R12 + MOVD R11, R1 + LSL R1, R12, R12 + MOVD R0, 168(R9) + ORR R12, R10, R10 + + // exhausted += (br3.off < 4) + CMP $0x04, R0 + CSINC HS, R2, R2, R16 + BFI $0, R16, $8, R2 + +skip_fill3: + // val0 := br3.peekTopBits(peekBits) + MOVD R10, R12 + MOVD R6, R1 + LSR R1, R12, R12 + + // v0 := table[val0&mask] + ADD R12<<1, R8, R15 + MOVHU (R15), R1 + + // br3.advance(uint8(v0.entry) + UBFX $8, R1, $8, R16 + BFI $0, R16, $8, R0 + LSL R1, R10, R10 + ADD R1, R11, R15 + BFI $0, R15, $8, R11 + + // val1 := br3.peekTopBits(peekBits) + MOVD R6, R1 + MOVD R10, R12 + LSR R1, R12, R12 + + // v1 := table[val1&mask] + ADD R12<<1, R8, R15 + MOVHU (R15), R1 + + // br3.advance(uint8(v1.entry)) + UBFX $8, R1, $8, R16 + BFI $8, R16, $8, R0 + LSL R1, R10, R10 + ADD R1, R11, R15 + BFI $0, R15, $8, R11 + + // these two writes get coalesced + // out[id * dstEvery + 0] = uint8(v0.entry >> 8) + // out[id * dstEvery + 1] = uint8(v1.entry >> 8) + ADD R7<<1, R7, R1 + ADD R1, R3, R15 + MOVH R0, (R15) + + // update the bitreader structure + MOVD R10, 176(R9) + MOVB R11, 184(R9) + ADD $0x02, R3, R3 + AND $0xff, R2, R15 + AND $0xff, R2, R16 + TST R16, R15 + BEQ main_loop + MOVD ctx+0(FP), R0 + MOVD 16(R0), R16 + SUB R16, R3, R3 + LSL $0x02, R3, R3 + MOVD R3, 40(R0) + RET + +// func decompress4x_8b_main_loop_amd64(ctx *decompress4xContext) +TEXT ·decompress4x_8b_main_loop_arm64(SB), $0-8 + // Preload values + MOVD ctx+0(FP), R1 + MOVBU 8(R1), R6 + MOVD 16(R1), R3 + MOVD 48(R1), R5 + MOVD 24(R1), R7 + MOVD 32(R1), R8 + MOVD (R1), R9 + + // Main loop +main_loop: + MOVD $0, R2 + CMP R5, R3 + CSET GE, R16 + BFI $0, R16, $8, R2 + + // br0.fillFast32() + MOVD 32(R9), R10 + MOVBU 40(R9), R11 + CMP $0x20, R11 + BLS skip_fill0 + MOVD 24(R9), R12 + SUB $0x20, R11, R11 + SUB $0x04, R12, R12 + MOVD (R9), R13 + + // b.value |= uint64(low) << (b.bitsRead & 63) + ADD R13, R12, R15 + MOVWU (R15), R13 + MOVD R11, R1 + LSL R1, R13, R13 + MOVD R12, 24(R9) + ORR R13, R10, R10 + + // exhausted += (br0.off < 4) + CMP $0x04, R12 + CSINC HS, R2, R2, R16 + BFI $0, R16, $8, R2 + +skip_fill0: + // val0 := br0.peekTopBits(peekBits) + MOVD R10, R12 + MOVD R6, R1 + LSR R1, R12, R12 + + // v0 := table[val0&mask] + ADD R12<<1, R8, R15 + MOVHU (R15), R1 + + // br0.advance(uint8(v0.entry) + UBFX $8, R1, $8, R16 + BFI $0, R16, $8, R0 + LSL R1, R10, R10 + ADD R1, R11, R15 + BFI $0, R15, $8, R11 + + // val1 := br0.peekTopBits(peekBits) + MOVD R10, R12 + MOVD R6, R1 + LSR R1, R12, R12 + + // v1 := table[val0&mask] + ADD R12<<1, R8, R15 + MOVHU (R15), R1 + + // br0.advance(uint8(v1.entry) + UBFX $8, R1, $8, R16 + BFI $8, R16, $8, R0 + LSL R1, R10, R10 + ADD R1, R11, R15 + BFI $0, R15, $8, R11 + REVW R0, R0 + + // val2 := br0.peekTopBits(peekBits) + MOVD R10, R12 + MOVD R6, R1 + LSR R1, R12, R12 + + // v2 := table[val0&mask] + ADD R12<<1, R8, R15 + MOVHU (R15), R1 + + // br0.advance(uint8(v2.entry) + UBFX $8, R1, $8, R16 + BFI $8, R16, $8, R0 + LSL R1, R10, R10 + ADD R1, R11, R15 + BFI $0, R15, $8, R11 + + // val3 := br0.peekTopBits(peekBits) + MOVD R10, R12 + MOVD R6, R1 + LSR R1, R12, R12 + + // v3 := table[val0&mask] + ADD R12<<1, R8, R15 + MOVHU (R15), R1 + + // br0.advance(uint8(v3.entry) + UBFX $8, R1, $8, R16 + BFI $0, R16, $8, R0 + LSL R1, R10, R10 + ADD R1, R11, R15 + BFI $0, R15, $8, R11 + REVW R0, R0 + + // these four writes get coalesced + // out[id * dstEvery + 0] = uint8(v0.entry >> 8) + // out[id * dstEvery + 1] = uint8(v1.entry >> 8) + // out[id * dstEvery + 3] = uint8(v2.entry >> 8) + // out[id * dstEvery + 4] = uint8(v3.entry >> 8) + MOVW R0, (R3) + + // update the bitreader structure + MOVD R10, 32(R9) + MOVB R11, 40(R9) + + // br1.fillFast32() + MOVD 80(R9), R10 + MOVBU 88(R9), R11 + CMP $0x20, R11 + BLS skip_fill1 + MOVD 72(R9), R12 + SUB $0x20, R11, R11 + SUB $0x04, R12, R12 + MOVD 48(R9), R13 + + // b.value |= uint64(low) << (b.bitsRead & 63) + ADD R13, R12, R15 + MOVWU (R15), R13 + MOVD R11, R1 + LSL R1, R13, R13 + MOVD R12, 72(R9) + ORR R13, R10, R10 + + // exhausted += (br1.off < 4) + CMP $0x04, R12 + CSINC HS, R2, R2, R16 + BFI $0, R16, $8, R2 + +skip_fill1: + // val0 := br1.peekTopBits(peekBits) + MOVD R10, R12 + MOVD R6, R1 + LSR R1, R12, R12 + + // v0 := table[val0&mask] + ADD R12<<1, R8, R15 + MOVHU (R15), R1 + + // br1.advance(uint8(v0.entry) + UBFX $8, R1, $8, R16 + BFI $0, R16, $8, R0 + LSL R1, R10, R10 + ADD R1, R11, R15 + BFI $0, R15, $8, R11 + + // val1 := br1.peekTopBits(peekBits) + MOVD R10, R12 + MOVD R6, R1 + LSR R1, R12, R12 + + // v1 := table[val0&mask] + ADD R12<<1, R8, R15 + MOVHU (R15), R1 + + // br1.advance(uint8(v1.entry) + UBFX $8, R1, $8, R16 + BFI $8, R16, $8, R0 + LSL R1, R10, R10 + ADD R1, R11, R15 + BFI $0, R15, $8, R11 + REVW R0, R0 + + // val2 := br1.peekTopBits(peekBits) + MOVD R10, R12 + MOVD R6, R1 + LSR R1, R12, R12 + + // v2 := table[val0&mask] + ADD R12<<1, R8, R15 + MOVHU (R15), R1 + + // br1.advance(uint8(v2.entry) + UBFX $8, R1, $8, R16 + BFI $8, R16, $8, R0 + LSL R1, R10, R10 + ADD R1, R11, R15 + BFI $0, R15, $8, R11 + + // val3 := br1.peekTopBits(peekBits) + MOVD R10, R12 + MOVD R6, R1 + LSR R1, R12, R12 + + // v3 := table[val0&mask] + ADD R12<<1, R8, R15 + MOVHU (R15), R1 + + // br1.advance(uint8(v3.entry) + UBFX $8, R1, $8, R16 + BFI $0, R16, $8, R0 + LSL R1, R10, R10 + ADD R1, R11, R15 + BFI $0, R15, $8, R11 + REVW R0, R0 + + // these four writes get coalesced + // out[id * dstEvery + 0] = uint8(v0.entry >> 8) + // out[id * dstEvery + 1] = uint8(v1.entry >> 8) + // out[id * dstEvery + 3] = uint8(v2.entry >> 8) + // out[id * dstEvery + 4] = uint8(v3.entry >> 8) + ADD R7, R3, R15 + MOVW R0, (R15) + + // update the bitreader structure + MOVD R10, 80(R9) + MOVB R11, 88(R9) + + // br2.fillFast32() + MOVD 128(R9), R10 + MOVBU 136(R9), R11 + CMP $0x20, R11 + BLS skip_fill2 + MOVD 120(R9), R12 + SUB $0x20, R11, R11 + SUB $0x04, R12, R12 + MOVD 96(R9), R13 + + // b.value |= uint64(low) << (b.bitsRead & 63) + ADD R13, R12, R15 + MOVWU (R15), R13 + MOVD R11, R1 + LSL R1, R13, R13 + MOVD R12, 120(R9) + ORR R13, R10, R10 + + // exhausted += (br2.off < 4) + CMP $0x04, R12 + CSINC HS, R2, R2, R16 + BFI $0, R16, $8, R2 + +skip_fill2: + // val0 := br2.peekTopBits(peekBits) + MOVD R10, R12 + MOVD R6, R1 + LSR R1, R12, R12 + + // v0 := table[val0&mask] + ADD R12<<1, R8, R15 + MOVHU (R15), R1 + + // br2.advance(uint8(v0.entry) + UBFX $8, R1, $8, R16 + BFI $0, R16, $8, R0 + LSL R1, R10, R10 + ADD R1, R11, R15 + BFI $0, R15, $8, R11 + + // val1 := br2.peekTopBits(peekBits) + MOVD R10, R12 + MOVD R6, R1 + LSR R1, R12, R12 + + // v1 := table[val0&mask] + ADD R12<<1, R8, R15 + MOVHU (R15), R1 + + // br2.advance(uint8(v1.entry) + UBFX $8, R1, $8, R16 + BFI $8, R16, $8, R0 + LSL R1, R10, R10 + ADD R1, R11, R15 + BFI $0, R15, $8, R11 + REVW R0, R0 + + // val2 := br2.peekTopBits(peekBits) + MOVD R10, R12 + MOVD R6, R1 + LSR R1, R12, R12 + + // v2 := table[val0&mask] + ADD R12<<1, R8, R15 + MOVHU (R15), R1 + + // br2.advance(uint8(v2.entry) + UBFX $8, R1, $8, R16 + BFI $8, R16, $8, R0 + LSL R1, R10, R10 + ADD R1, R11, R15 + BFI $0, R15, $8, R11 + + // val3 := br2.peekTopBits(peekBits) + MOVD R10, R12 + MOVD R6, R1 + LSR R1, R12, R12 + + // v3 := table[val0&mask] + ADD R12<<1, R8, R15 + MOVHU (R15), R1 + + // br2.advance(uint8(v3.entry) + UBFX $8, R1, $8, R16 + BFI $0, R16, $8, R0 + LSL R1, R10, R10 + ADD R1, R11, R15 + BFI $0, R15, $8, R11 + REVW R0, R0 + + // these four writes get coalesced + // out[id * dstEvery + 0] = uint8(v0.entry >> 8) + // out[id * dstEvery + 1] = uint8(v1.entry >> 8) + // out[id * dstEvery + 3] = uint8(v2.entry >> 8) + // out[id * dstEvery + 4] = uint8(v3.entry >> 8) + ADD R7<<1, R3, R15 + MOVW R0, (R15) + + // update the bitreader structure + MOVD R10, 128(R9) + MOVB R11, 136(R9) + + // br3.fillFast32() + MOVD 176(R9), R10 + MOVBU 184(R9), R11 + CMP $0x20, R11 + BLS skip_fill3 + MOVD 168(R9), R12 + SUB $0x20, R11, R11 + SUB $0x04, R12, R12 + MOVD 144(R9), R13 + + // b.value |= uint64(low) << (b.bitsRead & 63) + ADD R13, R12, R15 + MOVWU (R15), R13 + MOVD R11, R1 + LSL R1, R13, R13 + MOVD R12, 168(R9) + ORR R13, R10, R10 + + // exhausted += (br3.off < 4) + CMP $0x04, R12 + CSINC HS, R2, R2, R16 + BFI $0, R16, $8, R2 + +skip_fill3: + // val0 := br3.peekTopBits(peekBits) + MOVD R10, R12 + MOVD R6, R1 + LSR R1, R12, R12 + + // v0 := table[val0&mask] + ADD R12<<1, R8, R15 + MOVHU (R15), R1 + + // br3.advance(uint8(v0.entry) + UBFX $8, R1, $8, R16 + BFI $0, R16, $8, R0 + LSL R1, R10, R10 + ADD R1, R11, R15 + BFI $0, R15, $8, R11 + + // val1 := br3.peekTopBits(peekBits) + MOVD R10, R12 + MOVD R6, R1 + LSR R1, R12, R12 + + // v1 := table[val0&mask] + ADD R12<<1, R8, R15 + MOVHU (R15), R1 + + // br3.advance(uint8(v1.entry) + UBFX $8, R1, $8, R16 + BFI $8, R16, $8, R0 + LSL R1, R10, R10 + ADD R1, R11, R15 + BFI $0, R15, $8, R11 + REVW R0, R0 + + // val2 := br3.peekTopBits(peekBits) + MOVD R10, R12 + MOVD R6, R1 + LSR R1, R12, R12 + + // v2 := table[val0&mask] + ADD R12<<1, R8, R15 + MOVHU (R15), R1 + + // br3.advance(uint8(v2.entry) + UBFX $8, R1, $8, R16 + BFI $8, R16, $8, R0 + LSL R1, R10, R10 + ADD R1, R11, R15 + BFI $0, R15, $8, R11 + + // val3 := br3.peekTopBits(peekBits) + MOVD R10, R12 + MOVD R6, R1 + LSR R1, R12, R12 + + // v3 := table[val0&mask] + ADD R12<<1, R8, R15 + MOVHU (R15), R1 + + // br3.advance(uint8(v3.entry) + UBFX $8, R1, $8, R16 + BFI $0, R16, $8, R0 + LSL R1, R10, R10 + ADD R1, R11, R15 + BFI $0, R15, $8, R11 + REVW R0, R0 + + // these four writes get coalesced + // out[id * dstEvery + 0] = uint8(v0.entry >> 8) + // out[id * dstEvery + 1] = uint8(v1.entry >> 8) + // out[id * dstEvery + 3] = uint8(v2.entry >> 8) + // out[id * dstEvery + 4] = uint8(v3.entry >> 8) + ADD R7<<1, R7, R1 + ADD R1, R3, R15 + MOVW R0, (R15) + + // update the bitreader structure + MOVD R10, 176(R9) + MOVB R11, 184(R9) + ADD $0x04, R3, R3 + AND $0xff, R2, R15 + AND $0xff, R2, R16 + TST R16, R15 + BEQ main_loop + MOVD ctx+0(FP), R0 + MOVD 16(R0), R16 + SUB R16, R3, R3 + LSL $0x02, R3, R3 + MOVD R3, 40(R0) + RET + +// func decompress1x_main_loop_amd64(ctx *decompress1xContext) +TEXT ·decompress1x_main_loop_arm64(SB), $0-8 + MOVD ctx+0(FP), R1 + MOVD 16(R1), R2 + MOVD 24(R1), R3 + CMP $0x04, R3 + BLO error_max_decoded_size_exceeded + ADD R3, R2, R3 + MOVD (R1), R5 + MOVD (R5), R7 + MOVD 24(R5), R8 + MOVD 32(R5), R9 + MOVBU 40(R5), R10 + MOVD 32(R1), R5 + MOVBU 8(R1), R6 + JMP loop_condition + +main_loop: + // Check if we have room for 4 bytes in the output buffer + ADD $4, R2, R1 + CMP R3, R1 + BGE error_max_decoded_size_exceeded + + // Decode 4 values + CMP $0x20, R10 + BLT bitReader_fillFast_1_end + SUB $0x20, R10, R10 + SUB $0x04, R8, R8 + ADD R8, R7, R15 + MOVWU (R15), R11 + MOVD R10, R1 + LSL R1, R11, R11 + ORR R11, R9, R9 + +bitReader_fillFast_1_end: + MOVD R6, R1 + MOVD R9, R11 + LSR R1, R11, R11 + ADD R11<<1, R5, R15 + MOVHU (R15), R1 + UBFX $8, R1, $8, R16 + BFI $0, R16, $8, R0 + MOVBU R1, R1 + ADD R1, R10, R10 + LSL R1, R9, R9 + MOVD R6, R1 + MOVD R9, R11 + LSR R1, R11, R11 + ADD R11<<1, R5, R15 + MOVHU (R15), R1 + UBFX $8, R1, $8, R16 + BFI $8, R16, $8, R0 + MOVBU R1, R1 + ADD R1, R10, R10 + LSL R1, R9, R9 + REVW R0, R0 + CMP $0x20, R10 + BLT bitReader_fillFast_2_end + SUB $0x20, R10, R10 + SUB $0x04, R8, R8 + ADD R8, R7, R15 + MOVWU (R15), R11 + MOVD R10, R1 + LSL R1, R11, R11 + ORR R11, R9, R9 + +bitReader_fillFast_2_end: + MOVD R6, R1 + MOVD R9, R11 + LSR R1, R11, R11 + ADD R11<<1, R5, R15 + MOVHU (R15), R1 + UBFX $8, R1, $8, R16 + BFI $8, R16, $8, R0 + MOVBU R1, R1 + ADD R1, R10, R10 + LSL R1, R9, R9 + MOVD R6, R1 + MOVD R9, R11 + LSR R1, R11, R11 + ADD R11<<1, R5, R15 + MOVHU (R15), R1 + UBFX $8, R1, $8, R16 + BFI $0, R16, $8, R0 + MOVBU R1, R1 + ADD R1, R10, R10 + LSL R1, R9, R9 + REVW R0, R0 + + // Store the decoded values + MOVW R0, (R2) + ADD $0x04, R2, R2 + +loop_condition: + CMP $0x08, R8 + BGE main_loop + + // Update ctx structure + MOVD ctx+0(FP), R0 + MOVD 16(R0), R16 + SUB R16, R2, R2 + MOVD R2, 40(R0) + MOVD (R0), R0 + MOVD R8, 24(R0) + MOVD R9, 32(R0) + MOVB R10, 40(R0) + RET + + // Report error +error_max_decoded_size_exceeded: + MOVD ctx+0(FP), R0 + MOVD $-1, R1 + MOVD R1, 40(R0) + RET + +// skipped decompress1x_main_loop_bmi2 (generic twin preferred on arm64) diff --git a/vendor/github.com/klauspost/compress/huff0/decompress_asm.go b/vendor/github.com/klauspost/compress/huff0/decompress_asm.go new file mode 100644 index 0000000000..4854dd4365 --- /dev/null +++ b/vendor/github.com/klauspost/compress/huff0/decompress_asm.go @@ -0,0 +1,193 @@ +//go:build (amd64 || arm64) && !appengine && !noasm && gc + +// This file contains the specialisation of Decoder.Decompress4X +// and Decoder.Decompress1X that use an asm implementation of their main loops. +// The asm function stubs and any per-arch dispatch live in decompress_amd64.go +// and decompress_arm64.go. +package huff0 + +import ( + "errors" + "fmt" +) + +// fallback8BitSize is the size where using Go version is faster. +const fallback8BitSize = 800 + +type decompress4xContext struct { + pbr *[4]bitReaderShifted + peekBits uint8 + out *byte + dstEvery int + tbl *dEntrySingle + decoded int + limit *byte +} + +// Decompress4X will decompress a 4X encoded stream. +// The length of the supplied input must match the end of a block exactly. +// The *capacity* of the dst slice must match the destination size of +// the uncompressed data exactly. +func (d *Decoder) Decompress4X(dst, src []byte) ([]byte, error) { + if len(d.dt.single) == 0 { + return nil, errors.New("no table loaded") + } + if len(src) < 6+(4*1) { + return nil, errors.New("input too small") + } + + use8BitTables := d.actualTableLog <= 8 + if cap(dst) < fallback8BitSize && use8BitTables { + return d.decompress4X8bit(dst, src) + } + + var br [4]bitReaderShifted + // Decode "jump table" + start := 6 + for i := range 3 { + length := int(src[i*2]) | (int(src[i*2+1]) << 8) + if start+length >= len(src) { + return nil, errors.New("truncated input (or invalid offset)") + } + err := br[i].init(src[start : start+length]) + if err != nil { + return nil, err + } + start += length + } + err := br[3].init(src[start:]) + if err != nil { + return nil, err + } + + // destination, offset to match first output + dstSize := cap(dst) + dst = dst[:dstSize] + out := dst + dstEvery := (dstSize + 3) / 4 + + const tlSize = 1 << tableLogMax + const tlMask = tlSize - 1 + single := d.dt.single[:tlSize] + + var decoded int + + if len(out) > 4*4 && !(br[0].off < 4 || br[1].off < 4 || br[2].off < 4 || br[3].off < 4) { + ctx := decompress4xContext{ + pbr: &br, + peekBits: uint8((64 - d.actualTableLog) & 63), // see: bitReaderShifted.peekBitsFast() + out: &out[0], + dstEvery: dstEvery, + tbl: &single[0], + limit: &out[dstEvery-4], // Always stop decoding when first buffer gets here to avoid writing OOB on last. + } + if use8BitTables { + decompress4x_8b_main_loop_asm(&ctx) + } else { + decompress4x_main_loop_asm(&ctx) + } + + decoded = ctx.decoded + out = out[decoded/4:] + } + + // Decode remaining. + remainBytes := dstEvery - (decoded / 4) + for i := range br { + offset := dstEvery * i + endsAt := min(offset+remainBytes, len(out)) + br := &br[i] + bitsLeft := br.remaining() + for bitsLeft > 0 { + br.fill() + if offset >= endsAt { + return nil, errors.New("corruption detected: stream overrun 4") + } + + // Read value and increment offset. + val := br.peekBitsFast(d.actualTableLog) + v := single[val&tlMask].entry + nBits := uint8(v) + br.advance(nBits) + bitsLeft -= uint(nBits) + out[offset] = uint8(v >> 8) + offset++ + } + if offset != endsAt { + return nil, fmt.Errorf("corruption detected: short output block %d, end %d != %d", i, offset, endsAt) + } + decoded += offset - dstEvery*i + err = br.close() + if err != nil { + return nil, err + } + } + if dstSize != decoded { + return nil, errors.New("corruption detected: short output block") + } + return dst, nil +} + +type decompress1xContext struct { + pbr *bitReaderShifted + peekBits uint8 + out *byte + outCap int + tbl *dEntrySingle + decoded int +} + +// Error reported by asm implementations +const error_max_decoded_size_exeeded = -1 + +// Decompress1X will decompress a 1X encoded stream. +// The cap of the output buffer will be the maximum decompressed size. +// The length of the supplied input must match the end of a block exactly. +func (d *Decoder) Decompress1X(dst, src []byte) ([]byte, error) { + if len(d.dt.single) == 0 { + return nil, errors.New("no table loaded") + } + var br bitReaderShifted + err := br.init(src) + if err != nil { + return dst, err + } + maxDecodedSize := cap(dst) + dst = dst[:maxDecodedSize] + + const tlSize = 1 << tableLogMax + const tlMask = tlSize - 1 + + if maxDecodedSize >= 4 { + ctx := decompress1xContext{ + pbr: &br, + out: &dst[0], + outCap: maxDecodedSize, + peekBits: uint8((64 - d.actualTableLog) & 63), // see: bitReaderShifted.peekBitsFast() + tbl: &d.dt.single[0], + } + + decompress1x_main_loop_asm(&ctx) + if ctx.decoded == error_max_decoded_size_exeeded { + return nil, ErrMaxDecodedSizeExceeded + } + + dst = dst[:ctx.decoded] + } + + // br < 8, so uint8 is fine + bitsLeft := uint8(br.off)*8 + 64 - br.bitsRead + for bitsLeft > 0 { + br.fill() + if len(dst) >= maxDecodedSize { + br.close() + return nil, ErrMaxDecodedSizeExceeded + } + v := d.dt.single[br.peekBitsFast(d.actualTableLog)&tlMask] + nBits := uint8(v.entry) + br.advance(nBits) + bitsLeft -= nBits + dst = append(dst, uint8(v.entry>>8)) + } + return dst, br.close() +} diff --git a/vendor/github.com/klauspost/compress/huff0/decompress_generic.go b/vendor/github.com/klauspost/compress/huff0/decompress_generic.go index 6103923222..e1bca5c686 100644 --- a/vendor/github.com/klauspost/compress/huff0/decompress_generic.go +++ b/vendor/github.com/klauspost/compress/huff0/decompress_generic.go @@ -1,4 +1,4 @@ -//go:build !amd64 || appengine || !gc || noasm +//go:build (!amd64 && !arm64) || appengine || !gc || noasm // This file contains a generic implementation of Decoder.Decompress4X. package huff0 diff --git a/vendor/github.com/klauspost/compress/zstd/blockdec.go b/vendor/github.com/klauspost/compress/zstd/blockdec.go index 2329e996f8..51f9da0387 100644 --- a/vendor/github.com/klauspost/compress/zstd/blockdec.go +++ b/vendor/github.com/klauspost/compress/zstd/blockdec.go @@ -400,8 +400,9 @@ func (b *blockDec) decodeLiterals(in []byte, hist *history) (remain []byte, err } } var err error - // Use our out buffer. - huff.MaxDecodedSize = litRegenSize + // Decoder.Decompress* uses cap(dst) for the size limit. Do not write + // MaxDecodedSize on hist.huffTree: with a trained dictionary that + // pointer aliases the shared dict.litEnc and concurrent DecodeAll races. if fourStreams { literals, err = huff.Decoder().Decompress4X(b.literalBuf[:0:litRegenSize], literals) } else { @@ -673,10 +674,6 @@ func (b *blockDec) executeSequences(hist *history) error { hbytes := hist.b if len(hbytes) > hist.windowSize { hbytes = hbytes[len(hbytes)-hist.windowSize:] - // We do not need history anymore. - if hist.dict != nil { - hist.dict.content = nil - } } hist.decoders.windowSize = hist.windowSize hist.decoders.out = b.dst[:0] diff --git a/vendor/github.com/klauspost/compress/zstd/dict.go b/vendor/github.com/klauspost/compress/zstd/dict.go index 4f1c4938cd..67f40e7914 100644 --- a/vendor/github.com/klauspost/compress/zstd/dict.go +++ b/vendor/github.com/klauspost/compress/zstd/dict.go @@ -296,40 +296,81 @@ func BuildDict(o BuildDictOptions) ([]byte, error) { if offset > 3 { newOffsets[offset-3]++ } else { - newOffsets[uint32(o.Offsets[offset-1])]++ + // Repeat codes reference the training Offsets. Skip unset + // (zero) entries so they are not ranked as real offsets. + prev := o.Offsets[offset-1] + if prev > 0 { + newOffsets[uint32(prev)]++ + } } } } // Find most used offsets. var sortedOffsets []uint32 for k := range newOffsets { + if k == 0 { + continue + } sortedOffsets = append(sortedOffsets, k) } sort.Slice(sortedOffsets, func(i, j int) bool { a, b := sortedOffsets[i], sortedOffsets[j] - if a == b { + ca, cb := newOffsets[a], newOffsets[b] + if ca == cb { // Prefer the longer offset - return sortedOffsets[i] > sortedOffsets[j] + return a > b } - return newOffsets[sortedOffsets[i]] > newOffsets[sortedOffsets[j]] + return ca > cb }) - if len(sortedOffsets) > 3 { - if debug { - print("Offsets:") - for i, v := range sortedOffsets { - if i > 20 { - break - } - printf("[%d: %d],", v, newOffsets[v]) + if debug { + print("Offsets:") + for i, v := range sortedOffsets { + if i > 20 { + break } - println("") + printf("[%d: %d],", v, newOffsets[v]) + } + println("") + } + // Dictionary recent-offsets must be three positive values within the + // history. Ranked matches may be fewer (or empty when only unset + // repeat codes were seen), so fill remaining slots with defaults. + used := make(map[int]bool, 3) + var finalOffsets [3]int + nOff := 0 + for _, v := range sortedOffsets { + iv := int(v) + if iv <= 0 || iv > len(hist) || used[iv] { + continue + } + finalOffsets[nOff] = iv + used[iv] = true + nOff++ + if nOff == 3 { + break } - - sortedOffsets = sortedOffsets[:3] } - for i, v := range sortedOffsets { - o.Offsets[i] = int(v) + for _, def := range []int{1, 4, 8} { + if nOff == 3 { + break + } + if def <= len(hist) && !used[def] { + finalOffsets[nOff] = def + used[def] = true + nOff++ + } + } + for def := 1; nOff < 3 && def <= len(hist); def++ { + if !used[def] { + finalOffsets[nOff] = def + used[def] = true + nOff++ + } + } + if nOff < 3 { + return nil, fmt.Errorf("could not determine 3 valid dictionary offsets (history size %d)", len(hist)) } + o.Offsets = finalOffsets if debug { println("New repeat offsets", o.Offsets) } @@ -337,6 +378,9 @@ func BuildDict(o BuildDictOptions) ([]byte, error) { if nUsed == 0 || seqs == 0 { return nil, fmt.Errorf("%d blocks, %d sequences found", nUsed, seqs) } + if litTotal == 0 { + return nil, errors.New("0 literals found") + } if debug { println("Sequences:", seqs, "Blocks:", nUsed, "Literals:", litTotal) } @@ -517,11 +561,10 @@ func BuildDict(o BuildDictOptions) ([]byte, error) { out.Write(binary.LittleEndian.AppendUint32(nil, uint32(o.Offsets[1]))) out.Write(binary.LittleEndian.AppendUint32(nil, uint32(o.Offsets[2]))) out.Write(hist) + if _, err := loadDict(out.Bytes()); err != nil { + return nil, fmt.Errorf("built dictionary failed validation: %w", err) + } if debug { - _, err := loadDict(out.Bytes()) - if err != nil { - panic(err) - } i, err := InspectDictionary(out.Bytes()) if err != nil { panic(err) diff --git a/vendor/github.com/klauspost/compress/zstd/seqdec_amd64.s b/vendor/github.com/klauspost/compress/zstd/seqdec_amd64.s index 3fc381c7a7..4d3188ff49 100644 --- a/vendor/github.com/klauspost/compress/zstd/seqdec_amd64.s +++ b/vendor/github.com/klauspost/compress/zstd/seqdec_amd64.s @@ -2081,7 +2081,7 @@ sequenceDecs_decodeSync_amd64_match_len_ofs_ok: MOVQ 16(SP), R13 // Check if we have enough space in s.out - LEAQ (AX)(R13*1), R14 + LEAQ 16(AX)(R13*1), R14 ADDQ R10, R14 CMPQ R14, 32(SP) JA error_not_enough_space @@ -2601,7 +2601,7 @@ sequenceDecs_decodeSync_bmi2_match_len_ofs_ok: MOVQ 16(SP), R13 // Check if we have enough space in s.out - LEAQ (CX)(R13*1), R14 + LEAQ 16(CX)(R13*1), R14 ADDQ R9, R14 CMPQ R14, 32(SP) JA error_not_enough_space diff --git a/vendor/github.com/klauspost/compress/zstd/seqdec_arm64.s b/vendor/github.com/klauspost/compress/zstd/seqdec_arm64.s index a468e5fc2c..6f54ef21ba 100644 --- a/vendor/github.com/klauspost/compress/zstd/seqdec_arm64.s +++ b/vendor/github.com/klauspost/compress/zstd/seqdec_arm64.s @@ -12,7 +12,7 @@ TEXT ·sequenceDecs_decode_arm64(SB), $8-32 MOVD (R1), R0 MOVD 32(R1), R5 ADD R5, R0, R0 - MOVD R0, (RSP) + MOVD R0, 8(RSP) MOVD ctx+16(FP), R0 MOVD 72(R0), R6 MOVD 80(R0), R7 @@ -24,7 +24,7 @@ TEXT ·sequenceDecs_decode_arm64(SB), $8-32 MOVD 160(R0), R12 sequenceDecs_decode_amd64_main_loop: - MOVD (RSP), R13 + MOVD 8(RSP), R13 // Fill bitreader to have enough for the offset and match length. CMP $0x08, R5 @@ -60,7 +60,8 @@ sequenceDecs_decode_amd64_fill_end: MOVD R3, R1 MOVD R2, R14 LSL R1, R14, R14 - UBFX $8, R0, $8, R1 + UBFX $8, R0, $8, R16 + BFI $0, R16, $8, R1 LSR $0x20, R0, R0 TST R1, R1 BEQ sequenceDecs_decode_amd64_of_update_zero @@ -81,7 +82,8 @@ sequenceDecs_decode_amd64_of_update_zero: MOVD R3, R1 MOVD R2, R14 LSL R1, R14, R14 - UBFX $8, R0, $8, R1 + UBFX $8, R0, $8, R16 + BFI $0, R16, $8, R1 LSR $0x20, R0, R0 TST R1, R1 BEQ sequenceDecs_decode_amd64_ml_update_zero @@ -131,7 +133,8 @@ sequenceDecs_decode_amd64_fill_2_end: MOVD R3, R1 MOVD R2, R14 LSL R1, R14, R14 - UBFX $8, R0, $8, R1 + UBFX $8, R0, $8, R16 + BFI $0, R16, $8, R1 LSR $0x20, R0, R0 TST R1, R1 BEQ sequenceDecs_decode_amd64_ll_update_zero @@ -148,7 +151,7 @@ sequenceDecs_decode_amd64_ll_update_zero: MOVD R0, (R9) // Fill bitreader for state updates - MOVD R13, (RSP) + MOVD R13, 8(RSP) MOVD R8, R0 LSR $0x08, R0, R0 MOVBU R0, R0 @@ -166,7 +169,7 @@ sequenceDecs_decode_amd64_ll_update_zero: NEG R1, R16 ROR R16, R14, R14 MOVD $0x00000001, R4 - MOVB R13, R1 + BFI $0, R13, $8, R1 LSLW R1, R4, R4 SUBW $1, R4, R4 AND R4, R14, R14 @@ -187,7 +190,7 @@ sequenceDecs_decode_amd64_ll_update_zero: NEG R1, R16 ROR R16, R14, R14 MOVD $0x00000001, R4 - MOVB R13, R1 + BFI $0, R13, $8, R1 LSLW R1, R4, R4 SUBW $1, R4, R4 AND R4, R14, R14 @@ -208,7 +211,7 @@ sequenceDecs_decode_amd64_ll_update_zero: NEG R1, R16 ROR R16, R14, R14 MOVD $0x00000001, R4 - MOVB R13, R1 + BFI $0, R13, $8, R1 LSLW R1, R4, R4 SUBW $1, R4, R4 AND R4, R14, R14 @@ -360,7 +363,7 @@ TEXT ·sequenceDecs_decode_56_arm64(SB), $8-32 MOVD (R1), R0 MOVD 32(R1), R5 ADD R5, R0, R0 - MOVD R0, (RSP) + MOVD R0, 8(RSP) MOVD ctx+16(FP), R0 MOVD 72(R0), R6 MOVD 80(R0), R7 @@ -372,7 +375,7 @@ TEXT ·sequenceDecs_decode_56_arm64(SB), $8-32 MOVD 160(R0), R12 sequenceDecs_decode_56_amd64_main_loop: - MOVD (RSP), R13 + MOVD 8(RSP), R13 // Fill bitreader to have enough for the offset and match length. CMP $0x08, R5 @@ -408,7 +411,8 @@ sequenceDecs_decode_56_amd64_fill_end: MOVD R3, R1 MOVD R2, R14 LSL R1, R14, R14 - UBFX $8, R0, $8, R1 + UBFX $8, R0, $8, R16 + BFI $0, R16, $8, R1 LSR $0x20, R0, R0 TST R1, R1 BEQ sequenceDecs_decode_56_amd64_of_update_zero @@ -429,7 +433,8 @@ sequenceDecs_decode_56_amd64_of_update_zero: MOVD R3, R1 MOVD R2, R14 LSL R1, R14, R14 - UBFX $8, R0, $8, R1 + UBFX $8, R0, $8, R16 + BFI $0, R16, $8, R1 LSR $0x20, R0, R0 TST R1, R1 BEQ sequenceDecs_decode_56_amd64_ml_update_zero @@ -450,7 +455,8 @@ sequenceDecs_decode_56_amd64_ml_update_zero: MOVD R3, R1 MOVD R2, R14 LSL R1, R14, R14 - UBFX $8, R0, $8, R1 + UBFX $8, R0, $8, R16 + BFI $0, R16, $8, R1 LSR $0x20, R0, R0 TST R1, R1 BEQ sequenceDecs_decode_56_amd64_ll_update_zero @@ -467,7 +473,7 @@ sequenceDecs_decode_56_amd64_ll_update_zero: MOVD R0, (R9) // Fill bitreader for state updates - MOVD R13, (RSP) + MOVD R13, 8(RSP) MOVD R8, R0 LSR $0x08, R0, R0 MOVBU R0, R0 @@ -485,7 +491,7 @@ sequenceDecs_decode_56_amd64_ll_update_zero: NEG R1, R16 ROR R16, R14, R14 MOVD $0x00000001, R4 - MOVB R13, R1 + BFI $0, R13, $8, R1 LSLW R1, R4, R4 SUBW $1, R4, R4 AND R4, R14, R14 @@ -506,7 +512,7 @@ sequenceDecs_decode_56_amd64_ll_update_zero: NEG R1, R16 ROR R16, R14, R14 MOVD $0x00000001, R4 - MOVB R13, R1 + BFI $0, R13, $8, R1 LSLW R1, R4, R4 SUBW $1, R4, R4 AND R4, R14, R14 @@ -527,7 +533,7 @@ sequenceDecs_decode_56_amd64_ll_update_zero: NEG R1, R16 ROR R16, R14, R14 MOVD $0x00000001, R4 - MOVB R13, R1 + BFI $0, R13, $8, R1 LSLW R1, R4, R4 SUBW $1, R4, R4 AND R4, R14, R14 @@ -766,13 +772,14 @@ copy_4_small: JMP copy_4_move_8through16 copy_4_move_3: - MOVH (R13), R10 - MOVB 2(R13), R11 - MOVH R10, (R3) - MOVB R11, 2(R3) - ADD R12, R13, R13 - ADD R12, R3, R3 - JMP copy_4_end + MOVHU (R13), R10 + MOVBU 2(R13), R16 + BFI $0, R16, $8, R11 + MOVH R10, (R3) + MOVB R11, 2(R3) + ADD R12, R13, R13 + ADD R12, R3, R3 + JMP copy_4_end copy_4_move_4through7: MOVWU (R13), R10 @@ -834,24 +841,27 @@ copy_5_small: JMP copy_5_move_8through16 copy_5_move_1or2: - MOVB (R13), R14 - ADD R10, R13, R15 - MOVB -1(R15), R4 - MOVB R14, (R3) - ADD R10, R3, R15 - MOVB R4, -1(R15) - ADD R10, R13, R13 - ADD R10, R3, R3 - JMP copy_5_end + MOVBU (R13), R16 + BFI $0, R16, $8, R14 + ADD R10, R13, R15 + MOVBU -1(R15), R16 + BFI $0, R16, $8, R4 + MOVB R14, (R3) + ADD R10, R3, R15 + MOVB R4, -1(R15) + ADD R10, R13, R13 + ADD R10, R3, R3 + JMP copy_5_end copy_5_move_3: - MOVH (R13), R14 - MOVB 2(R13), R4 - MOVH R14, (R3) - MOVB R4, 2(R3) - ADD R10, R13, R13 - ADD R10, R3, R3 - JMP copy_5_end + MOVHU (R13), R14 + MOVBU 2(R13), R16 + BFI $0, R16, $8, R4 + MOVH R14, (R3) + MOVB R4, 2(R3) + ADD R10, R13, R13 + ADD R10, R3, R3 + JMP copy_5_end copy_5_move_4through7: MOVWU (R13), R14 @@ -906,12 +916,13 @@ copy_overlapping_match: ADD R12, R6, R6 copy_slow_3: - MOVB (R10), R11 - MOVB R11, (R3) - ADD $1, R10, R10 - ADD $1, R3, R3 - SUBS $1, R12, R12 - BNE copy_slow_3 + MOVBU (R10), R16 + BFI $0, R16, $8, R11 + MOVB R11, (R3) + ADD $1, R10, R10 + ADD $1, R3, R3 + SUBS $1, R12, R12 + BNE copy_slow_3 handle_loop: ADD $0x18, R0, R0 @@ -1016,24 +1027,27 @@ copy_1_small: JMP copy_1_move_8through16 copy_1_move_1or2: - MOVB (R5), R13 - ADD R10, R5, R15 - MOVB -1(R15), R14 - MOVB R13, (R3) - ADD R10, R3, R15 - MOVB R14, -1(R15) - ADD R10, R5, R5 - ADD R10, R3, R3 - JMP copy_1_end + MOVBU (R5), R16 + BFI $0, R16, $8, R13 + ADD R10, R5, R15 + MOVBU -1(R15), R16 + BFI $0, R16, $8, R14 + MOVB R13, (R3) + ADD R10, R3, R15 + MOVB R14, -1(R15) + ADD R10, R5, R5 + ADD R10, R3, R3 + JMP copy_1_end copy_1_move_3: - MOVH (R5), R13 - MOVB 2(R5), R14 - MOVH R13, (R3) - MOVB R14, 2(R3) - ADD R10, R5, R5 - ADD R10, R3, R3 - JMP copy_1_end + MOVHU (R5), R13 + MOVBU 2(R5), R16 + BFI $0, R16, $8, R14 + MOVH R13, (R3) + MOVB R14, 2(R3) + ADD R10, R5, R5 + ADD R10, R3, R3 + JMP copy_1_end copy_1_move_4through7: MOVWU (R5), R13 @@ -1104,13 +1118,14 @@ copy_4_small: JMP copy_4_move_8through16 copy_4_move_3: - MOVH (R13), R10 - MOVB 2(R13), R11 - MOVH R10, (R3) - MOVB R11, 2(R3) - ADD R12, R13, R13 - ADD R12, R3, R3 - JMP copy_4_end + MOVHU (R13), R10 + MOVBU 2(R13), R16 + BFI $0, R16, $8, R11 + MOVH R10, (R3) + MOVB R11, 2(R3) + ADD R12, R13, R13 + ADD R12, R3, R3 + JMP copy_4_end copy_4_move_4through7: MOVWU (R13), R10 @@ -1172,24 +1187,27 @@ copy_5_small: JMP copy_5_move_8through16 copy_5_move_1or2: - MOVB (R13), R14 - ADD R10, R13, R15 - MOVB -1(R15), R4 - MOVB R14, (R3) - ADD R10, R3, R15 - MOVB R4, -1(R15) - ADD R10, R13, R13 - ADD R10, R3, R3 - JMP copy_5_end + MOVBU (R13), R16 + BFI $0, R16, $8, R14 + ADD R10, R13, R15 + MOVBU -1(R15), R16 + BFI $0, R16, $8, R4 + MOVB R14, (R3) + ADD R10, R3, R15 + MOVB R4, -1(R15) + ADD R10, R13, R13 + ADD R10, R3, R3 + JMP copy_5_end copy_5_move_3: - MOVH (R13), R14 - MOVB 2(R13), R4 - MOVH R14, (R3) - MOVB R4, 2(R3) - ADD R10, R13, R13 - ADD R10, R3, R3 - JMP copy_5_end + MOVHU (R13), R14 + MOVBU 2(R13), R16 + BFI $0, R16, $8, R4 + MOVH R14, (R3) + MOVB R4, 2(R3) + ADD R10, R13, R13 + ADD R10, R3, R3 + JMP copy_5_end copy_5_move_4through7: MOVWU (R13), R14 @@ -1257,24 +1275,27 @@ copy_2_small: JMP copy_2_move_8through16 copy_2_move_1or2: - MOVB (R10), R11 - ADD R12, R10, R15 - MOVB -1(R15), R13 - MOVB R11, (R3) - ADD R12, R3, R15 - MOVB R13, -1(R15) - ADD R12, R10, R10 - ADD R12, R3, R3 - JMP copy_2_end + MOVBU (R10), R16 + BFI $0, R16, $8, R11 + ADD R12, R10, R15 + MOVBU -1(R15), R16 + BFI $0, R16, $8, R13 + MOVB R11, (R3) + ADD R12, R3, R15 + MOVB R13, -1(R15) + ADD R12, R10, R10 + ADD R12, R3, R3 + JMP copy_2_end copy_2_move_3: - MOVH (R10), R11 - MOVB 2(R10), R13 - MOVH R11, (R3) - MOVB R13, 2(R3) - ADD R12, R10, R10 - ADD R12, R3, R3 - JMP copy_2_end + MOVHU (R10), R11 + MOVBU 2(R10), R16 + BFI $0, R16, $8, R13 + MOVH R11, (R3) + MOVB R13, 2(R3) + ADD R12, R10, R10 + ADD R12, R3, R3 + JMP copy_2_end copy_2_move_4through7: MOVWU (R10), R11 @@ -1305,12 +1326,13 @@ copy_overlapping_match: ADD R12, R6, R6 copy_slow_3: - MOVB (R10), R11 - MOVB R11, (R3) - ADD $1, R10, R10 - ADD $1, R3, R3 - SUBS $1, R12, R12 - BNE copy_slow_3 + MOVBU (R10), R16 + BFI $0, R16, $8, R11 + MOVB R11, (R3) + ADD $1, R10, R10 + ADD $1, R3, R3 + SUBS $1, R12, R12 + BNE copy_slow_3 handle_loop: ADD $0x18, R0, R0 @@ -1361,41 +1383,41 @@ TEXT ·sequenceDecs_decodeSync_arm64(SB), $64-32 MOVD (R1), R0 MOVD 32(R1), R5 ADD R5, R0, R0 - MOVD R0, (RSP) + MOVD R0, 8(RSP) MOVD ctx+16(FP), R0 MOVD 72(R0), R6 MOVD 80(R0), R7 MOVD 88(R0), R8 MOVD $0, R1 - MOVD R1, 8(RSP) MOVD R1, 16(RSP) MOVD R1, 24(RSP) + MOVD R1, 32(RSP) MOVD 112(R0), R9 MOVD 128(R0), R1 - MOVD R1, 32(RSP) + MOVD R1, 40(RSP) MOVD 144(R0), R10 MOVD 136(R0), R11 MOVD 200(R0), R1 - MOVD R1, 56(RSP) + MOVD R1, 64(RSP) MOVD 176(R0), R1 - MOVD R1, 48(RSP) + MOVD R1, 56(RSP) MOVD 184(R0), R0 - MOVD R0, 40(RSP) - MOVD 40(RSP), R0 - MOVD 48(RSP), R16 + MOVD R0, 48(RSP) + MOVD 48(RSP), R0 + MOVD 56(RSP), R16 ADD R0, R16, R16 - MOVD R16, 48(RSP) + MOVD R16, 56(RSP) // Calculate pointer to s.out[cap(s.out)] (a past-end pointer) - MOVD 32(RSP), R16 + MOVD 40(RSP), R16 ADD R9, R16, R16 - MOVD R16, 32(RSP) + MOVD R16, 40(RSP) // outBase += outPosition ADD R11, R9, R9 sequenceDecs_decodeSync_amd64_main_loop: - MOVD (RSP), R12 + MOVD 8(RSP), R12 // Fill bitreader to have enough for the offset and match length. CMP $0x08, R5 @@ -1431,7 +1453,8 @@ sequenceDecs_decodeSync_amd64_fill_end: MOVD R3, R1 MOVD R2, R13 LSL R1, R13, R13 - UBFX $8, R0, $8, R1 + UBFX $8, R0, $8, R16 + BFI $0, R16, $8, R1 LSR $0x20, R0, R0 TST R1, R1 BEQ sequenceDecs_decodeSync_amd64_of_update_zero @@ -1445,14 +1468,15 @@ sequenceDecs_decodeSync_amd64_fill_end: ADD R13, R0, R0 sequenceDecs_decodeSync_amd64_of_update_zero: - MOVD R0, 8(RSP) + MOVD R0, 16(RSP) // Update match length MOVD R7, R0 MOVD R3, R1 MOVD R2, R13 LSL R1, R13, R13 - UBFX $8, R0, $8, R1 + UBFX $8, R0, $8, R16 + BFI $0, R16, $8, R1 LSR $0x20, R0, R0 TST R1, R1 BEQ sequenceDecs_decodeSync_amd64_ml_update_zero @@ -1466,7 +1490,7 @@ sequenceDecs_decodeSync_amd64_of_update_zero: ADD R13, R0, R0 sequenceDecs_decodeSync_amd64_ml_update_zero: - MOVD R0, 16(RSP) + MOVD R0, 24(RSP) // Fill bitreader to have enough for the remaining CMP $0x08, R5 @@ -1502,7 +1526,8 @@ sequenceDecs_decodeSync_amd64_fill_2_end: MOVD R3, R1 MOVD R2, R13 LSL R1, R13, R13 - UBFX $8, R0, $8, R1 + UBFX $8, R0, $8, R16 + BFI $0, R16, $8, R1 LSR $0x20, R0, R0 TST R1, R1 BEQ sequenceDecs_decodeSync_amd64_ll_update_zero @@ -1516,10 +1541,10 @@ sequenceDecs_decodeSync_amd64_fill_2_end: ADD R13, R0, R0 sequenceDecs_decodeSync_amd64_ll_update_zero: - MOVD R0, 24(RSP) + MOVD R0, 32(RSP) // Fill bitreader for state updates - MOVD R12, (RSP) + MOVD R12, 8(RSP) MOVD R8, R0 LSR $0x08, R0, R0 MOVBU R0, R0 @@ -1537,7 +1562,7 @@ sequenceDecs_decodeSync_amd64_ll_update_zero: NEG R1, R16 ROR R16, R13, R13 MOVD $0x00000001, R14 - MOVB R12, R1 + BFI $0, R12, $8, R1 LSLW R1, R14, R14 SUBW $1, R14, R14 AND R14, R13, R13 @@ -1558,7 +1583,7 @@ sequenceDecs_decodeSync_amd64_ll_update_zero: NEG R1, R16 ROR R16, R13, R13 MOVD $0x00000001, R14 - MOVB R12, R1 + BFI $0, R12, $8, R1 LSLW R1, R14, R14 SUBW $1, R14, R14 AND R14, R13, R13 @@ -1579,7 +1604,7 @@ sequenceDecs_decodeSync_amd64_ll_update_zero: NEG R1, R16 ROR R16, R13, R13 MOVD $0x00000001, R14 - MOVB R12, R1 + BFI $0, R12, $8, R1 LSLW R1, R14, R14 SUBW $1, R14, R14 AND R14, R13, R13 @@ -1594,7 +1619,7 @@ sequenceDecs_decodeSync_amd64_ll_update_zero: sequenceDecs_decodeSync_amd64_skip_update: // Adjust offset MOVD s+0(FP), R1 - MOVD 8(RSP), R12 + MOVD 16(RSP), R12 CMP $0x01, R0 BLS sequenceDecs_decodeSync_amd64_adjust_offsetB_1_or_0 ADD $144, R1, R15 @@ -1605,7 +1630,7 @@ sequenceDecs_decodeSync_amd64_skip_update: JMP sequenceDecs_decodeSync_amd64_after_adjust sequenceDecs_decodeSync_amd64_adjust_offsetB_1_or_0: - MOVD 24(RSP), R16 + MOVD 32(RSP), R16 CMP $0x00000000, R16 BNE sequenceDecs_decodeSync_amd64_adjust_offset_maybezero ADD $1, R12, R12 @@ -1643,11 +1668,11 @@ sequenceDecs_decodeSync_amd64_adjust_skip: MOVD R13, R12 sequenceDecs_decodeSync_amd64_after_adjust: - MOVD R12, 8(RSP) + MOVD R12, 16(RSP) // Check values - MOVD 16(RSP), R0 - MOVD 24(RSP), R1 + MOVD 24(RSP), R0 + MOVD 32(RSP), R1 ADD R1, R0, R13 MOVD s+0(FP), R14 MOVD 256(R14), R16 @@ -1666,14 +1691,15 @@ sequenceDecs_decodeSync_amd64_after_adjust: BNE sequenceDecs_decodeSync_amd64_error_match_len_ofs_mismatch sequenceDecs_decodeSync_amd64_match_len_ofs_ok: - MOVD 24(RSP), R0 - MOVD 8(RSP), R1 - MOVD 16(RSP), R12 + MOVD 32(RSP), R0 + MOVD 16(RSP), R1 + MOVD 24(RSP), R12 // Check if we have enough space in s.out ADD R12, R0, R13 + ADD $16, R13, R13 ADD R9, R13, R13 - MOVD 32(RSP), R16 + MOVD 40(RSP), R16 CMP R16, R13 BHI error_not_enough_space @@ -1697,11 +1723,11 @@ copy_1: // Malformed input if seq.mo > t+len(hist) || seq.mo > s.windowSize) check_offset: MOVD R11, R0 - MOVD 40(RSP), R16 + MOVD 48(RSP), R16 ADD R16, R0, R0 CMP R0, R1 BGT error_match_off_too_big - MOVD 56(RSP), R16 + MOVD 64(RSP), R16 CMP R16, R1 BGT error_match_off_too_big @@ -1709,7 +1735,7 @@ check_offset: MOVD R1, R0 SUBS R11, R0, R0 BLS copy_match - MOVD 48(RSP), R13 + MOVD 56(RSP), R13 SUB R0, R13, R13 CMP R0, R12 BGT copy_all_from_history @@ -1742,13 +1768,14 @@ copy_4_small: JMP copy_4_move_8through16 copy_4_move_3: - MOVH (R13), R0 - MOVB 2(R13), R1 - MOVH R0, (R9) - MOVB R1, 2(R9) - ADD R12, R13, R13 - ADD R12, R9, R9 - JMP copy_4_end + MOVHU (R13), R0 + MOVBU 2(R13), R16 + BFI $0, R16, $8, R1 + MOVH R0, (R9) + MOVB R1, 2(R9) + ADD R12, R13, R13 + ADD R12, R9, R9 + JMP copy_4_end copy_4_move_4through7: MOVWU (R13), R0 @@ -1807,24 +1834,27 @@ copy_5_small: JMP copy_5_move_8through16 copy_5_move_1or2: - MOVB (R13), R14 - ADD R0, R13, R15 - MOVB -1(R15), R4 - MOVB R14, (R9) - ADD R0, R9, R15 - MOVB R4, -1(R15) - ADD R0, R13, R13 - ADD R0, R9, R9 - JMP copy_5_end + MOVBU (R13), R16 + BFI $0, R16, $8, R14 + ADD R0, R13, R15 + MOVBU -1(R15), R16 + BFI $0, R16, $8, R4 + MOVB R14, (R9) + ADD R0, R9, R15 + MOVB R4, -1(R15) + ADD R0, R13, R13 + ADD R0, R9, R9 + JMP copy_5_end copy_5_move_3: - MOVH (R13), R14 - MOVB 2(R13), R4 - MOVH R14, (R9) - MOVB R4, 2(R9) - ADD R0, R13, R13 - ADD R0, R9, R9 - JMP copy_5_end + MOVHU (R13), R14 + MOVBU 2(R13), R16 + BFI $0, R16, $8, R4 + MOVH R14, (R9) + MOVB R4, 2(R9) + ADD R0, R13, R13 + ADD R0, R9, R9 + JMP copy_5_end copy_5_move_4through7: MOVWU (R13), R14 @@ -1879,12 +1909,13 @@ copy_overlapping_match: ADD R12, R11, R11 copy_slow_3: - MOVB (R0), R1 - MOVB R1, (R9) - ADD $1, R0, R0 - ADD $1, R9, R9 - SUBS $1, R12, R12 - BNE copy_slow_3 + MOVBU (R0), R16 + BFI $0, R16, $8, R1 + MOVB R1, (R9) + ADD $1, R0, R0 + ADD $1, R9, R9 + SUBS $1, R12, R12 + BNE copy_slow_3 handle_loop: MOVD ctx+16(FP), R0 @@ -1913,7 +1944,7 @@ loop_finished: // Return with match length error sequenceDecs_decodeSync_amd64_error_match_len_ofs_mismatch: - MOVD 16(RSP), R0 + MOVD 24(RSP), R0 MOVD ctx+16(FP), R1 MOVD R0, 216(R1) MOVD $0x00000001, R16 @@ -1923,7 +1954,7 @@ sequenceDecs_decodeSync_amd64_error_match_len_ofs_mismatch: // Return with match too long error sequenceDecs_decodeSync_amd64_error_match_len_too_big: MOVD ctx+16(FP), R0 - MOVD 16(RSP), R1 + MOVD 24(RSP), R1 MOVD R1, 216(R0) MOVD $0x00000002, R16 MOVD R16, ret+24(FP) @@ -1932,7 +1963,7 @@ sequenceDecs_decodeSync_amd64_error_match_len_too_big: // Return with match offset too long error error_match_off_too_big: MOVD ctx+16(FP), R0 - MOVD 8(RSP), R1 + MOVD 16(RSP), R1 MOVD R1, 224(R0) MOVD R11, 136(R0) MOVD $0x00000003, R16 @@ -1942,7 +1973,7 @@ error_match_off_too_big: // Return with not enough literals error error_not_enough_literals: MOVD ctx+16(FP), R0 - MOVD 24(RSP), R1 + MOVD 32(RSP), R1 MOVD R1, 208(R0) MOVD $0x00000004, R16 MOVD R16, ret+24(FP) @@ -1957,9 +1988,9 @@ error_overread: // Return with not enough output space error error_not_enough_space: MOVD ctx+16(FP), R0 - MOVD 24(RSP), R1 + MOVD 32(RSP), R1 MOVD R1, 208(R0) - MOVD 16(RSP), R1 + MOVD 24(RSP), R1 MOVD R1, 216(R0) MOVD R11, 136(R0) MOVD $0x00000005, R16 @@ -1977,41 +2008,41 @@ TEXT ·sequenceDecs_decodeSync_safe_arm64(SB), $64-32 MOVD (R1), R0 MOVD 32(R1), R5 ADD R5, R0, R0 - MOVD R0, (RSP) + MOVD R0, 8(RSP) MOVD ctx+16(FP), R0 MOVD 72(R0), R6 MOVD 80(R0), R7 MOVD 88(R0), R8 MOVD $0, R1 - MOVD R1, 8(RSP) MOVD R1, 16(RSP) MOVD R1, 24(RSP) + MOVD R1, 32(RSP) MOVD 112(R0), R9 MOVD 128(R0), R1 - MOVD R1, 32(RSP) + MOVD R1, 40(RSP) MOVD 144(R0), R10 MOVD 136(R0), R11 MOVD 200(R0), R1 - MOVD R1, 56(RSP) + MOVD R1, 64(RSP) MOVD 176(R0), R1 - MOVD R1, 48(RSP) + MOVD R1, 56(RSP) MOVD 184(R0), R0 - MOVD R0, 40(RSP) - MOVD 40(RSP), R0 - MOVD 48(RSP), R16 + MOVD R0, 48(RSP) + MOVD 48(RSP), R0 + MOVD 56(RSP), R16 ADD R0, R16, R16 - MOVD R16, 48(RSP) + MOVD R16, 56(RSP) // Calculate pointer to s.out[cap(s.out)] (a past-end pointer) - MOVD 32(RSP), R16 + MOVD 40(RSP), R16 ADD R9, R16, R16 - MOVD R16, 32(RSP) + MOVD R16, 40(RSP) // outBase += outPosition ADD R11, R9, R9 sequenceDecs_decodeSync_safe_amd64_main_loop: - MOVD (RSP), R12 + MOVD 8(RSP), R12 // Fill bitreader to have enough for the offset and match length. CMP $0x08, R5 @@ -2047,7 +2078,8 @@ sequenceDecs_decodeSync_safe_amd64_fill_end: MOVD R3, R1 MOVD R2, R13 LSL R1, R13, R13 - UBFX $8, R0, $8, R1 + UBFX $8, R0, $8, R16 + BFI $0, R16, $8, R1 LSR $0x20, R0, R0 TST R1, R1 BEQ sequenceDecs_decodeSync_safe_amd64_of_update_zero @@ -2061,14 +2093,15 @@ sequenceDecs_decodeSync_safe_amd64_fill_end: ADD R13, R0, R0 sequenceDecs_decodeSync_safe_amd64_of_update_zero: - MOVD R0, 8(RSP) + MOVD R0, 16(RSP) // Update match length MOVD R7, R0 MOVD R3, R1 MOVD R2, R13 LSL R1, R13, R13 - UBFX $8, R0, $8, R1 + UBFX $8, R0, $8, R16 + BFI $0, R16, $8, R1 LSR $0x20, R0, R0 TST R1, R1 BEQ sequenceDecs_decodeSync_safe_amd64_ml_update_zero @@ -2082,7 +2115,7 @@ sequenceDecs_decodeSync_safe_amd64_of_update_zero: ADD R13, R0, R0 sequenceDecs_decodeSync_safe_amd64_ml_update_zero: - MOVD R0, 16(RSP) + MOVD R0, 24(RSP) // Fill bitreader to have enough for the remaining CMP $0x08, R5 @@ -2118,7 +2151,8 @@ sequenceDecs_decodeSync_safe_amd64_fill_2_end: MOVD R3, R1 MOVD R2, R13 LSL R1, R13, R13 - UBFX $8, R0, $8, R1 + UBFX $8, R0, $8, R16 + BFI $0, R16, $8, R1 LSR $0x20, R0, R0 TST R1, R1 BEQ sequenceDecs_decodeSync_safe_amd64_ll_update_zero @@ -2132,10 +2166,10 @@ sequenceDecs_decodeSync_safe_amd64_fill_2_end: ADD R13, R0, R0 sequenceDecs_decodeSync_safe_amd64_ll_update_zero: - MOVD R0, 24(RSP) + MOVD R0, 32(RSP) // Fill bitreader for state updates - MOVD R12, (RSP) + MOVD R12, 8(RSP) MOVD R8, R0 LSR $0x08, R0, R0 MOVBU R0, R0 @@ -2153,7 +2187,7 @@ sequenceDecs_decodeSync_safe_amd64_ll_update_zero: NEG R1, R16 ROR R16, R13, R13 MOVD $0x00000001, R14 - MOVB R12, R1 + BFI $0, R12, $8, R1 LSLW R1, R14, R14 SUBW $1, R14, R14 AND R14, R13, R13 @@ -2174,7 +2208,7 @@ sequenceDecs_decodeSync_safe_amd64_ll_update_zero: NEG R1, R16 ROR R16, R13, R13 MOVD $0x00000001, R14 - MOVB R12, R1 + BFI $0, R12, $8, R1 LSLW R1, R14, R14 SUBW $1, R14, R14 AND R14, R13, R13 @@ -2195,7 +2229,7 @@ sequenceDecs_decodeSync_safe_amd64_ll_update_zero: NEG R1, R16 ROR R16, R13, R13 MOVD $0x00000001, R14 - MOVB R12, R1 + BFI $0, R12, $8, R1 LSLW R1, R14, R14 SUBW $1, R14, R14 AND R14, R13, R13 @@ -2210,7 +2244,7 @@ sequenceDecs_decodeSync_safe_amd64_ll_update_zero: sequenceDecs_decodeSync_safe_amd64_skip_update: // Adjust offset MOVD s+0(FP), R1 - MOVD 8(RSP), R12 + MOVD 16(RSP), R12 CMP $0x01, R0 BLS sequenceDecs_decodeSync_safe_amd64_adjust_offsetB_1_or_0 ADD $144, R1, R15 @@ -2221,7 +2255,7 @@ sequenceDecs_decodeSync_safe_amd64_skip_update: JMP sequenceDecs_decodeSync_safe_amd64_after_adjust sequenceDecs_decodeSync_safe_amd64_adjust_offsetB_1_or_0: - MOVD 24(RSP), R16 + MOVD 32(RSP), R16 CMP $0x00000000, R16 BNE sequenceDecs_decodeSync_safe_amd64_adjust_offset_maybezero ADD $1, R12, R12 @@ -2259,11 +2293,11 @@ sequenceDecs_decodeSync_safe_amd64_adjust_skip: MOVD R13, R12 sequenceDecs_decodeSync_safe_amd64_after_adjust: - MOVD R12, 8(RSP) + MOVD R12, 16(RSP) // Check values - MOVD 16(RSP), R0 - MOVD 24(RSP), R1 + MOVD 24(RSP), R0 + MOVD 32(RSP), R1 ADD R1, R0, R13 MOVD s+0(FP), R14 MOVD 256(R14), R16 @@ -2282,14 +2316,14 @@ sequenceDecs_decodeSync_safe_amd64_after_adjust: BNE sequenceDecs_decodeSync_safe_amd64_error_match_len_ofs_mismatch sequenceDecs_decodeSync_safe_amd64_match_len_ofs_ok: - MOVD 24(RSP), R0 - MOVD 8(RSP), R1 - MOVD 16(RSP), R12 + MOVD 32(RSP), R0 + MOVD 16(RSP), R1 + MOVD 24(RSP), R12 // Check if we have enough space in s.out ADD R12, R0, R13 ADD R9, R13, R13 - MOVD 32(RSP), R16 + MOVD 40(RSP), R16 CMP R16, R13 BHI error_not_enough_space @@ -2326,24 +2360,27 @@ copy_1_small: JMP copy_1_move_8through16 copy_1_move_1or2: - MOVB (R10), R13 - ADD R0, R10, R15 - MOVB -1(R15), R14 - MOVB R13, (R9) - ADD R0, R9, R15 - MOVB R14, -1(R15) - ADD R0, R10, R10 - ADD R0, R9, R9 - JMP copy_1_end + MOVBU (R10), R16 + BFI $0, R16, $8, R13 + ADD R0, R10, R15 + MOVBU -1(R15), R16 + BFI $0, R16, $8, R14 + MOVB R13, (R9) + ADD R0, R9, R15 + MOVB R14, -1(R15) + ADD R0, R10, R10 + ADD R0, R9, R9 + JMP copy_1_end copy_1_move_3: - MOVH (R10), R13 - MOVB 2(R10), R14 - MOVH R13, (R9) - MOVB R14, 2(R9) - ADD R0, R10, R10 - ADD R0, R9, R9 - JMP copy_1_end + MOVHU (R10), R13 + MOVBU 2(R10), R16 + BFI $0, R16, $8, R14 + MOVH R13, (R9) + MOVB R14, 2(R9) + ADD R0, R10, R10 + ADD R0, R9, R9 + JMP copy_1_end copy_1_move_4through7: MOVWU (R10), R13 @@ -2372,11 +2409,11 @@ copy_1_end: // Malformed input if seq.mo > t+len(hist) || seq.mo > s.windowSize) check_offset: MOVD R11, R0 - MOVD 40(RSP), R16 + MOVD 48(RSP), R16 ADD R16, R0, R0 CMP R0, R1 BGT error_match_off_too_big - MOVD 56(RSP), R16 + MOVD 64(RSP), R16 CMP R16, R1 BGT error_match_off_too_big @@ -2384,7 +2421,7 @@ check_offset: MOVD R1, R0 SUBS R11, R0, R0 BLS copy_match - MOVD 48(RSP), R13 + MOVD 56(RSP), R13 SUB R0, R13, R13 CMP R0, R12 BGT copy_all_from_history @@ -2417,13 +2454,14 @@ copy_4_small: JMP copy_4_move_8through16 copy_4_move_3: - MOVH (R13), R0 - MOVB 2(R13), R1 - MOVH R0, (R9) - MOVB R1, 2(R9) - ADD R12, R13, R13 - ADD R12, R9, R9 - JMP copy_4_end + MOVHU (R13), R0 + MOVBU 2(R13), R16 + BFI $0, R16, $8, R1 + MOVH R0, (R9) + MOVB R1, 2(R9) + ADD R12, R13, R13 + ADD R12, R9, R9 + JMP copy_4_end copy_4_move_4through7: MOVWU (R13), R0 @@ -2482,24 +2520,27 @@ copy_5_small: JMP copy_5_move_8through16 copy_5_move_1or2: - MOVB (R13), R14 - ADD R0, R13, R15 - MOVB -1(R15), R4 - MOVB R14, (R9) - ADD R0, R9, R15 - MOVB R4, -1(R15) - ADD R0, R13, R13 - ADD R0, R9, R9 - JMP copy_5_end + MOVBU (R13), R16 + BFI $0, R16, $8, R14 + ADD R0, R13, R15 + MOVBU -1(R15), R16 + BFI $0, R16, $8, R4 + MOVB R14, (R9) + ADD R0, R9, R15 + MOVB R4, -1(R15) + ADD R0, R13, R13 + ADD R0, R9, R9 + JMP copy_5_end copy_5_move_3: - MOVH (R13), R14 - MOVB 2(R13), R4 - MOVH R14, (R9) - MOVB R4, 2(R9) - ADD R0, R13, R13 - ADD R0, R9, R9 - JMP copy_5_end + MOVHU (R13), R14 + MOVBU 2(R13), R16 + BFI $0, R16, $8, R4 + MOVH R14, (R9) + MOVB R4, 2(R9) + ADD R0, R13, R13 + ADD R0, R9, R9 + JMP copy_5_end copy_5_move_4through7: MOVWU (R13), R14 @@ -2567,24 +2608,27 @@ copy_2_small: JMP copy_2_move_8through16 copy_2_move_1or2: - MOVB (R0), R1 - ADD R12, R0, R15 - MOVB -1(R15), R13 - MOVB R1, (R9) - ADD R12, R9, R15 - MOVB R13, -1(R15) - ADD R12, R0, R0 - ADD R12, R9, R9 - JMP copy_2_end + MOVBU (R0), R16 + BFI $0, R16, $8, R1 + ADD R12, R0, R15 + MOVBU -1(R15), R16 + BFI $0, R16, $8, R13 + MOVB R1, (R9) + ADD R12, R9, R15 + MOVB R13, -1(R15) + ADD R12, R0, R0 + ADD R12, R9, R9 + JMP copy_2_end copy_2_move_3: - MOVH (R0), R1 - MOVB 2(R0), R13 - MOVH R1, (R9) - MOVB R13, 2(R9) - ADD R12, R0, R0 - ADD R12, R9, R9 - JMP copy_2_end + MOVHU (R0), R1 + MOVBU 2(R0), R16 + BFI $0, R16, $8, R13 + MOVH R1, (R9) + MOVB R13, 2(R9) + ADD R12, R0, R0 + ADD R12, R9, R9 + JMP copy_2_end copy_2_move_4through7: MOVWU (R0), R1 @@ -2615,12 +2659,13 @@ copy_overlapping_match: ADD R12, R11, R11 copy_slow_3: - MOVB (R0), R1 - MOVB R1, (R9) - ADD $1, R0, R0 - ADD $1, R9, R9 - SUBS $1, R12, R12 - BNE copy_slow_3 + MOVBU (R0), R16 + BFI $0, R16, $8, R1 + MOVB R1, (R9) + ADD $1, R0, R0 + ADD $1, R9, R9 + SUBS $1, R12, R12 + BNE copy_slow_3 handle_loop: MOVD ctx+16(FP), R0 @@ -2649,7 +2694,7 @@ loop_finished: // Return with match length error sequenceDecs_decodeSync_safe_amd64_error_match_len_ofs_mismatch: - MOVD 16(RSP), R0 + MOVD 24(RSP), R0 MOVD ctx+16(FP), R1 MOVD R0, 216(R1) MOVD $0x00000001, R16 @@ -2659,7 +2704,7 @@ sequenceDecs_decodeSync_safe_amd64_error_match_len_ofs_mismatch: // Return with match too long error sequenceDecs_decodeSync_safe_amd64_error_match_len_too_big: MOVD ctx+16(FP), R0 - MOVD 16(RSP), R1 + MOVD 24(RSP), R1 MOVD R1, 216(R0) MOVD $0x00000002, R16 MOVD R16, ret+24(FP) @@ -2668,7 +2713,7 @@ sequenceDecs_decodeSync_safe_amd64_error_match_len_too_big: // Return with match offset too long error error_match_off_too_big: MOVD ctx+16(FP), R0 - MOVD 8(RSP), R1 + MOVD 16(RSP), R1 MOVD R1, 224(R0) MOVD R11, 136(R0) MOVD $0x00000003, R16 @@ -2678,7 +2723,7 @@ error_match_off_too_big: // Return with not enough literals error error_not_enough_literals: MOVD ctx+16(FP), R0 - MOVD 24(RSP), R1 + MOVD 32(RSP), R1 MOVD R1, 208(R0) MOVD $0x00000004, R16 MOVD R16, ret+24(FP) @@ -2693,9 +2738,9 @@ error_overread: // Return with not enough output space error error_not_enough_space: MOVD ctx+16(FP), R0 - MOVD 24(RSP), R1 + MOVD 32(RSP), R1 MOVD R1, 208(R0) - MOVD 16(RSP), R1 + MOVD 24(RSP), R1 MOVD R1, 216(R0) MOVD R11, 136(R0) MOVD $0x00000005, R16 diff --git a/vendor/github.com/klauspost/compress/zstd/seqdec_asm.go b/vendor/github.com/klauspost/compress/zstd/seqdec_asm.go index 55405f3914..42ce5de716 100644 --- a/vendor/github.com/klauspost/compress/zstd/seqdec_asm.go +++ b/vendor/github.com/klauspost/compress/zstd/seqdec_asm.go @@ -77,6 +77,35 @@ const errorNotEnoughSpace = 5 // error reported when bits are overread. const errorOverread = 6 +// useSafeDecodeSync reports whether decodeSyncSimple must use the bounds-exact +// ("safe") copy variants for the current buffer geometry. +// +// When the output and literal buffers have compressedBlockOverAlloc (16) +// bytes of slack past their logical use, the assembly may use extended +// memory copies that read and write in 16-byte blocks, overrunning the end +// of a literal run or match by up to 15 bytes. Otherwise it must use the +// bounds-exact ("safe") copies. This mirrors the analogous, always-dynamic +// selection in executeSimple below. +// +// The unsafe copies were disabled in #644 (2022) as a mitigation for a +// crash, but that crash's root cause — an unguarded bitReader overread that +// produced out-of-range match offsets/lengths — was fixed three days later +// in #645, which also added the fuzz corpus that has guarded this path since. +// See #1168. An asan-instrumented fuzz job (see .github/workflows/go.yml) +// covers the extended-copy path, which -race and plain fuzzing cannot. +func (s *sequenceDecs) useSafeDecodeSync() bool { + if s.maxSyncLen == 0 && cap(s.out)-len(s.out) < maxCompressedBlockSizeAlloc { + return true + } + if s.maxSyncLen > 0 && cap(s.out)-len(s.out)-compressedBlockOverAlloc < int(s.maxSyncLen) { + return true + } + if cap(s.literals) < len(s.literals)+compressedBlockOverAlloc { + return true + } + return false +} + // decode sequences from the stream with the provided history but without a dictionary. func (s *sequenceDecs) decodeSyncSimple(hist []byte) (bool, error) { if len(s.dict) > 0 { @@ -86,9 +115,7 @@ func (s *sequenceDecs) decodeSyncSimple(hist []byte) (bool, error) { return false, nil } - // FIXME: Using unsafe memory copies leads to rare, random crashes - // with fuzz testing. It is therefore disabled for now. - const useSafe = true + useSafe := s.useSafeDecodeSync() br := s.br diff --git a/vendor/github.com/regclient/regclient/.markdownlint.yml b/vendor/github.com/regclient/regclient/.markdownlint.yml index 01f625f5c0..9107628066 100644 --- a/vendor/github.com/regclient/regclient/.markdownlint.yml +++ b/vendor/github.com/regclient/regclient/.markdownlint.yml @@ -1,3 +1,17 @@ +# Copyright the regclient contributors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + # all lists use a `-` MD004: style: dash diff --git a/vendor/github.com/regclient/regclient/.osv-scanner.toml b/vendor/github.com/regclient/regclient/.osv-scanner.toml index 998b29ab78..1499c3658f 100644 --- a/vendor/github.com/regclient/regclient/.osv-scanner.toml +++ b/vendor/github.com/regclient/regclient/.osv-scanner.toml @@ -1 +1 @@ -GoVersionOverride = "1.26.3" +GoVersionOverride = "1.27.0" diff --git a/vendor/github.com/regclient/regclient/.version-bump.lock b/vendor/github.com/regclient/regclient/.version-bump.lock index cd25eead6e..0e3aa3e078 100644 --- a/vendor/github.com/regclient/regclient/.version-bump.lock +++ b/vendor/github.com/regclient/regclient/.version-bump.lock @@ -1,53 +1,53 @@ -{"name":"docker-arg-alpine-digest","key":"docker.io/library/alpine:3.23.4","version":"sha256:5b10f432ef3da1b8d4c7eb6c487f2f5a8f096bc91145e68878dd4a5019afde11"} -{"name":"docker-arg-alpine-tag","key":"docker.io/library/alpine","version":"3.23.4"} +{"name":"docker-arg-alpine-digest","key":"docker.io/library/alpine:3.24.1","version":"sha256:28bd5fe8b56d1bd048e5babf5b10710ebe0bae67db86916198a6eec434943f8b"} +{"name":"docker-arg-alpine-tag","key":"docker.io/library/alpine","version":"3.24.1"} {"name":"docker-arg-ecr","key":"https://github.com/awslabs/amazon-ecr-credential-helper.git","version":"v0.12.0"} -{"name":"docker-arg-gcr","key":"https://github.com/GoogleCloudPlatform/docker-credential-gcr.git","version":"v2.1.32"} -{"name":"docker-arg-go-digest","key":"docker.io/library/golang:1.26.3-alpine","version":"sha256:91eda9776261207ea25fd06b5b7fed8d397dd2c0a283e77f2ab6e91bfa71079d"} -{"name":"docker-arg-go-tag","key":"docker.io/library/golang","version":"1.26.3"} +{"name":"docker-arg-gcr","key":"https://github.com/GoogleCloudPlatform/docker-credential-gcr.git","version":"v2.2.1"} +{"name":"docker-arg-go-digest","key":"docker.io/library/golang:1.27.0-alpine","version":"sha256:4c9fe60190a2a3350ddc51de80d0224b8a6698d12bdfc999fee45ea9d6c46dbc"} +{"name":"docker-arg-go-tag","key":"docker.io/library/golang","version":"1.27.0"} {"name":"docker-arg-lunajson","key":"https://github.com/grafi-tt/lunajson.git:master","version":"e3a9666eb1275741e887e29926b144f8daee3bef"} {"name":"docker-arg-semver","key":"https://github.com/kikito/semver.lua.git:master","version":"a4b708ba243208d46e575da870af969dca46a94d"} -{"name":"gha-alpine-digest","key":"docker.io/library/alpine:3.23.4","version":"sha256:5b10f432ef3da1b8d4c7eb6c487f2f5a8f096bc91145e68878dd4a5019afde11"} +{"name":"gha-alpine-digest","key":"docker.io/library/alpine:3.24.1","version":"sha256:28bd5fe8b56d1bd048e5babf5b10710ebe0bae67db86916198a6eec434943f8b"} {"name":"gha-alpine-tag-base","key":"docker.io/library/alpine","version":"3"} -{"name":"gha-alpine-tag-comment","key":"docker.io/library/alpine","version":"3.23.4"} -{"name":"gha-cosign-version","key":"https://github.com/sigstore/cosign.git","version":"v3.0.6"} -{"name":"gha-golang-matrix","key":"golang-matrix","version":"[\"1.25\", \"1.26\"]"} -{"name":"gha-golang-release","key":"golang-latest","version":"1.26"} -{"name":"gha-syft-version","key":"docker.io/anchore/syft","version":"v1.44.0"} -{"name":"gha-uses-commit","key":"https://github.com/actions/checkout.git:v6.0.2","version":"de0fac2e4500dabe0009e67214ff5f5447ce83dd"} -{"name":"gha-uses-commit","key":"https://github.com/actions/setup-go.git:v6.4.0","version":"4a3601121dd01d1626a1e23e37211e3254c1c06c"} -{"name":"gha-uses-commit","key":"https://github.com/actions/stale.git:v10.3.0","version":"eb5cf3af3ac0a1aa4c9c45633dd1ae542a27a899"} +{"name":"gha-alpine-tag-comment","key":"docker.io/library/alpine","version":"3.24.1"} +{"name":"gha-cosign-version","key":"https://github.com/sigstore/cosign.git","version":"v3.1.3"} +{"name":"gha-golang-matrix","key":"golang-matrix","version":"[\"1.26\", \"1.27\"]"} +{"name":"gha-golang-release","key":"golang-latest","version":"1.27"} +{"name":"gha-syft-version","key":"docker.io/anchore/syft","version":"v1.51.1"} +{"name":"gha-uses-commit","key":"https://github.com/actions/checkout.git:v7.0.1","version":"3d3c42e5aac5ba805825da76410c181273ba90b1"} +{"name":"gha-uses-commit","key":"https://github.com/actions/setup-go.git:v7.0.0","version":"b7ad1dad31e06c5925ef5d2fc7ad053ef454303e"} +{"name":"gha-uses-commit","key":"https://github.com/actions/stale.git:v11.0.0","version":"4391f3da665fdf50b6810c1a66712fb9ba21aa93"} {"name":"gha-uses-commit","key":"https://github.com/actions/upload-artifact.git:v7.0.1","version":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a"} -{"name":"gha-uses-commit","key":"https://github.com/anchore/sbom-action.git:v0.24.0","version":"e22c389904149dbc22b58101806040fa8d37a610"} -{"name":"gha-uses-commit","key":"https://github.com/docker/build-push-action.git:v7.2.0","version":"f9f3042f7e2789586610d6e8b85c8f03e5195baf"} -{"name":"gha-uses-commit","key":"https://github.com/docker/login-action.git:v4.2.0","version":"650006c6eb7dba73a995cc03b0b2d7f5ca915bee"} -{"name":"gha-uses-commit","key":"https://github.com/docker/setup-buildx-action.git:v4.1.0","version":"d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5"} -{"name":"gha-uses-commit","key":"https://github.com/regclient/actions.git:main","version":"c70ad64367908075211b10dcd2ab9fad4bfa1816"} +{"name":"gha-uses-commit","key":"https://github.com/anchore/sbom-action.git:v0.24.2","version":"3ad7283483fc7af8ff2b4ea19663c2d5ca935e26"} +{"name":"gha-uses-commit","key":"https://github.com/docker/build-push-action.git:v7.3.0","version":"53b7df96c91f9c12dcc8a07bcb9ccacbed38856a"} +{"name":"gha-uses-commit","key":"https://github.com/docker/login-action.git:v4.6.0","version":"dbcb813823bdd20940b903addbd779551569679f"} +{"name":"gha-uses-commit","key":"https://github.com/docker/setup-buildx-action.git:v4.3.0","version":"37fe631027851001ddb9b187196cc803df7f5f0e"} +{"name":"gha-uses-commit","key":"https://github.com/regclient/actions.git:main","version":"f9ceff9bbbc63cd1008e60cec2b27627eedc7322"} {"name":"gha-uses-commit","key":"https://github.com/sigstore/cosign-installer.git:v4.1.2","version":"6f9f17788090df1f26f669e9d70d6ae9567deba6"} -{"name":"gha-uses-commit","key":"https://github.com/softprops/action-gh-release.git:v3.0.0","version":"b4309332981a82ec1c5618f44dd2e27cc8bfbfda"} -{"name":"gha-uses-semver","key":"https://github.com/actions/checkout.git","version":"v6.0.2"} -{"name":"gha-uses-semver","key":"https://github.com/actions/setup-go.git","version":"v6.4.0"} -{"name":"gha-uses-semver","key":"https://github.com/actions/stale.git","version":"v10.3.0"} +{"name":"gha-uses-commit","key":"https://github.com/softprops/action-gh-release.git:v3.0.3","version":"efb35369e0ad2afab669f228072c1b0d510eae64"} +{"name":"gha-uses-semver","key":"https://github.com/actions/checkout.git","version":"v7.0.1"} +{"name":"gha-uses-semver","key":"https://github.com/actions/setup-go.git","version":"v7.0.0"} +{"name":"gha-uses-semver","key":"https://github.com/actions/stale.git","version":"v11.0.0"} {"name":"gha-uses-semver","key":"https://github.com/actions/upload-artifact.git","version":"v7.0.1"} -{"name":"gha-uses-semver","key":"https://github.com/anchore/sbom-action.git","version":"v0.24.0"} -{"name":"gha-uses-semver","key":"https://github.com/docker/build-push-action.git","version":"v7.2.0"} -{"name":"gha-uses-semver","key":"https://github.com/docker/login-action.git","version":"v4.2.0"} -{"name":"gha-uses-semver","key":"https://github.com/docker/setup-buildx-action.git","version":"v4.1.0"} +{"name":"gha-uses-semver","key":"https://github.com/anchore/sbom-action.git","version":"v0.24.2"} +{"name":"gha-uses-semver","key":"https://github.com/docker/build-push-action.git","version":"v7.3.0"} +{"name":"gha-uses-semver","key":"https://github.com/docker/login-action.git","version":"v4.6.0"} +{"name":"gha-uses-semver","key":"https://github.com/docker/setup-buildx-action.git","version":"v4.3.0"} {"name":"gha-uses-semver","key":"https://github.com/sigstore/cosign-installer.git","version":"v4.1.2"} -{"name":"gha-uses-semver","key":"https://github.com/softprops/action-gh-release.git","version":"v3.0.0"} -{"name":"go-mod-golang-release","key":"golang-oldest","version":"1.25.0"} +{"name":"gha-uses-semver","key":"https://github.com/softprops/action-gh-release.git","version":"v3.0.3"} +{"name":"go-mod-golang-release","key":"golang-oldest","version":"1.26.0"} {"name":"makefile-ci-distribution","key":"docker.io/library/registry","version":"3.1.1"} -{"name":"makefile-ci-zot","key":"ghcr.io/project-zot/zot-linux-amd64","version":"v2.1.17"} -{"name":"makefile-go-vulncheck","key":"https://go.googlesource.com/vuln.git","version":"v1.3.0"} -{"name":"makefile-gofumpt","key":"https://github.com/mvdan/gofumpt.git","version":"v0.10.0"} +{"name":"makefile-ci-zot","key":"ghcr.io/project-zot/zot-linux-amd64","version":"v2.1.20"} +{"name":"makefile-go-vulncheck","key":"https://go.googlesource.com/vuln.git","version":"v1.7.0"} +{"name":"makefile-gofumpt","key":"https://github.com/mvdan/gofumpt.git","version":"v0.11.0"} {"name":"makefile-gomajor","key":"https://github.com/icholy/gomajor.git","version":"v0.15.0"} -{"name":"makefile-gosec","key":"https://github.com/securego/gosec.git","version":"v2.26.1"} -{"name":"makefile-markdown-lint","key":"docker.io/davidanson/markdownlint-cli2","version":"v0.22.1"} -{"name":"makefile-osv-scanner","key":"https://github.com/google/osv-scanner.git","version":"v2.3.8"} -{"name":"makefile-staticcheck","key":"https://github.com/dominikh/go-tools.git","version":"v0.7.0"} -{"name":"makefile-syft-container-digest","key":"anchore/syft:v1.44.0","version":"sha256:86fde6445b483d902fe011dd9f68c4987dd94e07da1e9edc004e3c2422650de6"} -{"name":"makefile-syft-container-tag","key":"anchore/syft","version":"v1.44.0"} -{"name":"makefile-syft-version","key":"docker.io/anchore/syft","version":"v1.44.0"} -{"name":"osv-golang-release","key":"docker.io/library/golang","version":"1.26.3"} -{"name":"shell-alpine-digest","key":"docker.io/library/alpine:3.23.4","version":"sha256:5b10f432ef3da1b8d4c7eb6c487f2f5a8f096bc91145e68878dd4a5019afde11"} +{"name":"makefile-gosec","key":"https://github.com/securego/gosec.git","version":"v2.29.0"} +{"name":"makefile-markdown-lint","key":"docker.io/davidanson/markdownlint-cli2","version":"v0.23.2"} +{"name":"makefile-osv-scanner","key":"https://github.com/google/osv-scanner.git","version":"v2.5.1"} +{"name":"makefile-staticcheck","key":"https://github.com/dominikh/go-tools.git","version":"v0.8.1"} +{"name":"makefile-syft-container-digest","key":"anchore/syft:v1.51.1","version":"sha256:95fe0835e5bebc6f8b1f8acef68d47d63d594ef4c0f25c097ff853b23cbac74c"} +{"name":"makefile-syft-container-tag","key":"anchore/syft","version":"v1.51.1"} +{"name":"makefile-syft-version","key":"docker.io/anchore/syft","version":"v1.51.1"} +{"name":"osv-golang-release","key":"docker.io/library/golang","version":"1.27.0"} +{"name":"shell-alpine-digest","key":"docker.io/library/alpine:3.24.1","version":"sha256:28bd5fe8b56d1bd048e5babf5b10710ebe0bae67db86916198a6eec434943f8b"} {"name":"shell-alpine-tag-base","key":"docker.io/library/alpine","version":"3"} -{"name":"shell-alpine-tag-comment","key":"docker.io/library/alpine","version":"3.23.4"} +{"name":"shell-alpine-tag-comment","key":"docker.io/library/alpine","version":"3.24.1"} diff --git a/vendor/github.com/regclient/regclient/.version-bump.yml b/vendor/github.com/regclient/regclient/.version-bump.yml index 5e75d790df..3da37db43a 100644 --- a/vendor/github.com/regclient/regclient/.version-bump.yml +++ b/vendor/github.com/regclient/regclient/.version-bump.yml @@ -1,3 +1,17 @@ +# Copyright the regclient contributors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + files: "build/Dockerfile*": processors: diff --git a/vendor/github.com/regclient/regclient/LICENSE b/vendor/github.com/regclient/regclient/LICENSE index 6e12b19d0d..d645695673 100644 --- a/vendor/github.com/regclient/regclient/LICENSE +++ b/vendor/github.com/regclient/regclient/LICENSE @@ -176,7 +176,18 @@ END OF TERMS AND CONDITIONS - Copyright 2020 The regclient Authors. + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/vendor/github.com/regclient/regclient/Makefile b/vendor/github.com/regclient/regclient/Makefile index 17e6f90b19..c575eb8da3 100644 --- a/vendor/github.com/regclient/regclient/Makefile +++ b/vendor/github.com/regclient/regclient/Makefile @@ -1,3 +1,17 @@ +# Copyright the regclient contributors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + COMMANDS?=regctl regsync regbot BINARIES?=$(addprefix bin/,$(COMMANDS)) IMAGES?=$(addprefix docker-,$(COMMANDS)) @@ -18,7 +32,7 @@ VCS_VERSION?=$(shell vcs_describe="$$(git describe --all)"; \ if [ "main" = "$${vcs_version}" ]; then vcs_version=edge; fi; \ fi; \ echo "$${vcs_version}" | sed -r 's#/+#-#g') -VCS_TAG?=$(shell git describe --tags --abbrev=0 2>/dev/null || true) +VCS_TAG?=$(shell git describe --tags --exact-match 2>/dev/null || true) VCS_SEC?=$(shell git log -1 --format=%ct) VCS_DATE?=$(shell date -d "@$(VCS_SEC)" +%Y-%m-%dT%H:%M:%SZ --utc) LD_FLAGS?=-s -w -extldflags -static -buildid= -X \"github.com/regclient/regclient/internal/version.vcsTag=$(VCS_TAG)\" @@ -35,25 +49,25 @@ ifeq "$(strip $(VER_BUMP))" '' -u "$(shell id -u):$(shell id -g)" \ $(VER_BUMP_CONTAINER) endif -MARKDOWN_LINT_VER?=v0.22.1 -GOFUMPT_VER?=v0.10.0 +MARKDOWN_LINT_VER?=v0.23.2 +GOFUMPT_VER?=v0.11.0 GOMAJOR_VER?=v0.15.0 -GOSEC_VER?=v2.26.1 -GO_VULNCHECK_VER?=v1.3.0 -OSV_SCANNER_VER?=v2.3.8 +GOSEC_VER?=v2.29.0 +GO_VULNCHECK_VER?=v1.7.0 +OSV_SCANNER_VER?=v2.5.1 SYFT?=$(shell command -v syft 2>/dev/null) SYFT_CMD_VER:=$(shell [ -x "$(SYFT)" ] && echo "v$$($(SYFT) version | awk '/^Version: / {print $$2}')" || echo "0") -SYFT_VERSION?=v1.44.0 -SYFT_CONTAINER?=anchore/syft:v1.44.0@sha256:86fde6445b483d902fe011dd9f68c4987dd94e07da1e9edc004e3c2422650de6 +SYFT_VERSION?=v1.51.1 +SYFT_CONTAINER?=anchore/syft:v1.51.1@sha256:95fe0835e5bebc6f8b1f8acef68d47d63d594ef4c0f25c097ff853b23cbac74c ifneq "$(SYFT_CMD_VER)" "$(SYFT_VERSION)" SYFT=docker run --rm \ -v "$(shell pwd)/:$(shell pwd)/" -w "$(shell pwd)" \ -u "$(shell id -u):$(shell id -g)" \ $(SYFT_CONTAINER) endif -STATICCHECK_VER?=v0.7.0 +STATICCHECK_VER?=v0.8.1 CI_DISTRIBUTION_VER?=3.1.1 -CI_ZOT_VER?=v2.1.17 +CI_ZOT_VER?=v2.1.20 .PHONY: .FORCE .FORCE: @@ -85,7 +99,11 @@ test: ## go test go test -cover -race ./... .PHONY: lint -lint: lint-go lint-goimports lint-md lint-gosec ## Run all linting +lint: lint-go lint-goimports lint-md lint-gosec lint-copyright ## Run all linting + +.PHONY: lint-copyright +lint-copyright: ## Verify copyright headers in code files + ./build/lint-copyright.sh .PHONY: lint-go lint-go: $(GOPATH)/bin/gofumpt $(GOPATH)/bin/staticcheck .FORCE ## Run linting for Go @@ -223,13 +241,11 @@ util-golang-update: ## update go module versions .PHONY: util-release-preview util-release-preview: $(GOPATH)/bin/gorelease ## preview changes for next release - git checkout main ./.github/release.sh -d gorelease .PHONY: util-release-run util-release-run: ## generate a new release - git checkout main ./.github/release.sh .PHONY: util-version-check diff --git a/vendor/github.com/regclient/regclient/README.md b/vendor/github.com/regclient/regclient/README.md index 59db82fe87..0dd7c24d40 100644 --- a/vendor/github.com/regclient/regclient/README.md +++ b/vendor/github.com/regclient/regclient/README.md @@ -7,7 +7,6 @@ [![Go Reference](https://pkg.go.dev/badge/github.com/regclient/regclient.svg)](https://pkg.go.dev/github.com/regclient/regclient) ![License](https://img.shields.io/github/license/regclient/regclient) -[![Go Report Card](https://goreportcard.com/badge/github.com/regclient/regclient)](https://goreportcard.com/report/github.com/regclient/regclient) [![GitHub Downloads](https://img.shields.io/github/downloads/regclient/regclient/total?label=GitHub%20downloads)](https://github.com/regclient/regclient/releases) regclient is a client interface to OCI conformant registries and content shipped with the OCI Image Layout. diff --git a/vendor/github.com/regclient/regclient/RELEASE.md b/vendor/github.com/regclient/regclient/RELEASE.md new file mode 100644 index 0000000000..c300301433 --- /dev/null +++ b/vendor/github.com/regclient/regclient/RELEASE.md @@ -0,0 +1,1774 @@ +# Release Notes + +## Release v0.11.6 + +Features: + +- image mod support for user, workdir, and author. ([PR 1101][pr-1101]) +- Support RC releases. ([PR 1126][pr-1126]) + +Fixes: + +- Add limits and controls to ReadAll. ([PR 1096][pr-1096]) +- Skip local check on requests going through a proxy. ([PR 1099][pr-1099]) +- URLs passed to ProxyFromEnvironment require a scheme. ([PR 1104][pr-1104]) +- Avoid a panic if http.DefaultTransport is altered. ([PR 1109][pr-1109]) +- Handle docker schema v1 with ocidir. ([PR 1111][pr-1111]) +- Do not checkout main branch for releases. ([PR 1127][pr-1127]) +- Pin Go version for regctl mod commands. ([PR 1130][pr-1130]) +- Improve reproducibility with tags on main branch. ([PR 1131][pr-1131]) +- Do not sign SBOMs. ([PR 1133][pr-1133]) + +Other changes: + +- Add copyright headers. ([PR 1102][pr-1102]) +- Improve error messages in ocidir scheme. ([PR 1106][pr-1106]) +- Upgrade osv-scanner to v2. ([PR 1115][pr-1115]) +- Remove go reportcard. ([PR 1119][pr-1119]) + +Contributors: + +- @sudo-bmitch + +[pr-1096]: https://github.com/regclient/regclient/pull/1096 +[pr-1099]: https://github.com/regclient/regclient/pull/1099 +[pr-1101]: https://github.com/regclient/regclient/pull/1101 +[pr-1102]: https://github.com/regclient/regclient/pull/1102 +[pr-1104]: https://github.com/regclient/regclient/pull/1104 +[pr-1106]: https://github.com/regclient/regclient/pull/1106 +[pr-1109]: https://github.com/regclient/regclient/pull/1109 +[pr-1111]: https://github.com/regclient/regclient/pull/1111 +[pr-1115]: https://github.com/regclient/regclient/pull/1115 +[pr-1119]: https://github.com/regclient/regclient/pull/1119 +[pr-1126]: https://github.com/regclient/regclient/pull/1126 +[pr-1127]: https://github.com/regclient/regclient/pull/1127 +[pr-1130]: https://github.com/regclient/regclient/pull/1130 +[pr-1131]: https://github.com/regclient/regclient/pull/1131 +[pr-1133]: https://github.com/regclient/regclient/pull/1133 + +## Release v0.11.5 + +Security: + +- Prevent https to non-https downgrades and localhost redirects. ([PR 1093][pr-1093]) +- Forbid sending auth on redirects. ([PR 1095][pr-1095]) + +Features: + +- Add regbot `manifest.descriptor` to the sandbox. ([PR 1091][pr-1091]) + +Contributors: + +- @GimmyDatBeeR +- @sudo-bmitch + +[pr-1091]: https://github.com/regclient/regclient/pull/1091 +[pr-1093]: https://github.com/regclient/regclient/pull/1093 +[pr-1095]: https://github.com/regclient/regclient/pull/1095 + +## Release v0.11.4 + +Security: + +- Validate server URL in token auth. ([PR 1075][pr-1075]) +- Upgrading Go fixes CVE-2026-33814 and CVE-2026-39836, other vulnerabilities fixed in 1.26.3 were not called by this project. ([PR 1084][pr-1084]) + +Features: + +- Support scanning OCI Layout for referrers. ([PR 1074][pr-1074]) +- Add created timestamp in OCI Layout entries. ([PR 1081][pr-1081]) +- `tag.ls` now accepts the same pagination parameters as `repo.ls`. ([PR 1086][pr-1086]) + +Fixes: + +- Push tags for minor and major releases on Docker Hub. ([PR 1087][pr-1087]) + +Contributors: + +- @ffried +- @sudo-bmitch + +[pr-1074]: https://github.com/regclient/regclient/pull/1074 +[pr-1075]: https://github.com/regclient/regclient/pull/1075 +[pr-1081]: https://github.com/regclient/regclient/pull/1081 +[pr-1084]: https://github.com/regclient/regclient/pull/1084 +[pr-1086]: https://github.com/regclient/regclient/pull/1086 +[pr-1087]: https://github.com/regclient/regclient/pull/1087 + +## Release v0.11.3 + +Security: + +- Go 1.26.2 release fixes CVE-2026-32280 ([PR 1072][pr-1072]) +- Go 1.26.2 release fixes CVE-2026-32281 ([PR 1072][pr-1072]) +- Go 1.26.2 release fixes CVE-2026-32283 ([PR 1072][pr-1072]) +- Go 1.26.2 release fixes CVE-2026-32288 ([PR 1072][pr-1072]) +- Go 1.26.2 release fixes CVE-2026-33810 ([PR 1072][pr-1072]) + +Features: + +- Add support for pushing digest with tags. ([PR 1062][pr-1062]) +- Handle OCI-Tag headers with comma separators. ([PR 1070][pr-1070]) + +Contributors: + +- @sudo-bmitch + +[pr-1062]: https://github.com/regclient/regclient/pull/1062 +[pr-1070]: https://github.com/regclient/regclient/pull/1070 +[pr-1072]: https://github.com/regclient/regclient/pull/1072 + +## Release v0.11.2 + +Features: + +- Add support for regctl config in XDG and APPDATA. ([PR 1038][pr-1038]) +- Add `ImageWithBlobReaderHook` for callbacks per layer when copying an image. ([PR 1046][pr-1046]) + +Fixes: + +- Do not sign released images multiple times. ([PR 1027][pr-1027]) +- regctl/action update for path fix. ([PR 1031][pr-1031]) +- Remove default values from regctl config. ([PR 1039][pr-1039]) +- Apply Go modernizations with `go fix` from 1.26.0. ([PR 1053][pr-1053]) +- Adjust test repo names to avoid races. ([PR 1054][pr-1054]) +- Automatically upgrade goimports and gorelease. ([PR 1056][pr-1056]) + +Other Changes: + +- Add `REGCTL_CONFIG` to `regctl` help messages. ([PR 1037][pr-1037]) +- Go upgrade fixes CVE-2025-68121, govulncheck indicates this project is not vulnerable. ([PR 1047][pr-1047]) + +Contributors: + +- @sudo-bmitch +- @vrajashkr + +[pr-1027]: https://github.com/regclient/regclient/pull/1027 +[pr-1031]: https://github.com/regclient/regclient/pull/1031 +[pr-1037]: https://github.com/regclient/regclient/pull/1037 +[pr-1038]: https://github.com/regclient/regclient/pull/1038 +[pr-1039]: https://github.com/regclient/regclient/pull/1039 +[pr-1047]: https://github.com/regclient/regclient/pull/1047 +[pr-1046]: https://github.com/regclient/regclient/pull/1046 +[pr-1053]: https://github.com/regclient/regclient/pull/1053 +[pr-1054]: https://github.com/regclient/regclient/pull/1054 +[pr-1056]: https://github.com/regclient/regclient/pull/1056 + +## Release v0.11.1 + +Security: + +- Go 1.25.5 fixes CVE-2025-61729 ([PR 1025][pr-1025]) +- Go 1.25.5 fixes CVE-2025-61727 ([PR 1025][pr-1025]) + +Fixes: + +- Correct selection of previous tag for releases. ([PR 1023][pr-1023]) +- Make sure ContentLength is correctly set in the request. ([PR 1024][pr-1024]) + +Contributors: + +- @sudo-bmitch + +[pr-1023]: https://github.com/regclient/regclient/pull/1023 +[pr-1024]: https://github.com/regclient/regclient/pull/1024 +[pr-1025]: https://github.com/regclient/regclient/pull/1025 + +## Release v0.11.0 + +Features: + +- Build artifacts for riscv64. ([PR 1011][pr-1011]) +- Generate FreeBSD amd64 binaries. ([PR 1013][pr-1013]) +- Add support for cosign v3 bundles. ([PR 1018][pr-1018]) + +Fixes: + +- Fix ECR Helper version pin. ([PR 1017][pr-1017]) +- Fix the cosign use-signing-config flag. ([PR 1019][pr-1019]) +- Improve reproducibility in Dockerfiles. ([PR 1020][pr-1020]) + +Other Changes: + +- Add a policy for LLM generated contributions. ([PR 1016][pr-1016]) + +Contributors: + +- @ffgan +- @sudo-bmitch + +[pr-1011]: https://github.com/regclient/regclient/pull/1011 +[pr-1013]: https://github.com/regclient/regclient/pull/1013 +[pr-1016]: https://github.com/regclient/regclient/pull/1016 +[pr-1017]: https://github.com/regclient/regclient/pull/1017 +[pr-1018]: https://github.com/regclient/regclient/pull/1018 +[pr-1019]: https://github.com/regclient/regclient/pull/1019 +[pr-1020]: https://github.com/regclient/regclient/pull/1020 + +## Release v0.10.0 + +Features: + +- Feat: Support DOCKER_AUTH_CONFIG variable. ([PR 996][pr-996]) +- Feat: Add regctl repo copy. ([PR 997][pr-997]) +- Feat: regsync support for semantic versioning(semver) for matching tags ([PR 1005][pr-1005]) +- Feat: Add `tagSets` to regsync. ([PR 1008][pr-1008]) + +Changes: + +- Chore: Add go:fix lines to deprecated code. ([PR 994][pr-994]) +- Chore: Add gofumpt to the build. ([PR 995][pr-995]) +- Chore: Remove the unused bps field. ([PR 998][pr-998]) +- Fix: Handle semver compare of numeric prerelease ([PR 1007][pr-1007]) + +Security: + +- CVE-2025-58187: Fixed with Go upgrade (). +- CVE-2025-58189: Fixed with Go upgrade (). +- CVE-2025-61723: Fixed with Go upgrade (). +- CVE-2025-47912: Fixed with Go upgrade (). +- CVE-2025-58185: Fixed with Go upgrade (). +- CVE-2025-58186: Fixed with Go upgrade (). +- CVE-2025-58188: Fixed with Go upgrade (). +- CVE-2025-58183: Fixed with Go upgrade (). +- CVE-2025-9230: Fixed with Alpine image upgrade. +- CVE-2025-9230: Fixed with Alpine image upgrade. +- CVE-2025-9232: Fixed with Alpine image upgrade. +- CVE-2025-9232: Fixed with Alpine image upgrade. +- CVE-2025-9231: Fixed with Alpine image upgrade. +- CVE-2025-9231: Fixed with Alpine image upgrade. + +Contributors: + +- @daimoniac +- @sudo-bmitch + +[pr-994]: https://github.com/regclient/regclient/pull/994 +[pr-995]: https://github.com/regclient/regclient/pull/995 +[pr-996]: https://github.com/regclient/regclient/pull/996 +[pr-997]: https://github.com/regclient/regclient/pull/997 +[pr-998]: https://github.com/regclient/regclient/pull/998 +[pr-1005]: https://github.com/regclient/regclient/pull/1005 +[pr-1007]: https://github.com/regclient/regclient/pull/1007 +[pr-1008]: https://github.com/regclient/regclient/pull/1008 + +## Release v0.9.2 + +Security: + +- xz upgrade fixes CVE-2025-58058 ([PR 989][pr-989]) + +Miscellaneous: + +- Fix CLI lint errors. ([PR 983][pr-983]) +- Cleanup version output. ([PR 985][pr-985]) +- Dockerfile cleanup. ([PR 986][pr-986]) + +Contributors: + +- @sudo-bmitch + +[pr-983]: https://github.com/regclient/regclient/pull/983 +[pr-985]: https://github.com/regclient/regclient/pull/985 +[pr-986]: https://github.com/regclient/regclient/pull/986 +[pr-989]: https://github.com/regclient/regclient/pull/989 + +## Release v0.9.1 + +Features: + +- Allow relative urls in bearer auth. ([PR 963][pr-963]) +- Add "ns" query param to registry mirror requests. ([PR 976][pr-976]) + +Miscellaneous: + +- Update to SLSA v1 provenance. ([PR 968][pr-968]) +- Add a "make clean" command. ([PR 969][pr-969]) + +Contributors: + +- @sudo-bmitch +- @wjordan + +[pr-963]: https://github.com/regclient/regclient/pull/963 +[pr-968]: https://github.com/regclient/regclient/pull/968 +[pr-969]: https://github.com/regclient/regclient/pull/969 +[pr-976]: https://github.com/regclient/regclient/pull/976 + +## Release v0.9.0 + +Breaking: + +- Drop support for 3rd Go release because of upstream forced upgrades (see ). ([PR 948][pr-948]) + +Features: + +- Add a script to reproduce regclient images. ([PR 940][pr-940]) +- Support IPv6 hosts. ([PR 956][pr-956]) + +Fixes: + +- Convert docker attestations built with `oci-artifact=true`. ([PR 949][pr-949]) +- Allow duplicate keys in yaml config. ([PR 952][pr-952]) + +Miscellaneous: + +- Migrate yaml library. ([PR 947][pr-947]) +- Convert the build to use OCI style attestations. ([PR 950][pr-950]) + +Contributors: + +- @JimmyMa +- @sudo-bmitch + +[pr-940]: https://github.com/regclient/regclient/pull/940 +[pr-947]: https://github.com/regclient/regclient/pull/947 +[pr-948]: https://github.com/regclient/regclient/pull/948 +[pr-949]: https://github.com/regclient/regclient/pull/949 +[pr-950]: https://github.com/regclient/regclient/pull/950 +[pr-952]: https://github.com/regclient/regclient/pull/952 +[pr-956]: https://github.com/regclient/regclient/pull/956 + +## Release v0.8.3 + +Features: + +- Add `ref.AddDigest` method that does not unset the tag. ([PR 910][pr-910]) +- Adding a `regctl registry whoami` command. ([PR 912][pr-912]) +- Improve `regctl image check-base` output. ([PR 917][pr-917]) +- regsync option to abort on errors. ([PR 924][pr-924]) +- Improve fallback tag handling. ([PR 925][pr-925]) +- regctl flag to ignore missing images on delete. ([PR 930][pr-930]) + +Fixes: + +- Validate registry names. ([PR 911][pr-911]) +- Escape regexp example. ([PR 920][pr-920]) +- Auth header parsing. ([PR 936][pr-936]) + +Changes: + +- Update supported Go releases to 1.22, 1.23, and 1.24. ([PR 909][pr-909]) +- Modernize Go to the 1.22 specs. ([PR 910][pr-910]) +- Refactor cobra commands. ([PR 915][pr-915]) +- Include Docker Hub repository documentation. ([PR 918][pr-918]) +- Move documentation pointers to the website. ([PR 939][pr-939]) + +Contributors: + +- @sudo-bmitch + +[pr-909]: https://github.com/regclient/regclient/pull/909 +[pr-910]: https://github.com/regclient/regclient/pull/910 +[pr-911]: https://github.com/regclient/regclient/pull/911 +[pr-912]: https://github.com/regclient/regclient/pull/912 +[pr-915]: https://github.com/regclient/regclient/pull/915 +[pr-917]: https://github.com/regclient/regclient/pull/917 +[pr-918]: https://github.com/regclient/regclient/pull/918 +[pr-920]: https://github.com/regclient/regclient/pull/920 +[pr-924]: https://github.com/regclient/regclient/pull/924 +[pr-925]: https://github.com/regclient/regclient/pull/925 +[pr-930]: https://github.com/regclient/regclient/pull/930 +[pr-936]: https://github.com/regclient/regclient/pull/936 +[pr-939]: https://github.com/regclient/regclient/pull/939 + +## Release v0.8.2 + +This fixes a regression in v0.8.1 for users authenticating using a refresh token. + +Fixes: + +- Allow authentication with a token. ([PR 908][pr-908]) + +Contributors: + +- @sudo-bmitch + +[pr-908]: https://github.com/regclient/regclient/pull/908 + +## Release v0.8.1 + +Security: + +- Go v1.23.6 fixes CVE-2025-22866. ([PR 906][pr-906]) + +Features: + +- Improve regctl arg completion. ([PR 895][pr-895]) +- Add cobra command for documentation. ([PR 900][pr-900]) + +Fixes: + +- Do not request offline refresh token. ([PR 893][pr-893]) +- Ignore unsupported entries in docker config. ([PR 894][pr-894]) +- Align log levels with slog. ([PR 901][pr-901]) +- Interval overrides a default schedule in regsync and regbot. ([PR 904][pr-904]) + +Miscellaneous: + +- Adding a logo. ([PR 889][pr-889]) + +Contributors: + +- @obaibula +- @sudo-bmitch + +[pr-889]: https://github.com/regclient/regclient/pull/889 +[pr-893]: https://github.com/regclient/regclient/pull/893 +[pr-894]: https://github.com/regclient/regclient/pull/894 +[pr-895]: https://github.com/regclient/regclient/pull/895 +[pr-900]: https://github.com/regclient/regclient/pull/900 +[pr-901]: https://github.com/regclient/regclient/pull/901 +[pr-904]: https://github.com/regclient/regclient/pull/904 +[pr-906]: https://github.com/regclient/regclient/pull/906 + +## Release v0.8.0 + +## Highlights + +There are three headline changes in this release: slog support, external referrers, and deprecating legacy packages. + +This release switches from logrus to slog. +Migration methods are included to minimize the impact on existing users. +Anyone parsing the logging output from regctl, regsync, and regbot will notice the format has changed. + +External referrers allow referrers to be pushed and pulled from a separate repository from the subject image. +This feature requires users to provide the external repository themselves since a registry has no way to communicate this to the user. +An example use case of this feature are third parties, like security scanners, providing attestations of images they do not control. + +Legacy packages have been disabled by default and will eventually be removed. +To continue using legacy packages until their removal, you may compile with `-tags legacy`. + +## Breaking + +- Breaking: Warning handlers switched from `logrus` to `slog` which will only impact those with a custom warning handler. ([PR 847][pr-847]) +- Breaking: Disable legacy packages by default. ([PR 852][pr-852]) + +## Features + +- Feat: Refactor logging to use log/slog. ([PR 847][pr-847]) +- Feat: Switch regbot to slog. ([PR 849][pr-849]) +- Feat: Switch regctl to slog. ([PR 850][pr-850]) +- Feat: Switch regsync to slog. ([PR 851][pr-851]) +- Feat: Move logrus calls into files excluded by wasm. ([PR 853][pr-853]) +- Feat: Allow plus in ocidir path. ([PR 856][pr-856]) +- Feat: Support referrers in an external repository. ([PR 866][pr-866]) +- Feat: Image mod environment variables. ([PR 867][pr-867]) +- Feat: Include source in referrers response. ([PR 870][pr-870]) +- Feat: Add external flag to regctl artifact put. ([PR 873][pr-873]) +- Feat: Copy image with external referrers. ([PR 874][pr-874]) +- Feat: Document community maintained packages. ([PR 878][pr-878]) +- Feat: Support external referrers in regsync. ([PR 881][pr-881]) +- Feat: Support incomplete subject descriptor. ([PR 885][pr-885]) + +## Fixes + +- Fix: Inject release notes by file. ([PR 854][pr-854]) +- Fix: Platform test for darwin/macos should not add variant. ([PR 879][pr-879]) +- Fix: Handle repeated digest in copy with external referrers. ([PR 882][pr-882]) + +## Chores + +- Chore: Improve error message when inspecting artifacts. ([PR 862][pr-862]) +- Chore: Remove unused short arg parameters. ([PR 877][pr-877]) + +## Contributors + +- @sudo-bmitch + +[pr-847]: https://github.com/regclient/regclient/pull/847 +[pr-849]: https://github.com/regclient/regclient/pull/849 +[pr-850]: https://github.com/regclient/regclient/pull/850 +[pr-851]: https://github.com/regclient/regclient/pull/851 +[pr-852]: https://github.com/regclient/regclient/pull/852 +[pr-853]: https://github.com/regclient/regclient/pull/853 +[pr-854]: https://github.com/regclient/regclient/pull/854 +[pr-856]: https://github.com/regclient/regclient/pull/856 +[pr-862]: https://github.com/regclient/regclient/pull/862 +[pr-866]: https://github.com/regclient/regclient/pull/866 +[pr-867]: https://github.com/regclient/regclient/pull/867 +[pr-870]: https://github.com/regclient/regclient/pull/870 +[pr-873]: https://github.com/regclient/regclient/pull/873 +[pr-874]: https://github.com/regclient/regclient/pull/874 +[pr-877]: https://github.com/regclient/regclient/pull/877 +[pr-878]: https://github.com/regclient/regclient/pull/878 +[pr-879]: https://github.com/regclient/regclient/pull/879 +[pr-881]: https://github.com/regclient/regclient/pull/881 +[pr-882]: https://github.com/regclient/regclient/pull/882 +[pr-885]: https://github.com/regclient/regclient/pull/885 + +## Release v0.7.2 + +Breaking Changes: + +The breaking changes are to internal methods and undocumented features that should not be encountered by users. + +- Update scheme to use pqueue instead of throttle. ([PR 803][pr-803]) +- Removes an undocumented API for deleting images from Hub. ([PR 803][pr-803]) +- `config.Host.Throttle()` has been removed. Use `scheme.Throttler` instead. ([PR 813][pr-813]) + +Features: + +- Significant refactor of http APIs to speed up image copies. ([PR 803][pr-803]) +- Add a priority queue for network requests. ([PR 803][pr-803]) +- Move logging into transport and rework backoff. ([PR 803][pr-803]) +- Remove default rate limit. ([PR 803][pr-803]) +- Add priority queue algorithm and reorder image copy steps. ([PR 803][pr-803]) +- Consolidate warnings. ([PR 810][pr-810]) +- Limit number of retries for a request. ([PR 812][pr-812]) +- Add default host config. ([PR 821][pr-821]) + +Fixes: + +- Update GHA output generating steps. ([PR 800][pr-800]) +- Lookup referrers when registry does not give digest with head. ([PR 801][pr-801]) +- Support auth on redirect. ([PR 805][pr-805]) +- Prevent data race when reading blob and seeking. ([PR 814][pr-814]) +- Detect integer overflows on type conversion. ([PR 830][pr-830]) +- Add a warning if syft is not installed. ([PR 841][pr-841]) +- Race condition in the pqueue tests. ([PR 843][pr-843]) +- Dedup warnings on image mod. ([PR 846][pr-846]) + +Chores: + +- Update staticcheck and fix linter warnings for Go 1.23. ([PR 804][pr-804]) +- Remove digest calculation from reghttp. ([PR 803][pr-803]) +- Remove `ReqPerSec` in tests. ([PR 806][pr-806]) +- Move throttle from `config` to `reghttp`. ([PR 813][pr-813]) +- Refactoring to remove globals in regsync. ([PR 815][pr-815]) +- Refactor to remove globals in regbot. ([PR 816][pr-816]) +- Remove throttle package. ([PR 817][pr-817]) +- Update version-bump config for processors. ([PR 828][pr-828]) +- Update config to use yaml anchors and aliases ([PR 829][pr-829]) +- Do not automatically assign myself to GitHub issues. ([PR 831][pr-831]) +- Remove OpenSSF scorecard and best practices. ([PR 832][pr-832]) +- Update docker image base filesystem. ([PR 837][pr-837]) + +Contributors: + +- @sudo-bmitch + +[pr-800]: https://github.com/regclient/regclient/pull/800 +[pr-801]: https://github.com/regclient/regclient/pull/801 +[pr-804]: https://github.com/regclient/regclient/pull/804 +[pr-803]: https://github.com/regclient/regclient/pull/803 +[pr-805]: https://github.com/regclient/regclient/pull/805 +[pr-806]: https://github.com/regclient/regclient/pull/806 +[pr-810]: https://github.com/regclient/regclient/pull/810 +[pr-812]: https://github.com/regclient/regclient/pull/812 +[pr-813]: https://github.com/regclient/regclient/pull/813 +[pr-814]: https://github.com/regclient/regclient/pull/814 +[pr-815]: https://github.com/regclient/regclient/pull/815 +[pr-816]: https://github.com/regclient/regclient/pull/816 +[pr-817]: https://github.com/regclient/regclient/pull/817 +[pr-821]: https://github.com/regclient/regclient/pull/821 +[pr-828]: https://github.com/regclient/regclient/pull/828 +[pr-829]: https://github.com/regclient/regclient/pull/829 +[pr-830]: https://github.com/regclient/regclient/pull/830 +[pr-831]: https://github.com/regclient/regclient/pull/831 +[pr-832]: https://github.com/regclient/regclient/pull/832 +[pr-837]: https://github.com/regclient/regclient/pull/837 +[pr-841]: https://github.com/regclient/regclient/pull/841 +[pr-843]: https://github.com/regclient/regclient/pull/843 +[pr-846]: https://github.com/regclient/regclient/pull/846 + +## Release v0.7.1 + +[PR 798][pr-798] fixes an issue where a malicious registry could return a pinned manifest different from the request. +Commands like `regctl manifest get $image@$digest` will now verify the digest of the returned manifest matches the request rather than the registry headers. + +Security updates: + +- Validate the digest of the ref when provided. ([PR 798][pr-798]) + +Features: + +- Add a `WithDockerCredsFile() regclient.Opt`. ([PR 784][pr-784]) +- Add `regctl artifact get --config` option to only return the config. ([PR 795][pr-795]) + +Fixes: + +- Detect `amd64` variants for `--platform local`. ([PR 782][pr-782]) +- Mod tracking of changed manifests. ([PR 783][pr-783]) +- Tar path separator should always be a `/`. ([PR 788][pr-788]) + +Other Changes: + +- Remove docker build cache in GHA. ([PR 780][pr-780]) + +Contributors: + +- @mmonaco +- @stormyyd +- @sudo-bmitch + +[pr-780]: https://github.com/regclient/regclient/pull/780 +[pr-782]: https://github.com/regclient/regclient/pull/782 +[pr-783]: https://github.com/regclient/regclient/pull/783 +[pr-784]: https://github.com/regclient/regclient/pull/784 +[pr-788]: https://github.com/regclient/regclient/pull/788 +[pr-795]: https://github.com/regclient/regclient/pull/795 +[pr-798]: https://github.com/regclient/regclient/pull/798 + +## Release v0.7.0 + +CVEs: + +- CVE-2024-24790 fix included with Go 1.22.4 upgrade. ([PR 762][pr-762]) +- CVE-2024-24791 fix included with Go 1.22.5 upgrade. ([PR 777][pr-777]) + +Breaking: + +- `regctl registry set` and `regctl registry login` will return a non-zero if the ping fails. ([PR 751][pr-751]) +- Removed `WithFS` which required access to an internal interface to use. ([PR 772][pr-772]) + +Features: + +- Add an experimental `regctl ref` command. ([PR 765][pr-765]) +- Support digest algorithms beyond sha256. ([PR 776][pr-776]) +- Support modifying the digest algorithm on an image. ([PR 776][pr-776]) +- Experimental support for pushing tagged manifests with different digest algorithms. ([PR 778][pr-778]) + +Fixes: + +- Prevent panic on interrupted image mod. ([PR 746][pr-746]) +- Enable deletion on olareg tests. ([PR 758][pr-758]) +- Allow `~` (tilde) in ocidir reference paths. ([PR 763][pr-763]) +- Allow well known architectures as a platform. ([PR 771][pr-771]) +- Validate digests before calling methods that could panic. ([PR 776][pr-776]) + +Other changes: + +- Refactor pulling manifests by platform. ([PR 768][pr-768]) +- Cleanup Dockerfile linter warnings. ([PR 770][pr-770]) +- Enable docker caching of GHA builds. ([PR 773][pr-773]) +- Include a contributor list in the readme. ([PR 774][pr-774]) + +Contributors: + +- @sudo-bmitch +- @thesayyn + +[pr-746]: https://github.com/regclient/regclient/pull/746 +[pr-751]: https://github.com/regclient/regclient/pull/751 +[pr-758]: https://github.com/regclient/regclient/pull/758 +[pr-762]: https://github.com/regclient/regclient/pull/762 +[pr-763]: https://github.com/regclient/regclient/pull/763 +[pr-765]: https://github.com/regclient/regclient/pull/765 +[pr-768]: https://github.com/regclient/regclient/pull/768 +[pr-770]: https://github.com/regclient/regclient/pull/770 +[pr-771]: https://github.com/regclient/regclient/pull/771 +[pr-772]: https://github.com/regclient/regclient/pull/772 +[pr-773]: https://github.com/regclient/regclient/pull/773 +[pr-774]: https://github.com/regclient/regclient/pull/774 +[pr-776]: https://github.com/regclient/regclient/pull/776 +[pr-777]: https://github.com/regclient/regclient/pull/777 +[pr-778]: https://github.com/regclient/regclient/pull/778 + +## Release v0.6.1 + +CVEs: + +- Go update fixes CVE-2024-24788. ([PR 739][pr-739]) + +Breaking: + +- pkg/archive.Compress no longer decompresses the input. ([PR 732][pr-732]) + +Features: + +- Add the `regclient.ImageConfig` method. ([PR 706][pr-706]) +- Add ability to modify the layer compression. ([PR 730][pr-730]) +- Add support for zstd compressed layers. ([PR 732][pr-732]) +- Add image mod ability to append layers to an image. ([PR 736][pr-736]) +- `regctl image mod` add layer from directory. ([PR 740][pr-740]) + +Fixes: + +- Override the Go version used by the OSV Scanner. ([PR 691][pr-691]) +- Validate media types on `regctl artifact put`. ([PR 707][pr-707]) +- Use the provided descriptor in the BlobGet/Head to a registry. ([PR 724][pr-724]) +- Replace "whitelist" with "known list" for inclusivity. ([PR 725][pr-725]) +- Handle nil pointer when config file is a directory. ([PR 738][pr-738]) + +Chores: + +- Limit token permission on the coverage action. ([PR 705][pr-705]) +- Clarify `regctl manifest head --platform` will trigger a get request. ([PR 713][pr-713]) +- Reenable OSV Scanner weekly check in GitHub Actions. ([PR 715][pr-715]) +- Add fuzzing tests for compression. ([PR 741][pr-741]) + +Contributors: + +- @sudo-bmitch + +[pr-691]: https://github.com/regclient/regclient/pull/691 +[pr-705]: https://github.com/regclient/regclient/pull/705 +[pr-706]: https://github.com/regclient/regclient/pull/706 +[pr-707]: https://github.com/regclient/regclient/pull/707 +[pr-713]: https://github.com/regclient/regclient/pull/713 +[pr-715]: https://github.com/regclient/regclient/pull/715 +[pr-724]: https://github.com/regclient/regclient/pull/724 +[pr-725]: https://github.com/regclient/regclient/pull/725 +[pr-730]: https://github.com/regclient/regclient/pull/730 +[pr-732]: https://github.com/regclient/regclient/pull/732 +[pr-736]: https://github.com/regclient/regclient/pull/736 +[pr-738]: https://github.com/regclient/regclient/pull/738 +[pr-739]: https://github.com/regclient/regclient/pull/739 +[pr-740]: https://github.com/regclient/regclient/pull/740 +[pr-741]: https://github.com/regclient/regclient/pull/741 + +## Release v0.6.0 + +Breaking: + +- `regctl artifact put` no longer includes the filename annotation by default. Use `--file-title` to include. ([PR 659][pr-659]) +- Dropping Go 1.19 support ([PR 656][pr-656]) +- The platform string for windows images no longer includes the non-standard OS Version value. ([PR 685][pr-685]) + +Fixes: + +- Allow pushing artifacts without an artifactType value. ([PR 658][pr-658]) +- Image mod where created image is in a different repository ([PR 662][pr-662]) +- Improve returned errors from `regclient.ImageCopy`. ([PR 663][pr-663]) +- Cancel blob uploads on failures. ([PR 666][pr-666]) +- Allow ctrl-c on `regctl registry login` ([PR 671][pr-671]) +- Promoting annotations should ignore child manifests that have been removed from the tree. ([PR 675][pr-675]) +- Pin base image digest in build scripts to match Dockerfile pins. ([PR 678][pr-678]) +- Error wrapping fixed in several locations. ([PR 682][pr-682]) +- Platform selection now finds the best match rather than the first compatible match. ([PR 685][pr-685]) +- Update registry versions in CI tests. ([PR 687][pr-687]) +- Missing lines from diff context. ([PR 688][pr-688]) +- Replace `syft packages` with `syft scan`. ([PR 695][pr-695]) +- Image mod can manage the data file on the config descriptor of artifacts. ([PR 697][pr-697]) + +Features: + +- Adding Go 1.22 support ([PR 656][pr-656]) +- Add `BlobDelete` support for ocidir references. ([PR 669][pr-669]) +- Add `regctl blob delete` command. ([PR 669][pr-669]) +- Support formatting output on `regctl registry config`. ([PR 673][pr-673]) +- Add image mod ability to promote common annotations in the child images to the index. ([PR 674][pr-674]) +- Specifying windows OS Version now uses a comma separated syntax in the platform string. ([PR 685][pr-685]) +- Detect AMD64 variant when looking up local platform. ([PR 692][pr-692]) +- Add ability to set the config platform setting with `regctl image mod`. ([PR 693][pr-693]) +- Image mod support for setting the entrypoint and cmd. ([PR 694][pr-694]) + +Deprecations: + +- Errors in `types` are moved to the `errs` package. ([PR 686][pr-686]) +- MediaTypes in `types` are moved to the `mediatype` package. ([PR 686][pr-686]) +- Descriptor and associated variables in `types` are moved to the `descriptor` package. ([PR 686][pr-686]) +- `github.com/regclient/regclient/regclient` (3 levels of regclient) deprecations are now identified by the standard comment to trigger linters. ([PR 686][pr-686]) + +Other changes: + +- Update OSV scanner to monitor for unapproved licenses. ([PR 655][pr-655]) +- Include an API example in the Go docs. ([PR 657][pr-657]) +- Add examples to regctl help messages. ([PR 660][pr-660]) +- Include the Go Report Card badge. ([PR 664][pr-664]) +- Document the availability of the GitHub Actions installer for `regctl`. ([PR 665][pr-665]) +- Add examples to regctl help messages. ([PR 672][pr-672]) +- Redesign how annotations are added to the regclient images. ([PR 676][pr-676]) +- Remove uuid dependency from test code, replace with a random string generator. ([PR 677][pr-677]) +- Manage base image annotation with version-bump. ([PR 679][pr-679]) +- Use `t.Fatal` where appropriate. ([PR 680][pr-680]) +- Remove wraperr package. ([PR 681][pr-681]) +- Add links to the GHA workflow badges. ([PR 683][pr-683]) +- Include a download count badge. ([PR 684][pr-684]) +- Refactoring `types` package to avoid circular dependency issues. ([PR 686][pr-686]) +- Cleanup unused parameters on private functions. ([PR 698][pr-698]) +- Resume push of SBOMs to Docker Hub. ([PR 701][pr-701]) + +Contributors: + +- @sudo-bmitch + +[pr-655]: https://github.com/regclient/regclient/pull/655 +[pr-656]: https://github.com/regclient/regclient/pull/656 +[pr-657]: https://github.com/regclient/regclient/pull/657 +[pr-658]: https://github.com/regclient/regclient/pull/658 +[pr-659]: https://github.com/regclient/regclient/pull/659 +[pr-660]: https://github.com/regclient/regclient/pull/660 +[pr-662]: https://github.com/regclient/regclient/pull/662 +[pr-663]: https://github.com/regclient/regclient/pull/663 +[pr-664]: https://github.com/regclient/regclient/pull/664 +[pr-665]: https://github.com/regclient/regclient/pull/665 +[pr-666]: https://github.com/regclient/regclient/pull/666 +[pr-669]: https://github.com/regclient/regclient/pull/669 +[pr-671]: https://github.com/regclient/regclient/pull/671 +[pr-672]: https://github.com/regclient/regclient/pull/672 +[pr-673]: https://github.com/regclient/regclient/pull/673 +[pr-674]: https://github.com/regclient/regclient/pull/674 +[pr-675]: https://github.com/regclient/regclient/pull/675 +[pr-676]: https://github.com/regclient/regclient/pull/676 +[pr-677]: https://github.com/regclient/regclient/pull/677 +[pr-678]: https://github.com/regclient/regclient/pull/678 +[pr-679]: https://github.com/regclient/regclient/pull/679 +[pr-680]: https://github.com/regclient/regclient/pull/680 +[pr-681]: https://github.com/regclient/regclient/pull/681 +[pr-682]: https://github.com/regclient/regclient/pull/682 +[pr-683]: https://github.com/regclient/regclient/pull/683 +[pr-684]: https://github.com/regclient/regclient/pull/684 +[pr-686]: https://github.com/regclient/regclient/pull/686 +[pr-685]: https://github.com/regclient/regclient/pull/685 +[pr-687]: https://github.com/regclient/regclient/pull/687 +[pr-688]: https://github.com/regclient/regclient/pull/688 +[pr-692]: https://github.com/regclient/regclient/pull/692 +[pr-693]: https://github.com/regclient/regclient/pull/693 +[pr-694]: https://github.com/regclient/regclient/pull/694 +[pr-695]: https://github.com/regclient/regclient/pull/695 +[pr-697]: https://github.com/regclient/regclient/pull/697 +[pr-698]: https://github.com/regclient/regclient/pull/698 +[pr-701]: https://github.com/regclient/regclient/pull/701 + +## Release v0.5.7 + +Changes: + +- Add a `--skip-check` option to `regctl registry set` and `regctl registry login`. ([PR 646][pr-646]) + +Fixes: + +- Improve error handling on blob put retries when source is not an io.Seeker. ([PR 622][pr-622]) +- Preserve descriptor contents on chunked blob push. (@edigaryev) ([PR 637][pr-637]) +- Validate descriptor contents on chunked blob push. ([PR 637][pr-637]) + +Chores: + +- Improve testing to detect race conditions in registry operations. ([PR 634][pr-634]) +- Update `ImageCopy` test to not depend on `ImageCopy` for setup. ([PR 635][pr-635]) +- leverage `t.Setenv` in tests of environment variables. ([PR 636][pr-636]) +- reduce logging of context canceled messages in an image copy failure. ([PR 639][pr-639]) +- Add tests for TagList and TagDelete. ([PR 640][pr-640]) +- Upgrade olareg testing harness to latest version. ([PR 648][pr-648]) +- Update OSV scanner to use new syntax. ([PR 652][pr-652]) + +Contributors: + +- @sudo-bmitch + +[pr-634]: https://github.com/regclient/regclient/pull/634 +[pr-635]: https://github.com/regclient/regclient/pull/635 +[pr-636]: https://github.com/regclient/regclient/pull/636 +[pr-622]: https://github.com/regclient/regclient/pull/622 +[pr-637]: https://github.com/regclient/regclient/pull/637 +[pr-639]: https://github.com/regclient/regclient/pull/639 +[pr-640]: https://github.com/regclient/regclient/pull/640 +[pr-646]: https://github.com/regclient/regclient/pull/646 +[pr-648]: https://github.com/regclient/regclient/pull/648 +[pr-652]: https://github.com/regclient/regclient/pull/652 + +## Release v0.5.6 + +Changes: + +- Chore: go.mod version is now set to oldest supported release. ([PR 623][pr-623]) +- Chore: Make vendoring optional. ([PR 632][pr-632]) + +Contributors: + +- @sudo-bmitch + +[pr-623]: https://github.com/regclient/regclient/pull/623 +[pr-632]: https://github.com/regclient/regclient/pull/632 + +## Release v0.5.5 + +New Features: + +- Add OpenSSF Best Practices Badge. ([PR 607][pr-607]) +- Adding OpenSSF Scorecard badge and GHA workflow. ([PR 609][pr-609]) + +Fixes: + +- Validate references in regclient methods. ([PR 595][pr-595]) +- Data race in the reghttp fallback timeout handling. ([PR 599][pr-599]) +- HTTP proxy using environment variables. ([PR 615][pr-615]) + +Chores: + +- Reorder descriptor fields. ([PR 594][pr-594]) +- Add test for ocidir throttle race. ([PR 601][pr-601]) +- Add gomajor utility to Makefile. ([PR 602][pr-602]) +- Add commands to Makefile for managing releases. ([PR 604][pr-604]) +- Pin GitHub actions. ([PR 605][pr-605]) +- Use full semver on dependencies where available. ([PR 605][pr-605]) +- Adjust token permissions on GitHub actions. ([PR 606][pr-606]) +- Include disclosure timeline in security policy. ([PR 608][pr-608]) +- Improve contributor guidelines. ([PR 612][pr-612]) +- Improve BlobPut tests. ([PR 613][pr-613]) + +Contributors: + +- @peusebiu +- @sudo-bmitch + +[pr-594]: https://github.com/regclient/regclient/pull/594 +[pr-595]: https://github.com/regclient/regclient/pull/595 +[pr-599]: https://github.com/regclient/regclient/pull/599 +[pr-601]: https://github.com/regclient/regclient/pull/601 +[pr-602]: https://github.com/regclient/regclient/pull/602 +[pr-604]: https://github.com/regclient/regclient/pull/604 +[pr-605]: https://github.com/regclient/regclient/pull/605 +[pr-606]: https://github.com/regclient/regclient/pull/606 +[pr-607]: https://github.com/regclient/regclient/pull/607 +[pr-608]: https://github.com/regclient/regclient/pull/608 +[pr-609]: https://github.com/regclient/regclient/pull/609 +[pr-612]: https://github.com/regclient/regclient/pull/612 +[pr-613]: https://github.com/regclient/regclient/pull/613 +[pr-615]: https://github.com/regclient/regclient/pull/615 + +## Release v0.5.4 + +New Features: + +- Add `regctl --host` flag to configure registries for a single command. ([PR 572][pr-572]) +- Configure HTTP client timeouts. ([PR 584][pr-584]) +- Add `regclient.Ping` method. ([PR 590][pr-590]) +- regctl: warn on failed logins or bad registry configuration changes. ([PR 590][pr-590]) + +Fixes: + +- Fix handling of invalid hostname in `regclient.RepoList`. ([PR 577][pr-577]) +- Fix bug in regsync tag filtering when running as a server. ([PR 579][pr-579]) +- Enable parallel builds of the make "binaries" target. ([PR 588][pr-588]) + +Chores: + +- Update Go docs on blob APIs and the config. ([PR 573][pr-573]) +- Refactor the Ref package. ([PR 587][pr-587]) + +Contributors: + +- @andyli +- @Juneezee +- @sudo-bmitch + +[pr-572]: https://github.com/regclient/regclient/pull/572 +[pr-573]: https://github.com/regclient/regclient/pull/573 +[pr-577]: https://github.com/regclient/regclient/pull/577 +[pr-579]: https://github.com/regclient/regclient/pull/579 +[pr-584]: https://github.com/regclient/regclient/pull/584 +[pr-587]: https://github.com/regclient/regclient/pull/587 +[pr-588]: https://github.com/regclient/regclient/pull/588 +[pr-590]: https://github.com/regclient/regclient/pull/590 + +## Release v0.5.3 + +Fixes: + +- Fix formatting variables in `regctl image inspect`. ([PR 554][pr-554]) + +New Features: + +- Add a `GetSize` method to image manifests (OCI and Docker2 manifests). ([PR 565][pr-565]) + +Chores: + +- Refactoring CLIs to remove global state. ([PR 550][pr-550]) +- Set GOTOOLCHAIN=local in CI ([PR 556][pr-556]) +- Reorder Go imports to move local packages last. ([PR 557][pr-557]) +- Remove duplicated tests from ci-registry action. ([PR 559][pr-559]) +- Run tests using t.Parallel where possible. ([PR 564][pr-564]) +- Update install guidance for quarantined binaries on MacOS. ([PR 569][pr-569]) +- Release notes now include contributors. ([PR 570][pr-570]) + +Contributors: + +- @felipecrs +- @sorenisanerd +- @sudo-bmitch + +[pr-550]: https://github.com/regclient/regclient/pull/550 +[pr-554]: https://github.com/regclient/regclient/pull/554 +[pr-556]: https://github.com/regclient/regclient/pull/556 +[pr-557]: https://github.com/regclient/regclient/pull/557 +[pr-559]: https://github.com/regclient/regclient/pull/559 +[pr-564]: https://github.com/regclient/regclient/pull/564 +[pr-565]: https://github.com/regclient/regclient/pull/565 +[pr-569]: https://github.com/regclient/regclient/pull/569 +[pr-570]: https://github.com/regclient/regclient/pull/570 + +## Release v0.5.2 + +Breaking Changes: + +- A few interfaces in the blob package were converted to pointers to structs. ([PR 547][pr-547]) + +Features: + +- Expose the underlying OCI Layout Index to `regctl tag ls --format` ([PR 518][pr-518]) +- Support compression on image export and import. ([PR 522][pr-522]) +- Image mod of timestamps is now aware of base images. ([PR 524][pr-524]) +- Add reproducible method / option to image mod. ([PR 525][pr-525]) +- Support setting labels on specific platforms with image mod. ([PR 528][pr-528]) +- Add `WithFileTarTime` method and `regctl image mod --file-tar-time` option to edit timestamps inside tar files. ([PR 530][pr-530]) +- Support digest-tags in artifact list and tree output ([PR 531][pr-531]) +- Add support for decompressing xz layers ([PR 534][pr-534]) +- Support getting an artifact from an index of artifacts ([PR 536][pr-536]) +- Add repo filters to regsync when copying registries ([PR 538][pr-538]) +- Add gosec security linter ([PR 541][pr-541]) +- Refactor type/blob package. ([PR 547][pr-547]) +- Support pushing artifact to an index entry with `regctl artifact put --index` ([PR 548][pr-548]) + +Fixes: + +- Add size limits on manifests ([PR 512][pr-512]) +- Always set `artifactType` with `regctl artifact put` ([PR 513][pr-513]) +- Manifest delete should not fail when referrer file is missing ([PR 515][pr-515]) +- Artifact put of referrer should not add a manifest reference in ocidir ([PR 515][pr-515]) +- Reproducible image creation scripts should prune stale referrers ([PR 515][pr-515]) +- Fail faster on image copy when target registry is unreachable ([PR 517][pr-517]) +- Avoid changing docker build attestations when converting to referrers ([PR 527][pr-527]) + +Chores: + +- Cleanup docs on regclient package. ([PR 543][pr-543]) +- Upgrade yaml package to v3. ([PR 544][pr-544]) + +New Contributors: + +- @fanthos + +[pr-512]: https://github.com/regclient/regclient/pull/512 +[pr-513]: https://github.com/regclient/regclient/pull/513 +[pr-515]: https://github.com/regclient/regclient/pull/515 +[pr-517]: https://github.com/regclient/regclient/pull/517 +[pr-518]: https://github.com/regclient/regclient/pull/518 +[pr-522]: https://github.com/regclient/regclient/pull/522 +[pr-524]: https://github.com/regclient/regclient/pull/524 +[pr-525]: https://github.com/regclient/regclient/pull/525 +[pr-527]: https://github.com/regclient/regclient/pull/527 +[pr-528]: https://github.com/regclient/regclient/pull/528 +[pr-530]: https://github.com/regclient/regclient/pull/530 +[pr-531]: https://github.com/regclient/regclient/pull/531 +[pr-534]: https://github.com/regclient/regclient/pull/534 +[pr-536]: https://github.com/regclient/regclient/pull/536 +[pr-538]: https://github.com/regclient/regclient/pull/538 +[pr-541]: https://github.com/regclient/regclient/pull/541 +[pr-543]: https://github.com/regclient/regclient/pull/543 +[pr-544]: https://github.com/regclient/regclient/pull/544 +[pr-547]: https://github.com/regclient/regclient/pull/547 +[pr-548]: https://github.com/regclient/regclient/pull/548 + +## Release v0.5.1 + +Features: + +- Add options to `regctl index create` for `artifactType` and `subject` ([PR 490][pr-490]) +- Add `--latest` flag to `regctl artifact get` and `regctl artifact list` ([PR 507][pr-507]) +- Add in memory caching support. ([PR 510][pr-510]) + +Fixes: + +- Fix typo in OCI annotations ([PR 485][pr-485]) +- Support multiple dashes in repo names. ([PR 489][pr-489]) +- Fix auth failures, do not trigger a backoff ([PR 492][pr-492]) +- Update Go dependencies from all subdirectories and used in tests ([PR 495][pr-495]) +- Warning header log message is fixed. ([PR 497][pr-497]) +- Include version annotation in regclient images ([PR 499][pr-499]) +- Fix digest check when running `regctl image get-file` ([PR 503][pr-503]) +- Switch `org.opencontainers.artifact.*` to `org.opencontainers.image.*` annotations in regclient images. ([PR 506][pr-506]) + +Chores: + +- Sync OCI types to align with upstream sources. ([PR 488][pr-488]) +- Add OSV vulnerability scanner ([PR 498][pr-498]) + +[pr-485]: https://github.com/regclient/regclient/pull/485 +[pr-488]: https://github.com/regclient/regclient/pull/488 +[pr-489]: https://github.com/regclient/regclient/pull/489 +[pr-490]: https://github.com/regclient/regclient/pull/490 +[pr-492]: https://github.com/regclient/regclient/pull/492 +[pr-495]: https://github.com/regclient/regclient/pull/495 +[pr-497]: https://github.com/regclient/regclient/pull/497 +[pr-498]: https://github.com/regclient/regclient/pull/498 +[pr-499]: https://github.com/regclient/regclient/pull/499 +[pr-503]: https://github.com/regclient/regclient/pull/503 +[pr-506]: https://github.com/regclient/regclient/pull/506 +[pr-507]: https://github.com/regclient/regclient/pull/507 +[pr-510]: https://github.com/regclient/regclient/pull/510 + +## Release v0.5.0 + +The two key features are: + +- Updating the image copy to copy layers concurrently and with an improved UI. +- Update support for OCI with the Referrers changes coming in their 1.1 releases. + +Image Copy: + +- Add progress display to `regctl image copy` ([PR 413][pr-413]) +- Image copy is now run with concurrency. ([PR 419][pr-419]) +- Fix `regctl image copy` output on narrow terminals. ([PR 440][pr-440]) +- Add a fast check option for copying images with referrers and digest tags. ([PR 441][pr-441]) +- Update `regctl image copy` for tty displays. ([PR 447][pr-447]) + +OCI Support: + +- Add support for `artifactType` in image manifest ([PR 400][pr-400]) +- Accept manifests with OCI artifact media type (experimental). ([PR 418][pr-418]) +- Handle the OCI-Subject header to detect referrer support. ([PR 446][pr-446]) +- Embed the `Platform` field directly in the `ImageConfig` ([PR 456][pr-456]) +- Switch from scratch to empty JSON media type ([PR 463][pr-463]) +- Support artifactType and subject fields on OCI Index ([PR 476][pr-476]) + +Other Features: + +- Image mod pushes directly to the target ref without an extra copy step ([PR 438][pr-438]) +- Performance improvements for regsync ([PR 449][pr-449]) +- Support client certs and keys for mTLS registry auth. ([PR 454][pr-454]) +- Support updating annotations on platform specific manifests in a manifest list. ([PR 457][pr-457]) +- Add ability to sort referrers by annotation. ([PR 467][pr-467]) +- Use `SOURCE_DATE_EPOCH` build arg support in buildkit. ([PR 472][pr-472]) +- Add regctl tag list filtering ([PR 477][pr-477]) +- Add option to import a specific image or tag from an export of multiple images ([PR 482][pr-482]) + +Fixes: + +- Invalid references are detected before querying the registry ([PR 414][pr-414]) +- Fix handling of content-type headers. ([PR 418][pr-418]) +- Fix race when creating ocidir ([PR 420][pr-420]) +- Avoid an internal race condition when managing the referrers fallback tag. ([PR 427][pr-427]) +- Fix: close reader when converting a blob to an OCI config ([PR 434][pr-434]) +- Support manifests missing a mediaType field. ([PR 436][pr-436]) +- Fix GitHub badges. ([PR 437][pr-437]) +- Handle symlinks in the tar file with `regctl image import` ([PR 452][pr-452]) +- Fix GCR credential helper to work on Artifact Registry ([PR 455][pr-455]) +- Fix deadlock when referrers or digest tags refer to a parent manifest ([PR 464][pr-464]) +- Improve error handling of `regctl artifact tree`. ([PR 470][pr-470]) +- Fix copy when both referrers and digest-tags are included. ([PR 471][pr-471]) +- Fix handling of copy with looping referrers or digest-tags to validating registries ([PR 475][pr-475]) + +[pr-400]: https://github.com/regclient/regclient/pull/400 +[pr-413]: https://github.com/regclient/regclient/pull/413 +[pr-414]: https://github.com/regclient/regclient/pull/414 +[pr-418]: https://github.com/regclient/regclient/pull/418 +[pr-419]: https://github.com/regclient/regclient/pull/419 +[pr-420]: https://github.com/regclient/regclient/pull/420 +[pr-427]: https://github.com/regclient/regclient/pull/427 +[pr-434]: https://github.com/regclient/regclient/pull/434 +[pr-436]: https://github.com/regclient/regclient/pull/436 +[pr-437]: https://github.com/regclient/regclient/pull/437 +[pr-438]: https://github.com/regclient/regclient/pull/438 +[pr-440]: https://github.com/regclient/regclient/pull/440 +[pr-441]: https://github.com/regclient/regclient/pull/441 +[pr-446]: https://github.com/regclient/regclient/pull/446 +[pr-447]: https://github.com/regclient/regclient/pull/447 +[pr-449]: https://github.com/regclient/regclient/pull/449 +[pr-452]: https://github.com/regclient/regclient/pull/452 +[pr-454]: https://github.com/regclient/regclient/pull/454 +[pr-455]: https://github.com/regclient/regclient/pull/455 +[pr-456]: https://github.com/regclient/regclient/pull/456 +[pr-457]: https://github.com/regclient/regclient/pull/457 +[pr-463]: https://github.com/regclient/regclient/pull/463 +[pr-464]: https://github.com/regclient/regclient/pull/464 +[pr-467]: https://github.com/regclient/regclient/pull/467 +[pr-470]: https://github.com/regclient/regclient/pull/470 +[pr-471]: https://github.com/regclient/regclient/pull/471 +[pr-472]: https://github.com/regclient/regclient/pull/472 +[pr-475]: https://github.com/regclient/regclient/pull/475 +[pr-476]: https://github.com/regclient/regclient/pull/476 +[pr-477]: https://github.com/regclient/regclient/pull/477 +[pr-482]: https://github.com/regclient/regclient/pull/482 + +## Release v0.4.8 + +Breaking Changes: + +- Deprecated: `regclient.WithConfigHosts` is replaced by a variadic on `regclient.WithConfigHost` ([PR 409][pr-409]) +- Deprecated: `regclient.WithBlobLimit`, `regcleint.WithBlobSize`, `regclient.WithCertDir`, `regclient.WithRetryDelay`, and `regclient.WithRetryLimit` are replaced by `regclient.WithRegOpts` ([PR 409][pr-409]) + +New Features: + +- Add `--platform` option to `regctl image copy/export` ([PR 379][pr-379]) +- Add option to override name in `regctl image export` ([PR 380][pr-380]) +- Add platforms option to `regctl index add/create` ([PR 381][pr-381]) +- Add `--referrers` and `--digest-tags` options to `regctl index add/create` ([PR 382][pr-382]) +- Add `regctl blob copy` command ([PR 385][pr-385]) +- Adding `regctl image mod --to-docker` to convert manifests from OCI to Docker schema2 ([PR 388][pr-388]) +- Support `OCI-Chunk-Min-Length` header ([PR 394][pr-394]) +- Add support for registry warning headers ([PR 396][pr-396]) +- Add `regclient.WithRegOpts` ([PR 408][pr-408]) + +Bug Fixes: + +- Improve handling of the referrers API with Harbor ([PR 389][pr-389]) +- Fix an issue on `regctl tag rm` to support registries that require a layer ([PR 395][pr-395]) +- Image mod only converts `config.mediaType` between known values ([PR 399][pr-399]) +- Ignore anonymous blob mount failures ([PR 401][pr-401]) +- Fix handling of docker registry logins with `credStore` ([PR 405][pr-405]) +- Fix regsync handling of the paginated repo listing when syncing registries ([PR 406][pr-406]) + +Other Changes: + +- Recursively sign manifest list and platform specific images with cosign ([PR 378][pr-378]) +- Include tag in the version output ([PR 392][pr-392]) + +[pr-378]: https://github.com/regclient/regclient/pull/378 +[pr-379]: https://github.com/regclient/regclient/pull/379 +[pr-380]: https://github.com/regclient/regclient/pull/380 +[pr-381]: https://github.com/regclient/regclient/pull/381 +[pr-382]: https://github.com/regclient/regclient/pull/382 +[pr-385]: https://github.com/regclient/regclient/pull/385 +[pr-388]: https://github.com/regclient/regclient/pull/388 +[pr-389]: https://github.com/regclient/regclient/pull/389 +[pr-392]: https://github.com/regclient/regclient/pull/392 +[pr-394]: https://github.com/regclient/regclient/pull/394 +[pr-395]: https://github.com/regclient/regclient/pull/395 +[pr-396]: https://github.com/regclient/regclient/pull/396 +[pr-399]: https://github.com/regclient/regclient/pull/399 +[pr-401]: https://github.com/regclient/regclient/pull/401 +[pr-405]: https://github.com/regclient/regclient/pull/405 +[pr-406]: https://github.com/regclient/regclient/pull/406 +[pr-408]: https://github.com/regclient/regclient/pull/408 +[pr-409]: https://github.com/regclient/regclient/pull/409 + +## Release v0.4.7 + +This is a repeat of v0.4.6 with fixes to GitHub Actions performing the release. + +## Release v0.4.6 + +Breaking Changes: + +- Tag details are no longer available in `version` commands ([PR 305][pr-305]) +- `regclient.VCSRef` and `VCSTag` variables removed ([PR 305][pr-305]) +- Detailed version support removed for Go 1.17 and earlier ([PR 305][pr-305]) +- Artifact manifest is experimental ([PR 372][pr-372]) + +New Features: + +- Make image builds reproducible ([PR 309][pr-309]) +- Improve handling of network failures on blob push ([PR 324][pr-324]) +- Add configurable limits on concurrency and requests per second ([PR 330][pr-330]) +- regbot: adding options to `repo.ls` to support paginated responses ([PR 332][pr-332]) +- Improve retries of blob copies between registries ([PR 333][pr-333]) +- `regctl registry login` supports reading the password from stdin ([PR 348][pr-348]) +- Add `mod.WithManifestToOCIReferrers()` to convert Docker to OCI referrers ([PR 349][pr-349]) +- Add `regctl image mod --to-oci-referrers` ([PR 349][pr-349]) +- Add SBOMs to artifacts to images ([PR 351][pr-351]) +- Add `regctl manifest head` and `regctl blob head` commands ([PR 358][pr-358]) +- Adding platform option to `regctl artifact` commands ([PR 359][pr-359]) +- Adding platform option to the `ReferrerList` API ([PR 359][pr-359]) +- Add `regctl artifact tree` command ([PR 361][pr-361]) +- Binary artifacts are signed with cosign keyless signing ([PR 365][pr-365]) +- Add referrers support to regsync ([PR 366][pr-366]) + +Bug Fixes: + +- Fix error handling on manifests created by `ManifestHead` ([PR 343][pr-343]) +- Fix `regctl image mod` for non-tar layers and non-image configs ([PR 347][pr-347]) +- Converting to OCI now handles OCI manifests with mixed media types inside manifest ([PR 353][pr-353]) +- Fix issue importing images created with tar ([PR 355][pr-355]) +- Fallback to `GET` when `HEAD` request is missing digest header ([PR 363][pr-363]) +- Fix handling of data field ([PR 368][pr-368]) + +Other Changes: + +- Add help text to Makefile ([PR 308][pr-308]) +- Make `artifactType` field optional for artifact manifests ([PR 327][pr-327]) +- Fix reproducible builds with docker provenance ([PR 350][pr-350]) +- Update Go support to 1.20 ([PR 356][pr-356]) +- Upgrade Go to 1.20.1 ([PR 362][pr-362]) +- Pin the version of staticcheck ([PR 364][pr-364]) + +[pr-305]: https://github.com/regclient/regclient/pull/305 +[pr-308]: https://github.com/regclient/regclient/pull/308 +[pr-309]: https://github.com/regclient/regclient/pull/309 +[pr-324]: https://github.com/regclient/regclient/pull/324 +[pr-327]: https://github.com/regclient/regclient/pull/327 +[pr-330]: https://github.com/regclient/regclient/pull/330 +[pr-332]: https://github.com/regclient/regclient/pull/332 +[pr-333]: https://github.com/regclient/regclient/pull/333 +[pr-343]: https://github.com/regclient/regclient/pull/343 +[pr-347]: https://github.com/regclient/regclient/pull/347 +[pr-348]: https://github.com/regclient/regclient/pull/348 +[pr-349]: https://github.com/regclient/regclient/pull/349 +[pr-350]: https://github.com/regclient/regclient/pull/350 +[pr-351]: https://github.com/regclient/regclient/pull/351 +[pr-353]: https://github.com/regclient/regclient/pull/353 +[pr-355]: https://github.com/regclient/regclient/pull/355 +[pr-356]: https://github.com/regclient/regclient/pull/356 +[pr-358]: https://github.com/regclient/regclient/pull/358 +[pr-359]: https://github.com/regclient/regclient/pull/359 +[pr-361]: https://github.com/regclient/regclient/pull/361 +[pr-362]: https://github.com/regclient/regclient/pull/362 +[pr-363]: https://github.com/regclient/regclient/pull/363 +[pr-364]: https://github.com/regclient/regclient/pull/364 +[pr-365]: https://github.com/regclient/regclient/pull/365 +[pr-366]: https://github.com/regclient/regclient/pull/366 +[pr-368]: https://github.com/regclient/regclient/pull/368 +[pr-372]: https://github.com/regclient/regclient/pull/372 + +## Release v0.4.5 + +Breaking Changes: + +- `regclient.ManifestWithDesc` has been renamed to `regclient.WithManifestDesc` ([PR 283][pr-283]) +- `manifest.Referrer` interface has been renamed to `manifest.Subjecter` ([PR 283][pr-283], [PR 302][pr-302]) +- `ReferrerPut` method has been removed, use `ManifestPut` instead ([PR 283][pr-283]) +- `regclient.ManifestPut` options are now in `regclient` rather than scheme ([PR 283][pr-283]) + +New Features: + +- Adding diff commands to regctl for manifests, configs, and layers ([PR 269][pr-269]) +- Supporting OCI subject/referrers ([PR 271][pr-271], [PR 302][pr-302]) +- Adding support for client side filters on artifact list ([PR 273][pr-273]) +- Support Link header in tag pagination seen on quay.io ([PR 276][pr-276]) +- Update referrers to support deletes ([PR 283][pr-283]) +- Add `regctl image check-base` ([PR 288][pr-288]) +- Adding experimental support for rebasing images ([PR 291][pr-291]) +- regclient adds a blob TarReader.ReadFile method ([PR 296][pr-296]) +- Adding `regctl blob get-file` to fetch a file from a layer ([PR 296][pr-296]) +- Adding `regctl image get-file` to fetch a file from the image layers ([PR 296][pr-296]) +- Fallback to using linux platforms on mac and windows when querying manifest lists ([PR 303][pr-303]) + +Bug Fixes: + +- Fix reference for ocidir exports for importing into docker ([PR 264][pr-264]) +- Fix support for authentication parsing of token characters without quotes ([PR 266][pr-266]) +- Fix `regctl artifact put` with both a refers and a tag ([PR 290][pr-290]) +- Fixing regbot tests to run on other platforms ([PR 300][pr-300]) + +Other Changes: + +- Upgrade to Go 1.19 ([PR 278][pr-278], [PR 286][pr-286]) +- Add tips to common errors in regctl ([PR 285][pr-285]) +- Descriptor comparison now allows for Docker to OCI conversion ([PR 289][pr-289]) + +[pr-264]: https://github.com/regclient/regclient/pull/264 +[pr-266]: https://github.com/regclient/regclient/pull/266 +[pr-269]: https://github.com/regclient/regclient/pull/269 +[pr-271]: https://github.com/regclient/regclient/pull/271 +[pr-273]: https://github.com/regclient/regclient/pull/273 +[pr-276]: https://github.com/regclient/regclient/pull/276 +[pr-278]: https://github.com/regclient/regclient/pull/278 +[pr-283]: https://github.com/regclient/regclient/pull/283 +[pr-285]: https://github.com/regclient/regclient/pull/285 +[pr-286]: https://github.com/regclient/regclient/pull/286 +[pr-288]: https://github.com/regclient/regclient/pull/288 +[pr-289]: https://github.com/regclient/regclient/pull/289 +[pr-290]: https://github.com/regclient/regclient/pull/290 +[pr-291]: https://github.com/regclient/regclient/pull/291 +[pr-296]: https://github.com/regclient/regclient/pull/296 +[pr-300]: https://github.com/regclient/regclient/pull/300 +[pr-302]: https://github.com/regclient/regclient/pull/302 +[pr-303]: https://github.com/regclient/regclient/pull/303 + +## Release v0.4.4 + +Breaking Changes: + +- Redundant manifest methods have been deprecated ([PR 257][pr-257]) +- Manifest methods specific to Images and Indexes/ManifestLists have a different interface ([PR 258][pr-258]) + +New Features: + +- `regctl blob put` supports a format string ([PR 255][pr-255]) +- `regsync` immediately syncs any tags missing on the target without waiting for first sync schedule ([PR 256][pr-256]) +- Adding `regctl index` command to create and mutate an Index or Manifest List ([PR 260][pr-260]) + +Bug Fixes: + +- Credential helper support for Docker Hub ([PR 246][pr-246]) +- Fix handling of `DOCKER_CONFIG` variable ([PR 249][pr-249]) +- Fix handling of custom TLS settings on a registry with authentication ([PR 253][pr-253]) + +Other Changes: + +- Normalize parsing of registry names in various components ([PR 247][pr-247]) +- Exclude tags from referrers when copying digest tags ([PR 250][pr-250]) + +[pr-246]: https://github.com/regclient/regclient/pull/246 +[pr-247]: https://github.com/regclient/regclient/pull/247 +[pr-249]: https://github.com/regclient/regclient/pull/249 +[pr-250]: https://github.com/regclient/regclient/pull/250 +[pr-253]: https://github.com/regclient/regclient/pull/253 +[pr-255]: https://github.com/regclient/regclient/pull/255 +[pr-256]: https://github.com/regclient/regclient/pull/256 +[pr-257]: https://github.com/regclient/regclient/pull/257 +[pr-258]: https://github.com/regclient/regclient/pull/258 +[pr-260]: https://github.com/regclient/regclient/pull/260 + +## Release v0.4.3 + +Breaking Changes: + +- Media type variable for docker image layers has been renamed ([PR 220][pr-220]) + +New Features: + +- Improve handling of external URLs ([PR 220][pr-220]) +- Call credential helpers only when needed ([PR 234][pr-234]) +- Support credential helpers directly in regsync and regbot ([PR 238][pr-238]) +- Allow pushing artifacts and manifest by digest ([PR 242][pr-242]) + +Bug Fixes: + +- regctl image mod args for expose and volume rm actually rm ([PR 216][pr-216]) +- manifest head request now set the descriptor size correctly ([PR 222][pr-222]) +- Fix for chunked uploads ([PR 228][pr-228]) +- Fix image import from a multi-platform image to an ocidir:// layout ([PR 235][pr-235]) + +Other Changes: + +- Adding experimental support for OCI referrers ([PR 225][pr-225]) +- Adds experimental referrer support to regctl artifact commands ([PR 226][pr-226]) +- Experimental: adding support for OCI artifact media type ([PR 229][pr-229]) +- Switch to internal processing of docker config.json ([PR 234][pr-234]) + +[pr-216]: https://github.com/regclient/regclient/pull/216 +[pr-220]: https://github.com/regclient/regclient/pull/220 +[pr-222]: https://github.com/regclient/regclient/pull/222 +[pr-225]: https://github.com/regclient/regclient/pull/225 +[pr-226]: https://github.com/regclient/regclient/pull/226 +[pr-228]: https://github.com/regclient/regclient/pull/228 +[pr-229]: https://github.com/regclient/regclient/pull/229 +[pr-234]: https://github.com/regclient/regclient/pull/234 +[pr-235]: https://github.com/regclient/regclient/pull/235 +[pr-238]: https://github.com/regclient/regclient/pull/238 +[pr-242]: https://github.com/regclient/regclient/pull/242 + +## Release v0.4.2 + +Breaking Changes: + +- Format templates no longer support `title`. + ([PR 194][pr-194]) + +New Features: + +- Add the ability to remove buildarg from image history. + ([PR 207][pr-207]) +- regsync now supports the `.Sync` template variable on source and target. + ([PR 208][pr-208]) +- Add support for annotations on docker2 schemas. + ([PR 209][pr-209]) +- Adding image signing with cosign. + ([PR 212][pr-212]) + +Bug Fixes: + +- Fix handling of http_proxy and https_proxy. + ([PR 197][pr-197]) +- manifest head on an ocidir with a digest no longer succeeds if manifest is missing. + ([PR 199][pr-199]) +- image export of manifest list to ocidir should only define parent manifest in `index.json`. + ([PR 200][pr-200]) +- Add `/tmp` directory to scratch images. + ([PR 205][pr-205]) +- Handle multiple tags pointing to the same digest in ocidir. + ([PR 211][pr-211]) + +Other Changes: + +- Upgrade to Go 1.17. + ([PR 193][pr-193]) +- Go build now runs with `-trimpath`. + ([PR 196][pr-196]) + +[pr-193]: https://github.com/regclient/regclient/pull/193 +[pr-194]: https://github.com/regclient/regclient/pull/194 +[pr-196]: https://github.com/regclient/regclient/pull/196 +[pr-197]: https://github.com/regclient/regclient/pull/197 +[pr-199]: https://github.com/regclient/regclient/pull/199 +[pr-200]: https://github.com/regclient/regclient/pull/200 +[pr-205]: https://github.com/regclient/regclient/pull/205 +[pr-207]: https://github.com/regclient/regclient/pull/207 +[pr-208]: https://github.com/regclient/regclient/pull/208 +[pr-209]: https://github.com/regclient/regclient/pull/209 +[pr-211]: https://github.com/regclient/regclient/pull/211 +[pr-212]: https://github.com/regclient/regclient/pull/212 + +## Release v0.4.1 + +Breaking Changes: + +- Blob methods have been updated to use a descriptor instead of the digest and size. + ([PR 173][pr-173]) + +New Features: + +- Allow the user-agent to be overridden. + ([PR 172][pr-172]) +- Support the Data field in the descriptor on manifest and blob gets. + ([PR 174][pr-174]) +- Added image modification functionality. + ([PR 182][pr-182]) + +Bug Fixes: + +- Fix an issue with dangling references in the `ocidir` `index.json`. + ([PR 176][pr-176]) +- Fix handling of relative paths in `ocidir`. + ([PR 177][pr-177]) +- Fix handling of `/etc/docker/certs.d`. + ([PR 179][pr-179]) +- Fix handling of registry CA configuration. + ([PR 180][pr-180]) + +[pr-172]: https://github.com/regclient/regclient/pull/172 +[pr-173]: https://github.com/regclient/regclient/pull/173 +[pr-174]: https://github.com/regclient/regclient/pull/174 +[pr-176]: https://github.com/regclient/regclient/pull/176 +[pr-177]: https://github.com/regclient/regclient/pull/177 +[pr-179]: https://github.com/regclient/regclient/pull/179 +[pr-180]: https://github.com/regclient/regclient/pull/180 +[pr-182]: https://github.com/regclient/regclient/pull/182 + +## Release v0.4.0 + +Breaking Changes: + +- Repository has been restructured to remove the `regclient` sub-directory. + Backwards compatible aliases and stub functions have been added to minimize the impact. + ([PR 130][pr-130]) +- Refactored the manifest type. This results in breaking changes to exported methods. + ([PR 157][pr-157]) +- Blob methods have been refactored with breaking changes to exported APIs. + ([PR 158][pr-158]) +- External dependencies have been minimized, particularly for struct definitions. + This impacts variable types used by some APIs. + ([PR 160][pr-160]) +- Default to displaying manifest lists in regctl. + ([PR 166][pr-166]) +- Image manifests now display with a pretty printer by default. + ([PR 168][pr-168]) + +New Features: + +- APIs have been updated to support the `ocidir://` scheme. + You can now `regctl image copy alpine:latest ocidir://alpine:latest` to copy an image to a directory as you would another registry. + ([PR 138][pr-138], [PR 146][pr-146]) +- Added the ability to modify a manifest type. + ([PR 157][pr-157]) +- Blob SetConfig method added to allow modifying an OCI config. + ([PR 158][pr-158]) +- Added repoAuth option for gcr.io support. + ([PR 159][pr-159]) + +Bug Fixes: + +- Lots of linting and testing has been added. + This will result in a change to some error messages. + ([PR 146][pr-146], [PR 147][pr-147], [PR 151][pr-151]) +- Fix handling of docker logins where scheme is included in the hostname. + ([PR 137][pr-137]) +- Fix for tag rm with authentication when the blob upload location is a different host. + ([PR 144][pr-144]) + +[pr-130]: https://github.com/regclient/regclient/pull/130 +[pr-137]: https://github.com/regclient/regclient/pull/137 +[pr-138]: https://github.com/regclient/regclient/pull/138 +[pr-144]: https://github.com/regclient/regclient/pull/144 +[pr-146]: https://github.com/regclient/regclient/pull/146 +[pr-147]: https://github.com/regclient/regclient/pull/147 +[pr-151]: https://github.com/regclient/regclient/pull/151 +[pr-157]: https://github.com/regclient/regclient/pull/157 +[pr-158]: https://github.com/regclient/regclient/pull/158 +[pr-159]: https://github.com/regclient/regclient/pull/159 +[pr-160]: https://github.com/regclient/regclient/pull/160 +[pr-166]: https://github.com/regclient/regclient/pull/166 +[pr-168]: https://github.com/regclient/regclient/pull/168 + +## Release v0.3.10 + +Bug fixes: + +- Insecure TLS should handle unknown TLS keys +- regsync backup errors are now a warning only, allowing automated recovery from a corrupt registry +- Fix for deleting tags pointing to an OCI manifest + +Features and Changes: + +- Verifying media type and digest on manifests +- Adding option to delete manifests by tag instead of digest +- Image copy: support added for digest tags used by tools like projectsigstore/cosign +- Image copy: support added to force a recursive copy when manifest already exists at target +- Handle registries without HEAD support (older versions of Nexus) + +## Release v0.3.9 + +Features and Changes: + +- Binaries are built for darwin-arm64 for Mac M1 users +- GitHub actions are fixed to not push on forks +- `regctl artifact` command has been added to get and put OCI artifacts + +## Release v0.3.8 + +Breaking changes: + +- `regclient.ImageImport` API uses an `io.ReadSeeker` instead of a filename +- OCI export/import is corrected to use annotations, previous exports of an OCI image will not import with this change + +Features and Changes: + +- Disable default blob max to support registries that don't handle chunked uploads +- Update to Go 1.16 and dependencies have been bumped +- Images now push to GHCR in addition to Docker Hub +- GHA fixes caching for faster docker image builds +- Allow a 201 http status for chunked blob uploads + +## Release v0.3.7 + +Features and Changes: + +- Fixes a bug that breaks chunked blob pushes +- Adds registry configurable chunk sizes and threshold to switch to chunked pushes +- Docker improves caching of credential helpers between builds + +## Release v0.3.6 + +Features and Changes: + +- add retry capability on blob push/pulls +- buildkit cache images can be copied and imported/exported +- ci: binaries for s390x and ppc64le are now built + +## Release v0.3.5 + +Features and Changes: + +- regctl: bash completion with colons in arg is now supported +- regbot and regsync: run "once" commands single threaded when parallel set to 0 +- regsync: support for copying entire registry +- regclient: Improve http status code handling to better follow docker registry spec +- regclient: OCI distribution-spec 1.0 support + +## Release v0.3.4 + +Features and Changes: + +- regctl: adding command completion +- regclient: Include messages from registry in errors +- regclient: Adding OCI export (Docker export was previously available) +- regclient: Adding OCI and Docker import from tar +- regctl: adding image import/export support +- regbot: adding image import/export support + +## Release v0.3.3 + +Features and Changes: + +- regbot: Support for push API calls to modify images +- regclient: Refactoring blobs into a separate package +- Update auth token shortly before expiration to avoid race conditions +- Adding support for docker credential helpers +- Include ECR and GCR helpers in alpine images + +## Release v0.3.2 + +Fixes: + +- Fixing broken build of regctl on Windows + +## Release v0.3.1 + +Changes: + +- regclient: moved manifest into separate package +- regclient: chunked upload of a blob is now supported +- regctl: adding manifest and blob put commands +- regsync: registry field can now be templated +- GitHub actions: nightly edge build has been added + +Fixes: + +- Update interactive password call for windows + +Experimental: + +- Adding Docker Hub tag delete + +## Release v0.3.0 + +Deprecated: + +- Multiple regclient APIs have received breaking changes. +- Configuration file handling has been removed from regclient. Configuration + should be injected by options when creating the regclient instance. +- DNS and Schema configuration options have been removed. Schema is now handled + using the TLS setting, and DNS has been separated into Hostname and Mirrors. + +Command Changes: + +- Docker Hub is now handled as `docker.io` in various commands and is configured + as the default when no registry is provided. +- Redesign of the mirror handling allows each mirror to have different + credentials and a path prefix option. +- `raw`, `raw-headers`, and `raw-body` formats added for viewing the original + response from the registry server. +- `version` sub-commands added to output the tag and git commit. +- `printPretty` format added to output tags and manifest list in a more user + friendly format. +- regbot creates a new reference instead of reusing an existing one. +- regbot reference adds a digest get/set operation. +- Documentation has been updated. +- `regctl image digest` on a manifest list only performs one GET request instead + of two. +- Docker schema v1 is supported to handle older images. + +regclient API Changes: + +- User-Agent in headers now reports which regclient command and commit. +- Retryable code now maintains state across multiple requests to avoid retrying + a down mirror for each layer of an image. +- API handling to the registry has been abstracted to hopefully allow registry + specific API requests. +- Error handling updated to support `errors.Is()`. +- Image config moved behind the blob interface. + +## Release v0.2.1 + +- `regctl registry` commands `login`, `logout`, and `set` previously required + the nonintuitive DNS name "registry-1.docker.io" for Hub. They now accept + "docker.io" and default to Hub when no registry is provided. + +## Release v0.2.0 + +- Adding regbot command and image to support Lua scripts with the regclient api. + The regbot scripts allow complex mirroring logic and enable registry cleanup + policies to be automated. +- Support registry auth without service or scope in the challenge header. + +## Release v0.1.0 + +- Adding regsync command and image to copy images between registries. +- Locking added to regclient to handle concurrent requests. +- Improved formatting / templating functionality. +- Handling images with external layers (copying Windows images). +- Fixing permissions of `/home/appuser` in the `regclient/regctl` and + `regclient/regsync` images. +- Bug fix for passing multiple host configs to regclient. + +## Release v0.0.5 + +- Adding `regctl image ratelimit` command + +## Release v0.0.4 + +- CI fix to build latest image + +## Release v0.0.3 + +- Add alpine image variant for CI pipelines +- Add support for `repo ls` command and _catalog API +- Add pagination support on tags and repo ls +- Add support for rate limit headers in manifest API + +## Release v0.0.2 + +- Add support for json log output +- Prompt for user and password on registry login if not set with flag +- Adding wrapper for docker CLI plugin +- Using manifest HEAD requests for digests +- Check manifest HEAD before pulling manifest in copy + +## Release v0.0.1 + +- regclient API is usable, but not considered stable yet, there's a potential for refactoring and breaking changes. +- regctl CLI is ready for testing, please report any issues you encounter. diff --git a/vendor/github.com/regclient/regclient/blob.go b/vendor/github.com/regclient/regclient/blob.go index a55d281b0e..a01080f628 100644 --- a/vendor/github.com/regclient/regclient/blob.go +++ b/vendor/github.com/regclient/regclient/blob.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package regclient import ( diff --git a/vendor/github.com/regclient/regclient/config/credhelper.go b/vendor/github.com/regclient/regclient/config/credhelper.go index 413e704040..743b77a032 100644 --- a/vendor/github.com/regclient/regclient/config/credhelper.go +++ b/vendor/github.com/regclient/regclient/config/credhelper.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package config import ( diff --git a/vendor/github.com/regclient/regclient/config/docker.go b/vendor/github.com/regclient/regclient/config/docker.go index cb73a60e6b..7039f3beaf 100644 --- a/vendor/github.com/regclient/regclient/config/docker.go +++ b/vendor/github.com/regclient/regclient/config/docker.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package config import ( diff --git a/vendor/github.com/regclient/regclient/config/host.go b/vendor/github.com/regclient/regclient/config/host.go index 8d751482ef..95f04ff226 100644 --- a/vendor/github.com/regclient/regclient/config/host.go +++ b/vendor/github.com/regclient/regclient/config/host.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Package config is used for all regclient configuration settings. package config diff --git a/vendor/github.com/regclient/regclient/image.go b/vendor/github.com/regclient/regclient/image.go index 6a9a0c877a..a47836ef33 100644 --- a/vendor/github.com/regclient/regclient/image.go +++ b/vendor/github.com/regclient/regclient/image.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package regclient import ( @@ -1687,8 +1701,8 @@ func (rc *RegClient) imageImportOCIHandleManifest(ctx context.Context, r ref.Ref // imageImportOCIPushManifests uploads manifests after OCI blobs were successfully loaded. func (rc *RegClient) imageImportOCIPushManifests(_ context.Context, _ ref.Ref, trd *tarReadData) error { // run finish handlers in reverse order to upload nested manifests - for i := len(trd.finish) - 1; i >= 0; i-- { - err := trd.finish[i]() + for _, v := range slices.Backward(trd.finish) { + err := v() if err != nil { return err } diff --git a/vendor/github.com/regclient/regclient/internal/auth/auth.go b/vendor/github.com/regclient/regclient/internal/auth/auth.go index fec4367bfb..ba73a0b9e4 100644 --- a/vendor/github.com/regclient/regclient/internal/auth/auth.go +++ b/vendor/github.com/regclient/regclient/internal/auth/auth.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Package auth is used for HTTP authentication package auth @@ -897,14 +911,12 @@ func (j *jwtHubHandler) ProcessChallenge(c challenge) error { return err } defer resp.Body.Close() - body, _ := io.ReadAll(resp.Body) - if resp.StatusCode != 200 || resp.StatusCode >= 300 { return errs.ErrHTTPUnauthorized } var bodyParsed jwtHubResp - err = json.Unmarshal(body, &bodyParsed) + err = json.NewDecoder(resp.Body).Decode(&bodyParsed) if err != nil { return err } diff --git a/vendor/github.com/regclient/regclient/internal/auth/error.go b/vendor/github.com/regclient/regclient/internal/auth/error.go index 7b04198a6d..def9e92996 100644 --- a/vendor/github.com/regclient/regclient/internal/auth/error.go +++ b/vendor/github.com/regclient/regclient/internal/auth/error.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package auth import ( diff --git a/vendor/github.com/regclient/regclient/internal/cache/cache.go b/vendor/github.com/regclient/regclient/internal/cache/cache.go index a08def82d4..28f9d61524 100644 --- a/vendor/github.com/regclient/regclient/internal/cache/cache.go +++ b/vendor/github.com/regclient/regclient/internal/cache/cache.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + //go:build go1.18 // Package cache is used to store values with limits. diff --git a/vendor/github.com/regclient/regclient/internal/conffile/conffile.go b/vendor/github.com/regclient/regclient/internal/conffile/conffile.go index ba8f7aa850..c46c9d2f44 100644 --- a/vendor/github.com/regclient/regclient/internal/conffile/conffile.go +++ b/vendor/github.com/regclient/regclient/internal/conffile/conffile.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Package conffile wraps the read and write of configuration files package conffile diff --git a/vendor/github.com/regclient/regclient/internal/conffile/conffile_unix.go b/vendor/github.com/regclient/regclient/internal/conffile/conffile_unix.go index ffb1fd1b9a..5a1add2b9a 100644 --- a/vendor/github.com/regclient/regclient/internal/conffile/conffile_unix.go +++ b/vendor/github.com/regclient/regclient/internal/conffile/conffile_unix.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + //go:build !windows package conffile diff --git a/vendor/github.com/regclient/regclient/internal/conffile/conffile_windows.go b/vendor/github.com/regclient/regclient/internal/conffile/conffile_windows.go index 5008dd4775..57da380ddf 100644 --- a/vendor/github.com/regclient/regclient/internal/conffile/conffile_windows.go +++ b/vendor/github.com/regclient/regclient/internal/conffile/conffile_windows.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + //go:build windows package conffile diff --git a/vendor/github.com/regclient/regclient/internal/httplink/httplink.go b/vendor/github.com/regclient/regclient/internal/httplink/httplink.go index 5ccd4f91da..08f1c2d70d 100644 --- a/vendor/github.com/regclient/regclient/internal/httplink/httplink.go +++ b/vendor/github.com/regclient/regclient/internal/httplink/httplink.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Package httplink parses the Link header from HTTP responses according to RFC5988 package httplink diff --git a/vendor/github.com/regclient/regclient/internal/limitread/limitread.go b/vendor/github.com/regclient/regclient/internal/limitread/limitread.go index 77115ef0c1..4a4fe4935f 100644 --- a/vendor/github.com/regclient/regclient/internal/limitread/limitread.go +++ b/vendor/github.com/regclient/regclient/internal/limitread/limitread.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Package limitread provides a reader that will error if the limit is ever exceeded package limitread diff --git a/vendor/github.com/regclient/regclient/internal/pqueue/pqueue.go b/vendor/github.com/regclient/regclient/internal/pqueue/pqueue.go index 2eea09601f..db78246532 100644 --- a/vendor/github.com/regclient/regclient/internal/pqueue/pqueue.go +++ b/vendor/github.com/regclient/regclient/internal/pqueue/pqueue.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Package pqueue implements a priority queue. package pqueue @@ -166,8 +180,8 @@ func AcquireMulti[T any](ctx context.Context, e T, qList ...*Queue[T]) (context. } } // delete nil entries - for i := len(qList) - 1; i >= 0; i-- { - if qList[i] == nil { + for i, q := range slices.Backward(qList) { + if q == nil { qList = slices.Delete(qList, i, i+1) } } @@ -230,8 +244,8 @@ func AcquireMulti[T any](ctx context.Context, e T, qList ...*Queue[T]) (context. cleanup := func() { ctxVal.qList = nil // dequeue in reverse order to minimize chance of another AcquireMulti being freed and immediately blocking on the next queue - for i := len(doneList) - 1; i >= 0; i-- { - doneList[i]() + for _, d := range slices.Backward(doneList) { + d() } } return newCtx, cleanup, nil diff --git a/vendor/github.com/regclient/regclient/internal/reghttp/http.go b/vendor/github.com/regclient/regclient/internal/reghttp/http.go index 7c95e1578e..8cda24c0bd 100644 --- a/vendor/github.com/regclient/regclient/internal/reghttp/http.go +++ b/vendor/github.com/regclient/regclient/internal/reghttp/http.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Package reghttp is used for HTTP requests to a registry package reghttp @@ -44,8 +58,9 @@ var ( ) const ( - DefaultRetryLimit = 5 // number of times a request will be retried - backoffResetCount = 5 // number of successful requests needed to reduce the backoff + DefaultRetryLimit = 5 // number of times a request will be retried + backoffResetCount = 5 // number of successful requests needed to reduce the backoff + ReadBodyLimit = 8 * 1024 * 1024 // limit for reading the body for errors ) // Client is an HTTP client wrapper. @@ -482,7 +497,7 @@ func (resp *Resp) next() error { dropHost = true } errHTTP := HTTPError(resp.resp.StatusCode) - errBody, _ := io.ReadAll(resp.resp.Body) + errBody, _ := io.ReadAll(&io.LimitedReader{R: resp.resp.Body, N: ReadBodyLimit}) _ = resp.resp.Body.Close() return fmt.Errorf("request failed: %w: %s", errHTTP, errBody) } @@ -753,12 +768,15 @@ func (c *Client) getHost(host string) *clientHost { hc := *c.httpClient h.httpClient = &hc if h.httpClient.Transport == nil { - h.httpClient.Transport = http.DefaultTransport.(*http.Transport).Clone() + if t, ok := http.DefaultTransport.(*http.Transport); ok { + h.httpClient.Transport = t.Clone() + } else { + h.httpClient.Transport = http.DefaultTransport + } } // configure transport for insecure requests and root certs if h.config.TLS == config.TLSInsecure || len(c.rootCAPool) > 0 || len(c.rootCADirs) > 0 || h.config.RegCert != "" || (h.config.ClientCert != "" && h.config.ClientKey != "") { - t, ok := h.httpClient.Transport.(*http.Transport) - if ok { + if t, ok := h.httpClient.Transport.(*http.Transport); ok { var tlsc *tls.Config if t.TLSClientConfig != nil { tlsc = t.TLSClientConfig.Clone() diff --git a/vendor/github.com/regclient/regclient/internal/regnet/regnet.go b/vendor/github.com/regclient/regclient/internal/regnet/regnet.go index 84b2a54c73..9b96c492ec 100644 --- a/vendor/github.com/regclient/regclient/internal/regnet/regnet.go +++ b/vendor/github.com/regclient/regclient/internal/regnet/regnet.go @@ -1,9 +1,24 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Package regnet contains networking helper functions for interacting with registries. package regnet import ( "fmt" "net" + "net/http" "net/url" "github.com/regclient/regclient/types/errs" @@ -20,6 +35,10 @@ func AllowRedirect(src, dest url.URL) error { } func IsLocal(hostPort string) bool { + // skip check on any requests going through a proxy + if u, err := http.ProxyFromEnvironment(&http.Request{URL: &url.URL{Scheme: "https", Host: hostPort}}); err == nil && u != nil { + return false + } // strip trailing port host, _, err := net.SplitHostPort(hostPort) if err != nil { diff --git a/vendor/github.com/regclient/regclient/internal/reproducible/reproducible.go b/vendor/github.com/regclient/regclient/internal/reproducible/reproducible.go index a6de25e53e..ac9d14f958 100644 --- a/vendor/github.com/regclient/regclient/internal/reproducible/reproducible.go +++ b/vendor/github.com/regclient/regclient/internal/reproducible/reproducible.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Package reproducible is used for reproducibility. // See for more information of the issues being solved. package reproducible diff --git a/vendor/github.com/regclient/regclient/internal/reproducible/time.go b/vendor/github.com/regclient/regclient/internal/reproducible/time.go index a85bae718f..d1ae8ef13f 100644 --- a/vendor/github.com/regclient/regclient/internal/reproducible/time.go +++ b/vendor/github.com/regclient/regclient/internal/reproducible/time.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package reproducible import ( diff --git a/vendor/github.com/regclient/regclient/internal/reqmeta/data.go b/vendor/github.com/regclient/regclient/internal/reqmeta/data.go index 2a7b94a90b..882f46c4be 100644 --- a/vendor/github.com/regclient/regclient/internal/reqmeta/data.go +++ b/vendor/github.com/regclient/regclient/internal/reqmeta/data.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Package reqmeta provides metadata on requests for prioritizing with a pqueue. package reqmeta diff --git a/vendor/github.com/regclient/regclient/internal/sloghandle/logrus.go b/vendor/github.com/regclient/regclient/internal/sloghandle/logrus.go index ac549d18a7..1542e34568 100644 --- a/vendor/github.com/regclient/regclient/internal/sloghandle/logrus.go +++ b/vendor/github.com/regclient/regclient/internal/sloghandle/logrus.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + //go:build !wasm // Package sloghandle provides a transition handler for migrating from logrus to slog. diff --git a/vendor/github.com/regclient/regclient/internal/strparse/strparse.go b/vendor/github.com/regclient/regclient/internal/strparse/strparse.go index f67fdafe9f..ea4e338577 100644 --- a/vendor/github.com/regclient/regclient/internal/strparse/strparse.go +++ b/vendor/github.com/regclient/regclient/internal/strparse/strparse.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Package strparse is used to parse strings package strparse diff --git a/vendor/github.com/regclient/regclient/internal/timejson/timejson.go b/vendor/github.com/regclient/regclient/internal/timejson/timejson.go index c5aad642d8..87257d6de6 100644 --- a/vendor/github.com/regclient/regclient/internal/timejson/timejson.go +++ b/vendor/github.com/regclient/regclient/internal/timejson/timejson.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Package timejson extends time methods with marshal/unmarshal for json package timejson diff --git a/vendor/github.com/regclient/regclient/internal/units/size.go b/vendor/github.com/regclient/regclient/internal/units/size.go index b1893c9f68..750eaa3aae 100644 --- a/vendor/github.com/regclient/regclient/internal/units/size.go +++ b/vendor/github.com/regclient/regclient/internal/units/size.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Package units is taken from https://github.com/docker/go-units package units diff --git a/vendor/github.com/regclient/regclient/internal/version/version.go b/vendor/github.com/regclient/regclient/internal/version/version.go index 5e5715e58b..3cb83b56ed 100644 --- a/vendor/github.com/regclient/regclient/internal/version/version.go +++ b/vendor/github.com/regclient/regclient/internal/version/version.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Package version returns details on the Go and Git repo used in the build package version diff --git a/vendor/github.com/regclient/regclient/internal/version/version_buildinfo.go b/vendor/github.com/regclient/regclient/internal/version/version_buildinfo.go index cd7ce60c21..578d59aa78 100644 --- a/vendor/github.com/regclient/regclient/internal/version/version_buildinfo.go +++ b/vendor/github.com/regclient/regclient/internal/version/version_buildinfo.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + //go:build go1.18 package version diff --git a/vendor/github.com/regclient/regclient/internal/version/version_old.go b/vendor/github.com/regclient/regclient/internal/version/version_old.go index beb1c42ab6..fe3a24ef14 100644 --- a/vendor/github.com/regclient/regclient/internal/version/version_old.go +++ b/vendor/github.com/regclient/regclient/internal/version/version_old.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + //go:build !go1.18 package version diff --git a/vendor/github.com/regclient/regclient/manifest.go b/vendor/github.com/regclient/regclient/manifest.go index ef871ebf1c..8dbfb1adcb 100644 --- a/vendor/github.com/regclient/regclient/manifest.go +++ b/vendor/github.com/regclient/regclient/manifest.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package regclient import ( diff --git a/vendor/github.com/regclient/regclient/ping.go b/vendor/github.com/regclient/regclient/ping.go index 4298f7ac33..2ed88b0db4 100644 --- a/vendor/github.com/regclient/regclient/ping.go +++ b/vendor/github.com/regclient/regclient/ping.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package regclient import ( diff --git a/vendor/github.com/regclient/regclient/pkg/archive/archive.go b/vendor/github.com/regclient/regclient/pkg/archive/archive.go index d183afd4ef..a3fc26efc0 100644 --- a/vendor/github.com/regclient/regclient/pkg/archive/archive.go +++ b/vendor/github.com/regclient/regclient/pkg/archive/archive.go @@ -1,2 +1,16 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Package archive is used to read and write tar files package archive diff --git a/vendor/github.com/regclient/regclient/pkg/archive/compress.go b/vendor/github.com/regclient/regclient/pkg/archive/compress.go index 84199943b8..16528c7e48 100644 --- a/vendor/github.com/regclient/regclient/pkg/archive/compress.go +++ b/vendor/github.com/regclient/regclient/pkg/archive/compress.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package archive import ( diff --git a/vendor/github.com/regclient/regclient/pkg/archive/errors.go b/vendor/github.com/regclient/regclient/pkg/archive/errors.go index b31989005d..d674e058ce 100644 --- a/vendor/github.com/regclient/regclient/pkg/archive/errors.go +++ b/vendor/github.com/regclient/regclient/pkg/archive/errors.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package archive import "errors" diff --git a/vendor/github.com/regclient/regclient/pkg/archive/tar.go b/vendor/github.com/regclient/regclient/pkg/archive/tar.go index e9f2347e64..e6440d1652 100644 --- a/vendor/github.com/regclient/regclient/pkg/archive/tar.go +++ b/vendor/github.com/regclient/regclient/pkg/archive/tar.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package archive import ( diff --git a/vendor/github.com/regclient/regclient/referrer.go b/vendor/github.com/regclient/regclient/referrer.go index 2c168124b4..916c860678 100644 --- a/vendor/github.com/regclient/regclient/referrer.go +++ b/vendor/github.com/regclient/regclient/referrer.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package regclient import ( diff --git a/vendor/github.com/regclient/regclient/regclient.go b/vendor/github.com/regclient/regclient/regclient.go index 0edfde50b5..4bcce85a31 100644 --- a/vendor/github.com/regclient/regclient/regclient.go +++ b/vendor/github.com/regclient/regclient/regclient.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Package regclient is used to access OCI registries. package regclient @@ -31,6 +45,7 @@ const ( type RegClient struct { hosts map[string]*config.Host hostDefault *config.Host + ocidirOpts []ocidir.Opts regOpts []reg.Opts schemes map[string]scheme.API slog *slog.Logger @@ -76,12 +91,14 @@ func New(opts ...Opt) *RegClient { reg.WithSlog(rc.slog), reg.WithUserAgent(rc.userAgent), ) + rc.ocidirOpts = append( + rc.ocidirOpts, + ocidir.WithSlog(rc.slog), + ) // setup scheme's rc.schemes["reg"] = reg.New(rc.regOpts...) - rc.schemes["ocidir"] = ocidir.New( - ocidir.WithSlog(rc.slog), - ) + rc.schemes["ocidir"] = ocidir.New(rc.ocidirOpts...) rc.slog.Debug("regclient initialized", slog.String("VCSRef", info.VCSRef), @@ -173,6 +190,16 @@ func WithDockerCredsFile(fname string) Opt { } } +// WithOCIDirOpts passes through opts to the ocidir scheme. +func WithOCIDirOpts(opts ...ocidir.Opts) Opt { + return func(rc *RegClient) { + if len(opts) == 0 { + return + } + rc.ocidirOpts = append(rc.ocidirOpts, opts...) + } +} + // WithRegOpts passes through opts to the reg scheme. func WithRegOpts(opts ...reg.Opts) Opt { return func(rc *RegClient) { diff --git a/vendor/github.com/regclient/regclient/regclient_nowasm.go b/vendor/github.com/regclient/regclient/regclient_nowasm.go index bde8e8e89d..578e442384 100644 --- a/vendor/github.com/regclient/regclient/regclient_nowasm.go +++ b/vendor/github.com/regclient/regclient/regclient_nowasm.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + //go:build !wasm package regclient diff --git a/vendor/github.com/regclient/regclient/release.md b/vendor/github.com/regclient/regclient/release.md deleted file mode 100644 index 23f9d6412b..0000000000 --- a/vendor/github.com/regclient/regclient/release.md +++ /dev/null @@ -1,19 +0,0 @@ -# Release v0.11.5 - -Security: - -- Prevent https to non-https downgrades and localhost redirects. ([PR 1093][pr-1093]) -- Forbid sending auth on redirects. ([PR 1095][pr-1095]) - -Features: - -- Add regbot `manifest.descriptor` to the sandbox. ([PR 1091][pr-1091]) - -Contributors: - -- @GimmyDatBeeR -- @sudo-bmitch - -[pr-1091]: https://github.com/regclient/regclient/pull/1091 -[pr-1093]: https://github.com/regclient/regclient/pull/1093 -[pr-1095]: https://github.com/regclient/regclient/pull/1095 diff --git a/vendor/github.com/regclient/regclient/repo.go b/vendor/github.com/regclient/regclient/repo.go index c2a2d59f3c..69afc89511 100644 --- a/vendor/github.com/regclient/regclient/repo.go +++ b/vendor/github.com/regclient/regclient/repo.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package regclient import ( diff --git a/vendor/github.com/regclient/regclient/scheme.go b/vendor/github.com/regclient/regclient/scheme.go index a18a7af9d7..71c1db163f 100644 --- a/vendor/github.com/regclient/regclient/scheme.go +++ b/vendor/github.com/regclient/regclient/scheme.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package regclient import ( diff --git a/vendor/github.com/regclient/regclient/scheme/ocidir/blob.go b/vendor/github.com/regclient/regclient/scheme/ocidir/blob.go index 64f78b5625..09e8310e1c 100644 --- a/vendor/github.com/regclient/regclient/scheme/ocidir/blob.go +++ b/vendor/github.com/regclient/regclient/scheme/ocidir/blob.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package ocidir import ( @@ -39,13 +53,13 @@ func (o *OCIDir) BlobGet(ctx context.Context, r ref.Ref, d descriptor.Descriptor //#nosec G304 users should validate references they attempt to open fd, err := os.Open(file) if err != nil { - return nil, err + return nil, fmt.Errorf("failed to open blob %s: %w", file, err) } if d.Size <= 0 { fi, err := fd.Stat() if err != nil { _ = fd.Close() - return nil, err + return nil, fmt.Errorf("failed to stat blob %s: %w", file, err) } d.Size = fi.Size() } @@ -70,13 +84,13 @@ func (o *OCIDir) BlobHead(ctx context.Context, r ref.Ref, d descriptor.Descripto //#nosec G304 users should validate references they attempt to open fd, err := os.Open(file) if err != nil { - return nil, err + return nil, fmt.Errorf("failed to open blob %s: %w", file, err) } defer fd.Close() if d.Size <= 0 { fi, err := fd.Stat() if err != nil { - return nil, err + return nil, fmt.Errorf("failed to stat blob %s: %w", file, err) } d.Size = fi.Size() } diff --git a/vendor/github.com/regclient/regclient/scheme/ocidir/close.go b/vendor/github.com/regclient/regclient/scheme/ocidir/close.go index 23eae0d12a..d1719aa5d7 100644 --- a/vendor/github.com/regclient/regclient/scheme/ocidir/close.go +++ b/vendor/github.com/regclient/regclient/scheme/ocidir/close.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package ocidir import ( diff --git a/vendor/github.com/regclient/regclient/scheme/ocidir/manifest.go b/vendor/github.com/regclient/regclient/scheme/ocidir/manifest.go index 6b2d39ca3d..61969fda69 100644 --- a/vendor/github.com/regclient/regclient/scheme/ocidir/manifest.go +++ b/vendor/github.com/regclient/regclient/scheme/ocidir/manifest.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package ocidir import ( @@ -18,6 +32,7 @@ import ( "github.com/opencontainers/go-digest" + "github.com/regclient/regclient/internal/limitread" "github.com/regclient/regclient/scheme" "github.com/regclient/regclient/types" "github.com/regclient/regclient/types/errs" @@ -67,9 +82,9 @@ func (o *OCIDir) ManifestDelete(ctx context.Context, r ref.Ref, opts ...scheme.M if err != nil { return fmt.Errorf("failed to read index: %w", err) } - for i := len(index.Manifests) - 1; i >= 0; i-- { + for i, v := range slices.Backward(index.Manifests) { // remove matching entry from index - if r.Digest != "" && index.Manifests[i].Digest.String() == r.Digest { + if r.Digest != "" && v.Digest.String() == r.Digest { changed = true index.Manifests = slices.Delete(index.Manifests, i, i+1) } @@ -116,8 +131,11 @@ func (o *OCIDir) manifestGet(_ context.Context, r ref.Ref) (manifest.Manifest, e return nil, err } } + if desc.Size > o.manifestMaxPull { + return nil, fmt.Errorf("manifest exceeds size limit, ref: %s, limit: %d, size: %d%.0w", r.CommonName(), o.manifestMaxPull, desc.Size, errs.ErrSizeLimitExceeded) + } if desc.Digest == "" { - return nil, errs.ErrNotFound + return nil, fmt.Errorf("digest could not be determined for %s%.0w", r.CommonName(), errs.ErrNotFound) } if err = desc.Digest.Validate(); err != nil { return nil, fmt.Errorf("invalid digest in index: %s: %w", string(desc.Digest), err) @@ -129,7 +147,11 @@ func (o *OCIDir) manifestGet(_ context.Context, r ref.Ref) (manifest.Manifest, e return nil, fmt.Errorf("failed to open manifest: %w", err) } defer fd.Close() - mb, err := io.ReadAll(fd) + limit := desc.Size + if desc.Size <= 0 || desc.MediaType == mediatype.Docker1Manifest || desc.MediaType == mediatype.Docker1ManifestSigned { + limit = o.manifestMaxPull + } + mb, err := io.ReadAll(&limitread.LimitRead{Reader: fd, Limit: limit}) if err != nil { return nil, fmt.Errorf("failed to read manifest: %w", err) } @@ -164,7 +186,7 @@ func (o *OCIDir) ManifestHead(ctx context.Context, r ref.Ref) (manifest.Manifest } } if desc.Digest == "" { - return nil, errs.ErrNotFound + return nil, fmt.Errorf("digest could not be determined for %s%.0w", r.CommonName(), errs.ErrNotFound) } if err = desc.Digest.Validate(); err != nil { return nil, fmt.Errorf("invalid digest in index: %s: %w", string(desc.Digest), err) diff --git a/vendor/github.com/regclient/regclient/scheme/ocidir/ocidir.go b/vendor/github.com/regclient/regclient/scheme/ocidir/ocidir.go index 35799c44d4..491de914a1 100644 --- a/vendor/github.com/regclient/regclient/scheme/ocidir/ocidir.go +++ b/vendor/github.com/regclient/regclient/scheme/ocidir/ocidir.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Package ocidir implements the OCI Image Layout scheme with a directory (not packed in a tar) package ocidir @@ -29,16 +43,22 @@ import ( const ( imageLayoutFile = "oci-layout" defThrottle = 3 + // defaultManifestMaxPull limits the largest manifest that will be pulled + defaultManifestMaxPull = 1024 * 1024 * 8 + // defaultManifestMaxPush limits the largest manifest that will be pushed + defaultManifestMaxPush = 1024 * 1024 * 4 ) // OCIDir is used for accessing OCI Image Layouts defined as a directory type OCIDir struct { - slog *slog.Logger - gc bool - modRefs map[string]*ociGC - throttle map[string]*pqueue.Queue[reqmeta.Data] - throttleDef int - mu sync.Mutex + slog *slog.Logger + gc bool + manifestMaxPull int64 + manifestMaxPush int64 + modRefs map[string]*ociGC + throttle map[string]*pqueue.Queue[reqmeta.Data] + throttleDef int + mu sync.Mutex } type ociGC struct { @@ -47,9 +67,11 @@ type ociGC struct { } type ociConf struct { - gc bool - slog *slog.Logger - throttle int + gc bool + manifestMaxPull int64 + manifestMaxPush int64 + slog *slog.Logger + throttle int } // Opts are used for passing options to ocidir @@ -58,19 +80,23 @@ type Opts func(*ociConf) // New creates a new OCIDir with options func New(opts ...Opts) *OCIDir { conf := ociConf{ - slog: slog.New(slog.NewTextHandler(io.Discard, &slog.HandlerOptions{})), - gc: true, - throttle: defThrottle, + slog: slog.New(slog.NewTextHandler(io.Discard, &slog.HandlerOptions{})), + gc: true, + manifestMaxPull: defaultManifestMaxPull, + manifestMaxPush: defaultManifestMaxPush, + throttle: defThrottle, } for _, opt := range opts { opt(&conf) } return &OCIDir{ - slog: conf.slog, - gc: conf.gc, - modRefs: map[string]*ociGC{}, - throttle: map[string]*pqueue.Queue[reqmeta.Data]{}, - throttleDef: conf.throttle, + slog: conf.slog, + gc: conf.gc, + manifestMaxPull: conf.manifestMaxPull, + manifestMaxPush: conf.manifestMaxPush, + modRefs: map[string]*ociGC{}, + throttle: map[string]*pqueue.Queue[reqmeta.Data]{}, + throttleDef: conf.throttle, } } @@ -82,6 +108,14 @@ func WithGC(gc bool) Opts { } } +// WithManifestMax sets the push and pull limits for manifests +func WithManifestMax(push, pull int64) Opts { + return func(c *ociConf) { + c.manifestMaxPush = push + c.manifestMaxPull = pull + } +} + // WithSlog provides a slog logger. // By default logging is disabled. func WithSlog(slog *slog.Logger) Opts { @@ -194,11 +228,7 @@ func (o *OCIDir) readIndex(r ref.Ref, locked bool) (v1.Index, error) { return index, fmt.Errorf("%s cannot be open: %w", indexFile, err) } defer fh.Close() - ib, err := io.ReadAll(fh) - if err != nil { - return index, fmt.Errorf("%s cannot be read: %w", indexFile, err) - } - err = json.Unmarshal(ib, &index) + err = json.NewDecoder(fh).Decode(&index) if err != nil { return index, fmt.Errorf("%s cannot be parsed: %w", indexFile, err) } @@ -304,11 +334,7 @@ func (o *OCIDir) valid(dir string, locked bool) error { return fmt.Errorf("%s cannot be open: %w", imageLayoutFile, err) } defer fh.Close() - lb, err := io.ReadAll(fh) - if err != nil { - return fmt.Errorf("%s cannot be read: %w", imageLayoutFile, err) - } - err = json.Unmarshal(lb, &layout) + err = json.NewDecoder(fh).Decode(&layout) if err != nil { return fmt.Errorf("%s cannot be parsed: %w", imageLayoutFile, err) } @@ -359,7 +385,7 @@ func indexGet(index v1.Index, r ref.Ref) (descriptor.Descriptor, error) { } } } - return descriptor.Descriptor{}, errs.ErrNotFound + return descriptor.Descriptor{}, fmt.Errorf("could not find entry in index.json: %s%.0w", r.CommonName(), errs.ErrNotFound) } func indexSet(index *v1.Index, r ref.Ref, d descriptor.Descriptor) error { diff --git a/vendor/github.com/regclient/regclient/scheme/ocidir/ocidir_nowasm.go b/vendor/github.com/regclient/regclient/scheme/ocidir/ocidir_nowasm.go index 50ec0519b5..980c8086bc 100644 --- a/vendor/github.com/regclient/regclient/scheme/ocidir/ocidir_nowasm.go +++ b/vendor/github.com/regclient/regclient/scheme/ocidir/ocidir_nowasm.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + //go:build !wasm package ocidir diff --git a/vendor/github.com/regclient/regclient/scheme/ocidir/ping.go b/vendor/github.com/regclient/regclient/scheme/ocidir/ping.go index d83df34364..f3f120fa48 100644 --- a/vendor/github.com/regclient/regclient/scheme/ocidir/ping.go +++ b/vendor/github.com/regclient/regclient/scheme/ocidir/ping.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package ocidir import ( diff --git a/vendor/github.com/regclient/regclient/scheme/ocidir/referrer.go b/vendor/github.com/regclient/regclient/scheme/ocidir/referrer.go index 1e17a9c587..b3736fed68 100644 --- a/vendor/github.com/regclient/regclient/scheme/ocidir/referrer.go +++ b/vendor/github.com/regclient/regclient/scheme/ocidir/referrer.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package ocidir import ( diff --git a/vendor/github.com/regclient/regclient/scheme/ocidir/tag.go b/vendor/github.com/regclient/regclient/scheme/ocidir/tag.go index bbc51c1d69..5b5e07e1a8 100644 --- a/vendor/github.com/regclient/regclient/scheme/ocidir/tag.go +++ b/vendor/github.com/regclient/regclient/scheme/ocidir/tag.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package ocidir import ( diff --git a/vendor/github.com/regclient/regclient/scheme/reg/blob.go b/vendor/github.com/regclient/regclient/scheme/reg/blob.go index a36a3d937b..0ed44d5ef7 100644 --- a/vendor/github.com/regclient/regclient/scheme/reg/blob.go +++ b/vendor/github.com/regclient/regclient/scheme/reg/blob.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package reg import ( diff --git a/vendor/github.com/regclient/regclient/scheme/reg/manifest.go b/vendor/github.com/regclient/regclient/scheme/reg/manifest.go index 85114c4ca1..8ec03cf451 100644 --- a/vendor/github.com/regclient/regclient/scheme/reg/manifest.go +++ b/vendor/github.com/regclient/regclient/scheme/reg/manifest.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package reg import ( diff --git a/vendor/github.com/regclient/regclient/scheme/reg/ping.go b/vendor/github.com/regclient/regclient/scheme/reg/ping.go index e4fc0f022c..57170e8349 100644 --- a/vendor/github.com/regclient/regclient/scheme/reg/ping.go +++ b/vendor/github.com/regclient/regclient/scheme/reg/ping.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package reg import ( diff --git a/vendor/github.com/regclient/regclient/scheme/reg/referrer.go b/vendor/github.com/regclient/regclient/scheme/reg/referrer.go index 5610d3968e..385546835d 100644 --- a/vendor/github.com/regclient/regclient/scheme/reg/referrer.go +++ b/vendor/github.com/regclient/regclient/scheme/reg/referrer.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package reg import ( diff --git a/vendor/github.com/regclient/regclient/scheme/reg/reg.go b/vendor/github.com/regclient/regclient/scheme/reg/reg.go index 5f2a27e9cc..10b2998d55 100644 --- a/vendor/github.com/regclient/regclient/scheme/reg/reg.go +++ b/vendor/github.com/regclient/regclient/scheme/reg/reg.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Package reg implements the OCI registry scheme used by most images (host:port/repo:tag) package reg diff --git a/vendor/github.com/regclient/regclient/scheme/reg/reg_nowasm.go b/vendor/github.com/regclient/regclient/scheme/reg/reg_nowasm.go index e01ba090a1..77a61e7b71 100644 --- a/vendor/github.com/regclient/regclient/scheme/reg/reg_nowasm.go +++ b/vendor/github.com/regclient/regclient/scheme/reg/reg_nowasm.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + //go:build !wasm package reg diff --git a/vendor/github.com/regclient/regclient/scheme/reg/repo.go b/vendor/github.com/regclient/regclient/scheme/reg/repo.go index b9b0307c22..15c2bfce1c 100644 --- a/vendor/github.com/regclient/regclient/scheme/reg/repo.go +++ b/vendor/github.com/regclient/regclient/scheme/reg/repo.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package reg import ( diff --git a/vendor/github.com/regclient/regclient/scheme/reg/tag.go b/vendor/github.com/regclient/regclient/scheme/reg/tag.go index 0ed66c8744..a2bd34145a 100644 --- a/vendor/github.com/regclient/regclient/scheme/reg/tag.go +++ b/vendor/github.com/regclient/regclient/scheme/reg/tag.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package reg import ( diff --git a/vendor/github.com/regclient/regclient/scheme/scheme.go b/vendor/github.com/regclient/regclient/scheme/scheme.go index 9965eef969..813eb6da1f 100644 --- a/vendor/github.com/regclient/regclient/scheme/scheme.go +++ b/vendor/github.com/regclient/regclient/scheme/scheme.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Package scheme defines the interface for various reference schemes. package scheme diff --git a/vendor/github.com/regclient/regclient/tag.go b/vendor/github.com/regclient/regclient/tag.go index 6b522804b5..267348e6f6 100644 --- a/vendor/github.com/regclient/regclient/tag.go +++ b/vendor/github.com/regclient/regclient/tag.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package regclient import ( diff --git a/vendor/github.com/regclient/regclient/types/annotations.go b/vendor/github.com/regclient/regclient/types/annotations.go index c989eb66f6..6e86ac7d94 100644 --- a/vendor/github.com/regclient/regclient/types/annotations.go +++ b/vendor/github.com/regclient/regclient/types/annotations.go @@ -1,5 +1,6 @@ // Content in this file comes from OCI // Copyright 2016 The Linux Foundation +// Copyright the regclient contributors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/vendor/github.com/regclient/regclient/types/blob/blob.go b/vendor/github.com/regclient/regclient/types/blob/blob.go index 86d215cba4..b1f63ec6be 100644 --- a/vendor/github.com/regclient/regclient/types/blob/blob.go +++ b/vendor/github.com/regclient/regclient/types/blob/blob.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Package blob is the underlying type for pushing and pulling blobs. package blob diff --git a/vendor/github.com/regclient/regclient/types/blob/common.go b/vendor/github.com/regclient/regclient/types/blob/common.go index c78029c0a5..9f38ceb16e 100644 --- a/vendor/github.com/regclient/regclient/types/blob/common.go +++ b/vendor/github.com/regclient/regclient/types/blob/common.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package blob import ( diff --git a/vendor/github.com/regclient/regclient/types/blob/ociconfig.go b/vendor/github.com/regclient/regclient/types/blob/ociconfig.go index 619ea32c30..f5bd5ee148 100644 --- a/vendor/github.com/regclient/regclient/types/blob/ociconfig.go +++ b/vendor/github.com/regclient/regclient/types/blob/ociconfig.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package blob import ( diff --git a/vendor/github.com/regclient/regclient/types/blob/reader.go b/vendor/github.com/regclient/regclient/types/blob/reader.go index 632fac20d9..0f6b6bc5bf 100644 --- a/vendor/github.com/regclient/regclient/types/blob/reader.go +++ b/vendor/github.com/regclient/regclient/types/blob/reader.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package blob import ( diff --git a/vendor/github.com/regclient/regclient/types/blob/tar.go b/vendor/github.com/regclient/regclient/types/blob/tar.go index 6f47f4bbe0..d828ce7029 100644 --- a/vendor/github.com/regclient/regclient/types/blob/tar.go +++ b/vendor/github.com/regclient/regclient/types/blob/tar.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package blob import ( diff --git a/vendor/github.com/regclient/regclient/types/callback.go b/vendor/github.com/regclient/regclient/types/callback.go index c4c2fad9b6..cb4d03fe1c 100644 --- a/vendor/github.com/regclient/regclient/types/callback.go +++ b/vendor/github.com/regclient/regclient/types/callback.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package types type CallbackState int diff --git a/vendor/github.com/regclient/regclient/types/descriptor.go b/vendor/github.com/regclient/regclient/types/descriptor.go index 6cb3576277..6929cf3134 100644 --- a/vendor/github.com/regclient/regclient/types/descriptor.go +++ b/vendor/github.com/regclient/regclient/types/descriptor.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package types import "github.com/regclient/regclient/types/descriptor" diff --git a/vendor/github.com/regclient/regclient/types/descriptor/descriptor.go b/vendor/github.com/regclient/regclient/types/descriptor/descriptor.go index 1b3e394128..04fee59b0c 100644 --- a/vendor/github.com/regclient/regclient/types/descriptor/descriptor.go +++ b/vendor/github.com/regclient/regclient/types/descriptor/descriptor.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Package descriptor defines the OCI descriptor data structure used in manifests to reference content addressable data. package descriptor diff --git a/vendor/github.com/regclient/regclient/types/doc.go b/vendor/github.com/regclient/regclient/types/doc.go index 828541d3c9..d6182ffe27 100644 --- a/vendor/github.com/regclient/regclient/types/doc.go +++ b/vendor/github.com/regclient/regclient/types/doc.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Package types defines various types that have no other internal imports // This allows them to be used between other packages without creating import loops package types diff --git a/vendor/github.com/regclient/regclient/types/docker/schema1/manifest.go b/vendor/github.com/regclient/regclient/types/docker/schema1/manifest.go index 9237973059..3adf6a34d4 100644 --- a/vendor/github.com/regclient/regclient/types/docker/schema1/manifest.go +++ b/vendor/github.com/regclient/regclient/types/docker/schema1/manifest.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Package schema1 defines the manifest and json marshal/unmarshal for docker schema1 package schema1 diff --git a/vendor/github.com/regclient/regclient/types/docker/schema2/doc.go b/vendor/github.com/regclient/regclient/types/docker/schema2/doc.go index ada3e79546..ff254be0c3 100644 --- a/vendor/github.com/regclient/regclient/types/docker/schema2/doc.go +++ b/vendor/github.com/regclient/regclient/types/docker/schema2/doc.go @@ -1,2 +1,16 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Package schema2 contains structs for Docker schema v2 manifests. package schema2 diff --git a/vendor/github.com/regclient/regclient/types/docker/schema2/manifest.go b/vendor/github.com/regclient/regclient/types/docker/schema2/manifest.go index 16bb8cb51a..0c33b2341f 100644 --- a/vendor/github.com/regclient/regclient/types/docker/schema2/manifest.go +++ b/vendor/github.com/regclient/regclient/types/docker/schema2/manifest.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package schema2 import ( diff --git a/vendor/github.com/regclient/regclient/types/docker/schema2/manifestlist.go b/vendor/github.com/regclient/regclient/types/docker/schema2/manifestlist.go index 8fa8047129..08c9d54f27 100644 --- a/vendor/github.com/regclient/regclient/types/docker/schema2/manifestlist.go +++ b/vendor/github.com/regclient/regclient/types/docker/schema2/manifestlist.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package schema2 import ( diff --git a/vendor/github.com/regclient/regclient/types/docker/versioned.go b/vendor/github.com/regclient/regclient/types/docker/versioned.go index 9685f2c78f..01e205ef21 100644 --- a/vendor/github.com/regclient/regclient/types/docker/versioned.go +++ b/vendor/github.com/regclient/regclient/types/docker/versioned.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Package docker defines the common types for all docker schemas package docker diff --git a/vendor/github.com/regclient/regclient/types/error.go b/vendor/github.com/regclient/regclient/types/error.go index 135a160059..6b4b10574a 100644 --- a/vendor/github.com/regclient/regclient/types/error.go +++ b/vendor/github.com/regclient/regclient/types/error.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package types import "github.com/regclient/regclient/types/errs" diff --git a/vendor/github.com/regclient/regclient/types/errs/error.go b/vendor/github.com/regclient/regclient/types/errs/error.go index 4ac4c8a558..6cf5fac238 100644 --- a/vendor/github.com/regclient/regclient/types/errs/error.go +++ b/vendor/github.com/regclient/regclient/types/errs/error.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Package errs is used for predefined error values. package errs diff --git a/vendor/github.com/regclient/regclient/types/manifest/common.go b/vendor/github.com/regclient/regclient/types/manifest/common.go index 70139b786f..4c1dc486d2 100644 --- a/vendor/github.com/regclient/regclient/types/manifest/common.go +++ b/vendor/github.com/regclient/regclient/types/manifest/common.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package manifest import ( diff --git a/vendor/github.com/regclient/regclient/types/manifest/docker1.go b/vendor/github.com/regclient/regclient/types/manifest/docker1.go index 4af4c22a88..00500c1a7d 100644 --- a/vendor/github.com/regclient/regclient/types/manifest/docker1.go +++ b/vendor/github.com/regclient/regclient/types/manifest/docker1.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package manifest import ( diff --git a/vendor/github.com/regclient/regclient/types/manifest/docker2.go b/vendor/github.com/regclient/regclient/types/manifest/docker2.go index 0fccc8f3c7..62cb9c3fcc 100644 --- a/vendor/github.com/regclient/regclient/types/manifest/docker2.go +++ b/vendor/github.com/regclient/regclient/types/manifest/docker2.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package manifest import ( diff --git a/vendor/github.com/regclient/regclient/types/manifest/manifest.go b/vendor/github.com/regclient/regclient/types/manifest/manifest.go index 9fce7624d6..6d1b88aa71 100644 --- a/vendor/github.com/regclient/regclient/types/manifest/manifest.go +++ b/vendor/github.com/regclient/regclient/types/manifest/manifest.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Package manifest abstracts the various types of supported manifests. // Supported types include OCI index and image, and Docker manifest list and manifest. package manifest diff --git a/vendor/github.com/regclient/regclient/types/manifest/oci1.go b/vendor/github.com/regclient/regclient/types/manifest/oci1.go index 30d4f99193..0b13576bb0 100644 --- a/vendor/github.com/regclient/regclient/types/manifest/oci1.go +++ b/vendor/github.com/regclient/regclient/types/manifest/oci1.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package manifest import ( diff --git a/vendor/github.com/regclient/regclient/types/mediatype.go b/vendor/github.com/regclient/regclient/types/mediatype.go index 220759f8f3..287ab1c13d 100644 --- a/vendor/github.com/regclient/regclient/types/mediatype.go +++ b/vendor/github.com/regclient/regclient/types/mediatype.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package types import ( diff --git a/vendor/github.com/regclient/regclient/types/mediatype/mediatype.go b/vendor/github.com/regclient/regclient/types/mediatype/mediatype.go index b74bb2c211..1379ba678c 100644 --- a/vendor/github.com/regclient/regclient/types/mediatype/mediatype.go +++ b/vendor/github.com/regclient/regclient/types/mediatype/mediatype.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Package mediatype defines well known media types. package mediatype diff --git a/vendor/github.com/regclient/regclient/types/oci/doc.go b/vendor/github.com/regclient/regclient/types/oci/doc.go index 8903fd6978..bd6dcfd1bc 100644 --- a/vendor/github.com/regclient/regclient/types/oci/doc.go +++ b/vendor/github.com/regclient/regclient/types/oci/doc.go @@ -1,9 +1,6 @@ -// Package oci defiles OCI image-spec types -package oci - // Contents of this folder refer to types defined at with the following license: - // Copyright 2016 The Linux Foundation +// Copyright the regclient contributors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -16,3 +13,6 @@ package oci // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + +// Package oci defiles OCI image-spec types +package oci diff --git a/vendor/github.com/regclient/regclient/types/oci/v1/artifact.go b/vendor/github.com/regclient/regclient/types/oci/v1/artifact.go index 8effe16806..facd0f5444 100644 --- a/vendor/github.com/regclient/regclient/types/oci/v1/artifact.go +++ b/vendor/github.com/regclient/regclient/types/oci/v1/artifact.go @@ -1,3 +1,18 @@ +// Copyright 2016 The Linux Foundation +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package v1 import "github.com/regclient/regclient/types/descriptor" diff --git a/vendor/github.com/regclient/regclient/types/oci/v1/config.go b/vendor/github.com/regclient/regclient/types/oci/v1/config.go index 497eef8973..78b6b8ce78 100644 --- a/vendor/github.com/regclient/regclient/types/oci/v1/config.go +++ b/vendor/github.com/regclient/regclient/types/oci/v1/config.go @@ -1,7 +1,21 @@ -package v1 +// Docker specific content in this file is included from +// Copyright 2016 The Linux Foundation +// Copyright 2013-2018 Docker, Inc. +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -// Docker specific content in this file is included from -// https://github.com/moby/moby/blob/master/api/types/container/config.go +package v1 import ( "time" diff --git a/vendor/github.com/regclient/regclient/types/oci/v1/doc.go b/vendor/github.com/regclient/regclient/types/oci/v1/doc.go index 2d198388de..3c5ad09a9f 100644 --- a/vendor/github.com/regclient/regclient/types/oci/v1/doc.go +++ b/vendor/github.com/regclient/regclient/types/oci/v1/doc.go @@ -1,9 +1,6 @@ -// Package v1 defiles version 1 of OCI image-spec types -package v1 - // Contents of this folder refer to types defined at with the following license: - // Copyright 2016 The Linux Foundation +// Copyright the regclient contributors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -16,3 +13,6 @@ package v1 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. + +// Package v1 defiles version 1 of OCI image-spec types +package v1 diff --git a/vendor/github.com/regclient/regclient/types/oci/v1/index.go b/vendor/github.com/regclient/regclient/types/oci/v1/index.go index 887a5c874f..de275b65fd 100644 --- a/vendor/github.com/regclient/regclient/types/oci/v1/index.go +++ b/vendor/github.com/regclient/regclient/types/oci/v1/index.go @@ -1,3 +1,18 @@ +// Copyright 2016 The Linux Foundation +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package v1 import ( diff --git a/vendor/github.com/regclient/regclient/types/oci/v1/layout.go b/vendor/github.com/regclient/regclient/types/oci/v1/layout.go index 508db62734..26cecf092f 100644 --- a/vendor/github.com/regclient/regclient/types/oci/v1/layout.go +++ b/vendor/github.com/regclient/regclient/types/oci/v1/layout.go @@ -1,3 +1,18 @@ +// Copyright 2016 The Linux Foundation +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package v1 // ImageLayout is the structure in the "oci-layout" file, found in the root of an OCI Image-layout directory. diff --git a/vendor/github.com/regclient/regclient/types/oci/v1/manifest.go b/vendor/github.com/regclient/regclient/types/oci/v1/manifest.go index d49c39ae16..db775b9523 100644 --- a/vendor/github.com/regclient/regclient/types/oci/v1/manifest.go +++ b/vendor/github.com/regclient/regclient/types/oci/v1/manifest.go @@ -1,3 +1,18 @@ +// Copyright 2016 The Linux Foundation +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package v1 import ( diff --git a/vendor/github.com/regclient/regclient/types/oci/version.go b/vendor/github.com/regclient/regclient/types/oci/version.go index 0040374c22..7b6b827901 100644 --- a/vendor/github.com/regclient/regclient/types/oci/version.go +++ b/vendor/github.com/regclient/regclient/types/oci/version.go @@ -1,3 +1,18 @@ +// Copyright 2016 The Linux Foundation +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Package oci defines common settings for all OCI types package oci diff --git a/vendor/github.com/regclient/regclient/types/ping/ping.go b/vendor/github.com/regclient/regclient/types/ping/ping.go index 9417b4a51b..b432b24cfd 100644 --- a/vendor/github.com/regclient/regclient/types/ping/ping.go +++ b/vendor/github.com/regclient/regclient/types/ping/ping.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Package ping is used for data types with the Ping methods. package ping diff --git a/vendor/github.com/regclient/regclient/types/platform/compare.go b/vendor/github.com/regclient/regclient/types/platform/compare.go index ac38f213bb..929ae08728 100644 --- a/vendor/github.com/regclient/regclient/types/platform/compare.go +++ b/vendor/github.com/regclient/regclient/types/platform/compare.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package platform import ( diff --git a/vendor/github.com/regclient/regclient/types/platform/cpuinfo.go b/vendor/github.com/regclient/regclient/types/platform/cpuinfo.go index 75fe335a12..ce80ec8ea5 100644 --- a/vendor/github.com/regclient/regclient/types/platform/cpuinfo.go +++ b/vendor/github.com/regclient/regclient/types/platform/cpuinfo.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Related implementations: // // diff --git a/vendor/github.com/regclient/regclient/types/platform/cpuinfo_armx.go b/vendor/github.com/regclient/regclient/types/platform/cpuinfo_armx.go index e0802608fc..2e173aad22 100644 --- a/vendor/github.com/regclient/regclient/types/platform/cpuinfo_armx.go +++ b/vendor/github.com/regclient/regclient/types/platform/cpuinfo_armx.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + //go:build arm || arm64 package platform diff --git a/vendor/github.com/regclient/regclient/types/platform/cpuinfo_other.go b/vendor/github.com/regclient/regclient/types/platform/cpuinfo_other.go index 9623828db2..c2599966b2 100644 --- a/vendor/github.com/regclient/regclient/types/platform/cpuinfo_other.go +++ b/vendor/github.com/regclient/regclient/types/platform/cpuinfo_other.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + //go:build !386 && !amd64 && !amd64p32 && !arm && !arm64 package platform diff --git a/vendor/github.com/regclient/regclient/types/platform/cpuinfo_x86.go b/vendor/github.com/regclient/regclient/types/platform/cpuinfo_x86.go index 27e53e06c1..b78bfe0637 100644 --- a/vendor/github.com/regclient/regclient/types/platform/cpuinfo_x86.go +++ b/vendor/github.com/regclient/regclient/types/platform/cpuinfo_x86.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + //go:build 386 || amd64 || amd64p32 package platform diff --git a/vendor/github.com/regclient/regclient/types/platform/os_darwin.go b/vendor/github.com/regclient/regclient/types/platform/os_darwin.go index bcd8877523..7b513fecee 100644 --- a/vendor/github.com/regclient/regclient/types/platform/os_darwin.go +++ b/vendor/github.com/regclient/regclient/types/platform/os_darwin.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + //go:build darwin package platform diff --git a/vendor/github.com/regclient/regclient/types/platform/os_other.go b/vendor/github.com/regclient/regclient/types/platform/os_other.go index 56796a6054..d790e577bf 100644 --- a/vendor/github.com/regclient/regclient/types/platform/os_other.go +++ b/vendor/github.com/regclient/regclient/types/platform/os_other.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + //go:build !darwin package platform diff --git a/vendor/github.com/regclient/regclient/types/platform/platform.go b/vendor/github.com/regclient/regclient/types/platform/platform.go index 7cf746e8e0..5deeab9bb2 100644 --- a/vendor/github.com/regclient/regclient/types/platform/platform.go +++ b/vendor/github.com/regclient/regclient/types/platform/platform.go @@ -1,21 +1,22 @@ +// Some of the code in the package and all of the inspiration for this comes from . +// Copyright The containerd Authors. +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Package platform handles the parsing and comparing of the image platform (e.g. linux/amd64) package platform -// Some of the code in the package and all of the inspiration for this comes from . -// Their license is included here: -/* - Copyright The containerd Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - import ( "fmt" "path" diff --git a/vendor/github.com/regclient/regclient/types/platform/platform_other.go b/vendor/github.com/regclient/regclient/types/platform/platform_other.go index 1bb9b5d0b1..80ca311d9c 100644 --- a/vendor/github.com/regclient/regclient/types/platform/platform_other.go +++ b/vendor/github.com/regclient/regclient/types/platform/platform_other.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + //go:build !windows package platform diff --git a/vendor/github.com/regclient/regclient/types/platform/platform_windows.go b/vendor/github.com/regclient/regclient/types/platform/platform_windows.go index b2b491182a..a18a57ce86 100644 --- a/vendor/github.com/regclient/regclient/types/platform/platform_windows.go +++ b/vendor/github.com/regclient/regclient/types/platform/platform_windows.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + //go:build windows package platform diff --git a/vendor/github.com/regclient/regclient/types/ratelimit.go b/vendor/github.com/regclient/regclient/types/ratelimit.go index 3ecbd608fa..f68e102b1b 100644 --- a/vendor/github.com/regclient/regclient/types/ratelimit.go +++ b/vendor/github.com/regclient/regclient/types/ratelimit.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package types // RateLimit is returned from some http requests diff --git a/vendor/github.com/regclient/regclient/types/ref/ref.go b/vendor/github.com/regclient/regclient/types/ref/ref.go index 91f6f211b3..cd044e3131 100644 --- a/vendor/github.com/regclient/regclient/types/ref/ref.go +++ b/vendor/github.com/regclient/regclient/types/ref/ref.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Package ref is used to define references. // References default to remote registry references (registry:port/repo:tag). // Schemes can be included in front of the reference for different reference types. diff --git a/vendor/github.com/regclient/regclient/types/referrer/referrer.go b/vendor/github.com/regclient/regclient/types/referrer/referrer.go index ad9418e5f2..95acf8e933 100644 --- a/vendor/github.com/regclient/regclient/types/referrer/referrer.go +++ b/vendor/github.com/regclient/regclient/types/referrer/referrer.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Package referrer is used for responses to the referrers to a manifest package referrer @@ -100,8 +114,8 @@ func (rl *ReferrerList) Delete(m manifest.Manifest) error { // delete matching entries from the list mDesc := m.GetDescriptor() found := false - for i := len(rlM.Manifests) - 1; i >= 0; i-- { - if rlM.Manifests[i].Digest == mDesc.Digest { + for i, v := range slices.Backward(rlM.Manifests) { + if v.Digest == mDesc.Digest { rlM.Manifests = slices.Delete(rlM.Manifests, i, i+1) found = true } diff --git a/vendor/github.com/regclient/regclient/types/repo/repolist.go b/vendor/github.com/regclient/regclient/types/repo/repolist.go index 996d5eead4..77c23ed77e 100644 --- a/vendor/github.com/regclient/regclient/types/repo/repolist.go +++ b/vendor/github.com/regclient/regclient/types/repo/repolist.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Package repo handles a list of repositories from a registry package repo @@ -51,7 +65,7 @@ func New(opts ...Opts) (*RepoList, error) { host: conf.host, } - mt := strings.Split(conf.mt, ";")[0] // "application/json; charset=utf-8" -> "application/json" + mt, _, _ := strings.Cut(conf.mt, ";") // "application/json; charset=utf-8" -> "application/json" switch mt { case "application/json", "text/plain": err := json.Unmarshal(conf.raw, &rl) diff --git a/vendor/github.com/regclient/regclient/types/slog.go b/vendor/github.com/regclient/regclient/types/slog.go index 99a4f52065..30d83177a6 100644 --- a/vendor/github.com/regclient/regclient/types/slog.go +++ b/vendor/github.com/regclient/regclient/types/slog.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package types import "log/slog" diff --git a/vendor/github.com/regclient/regclient/types/tag/gcrlist.go b/vendor/github.com/regclient/regclient/types/tag/gcrlist.go index beec3bd939..b24bdc09fc 100644 --- a/vendor/github.com/regclient/regclient/types/tag/gcrlist.go +++ b/vendor/github.com/regclient/regclient/types/tag/gcrlist.go @@ -1,12 +1,12 @@ // Contents in this file are from github.com/google/go-containerregistry - // Copyright 2018 Google LLC All Rights Reserved. +// Copyright the regclient contributors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // -// http://www.apache.org/licenses/LICENSE-2.0 +// http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, diff --git a/vendor/github.com/regclient/regclient/types/tag/tag.go b/vendor/github.com/regclient/regclient/types/tag/tag.go index e76a985281..f0cbb42755 100644 --- a/vendor/github.com/regclient/regclient/types/tag/tag.go +++ b/vendor/github.com/regclient/regclient/types/tag/tag.go @@ -1,2 +1,16 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Package tag is used for wrapping tag lists package tag diff --git a/vendor/github.com/regclient/regclient/types/tag/taglist.go b/vendor/github.com/regclient/regclient/types/tag/taglist.go index 22363b2454..256e8bdda1 100644 --- a/vendor/github.com/regclient/regclient/types/tag/taglist.go +++ b/vendor/github.com/regclient/regclient/types/tag/taglist.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package tag import ( diff --git a/vendor/github.com/regclient/regclient/types/warning/warning.go b/vendor/github.com/regclient/regclient/types/warning/warning.go index eb0609f4fa..17a826b34c 100644 --- a/vendor/github.com/regclient/regclient/types/warning/warning.go +++ b/vendor/github.com/regclient/regclient/types/warning/warning.go @@ -1,3 +1,17 @@ +// Copyright the regclient contributors. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + // Package warning is used to handle HTTP warning headers package warning diff --git a/vendor/github.com/ulikunitz/xz/TODO.md b/vendor/github.com/ulikunitz/xz/TODO.md index 8f9650c13d..ad1ab306e9 100644 --- a/vendor/github.com/ulikunitz/xz/TODO.md +++ b/vendor/github.com/ulikunitz/xz/TODO.md @@ -74,7 +74,7 @@ * Update README.md * xb copyright . in xz directory to ensure all new files have Copyright header * `VERSION= go generate github.com/ulikunitz/xz/...` to update version files -* Execute test for Linux/amd64, Linux/x86 and Windows/amd64. +* Execute [test for Linux/amd64, Linux/x86 and Windows/amd64](.github/workflows/go-test-platforms.yml). * Update TODO.md - write short log entry * `git checkout master && git merge dev` * `git tag -a ` @@ -82,6 +82,11 @@ ## Log +## 2026-07-20 + +New release v0.5.16 to support other operating systems like Illumos using a +simple fallback function for IsTerminal to avoid adding a dependency. + ## 2025-08-28 Release v0.5.14 addresses the security vulnerability CVE-2025-58058. If you put diff --git a/vendor/modules.txt b/vendor/modules.txt index 84185b6eae..36a82dbc0b 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -202,7 +202,7 @@ github.com/inconshreveable/mousetrap # github.com/json-iterator/go v1.1.12 ## explicit; go 1.12 github.com/json-iterator/go -# github.com/klauspost/compress v1.19.1 +# github.com/klauspost/compress v1.19.2 ## explicit; go 1.24 github.com/klauspost/compress github.com/klauspost/compress/fse @@ -343,8 +343,8 @@ github.com/prometheus/common/model github.com/prometheus/procfs github.com/prometheus/procfs/internal/fs github.com/prometheus/procfs/internal/util -# github.com/regclient/regclient v0.11.5 -## explicit; go 1.25.0 +# github.com/regclient/regclient v0.11.6 +## explicit; go 1.26.0 github.com/regclient/regclient github.com/regclient/regclient/config github.com/regclient/regclient/internal/auth @@ -409,8 +409,8 @@ github.com/stretchr/testify/assert/yaml github.com/stretchr/testify/internal/difflib github.com/stretchr/testify/internal/spew github.com/stretchr/testify/require -# github.com/ulikunitz/xz v0.5.15 -## explicit; go 1.12 +# github.com/ulikunitz/xz v0.5.16 +## explicit; go 1.20 github.com/ulikunitz/xz github.com/ulikunitz/xz/internal/hash github.com/ulikunitz/xz/internal/xlog