Skip to content

Commit

Permalink
chore: add hash errata for tarball headers
Browse files Browse the repository at this point in the history
Add hash errata for tarball directory headers for installers.

Signed-off-by: Noel Georgi <[email protected]>
  • Loading branch information
frezbo committed Nov 28, 2024
1 parent 370c137 commit d679250
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 9 deletions.
7 changes: 4 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ require (
github.com/siderolabs/gen v0.7.0
github.com/siderolabs/go-debug v0.4.0
github.com/siderolabs/go-pointer v1.0.0
github.com/siderolabs/talos v1.9.0-alpha.2.0.20241120140534-c4c1a0d7c73d
github.com/siderolabs/talos/pkg/machinery v1.9.0-alpha.2.0.20241120140534-c4c1a0d7c73d
github.com/siderolabs/talos v1.9.0-alpha.3
github.com/siderolabs/talos/pkg/machinery v1.9.0-alpha.3
github.com/sigstore/cosign/v2 v2.4.0
github.com/sigstore/sigstore v1.8.8
github.com/slok/go-http-metrics v0.12.0
Expand Down Expand Up @@ -222,6 +222,7 @@ require (
github.com/pin/tftp/v3 v3.1.0 // indirect
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pkg/xattr v0.4.10 // indirect
github.com/planetscale/vtprotobuf v0.6.1-0.20240917153116-6f2963f01587 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
Expand All @@ -239,7 +240,7 @@ require (
github.com/siderolabs/crypto v0.5.0 // indirect
github.com/siderolabs/go-api-signature v0.3.6 // indirect
github.com/siderolabs/go-blockdevice v0.4.8 // indirect
github.com/siderolabs/go-blockdevice/v2 v2.0.5 // indirect
github.com/siderolabs/go-blockdevice/v2 v2.0.6 // indirect
github.com/siderolabs/go-circular v0.2.1 // indirect
github.com/siderolabs/go-cmd v0.1.3 // indirect
github.com/siderolabs/go-copy v0.1.0 // indirect
Expand Down
15 changes: 9 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,8 @@ github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjL
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/xattr v0.4.10 h1:Qe0mtiNFHQZ296vRgUjRCoPHPqH7VdTOrZx3g0T+pGA=
github.com/pkg/xattr v0.4.10/go.mod h1:di8WF84zAKk8jzR1UBTEWh9AUlIZZ7M/JNt8e9B6ktU=
github.com/planetscale/vtprotobuf v0.6.1-0.20240917153116-6f2963f01587 h1:xzZOeCMQLA/W198ZkdVdt4EKFKJtS26B773zNU377ZY=
github.com/planetscale/vtprotobuf v0.6.1-0.20240917153116-6f2963f01587/go.mod h1:t/avpk3KcrXxUnYOhZhMXJlSEyie6gQbtLq5NM3loB8=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
Expand Down Expand Up @@ -707,8 +709,8 @@ github.com/siderolabs/go-api-signature v0.3.6 h1:wDIsXbpl7Oa/FXvxB6uz4VL9INA9fmr
github.com/siderolabs/go-api-signature v0.3.6/go.mod h1:hoH13AfunHflxbXfh+NoploqV13ZTDfQ1mQJWNVSW9U=
github.com/siderolabs/go-blockdevice v0.4.8 h1:KfdWvIx0Jft5YVuCsFIJFwjWEF1oqtzkgX9PeU9cX4c=
github.com/siderolabs/go-blockdevice v0.4.8/go.mod h1:4PeOuk71pReJj1JQEXDE7kIIQJPVe8a+HZQa+qjxSEA=
github.com/siderolabs/go-blockdevice/v2 v2.0.5 h1:VLmIdDB/1P30Inrpe94FQAz4WUpByGwun5ZeTekxIQc=
github.com/siderolabs/go-blockdevice/v2 v2.0.5/go.mod h1:74htzCV913UzaLZ4H+NBXkwWlYnBJIq5m/379ZEcu8w=
github.com/siderolabs/go-blockdevice/v2 v2.0.6 h1:/NAy3MbNZhjLWo28asZyS/hmf86PEPDMc9i6wIcgbwI=
github.com/siderolabs/go-blockdevice/v2 v2.0.6/go.mod h1:74htzCV913UzaLZ4H+NBXkwWlYnBJIq5m/379ZEcu8w=
github.com/siderolabs/go-circular v0.2.1 h1:a++iVCn9jyhICX3POQZZX8n72p2h5JGdGU6w1ulmpcA=
github.com/siderolabs/go-circular v0.2.1/go.mod h1:ZDItzVyXK+B/XuqTBV5MtQtSv06VI+oCmWGRnNCATo8=
github.com/siderolabs/go-cmd v0.1.3 h1:JrgZwqhJQeoec3QRON0LK+fv+0y7d0DyY7zsfkO6ciw=
Expand All @@ -731,10 +733,10 @@ github.com/siderolabs/net v0.4.0 h1:1bOgVay/ijPkJz4qct98nHsiB/ysLQU0KLoBC4qLm7I=
github.com/siderolabs/net v0.4.0/go.mod h1:/ibG+Hm9HU27agp5r9Q3eZicEfjquzNzQNux5uEk0kM=
github.com/siderolabs/protoenc v0.2.1 h1:BqxEmeWQeMpNP3R6WrPqDatX8sM/r4t97OP8mFmg6GA=
github.com/siderolabs/protoenc v0.2.1/go.mod h1:StTHxjet1g11GpNAWiATgc8K0HMKiFSEVVFOa/H0otc=
github.com/siderolabs/talos v1.9.0-alpha.2.0.20241120140534-c4c1a0d7c73d h1:bFoHQvYthYBXF9sTe7mzszQiHsrAMk4fjQtcmJvfO8M=
github.com/siderolabs/talos v1.9.0-alpha.2.0.20241120140534-c4c1a0d7c73d/go.mod h1:34qMezrq7rcuVX/t32cokDkqgjEdBwYfzyggK1zBJq0=
github.com/siderolabs/talos/pkg/machinery v1.9.0-alpha.2.0.20241120140534-c4c1a0d7c73d h1:4xyldh9QbUYl4TQLkcd8YF8yLhu03EKTt3+jv2BXkKg=
github.com/siderolabs/talos/pkg/machinery v1.9.0-alpha.2.0.20241120140534-c4c1a0d7c73d/go.mod h1:qkzrBYvXkRA08ku/M51lKgJmIuieE9y7ORSzZMkkWcQ=
github.com/siderolabs/talos v1.9.0-alpha.3 h1:8Bod2XkarNNp/+sOC8a2Btbv0Z7ozLvATfpy2m7hm7I=
github.com/siderolabs/talos v1.9.0-alpha.3/go.mod h1:3xj1nrnwm3I7ZKBnILgf0K9h8UztqbxjJ7nKMDRgrH8=
github.com/siderolabs/talos/pkg/machinery v1.9.0-alpha.3 h1:KRvVtqUGaRcQ669N9Pf8fKAguYHMKVCsF4iA4Q4Lm/k=
github.com/siderolabs/talos/pkg/machinery v1.9.0-alpha.3/go.mod h1:3pZ8wRTnS2mKU3N5PLVOvcu0ktZ32WUDVUcC2FWOXAs=
github.com/sigstore/cosign/v2 v2.4.0 h1:2NdidNgClg+oXr/fDIr37E/BE6j00gqgUhSiBK2kjSQ=
github.com/sigstore/cosign/v2 v2.4.0/go.mod h1:j+fH1DCUkcn92qp6ezDj4JbGMri6eG1nLJC+hs64rvc=
github.com/sigstore/fulcio v1.5.1 h1:Iasy1zfNjaq8BV4S8o6pXspLDU28PQC2z07GmOu9zpM=
Expand Down Expand Up @@ -984,6 +986,7 @@ golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220408201424-a24fb2fb8a0f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
Expand Down
6 changes: 6 additions & 0 deletions internal/profile/hash.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ func Hash(p profile.Profile) (string, error) {
hasher.Write([]byte("vmware build fix #164"))
}

// 6. Installer tarball missing directory headers
// - https://github.com/siderolabs/talos/pull/9772
if p.Output.Kind == profile.OutKindInstaller {
hasher.Write([]byte("installer tarball fix #9772"))
}

return hex.EncodeToString(hasher.Sum(nil)), nil
}

Expand Down

0 comments on commit d679250

Please sign in to comment.