diff --git a/go.mod b/go.mod index 81070954..e8119df6 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/kairos-io/kairos-agent/v2 -go 1.23.1 +go 1.23.6 require ( github.com/Masterminds/semver/v3 v3.3.1 @@ -39,8 +39,7 @@ require ( require ( github.com/distribution/reference v0.6.0 github.com/gofrs/uuid v4.4.0+incompatible - github.com/google/go-github/v66 v66.0.0 - github.com/google/go-github/v69 v69.0.0 + github.com/google/go-github/v68 v68.0.0 github.com/twpayne/go-vfs/v5 v5.0.4 ) diff --git a/go.sum b/go.sum index 06930bf1..eb825b79 100644 --- a/go.sum +++ b/go.sum @@ -9,10 +9,9 @@ atomicgo.dev/schedule v0.1.0/go.mod h1:xeUa3oAkiuHYh8bKiQBRojqAMq3PXXbJujjb0hw8p cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= dario.cat/mergo v1.0.1 h1:Ra4+bf83h2ztPIQYNP99R6m+Y7KfnARDfID+a+vLl4s= dario.cat/mergo v1.0.1/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= -github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= -github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= +github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c h1:udKWzYgxTojEKWjV8V+WSxDXJ4NFATAsZjh8iIbsQIg= +github.com/Azure/go-ansiterm v0.0.0-20250102033503-faa5f7b0171c/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/MarvinJWendt/testza v0.1.0/go.mod h1:7AxNvlfeHP7Z/hDQ5JtE3OKYT3XFUeLCDE2DQninSqs= github.com/MarvinJWendt/testza v0.2.1/go.mod h1:God7bhG8n6uQxwdScay+gjm9/LnO4D3kkcZX4hv9Rp8= github.com/MarvinJWendt/testza v0.2.8/go.mod h1:nwIcjmr0Zz+Rcwfh3/4UhBp7ePKVhuBExvZqnKYWlII= @@ -90,8 +89,6 @@ github.com/containerd/cgroups/v3 v3.0.3/go.mod h1:8HBe7V3aWGLFPd/k03swSIsGjZhHI2 github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U= github.com/containerd/console v1.0.4 h1:F2g4+oChYvBTsASRTz8NP6iIAi97J3TtSAsLbIFn4ro= github.com/containerd/console v1.0.4/go.mod h1:YynlIjWYF8myEu6sdkwKIvGQq+cOckRm6So2avqoYAk= -github.com/containerd/containerd v1.7.23 h1:H2CClyUkmpKAGlhQp95g2WXHfLYc7whAuvZGBNYOOwQ= -github.com/containerd/containerd v1.7.23/go.mod h1:7QUzfURqZWCZV7RLNEn1XjUCQLEf0bkaK4GjUaZehxw= github.com/containerd/containerd v1.7.25 h1:khEQOAXOEJalRO228yzVsuASLH42vT7DIo9Ss+9SMFQ= github.com/containerd/containerd v1.7.25/go.mod h1:tWfHzVI0azhw4CT2vaIjsb2CoV4LJ9PrMPaULAr21Ok= github.com/containerd/continuity v0.4.4 h1:/fNVfTJ7wIl/YPMHjf+5H32uFhl63JucB34PlCpMKII= @@ -102,18 +99,11 @@ github.com/containerd/errdefs/pkg v0.3.0 h1:9IKJ06FvyNlexW690DXuQNx2KA2cUJXx151X github.com/containerd/errdefs/pkg v0.3.0/go.mod h1:NJw6s9HwNuRhnjJhM7pylWwMyAkmCQvQ4GpJHEqRLVk= github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= -github.com/containerd/stargz-snapshotter/estargz v0.14.3 h1:OqlDCK3ZVUO6C3B/5FSkDwbkEETK84kQgEeFwDC+62k= -github.com/containerd/stargz-snapshotter/estargz v0.14.3/go.mod h1:KY//uOCIkSuNAHhJogcZtrNHdKrA99/FCCRjE3HD36o= github.com/containerd/stargz-snapshotter/estargz v0.16.3 h1:7evrXtoh1mSbGj/pfRccTampEyKpjpOnS3CyiV1Ebr8= github.com/containerd/stargz-snapshotter/estargz v0.16.3/go.mod h1:uyr4BfYfOj3G9WBVE8cOlQmXAbPN9VEQpBBeJIuOipU= -github.com/containerd/typeurl/v2 v2.2.2 h1:3jN/k2ysKuPCsln5Qv8bzR9cxal8XjkxPogJfSNO31k= -github.com/containerd/typeurl/v2 v2.2.2/go.mod h1:95ljDnPfD3bAbDJRugOiShd/DlAAsxGtUBhJxIn7SCk= github.com/containerd/typeurl/v2 v2.2.3 h1:yNA/94zxWdvYACdYO8zofhrTVuQY73fFU1y++dYSw40= github.com/containerd/typeurl/v2 v2.2.3/go.mod h1:95ljDnPfD3bAbDJRugOiShd/DlAAsxGtUBhJxIn7SCk= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/cpuguy83/go-md2man/v2 v2.0.5 h1:ZtcqGrnekaHpVLArFSe4HK5DoKx1T0rq2DwVB0alcyc= -github.com/cpuguy83/go-md2man/v2 v2.0.5/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/cpuguy83/go-md2man/v2 v2.0.6 h1:XJtiaUW6dEEqVuZiMTn1ldk455QWwEIsMIJlo5vtkx0= github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= github.com/cyphar/filepath-securejoin v0.2.5 h1:6iR5tXJ/e6tJZzzdMc1km3Sa7RRIVBKAK32O2s7AYfo= @@ -136,26 +126,14 @@ github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5 github.com/djherbis/times v1.6.0 h1:w2ctJ92J8fBvWPxugmXIv7Nz7Q3iDMKNx9v5ocVH20c= github.com/djherbis/times v1.6.0/go.mod h1:gOHeRAz2h+VJNZ5Gmc/o7iD9k4wW7NMVqieYCY99oc0= github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= -github.com/docker/cli v27.1.1+incompatible h1:goaZxOqs4QKxznZjjBWKONQci/MywhtRv2oNn0GkeZE= -github.com/docker/cli v27.1.1+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/cli v27.5.0+incompatible h1:aMphQkcGtpHixwwhAXJT1rrK/detk2JIvDaFkLctbGM= github.com/docker/cli v27.5.0+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= -github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= -github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk= github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v27.3.1+incompatible h1:KttF0XoteNTicmUtBO0L2tP+J7FGRFTjaEF4k6WdhfI= -github.com/docker/docker v27.3.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker v27.5.0+incompatible h1:um++2NcQtGRTz5eEgO6aJimo6/JxrTXC941hd05JO6U= -github.com/docker/docker v27.5.0+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v27.5.1+incompatible h1:4PYU5dnBYqRQi0294d1FBECqT9ECWeQAIfE8q4YnPY8= github.com/docker/docker v27.5.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker-credential-helpers v0.7.0 h1:xtCHsjxogADNZcdv1pKUHXryefjlVRqWqIhk/uXJp0A= -github.com/docker/docker-credential-helpers v0.7.0/go.mod h1:rETQfLdHNT3foU5kuNkFR1R1V12OJRRO5lzt2D1b5X0= github.com/docker/docker-credential-helpers v0.8.2 h1:bX3YxiGzFP5sOXWc3bTPEXdEaZSeVMrFgOr3T+zrFAo= github.com/docker/docker-credential-helpers v0.8.2/go.mod h1:P3ci7E3lwkZg6XiHdRKft1KckHiO9a2rNtyFbZ/ry9M= -github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= -github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= @@ -179,8 +157,6 @@ github.com/erikgeiser/promptkit v0.9.0 h1:3qL1mS/ntCrXdb8sTP/ka82CJ9kEQaGuYXNrYJ github.com/erikgeiser/promptkit v0.9.0/go.mod h1:pU9dtogSe3Jlc2AY77EP7R4WFP/vgD4v+iImC83KsCo= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/foxboron/go-uefi v0.0.0-20241017190036-fab4fdf2f2f3 h1:K8ADp66ulnZ0NhjzwVwE4E3g6Id5KMWu86l0vURusA8= -github.com/foxboron/go-uefi v0.0.0-20241017190036-fab4fdf2f2f3/go.mod h1:ffg/fkDeOYicEQLoO2yFFGt00KUTYVXI+rfnc8il6vQ= github.com/foxboron/go-uefi v0.0.0-20241219185318-19dc140271bf h1:eKPYdh9Dq7P/Tc6GRt4HqqsVK8b2vt0IGP+xmZ8dMjo= github.com/foxboron/go-uefi v0.0.0-20241219185318-19dc140271bf/go.mod h1:q85c4IRlhhwdRJgGIUWrisDjU8dgcMj8dnXZCXo3hus= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= @@ -236,6 +212,8 @@ github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvq github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= +github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -246,14 +224,10 @@ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-containerregistry v0.20.2 h1:B1wPJ1SN/S7pB+ZAimcciVD+r+yV/l/DSArMxlbwseo= -github.com/google/go-containerregistry v0.20.2/go.mod h1:z38EKdKh4h7IP2gSfUUqEvalZBqs6AoLeWfUy34nQC8= github.com/google/go-containerregistry v0.20.3 h1:oNx7IdTI936V8CQRveCjaxOiegWwvM7kqkbXTpyiovI= github.com/google/go-containerregistry v0.20.3/go.mod h1:w00pIgBRDVUDFM6bq+Qx8lwNWK+cxgCuX1vd3PIBDNI= -github.com/google/go-github/v66 v66.0.0 h1:ADJsaXj9UotwdgK8/iFZtv7MLc8E8WBl62WLd/D/9+M= -github.com/google/go-github/v66 v66.0.0/go.mod h1:+4SO9Zkuyf8ytMj0csN1NR/5OTR+MfqPp8P8dVlcvY4= +github.com/google/go-github/v68 v68.0.0 h1:ZW57zeNZiXTdQ16qrDiZ0k6XucrxZ2CGmoTvcCyQG6s= github.com/google/go-github/v68 v68.0.0/go.mod h1:K9HAUBovM2sLwM408A18h+wd9vqdLOEqTUCbnRIcx68= -github.com/google/go-github/v69 v69.0.0/go.mod h1:xne4jymxLR6Uj9b7J7PyTpkMYstEMMwGZa0Aehh1azM= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/pprof v0.0.0-20241210010833-40e02aabc2ad h1:a6HEuzUHeKH6hwfN/ZoQgRgVIWFJljSWa/zetS2WTvg= @@ -283,8 +257,6 @@ github.com/huandu/xstrings v1.5.0 h1:2ag3IFq9ZDANvthTwTiqSSZLjDc+BedvHPAp5tJy2TI github.com/huandu/xstrings v1.5.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/iancoleman/orderedmap v0.3.0 h1:5cbR2grmZR/DiVt+VJopEhtVs9YGInGIxAoMJn+Ichc= github.com/iancoleman/orderedmap v0.3.0/go.mod h1:XuLcCUkdL5owUCQeF2Ue9uuw1EptkJDkXXS7VoV7XGE= -github.com/itchyny/gojq v0.12.16 h1:yLfgLxhIr/6sJNVmYfQjTIv0jGctu6/DgDoivmxTr7g= -github.com/itchyny/gojq v0.12.16/go.mod h1:6abHbdC2uB9ogMS38XsErnfqJ94UlngIJGlRAIj4jTM= github.com/itchyny/gojq v0.12.17 h1:8av8eGduDb5+rvEdaOO+zQUjA04MS0m3Ps8HiD+fceg= github.com/itchyny/gojq v0.12.17/go.mod h1:WBrEMkgAfAGO1LUcGOckBl5O726KPp+OlkKug0I/FEY= github.com/itchyny/timefmt-go v0.1.6 h1:ia3s54iciXDdzWzwaVKXZPbiXzxxnv1SPGFfM/myJ5Q= @@ -304,10 +276,6 @@ github.com/jzelinskie/whirlpool v0.0.0-20201016144138-0675e54bb004 h1:G+9t9cEtnC github.com/jzelinskie/whirlpool v0.0.0-20201016144138-0675e54bb004/go.mod h1:KmHnJWQrgEvbuy0vcvj00gtMqbvNn1L+3YUZLK/B92c= github.com/kairos-io/go-nodepair v0.3.0 h1:JIMBAtbNhIAsx89aP61mQDGMuGFoIQH/woK2tMDYD6k= github.com/kairos-io/go-nodepair v0.3.0/go.mod h1:7i905W/KmR9DAcMSVJr/Wdb84E5Yyu9YLgj7chwX1xs= -github.com/kairos-io/kairos-sdk v0.6.1 h1:DplbiHgWjg7W8zzeB5TQPFBthfF3UQxJlcLZqvQGagE= -github.com/kairos-io/kairos-sdk v0.6.1/go.mod h1:MT/0k20U1BcN8AzzQUexpfrQ8XCC6jIPDG9ZAmx+I2c= -github.com/kairos-io/kairos-sdk v0.7.2 h1:MVoo5WgtxVCk4HQPSWOt11lcvPLD8OOe+tbVPQuAAvk= -github.com/kairos-io/kairos-sdk v0.7.2/go.mod h1:fjDBpFXZVsooycJx4KmEFM6E3aSYfzQOTZCkHZuucX4= github.com/kairos-io/kairos-sdk v0.7.3 h1:OyDSEQVtc1MnRrP3M8d+wref0RA3eZof/FTL5ETOlXM= github.com/kairos-io/kairos-sdk v0.7.3/go.mod h1:ZSxP3VgOE2+f/3IdPNcGK7qcYLWl44zV+gq0m+9ovoo= github.com/kairos-io/kcrypt v0.12.2 h1:+lr8FGS0AW6D5dWSmaR3+AobL1TBTnOFgCSYctKY+5I= @@ -392,12 +360,6 @@ github.com/mudler/go-pluggable v0.0.0-20230126220627-7710299a0ae5 h1:FaZD86+A9mV github.com/mudler/go-pluggable v0.0.0-20230126220627-7710299a0ae5/go.mod h1:WmKcT8ONmhDQIqQ+HxU+tkGWjzBEyY/KFO8LTGCu4AI= github.com/mudler/go-processmanager v0.0.0-20240820160718-8b802d3ecf82 h1:FVT07EI8njvsD4tC2Hw8Xhactp5AWhsQWD4oTeQuSAU= github.com/mudler/go-processmanager v0.0.0-20240820160718-8b802d3ecf82/go.mod h1:Urp7LG5jylKoDq0663qeBh0pINGcRl35nXdKx82PSoU= -github.com/mudler/yip v1.13.0 h1:JN62ONxDpliGLH7tXFbk2rxiX+Y7G5jnLAj+LmGpPRw= -github.com/mudler/yip v1.13.0/go.mod h1:gwH7iGcr1Jimox2xKtN2AprEO00GzY7smvuycqCL7+Y= -github.com/mudler/yip v1.13.1 h1:kMzysvYxZybqf1ve53elrGdSaHgdJ3XtMq/ZauXdGTY= -github.com/mudler/yip v1.13.1/go.mod h1:KuSs3KUwC+j+9yZMSAZT1e07L+RRm5Pg0O4mA4KFlm8= -github.com/mudler/yip v1.14.0 h1:CB6lGAl/lU9e0FN1XMXEgIJ0GSMB9NMwQ0R+Ftxd1ww= -github.com/mudler/yip v1.14.0/go.mod h1:XIvNlX4cPMeiq2WK0H4Az0+Wk8K3rkkQbl26RsMHL94= github.com/mudler/yip v1.14.1 h1:wJ1caeVULkHgPGC0R5rHyl3jZi0T7SZuspfcIBxWwaE= github.com/mudler/yip v1.14.1/go.mod h1:XIvNlX4cPMeiq2WK0H4Az0+Wk8K3rkkQbl26RsMHL94= github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 h1:ZK8zHtRHOkbHy6Mmr5D264iyp3TiX5OmNcI5cIARiQI= @@ -471,15 +433,13 @@ github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJ github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= -github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= -github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= +github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII= +github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.33.0 h1:1cU2KZkvPxNyfgEmhHAz/1A9Bz+llsdYzklWFzgp0r8= github.com/rs/zerolog v1.33.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/saferwall/pe v1.5.4 h1:tLmMggEMUfeqrpJ25zS/okUQmyFdD5xWKL2+z9njCqg= -github.com/saferwall/pe v1.5.4/go.mod h1:mJx+PuptmNpoPFBNhWs/uDMFL/kTHVZIkg0d4OUJFbQ= github.com/saferwall/pe v1.5.6 h1:DrRLnoQFxHWJ5lJUmrH7X2L0xeUu6SUS95Dc61eW2Yc= github.com/saferwall/pe v1.5.6/go.mod h1:mJx+PuptmNpoPFBNhWs/uDMFL/kTHVZIkg0d4OUJFbQ= github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6keLGt6kNQ= @@ -488,10 +448,6 @@ github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6g github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= github.com/samber/lo v1.37.0 h1:XjVcB8g6tgUp8rsPsJ2CvhClfImrpL04YpQHXeHPhRw= github.com/samber/lo v1.37.0/go.mod h1:9vaz2O4o8oOnK23pd2TrXufcbdbJIa3b6cstBWKpopA= -github.com/sanity-io/litter v1.5.5 h1:iE+sBxPBzoK6uaEP5Lt3fHNgpKcHXc/A2HGETy0uJQo= -github.com/sanity-io/litter v1.5.5/go.mod h1:9gzJgR2i4ZpjZHsKvUXIRQVk7P+yM3e+jAF7bU2UI5U= -github.com/sanity-io/litter v1.5.6 h1:hCFycYzhRnW4niFbbmR7QKdmds69PbVa/sNmEN5euSU= -github.com/sanity-io/litter v1.5.6/go.mod h1:9gzJgR2i4ZpjZHsKvUXIRQVk7P+yM3e+jAF7bU2UI5U= github.com/sanity-io/litter v1.5.7 h1:Kqs2w+5MAq/ZvJpzvDmsz96emG3M+ENRsSFn5zVnzVY= github.com/sanity-io/litter v1.5.7/go.mod h1:9gzJgR2i4ZpjZHsKvUXIRQVk7P+yM3e+jAF7bU2UI5U= github.com/santhosh-tekuri/jsonschema/v5 v5.3.1 h1:lZUw3E0/J3roVtGQ+SCrUrg3ON6NgVqpn3+iol9aGu4= @@ -512,7 +468,6 @@ github.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnj github.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp81k= github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+DMd9qYNcwME= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/sirupsen/logrus v1.9.4-0.20241118143825-d1e633264448 h1:4T/wluVIsyQ0Kqamo3he0Q0FhZG7CBd5LJgb4KOmftM= github.com/sirupsen/logrus v1.9.4-0.20241118143825-d1e633264448/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/skeema/knownhosts v1.3.0 h1:AM+y0rI04VksttfwjkSTNQorvGqmwATnvnAHpSgc0LY= @@ -571,15 +526,12 @@ github.com/twpayne/go-vfs/v5 v5.0.4 h1:/ne3h+rW7f5YOyOFguz+3ztfUwzOLR0Vts3y0mMAi github.com/twpayne/go-vfs/v5 v5.0.4/go.mod h1:zTPFJUbgsEMFNSWnWQlLq9wh4AN83edZzx3VXbxrS1w= github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8= github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= -github.com/urfave/cli v1.22.12/go.mod h1:sSBEIC79qR6OvcmsD4U3KABeOTxDqQtdDnaFuUN30b8= github.com/urfave/cli/v2 v2.27.5 h1:WoHEJLdsXr6dDWoJgMq/CboDmyY/8HMMH1fTECbih+w= github.com/urfave/cli/v2 v2.27.5/go.mod h1:3Sevf16NykTbInEnD0yKkjDAeZDS0A6bzhBH5hrMvTQ= github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasttemplate v1.2.2 h1:lxLXG0uE3Qnshl9QyaK6XJxMXlQZELvChBOCmQD0Loo= github.com/valyala/fasttemplate v1.2.2/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= -github.com/vbatts/tar-split v0.11.3 h1:hLFqsOLQ1SsppQNTMpkpPXClLDfC2A3Zgy9OUU+RVck= -github.com/vbatts/tar-split v0.11.3/go.mod h1:9QlHN18E+fEH7RdG+QAJJcuya3rqT7eXSTY7wGrAokY= github.com/vbatts/tar-split v0.11.6 h1:4SjTW5+PU11n6fZenf2IPoV8/tz3AaYHMWjf23envGs= github.com/vbatts/tar-split v0.11.6/go.mod h1:dqKNtesIOr2j2Qv3W/cHjnvk9I8+G7oAkFDFN6TCBEI= github.com/vishvananda/netlink v1.3.0 h1:X7l42GfcV4S6E4vHTsw48qbrV+9PVojNfIhZcwQdrZk= @@ -606,8 +558,6 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -github.com/zcalusic/sysinfo v1.1.2 h1:38KUgZQmCxlN9vUTt4miis4rU5ISJXGXOJ2rY7bMC8g= -github.com/zcalusic/sysinfo v1.1.2/go.mod h1:NX+qYnWGtJVPV0yWldff9uppNKU4h40hJIRPf/pGLv4= github.com/zcalusic/sysinfo v1.1.3 h1:u/AVENkuoikKuIZ4sUEJ6iibpmQP6YpGD8SSMCrqAF0= github.com/zcalusic/sysinfo v1.1.3/go.mod h1:NX+qYnWGtJVPV0yWldff9uppNKU4h40hJIRPf/pGLv4= go.mozilla.org/pkcs7 v0.9.0 h1:yM4/HS9dYv7ri2biPtxt8ikvB37a980dg69/pKmS+eI= @@ -616,30 +566,22 @@ go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.56.0 h1:UP6IpuHFkUgOQL9FFQFrZ+5LiwhhYRbi7VZSIx6Nj5s= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.56.0/go.mod h1:qxuZLtbq5QDtdeSHsS7bcf6EH6uO6jUAgk764zd3rhM= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.58.0 h1:yd02MEjBdJkG3uabWP9apV+OuWRIXGDuJEUJbOHmCFU= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.58.0/go.mod h1:umTcuxiv1n/s/S6/c2AT/g2CQ7u5C59sHDNmfSwgz7Q= -go.opentelemetry.io/otel v1.31.0 h1:NsJcKPIW0D0H3NgzPDHmo0WW6SptzPdqg/L1zsIm2hY= -go.opentelemetry.io/otel v1.31.0/go.mod h1:O0C14Yl9FgkjqcCZAsE053C13OaddMYr/hz6clDkEJE= go.opentelemetry.io/otel v1.33.0 h1:/FerN9bax5LoK51X/sI0SVYrjSE0/yUL7DpxW4K3FWw= go.opentelemetry.io/otel v1.33.0/go.mod h1:SUUkR6csvUQl+yjReHu5uM3EtVV7MBm5FHKRlNx4I8I= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0 h1:Mne5On7VWdx7omSrSSZvM4Kw7cS7NQkOOmLcgscI51U= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0/go.mod h1:IPtUMKL4O3tH5y+iXVyAXqpAwMuzC1IrxVS81rummfE= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.31.0 h1:lUsI2TYsQw2r1IASwoROaCnjdj2cvC2+Jbxvk6nHnWU= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.31.0/go.mod h1:2HpZxxQurfGxJlJDblybejHB6RX6pmExPNe517hREw4= -go.opentelemetry.io/otel/metric v1.31.0 h1:FSErL0ATQAmYHUIzSezZibnyVlft1ybhy4ozRPcF2fE= -go.opentelemetry.io/otel/metric v1.31.0/go.mod h1:C3dEloVbLuYoX41KpmAhOqNriGbA+qqH6PQ5E5mUfnY= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.33.0 h1:Vh5HayB/0HHfOQA7Ctx69E/Y/DcQSMPpKANYVMQ7fBA= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.33.0/go.mod h1:cpgtDBaqD/6ok/UG0jT15/uKjAY8mRA53diogHBg3UI= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.33.0 h1:wpMfgF8E1rkrT1Z6meFh1NDtownE9Ii3n3X2GJYjsaU= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.33.0/go.mod h1:wAy0T/dUbs468uOlkT31xjvqQgEVXv58BRFWEgn5v/0= go.opentelemetry.io/otel/metric v1.33.0 h1:r+JOocAyeRVXD8lZpjdQjzMadVZp2M4WmQ+5WtEnklQ= go.opentelemetry.io/otel/metric v1.33.0/go.mod h1:L9+Fyctbp6HFTddIxClbQkjtubW6O9QS3Ann/M82u6M= -go.opentelemetry.io/otel/sdk v1.31.0 h1:xLY3abVHYZ5HSfOg3l2E5LUj2Cwva5Y7yGxnSW9H5Gk= -go.opentelemetry.io/otel/sdk v1.31.0/go.mod h1:TfRbMdhvxIIr/B2N2LQW2S5v9m3gOQ/08KsbbO5BPT0= -go.opentelemetry.io/otel/trace v1.31.0 h1:ffjsj1aRouKewfr85U2aGagJ46+MvodynlQ1HYdmJys= -go.opentelemetry.io/otel/trace v1.31.0/go.mod h1:TXZkRk7SM2ZQLtR6eoAWQFIHPvzQ06FJAsO1tJg480A= +go.opentelemetry.io/otel/sdk v1.33.0 h1:iax7M131HuAm9QkZotNHEfstof92xM+N8sr3uHXc2IM= +go.opentelemetry.io/otel/sdk v1.33.0/go.mod h1:A1Q5oi7/9XaMlIWzPSxLRWOI8nG3FnzHJNbiENQuihM= go.opentelemetry.io/otel/trace v1.33.0 h1:cCJuF7LRjUFso9LPnEAHJDB2pqzp+hbO8eu1qqW2d/s= go.opentelemetry.io/otel/trace v1.33.0/go.mod h1:uIcdVUZMpTAmz0tI1z04GoVSezK37CbGV4fr1f2nBck= -go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= -go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM= +go.opentelemetry.io/proto/otlp v1.4.0 h1:TA9WRvW6zMwP+Ssb6fLoUIuirti1gGbP28GcKG1jgeg= +go.opentelemetry.io/proto/otlp v1.4.0/go.mod h1:PPBWZIP98o2ElSqI35IHfu7hIhSwvc5N38Jw8pXuGFY= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= @@ -648,8 +590,6 @@ golang.org/x/crypto v0.0.0-20200420201142-3c4aac89819a/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.32.0 h1:euUpcYgM8WcP71gNpTqQCn6rC2t6ULUPiOzfWaXVVfc= -golang.org/x/crypto v0.32.0/go.mod h1:ZnnJkOaASj8g0AjIduWNlq2NRxL0PlBrbKVyZ6V/Ugc= golang.org/x/crypto v0.33.0 h1:IOBPskki6Lysi0lo9qQvbxiQ+FvsCC/YWOecCHAixus= golang.org/x/crypto v0.33.0/go.mod h1:bVdXmD7IV/4GdElGPozy6U7lWdRXA4qyRVGJV57uQ5M= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -683,13 +623,9 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.34.0 h1:Mb7Mrk043xzHgnRM88suvJFwzVrRfHEHJEl5/71CKw0= -golang.org/x/net v0.34.0/go.mod h1:di0qlW3YNM5oh6GqDGQr92MyTozJPmybPK4Ev/Gm31k= golang.org/x/net v0.35.0 h1:T5GQRQb2y08kTAByq9L4/bz8cipCdA8FbRTXewonqY8= golang.org/x/net v0.35.0/go.mod h1:EglIi67kWsHKlRzzVMUD93VMSWGFOMSZgxFjparz1Qk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.25.0 h1:CY4y7XT9v0cRI9oupztF8AgiIu99L/ksR/Xp/6jrZ70= -golang.org/x/oauth2 v0.25.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/oauth2 v0.26.0 h1:afQXWNNaeC4nvZ0Ed9XvCCzXM6UHJG7iCg0W4fPqSBE= golang.org/x/oauth2 v0.26.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -699,8 +635,6 @@ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= -golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sync v0.11.0 h1:GGz8+XQP4FvTTrjZPzNKTMFtSXH80RAzG+5ghFPgK9w= golang.org/x/sync v0.11.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -732,7 +666,6 @@ golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220906165534-d0df966e6959/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -742,8 +675,6 @@ golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU= -golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc= golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -751,8 +682,6 @@ golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9sn golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.28.0 h1:/Ts8HFuMR2E6IP/jlo7QVLZHggjKQbhu/7H0LJFr3Gg= -golang.org/x/term v0.28.0/go.mod h1:Sw/lC2IAUZ92udQNf3WodGtn4k/XoLyZoh8v/8uiwek= golang.org/x/term v0.29.0 h1:L6pJp37ocefwRRtYPKSWOWzOtWSxVajvz2ldH/xi3iU= golang.org/x/term v0.29.0/go.mod h1:6bl4lRlvVuDgSf3179VpIxBF0o10JUpXWOnI7nErv7s= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -762,8 +691,6 @@ golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= -golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM= golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= golang.org/x/time v0.8.0 h1:9i3RxcPv3PZnitoVGMPDKZSq1xW1gK1Xy3ArNOGZfEg= @@ -778,8 +705,6 @@ golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.28.0 h1:WuB6qZ4RPCQo5aP3WdKZS7i595EdWqWR8vqJTlwTVK8= -golang.org/x/tools v0.28.0/go.mod h1:dcIOrVd3mfQKTgrDVQHqCPMWy6lnhfhtX3hLXYVLfRw= golang.org/x/tools v0.29.0 h1:Xx0h3TtM9rzQpQuR4dKLrdglAmCEN5Oi+P74JdhdzXE= golang.org/x/tools v0.29.0/go.mod h1:KMQVMRsVxU6nHCFXrBPhDB8XncLNLM0lIy/F14RP588= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -794,10 +719,8 @@ google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoA google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20240213162025-012b6fc9bca9 h1:9+tzLLstTlPTRyJTh+ah5wIMsBW5c4tQwGTN3thOW9Y= -google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 h1:wKguEg1hsxI2/L3hUYrpo1RVi48K+uTyzKqprwLXsb8= -google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142/go.mod h1:d6be+8HhtEtucleCbxpPW9PA9XwISACu8nvpPqF0BVo= -google.golang.org/genproto/googleapis/rpc v0.0.0-20241021214115-324edc3d5d38 h1:zciRKQ4kBpFgpfC5QQCVtnnNAcLIqweL7plyZRQHVpI= -google.golang.org/genproto/googleapis/rpc v0.0.0-20241021214115-324edc3d5d38/go.mod h1:GX3210XPVPUjJbTUbvwI8f2IpZDMZuPJWDzDuebbviI= +google.golang.org/genproto/googleapis/api v0.0.0-20241209162323-e6fa225c2576 h1:CkkIfIt50+lT6NHAVoRYEyAvQGFM7xEwXUUywFvEb3Q= +google.golang.org/genproto/googleapis/api v0.0.0-20241209162323-e6fa225c2576/go.mod h1:1R3kvZ1dtP3+4p4d3G8uJ8rFk/fWlScl38vanWACI08= google.golang.org/genproto/googleapis/rpc v0.0.0-20241209162323-e6fa225c2576 h1:8ZmaLZE4XWrtU3MyClkYqqtl6Oegr3235h7jxsDyqCY= google.golang.org/genproto/googleapis/rpc v0.0.0-20241209162323-e6fa225c2576/go.mod h1:5uTbfoYQed2U9p3KIj2/Zzm02PYhndfdmML0qC3q3FU= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= @@ -805,8 +728,6 @@ google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyac google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E= -google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= google.golang.org/grpc v1.68.1 h1:oI5oTa11+ng8r8XMMN7jAOmWfPZWbYpCFaMUTACxkM0= google.golang.org/grpc v1.68.1/go.mod h1:+q1XYFJjShcqn0QZHvCyeR4CXPA+llXIeUIfIe00waw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= @@ -818,8 +739,6 @@ google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= -google.golang.org/protobuf v1.36.1 h1:yBPeRvTftaleIgM3PZ/WBIZ7XM/eEYAaEyCwvyjq/gk= -google.golang.org/protobuf v1.36.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= google.golang.org/protobuf v1.36.3 h1:82DV7MYdb8anAVi3qge1wSnMDrnKK7ebr+I0hHRN1BU= google.golang.org/protobuf v1.36.3/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -851,8 +770,6 @@ howett.net/plist v1.0.0 h1:7CrbWYbPPO/PyNy38b2EB/+gYbjCe2DXBxgtOOZbSQM= howett.net/plist v1.0.0/go.mod h1:lqaXoTrLY4hg8tnEzNru53gicrbv7rrk+2xJA/7hw9g= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= -k8s.io/mount-utils v0.32.0 h1:KOQAhPzJICATXnc6XCkWoexKbkOexRnMCUW8APFfwg4= -k8s.io/mount-utils v0.32.0/go.mod h1:Kun5c2svjAPx0nnvJKYQWhfeNW+O0EpzHgRhDcYoSY0= k8s.io/mount-utils v0.32.1 h1:RJOD6xXzEJT/OOJoG1KstfVa8ZXJJPlHb+t2MoulPHM= k8s.io/mount-utils v0.32.1/go.mod h1:Kun5c2svjAPx0nnvJKYQWhfeNW+O0EpzHgRhDcYoSY0= k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 h1:M3sRQVHv7vB20Xc2ybTt7ODCeFj6JSWYFzOFnYeS6Ro= diff --git a/internal/agent/agent.go b/internal/agent/agent.go index a8875b83..2895f25b 100644 --- a/internal/agent/agent.go +++ b/internal/agent/agent.go @@ -6,7 +6,7 @@ import ( hook "github.com/kairos-io/kairos-agent/v2/internal/agent/hooks" "github.com/kairos-io/kairos-agent/v2/internal/bus" - config "github.com/kairos-io/kairos-agent/v2/pkg/config" + "github.com/kairos-io/kairos-agent/v2/pkg/config" v1 "github.com/kairos-io/kairos-agent/v2/pkg/types/v1" events "github.com/kairos-io/kairos-sdk/bus" "github.com/kairos-io/kairos-sdk/collector" diff --git a/internal/agent/agent_test.go b/internal/agent/agent_test.go index 9451f04d..e8407ce4 100644 --- a/internal/agent/agent_test.go +++ b/internal/agent/agent_test.go @@ -2,7 +2,6 @@ package agent_test import ( "fmt" - "io/ioutil" "os" "path/filepath" @@ -23,7 +22,7 @@ echo "{}" var _ = Describe("Bootstrap provider", func() { Context("Config", func() { It("gets entire content", func() { - f, err := ioutil.TempDir("", "tests") + f, err := os.MkdirTemp("", "tests") Expect(err).ToNot(HaveOccurred()) defer os.RemoveAll(f) diff --git a/internal/agent/hooks/bundles.go b/internal/agent/hooks/bundles.go index e56693de..bca50a7d 100644 --- a/internal/agent/hooks/bundles.go +++ b/internal/agent/hooks/bundles.go @@ -5,7 +5,7 @@ import ( "os/exec" "syscall" - config "github.com/kairos-io/kairos-agent/v2/pkg/config" + "github.com/kairos-io/kairos-agent/v2/pkg/config" v1 "github.com/kairos-io/kairos-agent/v2/pkg/types/v1" "github.com/kairos-io/kairos-sdk/bundles" "github.com/kairos-io/kairos-sdk/machine" diff --git a/internal/agent/hooks/gruboptions.go b/internal/agent/hooks/gruboptions.go index 21b07ce9..b8e3de6f 100644 --- a/internal/agent/hooks/gruboptions.go +++ b/internal/agent/hooks/gruboptions.go @@ -4,7 +4,7 @@ import ( v1 "github.com/kairos-io/kairos-agent/v2/pkg/types/v1" "strings" - config "github.com/kairos-io/kairos-agent/v2/pkg/config" + "github.com/kairos-io/kairos-agent/v2/pkg/config" "github.com/kairos-io/kairos-sdk/system" ) diff --git a/internal/agent/hooks/hook.go b/internal/agent/hooks/hook.go index 4b96b3fe..ba0700bb 100644 --- a/internal/agent/hooks/hook.go +++ b/internal/agent/hooks/hook.go @@ -1,7 +1,7 @@ package hook import ( - config "github.com/kairos-io/kairos-agent/v2/pkg/config" + "github.com/kairos-io/kairos-agent/v2/pkg/config" v1 "github.com/kairos-io/kairos-agent/v2/pkg/types/v1" ) diff --git a/internal/agent/hooks/kcrypt_uki.go b/internal/agent/hooks/kcrypt_uki.go index 6cfe7534..2186f76b 100644 --- a/internal/agent/hooks/kcrypt_uki.go +++ b/internal/agent/hooks/kcrypt_uki.go @@ -23,7 +23,7 @@ type KcryptUKI struct{} func (k KcryptUKI) Run(c config.Config, spec v1.Spec) error { // pre-check for systemd version, we need something higher or equal to 252 run, err := utils.SH("systemctl --version | head -1 | awk '{ print $2}'") - systemdVersion := strings.TrimSpace(string(run)) + systemdVersion := strings.TrimSpace(run) if err != nil { c.Logger.Errorf("could not get systemd version: %s", err) c.Logger.Errorf("could not get systemd version: %s", run) diff --git a/internal/agent/hooks/mounts.go b/internal/agent/hooks/mounts.go index a86a6e68..ec0f0e10 100644 --- a/internal/agent/hooks/mounts.go +++ b/internal/agent/hooks/mounts.go @@ -7,7 +7,7 @@ import ( "path/filepath" "strings" - config "github.com/kairos-io/kairos-agent/v2/pkg/config" + "github.com/kairos-io/kairos-agent/v2/pkg/config" "github.com/kairos-io/kairos-sdk/machine" "github.com/mudler/yip/pkg/schema" yip "github.com/mudler/yip/pkg/schema" @@ -24,7 +24,7 @@ func saveCloudConfig(name config.Stage, yc yip.YipConfig) error { return os.WriteFile(filepath.Join("/oem", fmt.Sprintf("10_%s.yaml", name)), yipYAML, 0400) } -// Read the keys sections ephemeral_mounts and bind mounts from install key in the cloud config. +// Run Reads the keys sections ephemeral_mounts and bind mounts from install key in the cloud config. // If not empty write an environment file to /run/cos/custom-layout.env. // That env file is in turn read by /overlay/files/system/oem/11_persistency.yaml in fs.after stage. func (cm CustomMounts) Run(c config.Config, _ v1.Spec) error { @@ -48,15 +48,21 @@ func (cm CustomMounts) Run(c config.Config, _ v1.Spec) error { mountsList["CUSTOM_BIND_MOUNTS"] = strings.Join(c.Install.BindMounts, " ") mountsList["CUSTOM_EPHEMERAL_MOUNTS"] = strings.Join(c.Install.EphemeralMounts, " ") - config := yip.YipConfig{Stages: map[string][]schema.Stage{ - "rootfs": []yip.Stage{{ - Name: "user_custom_mounts", - EnvironmentFile: "/run/cos/custom-layout.env", - Environment: mountsList, - }}, + cfg := yip.YipConfig{Stages: map[string][]schema.Stage{ + "rootfs": { + { + Name: "user_custom_mounts", + EnvironmentFile: "/run/cos/custom-layout.env", + Environment: mountsList, + }, + }, }} - saveCloudConfig("user_custom_mounts", config) //nolint:errcheck + err := saveCloudConfig("user_custom_mounts", cfg) + if err != nil { + c.Logger.Logger.Error().Err(err).Msg("Failed to save cloud config") + return err + } c.Logger.Logger.Debug().Msg("Finish CustomMounts hook") return nil } diff --git a/internal/agent/iconunix.go b/internal/agent/iconunix.go index c6bb9765..f35b1f1d 100644 --- a/internal/agent/iconunix.go +++ b/internal/agent/iconunix.go @@ -1,5 +1,4 @@ //go:build linux || darwin -// +build linux darwin // File generated by 2goarray v0.1.0 (http://github.com/cratonica/2goarray) diff --git a/internal/agent/interactive_install.go b/internal/agent/interactive_install.go index 9cdb9f29..a401025a 100644 --- a/internal/agent/interactive_install.go +++ b/internal/agent/interactive_install.go @@ -3,6 +3,7 @@ package agent import ( "encoding/json" "fmt" + "github.com/kairos-io/kairos-agent/v2/pkg/constants" "os" "path/filepath" "strings" @@ -47,14 +48,6 @@ func isYes(s string) bool { return false } -const ( - _ = 1 << (10 * iota) - KiB - MiB - GiB - TiB -) - func promptBool(p events.YAMLPrompt) (string, error) { def := "n" if p.Default != "" { @@ -125,7 +118,7 @@ func InteractiveInstall(debug, spawnShell bool, sourceImgURL string) error { cmd.PrintText(agentConfig.Branding.InteractiveInstall, "Installation") - disks := []string{} + var disks []string maxSize := float64(0) preferedDevice := "/dev/sda" @@ -134,12 +127,12 @@ func InteractiveInstall(debug, spawnShell bool, sourceImgURL string) error { if strings.HasPrefix(disk.Name, "loop") || strings.HasPrefix(disk.Name, "ram") || strings.HasPrefix(disk.Name, "sr") || strings.HasPrefix(disk.Name, "zram") { continue } - size := float64(disk.SizeBytes) / float64(GiB) + size := float64(disk.SizeBytes) / float64(constants.GiB) if size > maxSize { maxSize = size preferedDevice = "/dev/" + disk.Name } - disks = append(disks, fmt.Sprintf("/dev/%s: (%.2f GiB) ", disk.Name, float64(disk.SizeBytes)/float64(GiB))) + disks = append(disks, fmt.Sprintf("/dev/%s: (%.2f GiB) ", disk.Name, float64(disk.SizeBytes)/float64(constants.GiB))) } pterm.Info.Println("Available Disks:") @@ -194,7 +187,7 @@ func InteractiveInstall(debug, spawnShell bool, sourceImgURL string) error { } // Prompt the user by prompts defined by the provider - r := []events.YAMLPrompt{} + var r []events.YAMLPrompt bus.Manager.Response(events.EventInteractiveInstall, func(p *pluggable.Plugin, resp *pluggable.EventResponse) { err := json.Unmarshal([]byte(resp.Data), &r) diff --git a/internal/agent/notify.go b/internal/agent/notify.go index dfe3a221..9c36a011 100644 --- a/internal/agent/notify.go +++ b/internal/agent/notify.go @@ -3,10 +3,10 @@ package agent import ( "fmt" - events "github.com/kairos-io/kairos-sdk/bus" - "github.com/kairos-io/kairos-sdk/collector" "github.com/kairos-io/kairos-agent/v2/internal/bus" "github.com/kairos-io/kairos-agent/v2/pkg/config" + events "github.com/kairos-io/kairos-sdk/bus" + "github.com/kairos-io/kairos-sdk/collector" "github.com/mudler/go-pluggable" ) diff --git a/internal/agent/reset.go b/internal/agent/reset.go index 70cf6776..8e1de513 100644 --- a/internal/agent/reset.go +++ b/internal/agent/reset.go @@ -172,7 +172,9 @@ func sharedReset(reboot, unattended, resetOem bool, dir ...string) (c *config.Co d, err := json.Marshal(r) if err != nil { - c.Logger.Errorf("failed to marshal reset cmdline flags/event options: %s", err) + if &c != nil { + c.Logger.Errorf("failed to marshal reset cmdline flags/event options: %s", err) + } return c, err } cliConf := string(d) diff --git a/internal/agent/upgrade.go b/internal/agent/upgrade.go index 6b679241..2927df8e 100644 --- a/internal/agent/upgrade.go +++ b/internal/agent/upgrade.go @@ -7,15 +7,12 @@ import ( "strings" hook "github.com/kairos-io/kairos-agent/v2/internal/agent/hooks" - "github.com/mudler/go-pluggable" - "github.com/kairos-io/kairos-agent/v2/internal/bus" "github.com/kairos-io/kairos-agent/v2/pkg/action" - config "github.com/kairos-io/kairos-agent/v2/pkg/config" + "github.com/kairos-io/kairos-agent/v2/pkg/config" "github.com/kairos-io/kairos-agent/v2/pkg/uki" internalutils "github.com/kairos-io/kairos-agent/v2/pkg/utils" k8sutils "github.com/kairos-io/kairos-agent/v2/pkg/utils/k8s" - events "github.com/kairos-io/kairos-sdk/bus" "github.com/kairos-io/kairos-sdk/collector" "github.com/kairos-io/kairos-sdk/utils" "github.com/kairos-io/kairos-sdk/versioneer" @@ -65,9 +62,10 @@ func ListNewerReleases(includePrereleases bool) ([]string, error) { return tagList.FullImages() } +// Upgrade upgrades the system to the specified image and will call the underlying upgrade function // TODO: Check where force and preReleases is being used? They dont seem to be used anywhere? func Upgrade( - source string, force, strictValidations bool, dirs []string, upgradeEntry string, preReleases bool) error { + source string, _, strictValidations bool, dirs []string, upgradeEntry string, _ bool) error { bus.Manager.Initialize() fixedDirs := make([]string, len(dirs)) @@ -226,26 +224,6 @@ func generateUpgradeConfForCLIArgs(source, upgradeEntry string) (string, error) return string(d), err } -func getReleasesFromProvider(includePrereleases bool) ([]string, error) { - var result []string - bus.Manager.Response(events.EventAvailableReleases, func(p *pluggable.Plugin, r *pluggable.EventResponse) { - if r.Data == "" { - return - } - if err := json.Unmarshal([]byte(r.Data), &result); err != nil { - fmt.Printf("warn: failed unmarshalling data: '%s'\n", err.Error()) - } - }) - - configYAML := "IncludePreReleases: true" - _, err := bus.Manager.Publish(events.EventAvailableReleases, events.EventPayload{Config: configYAML}) - if err != nil { - return result, fmt.Errorf("failed publishing event: %w", err) - } - - return result, nil -} - // ExtraConfigUpgrade is the struct that holds the upgrade options that come from flags and events type ExtraConfigUpgrade struct { Upgrade struct { diff --git a/internal/webui/webui.go b/internal/webui/webui.go index b8f0473f..742fb804 100644 --- a/internal/webui/webui.go +++ b/internal/webui/webui.go @@ -3,6 +3,7 @@ package webui import ( "context" "embed" + "errors" "io" "io/fs" "log" @@ -12,9 +13,9 @@ import ( "text/template" "time" - "github.com/kairos-io/kairos-sdk/schema" "github.com/kairos-io/kairos-agent/v2/internal/agent" "github.com/kairos-io/kairos-agent/v2/pkg/config" + "github.com/kairos-io/kairos-sdk/schema" "github.com/labstack/echo/v4" process "github.com/mudler/go-processmanager" "github.com/nxadm/tail" @@ -239,7 +240,7 @@ func Start(ctx context.Context) error { ec.GET("/ws", streamProcess(&s)) - if err := ec.Start(listen); err != nil && err != http.ErrServerClosed { + if err := ec.Start(listen); err != nil && !errors.Is(err, http.ErrServerClosed) { return err } diff --git a/main.go b/main.go index 7f828ce3..19f5fe55 100644 --- a/main.go +++ b/main.go @@ -32,24 +32,8 @@ import ( "github.com/sanity-io/litter" "github.com/spf13/viper" "github.com/urfave/cli/v2" - "gopkg.in/yaml.v3" ) -// ReleasesToOutput gets a semver.Collection and outputs it in the given format -// Only used here. -func ReleasesToOutput(rels []string, output string) []string { - switch strings.ToLower(output) { - case "yaml": - d, _ := yaml.Marshal(rels) - return []string{string(d)} - case "json": - d, _ := json.Marshal(rels) - return []string{string(d)} - default: - return rels - } -} - var sourceFlag = cli.StringFlag{ Name: "source", Usage: "Source for upgrade. Composed of `type:address`. Accepts `file:`,`dir:` or `oci:` for the type of source.\nFor example `file:/var/share/myimage.tar`, `dir:/tmp/extracted` or `oci:repo/image:tag`", diff --git a/pkg/action/common.go b/pkg/action/common.go index f4d95e5a..da8a27c5 100644 --- a/pkg/action/common.go +++ b/pkg/action/common.go @@ -17,7 +17,7 @@ limitations under the License. package action import ( - config "github.com/kairos-io/kairos-agent/v2/pkg/config" + "github.com/kairos-io/kairos-agent/v2/pkg/config" cnst "github.com/kairos-io/kairos-agent/v2/pkg/constants" "github.com/kairos-io/kairos-agent/v2/pkg/utils" fsutils "github.com/kairos-io/kairos-agent/v2/pkg/utils/fs" diff --git a/pkg/action/reset.go b/pkg/action/reset.go index 08d784ef..aed358b3 100644 --- a/pkg/action/reset.go +++ b/pkg/action/reset.go @@ -107,7 +107,7 @@ func (r *ResetAction) updateInstallState(e *elemental.Elemental, cleanup *utils. ) } -// ResetRun will reset the cos system to by following several steps +// Run will reset the cos system to by following several steps func (r ResetAction) Run() (err error) { e := elemental.NewElemental(r.cfg) cleanup := utils.NewCleanStack() diff --git a/pkg/action/reset_test.go b/pkg/action/reset_test.go index 9ac0f977..3045b593 100644 --- a/pkg/action/reset_test.go +++ b/pkg/action/reset_test.go @@ -134,7 +134,7 @@ var _ = Describe("Reset action tests", func() { bootedFrom = constants.SystemLabel runner.SideEffect = func(cmd string, args ...string) ([]byte, error) { if cmd == cmdFail { - return []byte{}, errors.New("Command failed") + return []byte{}, errors.New("command failed") } switch cmd { case "cat": diff --git a/pkg/cloudinit/cloudinit.go b/pkg/cloudinit/cloudinit.go index ea39732d..a4690012 100644 --- a/pkg/cloudinit/cloudinit.go +++ b/pkg/cloudinit/cloudinit.go @@ -77,7 +77,7 @@ func (ci *YipCloudInitRunner) SetModifier(m schema.Modifier) { ci.exec.Modifier(m) } -// Useful for testing purposes +// SetFs sets the underlaying fs, useful for testing purposes func (ci *YipCloudInitRunner) SetFs(fs vfs.FS) { ci.fs = fs } diff --git a/pkg/cloudinit/cloudinit_test.go b/pkg/cloudinit/cloudinit_test.go index 2764d6ea..35541708 100644 --- a/pkg/cloudinit/cloudinit_test.go +++ b/pkg/cloudinit/cloudinit_test.go @@ -20,7 +20,7 @@ import ( "bytes" "errors" "fmt" - "io/ioutil" + "io" "log" "os" @@ -89,7 +89,7 @@ stages: file, err := os.Open(temp + "/tmp/test/bar") Expect(err).ShouldNot(HaveOccurred()) - b, err := ioutil.ReadAll(file) + b, err := io.ReadAll(file) if err != nil { log.Fatal(err) } diff --git a/pkg/config/config.go b/pkg/config/config.go index 11c96d89..da4c7a5a 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -2,13 +2,10 @@ package config import ( "fmt" - "os" + "github.com/kairos-io/kairos-sdk/state" "path/filepath" "runtime" "strings" - "unicode" - - "github.com/kairos-io/kairos-sdk/state" "github.com/joho/godotenv" version "github.com/kairos-io/kairos-agent/v2/internal/common" @@ -30,7 +27,6 @@ import ( const ( DefaultWebUIListenAddress = ":8080" - FilePrefix = "file://" ) type Install struct { @@ -339,20 +335,6 @@ type Bundle struct { Targets []string `yaml:"targets,omitempty"` } -const DefaultHeader = "#cloud-config" - -func HasHeader(userdata, head string) (bool, string) { - header := strings.SplitN(userdata, "\n", 2)[0] - - // Trim trailing whitespaces - header = strings.TrimRightFunc(header, unicode.IsSpace) - - if head != "" { - return head == header, header - } - return (header == DefaultHeader) || (header == "#kairos-config") || (header == "#node-config"), header -} - func (b Bundles) Options() (res [][]bundles.BundleOption) { for _, bundle := range b { for _, t := range bundle.Targets { @@ -442,7 +424,7 @@ func scan(result *Config, opts ...collector.Option) (c *Config, err error) { } } - if !kc.IsValid() { + if kc != nil && !kc.IsValid() { if !o.NoLogs && !o.StrictValidation { fmt.Printf("WARNING: %s\n", kc.ValidationError.Error()) } @@ -515,20 +497,8 @@ func (n Stage) String() string { return string(n) } -func SaveCloudConfig(name Stage, yc yip.YipConfig) error { - dnsYAML, err := yaml.Marshal(yc) - if err != nil { - return err - } - return os.WriteFile(filepath.Join("usr", "local", "cloud-config", fmt.Sprintf("100_%s.yaml", name)), dnsYAML, 0700) -} - -func FromString(s string, o interface{}) error { - return yaml.Unmarshal([]byte(s), o) -} - func MergeYAML(objs ...interface{}) ([]byte, error) { - content := [][]byte{} + var content [][]byte for _, o := range objs { dat, err := yaml.Marshal(o) if err != nil { diff --git a/pkg/config/spec.go b/pkg/config/spec.go index c8a97704..8db09fe2 100644 --- a/pkg/config/spec.go +++ b/pkg/config/spec.go @@ -40,14 +40,6 @@ import ( "golang.org/x/sys/unix" ) -const ( - _ = 1 << (10 * iota) - KiB - MiB - GiB - TiB -) - // resolveTarget will try to resovle a /dev/disk/by-X disk into the final real disk under /dev/X // We use it to calculate the device on the fly for the Config and the InstallSpec but we leave // the original value in teh config.Collector so its written down in the final cloud config in the @@ -399,7 +391,7 @@ func NewUpgradeSpec(cfg *Config) (*v1.UpgradeSpec, error) { } if spec.Active.Source.IsDocker() { - cfg.Logger.Infof("Checking if OCI image %s exists", spec.Active.Source.Value()) + cfg.Logger.Infof("Checking if OCI image %s exists", spec.Active.Source.Value()) _, err := crane.Manifest(spec.Active.Source.Value()) if err != nil { if strings.Contains(err.Error(), "MANIFEST_UNKNOWN") { @@ -1081,7 +1073,7 @@ func detectLargestDevice() string { maxSize := float64(0) for _, disk := range ghw.GetDisks(ghw.NewPaths(""), nil) { - size := float64(disk.SizeBytes) / float64(GiB) + size := float64(disk.SizeBytes) / float64(constants.GiB) if size > maxSize { maxSize = size preferedDevice = "/dev/" + disk.Name diff --git a/pkg/constants/constants.go b/pkg/constants/constants.go index 0a3be469..a8b98d19 100644 --- a/pkg/constants/constants.go +++ b/pkg/constants/constants.go @@ -92,45 +92,45 @@ const ( OEMPath = "/oem" BootEntryRecovery = "recovery" - // SELinux targeted policy paths + // SELinuxTargetedPath SELinux targeted policy paths SELinuxTargetedPath = "/etc/selinux/targeted" SELinuxTargetedContextFile = SELinuxTargetedPath + "/contexts/files/file_contexts" SELinuxTargetedPolicyPath = SELinuxTargetedPath + "/policy" - // Default directory and file fileModes + // DirPerm Default directory and file fileModes DirPerm = os.ModeDir | os.ModePerm FilePerm = 0666 ConfigPerm = 0640 // Used for config files that contain secrets or other sensitive data NoWriteDirPerm = 0555 | os.ModeDir TempDirPerm = os.ModePerm | os.ModeSticky | os.ModeDir - // Eject script EjectScript = "#!/bin/sh\n/usr/bin/eject -rmF" ArchAmd64 = "amd64" Archx86 = "x86_64" ArchArm64 = "arm64" SignedShim = "shim.efi" - SignedGrub = "grub.efi" Rsync = "rsync" - UkiSource = "/run/install/uki" - UkiCdromSource = "/run/initramfs/live" - UkiEfiDir = "/efi" - UkiEfiDiskByLabel = `/dev/disk/by-label/` + EfiLabel - UkiMaxEntries = 3 + UkiEfiDir = "/efi" + UkiMaxEntries = 3 - // Boot labeling PassiveBootSuffix = " (fallback)" RecoveryBootSuffix = " recovery" StateResetBootSuffix = " state reset (auto)" - // Error UpgradeNoSourceError = "Could not find a proper source for the upgrade.\nThis can be configured in the cloud config files under the 'upgrade.system.uri' key or via cmdline using the '--source' flag." MultipleEntriesAssessmentError = "multiple boot entries found for %s" NoBootAssessmentWarning = "No boot assessment found in current boot entry config file" ) +const ( + _ = 1 << (10 * iota) + _ + _ + GiB +) + func UkiDefaultMenuEntries() []string { return []string{"cos", "fallback", "recovery", "statereset"} } diff --git a/pkg/elemental/elemental.go b/pkg/elemental/elemental.go index 932422e0..f9bc22b3 100644 --- a/pkg/elemental/elemental.go +++ b/pkg/elemental/elemental.go @@ -610,7 +610,7 @@ func (e Elemental) FindKernelInitrd(rootDir string) (kernel string, initrd strin return kernel, initrd, nil } -// DeactivateDevice deactivates unmounted the block devices present within the system. +// DeactivateDevices deactivates unmounted the block devices present within the system. // Useful to deactivate LVM volumes, if any, related to the target device. func (e Elemental) DeactivateDevices() error { out, err := e.config.Runner.Run( diff --git a/pkg/elemental/elemental_test.go b/pkg/elemental/elemental_test.go index 34ac5a82..5754a3df 100644 --- a/pkg/elemental/elemental_test.go +++ b/pkg/elemental/elemental_test.go @@ -464,7 +464,7 @@ var _ = Describe("Elemental", Label("elemental"), func() { } runner.SideEffect = func(cmd string, args ...string) ([]byte, error) { if cmdFail == cmd { - return []byte{}, errors.New("Command failed") + return []byte{}, errors.New("command failed") } switch cmd { default: diff --git a/pkg/github/releases.go b/pkg/github/releases.go index 724de0c0..69502a5d 100644 --- a/pkg/github/releases.go +++ b/pkg/github/releases.go @@ -9,7 +9,7 @@ import ( "strings" "github.com/Masterminds/semver/v3" - "github.com/google/go-github/v66/github" + "github.com/google/go-github/v68/github" "golang.org/x/oauth2" ) @@ -29,7 +29,7 @@ func FindReleases(ctx context.Context, token, slug string, preReleases bool) (se repo := strings.Split(slug, "/") if len(repo) != 2 || repo[0] == "" || repo[1] == "" { - return nil, fmt.Errorf("Invalid slug format. It should be 'owner/name': %s", slug) + return nil, fmt.Errorf("invalid slug format. It should be 'owner/name': %s", slug) } // Get at least 30 releases diff --git a/pkg/partitioner/mkfs.go b/pkg/partitioner/mkfs.go index 61bfe9c2..d2245243 100644 --- a/pkg/partitioner/mkfs.go +++ b/pkg/partitioner/mkfs.go @@ -36,7 +36,7 @@ func NewMkfsCall(dev string, fileSystem string, label string, runner v1.Runner, } func (mkfs MkfsCall) buildOptions() ([]string, error) { - opts := []string{} + var opts []string linuxFS, _ := regexp.MatchString("ext[2-4]|xfs", mkfs.fileSystem) fatFS, _ := regexp.MatchString("fat|vfat", mkfs.fileSystem) diff --git a/pkg/types/v1/config.go b/pkg/types/v1/config.go index a393fa4a..f4f6367a 100644 --- a/pkg/types/v1/config.go +++ b/pkg/types/v1/config.go @@ -370,7 +370,7 @@ func (ep ElementalPartitions) PartitionsByInstallOrder(extraPartitions types.Par // partitions or partitions with an empty mountpoint func (ep ElementalPartitions) PartitionsByMountPoint(descending bool, excludes ...*types.Partition) types.PartitionList { mountPointKeys := map[string]*types.Partition{} - mountPoints := []string{} + var mountPoints []string partitions := types.PartitionList{} for _, p := range ep.PartitionsByInstallOrder([]*types.Partition{}, excludes...) { diff --git a/pkg/types/v1/image.go b/pkg/types/v1/image.go index 7bda30c9..3c39fa29 100644 --- a/pkg/types/v1/image.go +++ b/pkg/types/v1/image.go @@ -29,7 +29,7 @@ type OCIImageExtractor struct{} var _ ImageExtractor = OCIImageExtractor{} -func (e OCIImageExtractor) ExtractImage(imageRef, destination, platformRef string) error { +func (e OCIImageExtractor) ExtractImage(imageRef, destination, _ string) error { img, err := utils.GetImage(imageRef, utils.GetCurrentPlatform(), nil, nil) if err != nil { return err diff --git a/pkg/utils/chroot.go b/pkg/utils/chroot.go index eee4cd03..4b073156 100644 --- a/pkg/utils/chroot.go +++ b/pkg/utils/chroot.go @@ -55,7 +55,7 @@ func ChrootedCallback(cfg *agentConfig.Config, path string, bindMounts map[strin return chroot.RunCallback(callback) } -// Sets additional bind mounts for the chroot enviornment. They are represented +// SetExtraMounts Sets additional bind mounts for the chroot enviornment. They are represented // in a map where the key is the path outside the chroot and the value is the // path inside the chroot. func (c *Chroot) SetExtraMounts(extraMounts map[string]string) { @@ -65,11 +65,11 @@ func (c *Chroot) SetExtraMounts(extraMounts map[string]string) { // Prepare will mount the defaultMounts as bind mounts, to be ready when we run chroot func (c *Chroot) Prepare() error { var err error - keys := []string{} + var keys []string mountOptions := []string{"bind"} if len(c.activeMounts) > 0 { - return errors.New("There are already active mountpoints for this instance") + return errors.New("there are already active mountpoints for this instance") } defer func() { @@ -117,7 +117,7 @@ func (c *Chroot) Prepare() error { // Close will unmount all active mounts created in Prepare on reverse order func (c *Chroot) Close() error { - failures := []string{} + var failures []string for len(c.activeMounts) > 0 { curr := c.activeMounts[len(c.activeMounts)-1] c.config.Logger.Debugf("Unmounting %s from chroot", curr) diff --git a/pkg/utils/cleanstack.go b/pkg/utils/cleanstack.go index 965b4c3c..ae1f5a0d 100644 --- a/pkg/utils/cleanstack.go +++ b/pkg/utils/cleanstack.go @@ -27,7 +27,7 @@ func NewCleanStack() *CleanStack { return &CleanStack{} } -// Stack is a basic LIFO stack that resizes as needed. +// CleanStack Stack is a basic LIFO stack that resizes as needed. type CleanStack struct { jobs []CleanJob count int diff --git a/pkg/utils/common.go b/pkg/utils/common.go index 3a7ea151..9e248919 100644 --- a/pkg/utils/common.go +++ b/pkg/utils/common.go @@ -87,7 +87,7 @@ func CopyFile(fs v1.FS, source string, target string) (err error) { // TODO: Log errors, return errors, whatever but dont ignore them func ConcatFiles(fs v1.FS, sources []string, target string) (err error) { if len(sources) == 0 { - return fmt.Errorf("Empty sources list") + return fmt.Errorf("empty sources list") } if dir, _ := fsutils.IsDir(fs, target); dir { target = filepath.Join(target, filepath.Base(sources[0])) @@ -123,7 +123,7 @@ func ConcatFiles(fs v1.FS, sources []string, target string) (err error) { return err } -// Copies source file to target file using Fs interface +// CreateDirStructure Copies source file to target file using Fs interface func CreateDirStructure(fs v1.FS, target string) error { for _, dir := range []string{"/run", "/dev", "/boot", "/usr/local", "/oem"} { err := fsutils.MkdirAll(fs, filepath.Join(target, dir), cnst.DirPerm) @@ -236,7 +236,7 @@ func Shutdown(runner v1.Runner, delay time.Duration) error { // CosignVerify runs a cosign validation for the give image and given public key. If no // key is provided then it attempts a keyless validation (experimental feature). func CosignVerify(fs v1.FS, runner v1.Runner, image string, publicKey string) (string, error) { - args := []string{} + var args []string if publicKey != "" { args = append(args, "-key", publicKey) @@ -327,7 +327,6 @@ func IsMounted(config *agentConfig.Config, part *types.Partition) (bool, error) func GetTempDir(config *agentConfig.Config, suffix string) string { // if we got a TMPDIR var, respect and use that if suffix == "" { - random.Seed(time.Now().UnixNano()) suffix = strconv.Itoa(int(random.Uint32())) } elementalTmpDir := fmt.Sprintf("elemental-%s", suffix) @@ -422,7 +421,7 @@ func GetSource(config *agentConfig.Config, source string, destination string) er return nil } -// ValidContainerReferece returns true if the given string matches +// ValidContainerReference returns true if the given string matches // a container registry reference, false otherwise func ValidContainerReference(ref string) bool { if _, err := reference.ParseNormalizedNamed(ref); err != nil { @@ -431,7 +430,7 @@ func ValidContainerReference(ref string) bool { return true } -// ValidTaggedContainerReferece returns true if the given string matches +// ValidTaggedContainerReference returns true if the given string matches // a container registry reference including a tag, false otherwise. func ValidTaggedContainerReference(ref string) bool { n, err := reference.ParseNormalizedNamed(ref) @@ -475,7 +474,7 @@ func FindFileWithPrefix(fs v1.FS, path string, prefixes ...string) (string, erro } } } - return "", fmt.Errorf("No file found with prefixes: %v", prefixes) + return "", fmt.Errorf("no file found with prefixes: %v", prefixes) } // CalcFileChecksum opens the given file and returns the sha256 checksum of it. @@ -611,7 +610,7 @@ func CheckFailedInstallation(stateFile string) (bool, error) { if err != nil { return true, err } - return true, fmt.Errorf("Installation failed: %s", string(content)) + return true, fmt.Errorf("installation failed: %s", string(content)) } return false, nil } diff --git a/pkg/utils/fs/fs.go b/pkg/utils/fs/fs.go index 27448350..9dbbed13 100644 --- a/pkg/utils/fs/fs.go +++ b/pkg/utils/fs/fs.go @@ -52,7 +52,7 @@ func DirSize(fs v1.FS, path string) (int64, error) { return size, err } -// Check if a file or directory exists. +// Exists Check if a file or directory exists. func Exists(fs v1.FS, path string) (bool, error) { _, err := fs.Stat(path) if err == nil { @@ -208,7 +208,7 @@ func WalkDirFs(fs v1.FS, root string, fn fs.WalkDirFunc) error { func walkDir(fs v1.FS, path string, d fs.DirEntry, walkDirFn fs.WalkDirFunc) error { if err := walkDirFn(path, d, nil); err != nil || !d.IsDir() { - if err == filepath.SkipDir && d.IsDir() { + if errors.Is(err, filepath.SkipDir) && d.IsDir() { // Successfully skipped directory. err = nil } diff --git a/pkg/utils/runstage.go b/pkg/utils/runstage.go index 69982b87..bee3fda1 100644 --- a/pkg/utils/runstage.go +++ b/pkg/utils/runstage.go @@ -17,6 +17,7 @@ limitations under the License. package utils import ( + "errors" "fmt" agentConfig "github.com/kairos-io/kairos-agent/v2/pkg/config" "github.com/kairos-io/kairos-agent/v2/pkg/utils/fs" @@ -29,7 +30,8 @@ import ( ) func onlyYAMLPartialErrors(er error) bool { - if merr, ok := er.(*multierror.Error); ok { + var merr *multierror.Error + if errors.As(er, &merr) { for _, e := range merr.Errors { // Skip partial unmarshalling errors // TypeError is throwed when it is possible to read the yaml partially @@ -57,7 +59,6 @@ func checkYAMLError(cfg *agentConfig.Config, allErrors, err error) error { return allErrors } -// RunstageAnalyze func RunStageAnalyze(cfg *agentConfig.Config, stage string) error { return runstage(cfg, stage, true) } diff --git a/pkg/utils/utils_test.go b/pkg/utils/utils_test.go index ef130e7d..53777881 100644 --- a/pkg/utils/utils_test.go +++ b/pkg/utils/utils_test.go @@ -30,7 +30,7 @@ import ( "github.com/kairos-io/kairos-agent/v2/pkg/constants" v1 "github.com/kairos-io/kairos-agent/v2/pkg/types/v1" "github.com/kairos-io/kairos-agent/v2/pkg/utils" - "github.com/kairos-io/kairos-agent/v2/pkg/utils/fs" + fsutils "github.com/kairos-io/kairos-agent/v2/pkg/utils/fs" "github.com/kairos-io/kairos-agent/v2/pkg/utils/partitions" "github.com/kairos-io/kairos-agent/v2/tests/matchers" v1mock "github.com/kairos-io/kairos-agent/v2/tests/mocks" @@ -146,7 +146,7 @@ var _ = Describe("Utils", Label("utils"), func() { called := false callback := func() error { called = true - return errors.New("Callback error") + return errors.New("callback error") } err := chroot.RunCallback(callback) Expect(err).NotTo(BeNil()) @@ -412,7 +412,7 @@ var _ = Describe("Utils", Label("utils"), func() { // Shouldn't be the same Expect(destNames).ToNot(Equal(SourceNames)) - expected := []string{} + var expected []string for _, s := range SourceNames { if s != "host" && s != "run" { @@ -951,12 +951,12 @@ var _ = Describe("Utils", Label("utils"), func() { Expect(result).To(Equal("three two one ")) }) It("On Cleanup keeps former error and all callbacks are executed", func() { - err := errors.New("Former error") + err := errors.New("former error") count := 0 callback := func() error { count++ if count == 2 { - return errors.New("Cleanup Error") + return errors.New("cleanup Error") } return nil } @@ -965,7 +965,7 @@ var _ = Describe("Utils", Label("utils"), func() { cleaner.Push(callback) err = cleaner.Cleanup(err) Expect(count).To(Equal(3)) - Expect(err.Error()).To(ContainSubstring("Former error")) + Expect(err.Error()).To(ContainSubstring("former error")) }) It("On Cleanup error reports first error and all callbacks are executed", func() { var err error