From 59165de0fedec6bbdf0b1dccd5fdb84545ac48bb Mon Sep 17 00:00:00 2001 From: Diaa Sami Date: Thu, 30 Nov 2023 11:19:41 +0100 Subject: [PATCH] switch to images/pkg/dnfjson and remove internal copy COMPOSER-2068 --- cmd/gen-manifests/main.go | 2 +- cmd/mock-dnf-json/dnf-json.go | 2 +- cmd/osbuild-composer/composer.go | 2 +- cmd/osbuild-dnf-json-tests/main_test.go | 2 +- cmd/osbuild-pipeline/main.go | 2 +- cmd/osbuild-playground/playground.go | 2 +- cmd/osbuild-store-dump/main.go | 8 +- cmd/osbuild-worker/jobimpl-depsolve.go | 2 +- cmd/osbuild-worker/main.go | 2 +- go.mod | 28 +- go.sum | 56 +- internal/client/unit_test.go | 2 +- internal/dnfjson/cache_test.go | 384 ----------- internal/dnfjson/dnfjson_test.go | 612 ------------------ internal/mocks/dnfjson/dnfjson.go | 2 +- internal/store/json_test.go | 4 +- internal/weldr/api.go | 2 +- internal/weldr/api_test.go | 2 +- internal/worker/server_test.go | 6 +- vendor/cloud.google.com/go/iam/CHANGES.md | 14 + .../go/internal/.repo-metadata-full.json | 90 ++- .../aws/aws-sdk-go/aws/endpoints/defaults.go | 151 +++++ .../github.com/aws/aws-sdk-go/aws/version.go | 2 +- .../aws/aws-sdk-go/service/ec2/api.go | 115 ++-- .../aws/aws-sdk-go/service/s3/api.go | 192 +++++- .../service/s3/s3manager/upload_input.go | 3 +- .../osbuild/images/internal/common/helpers.go | 17 - .../osbuild/images/pkg/arch/arch.go | 81 +++ .../images/pkg/distro/fedora/distro.go | 9 +- .../images/pkg/distro/fedora/images.go | 10 +- .../images/pkg/distro/fedora/package_sets.go | 6 +- .../pkg/distro/fedora/partition_tables.go | 22 +- .../osbuild/images/pkg/distro/rhel7/azure.go | 4 +- .../osbuild/images/pkg/distro/rhel7/distro.go | 3 +- .../osbuild/images/pkg/distro/rhel7/images.go | 4 +- .../pkg/distro/rhel7/partition_tables.go | 4 +- .../osbuild/images/pkg/distro/rhel8/azure.go | 6 +- .../images/pkg/distro/rhel8/bare_metal.go | 8 +- .../osbuild/images/pkg/distro/rhel8/distro.go | 9 +- .../osbuild/images/pkg/distro/rhel8/edge.go | 10 +- .../osbuild/images/pkg/distro/rhel8/images.go | 10 +- .../images/pkg/distro/rhel8/package_sets.go | 6 +- .../pkg/distro/rhel8/partition_tables.go | 22 +- .../osbuild/images/pkg/distro/rhel9/azure.go | 6 +- .../images/pkg/distro/rhel9/bare_metal.go | 22 +- .../osbuild/images/pkg/distro/rhel9/distro.go | 9 +- .../osbuild/images/pkg/distro/rhel9/edge.go | 18 +- .../osbuild/images/pkg/distro/rhel9/images.go | 10 +- .../images/pkg/distro/rhel9/package_sets.go | 18 +- .../pkg/distro/rhel9/partition_tables.go | 10 +- .../osbuild/images/pkg/distro/rhel9/qcow2.go | 4 +- .../osbuild/images/pkg/distro/rhel9/vmdk.go | 4 +- .../pkg/distroregistry/distroregistry.go | 3 +- .../osbuild/images/pkg}/dnfjson/cache.go | 113 ++-- .../osbuild/images/pkg}/dnfjson/dnfjson.go | 14 +- .../pkg/image/anaconda_live_installer.go | 5 +- .../pkg/image/anaconda_ostree_installer.go | 8 +- .../pkg/image/anaconda_tar_installer.go | 5 +- .../images/pkg/image/ostree_archive.go | 15 +- .../osbuild/images/pkg/image/ostree_disk.go | 35 +- .../pkg/image/ostree_simplified_installer.go | 5 +- .../images/pkg/manifest/anaconda_installer.go | 5 +- .../images/pkg/manifest/coreos_installer.go | 5 +- .../images/pkg/manifest/efi_boot_tree.go | 7 +- .../osbuild/images/pkg/manifest/os.go | 3 +- .../images/pkg/manifest/ostree_deployment.go | 280 +++++--- .../images/pkg/manifest/ostree_encapsulate.go | 57 ++ .../osbuild/images/pkg/manifest/raw.go | 4 +- .../osbuild/images/pkg/manifest/raw_ostree.go | 2 +- .../images/pkg/osbuild/containers_input.go | 5 + .../osbuild/ostree_deploy_container_stage.go | 75 +++ .../pkg/osbuild/ostree_encapsulate_stage.go | 53 ++ .../osbuild/images/pkg/platform/aarch64.go | 12 +- .../osbuild/images/pkg/platform/platform.go | 29 +- .../osbuild/images/pkg/platform/ppc64le.go | 8 +- .../osbuild/images/pkg/platform/s390x.go | 8 +- .../osbuild/images/pkg/platform/x86_64.go | 8 +- vendor/golang.org/x/crypto/cryptobyte/asn1.go | 13 +- vendor/golang.org/x/sys/unix/fcntl.go | 2 +- vendor/golang.org/x/sys/unix/ioctl_linux.go | 5 + vendor/golang.org/x/sys/unix/mkerrors.sh | 3 +- vendor/golang.org/x/sys/unix/syscall_bsd.go | 2 +- vendor/golang.org/x/sys/unix/syscall_linux.go | 28 +- .../golang.org/x/sys/unix/syscall_openbsd.go | 14 + .../golang.org/x/sys/unix/syscall_solaris.go | 2 +- .../x/sys/unix/syscall_zos_s390x.go | 2 +- vendor/golang.org/x/sys/unix/zerrors_linux.go | 2 +- .../golang.org/x/sys/unix/zsyscall_linux.go | 15 + .../x/sys/unix/zsyscall_openbsd_386.go | 26 + .../x/sys/unix/zsyscall_openbsd_386.s | 5 + .../x/sys/unix/zsyscall_openbsd_amd64.go | 26 + .../x/sys/unix/zsyscall_openbsd_amd64.s | 5 + .../x/sys/unix/zsyscall_openbsd_arm.go | 26 + .../x/sys/unix/zsyscall_openbsd_arm.s | 5 + .../x/sys/unix/zsyscall_openbsd_arm64.go | 26 + .../x/sys/unix/zsyscall_openbsd_arm64.s | 5 + .../x/sys/unix/zsyscall_openbsd_mips64.go | 26 + .../x/sys/unix/zsyscall_openbsd_mips64.s | 5 + .../x/sys/unix/zsyscall_openbsd_ppc64.go | 26 + .../x/sys/unix/zsyscall_openbsd_ppc64.s | 6 + .../x/sys/unix/zsyscall_openbsd_riscv64.go | 26 + .../x/sys/unix/zsyscall_openbsd_riscv64.s | 5 + vendor/golang.org/x/sys/unix/ztypes_linux.go | 32 + .../x/sys/windows/syscall_windows.go | 2 + .../x/sys/windows/zsyscall_windows.go | 19 + vendor/golang.org/x/time/rate/rate.go | 2 + .../google.golang.org/api/internal/version.go | 2 +- vendor/modules.txt | 32 +- 108 files changed, 1654 insertions(+), 1526 deletions(-) delete mode 100644 internal/dnfjson/cache_test.go delete mode 100644 internal/dnfjson/dnfjson_test.go create mode 100644 vendor/github.com/osbuild/images/pkg/arch/arch.go rename {internal => vendor/github.com/osbuild/images/pkg}/dnfjson/cache.go (80%) rename {internal => vendor/github.com/osbuild/images/pkg}/dnfjson/dnfjson.go (97%) create mode 100644 vendor/github.com/osbuild/images/pkg/manifest/ostree_encapsulate.go create mode 100644 vendor/github.com/osbuild/images/pkg/osbuild/ostree_deploy_container_stage.go create mode 100644 vendor/github.com/osbuild/images/pkg/osbuild/ostree_encapsulate_stage.go diff --git a/cmd/gen-manifests/main.go b/cmd/gen-manifests/main.go index f9ed50bc837..a0d087fd5fe 100644 --- a/cmd/gen-manifests/main.go +++ b/cmd/gen-manifests/main.go @@ -26,7 +26,7 @@ import ( "github.com/osbuild/images/pkg/rhsm/facts" "github.com/osbuild/images/pkg/rpmmd" - "github.com/osbuild/osbuild-composer/internal/dnfjson" + "github.com/osbuild/images/pkg/dnfjson" ) type multiValue []string diff --git a/cmd/mock-dnf-json/dnf-json.go b/cmd/mock-dnf-json/dnf-json.go index fb8fd8d9952..ec711f93ed9 100644 --- a/cmd/mock-dnf-json/dnf-json.go +++ b/cmd/mock-dnf-json/dnf-json.go @@ -16,7 +16,7 @@ import ( "os" "strings" - "github.com/osbuild/osbuild-composer/internal/dnfjson" + "github.com/osbuild/images/pkg/dnfjson" ) func maybeFail(err error) { diff --git a/cmd/osbuild-composer/composer.go b/cmd/osbuild-composer/composer.go index 3574abbd5bf..a49b91f6d17 100644 --- a/cmd/osbuild-composer/composer.go +++ b/cmd/osbuild-composer/composer.go @@ -22,10 +22,10 @@ import ( "github.com/osbuild/osbuild-composer/pkg/jobqueue/dbjobqueue" "github.com/osbuild/images/pkg/distroregistry" + "github.com/osbuild/images/pkg/dnfjson" "github.com/osbuild/osbuild-composer/internal/auth" "github.com/osbuild/osbuild-composer/internal/cloudapi" v2 "github.com/osbuild/osbuild-composer/internal/cloudapi/v2" - "github.com/osbuild/osbuild-composer/internal/dnfjson" "github.com/osbuild/osbuild-composer/internal/jobqueue/fsjobqueue" "github.com/osbuild/osbuild-composer/internal/weldr" "github.com/osbuild/osbuild-composer/internal/worker" diff --git a/cmd/osbuild-dnf-json-tests/main_test.go b/cmd/osbuild-dnf-json-tests/main_test.go index 60bff89f5f7..e2487b1bbd2 100644 --- a/cmd/osbuild-dnf-json-tests/main_test.go +++ b/cmd/osbuild-dnf-json-tests/main_test.go @@ -13,10 +13,10 @@ import ( "github.com/osbuild/images/pkg/blueprint" "github.com/osbuild/images/pkg/distro" rhel "github.com/osbuild/images/pkg/distro/rhel8" + "github.com/osbuild/images/pkg/dnfjson" "github.com/osbuild/images/pkg/ostree" "github.com/osbuild/images/pkg/platform" "github.com/osbuild/images/pkg/rpmmd" - "github.com/osbuild/osbuild-composer/internal/dnfjson" ) // This test loads all the repositories available in /repositories directory diff --git a/cmd/osbuild-pipeline/main.go b/cmd/osbuild-pipeline/main.go index f3cdc25a66e..f190aaf4923 100644 --- a/cmd/osbuild-pipeline/main.go +++ b/cmd/osbuild-pipeline/main.go @@ -11,9 +11,9 @@ import ( "github.com/osbuild/images/pkg/container" "github.com/osbuild/images/pkg/distro" "github.com/osbuild/images/pkg/distroregistry" + "github.com/osbuild/images/pkg/dnfjson" "github.com/osbuild/images/pkg/ostree" "github.com/osbuild/osbuild-composer/internal/common" - "github.com/osbuild/osbuild-composer/internal/dnfjson" "github.com/osbuild/images/pkg/rpmmd" "github.com/osbuild/osbuild-composer/internal/blueprint" diff --git a/cmd/osbuild-playground/playground.go b/cmd/osbuild-playground/playground.go index 594021edc1a..7a4b1d77f3c 100644 --- a/cmd/osbuild-playground/playground.go +++ b/cmd/osbuild-playground/playground.go @@ -7,11 +7,11 @@ import ( "path" "github.com/osbuild/images/pkg/distro" + "github.com/osbuild/images/pkg/dnfjson" "github.com/osbuild/images/pkg/image" "github.com/osbuild/images/pkg/manifest" "github.com/osbuild/images/pkg/osbuild" "github.com/osbuild/images/pkg/rpmmd" - "github.com/osbuild/osbuild-composer/internal/dnfjson" "github.com/osbuild/osbuild-composer/internal/runner" ) diff --git a/cmd/osbuild-store-dump/main.go b/cmd/osbuild-store-dump/main.go index f8ab9621e71..03b926f75a2 100644 --- a/cmd/osbuild-store-dump/main.go +++ b/cmd/osbuild-store-dump/main.go @@ -9,14 +9,14 @@ import ( "github.com/google/uuid" + "github.com/osbuild/images/pkg/arch" "github.com/osbuild/images/pkg/distro" "github.com/osbuild/images/pkg/distro/fedora" "github.com/osbuild/images/pkg/distroregistry" + "github.com/osbuild/images/pkg/dnfjson" "github.com/osbuild/images/pkg/manifest" - "github.com/osbuild/images/pkg/platform" "github.com/osbuild/images/pkg/rpmmd" "github.com/osbuild/osbuild-composer/internal/blueprint" - "github.com/osbuild/osbuild-composer/internal/dnfjson" "github.com/osbuild/osbuild-composer/internal/store" "github.com/osbuild/osbuild-composer/internal/target" ) @@ -127,7 +127,7 @@ func main() { awsTarget.OsbuildArtifact.ExportFilename = "image.ami" d := fedora.NewF37() - a, err := d.GetArch(platform.ARCH_X86_64.String()) + a, err := d.GetArch(arch.ARCH_X86_64.String()) if err != nil { panic(err) } @@ -143,7 +143,7 @@ func main() { if err != nil { panic(err) } - repos := allRepos[platform.ARCH_X86_64.String()] + repos := allRepos[arch.ARCH_X86_64.String()] homeDir, err := os.UserHomeDir() if err != nil { panic("os.UserHomeDir(): " + err.Error()) diff --git a/cmd/osbuild-worker/jobimpl-depsolve.go b/cmd/osbuild-worker/jobimpl-depsolve.go index b316d603935..3b3d356c48e 100644 --- a/cmd/osbuild-worker/jobimpl-depsolve.go +++ b/cmd/osbuild-worker/jobimpl-depsolve.go @@ -5,8 +5,8 @@ import ( "github.com/sirupsen/logrus" + "github.com/osbuild/images/pkg/dnfjson" "github.com/osbuild/images/pkg/rpmmd" - "github.com/osbuild/osbuild-composer/internal/dnfjson" "github.com/osbuild/osbuild-composer/internal/worker" "github.com/osbuild/osbuild-composer/internal/worker/clienterrors" ) diff --git a/cmd/osbuild-worker/main.go b/cmd/osbuild-worker/main.go index b4409e83fad..b1cc3fca354 100644 --- a/cmd/osbuild-worker/main.go +++ b/cmd/osbuild-worker/main.go @@ -20,8 +20,8 @@ import ( "github.com/aws/aws-sdk-go/service/autoscaling" "github.com/sirupsen/logrus" + "github.com/osbuild/images/pkg/dnfjson" "github.com/osbuild/osbuild-composer/internal/common" - "github.com/osbuild/osbuild-composer/internal/dnfjson" "github.com/osbuild/osbuild-composer/internal/upload/azure" "github.com/osbuild/osbuild-composer/internal/upload/koji" "github.com/osbuild/osbuild-composer/internal/upload/oci" diff --git a/go.mod b/go.mod index 582868d8c76..918c80dda22 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( github.com/Azure/go-autorest/autorest v0.11.29 github.com/Azure/go-autorest/autorest/azure/auth v0.5.12 github.com/BurntSushi/toml v1.3.2 - github.com/aws/aws-sdk-go v1.48.1 + github.com/aws/aws-sdk-go v1.48.5 github.com/coreos/go-semver v0.3.1 github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f github.com/deepmap/oapi-codegen v1.8.2 @@ -31,7 +31,7 @@ require ( github.com/labstack/gommon v0.4.1 github.com/openshift-online/ocm-sdk-go v0.1.385 github.com/oracle/oci-go-sdk/v54 v54.0.0 - github.com/osbuild/images v0.18.0 + github.com/osbuild/images v0.20.0 github.com/osbuild/osbuild-composer/pkg/splunk_logger v0.0.0-20231117174845-e969a9dc3cd1 github.com/osbuild/pulp-client v0.1.0 github.com/prometheus/client_golang v1.17.0 @@ -42,16 +42,16 @@ require ( github.com/ubccr/kerby v0.0.0-20170626144437-201a958fc453 github.com/vmware/govmomi v0.33.1 golang.org/x/exp v0.0.0-20231006140011-7918f672742d - golang.org/x/oauth2 v0.14.0 + golang.org/x/oauth2 v0.15.0 golang.org/x/sync v0.5.0 - golang.org/x/sys v0.14.0 - google.golang.org/api v0.151.0 + golang.org/x/sys v0.15.0 + google.golang.org/api v0.152.0 ) require ( - cloud.google.com/go v0.110.8 // indirect + cloud.google.com/go v0.110.10 // indirect cloud.google.com/go/compute/metadata v0.2.3 // indirect - cloud.google.com/go/iam v1.1.3 // indirect + cloud.google.com/go/iam v1.1.5 // indirect github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.2 // indirect github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 // indirect github.com/Azure/go-autorest v14.2.0+incompatible // indirect @@ -167,18 +167,18 @@ require ( go.mongodb.org/mongo-driver v1.11.3 // indirect go.mozilla.org/pkcs7 v0.0.0-20210826202110-33d05740a352 // indirect go.opencensus.io v0.24.0 // indirect - golang.org/x/crypto v0.15.0 // indirect + golang.org/x/crypto v0.16.0 // indirect golang.org/x/mod v0.13.0 // indirect - golang.org/x/net v0.18.0 // indirect - golang.org/x/term v0.14.0 // indirect + golang.org/x/net v0.19.0 // indirect + golang.org/x/term v0.15.0 // indirect golang.org/x/text v0.14.0 // indirect - golang.org/x/time v0.3.0 // indirect + golang.org/x/time v0.5.0 // indirect golang.org/x/tools v0.14.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/appengine v1.6.8 // indirect - google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405 // indirect + google.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f // indirect google.golang.org/grpc v1.59.0 // indirect google.golang.org/protobuf v1.31.0 // indirect gopkg.in/go-jose/go-jose.v2 v2.6.1 // indirect diff --git a/go.sum b/go.sum index 59d63f6c89e..5ae0c916bf7 100644 --- a/go.sum +++ b/go.sum @@ -1,12 +1,12 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.110.8 h1:tyNdfIxjzaWctIiLYOTalaLKZ17SI44SKFW26QbOhME= -cloud.google.com/go v0.110.8/go.mod h1:Iz8AkXJf1qmxC3Oxoep8R1T36w8B92yU29PcBhHO5fk= +cloud.google.com/go v0.110.10 h1:LXy9GEO+timppncPIAZoOj3l58LIU9k+kn48AN7IO3Y= +cloud.google.com/go v0.110.10/go.mod h1:v1OoFqYxiBkUrruItNM3eT4lLByNjxmJSV/xDKJNnic= cloud.google.com/go/compute v1.23.3 h1:6sVlXXBmbd7jNX0Ipq0trII3e4n1/MsADLK6a+aiVlk= cloud.google.com/go/compute v1.23.3/go.mod h1:VCgBUoMnIVIR0CscqQiPJLAG25E3ZRZMzcFZeQ+h8CI= cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= -cloud.google.com/go/iam v1.1.3 h1:18tKG7DzydKWUnLjonWcJO6wjSCAtzh4GcRKlH/Hrzc= -cloud.google.com/go/iam v1.1.3/go.mod h1:3khUlaBXfPKKe7huYgEpDn6FtgRyMEqbkvBxrQyY5SE= +cloud.google.com/go/iam v1.1.5 h1:1jTsCu4bcsNsE4iiqNT5SHwrDRCfRmIaaaVFhRveTJI= +cloud.google.com/go/iam v1.1.5/go.mod h1:rB6P/Ic3mykPbFio+vo7403drjlgvoWfYpJhMXEbzv8= cloud.google.com/go/storage v1.35.1 h1:B59ahL//eDfx2IIKFBeT5Atm9wnNmj3+8xG/W4WB//w= cloud.google.com/go/storage v1.35.1/go.mod h1:M6M/3V/D3KpzMTJyPOR/HU6n2Si5QdaXYEsng2xgOs8= dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= @@ -61,8 +61,8 @@ github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d/go.mod h1:asat6 github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= -github.com/aws/aws-sdk-go v1.48.1 h1:OXPUVL4cLdsDsqkVIuhwY+D389tjI7e1xu0lsDYyeMk= -github.com/aws/aws-sdk-go v1.48.1/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/aws/aws-sdk-go v1.48.5 h1:cp3inTx9trQNCNZV/Id5S5egpilBXKdF32uKtb1LszI= +github.com/aws/aws-sdk-go v1.48.5/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk= github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -453,8 +453,8 @@ github.com/openshift-online/ocm-sdk-go v0.1.385 h1:EZs7CDfxtJEwywCERdNX6rApyFaJ+ github.com/openshift-online/ocm-sdk-go v0.1.385/go.mod h1:/+VFIw1iW2H0jEkFH4GnbL/liWareyzsL0w7mDIudB4= github.com/oracle/oci-go-sdk/v54 v54.0.0 h1:CDLjeSejv2aDpElAJrhKpi6zvT/zhZCZuXchUUZ+LS4= github.com/oracle/oci-go-sdk/v54 v54.0.0/go.mod h1:+t+yvcFGVp+3ZnztnyxqXfQDsMlq8U25faBLa+mqCMc= -github.com/osbuild/images v0.18.0 h1:I/tOO7DCECciJptrXVq+oykJI5dP1rwkzJqmf2rKuqw= -github.com/osbuild/images v0.18.0/go.mod h1:Zr+AkaX/Rpxyff6Zxh8kkwGKFtJsSukGo1Vv/j9HsxA= +github.com/osbuild/images v0.20.0 h1:ofqEoP9PkjCYDUwIKUCsY6Vw7D7SSJ6ZunsLhMlLhyE= +github.com/osbuild/images v0.20.0/go.mod h1:Mg9IY8dBnkIvj/epGMtRNBVUTpR5V9mW2EgyRnWVsec= github.com/osbuild/osbuild-composer/pkg/splunk_logger v0.0.0-20231117174845-e969a9dc3cd1 h1:UFEJIcPa46W8gtWgOYzriRKYyy1t6SWL0BI7fPTuVvc= github.com/osbuild/osbuild-composer/pkg/splunk_logger v0.0.0-20231117174845-e969a9dc3cd1/go.mod h1:z+WA+dX6qMwc7fqY5jCzESDIlg4WR2sBQezxsoXv9Ik= github.com/osbuild/pulp-client v0.1.0 h1:L0C4ezBJGTamN3BKdv+rKLuq/WxXJbsFwz/Hj7aEmJ8= @@ -612,8 +612,8 @@ golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0 golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= -golang.org/x/crypto v0.15.0 h1:frVn1TEaCEaZcn3Tmd7Y2b5KKPaZ+I32Q2OA3kYp5TA= -golang.org/x/crypto v0.15.0/go.mod h1:4ChreQoLWfG3xLDer1WdlH5NdlQ3+mwnQq1YTKY+72g= +golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY= +golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI= golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo= @@ -642,11 +642,11 @@ golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qx 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.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= +golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.14.0 h1:P0Vrf/2538nmC0H+pEQ3MNFRRnVR7RlqyVw+bvm26z0= -golang.org/x/oauth2 v0.14.0/go.mod h1:lAtNWgaWfL4cm7j2OV8TxGi9Qb7ECORx8DktCY74OwM= +golang.org/x/oauth2 v0.15.0 h1:s8pnnxNVzjWyrvYdFUQq5llS1PX2zhPXmccZv99h7uQ= +golang.org/x/oauth2 v0.15.0/go.mod h1:q48ptWNTY5XWf+JNten23lcvHpLJ0ZSxF5ttTHKVCAM= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -685,14 +685,14 @@ golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q= -golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= +golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= 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.14.0 h1:LGK9IlZ8T9jvdy6cTdfKUCltatMFOehAQo9SRC46UQ8= -golang.org/x/term v0.14.0/go.mod h1:TySc+nGkYR6qt8km8wUhuFRTVSMIX3XPR58y2lC8vww= +golang.org/x/term v0.15.0 h1:y/Oo/a/q3IXu26lQgl04j/gjuBDOBlx7X6Om1j2CPW4= +golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -706,8 +706,8 @@ golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= -golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= +golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -736,8 +736,8 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -google.golang.org/api v0.151.0 h1:FhfXLO/NFdJIzQtCqjpysWwqKk8AzGWBUhMIx67cVDU= -google.golang.org/api v0.151.0/go.mod h1:ccy+MJ6nrYFgE3WgRx/AMXOxOmU8Q4hSa+jjibzhxcg= +google.golang.org/api v0.152.0 h1:t0r1vPnfMc260S2Ci+en7kfCZaLOPs5KI0sVV/6jZrY= +google.golang.org/api v0.152.0/go.mod h1:3qNJX5eOmhiWYc67jRA/3GsDw97UFb5ivv7Y2PrriAY= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= @@ -745,12 +745,12 @@ google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJ google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= 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-20231016165738-49dd2c1f3d0b h1:+YaDE2r2OG8t/z5qmsh7Y+XXwCbvadxxZ0YY6mTdrVA= -google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:CgAqfJo+Xmu0GwA0411Ht3OU3OntXwsGmrmjI8ioGXI= -google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b h1:CIC2YMXmIhYw6evmhPxBKJ4fmLbOFtXQN/GV3XOZR8k= -google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:IBQ646DjkDkvUIsVq/cc03FUFQ9wbZu7yE396YcL870= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405 h1:AB/lmRny7e2pLhFEYIbl5qkDAUt2h0ZRO4wGPhZf+ik= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405/go.mod h1:67X1fPuzjcrkymZzZV1vvkFeTn2Rvc6lYF9MYFGCcwE= +google.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17 h1:wpZ8pe2x1Q3f2KyT5f8oP/fa9rHAKgFPr/HZdNuS+PQ= +google.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:J7XzRzVy1+IPwWHZUzoD0IccYZIrXILAQpc+Qy9CMhY= +google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17 h1:JpwMPBpFN3uKhdaekDpiNlImDdkUAyiJ6ez/uxGaUSo= +google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:0xJLfVdJqpAPl8tDg1ujOCGzx6LFLttXT5NhllGOXY4= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f h1:ultW7fxlIvee4HYrtnaRPon9HpEgFk5zYpmfMgtKB5I= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f/go.mod h1:L9KNLi232K1/xB6f7AlSX692koaRnKaWSR0stBki0Yc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= diff --git a/internal/client/unit_test.go b/internal/client/unit_test.go index cb0b27751db..65b0c66c701 100644 --- a/internal/client/unit_test.go +++ b/internal/client/unit_test.go @@ -18,8 +18,8 @@ import ( "github.com/osbuild/images/pkg/distro/test_distro" "github.com/osbuild/images/pkg/distroregistry" + "github.com/osbuild/images/pkg/dnfjson" "github.com/osbuild/images/pkg/rpmmd" - "github.com/osbuild/osbuild-composer/internal/dnfjson" dnfjson_mock "github.com/osbuild/osbuild-composer/internal/mocks/dnfjson" rpmmd_mock "github.com/osbuild/osbuild-composer/internal/mocks/rpmmd" "github.com/osbuild/osbuild-composer/internal/reporegistry" diff --git a/internal/dnfjson/cache_test.go b/internal/dnfjson/cache_test.go deleted file mode 100644 index 7cbe2558c54..00000000000 --- a/internal/dnfjson/cache_test.go +++ /dev/null @@ -1,384 +0,0 @@ -package dnfjson - -import ( - "io/fs" - "os" - "path/filepath" - "sort" - "strings" - "testing" - "time" - - "github.com/osbuild/images/pkg/rpmmd" - - "github.com/stretchr/testify/assert" -) - -func truncate(path string, size int64) { - fp, err := os.Create(path) - if err != nil { - panic(err) - } - defer fp.Close() - if err := fp.Truncate(size); err != nil { - panic(err) - } -} - -// create a test cache based on the config, where the config keys are file -// paths and the values are file sizes -func createTestCache(root string, config testCache) uint64 { - var totalSize uint64 - for path, fi := range config { - fullPath := filepath.Join(root, path) - parPath := filepath.Dir(fullPath) - if err := os.MkdirAll(parPath, 0770); err != nil { - panic(err) - } - truncate(fullPath, int64(fi.size)) - mtime := time.Unix(fi.mtime, 0) - if err := os.Chtimes(fullPath, mtime, mtime); err != nil { - panic(err) - } - - // if the path has multiple parts, touch the top level directory of the - // element - pathParts := strings.Split(path, "/") - if len(pathParts) > 1 { - top := pathParts[0] - if err := os.Chtimes(filepath.Join(root, top), mtime, mtime); err != nil { - panic(err) - } - } - if len(path) >= 64 { - // paths with shorter names will be ignored by the cache manager - totalSize += fi.size - } - } - - // add directory sizes to total - sizer := func(path string, info fs.FileInfo, err error) error { - if err != nil { - return err - } - if path == root { - // don't count root - return nil - } - if info.IsDir() { - totalSize += uint64(info.Size()) - } - return nil - } - if err := filepath.Walk(root, sizer); err != nil { - panic(err) - } - - return totalSize -} - -type fileInfo struct { - size uint64 - mtime int64 -} - -type testCache map[string]fileInfo - -var testCfgs = map[string]testCache{ - "rhel84-aarch64": { // real repo metadata file names and sizes - "9adf133053f0691a0ec12e73cbf1875a90c9268b4f09162fc3387fd76ecb3bcc.solv": fileInfo{2095095, 100}, - "9adf133053f0691a0ec12e73cbf1875a90c9268b4f09162fc3387fd76ecb3bcc-filenames.solvx": fileInfo{14473401, 100}, - "9adf133053f0691a0ec12e73cbf1875a90c9268b4f09162fc3387fd76ecb3bcc-33d346d177279673/repodata/gen/groups.xml": fileInfo{1419587, 100}, - "9adf133053f0691a0ec12e73cbf1875a90c9268b4f09162fc3387fd76ecb3bcc-33d346d177279673/repodata/3eabd1122210e4def18ae4b96a18aa5bcc186abf2ec14e2e8f1c1bb1ab4d11da-modules.yaml.gz": fileInfo{156314, 100}, - "9adf133053f0691a0ec12e73cbf1875a90c9268b4f09162fc3387fd76ecb3bcc-33d346d177279673/repodata/90fd2e7463220a07457e76ae905e1bad754c29e22202bb3202c971a5ece28396-comps-AppStream.aarch64.xml.gz": fileInfo{199426, 100}, - "9adf133053f0691a0ec12e73cbf1875a90c9268b4f09162fc3387fd76ecb3bcc-33d346d177279673/repodata/77a66c76b5f6ba51aaee6c0cf76d701601e8b622d1701d1781dabec434f27413-filelists.xml.gz": fileInfo{14370201, 100}, - "9adf133053f0691a0ec12e73cbf1875a90c9268b4f09162fc3387fd76ecb3bcc-33d346d177279673/repodata/1941c723c94218eed43eac3174aa94cefbe921e15547c39251a95895024207ca-primary.xml.gz": fileInfo{11439375, 100}, - "9adf133053f0691a0ec12e73cbf1875a90c9268b4f09162fc3387fd76ecb3bcc-33d346d177279673/repodata/repomd.xml": fileInfo{13285, 100}, - "df2665154150abf76f4d86156228a75c39f3f31a79d4a861d76b1edd89814b62.solv": fileInfo{1147863, 300}, - "df2665154150abf76f4d86156228a75c39f3f31a79d4a861d76b1edd89814b62-filenames.solvx": fileInfo{11133964, 300}, - "df2665154150abf76f4d86156228a75c39f3f31a79d4a861d76b1edd89814b62-98177081b9162766/repodata/gen/groups.xml": fileInfo{1298102, 300}, - "df2665154150abf76f4d86156228a75c39f3f31a79d4a861d76b1edd89814b62-98177081b9162766/repodata/d74783221709ab27d543c1cfc4c02562fde6edfaaaac33ac73a68ecf53188695-comps-BaseOS.aarch64.xml.gz": fileInfo{174076, 300}, - "df2665154150abf76f4d86156228a75c39f3f31a79d4a861d76b1edd89814b62-98177081b9162766/repodata/5ded48b4c9e238288130c6670d99f5febdb7273e4a31ac213836a15a2076514d-filelists.xml.gz": fileInfo{11081612, 300}, - "df2665154150abf76f4d86156228a75c39f3f31a79d4a861d76b1edd89814b62-98177081b9162766/repodata/8120caf8ebbb8c8b37f6f0dd027d866020ebe7acf9c9ce49ae9903b761986f0c-primary.xml.gz": fileInfo{1836471, 300}, - "df2665154150abf76f4d86156228a75c39f3f31a79d4a861d76b1edd89814b62-98177081b9162766/repodata/repomd.xml": fileInfo{12817, 300}, - }, - "fake-real": { // fake but resembling real data - "1111111111111111111111111111111111111111111111111111111111111111.solv": fileInfo{100, 0}, - "1111111111111111111111111111111111111111111111111111111111111111-filenames.solv": fileInfo{200, 0}, - "1111111111111111111111111111111111111111111111111111111111111111.whatever": fileInfo{110, 0}, - "1111111111111111111111111111111111111111111111111111111111111111/repodata/a": fileInfo{1000, 0}, - "1111111111111111111111111111111111111111111111111111111111111111/repodata/b": fileInfo{3829, 0}, - "1111111111111111111111111111111111111111111111111111111111111111/repodata/c": fileInfo{831989, 0}, - "2222222222222222222222222222222222222222222222222222222222222222.solv": fileInfo{120, 2}, - "2222222222222222222222222222222222222222222222222222222222222222-filenames.solv": fileInfo{232, 2}, - "2222222222222222222222222222222222222222222222222222222222222222.whatever": fileInfo{110, 2}, - "2222222222222222222222222222222222222222222222222222222222222222/repodata/a": fileInfo{1000, 2}, - "2222222222222222222222222222222222222222222222222222222222222222/repodata/b": fileInfo{3829, 2}, - "2222222222222222222222222222222222222222222222222222222222222222/repodata/c": fileInfo{831989, 2}, - "3333333333333333333333333333333333333333333333333333333333333333.solv": fileInfo{105, 4}, - "3333333333333333333333333333333333333333333333333333333333333333-filenames.solv": fileInfo{200, 4}, - "3333333333333333333333333333333333333333333333333333333333333333.whatever": fileInfo{110, 4}, - "3333333333333333333333333333333333333333333333333333333333333333/repodata/a": fileInfo{2390, 4}, - "3333333333333333333333333333333333333333333333333333333333333333/repodata/b": fileInfo{1234890, 4}, - "3333333333333333333333333333333333333333333333333333333333333333/repodata/c": fileInfo{483, 4}, - }, - "completely-fake": { // just a mess of files (including files without a repo ID) - "somefile": fileInfo{192, 10291920}, - "yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy-repofiley": fileInfo{29384, 11}, - "yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy-repofiley2": fileInfo{293, 31}, - "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-repofile": fileInfo{29384, 30}, - "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-repofileb": fileInfo{293, 45}, - }, -} - -type testCase struct { - cache testCache - maxSize uint64 - minSizeAfterShrink uint64 - repoIDsAfterShrink []string -} - -func getRepoIDs(ct testCache) []string { - idMap := make(map[string]bool) - ids := make([]string, 0) - for path := range ct { - if len(path) >= 64 { - id := path[:64] - if !idMap[id] { - idMap[id] = true - ids = append(ids, id) - } - } - } - return ids -} - -func TestCacheRead(t *testing.T) { - assert := assert.New(t) - for name, cfg := range testCfgs { - t.Run(name, func(t *testing.T) { - testCacheRoot := t.TempDir() - // Cache is now per-distro, use the name of the config as a distro name - s := createTestCache(filepath.Join(testCacheRoot, name), cfg) - - // Cache covers all distros, pass in top directory - cache := newRPMCache(testCacheRoot, 1048576) // 1 MiB, but doesn't matter for this test - - nrepos := len(getRepoIDs(cfg)) - assert.Equal(s, cache.size) - assert.Equal(nrepos, len(cache.repoElements)) - assert.Equal(nrepos, len(cache.repoRecency)) - }) - } -} - -func sizeSum(cfg testCache, repoIDFilter ...string) uint64 { - var sum uint64 - for path, info := range cfg { - if len(path) < 64 { - continue - } - rid := path[:64] - if len(repoIDFilter) == 0 || (len(repoIDFilter) > 0 && strSliceContains(repoIDFilter, rid)) { - sum += info.size - } - } - return sum -} - -func TestCacheCleanup(t *testing.T) { - rhelRecentRepoSize := sizeSum(testCfgs["rhel84-aarch64"], "df2665154150abf76f4d86156228a75c39f3f31a79d4a861d76b1edd89814b62") - rhelTotalRepoSize := sizeSum(testCfgs["rhel84-aarch64"]) - - fakeRealSize2 := sizeSum(testCfgs["fake-real"], "2222222222222222222222222222222222222222222222222222222222222222") - fakeRealSize3 := sizeSum(testCfgs["fake-real"], "3333333333333333333333333333333333333333333333333333333333333333") - - testCases := map[string]testCase{ - // max size 1 byte -> clean will delete everything - "fake-real-full-delete": { - cache: testCfgs["fake-real"], - maxSize: 1, - minSizeAfterShrink: 0, - }, - "rhel-full-delete": { - cache: testCfgs["rhel84-aarch64"], - maxSize: 1, - minSizeAfterShrink: 0, - }, - "completely-fake-full-delete": { - cache: testCfgs["completely-fake"], - maxSize: 1, - minSizeAfterShrink: 0, - }, - "completely-fake-full-delete-2": { - cache: testCfgs["completely-fake"], - maxSize: 100, - minSizeAfterShrink: 0, - }, - // max size a bit larger than most recent repo -> clean will delete older repos - "completely-fake-half-delete": { - cache: testCfgs["completely-fake"], - maxSize: 29384 + 293 + 1, // one byte larger than the files of one repo - minSizeAfterShrink: 29384 + 293, // size of files from one repo - repoIDsAfterShrink: []string{"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}, // most recent repo timestamp (45) - }, - "rhel-half-delete": { - cache: testCfgs["rhel84-aarch64"], - maxSize: rhelRecentRepoSize + 102400, // most recent repo file sizes + 100k buffer (for directories) - minSizeAfterShrink: rhelRecentRepoSize, // after shrink it should be at least as big as the most recent repo - repoIDsAfterShrink: []string{"df2665154150abf76f4d86156228a75c39f3f31a79d4a861d76b1edd89814b62"}, // most recent repo timestamp (45) - }, - "fake-real-delete-1": { - cache: testCfgs["fake-real"], - maxSize: fakeRealSize3 + fakeRealSize2 + 102400, - minSizeAfterShrink: fakeRealSize3 + fakeRealSize2, - repoIDsAfterShrink: []string{"3333333333333333333333333333333333333333333333333333333333333333", "2222222222222222222222222222222222222222222222222222222222222222"}, - }, - "fake-real-delete-2": { - cache: testCfgs["fake-real"], - maxSize: fakeRealSize3 + 102400, - minSizeAfterShrink: fakeRealSize3, - repoIDsAfterShrink: []string{"3333333333333333333333333333333333333333333333333333333333333333"}, - }, - // max size is huge -> clean wont delete anything - "rhel-no-delete": { - cache: testCfgs["rhel84-aarch64"], - maxSize: 45097156608, // 42 GiB - minSizeAfterShrink: rhelTotalRepoSize, - repoIDsAfterShrink: []string{"df2665154150abf76f4d86156228a75c39f3f31a79d4a861d76b1edd89814b62", "9adf133053f0691a0ec12e73cbf1875a90c9268b4f09162fc3387fd76ecb3bcc"}, - }, - } - - for name, cfg := range testCases { - t.Run(name, func(t *testing.T) { - assert := assert.New(t) - testCacheRoot := t.TempDir() - // Cache is now per-distro, use the name of the config as a distro name - createTestCache(filepath.Join(testCacheRoot, name), cfg.cache) - - // Cache covers all distros, pass in top directory - cache := newRPMCache(testCacheRoot, cfg.maxSize) - - err := cache.shrink() - assert.NoError(err) - - // it's hard to predict the exact size after shrink because of directory sizes - // so let's just check that the new size is between min and max - assert.LessOrEqual(cfg.minSizeAfterShrink, cache.size) - assert.Greater(cfg.maxSize, cache.size) - assert.Equal(len(cfg.repoIDsAfterShrink), len(cache.repoElements)) - for _, id := range cfg.repoIDsAfterShrink { - assert.Contains(cache.repoElements, id) - } - }) - } -} - -// Mock package list to use in testing -var PackageList = rpmmd.PackageList{ - rpmmd.Package{ - Name: "package0", - Summary: "package summary", - Description: "package description", - URL: "https://package-url/", - Epoch: 0, - Version: "1.0.0", - Release: "3", - Arch: "x86_64", - License: "MIT", - }, -} - -func TestDNFCacheStoreGet(t *testing.T) { - cache := NewDNFCache(1 * time.Second) - assert.Equal(t, cache.timeout, 1*time.Second) - assert.NotNil(t, cache.RWMutex) - - cache.Store("notreallyahash", PackageList) - assert.Equal(t, 1, len(cache.results)) - pkgs, ok := cache.Get("notreallyahash") - assert.True(t, ok) - assert.Equal(t, "package0", pkgs[0].Name) -} - -func TestDNFCacheTimeout(t *testing.T) { - cache := NewDNFCache(1 * time.Second) - cache.Store("notreallyahash", PackageList) - _, ok := cache.Get("notreallyahash") - assert.True(t, ok) - time.Sleep(2 * time.Second) - _, ok = cache.Get("notreallyahash") - assert.False(t, ok) -} - -func TestDNFCacheCleanup(t *testing.T) { - cache := NewDNFCache(1 * time.Second) - cache.Store("notreallyahash", PackageList) - time.Sleep(2 * time.Second) - assert.Equal(t, 1, len(cache.results)) - cache.CleanCache() - assert.Equal(t, 0, len(cache.results)) - _, ok := cache.Get("notreallyahash") - assert.False(t, ok) -} - -func TestCleanupOldCacheDirs(t *testing.T) { - // Run the cleanup without the cache present and with dummy distro names - CleanupOldCacheDirs("/var/tmp/test-no-cache-rpmmd/", []string{"fedora-37", "fedora-38"}) - - testCacheRoot := t.TempDir() - // Make all the test caches under root, using their keys as a distro name. - var distros []string - for name, cfg := range testCfgs { - // Cache is now per-distro, use the name of the config as a distro name - createTestCache(filepath.Join(testCacheRoot, name), cfg) - distros = append(distros, name) - } - sort.Strings(distros) - - // Add the content of the 'fake-real' cache to the top directory - // this will be used to simulate an old cache without distro subdirs - createTestCache(testCacheRoot, testCfgs["fake-real"]) - - CleanupOldCacheDirs(testCacheRoot, distros) - - // The fake-real files under the root directory should all be gone. - for path := range testCfgs["fake-real"] { - _, err := os.Stat(filepath.Join(testCacheRoot, path)) - assert.NotNil(t, err) - } - - // The distro cache files should all still be present - for name, cfg := range testCfgs { - for path := range cfg { - _, err := os.Stat(filepath.Join(testCacheRoot, name, path)) - assert.Nil(t, err) - } - } - - // Remove the fake-real distro from the list - // This simulates retiring an older distribution and cleaning up its cache - distros = []string{} - for name := range testCfgs { - if name == "fake-real" { - continue - } - distros = append(distros, name) - } - // Cleanup should now remove the fake-real subdirectory and files - CleanupOldCacheDirs(testCacheRoot, distros) - - // The remaining distro's cache files should all still be present - for _, name := range distros { - for path := range testCfgs[name] { - _, err := os.Stat(filepath.Join(testCacheRoot, name, path)) - assert.Nil(t, err) - } - } - - // But the fake-real ones should be gone - for path := range testCfgs["fake-real"] { - _, err := os.Stat(filepath.Join(testCacheRoot, "fake-real", path)) - assert.NotNil(t, err) - } -} diff --git a/internal/dnfjson/dnfjson_test.go b/internal/dnfjson/dnfjson_test.go deleted file mode 100644 index 67ec0304b67..00000000000 --- a/internal/dnfjson/dnfjson_test.go +++ /dev/null @@ -1,612 +0,0 @@ -package dnfjson - -import ( - "flag" - "fmt" - "os" - "os/exec" - "strings" - "testing" - - "github.com/osbuild/images/pkg/rpmmd" - "github.com/osbuild/osbuild-composer/internal/common" - "github.com/osbuild/osbuild-composer/internal/mocks/rpmrepo" - "github.com/stretchr/testify/assert" -) - -var forceDNF = flag.Bool("force-dnf", false, "force dnf testing, making them fail instead of skip if dnf isn't installed") - -func dnfInstalled() bool { - cmd := exec.Command("python3", "-c", "import dnf") - cmd.Stderr = os.Stderr - if err := cmd.Run(); err != nil { - fmt.Fprintf(os.Stderr, "failed to import dnf: %s\n", err.Error()) - return false - } - return true -} - -func TestDepsolver(t *testing.T) { - if !*forceDNF { - // dnf tests aren't forced: skip them if the dnf sniff check fails - if !dnfInstalled() { - t.Skip() - } - } - - s := rpmrepo.NewTestServer() - defer s.Close() - - assert := assert.New(t) - - tmpdir := t.TempDir() - solver := NewSolver("platform:el9", "9", "x86_64", "rhel9.0", tmpdir) - solver.SetDNFJSONPath("../../dnf-json") - - { // single depsolve - pkgsets := []rpmmd.PackageSet{{Include: []string{"kernel", "vim-minimal", "tmux", "zsh"}, Repositories: []rpmmd.RepoConfig{s.RepoConfig}}} // everything you'll ever need - - deps, err := solver.Depsolve(pkgsets) - if err != nil { - t.Fatal(err) - } - exp := expectedResult(s.RepoConfig) - assert.Equal(deps, exp) - } - - { // chain depsolve of the same packages in order should produce the same result (at least in this case) - pkgsets := []rpmmd.PackageSet{ - {Include: []string{"kernel"}, Repositories: []rpmmd.RepoConfig{s.RepoConfig}}, - {Include: []string{"vim-minimal", "tmux", "zsh"}, Repositories: []rpmmd.RepoConfig{s.RepoConfig}}, - } - deps, err := solver.Depsolve(pkgsets) - if err != nil { - t.Fatal(err) - } - exp := expectedResult(s.RepoConfig) - assert.Equal(deps, exp) - } -} - -func TestMakeDepsolveRequest(t *testing.T) { - - baseOS := rpmmd.RepoConfig{ - Name: "baseos", - BaseURLs: []string{"https://example.org/baseos"}, - } - appstream := rpmmd.RepoConfig{ - Name: "appstream", - BaseURLs: []string{"https://example.org/appstream"}, - } - userRepo := rpmmd.RepoConfig{ - Name: "user-repo", - BaseURLs: []string{"https://example.org/user-repo"}, - } - userRepo2 := rpmmd.RepoConfig{ - Name: "user-repo-2", - BaseURLs: []string{"https://example.org/user-repo-2"}, - } - tests := []struct { - packageSets []rpmmd.PackageSet - args []transactionArgs - wantRepos []repoConfig - err bool - }{ - // single transaction - { - packageSets: []rpmmd.PackageSet{ - { - Include: []string{"pkg1"}, - Exclude: []string{"pkg2"}, - Repositories: []rpmmd.RepoConfig{ - baseOS, - appstream, - }, - }, - }, - args: []transactionArgs{ - { - PackageSpecs: []string{"pkg1"}, - ExcludeSpecs: []string{"pkg2"}, - RepoIDs: []string{baseOS.Hash(), appstream.Hash()}, - }, - }, - wantRepos: []repoConfig{ - { - ID: baseOS.Hash(), - Name: "baseos", - BaseURLs: []string{"https://example.org/baseos"}, - repoHash: "fdc2e5bb6cda8e113308df9396a005b81a55ec00ec29aa0a447952ad4248d803", - }, - { - ID: appstream.Hash(), - Name: "appstream", - BaseURLs: []string{"https://example.org/appstream"}, - repoHash: "71c280f63a779a8bf53961ec2f15d51d052021de024a4e06ae499b8029701808", - }, - }, - }, - // 2 transactions + package set specific repo - { - packageSets: []rpmmd.PackageSet{ - { - Include: []string{"pkg1"}, - Exclude: []string{"pkg2"}, - Repositories: []rpmmd.RepoConfig{baseOS, appstream}, - }, - { - Include: []string{"pkg3"}, - Repositories: []rpmmd.RepoConfig{baseOS, appstream, userRepo}, - }, - }, - args: []transactionArgs{ - { - PackageSpecs: []string{"pkg1"}, - ExcludeSpecs: []string{"pkg2"}, - RepoIDs: []string{baseOS.Hash(), appstream.Hash()}, - }, - { - PackageSpecs: []string{"pkg3"}, - RepoIDs: []string{baseOS.Hash(), appstream.Hash(), userRepo.Hash()}, - }, - }, - wantRepos: []repoConfig{ - { - ID: baseOS.Hash(), - Name: "baseos", - BaseURLs: []string{"https://example.org/baseos"}, - repoHash: "fdc2e5bb6cda8e113308df9396a005b81a55ec00ec29aa0a447952ad4248d803", - }, - { - ID: appstream.Hash(), - Name: "appstream", - BaseURLs: []string{"https://example.org/appstream"}, - repoHash: "71c280f63a779a8bf53961ec2f15d51d052021de024a4e06ae499b8029701808", - }, - { - ID: userRepo.Hash(), - Name: "user-repo", - BaseURLs: []string{"https://example.org/user-repo"}, - repoHash: "ffbdcbe6fefded88354e22cc292a62f1dac41b23f83c5eb95c1cdae84257a713", - }, - }, - }, - // 2 transactions + no package set specific repos - { - packageSets: []rpmmd.PackageSet{ - { - Include: []string{"pkg1"}, - Exclude: []string{"pkg2"}, - Repositories: []rpmmd.RepoConfig{baseOS, appstream}, - }, - { - Include: []string{"pkg3"}, - Repositories: []rpmmd.RepoConfig{baseOS, appstream}, - }, - }, - args: []transactionArgs{ - { - PackageSpecs: []string{"pkg1"}, - ExcludeSpecs: []string{"pkg2"}, - RepoIDs: []string{baseOS.Hash(), appstream.Hash()}, - }, - { - PackageSpecs: []string{"pkg3"}, - RepoIDs: []string{baseOS.Hash(), appstream.Hash()}, - }, - }, - wantRepos: []repoConfig{ - { - ID: baseOS.Hash(), - Name: "baseos", - BaseURLs: []string{"https://example.org/baseos"}, - repoHash: "fdc2e5bb6cda8e113308df9396a005b81a55ec00ec29aa0a447952ad4248d803", - }, - { - ID: appstream.Hash(), - Name: "appstream", - BaseURLs: []string{"https://example.org/appstream"}, - repoHash: "71c280f63a779a8bf53961ec2f15d51d052021de024a4e06ae499b8029701808", - }, - }, - }, - // 3 transactions + package set specific repo used by 2nd and 3rd transaction - { - packageSets: []rpmmd.PackageSet{ - { - Include: []string{"pkg1"}, - Exclude: []string{"pkg2"}, - Repositories: []rpmmd.RepoConfig{baseOS, appstream}, - }, - { - Include: []string{"pkg3"}, - Repositories: []rpmmd.RepoConfig{baseOS, appstream, userRepo}, - }, - { - Include: []string{"pkg4"}, - Repositories: []rpmmd.RepoConfig{baseOS, appstream, userRepo}, - }, - }, - args: []transactionArgs{ - { - PackageSpecs: []string{"pkg1"}, - ExcludeSpecs: []string{"pkg2"}, - RepoIDs: []string{baseOS.Hash(), appstream.Hash()}, - }, - { - PackageSpecs: []string{"pkg3"}, - RepoIDs: []string{baseOS.Hash(), appstream.Hash(), userRepo.Hash()}, - }, - { - PackageSpecs: []string{"pkg4"}, - RepoIDs: []string{baseOS.Hash(), appstream.Hash(), userRepo.Hash()}, - }, - }, - wantRepos: []repoConfig{ - { - ID: baseOS.Hash(), - Name: "baseos", - BaseURLs: []string{"https://example.org/baseos"}, - repoHash: "fdc2e5bb6cda8e113308df9396a005b81a55ec00ec29aa0a447952ad4248d803", - }, - { - ID: appstream.Hash(), - Name: "appstream", - BaseURLs: []string{"https://example.org/appstream"}, - repoHash: "71c280f63a779a8bf53961ec2f15d51d052021de024a4e06ae499b8029701808", - }, - { - ID: userRepo.Hash(), - Name: "user-repo", - BaseURLs: []string{"https://example.org/user-repo"}, - repoHash: "ffbdcbe6fefded88354e22cc292a62f1dac41b23f83c5eb95c1cdae84257a713", - }, - }, - }, - // 3 transactions + package set specific repo used by 2nd and 3rd transaction - // + 3rd transaction using another repo - { - packageSets: []rpmmd.PackageSet{ - { - Include: []string{"pkg1"}, - Exclude: []string{"pkg2"}, - Repositories: []rpmmd.RepoConfig{baseOS, appstream}, - }, - { - Include: []string{"pkg3"}, - Repositories: []rpmmd.RepoConfig{baseOS, appstream, userRepo}, - }, - { - Include: []string{"pkg4"}, - Repositories: []rpmmd.RepoConfig{baseOS, appstream, userRepo, userRepo2}, - }, - }, - args: []transactionArgs{ - { - PackageSpecs: []string{"pkg1"}, - ExcludeSpecs: []string{"pkg2"}, - RepoIDs: []string{baseOS.Hash(), appstream.Hash()}, - }, - { - PackageSpecs: []string{"pkg3"}, - RepoIDs: []string{baseOS.Hash(), appstream.Hash(), userRepo.Hash()}, - }, - { - PackageSpecs: []string{"pkg4"}, - RepoIDs: []string{baseOS.Hash(), appstream.Hash(), userRepo.Hash(), userRepo2.Hash()}, - }, - }, - wantRepos: []repoConfig{ - { - ID: baseOS.Hash(), - Name: "baseos", - BaseURLs: []string{"https://example.org/baseos"}, - repoHash: "fdc2e5bb6cda8e113308df9396a005b81a55ec00ec29aa0a447952ad4248d803", - }, - { - ID: appstream.Hash(), - Name: "appstream", - BaseURLs: []string{"https://example.org/appstream"}, - repoHash: "71c280f63a779a8bf53961ec2f15d51d052021de024a4e06ae499b8029701808", - }, - { - ID: userRepo.Hash(), - Name: "user-repo", - BaseURLs: []string{"https://example.org/user-repo"}, - repoHash: "ffbdcbe6fefded88354e22cc292a62f1dac41b23f83c5eb95c1cdae84257a713", - }, - { - ID: userRepo2.Hash(), - Name: "user-repo-2", - BaseURLs: []string{"https://example.org/user-repo-2"}, - repoHash: "67d1ea4f70638dbcd397c70c9a78a477f3f4ae0ac819a1f479bebfde700160c4", - }, - }, - }, - // Error: 3 transactions + 3rd one not using repo used by 2nd one - { - packageSets: []rpmmd.PackageSet{ - { - Include: []string{"pkg1"}, - Exclude: []string{"pkg2"}, - Repositories: []rpmmd.RepoConfig{baseOS, appstream}, - }, - { - Include: []string{"pkg3"}, - Repositories: []rpmmd.RepoConfig{baseOS, appstream, userRepo}, - }, - { - Include: []string{"pkg4"}, - Repositories: []rpmmd.RepoConfig{baseOS, appstream, userRepo2}, - }, - }, - err: true, - }, - // Error: 3 transactions but last one doesn't specify user repos in 2nd - { - packageSets: []rpmmd.PackageSet{ - { - Include: []string{"pkg1"}, - Exclude: []string{"pkg2"}, - Repositories: []rpmmd.RepoConfig{baseOS, appstream}, - }, - { - Include: []string{"pkg3"}, - Repositories: []rpmmd.RepoConfig{baseOS, appstream, userRepo, userRepo2}, - }, - { - Include: []string{"pkg4"}, - Repositories: []rpmmd.RepoConfig{baseOS, appstream}, - }, - }, - err: true, - }, - } - solver := NewSolver("", "", "", "", "") - for idx, tt := range tests { - t.Run(fmt.Sprintf("%d", idx), func(t *testing.T) { - req, _, err := solver.makeDepsolveRequest(tt.packageSets) - if tt.err { - assert.NotNilf(t, err, "expected an error, but got 'nil' instead") - assert.Nilf(t, req, "got non-nill request, but expected an error") - } else { - assert.Nilf(t, err, "expected 'nil', but got error instead") - assert.NotNilf(t, req, "expected non-nill request, but got 'nil' instead") - - assert.Equal(t, tt.args, req.Arguments.Transactions) - assert.Equal(t, tt.wantRepos, req.Arguments.Repos) - } - }) - } -} - -func expectedResult(repo rpmmd.RepoConfig) []rpmmd.PackageSpec { - // need to change the url for the RemoteLocation and the repo ID since the port is different each time and we don't want to have a fixed one - expectedTemplate := []rpmmd.PackageSpec{ - {Name: "acl", Epoch: 0, Version: "2.3.1", Release: "3.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/acl-2.3.1-3.el9.x86_64.rpm", Checksum: "sha256:986044c3837eddbc9231d7be5e5fc517e245296978b988a803bc9f9172fe84ea", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "alternatives", Epoch: 0, Version: "1.20", Release: "2.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/alternatives-1.20-2.el9.x86_64.rpm", Checksum: "sha256:1851d5f64ebaeac67c5c2d9e4adc1e73aa6433b44a167268a3510c3d056062db", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "audit-libs", Epoch: 0, Version: "3.0.7", Release: "100.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/audit-libs-3.0.7-100.el9.x86_64.rpm", Checksum: "sha256:a4bdda48abaedffeb74398cd55afbd00cb4153ae24bd2a3e6de9d87462df5ffa", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "basesystem", Epoch: 0, Version: "11", Release: "13.el9", Arch: "noarch", RemoteLocation: "%s/Packages/basesystem-11-13.el9.noarch.rpm", Checksum: "sha256:a7a687ef39dd28d01d34fab18ea7e3e87f649f6c202dded82260b7ea625b9973", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "bash", Epoch: 0, Version: "5.1.8", Release: "2.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/bash-5.1.8-2.el9.x86_64.rpm", Checksum: "sha256:3d45552ea940db0556dd2dc73e92c20c0d7cbc9e617f251904f20475d4ecc6b6", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "bzip2-libs", Epoch: 0, Version: "1.0.8", Release: "8.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/bzip2-libs-1.0.8-8.el9.x86_64.rpm", Checksum: "sha256:fabd6b5c065c2b9d4a8d39a938ae577d801de2ddc73c8cdf6f7803db29c28d0a", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "ca-certificates", Epoch: 0, Version: "2020.2.50", Release: "94.el9", Arch: "noarch", RemoteLocation: "%s/Packages/ca-certificates-2020.2.50-94.el9.noarch.rpm", Checksum: "sha256:3099471d984fb7d9e1cf42406eb08c154b34b8560742ed1f5eb9139f059c2d09", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "centos-gpg-keys", Epoch: 0, Version: "9.0", Release: "9.el9", Arch: "noarch", RemoteLocation: "%s/Packages/centos-gpg-keys-9.0-9.el9.noarch.rpm", Checksum: "sha256:2785ab660c124c9bda4ef4057e72d7fc73e8ac254ddd09a5541a6d323740dad7", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "centos-stream-release", Epoch: 0, Version: "9.0", Release: "9.el9", Arch: "noarch", RemoteLocation: "%s/Packages/centos-stream-release-9.0-9.el9.noarch.rpm", Checksum: "sha256:44246cc9b62ac0fb833ece49cff6ac0a932234fcba26b8c895f42baebf0a19c2", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "centos-stream-repos", Epoch: 0, Version: "9.0", Release: "9.el9", Arch: "noarch", RemoteLocation: "%s/Packages/centos-stream-repos-9.0-9.el9.noarch.rpm", Checksum: "sha256:90208bb7dd1558a3311a28ea06d75ad7e83be3f223c5fb2eff1b9ac47bb98ebe", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "coreutils", Epoch: 0, Version: "8.32", Release: "31.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/coreutils-8.32-31.el9.x86_64.rpm", Checksum: "sha256:647a3b9a52df25cb2aaf7f3715b219839b4cf71913638c88172d925173280812", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "coreutils-common", Epoch: 0, Version: "8.32", Release: "31.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/coreutils-common-8.32-31.el9.x86_64.rpm", Checksum: "sha256:864b166ac6d55cad5010da369fd7ad4872f81c2c111867dfbf96ccf4c8273c7e", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "cpio", Epoch: 0, Version: "2.13", Release: "16.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/cpio-2.13-16.el9.x86_64.rpm", Checksum: "sha256:216b76d33443b732be42fe1d443e106a17e632ac9ca465928c37a8c0ede596a4", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "cracklib", Epoch: 0, Version: "2.9.6", Release: "27.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/cracklib-2.9.6-27.el9.x86_64.rpm", Checksum: "sha256:be9deb2efd06b4b2c1c130acae94c687161d04830119e65a989d904ba9fd1864", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "cracklib-dicts", Epoch: 0, Version: "2.9.6", Release: "27.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/cracklib-dicts-2.9.6-27.el9.x86_64.rpm", Checksum: "sha256:01df2a72fcdf988132e82764ce1a22a5a9513fa253b54e17d23058bdb53c2d85", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "crypto-policies", Epoch: 0, Version: "20220203", Release: "1.gitf03e75e.el9", Arch: "noarch", RemoteLocation: "%s/Packages/crypto-policies-20220203-1.gitf03e75e.el9.noarch.rpm", Checksum: "sha256:28d73d3800cb895b265bc0755c41241c593ebd7551a7da7f001f1e254b85c662", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "cryptsetup-libs", Epoch: 0, Version: "2.4.3", Release: "1.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/cryptsetup-libs-2.4.3-1.el9.x86_64.rpm", Checksum: "sha256:6919d88afdd2cf89982ec8edd4401ff93394a81873f81cf89bb273384f39104f", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "dbus", Epoch: 1, Version: "1.12.20", Release: "5.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/dbus-1.12.20-5.el9.x86_64.rpm", Checksum: "sha256:bb85bd28cc162e98da53b756b988ffd9350f4dbcc186f4c6962ae047e27f83d3", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "dbus-broker", Epoch: 0, Version: "28", Release: "5.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/dbus-broker-28-5.el9.x86_64.rpm", Checksum: "sha256:e9efdcdcfe430e474e3a7f09596a0a5a4314692d9ae846bb1ca86ff88ef81038", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "dbus-common", Epoch: 1, Version: "1.12.20", Release: "5.el9", Arch: "noarch", RemoteLocation: "%s/Packages/dbus-common-1.12.20-5.el9.noarch.rpm", Checksum: "sha256:150048b6fdafd4271bd6badab3f8a2e56b86967266f890770eab7578289cc773", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "device-mapper", Epoch: 9, Version: "1.02.181", Release: "3.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/device-mapper-1.02.181-3.el9.x86_64.rpm", Checksum: "sha256:5d1cd7733f147020ef3a9e08fa2e9d74a25e0ac89dfbadc69912541286146feb", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "device-mapper-libs", Epoch: 9, Version: "1.02.181", Release: "3.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/device-mapper-libs-1.02.181-3.el9.x86_64.rpm", Checksum: "sha256:a716ccca85fad2885af4d099f8c213eb4617d637d8ca6cf7d2b483b9de88a5d3", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "dracut", Epoch: 0, Version: "055", Release: "10.git20210824.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/dracut-055-10.git20210824.el9.x86_64.rpm", Checksum: "sha256:54015283e7f85fbee9d8a814c3bd60c7f81a6eb2ff480ca689e4526637a81c83", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "elfutils-default-yama-scope", Epoch: 0, Version: "0.186", Release: "1.el9", Arch: "noarch", RemoteLocation: "%s/Packages/elfutils-default-yama-scope-0.186-1.el9.noarch.rpm", Checksum: "sha256:0d2dcfaa16f83de78a251cf0b9a4c5e4ec7d4deb2e8d1cae7209be7745fabeb5", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "elfutils-libelf", Epoch: 0, Version: "0.186", Release: "1.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/elfutils-libelf-0.186-1.el9.x86_64.rpm", Checksum: "sha256:0e295e6150b6929408ac29792ec5f3ebeb4a20607eb553177f0e4899b3008d63", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "elfutils-libs", Epoch: 0, Version: "0.186", Release: "1.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/elfutils-libs-0.186-1.el9.x86_64.rpm", Checksum: "sha256:bcc47b8ab496d3d11d772b037e022bc3a4ce3b080b7d1c24fa7f999426a6b8f3", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "expat", Epoch: 0, Version: "2.2.10", Release: "5.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/expat-2.2.10-5.el9.x86_64.rpm", Checksum: "sha256:f97cd3c1e79b4dfff232ba0208c2e1a7d557608c1c37e8303de4f75387be9bb7", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "filesystem", Epoch: 0, Version: "3.16", Release: "2.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/filesystem-3.16-2.el9.x86_64.rpm", Checksum: "sha256:b69a472751268a1b9acd566dc7aa486fc1d6c8cb6d23f36d6a6dfead62e71475", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "findutils", Epoch: 1, Version: "4.8.0", Release: "5.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/findutils-4.8.0-5.el9.x86_64.rpm", Checksum: "sha256:552548e6d6f9623ccd9d31bb185bba3a66730da6e9d02296b417d501356c3848", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "gdbm-libs", Epoch: 1, Version: "1.19", Release: "4.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/gdbm-libs-1.19-4.el9.x86_64.rpm", Checksum: "sha256:8cd5a78cab8783dd241c52c4fcda28fb111c443887dd6d0fe38385e8383c98b3", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "glibc", Epoch: 0, Version: "2.34", Release: "21.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/glibc-2.34-21.el9.x86_64.rpm", Checksum: "sha256:6e40002c40b2e142dac88fba59d9893054b364585b2bc4b63ebf4cb3066616e2", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "glibc-common", Epoch: 0, Version: "2.34", Release: "21.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/glibc-common-2.34-21.el9.x86_64.rpm", Checksum: "sha256:606fda6e7bbe188920afcae1529967fc13c10763ed727d8ac6ce1037a8549228", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "glibc-gconv-extra", Epoch: 0, Version: "2.34", Release: "21.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/glibc-gconv-extra-2.34-21.el9.x86_64.rpm", Checksum: "sha256:cc159162a083a3adf927bcf36fe4c053f3dd3640ff2f7c544018d354e046eccb", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "glibc-minimal-langpack", Epoch: 0, Version: "2.34", Release: "21.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/glibc-minimal-langpack-2.34-21.el9.x86_64.rpm", Checksum: "sha256:bfec403288415b69acb3fd4bd014561d639673c7002c6968e3722e88cb104bdc", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "gmp", Epoch: 1, Version: "6.2.0", Release: "10.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/gmp-6.2.0-10.el9.x86_64.rpm", Checksum: "sha256:1a6ededc80029ef258288ddbf24bcce7c6228647841416950c88e3f14b7258a2", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "grep", Epoch: 0, Version: "3.6", Release: "5.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/grep-3.6-5.el9.x86_64.rpm", Checksum: "sha256:10a41b66b1fbd6eb055178e22c37199e5b49b4852e77c806f7af7211044a4a55", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "gzip", Epoch: 0, Version: "1.10", Release: "8.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/gzip-1.10-8.el9.x86_64.rpm", Checksum: "sha256:3b5ce98a03a3336a3f32ac7a0867fbc23da702e8618bfd20d49d882d42a460f4", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "json-c", Epoch: 0, Version: "0.14", Release: "11.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/json-c-0.14-11.el9.x86_64.rpm", Checksum: "sha256:1a75404c6bc8c1369914077dc99480e73bf13a40f15fd1cd8afc792b8600adf8", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "kbd", Epoch: 0, Version: "2.4.0", Release: "8.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/kbd-2.4.0-8.el9.x86_64.rpm", Checksum: "sha256:9c7395caebf76e15f496d9dc7690d772cb34f29d3f6626086b578565e412df51", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "kbd-misc", Epoch: 0, Version: "2.4.0", Release: "8.el9", Arch: "noarch", RemoteLocation: "%s/Packages/kbd-misc-2.4.0-8.el9.noarch.rpm", Checksum: "sha256:2dda3fe56c9a5bce5880dca58d905682c5e9f94ee023e43a3e311d2d411e1849", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "kernel", Epoch: 0, Version: "5.14.0", Release: "55.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/kernel-5.14.0-55.el9.x86_64.rpm", Checksum: "sha256:be5dba9121cda9eac9cc8f20b24f7e0d198364b370546c3665e4e6ce70a335b4", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "kernel-core", Epoch: 0, Version: "5.14.0", Release: "55.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/kernel-core-5.14.0-55.el9.x86_64.rpm", Checksum: "sha256:0afe6e35348485ae2696e6170dcf34370f33fcf42a357fc815e332d939dd1025", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "kernel-modules", Epoch: 0, Version: "5.14.0", Release: "55.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/kernel-modules-5.14.0-55.el9.x86_64.rpm", Checksum: "sha256:0914a0cbe0304289e224789f8e50e3e48a2525eba742ad764a1901e8c1351fb5", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "kmod", Epoch: 0, Version: "28", Release: "7.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/kmod-28-7.el9.x86_64.rpm", Checksum: "sha256:3d4bc7935959a109a10020d0d19a5e059719ae4c99c5f32d3020ff6da47d53ea", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "kmod-libs", Epoch: 0, Version: "28", Release: "7.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/kmod-libs-28-7.el9.x86_64.rpm", Checksum: "sha256:0727ff3131223446158aaec88cbf8f894a9e3592e73f231a1802629518eeb64b", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "kpartx", Epoch: 0, Version: "0.8.7", Release: "4.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/kpartx-0.8.7-4.el9.x86_64.rpm", Checksum: "sha256:8f05761c418a55f811404dc1515b131bafe9b1e3fe56274be6d880c8822984b5", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "libacl", Epoch: 0, Version: "2.3.1", Release: "3.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/libacl-2.3.1-3.el9.x86_64.rpm", Checksum: "sha256:fd829e9a03f6d321313002d6fcb37ee0434f548aa75fcd3ecdbdd891115de6a7", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "libattr", Epoch: 0, Version: "2.5.1", Release: "3.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/libattr-2.5.1-3.el9.x86_64.rpm", Checksum: "sha256:d4db095a015e84065f27a642ee7829cd1690041ba8c51501f908cc34760c9409", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "libblkid", Epoch: 0, Version: "2.37.2", Release: "1.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/libblkid-2.37.2-1.el9.x86_64.rpm", Checksum: "sha256:f5cf36e8081c2d72e9dd64dd1614155857dd6e71ebb2237e5b0e11ace5481bac", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "libcap", Epoch: 0, Version: "2.48", Release: "8.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/libcap-2.48-8.el9.x86_64.rpm", Checksum: "sha256:c41f91075ee8ca480c2631a485bcc74876b9317b4dc9bd66566da32313621bd7", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "libcap-ng", Epoch: 0, Version: "0.8.2", Release: "6.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/libcap-ng-0.8.2-6.el9.x86_64.rpm", Checksum: "sha256:0ee8b2d02fd362223fcf36c11297e1f9ae939f76cef09c0bce9cad5f53287122", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "libdb", Epoch: 0, Version: "5.3.28", Release: "53.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/libdb-5.3.28-53.el9.x86_64.rpm", Checksum: "sha256:3a44d15d695944bde4e7290800b815f98bfd9cd6f6f868cec3e8991606f556d5", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "libeconf", Epoch: 0, Version: "0.4.1", Release: "2.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/libeconf-0.4.1-2.el9.x86_64.rpm", Checksum: "sha256:1d6fe169e74daff38ad5b0d6424c4d1b14545d5974c39e4421d20838a68f5892", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "libevent", Epoch: 0, Version: "2.1.12", Release: "6.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/libevent-2.1.12-6.el9.x86_64.rpm", Checksum: "sha256:82179f6f214ddf523e143c16c3474ccf8832551c6305faf89edfbd83b3424d48", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "libfdisk", Epoch: 0, Version: "2.37.2", Release: "1.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/libfdisk-2.37.2-1.el9.x86_64.rpm", Checksum: "sha256:a41bad6e261c719224abfd6745ccb1d2a0cac9d024ca9656904001a38d7cd8c7", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "libffi", Epoch: 0, Version: "3.4.2", Release: "7.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/libffi-3.4.2-7.el9.x86_64.rpm", Checksum: "sha256:f0ac4b6454d4018833dd10e3f437d8271c7c6a628d99b37e75b83af890b86bc4", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "libgcc", Epoch: 0, Version: "11.2.1", Release: "9.1.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/libgcc-11.2.1-9.1.el9.x86_64.rpm", Checksum: "sha256:6fc0ea086ecf7ae65bdfc2e9ba6503ee9d9bf717f3c0a55c4bc9c99e12608edf", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "libgcrypt", Epoch: 0, Version: "1.10.0", Release: "1.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/libgcrypt-1.10.0-1.el9.x86_64.rpm", Checksum: "sha256:059533802d440244c1fb6f777e20ed445220cdc85300e164d8ffb0ecfdfb42f4", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "libgpg-error", Epoch: 0, Version: "1.42", Release: "5.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/libgpg-error-1.42-5.el9.x86_64.rpm", Checksum: "sha256:a1883804c376f737109f4dff06077d1912b90150a732d11be7bc5b3b67e512fe", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "libkcapi", Epoch: 0, Version: "1.3.1", Release: "3.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/libkcapi-1.3.1-3.el9.x86_64.rpm", Checksum: "sha256:9b4733e8a790b51d845cedfa67e6321fd5a2923dd0fb7ce1f5e630aa382ba3c1", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "libkcapi-hmaccalc", Epoch: 0, Version: "1.3.1", Release: "3.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/libkcapi-hmaccalc-1.3.1-3.el9.x86_64.rpm", Checksum: "sha256:1b39f1faa4a8813cbfa2650e82f6ea06a4248e0c493ce7e4829c7d892e7757ed", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "libmount", Epoch: 0, Version: "2.37.2", Release: "1.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/libmount-2.37.2-1.el9.x86_64.rpm", Checksum: "sha256:26191af0cc7acf9bb335ebd8b4ed357582165ee3be78fce9f4395f84ad2805ce", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "libpwquality", Epoch: 0, Version: "1.4.4", Release: "8.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/libpwquality-1.4.4-8.el9.x86_64.rpm", Checksum: "sha256:93f00e5efac1e3f1ecbc0d6a4c068772cb12912cd20c9ea58716d6c0cd004886", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "libseccomp", Epoch: 0, Version: "2.5.2", Release: "2.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/libseccomp-2.5.2-2.el9.x86_64.rpm", Checksum: "sha256:d5c1c4473ebf5fd9c605eb866118d7428cdec9b188db18e45545801cc2a689c3", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "libselinux", Epoch: 0, Version: "3.3", Release: "2.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/libselinux-3.3-2.el9.x86_64.rpm", Checksum: "sha256:8e589b8408b04cbc19564620b229b6768edbaeb9090885d2273d84b8fc2f172b", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "libsemanage", Epoch: 0, Version: "3.3", Release: "1.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/libsemanage-3.3-1.el9.x86_64.rpm", Checksum: "sha256:7e62a0ed0a508486b565e48794a146022f344aeb6801834ad7c5afe6a97ef065", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "libsepol", Epoch: 0, Version: "3.3", Release: "2.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/libsepol-3.3-2.el9.x86_64.rpm", Checksum: "sha256:fc508147fe876706b61941a6ce554d7f7786f1ec3d097c4411fd6c7511acd289", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "libsigsegv", Epoch: 0, Version: "2.13", Release: "4.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/libsigsegv-2.13-4.el9.x86_64.rpm", Checksum: "sha256:931bd0ec7050e8c3b37a9bfb489e30af32486a3c77203f1e9113eeceaa3b0a3a", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "libsmartcols", Epoch: 0, Version: "2.37.2", Release: "1.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/libsmartcols-2.37.2-1.el9.x86_64.rpm", Checksum: "sha256:c62433784604a2e6571e0fcbdd4a2d60f059c5c15624207998c5f03b18d9d382", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "libtasn1", Epoch: 0, Version: "4.16.0", Release: "7.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/libtasn1-4.16.0-7.el9.x86_64.rpm", Checksum: "sha256:656031558c53da4a5b3ccfd883bd6d55996037891323152b1f07e8d1d5377406", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "libutempter", Epoch: 0, Version: "1.2.1", Release: "6.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/libutempter-1.2.1-6.el9.x86_64.rpm", Checksum: "sha256:fab361a9cba04490fd8b5664049983d1e57ebf7c1080804726ba600708524125", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "libuuid", Epoch: 0, Version: "2.37.2", Release: "1.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/libuuid-2.37.2-1.el9.x86_64.rpm", Checksum: "sha256:ffd8317ccc6f80524b7bf15a8157d82f36a2b9c7478bb04eb4a34c18d019e6fa", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "libxcrypt", Epoch: 0, Version: "4.4.18", Release: "3.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/libxcrypt-4.4.18-3.el9.x86_64.rpm", Checksum: "sha256:97e88678b420f619a44608fff30062086aa1dd6931ecbd54f21bba005ff1de1a", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "libzstd", Epoch: 0, Version: "1.5.0", Release: "2.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/libzstd-1.5.0-2.el9.x86_64.rpm", Checksum: "sha256:8282f33f06743ab88e36fea978559ac617c44cda14eb65495cad37505fdace41", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "linux-firmware", Epoch: 0, Version: "20211216", Release: "124.el9", Arch: "noarch", RemoteLocation: "%s/Packages/linux-firmware-20211216-124.el9.noarch.rpm", Checksum: "sha256:0524c9cd96db4d57a5c190165ee2f8ade91854e21c19c61c6bd3504030ca24fa", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "linux-firmware-whence", Epoch: 0, Version: "20211216", Release: "124.el9", Arch: "noarch", RemoteLocation: "%s/Packages/linux-firmware-whence-20211216-124.el9.noarch.rpm", Checksum: "sha256:7c58504c14979118ea36352982aaa5814ba0f448e17c1baddb811b9511315a58", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "lz4-libs", Epoch: 0, Version: "1.9.3", Release: "5.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/lz4-libs-1.9.3-5.el9.x86_64.rpm", Checksum: "sha256:cba6a63054d070956a182e33269ee245bcfbe87e3e605c27816519db762a66ad", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "ncurses-base", Epoch: 0, Version: "6.2", Release: "8.20210508.el9", Arch: "noarch", RemoteLocation: "%s/Packages/ncurses-base-6.2-8.20210508.el9.noarch.rpm", Checksum: "sha256:e4cc4a4a479b8c27776debba5c20e8ef21dc4b513da62a25ed09f88386ac08a8", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "ncurses-libs", Epoch: 0, Version: "6.2", Release: "8.20210508.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/ncurses-libs-6.2-8.20210508.el9.x86_64.rpm", Checksum: "sha256:328f4d50e66b00f24344ebe239817204fda8e68b1d988c6943abb3c36231beaa", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "openssl", Epoch: 1, Version: "3.0.1", Release: "5.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/openssl-3.0.1-5.el9.x86_64.rpm", Checksum: "sha256:aa9ee73fe806ddeafab4a5b0e370256e6c61f67f67114101d0735aed3c9a5eda", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "openssl-libs", Epoch: 1, Version: "3.0.1", Release: "5.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/openssl-libs-3.0.1-5.el9.x86_64.rpm", Checksum: "sha256:fcf2515ec9115551c99d552da721803ecbca23b7ae5a974309975000e8bef666", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "openssl-pkcs11", Epoch: 0, Version: "0.4.11", Release: "7.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/openssl-pkcs11-0.4.11-7.el9.x86_64.rpm", Checksum: "sha256:4be41142a5fb2b4cd6d812e126838cffa57b7c84e5a79d65f66bb9cf1d2830a3", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "p11-kit", Epoch: 0, Version: "0.24.1", Release: "2.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/p11-kit-0.24.1-2.el9.x86_64.rpm", Checksum: "sha256:da167e41efd19cf25fd1c708b6f123d0203824324b14dd32401d49f2aa0ef0a6", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "p11-kit-trust", Epoch: 0, Version: "0.24.1", Release: "2.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/p11-kit-trust-0.24.1-2.el9.x86_64.rpm", Checksum: "sha256:ae9a633c58980328bef6358c6aa3c9ce0a65130c66fbfa4249922ddf5a3e2bb1", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "pam", Epoch: 0, Version: "1.5.1", Release: "9.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/pam-1.5.1-9.el9.x86_64.rpm", Checksum: "sha256:e64caedce811645ecdd78e7b4ae83c189aa884ff1ba6445374f39186c588c52c", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "pcre", Epoch: 0, Version: "8.44", Release: "3.el9.3", Arch: "x86_64", RemoteLocation: "%s/Packages/pcre-8.44-3.el9.3.x86_64.rpm", Checksum: "sha256:4a3cb61eb08c4f24e44756b6cb329812fe48d5c65c1fba546fadfa975045a8c5", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "pcre2", Epoch: 0, Version: "10.37", Release: "3.el9.1", Arch: "x86_64", RemoteLocation: "%s/Packages/pcre2-10.37-3.el9.1.x86_64.rpm", Checksum: "sha256:441e71f24e95b7c319f02264db53f88aa49778b2214f7dd5c75f1a3838e72dea", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "pcre2-syntax", Epoch: 0, Version: "10.37", Release: "3.el9.1", Arch: "noarch", RemoteLocation: "%s/Packages/pcre2-syntax-10.37-3.el9.1.noarch.rpm", Checksum: "sha256:55d7d2bc962334c236418b78199a496b05dea4efdc89e52453154bd1a5ad0e2e", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "procps-ng", Epoch: 0, Version: "3.3.17", Release: "4.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/procps-ng-3.3.17-4.el9.x86_64.rpm", Checksum: "sha256:3a7cc3f6d6dfdaeb9e7bfdb06d968c3ae78246ff4f793c2d2e2bd71156961d69", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "readline", Epoch: 0, Version: "8.1", Release: "4.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/readline-8.1-4.el9.x86_64.rpm", Checksum: "sha256:49945472925286ad89b0575657b43f9224777e36b442f0c88df67f0b61e26aee", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "sed", Epoch: 0, Version: "4.8", Release: "9.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/sed-4.8-9.el9.x86_64.rpm", Checksum: "sha256:a2c5d9a7f569abb5a592df1c3aaff0441bf827c9d0e2df0ab42b6c443dbc475f", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "setup", Epoch: 0, Version: "2.13.7", Release: "6.el9", Arch: "noarch", RemoteLocation: "%s/Packages/setup-2.13.7-6.el9.noarch.rpm", Checksum: "sha256:c0202712e8ec928cf61f3d777f23859ba6de2e85786e928ee5472fdde570aeee", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "shadow-utils", Epoch: 2, Version: "4.9", Release: "3.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/shadow-utils-4.9-3.el9.x86_64.rpm", Checksum: "sha256:46fca2ed21478e5143434da4fbd47ca4599a885fab9f8636f9c7ba54942dd27e", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "systemd", Epoch: 0, Version: "249", Release: "9.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/systemd-249-9.el9.x86_64.rpm", Checksum: "sha256:eb57c1242f8a7d68e6c258f40b048d8b7bd0749254ac97b7f399b3bc8011a81b", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "systemd-libs", Epoch: 0, Version: "249", Release: "9.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/systemd-libs-249-9.el9.x86_64.rpm", Checksum: "sha256:708fbc3c7fd77a21e0b391e2a80d5c344962de9865e79514b2c89210ef06ba39", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "systemd-pam", Epoch: 0, Version: "249", Release: "9.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/systemd-pam-249-9.el9.x86_64.rpm", Checksum: "sha256:eb7af981fb95425c68ccb0e4b95688672afd3032b57002e65fda8f734a089556", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "systemd-rpm-macros", Epoch: 0, Version: "249", Release: "9.el9", Arch: "noarch", RemoteLocation: "%s/Packages/systemd-rpm-macros-249-9.el9.noarch.rpm", Checksum: "sha256:3552f7cc9077d5831f859f6cf721d419eccc83cb381d14a7a1483512272bd586", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "systemd-udev", Epoch: 0, Version: "249", Release: "9.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/systemd-udev-249-9.el9.x86_64.rpm", Checksum: "sha256:d9c47e7088b8d279b8fd51e2274df957c3b68a265b42123ef9bbeb339d5ce3ba", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "tmux", Epoch: 0, Version: "3.2a", Release: "4.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/tmux-3.2a-4.el9.x86_64.rpm", Checksum: "sha256:68074b673bfac39af1fbfc85d43bc1c111456db01a563bda6400ad485de5eb70", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "tzdata", Epoch: 0, Version: "2021e", Release: "1.el9", Arch: "noarch", RemoteLocation: "%s/Packages/tzdata-2021e-1.el9.noarch.rpm", Checksum: "sha256:42d89577a0f887c4baa162250862dea2c1830b1ced56c45ced9645ad8e2a3671", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "util-linux", Epoch: 0, Version: "2.37.2", Release: "1.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/util-linux-2.37.2-1.el9.x86_64.rpm", Checksum: "sha256:4ca41a925461daa936db284a59bf325ea061cdb39d8738e288cc19afe30a8ae8", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "util-linux-core", Epoch: 0, Version: "2.37.2", Release: "1.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/util-linux-core-2.37.2-1.el9.x86_64.rpm", Checksum: "sha256:0313682867c1d07785a6d02ff87e1899f484bd1ce6348fa5c673eca78c0da2bd", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "vim-minimal", Epoch: 2, Version: "8.2.2637", Release: "11.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/vim-minimal-8.2.2637-11.el9.x86_64.rpm", Checksum: "sha256:ab6e48c8a118bed88dc734aaf21e743b57e94d448f9e38745c3b777af96809c7", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "xz", Epoch: 0, Version: "5.2.5", Release: "7.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/xz-5.2.5-7.el9.x86_64.rpm", Checksum: "sha256:b1c2d99961e50bb46400caa528aab9c7b361f5754427fd05ae22a7b551bf2ce5", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "xz-libs", Epoch: 0, Version: "5.2.5", Release: "7.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/xz-libs-5.2.5-7.el9.x86_64.rpm", Checksum: "sha256:770819da28cce56e2e2b141b0eee1694d7f3dcf78a5700e1469436461399f001", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "zlib", Epoch: 0, Version: "1.2.11", Release: "31.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/zlib-1.2.11-31.el9.x86_64.rpm", Checksum: "sha256:1c59b113fda8863e9066cc5d01c6d00bd9c50c4650e1c5b932082c8886e185d1", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - {Name: "zsh", Epoch: 0, Version: "5.8", Release: "7.el9", Arch: "x86_64", RemoteLocation: "%s/Packages/zsh-5.8-7.el9.x86_64.rpm", Checksum: "sha256:133da157fbd2b43e4a41af3ba7bb5267cf9ebed0aaf8124a76e5eca948c37572", Secrets: "", CheckGPG: false, IgnoreSSL: true}, - } - - exp := []rpmmd.PackageSpec(expectedTemplate) - for idx := range exp { - urlTemplate := exp[idx].RemoteLocation - exp[idx].RemoteLocation = fmt.Sprintf(urlTemplate, strings.Join(repo.BaseURLs, ",")) - } - return exp -} - -func TestErrorRepoInfo(t *testing.T) { - if !*forceDNF { - // dnf tests aren't forced: skip them if the dnf sniff check fails - if !dnfInstalled() { - t.Skip() - } - } - - assert := assert.New(t) - - type testCase struct { - repo rpmmd.RepoConfig - expMsg string - } - - testCases := []testCase{ - { - repo: rpmmd.RepoConfig{ - Name: "", - BaseURLs: []string{"https://0.0.0.0/baseos/repo"}, - Metalink: "https://0.0.0.0/baseos/metalink", - }, - expMsg: "[https://0.0.0.0/baseos/repo]", - }, - { - repo: rpmmd.RepoConfig{ - Name: "baseos", - BaseURLs: []string{"https://0.0.0.0/baseos/repo"}, - Metalink: "https://0.0.0.0/baseos/metalink", - }, - expMsg: "[baseos: https://0.0.0.0/baseos/repo]", - }, - { - repo: rpmmd.RepoConfig{ - Name: "fedora", - Metalink: "https://0.0.0.0/f35/metalink", - }, - expMsg: "[fedora: https://0.0.0.0/f35/metalink]", - }, - { - repo: rpmmd.RepoConfig{ - Name: "", - MirrorList: "https://0.0.0.0/baseos/mirrors", - }, - expMsg: "[https://0.0.0.0/baseos/mirrors]", - }, - } - - solver := NewSolver("f38", "38", "x86_64", "fedora-38", "/tmp/cache") - solver.SetDNFJSONPath("../../dnf-json") - for idx, tc := range testCases { - t.Run(fmt.Sprintf("%d", idx), func(t *testing.T) { - _, err := solver.Depsolve([]rpmmd.PackageSet{ - { - Include: []string{"osbuild"}, - Exclude: nil, - Repositories: []rpmmd.RepoConfig{tc.repo}, - }, - }) - assert.Error(err) - assert.Contains(err.Error(), tc.expMsg) - }) - } -} - -func TestRepoConfigHash(t *testing.T) { - repos := []rpmmd.RepoConfig{ - { - Id: "repoid-1", - Name: "A test repository", - BaseURLs: []string{"https://arepourl/"}, - IgnoreSSL: common.ToPtr(false), - }, - { - BaseURLs: []string{"https://adifferenturl/"}, - }, - } - - solver := NewSolver("f38", "38", "x86_64", "fedora-38", "/tmp/cache") - solver.SetDNFJSONPath("../../dnf-json") - - rcs, err := solver.reposFromRPMMD(repos) - assert.Nil(t, err) - - hash := rcs[0].Hash() - assert.Equal(t, 64, len(hash)) - - assert.NotEqual(t, hash, rcs[1].Hash()) -} - -func TestRequestHash(t *testing.T) { - solver := NewSolver("f38", "38", "x86_64", "fedora-38", "/tmp/cache") - repos := []rpmmd.RepoConfig{ - rpmmd.RepoConfig{ - Name: "A test repository", - BaseURLs: []string{"https://arepourl/"}, - IgnoreSSL: common.ToPtr(false), - }, - } - - req, err := solver.makeDumpRequest(repos) - assert.Nil(t, err) - hash := req.Hash() - assert.Equal(t, 64, len(hash)) - - req, err = solver.makeSearchRequest(repos, []string{"package0*"}) - assert.Nil(t, err) - assert.Equal(t, 64, len(req.Hash())) - assert.NotEqual(t, hash, req.Hash()) -} diff --git a/internal/mocks/dnfjson/dnfjson.go b/internal/mocks/dnfjson/dnfjson.go index a799914a403..bf1fe5110b2 100644 --- a/internal/mocks/dnfjson/dnfjson.go +++ b/internal/mocks/dnfjson/dnfjson.go @@ -8,8 +8,8 @@ import ( "path/filepath" "time" + "github.com/osbuild/images/pkg/dnfjson" "github.com/osbuild/images/pkg/rpmmd" - "github.com/osbuild/osbuild-composer/internal/dnfjson" ) func generatePackageList() rpmmd.PackageList { diff --git a/internal/store/json_test.go b/internal/store/json_test.go index 0e8f43d27a1..3e1d79a6374 100644 --- a/internal/store/json_test.go +++ b/internal/store/json_test.go @@ -13,11 +13,11 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/osbuild/images/pkg/arch" "github.com/osbuild/images/pkg/distro" "github.com/osbuild/images/pkg/distro/fedora" "github.com/osbuild/images/pkg/distro/test_distro" "github.com/osbuild/images/pkg/distroregistry" - "github.com/osbuild/images/pkg/platform" "github.com/osbuild/images/pkg/rpmmd" "github.com/osbuild/osbuild-composer/internal/blueprint" "github.com/osbuild/osbuild-composer/internal/common" @@ -314,7 +314,7 @@ func Test_upgrade(t *testing.T) { assert.NoError(err) // The test data has image types only supported on Fedora X86_64 - registry.SetHostArchName(platform.ARCH_X86_64.String()) + registry.SetHostArchName(arch.ARCH_X86_64.String()) store := newStoreFromV0(storeStruct, registry, nil) assert.Equal(1, len(store.blueprints)) assert.Equal(1, len(store.blueprintsChanges)) diff --git a/internal/weldr/api.go b/internal/weldr/api.go index 379a7dbfd2c..a14a318a01b 100644 --- a/internal/weldr/api.go +++ b/internal/weldr/api.go @@ -34,13 +34,13 @@ import ( "github.com/osbuild/images/pkg/container" "github.com/osbuild/images/pkg/distro" "github.com/osbuild/images/pkg/distroregistry" + "github.com/osbuild/images/pkg/dnfjson" "github.com/osbuild/images/pkg/osbuild" "github.com/osbuild/images/pkg/ostree" "github.com/osbuild/images/pkg/rhsm/facts" "github.com/osbuild/images/pkg/rpmmd" "github.com/osbuild/osbuild-composer/internal/blueprint" "github.com/osbuild/osbuild-composer/internal/common" - "github.com/osbuild/osbuild-composer/internal/dnfjson" "github.com/osbuild/osbuild-composer/internal/reporegistry" "github.com/osbuild/osbuild-composer/internal/store" "github.com/osbuild/osbuild-composer/internal/target" diff --git a/internal/weldr/api_test.go b/internal/weldr/api_test.go index aab08bbc2ce..ea36d9437e2 100644 --- a/internal/weldr/api_test.go +++ b/internal/weldr/api_test.go @@ -22,12 +22,12 @@ import ( "github.com/osbuild/images/pkg/distro" "github.com/osbuild/images/pkg/distro/test_distro" "github.com/osbuild/images/pkg/distroregistry" + "github.com/osbuild/images/pkg/dnfjson" "github.com/osbuild/images/pkg/ostree" "github.com/osbuild/images/pkg/ostree/mock_ostree_repo" "github.com/osbuild/images/pkg/rpmmd" "github.com/osbuild/osbuild-composer/internal/blueprint" "github.com/osbuild/osbuild-composer/internal/common" - "github.com/osbuild/osbuild-composer/internal/dnfjson" dnfjson_mock "github.com/osbuild/osbuild-composer/internal/mocks/dnfjson" rpmmd_mock "github.com/osbuild/osbuild-composer/internal/mocks/rpmmd" "github.com/osbuild/osbuild-composer/internal/reporegistry" diff --git a/internal/worker/server_test.go b/internal/worker/server_test.go index eaa7fbd810e..a604aec7abd 100644 --- a/internal/worker/server_test.go +++ b/internal/worker/server_test.go @@ -16,11 +16,11 @@ import ( "github.com/osbuild/osbuild-composer/pkg/jobqueue" + "github.com/osbuild/images/pkg/arch" "github.com/osbuild/images/pkg/distro" "github.com/osbuild/images/pkg/distro/test_distro" "github.com/osbuild/images/pkg/manifest" "github.com/osbuild/images/pkg/osbuild" - "github.com/osbuild/images/pkg/platform" "github.com/osbuild/images/pkg/rpmmd" "github.com/osbuild/osbuild-composer/internal/jobqueue/fsjobqueue" "github.com/osbuild/osbuild-composer/internal/target" @@ -768,7 +768,7 @@ func enqueueAndFinishTestJobDependencies(s *worker.Server, deps []testJob) ([]uu switch dep.main.(type) { case *worker.OSBuildJob: job := dep.main.(*worker.OSBuildJob) - id, err = s.EnqueueOSBuildAsDependency(platform.ARCH_X86_64.String(), job, depUUIDs, "") + id, err = s.EnqueueOSBuildAsDependency(arch.ARCH_X86_64.String(), job, depUUIDs, "") if err != nil { return nil, err } @@ -838,7 +838,7 @@ func enqueueAndFinishTestJobDependencies(s *worker.Server, deps []testJob) ([]uu } // request the previously added Job - _, token, _, _, _, err := s.RequestJobById(context.Background(), platform.ARCH_X86_64.String(), id) + _, token, _, _, _, err := s.RequestJobById(context.Background(), arch.ARCH_X86_64.String(), id) if err != nil { return nil, err } diff --git a/vendor/cloud.google.com/go/iam/CHANGES.md b/vendor/cloud.google.com/go/iam/CHANGES.md index edcb5b58529..c4cacb03f88 100644 --- a/vendor/cloud.google.com/go/iam/CHANGES.md +++ b/vendor/cloud.google.com/go/iam/CHANGES.md @@ -1,6 +1,20 @@ # Changes +## [1.1.5](https://github.com/googleapis/google-cloud-go/compare/iam/v1.1.4...iam/v1.1.5) (2023-11-01) + + +### Bug Fixes + +* **iam:** Bump google.golang.org/api to v0.149.0 ([8d2ab9f](https://github.com/googleapis/google-cloud-go/commit/8d2ab9f320a86c1c0fab90513fc05861561d0880)) + +## [1.1.4](https://github.com/googleapis/google-cloud-go/compare/iam/v1.1.3...iam/v1.1.4) (2023-10-26) + + +### Bug Fixes + +* **iam:** Update grpc-go to v1.59.0 ([81a97b0](https://github.com/googleapis/google-cloud-go/commit/81a97b06cb28b25432e4ece595c55a9857e960b7)) + ## [1.1.3](https://github.com/googleapis/google-cloud-go/compare/iam/v1.1.2...iam/v1.1.3) (2023-10-12) diff --git a/vendor/cloud.google.com/go/internal/.repo-metadata-full.json b/vendor/cloud.google.com/go/internal/.repo-metadata-full.json index 4a90b1599b2..31d1720471c 100644 --- a/vendor/cloud.google.com/go/internal/.repo-metadata-full.json +++ b/vendor/cloud.google.com/go/internal/.repo-metadata-full.json @@ -89,6 +89,16 @@ "release_level": "preview", "library_type": "GAPIC_AUTO" }, + "cloud.google.com/go/alloydb/connectors/apiv1": { + "api_shortname": "connectors", + "distribution_name": "cloud.google.com/go/alloydb/connectors/apiv1", + "description": "AlloyDB connectors", + "language": "go", + "client_library_type": "generated", + "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/alloydb/latest/connectors/apiv1", + "release_level": "preview", + "library_type": "GAPIC_AUTO" + }, "cloud.google.com/go/alloydb/connectors/apiv1alpha": { "api_shortname": "connectors", "distribution_name": "cloud.google.com/go/alloydb/connectors/apiv1alpha", @@ -99,6 +109,16 @@ "release_level": "preview", "library_type": "GAPIC_AUTO" }, + "cloud.google.com/go/alloydb/connectors/apiv1beta": { + "api_shortname": "connectors", + "distribution_name": "cloud.google.com/go/alloydb/connectors/apiv1beta", + "description": "AlloyDB connectors", + "language": "go", + "client_library_type": "generated", + "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/alloydb/latest/connectors/apiv1beta", + "release_level": "preview", + "library_type": "GAPIC_AUTO" + }, "cloud.google.com/go/analytics/admin/apiv1alpha": { "api_shortname": "analyticsadmin", "distribution_name": "cloud.google.com/go/analytics/admin/apiv1alpha", @@ -136,7 +156,7 @@ "language": "go", "client_library_type": "generated", "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/apigeeregistry/latest/apiv1", - "release_level": "preview", + "release_level": "stable", "library_type": "GAPIC_AUTO" }, "cloud.google.com/go/apikeys/apiv2": { @@ -356,7 +376,7 @@ "language": "go", "client_library_type": "generated", "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/bigquery/latest/biglake/apiv1", - "release_level": "preview", + "release_level": "stable", "library_type": "GAPIC_AUTO" }, "cloud.google.com/go/bigquery/biglake/apiv1alpha1": { @@ -715,7 +735,7 @@ "description": "Container Analysis API", "language": "go", "client_library_type": "generated", - "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/latest/containeranalysis/apiv1beta1", + "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/containeranalysis/latest/apiv1beta1", "release_level": "preview", "library_type": "GAPIC_AUTO" }, @@ -952,7 +972,7 @@ "cloud.google.com/go/dlp/apiv2": { "api_shortname": "dlp", "distribution_name": "cloud.google.com/go/dlp/apiv2", - "description": "Cloud Data Loss Prevention (DLP) API", + "description": "Cloud Data Loss Prevention (DLP)", "language": "go", "client_library_type": "generated", "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/dlp/latest/apiv2", @@ -1286,7 +1306,7 @@ "language": "go", "client_library_type": "generated", "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/language/latest/apiv2", - "release_level": "preview", + "release_level": "stable", "library_type": "GAPIC_AUTO" }, "cloud.google.com/go/lifesciences/apiv2beta": { @@ -1349,6 +1369,26 @@ "release_level": "stable", "library_type": "GAPIC_AUTO" }, + "cloud.google.com/go/maps/fleetengine/apiv1": { + "api_shortname": "fleetengine", + "distribution_name": "cloud.google.com/go/maps/fleetengine/apiv1", + "description": "Local Rides and Deliveries API", + "language": "go", + "client_library_type": "generated", + "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/maps/latest/fleetengine/apiv1", + "release_level": "stable", + "library_type": "GAPIC_AUTO" + }, + "cloud.google.com/go/maps/fleetengine/delivery/apiv1": { + "api_shortname": "fleetengine", + "distribution_name": "cloud.google.com/go/maps/fleetengine/delivery/apiv1", + "description": "Last Mile Fleet Solution Delivery API", + "language": "go", + "client_library_type": "generated", + "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/maps/latest/fleetengine/delivery/apiv1", + "release_level": "stable", + "library_type": "GAPIC_AUTO" + }, "cloud.google.com/go/maps/mapsplatformdatasets/apiv1alpha": { "api_shortname": "mapsplatformdatasets", "distribution_name": "cloud.google.com/go/maps/mapsplatformdatasets/apiv1alpha", @@ -1556,7 +1596,7 @@ "language": "go", "client_library_type": "generated", "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/notebooks/latest/apiv2", - "release_level": "preview", + "release_level": "stable", "library_type": "GAPIC_AUTO" }, "cloud.google.com/go/optimization/apiv1": { @@ -1676,7 +1716,7 @@ "language": "go", "client_library_type": "generated", "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/policysimulator/latest/apiv1", - "release_level": "preview", + "release_level": "stable", "library_type": "GAPIC_AUTO" }, "cloud.google.com/go/policytroubleshooter/apiv1": { @@ -1696,7 +1736,7 @@ "language": "go", "client_library_type": "generated", "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/policytroubleshooter/latest/iam/apiv3", - "release_level": "preview", + "release_level": "stable", "library_type": "GAPIC_AUTO" }, "cloud.google.com/go/privatecatalog/apiv1beta1": { @@ -1839,6 +1879,16 @@ "release_level": "preview", "library_type": "GAPIC_AUTO" }, + "cloud.google.com/go/redis/cluster/apiv1": { + "api_shortname": "redis", + "distribution_name": "cloud.google.com/go/redis/cluster/apiv1", + "description": "Google Cloud Memorystore for Redis API", + "language": "go", + "client_library_type": "generated", + "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/redis/latest/cluster/apiv1", + "release_level": "preview", + "library_type": "GAPIC_AUTO" + }, "cloud.google.com/go/resourcemanager/apiv2": { "api_shortname": "cloudresourcemanager", "distribution_name": "cloud.google.com/go/resourcemanager/apiv2", @@ -1949,6 +1999,16 @@ "release_level": "stable", "library_type": "GAPIC_AUTO" }, + "cloud.google.com/go/securesourcemanager/apiv1": { + "api_shortname": "securesourcemanager", + "distribution_name": "cloud.google.com/go/securesourcemanager/apiv1", + "description": "Secure Source Manager API", + "language": "go", + "client_library_type": "generated", + "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/securesourcemanager/latest/apiv1", + "release_level": "preview", + "library_type": "GAPIC_AUTO" + }, "cloud.google.com/go/security/privateca/apiv1": { "api_shortname": "privateca", "distribution_name": "cloud.google.com/go/security/privateca/apiv1", @@ -2069,6 +2129,16 @@ "release_level": "stable", "library_type": "GAPIC_AUTO" }, + "cloud.google.com/go/shopping/merchant/inventories/apiv1beta": { + "api_shortname": "merchantapi", + "distribution_name": "cloud.google.com/go/shopping/merchant/inventories/apiv1beta", + "description": "Merchant API", + "language": "go", + "client_library_type": "generated", + "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/shopping/latest/merchant/inventories/apiv1beta", + "release_level": "preview", + "library_type": "GAPIC_AUTO" + }, "cloud.google.com/go/spanner": { "api_shortname": "spanner", "distribution_name": "cloud.google.com/go/spanner", @@ -2275,8 +2345,8 @@ "description": "Video Stitcher API", "language": "go", "client_library_type": "generated", - "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/latest/video/stitcher/apiv1", - "release_level": "preview", + "client_documentation": "https://cloud.google.com/go/docs/reference/cloud.google.com/go/video/latest/stitcher/apiv1", + "release_level": "stable", "library_type": "GAPIC_AUTO" }, "cloud.google.com/go/video/transcoder/apiv1": { diff --git a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go index e3418aacd24..1dc18d35e3e 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/endpoints/defaults.go @@ -7743,6 +7743,18 @@ var awsPartition = partition{ }, }, }, + "cost-optimization-hub": service{ + Endpoints: serviceEndpoints{ + endpointKey{ + Region: "us-east-1", + }: endpoint{ + Hostname: "cost-optimization-hub.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + }, + }, "cur": service{ Endpoints: serviceEndpoints{ endpointKey{ @@ -32590,6 +32602,9 @@ var awsPartition = partition{ }, Deprecated: boxedTrue, }, + endpointKey{ + Region: "il-central-1", + }: endpoint{}, endpointKey{ Region: "sa-east-1", }: endpoint{}, @@ -35590,6 +35605,16 @@ var awsusgovPartition = partition{ }, }, }, + "arc-zonal-shift": service{ + Endpoints: serviceEndpoints{ + endpointKey{ + Region: "us-gov-east-1", + }: endpoint{}, + endpointKey{ + Region: "us-gov-west-1", + }: endpoint{}, + }, + }, "athena": service{ Endpoints: serviceEndpoints{ endpointKey{ @@ -42039,12 +42064,96 @@ var awsisoPartition = partition{ }, "rds": service{ Endpoints: serviceEndpoints{ + endpointKey{ + Region: "rds-fips.us-iso-east-1", + }: endpoint{ + Hostname: "rds-fips.us-iso-east-1.c2s.ic.gov", + CredentialScope: credentialScope{ + Region: "us-iso-east-1", + }, + Deprecated: boxedTrue, + }, + endpointKey{ + Region: "rds-fips.us-iso-west-1", + }: endpoint{ + Hostname: "rds-fips.us-iso-west-1.c2s.ic.gov", + CredentialScope: credentialScope{ + Region: "us-iso-west-1", + }, + Deprecated: boxedTrue, + }, + endpointKey{ + Region: "rds.us-iso-east-1", + }: endpoint{ + CredentialScope: credentialScope{ + Region: "us-iso-east-1", + }, + Deprecated: boxedTrue, + }, + endpointKey{ + Region: "rds.us-iso-east-1", + Variant: fipsVariant, + }: endpoint{ + Hostname: "rds-fips.us-iso-east-1.c2s.ic.gov", + CredentialScope: credentialScope{ + Region: "us-iso-east-1", + }, + Deprecated: boxedTrue, + }, + endpointKey{ + Region: "rds.us-iso-west-1", + }: endpoint{ + CredentialScope: credentialScope{ + Region: "us-iso-west-1", + }, + Deprecated: boxedTrue, + }, + endpointKey{ + Region: "rds.us-iso-west-1", + Variant: fipsVariant, + }: endpoint{ + Hostname: "rds-fips.us-iso-west-1.c2s.ic.gov", + CredentialScope: credentialScope{ + Region: "us-iso-west-1", + }, + Deprecated: boxedTrue, + }, endpointKey{ Region: "us-iso-east-1", }: endpoint{}, + endpointKey{ + Region: "us-iso-east-1", + Variant: fipsVariant, + }: endpoint{ + Hostname: "rds-fips.us-iso-east-1.c2s.ic.gov", + }, + endpointKey{ + Region: "us-iso-east-1-fips", + }: endpoint{ + Hostname: "rds-fips.us-iso-east-1.c2s.ic.gov", + CredentialScope: credentialScope{ + Region: "us-iso-east-1", + }, + Deprecated: boxedTrue, + }, endpointKey{ Region: "us-iso-west-1", }: endpoint{}, + endpointKey{ + Region: "us-iso-west-1", + Variant: fipsVariant, + }: endpoint{ + Hostname: "rds-fips.us-iso-west-1.c2s.ic.gov", + }, + endpointKey{ + Region: "us-iso-west-1-fips", + }: endpoint{ + Hostname: "rds-fips.us-iso-west-1.c2s.ic.gov", + CredentialScope: credentialScope{ + Region: "us-iso-west-1", + }, + Deprecated: boxedTrue, + }, }, }, "redshift": service{ @@ -42774,9 +42883,51 @@ var awsisobPartition = partition{ }, "rds": service{ Endpoints: serviceEndpoints{ + endpointKey{ + Region: "rds-fips.us-isob-east-1", + }: endpoint{ + Hostname: "rds-fips.us-isob-east-1.sc2s.sgov.gov", + CredentialScope: credentialScope{ + Region: "us-isob-east-1", + }, + Deprecated: boxedTrue, + }, + endpointKey{ + Region: "rds.us-isob-east-1", + }: endpoint{ + CredentialScope: credentialScope{ + Region: "us-isob-east-1", + }, + Deprecated: boxedTrue, + }, + endpointKey{ + Region: "rds.us-isob-east-1", + Variant: fipsVariant, + }: endpoint{ + Hostname: "rds-fips.us-isob-east-1.sc2s.sgov.gov", + CredentialScope: credentialScope{ + Region: "us-isob-east-1", + }, + Deprecated: boxedTrue, + }, endpointKey{ Region: "us-isob-east-1", }: endpoint{}, + endpointKey{ + Region: "us-isob-east-1", + Variant: fipsVariant, + }: endpoint{ + Hostname: "rds-fips.us-isob-east-1.sc2s.sgov.gov", + }, + endpointKey{ + Region: "us-isob-east-1-fips", + }: endpoint{ + Hostname: "rds-fips.us-isob-east-1.sc2s.sgov.gov", + CredentialScope: credentialScope{ + Region: "us-isob-east-1", + }, + Deprecated: boxedTrue, + }, }, }, "redshift": service{ diff --git a/vendor/github.com/aws/aws-sdk-go/aws/version.go b/vendor/github.com/aws/aws-sdk-go/aws/version.go index 6ba526cc8d3..e23a835a1d8 100644 --- a/vendor/github.com/aws/aws-sdk-go/aws/version.go +++ b/vendor/github.com/aws/aws-sdk-go/aws/version.go @@ -5,4 +5,4 @@ package aws const SDKName = "aws-sdk-go" // SDKVersion is the version of this SDK -const SDKVersion = "1.48.1" +const SDKVersion = "1.48.5" diff --git a/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go b/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go index 77246fe6c9b..4a303a01a48 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/ec2/api.go @@ -81066,15 +81066,15 @@ type CreateVolumeInput struct { // // The following are the supported values for each volume type: // - // * gp3: 3,000-16,000 IOPS + // * gp3: 3,000 - 16,000 IOPS // - // * io1: 100-64,000 IOPS + // * io1: 100 - 64,000 IOPS // - // * io2: 100-64,000 IOPS + // * io2: 100 - 256,000 IOPS // - // io1 and io2 volumes support up to 64,000 IOPS only on Instances built on + // For io2 volumes, you can achieve up to 256,000 IOPS on instances built on // the Nitro System (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances). - // Other instance families support performance up to 32,000 IOPS. + // On other instances, you can achieve performance up to 32,000 IOPS. // // This parameter is required for io1 and io2 volumes. The default for gp3 volumes // is 3,000 IOPS. This parameter is not supported for gp2, st1, sc1, or standard @@ -81118,13 +81118,15 @@ type CreateVolumeInput struct { // // The following are the supported volumes sizes for each volume type: // - // * gp2 and gp3: 1-16,384 + // * gp2 and gp3: 1 - 16,384 GiB // - // * io1 and io2: 4-16,384 + // * io1: 4 - 16,384 GiB // - // * st1 and sc1: 125-16,384 + // * io2: 4 - 65,536 GiB // - // * standard: 1-1,024 + // * st1 and sc1: 125 - 16,384 GiB + // + // * standard: 1 - 1024 GiB Size *int64 `type:"integer"` // The snapshot from which to create the volume. You must specify either a snapshot @@ -106400,8 +106402,8 @@ type DescribeSpotInstanceRequestsInput struct { // in GiB. // // * launch.block-device-mapping.volume-type - The type of EBS volume: gp2 - // for General Purpose SSD, io1 or io2 for Provisioned IOPS SSD, st1 for - // Throughput Optimized HDD, sc1for Cold HDD, or standard for Magnetic. + // or gp3 for General Purpose SSD, io1 or io2 for Provisioned IOPS SSD, st1 + // for Throughput Optimized HDD, sc1 for Cold HDD, or standard for Magnetic. // // * launch.group-id - The ID of the security group for the instance. // @@ -116785,19 +116787,18 @@ type EbsBlockDevice struct { // // The following are the supported values for each volume type: // - // * gp3: 3,000-16,000 IOPS + // * gp3: 3,000 - 16,000 IOPS // - // * io1: 100-64,000 IOPS + // * io1: 100 - 64,000 IOPS // - // * io2: 100-64,000 IOPS + // * io2: 100 - 256,000 IOPS // - // For io1 and io2 volumes, we guarantee 64,000 IOPS only for Instances built - // on the Nitro System (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances). - // Other instance families guarantee performance up to 32,000 IOPS. + // For io2 volumes, you can achieve up to 256,000 IOPS on instances built on + // the Nitro System (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances). + // On other instances, you can achieve performance up to 32,000 IOPS. // // This parameter is required for io1 and io2 volumes. The default for gp3 volumes - // is 3,000 IOPS. This parameter is not supported for gp2, st1, sc1, or standard - // volumes. + // is 3,000 IOPS. Iops *int64 `locationName:"iops" type:"integer"` // Identifier (key ID, key alias, ID ARN, or alias ARN) for a customer managed @@ -116829,20 +116830,21 @@ type EbsBlockDevice struct { // You can specify a volume size that is equal to or larger than the snapshot // size. // - // The following are the supported volumes sizes for each volume type: + // The following are the supported sizes for each volume type: + // + // * gp2 and gp3: 1 - 16,384 GiB // - // * gp2 and gp3:1-16,384 + // * io1: 4 - 16,384 GiB // - // * io1 and io2: 4-16,384 + // * io2: 4 - 65,536 GiB // - // * st1 and sc1: 125-16,384 + // * st1 and sc1: 125 - 16,384 GiB // - // * standard: 1-1,024 + // * standard: 1 - 1024 GiB VolumeSize *int64 `locationName:"volumeSize" type:"integer"` // The volume type. For more information, see Amazon EBS volume types (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html) - // in the Amazon EC2 User Guide. If the volume type is io1 or io2, you must - // specify the IOPS that the volume supports. + // in the Amazon EC2 User Guide. VolumeType *string `locationName:"volumeType" type:"string" enum:"VolumeType"` } @@ -142055,18 +142057,17 @@ type LaunchTemplateEbsBlockDeviceRequest struct { // // The following are the supported values for each volume type: // - // * gp3: 3,000-16,000 IOPS + // * gp3: 3,000 - 16,000 IOPS // - // * io1: 100-64,000 IOPS + // * io1: 100 - 64,000 IOPS // - // * io2: 100-64,000 IOPS + // * io2: 100 - 256,000 IOPS // - // For io1 and io2 volumes, we guarantee 64,000 IOPS only for Instances built - // on the Nitro System (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances). - // Other instance families guarantee performance up to 32,000 IOPS. + // For io2 volumes, you can achieve up to 256,000 IOPS on instances built on + // the Nitro System (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances). + // On other instances, you can achieve performance up to 32,000 IOPS. // - // This parameter is supported for io1, io2, and gp3 volumes only. This parameter - // is not supported for gp2, st1, sc1, or standard volumes. + // This parameter is supported for io1, io2, and gp3 volumes only. Iops *int64 `type:"integer"` // The ARN of the symmetric Key Management Service (KMS) CMK used for encryption. @@ -142084,13 +142085,15 @@ type LaunchTemplateEbsBlockDeviceRequest struct { // a volume size. The following are the supported volumes sizes for each volume // type: // - // * gp2 and gp3: 1-16,384 + // * gp2 and gp3: 1 - 16,384 GiB // - // * io1 and io2: 4-16,384 + // * io1: 4 - 16,384 GiB // - // * st1 and sc1: 125-16,384 + // * io2: 4 - 65,536 GiB // - // * standard: 1-1,024 + // * st1 and sc1: 125 - 16,384 GiB + // + // * standard: 1 - 1024 GiB VolumeSize *int64 `type:"integer"` // The volume type. For more information, see Amazon EBS volume types (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html) @@ -153779,11 +153782,15 @@ type ModifyVolumeInput struct { // // The following are the supported values for each volume type: // - // * gp3: 3,000-16,000 IOPS + // * gp3: 3,000 - 16,000 IOPS + // + // * io1: 100 - 64,000 IOPS // - // * io1: 100-64,000 IOPS + // * io2: 100 - 256,000 IOPS // - // * io2: 100-64,000 IOPS + // For io2 volumes, you can achieve up to 256,000 IOPS on instances built on + // the Nitro System (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances). + // On other instances, you can achieve performance up to 32,000 IOPS. // // Default: The existing value is retained if you keep the same volume type. // If you change the volume type to io1, io2, or gp3, the default is 3,000. @@ -153801,13 +153808,15 @@ type ModifyVolumeInput struct { // // The following are the supported volumes sizes for each volume type: // - // * gp2 and gp3: 1-16,384 + // * gp2 and gp3: 1 - 16,384 GiB + // + // * io1: 4 - 16,384 GiB // - // * io1 and io2: 4-16,384 + // * io2: 4 - 65,536 GiB // - // * st1 and sc1: 125-16,384 + // * st1 and sc1: 125 - 16,384 GiB // - // * standard: 1-1,024 + // * standard: 1 - 1024 GiB // // Default: The existing size is retained. Size *int64 `type:"integer"` @@ -171882,16 +171891,8 @@ type ScheduledInstancesEbs struct { // only to instances that support them. Encrypted *bool `type:"boolean"` - // The number of I/O operations per second (IOPS) to provision for an io1 or - // io2 volume, with a maximum ratio of 50 IOPS/GiB for io1, and 500 IOPS/GiB - // for io2. Range is 100 to 64,000 IOPS for volumes in most Regions. Maximum - // IOPS of 64,000 is guaranteed only on instances built on the Nitro System - // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances). - // Other instance families guarantee performance up to 32,000 IOPS. For more - // information, see Amazon EBS volume types (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html) - // in the Amazon EC2 User Guide. - // - // This parameter is valid only for Provisioned IOPS SSD (io1 and io2) volumes. + // The number of I/O operations per second (IOPS) to provision for a gp3, io1, + // or io2 volume. Iops *int64 `type:"integer"` // The ID of the snapshot. @@ -171903,9 +171904,7 @@ type ScheduledInstancesEbs struct { // a volume size, the default is the snapshot size. VolumeSize *int64 `type:"integer"` - // The volume type. gp2 for General Purpose SSD, io1 or io2 for Provisioned - // IOPS SSD, Throughput Optimized HDD for st1, Cold HDD for sc1, or standard - // for Magnetic. + // The volume type. // // Default: gp2 VolumeType *string `type:"string"` diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/api.go b/vendor/github.com/aws/aws-sdk-go/service/s3/api.go index ed5da158742..d2107e62a1a 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/s3/api.go +++ b/vendor/github.com/aws/aws-sdk-go/service/s3/api.go @@ -4690,6 +4690,10 @@ func (c *S3) GetObjectRequest(input *GetObjectInput) (req *request.Request, outp // as if the object was deleted and includes x-amz-delete-marker: true in // the response. // +// - If the specified version is a delete marker, the response returns a +// 405 (Method Not Allowed) error and the Last-Modified: timestamp response +// header. +// // For more information about versioning, see PutBucketVersioning (https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutBucketVersioning.html). // // # Overriding Response Header Values @@ -5710,9 +5714,10 @@ func (c *S3) HeadObjectRequest(input *HeadObjectInput) (req *request.Request, ou // // A HEAD request has the same options as a GET action on an object. The response // is identical to the GET response except that there is no response body. Because -// of this, if the HEAD request generates an error, it returns a generic 400 -// Bad Request, 403 Forbidden or 404 Not Found code. It is not possible to retrieve -// the exact exception beyond these error codes. +// of this, if the HEAD request generates an error, it returns a generic code, +// such as 400 Bad Request, 403 Forbidden, 404 Not Found, 405 Method Not Allowed, +// 412 Precondition Failed, or 304 Not Modified. It's not possible to retrieve +// the exact exception of these error codes. // // If you encrypt an object by using server-side encryption with customer-provided // encryption keys (SSE-C) when you store the object in Amazon S3, then when @@ -5768,6 +5773,16 @@ func (c *S3) HeadObjectRequest(input *HeadObjectInput) (req *request.Request, ou // - If you don’t have the s3:ListBucket permission, Amazon S3 returns // an HTTP status code 403 error. // +// Versioning +// +// - If the current version of the object is a delete marker, Amazon S3 behaves +// as if the object was deleted and includes x-amz-delete-marker: true in +// the response. +// +// - If the specified version is a delete marker, the response returns a +// 405 (Method Not Allowed) error and the Last-Modified: timestamp response +// header. +// // The following actions are related to HeadObject: // // - GetObject (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html) @@ -6502,8 +6517,6 @@ func (c *S3) ListObjectVersionsRequest(input *ListObjectVersionsInput) (req *req // // To use this operation, you must have READ access to the bucket. // -// This action is not supported by Amazon S3 on Outposts. -// // The following operations are related to ListObjectVersions: // // - ListObjectsV2 (https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html) @@ -9960,8 +9973,8 @@ func (c *S3) PutObjectLockConfigurationRequest(input *PutObjectLockConfiguration // - The DefaultRetention period can be either Days or Years but you must // select one. You cannot specify Days and Years at the same time. // -// - You can only enable Object Lock for new buckets. If you want to turn -// on Object Lock for an existing bucket, contact Amazon Web Services Support. +// - You can enable Object Lock for new or existing buckets. For more information, +// see Configuring Object Lock (https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-lock-configure.html). // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -12834,8 +12847,9 @@ type CompleteMultipartUploadInput struct { RequestPayer *string `location:"header" locationName:"x-amz-request-payer" type:"string" enum:"RequestPayer"` // The server-side encryption (SSE) algorithm used to encrypt the object. This - // parameter is needed only when the object was created using a checksum algorithm. - // For more information, see Protecting data using SSE-C keys (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html) + // parameter is required only when the object was created using a checksum algorithm + // or if your bucket policy requires the use of SSE-C. For more information, + // see Protecting data using SSE-C keys (https://docs.aws.amazon.com/AmazonS3/latest/userguide/ServerSideEncryptionCustomerKeys.html#ssec-require-condition-key) // in the Amazon S3 User Guide. SSECustomerAlgorithm *string `location:"header" locationName:"x-amz-server-side-encryption-customer-algorithm" type:"string"` @@ -13672,7 +13686,8 @@ type CopyObjectInput struct { // Specifies the Amazon Web Services KMS Encryption Context to use for object // encryption. The value of this header is a base64-encoded UTF-8 string holding - // JSON with the encryption context key-value pairs. + // JSON with the encryption context key-value pairs. This value must be explicitly + // added to specify encryption context for CopyObject requests. // // SSEKMSEncryptionContext is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by CopyObjectInput's @@ -16930,7 +16945,7 @@ type DeleteMarkerEntry struct { // The object key. Key *string `min:"1" type:"string"` - // Date and time the object was last modified. + // Date and time when the object was last modified. LastModified *time.Time `type:"timestamp"` // The account that created the delete marker.> @@ -22841,7 +22856,7 @@ type GetObjectOutput struct { // The date and time at which the object is no longer cacheable. Expires *string `location:"header" locationName:"Expires" type:"string"` - // Creation date of the object. + // Date and time when the object was last modified. LastModified *time.Time `location:"header" locationName:"Last-Modified" type:"timestamp"` // A map of metadata to store with the object in S3. @@ -24514,7 +24529,7 @@ type HeadObjectOutput struct { // The date and time at which the object is no longer cacheable. Expires *string `location:"header" locationName:"Expires" type:"string"` - // Creation date of the object. + // Date and time when the object was last modified. LastModified *time.Time `location:"header" locationName:"Last-Modified" type:"timestamp"` // A map of metadata to store with the object in S3. @@ -29102,6 +29117,9 @@ type LoggingEnabled struct { // in the Amazon S3 User Guide. TargetGrants []*TargetGrant `locationNameList:"Grant" type:"list"` + // Amazon S3 key format for log objects. + TargetObjectKeyFormat *TargetObjectKeyFormat `type:"structure"` + // A prefix for all log object keys. If you store log files from multiple Amazon // S3 buckets in a single bucket, you can use a prefix to distinguish which // log files came from which bucket. @@ -29166,6 +29184,12 @@ func (s *LoggingEnabled) SetTargetGrants(v []*TargetGrant) *LoggingEnabled { return s } +// SetTargetObjectKeyFormat sets the TargetObjectKeyFormat field's value. +func (s *LoggingEnabled) SetTargetObjectKeyFormat(v *TargetObjectKeyFormat) *LoggingEnabled { + s.TargetObjectKeyFormat = v + return s +} + // SetTargetPrefix sets the TargetPrefix field's value. func (s *LoggingEnabled) SetTargetPrefix(v string) *LoggingEnabled { s.TargetPrefix = &v @@ -29590,9 +29614,10 @@ func (s *MultipartUpload) SetUploadId(v string) *MultipartUpload { type NoncurrentVersionExpiration struct { _ struct{} `type:"structure"` - // Specifies how many noncurrent versions Amazon S3 will retain. If there are - // this many more recent noncurrent versions, Amazon S3 will take the associated - // action. For more information about noncurrent versions, see Lifecycle configuration + // Specifies how many newer noncurrent versions must exist before Amazon S3 + // can perform the associated action on a given version. If there are this many + // more recent noncurrent versions, Amazon S3 will take the associated action. + // For more information about noncurrent versions, see Lifecycle configuration // elements (https://docs.aws.amazon.com/AmazonS3/latest/userguide/intro-lifecycle-rules.html) // in the Amazon S3 User Guide. NewerNoncurrentVersions *int64 `type:"integer"` @@ -29645,9 +29670,10 @@ func (s *NoncurrentVersionExpiration) SetNoncurrentDays(v int64) *NoncurrentVers type NoncurrentVersionTransition struct { _ struct{} `type:"structure"` - // Specifies how many noncurrent versions Amazon S3 will retain. If there are - // this many more recent noncurrent versions, Amazon S3 will take the associated - // action. For more information about noncurrent versions, see Lifecycle configuration + // Specifies how many newer noncurrent versions must exist before Amazon S3 + // can perform the associated action on a given version. If there are this many + // more recent noncurrent versions, Amazon S3 will take the associated action. + // For more information about noncurrent versions, see Lifecycle configuration // elements (https://docs.aws.amazon.com/AmazonS3/latest/userguide/intro-lifecycle-rules.html) // in the Amazon S3 User Guide. NewerNoncurrentVersions *int64 `type:"integer"` @@ -30339,7 +30365,7 @@ type ObjectVersion struct { // The object key. Key *string `min:"1" type:"string"` - // Date and time the object was last modified. + // Date and time when the object was last modified. LastModified *time.Time `type:"timestamp"` // Specifies the owner of the object. @@ -30840,6 +30866,44 @@ func (s *Part) SetSize(v int64) *Part { return s } +// Amazon S3 keys for log objects are partitioned in the following format: +// +// [DestinationPrefix][SourceAccountId]/[SourceRegion]/[SourceBucket]/[YYYY]/[MM]/[DD]/[YYYY]-[MM]-[DD]-[hh]-[mm]-[ss]-[UniqueString] +// +// PartitionedPrefix defaults to EventTime delivery when server access logs +// are delivered. +type PartitionedPrefix struct { + _ struct{} `locationName:"PartitionedPrefix" type:"structure"` + + // Specifies the partition date source for the partitioned prefix. PartitionDateSource + // can be EventTime or DeliveryTime. + PartitionDateSource *string `type:"string" enum:"PartitionDateSource"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s PartitionedPrefix) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s PartitionedPrefix) GoString() string { + return s.String() +} + +// SetPartitionDateSource sets the PartitionDateSource field's value. +func (s *PartitionedPrefix) SetPartitionDateSource(v string) *PartitionedPrefix { + s.PartitionDateSource = &v + return s +} + // The container element for a bucket's policy status. type PolicyStatus struct { _ struct{} `type:"structure"` @@ -34771,7 +34835,8 @@ type PutObjectInput struct { // encryption. The value of this header is a base64-encoded UTF-8 string holding // JSON with the encryption context key-value pairs. This value is stored as // object metadata and automatically gets passed on to Amazon Web Services KMS - // for future GetObject or CopyObject operations on this object. + // for future GetObject or CopyObject operations on this object. This value + // must be explicitly added during CopyObject operations. // // SSEKMSEncryptionContext is a sensitive parameter and its value will be // replaced with "sensitive" in string returned by PutObjectInput's @@ -38828,6 +38893,32 @@ func (s *ServerSideEncryptionRule) SetBucketKeyEnabled(v bool) *ServerSideEncryp return s } +// To use simple format for S3 keys for log objects, set SimplePrefix to an +// empty object. +// +// [DestinationPrefix][YYYY]-[MM]-[DD]-[hh]-[mm]-[ss]-[UniqueString] +type SimplePrefix struct { + _ struct{} `locationName:"SimplePrefix" type:"structure"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s SimplePrefix) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s SimplePrefix) GoString() string { + return s.String() +} + // A container that describes additional filters for identifying the source // objects that you want to replicate. You can choose to enable or disable the // replication of these objects. Currently, Amazon S3 supports only the filter @@ -39364,6 +39455,49 @@ func (s *TargetGrant) SetPermission(v string) *TargetGrant { return s } +// Amazon S3 key format for log objects. Only one format, PartitionedPrefix +// or SimplePrefix, is allowed. +type TargetObjectKeyFormat struct { + _ struct{} `type:"structure"` + + // Partitioned S3 key for log objects. + PartitionedPrefix *PartitionedPrefix `locationName:"PartitionedPrefix" type:"structure"` + + // To use the simple format for S3 keys for log objects. To specify SimplePrefix + // format, set SimplePrefix to {}. + SimplePrefix *SimplePrefix `locationName:"SimplePrefix" type:"structure"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s TargetObjectKeyFormat) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s TargetObjectKeyFormat) GoString() string { + return s.String() +} + +// SetPartitionedPrefix sets the PartitionedPrefix field's value. +func (s *TargetObjectKeyFormat) SetPartitionedPrefix(v *PartitionedPrefix) *TargetObjectKeyFormat { + s.PartitionedPrefix = v + return s +} + +// SetSimplePrefix sets the SimplePrefix field's value. +func (s *TargetObjectKeyFormat) SetSimplePrefix(v *SimplePrefix) *TargetObjectKeyFormat { + s.SimplePrefix = v + return s +} + // The S3 Intelligent-Tiering storage class is designed to optimize storage // costs by automatically moving data to the most cost-effective storage access // tier, without additional operational overhead. @@ -42259,6 +42393,22 @@ func OwnerOverride_Values() []string { } } +const ( + // PartitionDateSourceEventTime is a PartitionDateSource enum value + PartitionDateSourceEventTime = "EventTime" + + // PartitionDateSourceDeliveryTime is a PartitionDateSource enum value + PartitionDateSourceDeliveryTime = "DeliveryTime" +) + +// PartitionDateSource_Values returns all elements of the PartitionDateSource enum +func PartitionDateSource_Values() []string { + return []string{ + PartitionDateSourceEventTime, + PartitionDateSourceDeliveryTime, + } +} + const ( // PayerRequester is a Payer enum value PayerRequester = "Requester" diff --git a/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/upload_input.go b/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/upload_input.go index 54c4fb3ece8..75ae68726fa 100644 --- a/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/upload_input.go +++ b/vendor/github.com/aws/aws-sdk-go/service/s3/s3manager/upload_input.go @@ -215,7 +215,8 @@ type UploadInput struct { // encryption. The value of this header is a base64-encoded UTF-8 string holding // JSON with the encryption context key-value pairs. This value is stored as // object metadata and automatically gets passed on to Amazon Web Services KMS - // for future GetObject or CopyObject operations on this object. + // for future GetObject or CopyObject operations on this object. This value + // must be explicitly added during CopyObject operations. SSEKMSEncryptionContext *string `location:"header" locationName:"x-amz-server-side-encryption-context" type:"string" sensitive:"true"` // If x-amz-server-side-encryption has a valid value of aws:kms or aws:kms:dsse, diff --git a/vendor/github.com/osbuild/images/internal/common/helpers.go b/vendor/github.com/osbuild/images/internal/common/helpers.go index 729e05189b7..865b88c36bf 100644 --- a/vendor/github.com/osbuild/images/internal/common/helpers.go +++ b/vendor/github.com/osbuild/images/internal/common/helpers.go @@ -4,28 +4,11 @@ import ( "fmt" "io" "regexp" - "runtime" "sort" "strconv" "strings" ) -var RuntimeGOARCH = runtime.GOARCH - -func CurrentArch() string { - if RuntimeGOARCH == "amd64" { - return "x86_64" - } else if RuntimeGOARCH == "arm64" { - return "aarch64" - } else if RuntimeGOARCH == "ppc64le" { - return "ppc64le" - } else if RuntimeGOARCH == "s390x" { - return "s390x" - } else { - panic("unsupported architecture") - } -} - func PanicOnError(err error) { if err != nil { panic(err) diff --git a/vendor/github.com/osbuild/images/pkg/arch/arch.go b/vendor/github.com/osbuild/images/pkg/arch/arch.go new file mode 100644 index 00000000000..e986c013dc3 --- /dev/null +++ b/vendor/github.com/osbuild/images/pkg/arch/arch.go @@ -0,0 +1,81 @@ +package arch + +import ( + "runtime" +) + +type Arch uint64 + +const ( // architecture enum + ARCH_AARCH64 Arch = iota + ARCH_PPC64LE + ARCH_S390X + ARCH_X86_64 +) + +func (a Arch) String() string { + switch a { + case ARCH_AARCH64: + return "aarch64" + case ARCH_PPC64LE: + return "ppc64le" + case ARCH_S390X: + return "s390x" + case ARCH_X86_64: + return "x86_64" + default: + panic("invalid architecture") + } +} + +func FromString(a string) Arch { + switch a { + case "amd64": + fallthrough + case "x86_64": + return ARCH_X86_64 + case "arm64": + fallthrough + case "aarch64": + return ARCH_AARCH64 + case "s390x": + return ARCH_S390X + case "ppc64le": + return ARCH_PPC64LE + default: + panic("unsupported architecture") + } +} + +var runtimeGOARCH = runtime.GOARCH + +func Current() Arch { + switch runtimeGOARCH { + case "amd64": + return ARCH_X86_64 + case "arm64": + return ARCH_AARCH64 + case "ppc64le": + return ARCH_PPC64LE + case "s390x": + return ARCH_S390X + default: + panic("unsupported architecture") + } +} + +func IsX86_64() bool { + return Current() == ARCH_X86_64 +} + +func IsAarch64() bool { + return Current() == ARCH_AARCH64 +} + +func IsPPC() bool { + return Current() == ARCH_PPC64LE +} + +func IsS390x() bool { + return Current() == ARCH_S390X +} diff --git a/vendor/github.com/osbuild/images/pkg/distro/fedora/distro.go b/vendor/github.com/osbuild/images/pkg/distro/fedora/distro.go index bbacfe8bc3d..17b1d9d5f3a 100644 --- a/vendor/github.com/osbuild/images/pkg/distro/fedora/distro.go +++ b/vendor/github.com/osbuild/images/pkg/distro/fedora/distro.go @@ -10,6 +10,7 @@ import ( "github.com/osbuild/images/internal/environment" "github.com/osbuild/images/internal/fsnode" "github.com/osbuild/images/internal/oscap" + "github.com/osbuild/images/pkg/arch" "github.com/osbuild/images/pkg/distro" "github.com/osbuild/images/pkg/osbuild" "github.com/osbuild/images/pkg/platform" @@ -532,23 +533,23 @@ func newDistro(version int) distro.Distro { // Architecture definitions x86_64 := architecture{ - name: platform.ARCH_X86_64.String(), + name: arch.ARCH_X86_64.String(), distro: &rd, } aarch64 := architecture{ - name: platform.ARCH_AARCH64.String(), + name: arch.ARCH_AARCH64.String(), distro: &rd, } ppc64le := architecture{ distro: &rd, - name: platform.ARCH_PPC64LE.String(), + name: arch.ARCH_PPC64LE.String(), } s390x := architecture{ distro: &rd, - name: platform.ARCH_S390X.String(), + name: arch.ARCH_S390X.String(), } ociImgType := qcow2ImgType diff --git a/vendor/github.com/osbuild/images/pkg/distro/fedora/images.go b/vendor/github.com/osbuild/images/pkg/distro/fedora/images.go index 21cbb3da7dd..2bc6181776b 100644 --- a/vendor/github.com/osbuild/images/pkg/distro/fedora/images.go +++ b/vendor/github.com/osbuild/images/pkg/distro/fedora/images.go @@ -491,7 +491,7 @@ func iotImage(workload workload.Workload, if err != nil { return nil, fmt.Errorf("%s: %s", t.Name(), err.Error()) } - img := image.NewOSTreeDiskImage(commit) + img := image.NewOSTreeDiskImageFromCommit(commit) distro := t.Arch().Distro() @@ -522,9 +522,10 @@ func iotImage(workload workload.Workload, Name: "fedora-iot", } img.OSName = "fedora-iot" + img.LockRoot = true if !common.VersionLessThan(distro.Releasever(), "38") { - img.Ignition = true + img.KernelOptionsAppend = append(img.KernelOptionsAppend, "coreos.no_persist_ip") switch img.Platform.GetImageFormat() { case platform.FORMAT_RAW: img.IgnitionPlatform = "metal" @@ -565,7 +566,7 @@ func iotSimplifiedInstallerImage(workload workload.Workload, if err != nil { return nil, fmt.Errorf("%s: %s", t.Name(), err.Error()) } - rawImg := image.NewOSTreeDiskImage(commit) + rawImg := image.NewOSTreeDiskImageFromCommit(commit) customizations := bp.Customizations rawImg.Users = users.UsersFromBP(customizations.GetUsers()) @@ -585,10 +586,11 @@ func iotSimplifiedInstallerImage(workload workload.Workload, Name: "fedora-iot", } rawImg.OSName = "fedora" + rawImg.LockRoot = true if !common.VersionLessThan(t.arch.distro.osVersion, "38") { - rawImg.Ignition = true rawImg.IgnitionPlatform = "metal" + rawImg.KernelOptionsAppend = append(rawImg.KernelOptionsAppend, "coreos.no_persist_ip") if bpIgnition := customizations.GetIgnition(); bpIgnition != nil && bpIgnition.FirstBoot != nil && bpIgnition.FirstBoot.ProvisioningURL != "" { rawImg.KernelOptionsAppend = append(rawImg.KernelOptionsAppend, "ignition.config.url="+bpIgnition.FirstBoot.ProvisioningURL) } diff --git a/vendor/github.com/osbuild/images/pkg/distro/fedora/package_sets.go b/vendor/github.com/osbuild/images/pkg/distro/fedora/package_sets.go index cf080f3ad54..f440e12b1e3 100644 --- a/vendor/github.com/osbuild/images/pkg/distro/fedora/package_sets.go +++ b/vendor/github.com/osbuild/images/pkg/distro/fedora/package_sets.go @@ -7,7 +7,7 @@ import ( "strconv" "github.com/osbuild/images/internal/common" - "github.com/osbuild/images/pkg/platform" + "github.com/osbuild/images/pkg/arch" "github.com/osbuild/images/pkg/rpmmd" ) @@ -364,7 +364,7 @@ func anacondaPackageSet(t *imageType) rpmmd.PackageSet { } switch t.Arch().Name() { - case platform.ARCH_X86_64.String(): + case arch.ARCH_X86_64.String(): ps = ps.Append(rpmmd.PackageSet{ Include: []string{ "biosdevname", @@ -374,7 +374,7 @@ func anacondaPackageSet(t *imageType) rpmmd.PackageSet { }, }) - case platform.ARCH_AARCH64.String(): + case arch.ARCH_AARCH64.String(): ps = ps.Append(rpmmd.PackageSet{ Include: []string{ "dmidecode", diff --git a/vendor/github.com/osbuild/images/pkg/distro/fedora/partition_tables.go b/vendor/github.com/osbuild/images/pkg/distro/fedora/partition_tables.go index 322675a6a3c..8cda36bca81 100644 --- a/vendor/github.com/osbuild/images/pkg/distro/fedora/partition_tables.go +++ b/vendor/github.com/osbuild/images/pkg/distro/fedora/partition_tables.go @@ -2,13 +2,13 @@ package fedora import ( "github.com/osbuild/images/internal/common" + "github.com/osbuild/images/pkg/arch" "github.com/osbuild/images/pkg/disk" "github.com/osbuild/images/pkg/distro" - "github.com/osbuild/images/pkg/platform" ) var defaultBasePartitionTables = distro.BasePartitionTableMap{ - platform.ARCH_X86_64.String(): disk.PartitionTable{ + arch.ARCH_X86_64.String(): disk.PartitionTable{ UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0", Type: "gpt", Partitions: []disk.Partition{ @@ -60,7 +60,7 @@ var defaultBasePartitionTables = distro.BasePartitionTableMap{ }, }, }, - platform.ARCH_AARCH64.String(): disk.PartitionTable{ + arch.ARCH_AARCH64.String(): disk.PartitionTable{ UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0", Type: "gpt", Partitions: []disk.Partition{ @@ -106,7 +106,7 @@ var defaultBasePartitionTables = distro.BasePartitionTableMap{ }, }, }, - platform.ARCH_PPC64LE.String(): disk.PartitionTable{ + arch.ARCH_PPC64LE.String(): disk.PartitionTable{ UUID: "0x14fc63d2", Type: "dos", Partitions: []disk.Partition{ @@ -139,7 +139,7 @@ var defaultBasePartitionTables = distro.BasePartitionTableMap{ }, }, - platform.ARCH_S390X.String(): disk.PartitionTable{ + arch.ARCH_S390X.String(): disk.PartitionTable{ UUID: "0x14fc63d2", Type: "dos", Partitions: []disk.Partition{ @@ -170,7 +170,7 @@ var defaultBasePartitionTables = distro.BasePartitionTableMap{ } var minimalrawPartitionTables = distro.BasePartitionTableMap{ - platform.ARCH_X86_64.String(): disk.PartitionTable{ + arch.ARCH_X86_64.String(): disk.PartitionTable{ UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0", Type: "gpt", StartOffset: 8 * common.MebiByte, @@ -217,7 +217,7 @@ var minimalrawPartitionTables = distro.BasePartitionTableMap{ }, }, }, - platform.ARCH_AARCH64.String(): disk.PartitionTable{ + arch.ARCH_AARCH64.String(): disk.PartitionTable{ UUID: "0xc1748067", Type: "dos", StartOffset: 8 * common.MebiByte, @@ -265,7 +265,7 @@ var minimalrawPartitionTables = distro.BasePartitionTableMap{ } var iotBasePartitionTables = distro.BasePartitionTableMap{ - platform.ARCH_X86_64.String(): disk.PartitionTable{ + arch.ARCH_X86_64.String(): disk.PartitionTable{ UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0", Type: "gpt", Partitions: []disk.Partition{ @@ -311,7 +311,7 @@ var iotBasePartitionTables = distro.BasePartitionTableMap{ }, }, }, - platform.ARCH_AARCH64.String(): disk.PartitionTable{ + arch.ARCH_AARCH64.String(): disk.PartitionTable{ UUID: "0xc1748067", Type: "dos", Partitions: []disk.Partition{ @@ -358,7 +358,7 @@ var iotBasePartitionTables = distro.BasePartitionTableMap{ } var iotSimplifiedInstallerPartitionTables = distro.BasePartitionTableMap{ - platform.ARCH_X86_64.String(): disk.PartitionTable{ + arch.ARCH_X86_64.String(): disk.PartitionTable{ UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0", Type: "gpt", Partitions: []disk.Partition{ @@ -428,7 +428,7 @@ var iotSimplifiedInstallerPartitionTables = distro.BasePartitionTableMap{ }, }, }, - platform.ARCH_AARCH64.String(): disk.PartitionTable{ + arch.ARCH_AARCH64.String(): disk.PartitionTable{ UUID: "0xc1748067", Type: "dos", Partitions: []disk.Partition{ diff --git a/vendor/github.com/osbuild/images/pkg/distro/rhel7/azure.go b/vendor/github.com/osbuild/images/pkg/distro/rhel7/azure.go index 64112b08a50..11a956d6516 100644 --- a/vendor/github.com/osbuild/images/pkg/distro/rhel7/azure.go +++ b/vendor/github.com/osbuild/images/pkg/distro/rhel7/azure.go @@ -2,10 +2,10 @@ package rhel7 import ( "github.com/osbuild/images/internal/common" + "github.com/osbuild/images/pkg/arch" "github.com/osbuild/images/pkg/disk" "github.com/osbuild/images/pkg/distro" "github.com/osbuild/images/pkg/osbuild" - "github.com/osbuild/images/pkg/platform" "github.com/osbuild/images/pkg/rpmmd" "github.com/osbuild/images/pkg/subscription" ) @@ -273,7 +273,7 @@ func azureRhuiCommonPackageSet(t *imageType) rpmmd.PackageSet { } var azureRhuiBasePartitionTables = distro.BasePartitionTableMap{ - platform.ARCH_X86_64.String(): disk.PartitionTable{ + arch.ARCH_X86_64.String(): disk.PartitionTable{ UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0", Type: "gpt", Size: 64 * common.GibiByte, diff --git a/vendor/github.com/osbuild/images/pkg/distro/rhel7/distro.go b/vendor/github.com/osbuild/images/pkg/distro/rhel7/distro.go index e0fca6a02fe..03c61615520 100644 --- a/vendor/github.com/osbuild/images/pkg/distro/rhel7/distro.go +++ b/vendor/github.com/osbuild/images/pkg/distro/rhel7/distro.go @@ -7,6 +7,7 @@ import ( "strings" "github.com/osbuild/images/internal/common" + "github.com/osbuild/images/pkg/arch" "github.com/osbuild/images/pkg/distro" "github.com/osbuild/images/pkg/osbuild" "github.com/osbuild/images/pkg/platform" @@ -200,7 +201,7 @@ func newDistro(distroName string) distro.Distro { // Architecture definitions x86_64 := architecture{ - name: platform.ARCH_X86_64.String(), + name: arch.ARCH_X86_64.String(), distro: &rd, } diff --git a/vendor/github.com/osbuild/images/pkg/distro/rhel7/images.go b/vendor/github.com/osbuild/images/pkg/distro/rhel7/images.go index bf1987a5af3..3aae1bc5584 100644 --- a/vendor/github.com/osbuild/images/pkg/distro/rhel7/images.go +++ b/vendor/github.com/osbuild/images/pkg/distro/rhel7/images.go @@ -7,13 +7,13 @@ import ( "github.com/osbuild/images/internal/common" "github.com/osbuild/images/internal/users" "github.com/osbuild/images/internal/workload" + "github.com/osbuild/images/pkg/arch" "github.com/osbuild/images/pkg/blueprint" "github.com/osbuild/images/pkg/container" "github.com/osbuild/images/pkg/distro" "github.com/osbuild/images/pkg/image" "github.com/osbuild/images/pkg/manifest" "github.com/osbuild/images/pkg/osbuild" - "github.com/osbuild/images/pkg/platform" "github.com/osbuild/images/pkg/rpmmd" ) @@ -40,7 +40,7 @@ func osCustomizations( kernelOptions = append(kernelOptions, bpKernel.Append) } osc.KernelOptionsAppend = kernelOptions - if t.platform.GetArch() != platform.ARCH_S390X { + if t.platform.GetArch() != arch.ARCH_S390X { osc.KernelOptionsBootloader = true } } diff --git a/vendor/github.com/osbuild/images/pkg/distro/rhel7/partition_tables.go b/vendor/github.com/osbuild/images/pkg/distro/rhel7/partition_tables.go index 1067cb82d0f..f0f046d4c6b 100644 --- a/vendor/github.com/osbuild/images/pkg/distro/rhel7/partition_tables.go +++ b/vendor/github.com/osbuild/images/pkg/distro/rhel7/partition_tables.go @@ -2,13 +2,13 @@ package rhel7 import ( "github.com/osbuild/images/internal/common" + "github.com/osbuild/images/pkg/arch" "github.com/osbuild/images/pkg/disk" "github.com/osbuild/images/pkg/distro" - "github.com/osbuild/images/pkg/platform" ) var defaultBasePartitionTables = distro.BasePartitionTableMap{ - platform.ARCH_X86_64.String(): disk.PartitionTable{ + arch.ARCH_X86_64.String(): disk.PartitionTable{ UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0", Type: "gpt", Partitions: []disk.Partition{ diff --git a/vendor/github.com/osbuild/images/pkg/distro/rhel8/azure.go b/vendor/github.com/osbuild/images/pkg/distro/rhel8/azure.go index 77a9909518b..df194c46cf4 100644 --- a/vendor/github.com/osbuild/images/pkg/distro/rhel8/azure.go +++ b/vendor/github.com/osbuild/images/pkg/distro/rhel8/azure.go @@ -3,10 +3,10 @@ package rhel8 import ( "github.com/osbuild/images/internal/common" "github.com/osbuild/images/internal/shell" + "github.com/osbuild/images/pkg/arch" "github.com/osbuild/images/pkg/disk" "github.com/osbuild/images/pkg/distro" "github.com/osbuild/images/pkg/osbuild" - "github.com/osbuild/images/pkg/platform" "github.com/osbuild/images/pkg/rpmmd" "github.com/osbuild/images/pkg/subscription" ) @@ -261,7 +261,7 @@ func azureEapPackageSet(t *imageType) rpmmd.PackageSet { // PARTITION TABLES var azureRhuiBasePartitionTables = distro.BasePartitionTableMap{ - platform.ARCH_X86_64.String(): disk.PartitionTable{ + arch.ARCH_X86_64.String(): disk.PartitionTable{ UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0", Type: "gpt", Size: 64 * common.GibiByte, @@ -369,7 +369,7 @@ var azureRhuiBasePartitionTables = distro.BasePartitionTableMap{ }, }, }, - platform.ARCH_AARCH64.String(): disk.PartitionTable{ + arch.ARCH_AARCH64.String(): disk.PartitionTable{ UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0", Type: "gpt", Size: 64 * common.GibiByte, diff --git a/vendor/github.com/osbuild/images/pkg/distro/rhel8/bare_metal.go b/vendor/github.com/osbuild/images/pkg/distro/rhel8/bare_metal.go index 3df18f478c4..05c54e58067 100644 --- a/vendor/github.com/osbuild/images/pkg/distro/rhel8/bare_metal.go +++ b/vendor/github.com/osbuild/images/pkg/distro/rhel8/bare_metal.go @@ -3,7 +3,7 @@ package rhel8 import ( "fmt" - "github.com/osbuild/images/pkg/platform" + "github.com/osbuild/images/pkg/arch" "github.com/osbuild/images/pkg/rpmmd" ) @@ -146,7 +146,7 @@ func installerPackageSet(t *imageType) rpmmd.PackageSet { } switch t.arch.Name() { - case platform.ARCH_X86_64.String(): + case arch.ARCH_X86_64.String(): ps = ps.Append(rpmmd.PackageSet{ Include: []string{ "biosdevname", @@ -278,7 +278,7 @@ func anacondaPackageSet(t *imageType) rpmmd.PackageSet { ps = ps.Append(anacondaBootPackageSet(t)) switch t.arch.Name() { - case platform.ARCH_X86_64.String(): + case arch.ARCH_X86_64.String(): ps = ps.Append(rpmmd.PackageSet{ Include: []string{ "biosdevname", @@ -287,7 +287,7 @@ func anacondaPackageSet(t *imageType) rpmmd.PackageSet { }, }) - case platform.ARCH_AARCH64.String(): + case arch.ARCH_AARCH64.String(): ps = ps.Append(rpmmd.PackageSet{ Include: []string{ "dmidecode", diff --git a/vendor/github.com/osbuild/images/pkg/distro/rhel8/distro.go b/vendor/github.com/osbuild/images/pkg/distro/rhel8/distro.go index ce56207f926..047d4f6fcc8 100644 --- a/vendor/github.com/osbuild/images/pkg/distro/rhel8/distro.go +++ b/vendor/github.com/osbuild/images/pkg/distro/rhel8/distro.go @@ -8,6 +8,7 @@ import ( "github.com/osbuild/images/internal/common" "github.com/osbuild/images/internal/oscap" + "github.com/osbuild/images/pkg/arch" "github.com/osbuild/images/pkg/distro" "github.com/osbuild/images/pkg/osbuild" "github.com/osbuild/images/pkg/platform" @@ -198,22 +199,22 @@ func newDistro(name string, minor int) *distribution { // Architecture definitions x86_64 := architecture{ - name: platform.ARCH_X86_64.String(), + name: arch.ARCH_X86_64.String(), distro: &rd, } aarch64 := architecture{ - name: platform.ARCH_AARCH64.String(), + name: arch.ARCH_AARCH64.String(), distro: &rd, } ppc64le := architecture{ distro: &rd, - name: platform.ARCH_PPC64LE.String(), + name: arch.ARCH_PPC64LE.String(), } s390x := architecture{ distro: &rd, - name: platform.ARCH_S390X.String(), + name: arch.ARCH_S390X.String(), } ociImgType := qcow2ImgType(rd) diff --git a/vendor/github.com/osbuild/images/pkg/distro/rhel8/edge.go b/vendor/github.com/osbuild/images/pkg/distro/rhel8/edge.go index bbf6fa7d137..fcda04bd434 100644 --- a/vendor/github.com/osbuild/images/pkg/distro/rhel8/edge.go +++ b/vendor/github.com/osbuild/images/pkg/distro/rhel8/edge.go @@ -5,8 +5,8 @@ import ( "github.com/osbuild/images/internal/common" "github.com/osbuild/images/internal/fsnode" + "github.com/osbuild/images/pkg/arch" "github.com/osbuild/images/pkg/distro" - "github.com/osbuild/images/pkg/platform" "github.com/osbuild/images/pkg/rpmmd" ) @@ -249,10 +249,10 @@ func edgeCommitPackageSet(t *imageType) rpmmd.PackageSet { } switch t.arch.Name() { - case platform.ARCH_X86_64.String(): + case arch.ARCH_X86_64.String(): ps = ps.Append(x8664EdgeCommitPackageSet(t)) - case platform.ARCH_AARCH64.String(): + case arch.ARCH_AARCH64.String(): ps = ps.Append(aarch64EdgeCommitPackageSet(t)) } @@ -370,9 +370,9 @@ func edgeSimplifiedInstallerPackageSet(t *imageType) rpmmd.PackageSet { switch t.arch.Name() { - case platform.ARCH_X86_64.String(): + case arch.ARCH_X86_64.String(): ps = ps.Append(x8664EdgeCommitPackageSet(t)) - case platform.ARCH_AARCH64.String(): + case arch.ARCH_AARCH64.String(): ps = ps.Append(aarch64EdgeCommitPackageSet(t)) default: diff --git a/vendor/github.com/osbuild/images/pkg/distro/rhel8/images.go b/vendor/github.com/osbuild/images/pkg/distro/rhel8/images.go index cb7ca63bc7d..5d0508beb2a 100644 --- a/vendor/github.com/osbuild/images/pkg/distro/rhel8/images.go +++ b/vendor/github.com/osbuild/images/pkg/distro/rhel8/images.go @@ -10,6 +10,7 @@ import ( "github.com/osbuild/images/internal/oscap" "github.com/osbuild/images/internal/users" "github.com/osbuild/images/internal/workload" + "github.com/osbuild/images/pkg/arch" "github.com/osbuild/images/pkg/blueprint" "github.com/osbuild/images/pkg/container" "github.com/osbuild/images/pkg/distro" @@ -17,7 +18,6 @@ import ( "github.com/osbuild/images/pkg/manifest" "github.com/osbuild/images/pkg/osbuild" "github.com/osbuild/images/pkg/ostree" - "github.com/osbuild/images/pkg/platform" "github.com/osbuild/images/pkg/rpmmd" ) @@ -44,7 +44,7 @@ func osCustomizations( kernelOptions = append(kernelOptions, bpKernel.Append) } osc.KernelOptionsAppend = kernelOptions - if t.platform.GetArch() != platform.ARCH_S390X { + if t.platform.GetArch() != arch.ARCH_S390X { osc.KernelOptionsBootloader = true } } @@ -443,7 +443,7 @@ func edgeRawImage(workload workload.Workload, return nil, fmt.Errorf("%s: %s", t.Name(), err.Error()) } - img := image.NewOSTreeDiskImage(commit) + img := image.NewOSTreeDiskImageFromCommit(commit) img.Users = users.UsersFromBP(customizations.GetUsers()) img.Groups = users.GroupsFromBP(customizations.GetGroups()) @@ -461,6 +461,7 @@ func edgeRawImage(workload workload.Workload, ContentURL: options.OSTree.ContentURL, } img.OSName = "redhat" + img.LockRoot = true // TODO: move generation into LiveImage pt, err := t.getPartitionTable(customizations.GetFilesystems(), options, rng) @@ -488,7 +489,7 @@ func edgeSimplifiedInstallerImage(workload workload.Workload, return nil, fmt.Errorf("%s: %s", t.Name(), err.Error()) } - rawImg := image.NewOSTreeDiskImage(commit) + rawImg := image.NewOSTreeDiskImageFromCommit(commit) rawImg.Users = users.UsersFromBP(customizations.GetUsers()) rawImg.Groups = users.GroupsFromBP(customizations.GetGroups()) @@ -505,6 +506,7 @@ func edgeSimplifiedInstallerImage(workload workload.Workload, ContentURL: options.OSTree.ContentURL, } rawImg.OSName = "redhat" + rawImg.LockRoot = true // TODO: move generation into LiveImage pt, err := t.getPartitionTable(customizations.GetFilesystems(), options, rng) diff --git a/vendor/github.com/osbuild/images/pkg/distro/rhel8/package_sets.go b/vendor/github.com/osbuild/images/pkg/distro/rhel8/package_sets.go index 6b478cac749..32212009db0 100644 --- a/vendor/github.com/osbuild/images/pkg/distro/rhel8/package_sets.go +++ b/vendor/github.com/osbuild/images/pkg/distro/rhel8/package_sets.go @@ -5,7 +5,7 @@ package rhel8 import ( "fmt" - "github.com/osbuild/images/pkg/platform" + "github.com/osbuild/images/pkg/arch" "github.com/osbuild/images/pkg/rpmmd" ) @@ -30,7 +30,7 @@ func anacondaBootPackageSet(t *imageType) rpmmd.PackageSet { } switch t.arch.Name() { - case platform.ARCH_X86_64.String(): + case arch.ARCH_X86_64.String(): ps = ps.Append(grubCommon) ps = ps.Append(efiCommon) ps = ps.Append(rpmmd.PackageSet{ @@ -46,7 +46,7 @@ func anacondaBootPackageSet(t *imageType) rpmmd.PackageSet { "syslinux-nonlinux", }, }) - case platform.ARCH_AARCH64.String(): + case arch.ARCH_AARCH64.String(): ps = ps.Append(grubCommon) ps = ps.Append(efiCommon) ps = ps.Append(rpmmd.PackageSet{ diff --git a/vendor/github.com/osbuild/images/pkg/distro/rhel8/partition_tables.go b/vendor/github.com/osbuild/images/pkg/distro/rhel8/partition_tables.go index fb075e2d740..0329feab939 100644 --- a/vendor/github.com/osbuild/images/pkg/distro/rhel8/partition_tables.go +++ b/vendor/github.com/osbuild/images/pkg/distro/rhel8/partition_tables.go @@ -2,13 +2,13 @@ package rhel8 import ( "github.com/osbuild/images/internal/common" + "github.com/osbuild/images/pkg/arch" "github.com/osbuild/images/pkg/disk" "github.com/osbuild/images/pkg/distro" - "github.com/osbuild/images/pkg/platform" ) var defaultBasePartitionTables = distro.BasePartitionTableMap{ - platform.ARCH_X86_64.String(): disk.PartitionTable{ + arch.ARCH_X86_64.String(): disk.PartitionTable{ UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0", Type: "gpt", Partitions: []disk.Partition{ @@ -46,7 +46,7 @@ var defaultBasePartitionTables = distro.BasePartitionTableMap{ }, }, }, - platform.ARCH_AARCH64.String(): disk.PartitionTable{ + arch.ARCH_AARCH64.String(): disk.PartitionTable{ UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0", Type: "gpt", Partitions: []disk.Partition{ @@ -78,7 +78,7 @@ var defaultBasePartitionTables = distro.BasePartitionTableMap{ }, }, }, - platform.ARCH_PPC64LE.String(): disk.PartitionTable{ + arch.ARCH_PPC64LE.String(): disk.PartitionTable{ UUID: "0x14fc63d2", Type: "dos", Partitions: []disk.Partition{ @@ -99,7 +99,7 @@ var defaultBasePartitionTables = distro.BasePartitionTableMap{ }, }, }, - platform.ARCH_S390X.String(): disk.PartitionTable{ + arch.ARCH_S390X.String(): disk.PartitionTable{ UUID: "0x14fc63d2", Type: "dos", Partitions: []disk.Partition{ @@ -119,7 +119,7 @@ var defaultBasePartitionTables = distro.BasePartitionTableMap{ } var ec2BasePartitionTables = distro.BasePartitionTableMap{ - platform.ARCH_X86_64.String(): disk.PartitionTable{ + arch.ARCH_X86_64.String(): disk.PartitionTable{ UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0", Type: "gpt", Partitions: []disk.Partition{ @@ -171,7 +171,7 @@ var ec2BasePartitionTables = distro.BasePartitionTableMap{ }, }, }, - platform.ARCH_AARCH64.String(): disk.PartitionTable{ + arch.ARCH_AARCH64.String(): disk.PartitionTable{ UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0", Type: "gpt", Partitions: []disk.Partition{ @@ -222,7 +222,7 @@ var ec2BasePartitionTables = distro.BasePartitionTableMap{ // ec2LegacyBasePartitionTables is the partition table layout for RHEL EC2 // images prior to 8.9. It is used for backwards compatibility. var ec2LegacyBasePartitionTables = distro.BasePartitionTableMap{ - platform.ARCH_X86_64.String(): disk.PartitionTable{ + arch.ARCH_X86_64.String(): disk.PartitionTable{ UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0", Type: "gpt", Partitions: []disk.Partition{ @@ -247,7 +247,7 @@ var ec2LegacyBasePartitionTables = distro.BasePartitionTableMap{ }, }, }, - platform.ARCH_AARCH64.String(): disk.PartitionTable{ + arch.ARCH_AARCH64.String(): disk.PartitionTable{ UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0", Type: "gpt", Partitions: []disk.Partition{ @@ -294,7 +294,7 @@ var ec2LegacyBasePartitionTables = distro.BasePartitionTableMap{ } var edgeBasePartitionTables = distro.BasePartitionTableMap{ - platform.ARCH_X86_64.String(): disk.PartitionTable{ + arch.ARCH_X86_64.String(): disk.PartitionTable{ UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0", Type: "gpt", Partitions: []disk.Partition{ @@ -361,7 +361,7 @@ var edgeBasePartitionTables = distro.BasePartitionTableMap{ }, }, }, - platform.ARCH_AARCH64.String(): disk.PartitionTable{ + arch.ARCH_AARCH64.String(): disk.PartitionTable{ UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0", Type: "gpt", Partitions: []disk.Partition{ diff --git a/vendor/github.com/osbuild/images/pkg/distro/rhel9/azure.go b/vendor/github.com/osbuild/images/pkg/distro/rhel9/azure.go index cc88d4ca76e..1363f98721d 100644 --- a/vendor/github.com/osbuild/images/pkg/distro/rhel9/azure.go +++ b/vendor/github.com/osbuild/images/pkg/distro/rhel9/azure.go @@ -2,10 +2,10 @@ package rhel9 import ( "github.com/osbuild/images/internal/common" + "github.com/osbuild/images/pkg/arch" "github.com/osbuild/images/pkg/disk" "github.com/osbuild/images/pkg/distro" "github.com/osbuild/images/pkg/osbuild" - "github.com/osbuild/images/pkg/platform" "github.com/osbuild/images/pkg/rpmmd" "github.com/osbuild/images/pkg/subscription" ) @@ -184,7 +184,7 @@ func azureRhuiBasePartitionTables(t *imageType) (disk.PartitionTable, bool) { } switch t.platform.GetArch() { - case platform.ARCH_X86_64: + case arch.ARCH_X86_64: return disk.PartitionTable{ UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0", Type: "gpt", @@ -293,7 +293,7 @@ func azureRhuiBasePartitionTables(t *imageType) (disk.PartitionTable, bool) { }, }, }, true - case platform.ARCH_AARCH64: + case arch.ARCH_AARCH64: return disk.PartitionTable{ UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0", Type: "gpt", diff --git a/vendor/github.com/osbuild/images/pkg/distro/rhel9/bare_metal.go b/vendor/github.com/osbuild/images/pkg/distro/rhel9/bare_metal.go index 156174f7b25..e351d5345cd 100644 --- a/vendor/github.com/osbuild/images/pkg/distro/rhel9/bare_metal.go +++ b/vendor/github.com/osbuild/images/pkg/distro/rhel9/bare_metal.go @@ -3,7 +3,7 @@ package rhel9 import ( "fmt" - "github.com/osbuild/images/pkg/platform" + "github.com/osbuild/images/pkg/arch" "github.com/osbuild/images/pkg/rpmmd" ) @@ -133,8 +133,22 @@ func installerPackageSet(t *imageType) rpmmd.PackageSet { }, } + ps = ps.Append(rpmmd.PackageSet{ + // Extra packages that are required by the dracut stage of all installers. + // These are weak deps of other packages in the list above, but lets be + // explicit about what we need and not rely on the weak deps. Relying + // on hard-dependencies for other modules is OK for now. + // + // TODO: add these dynamically based on the modules enabled by each + // pipeline. + Include: []string{ + "mdadm", + "nss-softokn", + }, + }) + switch t.arch.Name() { - case platform.ARCH_X86_64.String(): + case arch.ARCH_X86_64.String(): ps = ps.Append(rpmmd.PackageSet{ Include: []string{ "biosdevname", @@ -292,7 +306,7 @@ func anacondaPackageSet(t *imageType) rpmmd.PackageSet { ps = ps.Append(anacondaBootPackageSet(t)) switch t.arch.Name() { - case platform.ARCH_X86_64.String(): + case arch.ARCH_X86_64.String(): ps = ps.Append(rpmmd.PackageSet{ Include: []string{ "biosdevname", @@ -302,7 +316,7 @@ func anacondaPackageSet(t *imageType) rpmmd.PackageSet { }, }) - case platform.ARCH_AARCH64.String(): + case arch.ARCH_AARCH64.String(): ps = ps.Append(rpmmd.PackageSet{ Include: []string{ "dmidecode", diff --git a/vendor/github.com/osbuild/images/pkg/distro/rhel9/distro.go b/vendor/github.com/osbuild/images/pkg/distro/rhel9/distro.go index 81564532947..e843151392b 100644 --- a/vendor/github.com/osbuild/images/pkg/distro/rhel9/distro.go +++ b/vendor/github.com/osbuild/images/pkg/distro/rhel9/distro.go @@ -8,6 +8,7 @@ import ( "github.com/osbuild/images/internal/common" "github.com/osbuild/images/internal/oscap" + "github.com/osbuild/images/pkg/arch" "github.com/osbuild/images/pkg/distro" "github.com/osbuild/images/pkg/osbuild" "github.com/osbuild/images/pkg/platform" @@ -190,23 +191,23 @@ func newDistro(name string, minor int) *distribution { // Architecture definitions x86_64 := architecture{ - name: platform.ARCH_X86_64.String(), + name: arch.ARCH_X86_64.String(), distro: &rd, } aarch64 := architecture{ - name: platform.ARCH_AARCH64.String(), + name: arch.ARCH_AARCH64.String(), distro: &rd, } ppc64le := architecture{ distro: &rd, - name: platform.ARCH_PPC64LE.String(), + name: arch.ARCH_PPC64LE.String(), } s390x := architecture{ distro: &rd, - name: platform.ARCH_S390X.String(), + name: arch.ARCH_S390X.String(), } qcow2ImgType := mkQcow2ImgType(rd) diff --git a/vendor/github.com/osbuild/images/pkg/distro/rhel9/edge.go b/vendor/github.com/osbuild/images/pkg/distro/rhel9/edge.go index e53066a400b..be41c605e71 100644 --- a/vendor/github.com/osbuild/images/pkg/distro/rhel9/edge.go +++ b/vendor/github.com/osbuild/images/pkg/distro/rhel9/edge.go @@ -6,10 +6,10 @@ import ( "github.com/osbuild/images/internal/common" "github.com/osbuild/images/internal/environment" "github.com/osbuild/images/internal/fsnode" + "github.com/osbuild/images/pkg/arch" "github.com/osbuild/images/pkg/disk" "github.com/osbuild/images/pkg/distro" "github.com/osbuild/images/pkg/osbuild" - "github.com/osbuild/images/pkg/platform" "github.com/osbuild/images/pkg/rpmmd" ) @@ -237,7 +237,7 @@ func minimalrawPartitionTables(t *imageType) (disk.PartitionTable, bool) { } switch t.platform.GetArch() { - case platform.ARCH_X86_64: + case arch.ARCH_X86_64: return disk.PartitionTable{ UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0", Type: "gpt", @@ -285,7 +285,7 @@ func minimalrawPartitionTables(t *imageType) (disk.PartitionTable, bool) { }, }, }, true - case platform.ARCH_AARCH64: + case arch.ARCH_AARCH64: return disk.PartitionTable{ UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0", Type: "gpt", @@ -340,7 +340,7 @@ func minimalrawPartitionTables(t *imageType) (disk.PartitionTable, bool) { func edgeBasePartitionTables(t *imageType) (disk.PartitionTable, bool) { switch t.platform.GetArch() { - case platform.ARCH_X86_64: + case arch.ARCH_X86_64: return disk.PartitionTable{ UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0", Type: "gpt", @@ -417,7 +417,7 @@ func edgeBasePartitionTables(t *imageType) (disk.PartitionTable, bool) { }, }, }, true - case platform.ARCH_AARCH64: + case arch.ARCH_AARCH64: return disk.PartitionTable{ UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0", Type: "gpt", @@ -582,10 +582,10 @@ func edgeCommitPackageSet(t *imageType) rpmmd.PackageSet { } switch t.arch.Name() { - case platform.ARCH_X86_64.String(): + case arch.ARCH_X86_64.String(): ps = ps.Append(x8664EdgeCommitPackageSet(t)) - case platform.ARCH_AARCH64.String(): + case arch.ARCH_AARCH64.String(): ps = ps.Append(aarch64EdgeCommitPackageSet(t)) } @@ -682,9 +682,9 @@ func edgeSimplifiedInstallerPackageSet(t *imageType) rpmmd.PackageSet { switch t.arch.Name() { - case platform.ARCH_X86_64.String(): + case arch.ARCH_X86_64.String(): ps = ps.Append(x8664EdgeCommitPackageSet(t)) - case platform.ARCH_AARCH64.String(): + case arch.ARCH_AARCH64.String(): ps = ps.Append(aarch64EdgeCommitPackageSet(t)) default: diff --git a/vendor/github.com/osbuild/images/pkg/distro/rhel9/images.go b/vendor/github.com/osbuild/images/pkg/distro/rhel9/images.go index ab5c8aec3ce..9d9ff97f0bf 100644 --- a/vendor/github.com/osbuild/images/pkg/distro/rhel9/images.go +++ b/vendor/github.com/osbuild/images/pkg/distro/rhel9/images.go @@ -401,7 +401,7 @@ func edgeRawImage(workload workload.Workload, if err != nil { return nil, fmt.Errorf("%s: %s", t.Name(), err.Error()) } - img := image.NewOSTreeDiskImage(commit) + img := image.NewOSTreeDiskImageFromCommit(commit) img.Users = users.UsersFromBP(customizations.GetUsers()) img.Groups = users.GroupsFromBP(customizations.GetGroups()) @@ -421,8 +421,8 @@ func edgeRawImage(workload workload.Workload, } if !common.VersionLessThan(t.arch.distro.osVersion, "9.2") || !t.arch.distro.isRHEL() { - img.Ignition = true img.IgnitionPlatform = "metal" + img.KernelOptionsAppend = append(img.KernelOptionsAppend, "coreos.no_persist_ip") if bpIgnition := customizations.GetIgnition(); bpIgnition != nil && bpIgnition.FirstBoot != nil && bpIgnition.FirstBoot.ProvisioningURL != "" { img.KernelOptionsAppend = append(img.KernelOptionsAppend, "ignition.config.url="+bpIgnition.FirstBoot.ProvisioningURL) } @@ -436,6 +436,7 @@ func edgeRawImage(workload workload.Workload, ContentURL: options.OSTree.ContentURL, } img.OSName = "redhat" + img.LockRoot = true if kopts := customizations.GetKernel(); kopts != nil && kopts.Append != "" { img.KernelOptionsAppend = append(img.KernelOptionsAppend, kopts.Append) @@ -466,7 +467,7 @@ func edgeSimplifiedInstallerImage(workload workload.Workload, if err != nil { return nil, fmt.Errorf("%s: %s", t.Name(), err.Error()) } - rawImg := image.NewOSTreeDiskImage(commit) + rawImg := image.NewOSTreeDiskImageFromCommit(commit) rawImg.Users = users.UsersFromBP(customizations.GetUsers()) rawImg.Groups = users.GroupsFromBP(customizations.GetGroups()) @@ -488,10 +489,11 @@ func edgeSimplifiedInstallerImage(workload workload.Workload, ContentURL: options.OSTree.ContentURL, } rawImg.OSName = "redhat" + rawImg.LockRoot = true if !common.VersionLessThan(t.arch.distro.osVersion, "9.2") || !t.arch.distro.isRHEL() { - rawImg.Ignition = true rawImg.IgnitionPlatform = "metal" + rawImg.KernelOptionsAppend = append(rawImg.KernelOptionsAppend, "coreos.no_persist_ip") if bpIgnition := customizations.GetIgnition(); bpIgnition != nil && bpIgnition.FirstBoot != nil && bpIgnition.FirstBoot.ProvisioningURL != "" { rawImg.KernelOptionsAppend = append(rawImg.KernelOptionsAppend, "ignition.config.url="+bpIgnition.FirstBoot.ProvisioningURL) } diff --git a/vendor/github.com/osbuild/images/pkg/distro/rhel9/package_sets.go b/vendor/github.com/osbuild/images/pkg/distro/rhel9/package_sets.go index d1228c3015f..5a6bb3c7dc7 100644 --- a/vendor/github.com/osbuild/images/pkg/distro/rhel9/package_sets.go +++ b/vendor/github.com/osbuild/images/pkg/distro/rhel9/package_sets.go @@ -5,7 +5,7 @@ package rhel9 import ( "fmt" - "github.com/osbuild/images/pkg/platform" + "github.com/osbuild/images/pkg/arch" "github.com/osbuild/images/pkg/rpmmd" ) @@ -35,10 +35,10 @@ func distroBuildPackageSet(t *imageType) rpmmd.PackageSet { switch t.arch.Name() { - case platform.ARCH_X86_64.String(): + case arch.ARCH_X86_64.String(): ps = ps.Append(x8664BuildPackageSet(t)) - case platform.ARCH_PPC64LE.String(): + case arch.ARCH_PPC64LE.String(): ps = ps.Append(ppc64leBuildPackageSet(t)) } @@ -84,7 +84,7 @@ func anacondaBootPackageSet(t *imageType) rpmmd.PackageSet { } switch t.arch.Name() { - case platform.ARCH_X86_64.String(): + case arch.ARCH_X86_64.String(): ps = ps.Append(grubCommon) ps = ps.Append(efiCommon) ps = ps.Append(rpmmd.PackageSet{ @@ -98,7 +98,7 @@ func anacondaBootPackageSet(t *imageType) rpmmd.PackageSet { "syslinux-nonlinux", }, }) - case platform.ARCH_AARCH64.String(): + case arch.ARCH_AARCH64.String(): ps = ps.Append(grubCommon) ps = ps.Append(efiCommon) ps = ps.Append(rpmmd.PackageSet{ @@ -197,7 +197,7 @@ func coreOsCommonPackageSet(t *imageType) rpmmd.PackageSet { } switch t.arch.Name() { - case platform.ARCH_X86_64.String(): + case arch.ARCH_X86_64.String(): ps = ps.Append(rpmmd.PackageSet{ Include: []string{ "irqbalance", @@ -205,14 +205,14 @@ func coreOsCommonPackageSet(t *imageType) rpmmd.PackageSet { }, }) - case platform.ARCH_AARCH64.String(): + case arch.ARCH_AARCH64.String(): ps = ps.Append(rpmmd.PackageSet{ Include: []string{ "irqbalance", }, }) - case platform.ARCH_PPC64LE.String(): + case arch.ARCH_PPC64LE.String(): ps = ps.Append(rpmmd.PackageSet{ Include: []string{ "irqbalance", @@ -223,7 +223,7 @@ func coreOsCommonPackageSet(t *imageType) rpmmd.PackageSet { }, }) - case platform.ARCH_S390X.String(): + case arch.ARCH_S390X.String(): ps = ps.Append(rpmmd.PackageSet{ Include: []string{ "s390utils-core", diff --git a/vendor/github.com/osbuild/images/pkg/distro/rhel9/partition_tables.go b/vendor/github.com/osbuild/images/pkg/distro/rhel9/partition_tables.go index ff590dcdf9c..0a7ae60d5ac 100644 --- a/vendor/github.com/osbuild/images/pkg/distro/rhel9/partition_tables.go +++ b/vendor/github.com/osbuild/images/pkg/distro/rhel9/partition_tables.go @@ -2,8 +2,8 @@ package rhel9 import ( "github.com/osbuild/images/internal/common" + "github.com/osbuild/images/pkg/arch" "github.com/osbuild/images/pkg/disk" - "github.com/osbuild/images/pkg/platform" ) func defaultBasePartitionTables(t *imageType) (disk.PartitionTable, bool) { @@ -14,7 +14,7 @@ func defaultBasePartitionTables(t *imageType) (disk.PartitionTable, bool) { } switch t.platform.GetArch() { - case platform.ARCH_X86_64: + case arch.ARCH_X86_64: return disk.PartitionTable{ UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0", Type: "gpt", @@ -67,7 +67,7 @@ func defaultBasePartitionTables(t *imageType) (disk.PartitionTable, bool) { }, }, }, true - case platform.ARCH_AARCH64: + case arch.ARCH_AARCH64: return disk.PartitionTable{ UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0", Type: "gpt", @@ -114,7 +114,7 @@ func defaultBasePartitionTables(t *imageType) (disk.PartitionTable, bool) { }, }, }, true - case platform.ARCH_PPC64LE: + case arch.ARCH_PPC64LE: return disk.PartitionTable{ UUID: "0x14fc63d2", Type: "dos", @@ -148,7 +148,7 @@ func defaultBasePartitionTables(t *imageType) (disk.PartitionTable, bool) { }, }, true - case platform.ARCH_S390X: + case arch.ARCH_S390X: return disk.PartitionTable{ UUID: "0x14fc63d2", Type: "dos", diff --git a/vendor/github.com/osbuild/images/pkg/distro/rhel9/qcow2.go b/vendor/github.com/osbuild/images/pkg/distro/rhel9/qcow2.go index 20fd84f5ed9..644e8233d61 100644 --- a/vendor/github.com/osbuild/images/pkg/distro/rhel9/qcow2.go +++ b/vendor/github.com/osbuild/images/pkg/distro/rhel9/qcow2.go @@ -2,9 +2,9 @@ package rhel9 import ( "github.com/osbuild/images/internal/common" + "github.com/osbuild/images/pkg/arch" "github.com/osbuild/images/pkg/distro" "github.com/osbuild/images/pkg/osbuild" - "github.com/osbuild/images/pkg/platform" "github.com/osbuild/images/pkg/rpmmd" "github.com/osbuild/images/pkg/subscription" ) @@ -104,7 +104,7 @@ func openstackCommonPackageSet(t *imageType) rpmmd.PackageSet { }, }.Append(coreOsCommonPackageSet(t)) - if t.arch.Name() == platform.ARCH_X86_64.String() { + if t.arch.Name() == arch.ARCH_X86_64.String() { ps = ps.Append(rpmmd.PackageSet{ Include: []string{ // packages below used to come from @core group and were not excluded diff --git a/vendor/github.com/osbuild/images/pkg/distro/rhel9/vmdk.go b/vendor/github.com/osbuild/images/pkg/distro/rhel9/vmdk.go index d9cc8378a13..b57bde7e551 100644 --- a/vendor/github.com/osbuild/images/pkg/distro/rhel9/vmdk.go +++ b/vendor/github.com/osbuild/images/pkg/distro/rhel9/vmdk.go @@ -2,8 +2,8 @@ package rhel9 import ( "github.com/osbuild/images/internal/common" + "github.com/osbuild/images/pkg/arch" "github.com/osbuild/images/pkg/distro" - "github.com/osbuild/images/pkg/platform" "github.com/osbuild/images/pkg/rpmmd" ) @@ -63,7 +63,7 @@ func vmdkCommonPackageSet(t *imageType) rpmmd.PackageSet { }, }.Append(coreOsCommonPackageSet(t)) - if t.arch.Name() == platform.ARCH_X86_64.String() { + if t.arch.Name() == arch.ARCH_X86_64.String() { ps = ps.Append(rpmmd.PackageSet{ Include: []string{ // packages below used to come from @core group and were not excluded diff --git a/vendor/github.com/osbuild/images/pkg/distroregistry/distroregistry.go b/vendor/github.com/osbuild/images/pkg/distroregistry/distroregistry.go index 03289771507..67ed2e30602 100644 --- a/vendor/github.com/osbuild/images/pkg/distroregistry/distroregistry.go +++ b/vendor/github.com/osbuild/images/pkg/distroregistry/distroregistry.go @@ -6,6 +6,7 @@ import ( "strings" "github.com/osbuild/images/internal/common" + "github.com/osbuild/images/pkg/arch" "github.com/osbuild/images/pkg/distro" "github.com/osbuild/images/pkg/distro/fedora" "github.com/osbuild/images/pkg/distro/rhel7" @@ -52,7 +53,7 @@ func New(hostDistro distro.Distro, distros ...distro.Distro) (*Registry, error) reg := &Registry{ distros: make(map[string]distro.Distro), hostDistro: hostDistro, - hostArchName: common.CurrentArch(), + hostArchName: arch.Current().String(), } for _, d := range distros { name := d.Name() diff --git a/internal/dnfjson/cache.go b/vendor/github.com/osbuild/images/pkg/dnfjson/cache.go similarity index 80% rename from internal/dnfjson/cache.go rename to vendor/github.com/osbuild/images/pkg/dnfjson/cache.go index 4deca445842..0b4218a8291 100644 --- a/internal/dnfjson/cache.go +++ b/vendor/github.com/osbuild/images/pkg/dnfjson/cache.go @@ -113,70 +113,71 @@ func newRPMCache(path string, maxSize uint64) *rpmCache { // cache creation. Any other errors like permission issues will be caught by // later use of the cache. eg. touchRepo func (r *rpmCache) updateInfo() { - dirs, _ := os.ReadDir(r.root) - for _, d := range dirs { - r.updateCacheDirInfo(filepath.Join(r.root, d.Name())) - } -} - -func (r *rpmCache) updateCacheDirInfo(path string) { - // See updateInfo NOTE on error handling - cacheEntries, _ := os.ReadDir(path) + // reset rpmCache fields used for accumulation + r.size = 0 + r.repoElements = make(map[string]pathInfo) - // each repository has multiple cache entries (3 on average), so using the - // number of cacheEntries to allocate the map and ID slice is a high upper - // bound, but guarantees we wont need to grow and reallocate either. - repos := make(map[string]pathInfo, len(cacheEntries)) - repoIDs := make([]string, 0, len(cacheEntries)) + repos := make(map[string]pathInfo) + repoIDs := make([]string, 0) - var totalSize uint64 + dirs, _ := os.ReadDir(r.root) + for _, d := range dirs { + path := filepath.Join(r.root, d.Name()) + + // See updateInfo NOTE on error handling + cacheEntries, _ := os.ReadDir(path) + + // Collect the paths grouped by their repo ID + // We assume the first 64 characters of a file or directory name are the + // repository ID because we use a sha256 sum of the repository config to + // create the ID (64 hex chars) + for _, entry := range cacheEntries { + eInfo, err := entry.Info() + if err != nil { + // skip it + continue + } - // Collect the paths grouped by their repo ID - // We assume the first 64 characters of a file or directory name are the - // repository ID because we use a sha256 sum of the repository config to - // create the ID (64 hex chars) - for _, entry := range cacheEntries { - eInfo, err := entry.Info() - if err != nil { - // skip it - continue - } + fname := entry.Name() + if len(fname) < 64 { + // unknown file in cache; ignore + continue + } + repoID := fname[:64] + repo, ok := repos[repoID] + if !ok { + // new repo ID + repoIDs = append(repoIDs, repoID) + } + mtime := eInfo.ModTime() + ePath := filepath.Join(path, entry.Name()) + + // calculate and add entry size + size, err := dirSize(ePath) + if err != nil { + // skip it + continue + } + repo.size += size - fname := entry.Name() - if len(fname) < 64 { - // unknown file in cache; ignore - continue - } - repoID := fname[:64] - repo, ok := repos[repoID] - if !ok { - // new repo ID - repoIDs = append(repoIDs, repoID) - } - mtime := eInfo.ModTime() - ePath := filepath.Join(path, entry.Name()) + // add path + repo.paths = append(repo.paths, ePath) - // calculate and add entry size - size, err := dirSize(ePath) - if err != nil { - // skip it - continue - } - repo.size += size - totalSize += size + // if for some reason the mtimes of the various entries of a single + // repository are out of sync, use the most recent one + if repo.mtime.Before(mtime) { + repo.mtime = mtime + } - // add path - repo.paths = append(repo.paths, ePath) + // update the collection + repos[repoID] = repo - // if for some reason the mtimes of the various entries of a single - // repository are out of sync, use the most recent one - if repo.mtime.Before(mtime) { - repo.mtime = mtime + // update rpmCache object + r.repoElements[repoID] = repo + r.size += size } - - // update the collection - repos[repoID] = repo } + sortFunc := func(idx, jdx int) bool { ir := repos[repoIDs[idx]] jr := repos[repoIDs[jdx]] @@ -186,8 +187,6 @@ func (r *rpmCache) updateCacheDirInfo(path string) { // sort IDs by mtime (oldest first) sort.Slice(repoIDs, sortFunc) - r.size = totalSize - r.repoElements = repos r.repoRecency = repoIDs } diff --git a/internal/dnfjson/dnfjson.go b/vendor/github.com/osbuild/images/pkg/dnfjson/dnfjson.go similarity index 97% rename from internal/dnfjson/dnfjson.go rename to vendor/github.com/osbuild/images/pkg/dnfjson/dnfjson.go index 27a804d9269..e5123e2180b 100644 --- a/internal/dnfjson/dnfjson.go +++ b/vendor/github.com/osbuild/images/pkg/dnfjson/dnfjson.go @@ -119,14 +119,14 @@ func NewSolver(modulePlatformID, releaseVer, arch, distro, cacheDir string) *Sol // GetCacheDir returns a distro specific rpm cache directory // It ensures that the distro name is below the root cache directory, and if there is -// a problem it returns the root cache intead of an error. +// a problem it returns the root cache instead of an error. func (s *Solver) GetCacheDir() string { - b := filepath.Base(s.distro) + b := filepath.Base(strings.Join([]string{s.modulePlatformID, s.releaseVer, s.arch}, "-")) if b == "." || b == "/" { return s.cache.root } - return filepath.Join(s.cache.root, s.distro) + return filepath.Join(s.cache.root, b) } // Depsolve the list of required package sets with explicit excludes using @@ -358,8 +358,9 @@ func (s *Solver) makeDepsolveRequest(pkgSets []rpmmd.PackageSet) (*Request, map[ transactions := make([]transactionArgs, len(pkgSets)) for dsIdx, pkgSet := range pkgSets { transactions[dsIdx] = transactionArgs{ - PackageSpecs: pkgSet.Include, - ExcludeSpecs: pkgSet.Exclude, + PackageSpecs: pkgSet.Include, + ExcludeSpecs: pkgSet.Exclude, + InstallWeakDeps: pkgSet.InstallWeakDeps, } for _, jobRepo := range pkgSet.Repositories { @@ -538,6 +539,9 @@ type transactionArgs struct { // IDs of repositories to use for this depsolve RepoIDs []string `json:"repo-ids"` + + // If we want weak deps for this depsolve + InstallWeakDeps bool `json:"install_weak_deps"` } type packageSpecs []PackageSpec diff --git a/vendor/github.com/osbuild/images/pkg/image/anaconda_live_installer.go b/vendor/github.com/osbuild/images/pkg/image/anaconda_live_installer.go index f1bdf042a7f..2487e16b699 100644 --- a/vendor/github.com/osbuild/images/pkg/image/anaconda_live_installer.go +++ b/vendor/github.com/osbuild/images/pkg/image/anaconda_live_installer.go @@ -7,6 +7,7 @@ import ( "github.com/osbuild/images/internal/common" "github.com/osbuild/images/internal/environment" "github.com/osbuild/images/internal/workload" + "github.com/osbuild/images/pkg/arch" "github.com/osbuild/images/pkg/artifact" "github.com/osbuild/images/pkg/disk" "github.com/osbuild/images/pkg/manifest" @@ -61,7 +62,7 @@ func (img *AnacondaLiveInstaller) InstantiateManifest(m *manifest.Manifest, livePipeline.ExcludePackages = img.ExtraBasePackages.Exclude livePipeline.Variant = img.Variant - livePipeline.Biosdevname = (img.Platform.GetArch() == platform.ARCH_X86_64) + livePipeline.Biosdevname = (img.Platform.GetArch() == arch.ARCH_X86_64) livePipeline.Checkpoint() @@ -103,7 +104,7 @@ func (img *AnacondaLiveInstaller) InstantiateManifest(m *manifest.Manifest, bootTreePipeline.KernelOpts = kernelOpts // enable ISOLinux on x86_64 only - isoLinuxEnabled := img.Platform.GetArch() == platform.ARCH_X86_64 + isoLinuxEnabled := img.Platform.GetArch() == arch.ARCH_X86_64 isoTreePipeline := manifest.NewAnacondaInstallerISOTree(buildPipeline, livePipeline, rootfsImagePipeline, bootTreePipeline) isoTreePipeline.PartitionTable = rootfsPartitionTable diff --git a/vendor/github.com/osbuild/images/pkg/image/anaconda_ostree_installer.go b/vendor/github.com/osbuild/images/pkg/image/anaconda_ostree_installer.go index 8aabfc860c7..5636b46169c 100644 --- a/vendor/github.com/osbuild/images/pkg/image/anaconda_ostree_installer.go +++ b/vendor/github.com/osbuild/images/pkg/image/anaconda_ostree_installer.go @@ -6,6 +6,7 @@ import ( "github.com/osbuild/images/internal/common" "github.com/osbuild/images/internal/users" + "github.com/osbuild/images/pkg/arch" "github.com/osbuild/images/pkg/artifact" "github.com/osbuild/images/pkg/disk" "github.com/osbuild/images/pkg/manifest" @@ -69,7 +70,7 @@ func (img *AnacondaOSTreeInstaller) InstantiateManifest(m *manifest.Manifest, anacondaPipeline.Users = img.Users anacondaPipeline.Groups = img.Groups anacondaPipeline.Variant = img.Variant - anacondaPipeline.Biosdevname = (img.Platform.GetArch() == platform.ARCH_X86_64) + anacondaPipeline.Biosdevname = (img.Platform.GetArch() == arch.ARCH_X86_64) anacondaPipeline.Checkpoint() anacondaPipeline.AdditionalDracutModules = img.AdditionalDracutModules anacondaPipeline.AdditionalAnacondaModules = img.AdditionalAnacondaModules @@ -112,7 +113,7 @@ func (img *AnacondaOSTreeInstaller) InstantiateManifest(m *manifest.Manifest, } // enable ISOLinux on x86_64 only - isoLinuxEnabled := img.Platform.GetArch() == platform.ARCH_X86_64 + isoLinuxEnabled := img.Platform.GetArch() == arch.ARCH_X86_64 isoTreePipeline := manifest.NewAnacondaInstallerISOTree(buildPipeline, anacondaPipeline, rootfsImagePipeline, bootTreePipeline) isoTreePipeline.PartitionTable = rootfsPartitionTable @@ -129,6 +130,9 @@ func (img *AnacondaOSTreeInstaller) InstantiateManifest(m *manifest.Manifest, isoTreePipeline.OSTreeCommitSource = &img.Commit isoTreePipeline.ISOLinux = isoLinuxEnabled + if img.FIPS { + isoTreePipeline.KernelOpts = append(isoTreePipeline.KernelOpts, "fips=1") + } isoPipeline := manifest.NewISO(buildPipeline, isoTreePipeline, isoLabel) isoPipeline.SetFilename(img.Filename) diff --git a/vendor/github.com/osbuild/images/pkg/image/anaconda_tar_installer.go b/vendor/github.com/osbuild/images/pkg/image/anaconda_tar_installer.go index dc177fc643f..46d34d4e266 100644 --- a/vendor/github.com/osbuild/images/pkg/image/anaconda_tar_installer.go +++ b/vendor/github.com/osbuild/images/pkg/image/anaconda_tar_installer.go @@ -9,6 +9,7 @@ import ( "github.com/osbuild/images/internal/environment" "github.com/osbuild/images/internal/users" "github.com/osbuild/images/internal/workload" + "github.com/osbuild/images/pkg/arch" "github.com/osbuild/images/pkg/artifact" "github.com/osbuild/images/pkg/disk" "github.com/osbuild/images/pkg/manifest" @@ -80,7 +81,7 @@ func (img *AnacondaTarInstaller) InstantiateManifest(m *manifest.Manifest, anacondaPipeline.Users = img.Users anacondaPipeline.Groups = img.Groups anacondaPipeline.Variant = img.Variant - anacondaPipeline.Biosdevname = (img.Platform.GetArch() == platform.ARCH_X86_64) + anacondaPipeline.Biosdevname = (img.Platform.GetArch() == arch.ARCH_X86_64) anacondaPipeline.AdditionalAnacondaModules = img.AdditionalAnacondaModules anacondaPipeline.AdditionalDracutModules = img.AdditionalDracutModules anacondaPipeline.AdditionalDrivers = img.AdditionalDrivers @@ -133,7 +134,7 @@ func (img *AnacondaTarInstaller) InstantiateManifest(m *manifest.Manifest, osPipeline.Workload = img.Workload // enable ISOLinux on x86_64 only - isoLinuxEnabled := img.Platform.GetArch() == platform.ARCH_X86_64 + isoLinuxEnabled := img.Platform.GetArch() == arch.ARCH_X86_64 isoTreePipeline := manifest.NewAnacondaInstallerISOTree(buildPipeline, anacondaPipeline, rootfsImagePipeline, bootTreePipeline) isoTreePipeline.PartitionTable = rootfsPartitionTable diff --git a/vendor/github.com/osbuild/images/pkg/image/ostree_archive.go b/vendor/github.com/osbuild/images/pkg/image/ostree_archive.go index deb789d3ce7..d0deff6ee53 100644 --- a/vendor/github.com/osbuild/images/pkg/image/ostree_archive.go +++ b/vendor/github.com/osbuild/images/pkg/image/ostree_archive.go @@ -31,6 +31,8 @@ type OSTreeArchive struct { Filename string InstallWeakDeps bool + + BootContainer bool } func NewOSTreeArchive(ref string) *OSTreeArchive { @@ -59,9 +61,16 @@ func (img *OSTreeArchive) InstantiateManifest(m *manifest.Manifest, ostreeCommitPipeline := manifest.NewOSTreeCommit(buildPipeline, osPipeline, img.OSTreeRef) ostreeCommitPipeline.OSVersion = img.OSVersion - tarPipeline := manifest.NewTar(buildPipeline, ostreeCommitPipeline, "commit-archive") - tarPipeline.SetFilename(img.Filename) - artifact := tarPipeline.Export() + var artifact *artifact.Artifact + if img.BootContainer { + encapsulatePipeline := manifest.NewOSTreeEncapsulate(buildPipeline, ostreeCommitPipeline, "ostree-encapsulate") + encapsulatePipeline.SetFilename(img.Filename) + artifact = encapsulatePipeline.Export() + } else { + tarPipeline := manifest.NewTar(buildPipeline, ostreeCommitPipeline, "commit-archive") + tarPipeline.SetFilename(img.Filename) + artifact = tarPipeline.Export() + } return artifact, nil } diff --git a/vendor/github.com/osbuild/images/pkg/image/ostree_disk.go b/vendor/github.com/osbuild/images/pkg/image/ostree_disk.go index f8d8e7d987f..19e8c105fdc 100644 --- a/vendor/github.com/osbuild/images/pkg/image/ostree_disk.go +++ b/vendor/github.com/osbuild/images/pkg/image/ostree_disk.go @@ -8,6 +8,7 @@ import ( "github.com/osbuild/images/internal/users" "github.com/osbuild/images/internal/workload" "github.com/osbuild/images/pkg/artifact" + "github.com/osbuild/images/pkg/container" "github.com/osbuild/images/pkg/disk" "github.com/osbuild/images/pkg/manifest" "github.com/osbuild/images/pkg/ostree" @@ -26,12 +27,14 @@ type OSTreeDiskImage struct { Users []users.User Groups []users.Group - CommitSource ostree.SourceSpec + CommitSource *ostree.SourceSpec + ContainerSource *container.SourceSpec SysrootReadOnly bool Remote ostree.Remote OSName string + Ref string KernelOptionsAppend []string Keyboard string @@ -39,7 +42,6 @@ type OSTreeDiskImage struct { Filename string - Ignition bool IgnitionPlatform string Compression string @@ -47,17 +49,38 @@ type OSTreeDiskImage struct { Files []*fsnode.File FIPS bool + + // Lock the root account in the deployment unless the user defined root + // user options in the build configuration. + LockRoot bool } -func NewOSTreeDiskImage(commit ostree.SourceSpec) *OSTreeDiskImage { +func NewOSTreeDiskImageFromCommit(commit ostree.SourceSpec) *OSTreeDiskImage { return &OSTreeDiskImage{ Base: NewBase("ostree-raw-image"), - CommitSource: commit, + CommitSource: &commit, + } +} + +func NewOSTreeDiskImageFromContainer(container container.SourceSpec, ref string) *OSTreeDiskImage { + return &OSTreeDiskImage{ + Base: NewBase("ostree-raw-image"), + ContainerSource: &container, + Ref: ref, } } func baseRawOstreeImage(img *OSTreeDiskImage, m *manifest.Manifest, buildPipeline *manifest.Build) *manifest.RawOSTreeImage { - osPipeline := manifest.NewOSTreeDeployment(buildPipeline, m, img.CommitSource, img.OSName, img.Ignition, img.IgnitionPlatform, img.Platform) + var osPipeline *manifest.OSTreeDeployment + switch { + case img.CommitSource != nil: + osPipeline = manifest.NewOSTreeCommitDeployment(buildPipeline, m, img.CommitSource, img.OSName, img.Platform) + case img.ContainerSource != nil: + osPipeline = manifest.NewOSTreeContainerDeployment(buildPipeline, m, img.ContainerSource, img.Ref, img.OSName, img.Platform) + default: + panic("no content source defined for ostree image") + } + osPipeline.PartitionTable = img.PartitionTable osPipeline.Remote = img.Remote osPipeline.KernelOptionsAppend = img.KernelOptionsAppend @@ -69,6 +92,8 @@ func baseRawOstreeImage(img *OSTreeDiskImage, m *manifest.Manifest, buildPipelin osPipeline.Directories = img.Directories osPipeline.Files = img.Files osPipeline.FIPS = img.FIPS + osPipeline.IgnitionPlatform = img.IgnitionPlatform + osPipeline.LockRoot = img.LockRoot // other image types (e.g. live) pass the workload to the pipeline. osPipeline.EnabledServices = img.Workload.GetServices() diff --git a/vendor/github.com/osbuild/images/pkg/image/ostree_simplified_installer.go b/vendor/github.com/osbuild/images/pkg/image/ostree_simplified_installer.go index 1f06759c44b..abb59e79e5d 100644 --- a/vendor/github.com/osbuild/images/pkg/image/ostree_simplified_installer.go +++ b/vendor/github.com/osbuild/images/pkg/image/ostree_simplified_installer.go @@ -9,6 +9,7 @@ import ( "github.com/osbuild/images/internal/fdo" "github.com/osbuild/images/internal/ignition" "github.com/osbuild/images/internal/workload" + "github.com/osbuild/images/pkg/arch" "github.com/osbuild/images/pkg/artifact" "github.com/osbuild/images/pkg/disk" "github.com/osbuild/images/pkg/manifest" @@ -93,7 +94,7 @@ func (img *OSTreeSimplifiedInstaller) InstantiateManifest(m *manifest.Manifest, coiPipeline.ExtraRepos = img.ExtraBasePackages.Repositories coiPipeline.FDO = img.FDO coiPipeline.Ignition = img.IgnitionEmbedded - coiPipeline.Biosdevname = (img.Platform.GetArch() == platform.ARCH_X86_64) + coiPipeline.Biosdevname = (img.Platform.GetArch() == arch.ARCH_X86_64) coiPipeline.Variant = img.Variant coiPipeline.AdditionalDracutModules = img.AdditionalDracutModules @@ -146,7 +147,7 @@ func (img *OSTreeSimplifiedInstaller) InstantiateManifest(m *manifest.Manifest, } // enable ISOLinux on x86_64 only - isoLinuxEnabled := img.Platform.GetArch() == platform.ARCH_X86_64 + isoLinuxEnabled := img.Platform.GetArch() == arch.ARCH_X86_64 isoTreePipeline := manifest.NewCoreOSISOTree(buildPipeline, compressedImage, coiPipeline, bootTreePipeline) isoTreePipeline.KernelOpts = kernelOpts diff --git a/vendor/github.com/osbuild/images/pkg/manifest/anaconda_installer.go b/vendor/github.com/osbuild/images/pkg/manifest/anaconda_installer.go index 0d5c10037e1..3046e623f43 100644 --- a/vendor/github.com/osbuild/images/pkg/manifest/anaconda_installer.go +++ b/vendor/github.com/osbuild/images/pkg/manifest/anaconda_installer.go @@ -6,6 +6,7 @@ import ( "github.com/osbuild/images/internal/fsnode" "github.com/osbuild/images/internal/users" + "github.com/osbuild/images/pkg/arch" "github.com/osbuild/images/pkg/container" "github.com/osbuild/images/pkg/osbuild" "github.com/osbuild/images/pkg/ostree" @@ -107,7 +108,7 @@ func (p *AnacondaInstaller) anacondaBootPackageSet() []string { } switch p.platform.GetArch() { - case platform.ARCH_X86_64: + case arch.ARCH_X86_64: packages = append(packages, "grub2-efi-x64", "grub2-efi-x64-cdboot", @@ -117,7 +118,7 @@ func (p *AnacondaInstaller) anacondaBootPackageSet() []string { "syslinux", "syslinux-nonlinux", ) - case platform.ARCH_AARCH64: + case arch.ARCH_AARCH64: packages = append(packages, "grub2-efi-aa64-cdboot", "grub2-efi-aa64", diff --git a/vendor/github.com/osbuild/images/pkg/manifest/coreos_installer.go b/vendor/github.com/osbuild/images/pkg/manifest/coreos_installer.go index 0f0f2b5d6bf..24206561ec0 100644 --- a/vendor/github.com/osbuild/images/pkg/manifest/coreos_installer.go +++ b/vendor/github.com/osbuild/images/pkg/manifest/coreos_installer.go @@ -5,6 +5,7 @@ import ( "github.com/osbuild/images/internal/fdo" "github.com/osbuild/images/internal/ignition" + "github.com/osbuild/images/pkg/arch" "github.com/osbuild/images/pkg/container" "github.com/osbuild/images/pkg/osbuild" "github.com/osbuild/images/pkg/ostree" @@ -85,7 +86,7 @@ func (p *CoreOSInstaller) getBootPackages() []string { // For Fedora, this will add a lot of duplicates, but we also add them here // for RHEL and CentOS. switch p.platform.GetArch() { - case platform.ARCH_X86_64: + case arch.ARCH_X86_64: packages = append(packages, "grub2-efi-x64", "grub2-efi-x64-cdboot", @@ -95,7 +96,7 @@ func (p *CoreOSInstaller) getBootPackages() []string { "syslinux", "syslinux-nonlinux", ) - case platform.ARCH_AARCH64: + case arch.ARCH_AARCH64: packages = append(packages, "grub2-efi-aa64-cdboot", "grub2-efi-aa64", diff --git a/vendor/github.com/osbuild/images/pkg/manifest/efi_boot_tree.go b/vendor/github.com/osbuild/images/pkg/manifest/efi_boot_tree.go index 7ba473ba69c..e8c22532e7d 100644 --- a/vendor/github.com/osbuild/images/pkg/manifest/efi_boot_tree.go +++ b/vendor/github.com/osbuild/images/pkg/manifest/efi_boot_tree.go @@ -1,6 +1,7 @@ package manifest import ( + "github.com/osbuild/images/pkg/arch" "github.com/osbuild/images/pkg/osbuild" "github.com/osbuild/images/pkg/platform" ) @@ -33,11 +34,11 @@ func NewEFIBootTree(m *Manifest, buildPipeline *Build, product, version string) func (p *EFIBootTree) serialize() osbuild.Pipeline { pipeline := p.Base.serialize() - arch := p.Platform.GetArch().String() + a := p.Platform.GetArch().String() var architectures []string - if arch == platform.ARCH_X86_64.String() { + if a == arch.ARCH_X86_64.String() { architectures = []string{"X64"} - } else if arch == platform.ARCH_AARCH64.String() { + } else if a == arch.ARCH_AARCH64.String() { architectures = []string{"AA64"} } else { panic("unsupported architecture") diff --git a/vendor/github.com/osbuild/images/pkg/manifest/os.go b/vendor/github.com/osbuild/images/pkg/manifest/os.go index c1453529b22..95f95051e39 100644 --- a/vendor/github.com/osbuild/images/pkg/manifest/os.go +++ b/vendor/github.com/osbuild/images/pkg/manifest/os.go @@ -11,6 +11,7 @@ import ( "github.com/osbuild/images/internal/shell" "github.com/osbuild/images/internal/users" "github.com/osbuild/images/internal/workload" + "github.com/osbuild/images/pkg/arch" "github.com/osbuild/images/pkg/container" "github.com/osbuild/images/pkg/disk" "github.com/osbuild/images/pkg/osbuild" @@ -610,7 +611,7 @@ func (p *OS) serialize() osbuild.Pipeline { var bootloader *osbuild.Stage switch p.platform.GetArch() { - case platform.ARCH_S390X: + case arch.ARCH_S390X: bootloader = osbuild.NewZiplStage(new(osbuild.ZiplStageOptions)) default: if p.NoBLS { diff --git a/vendor/github.com/osbuild/images/pkg/manifest/ostree_deployment.go b/vendor/github.com/osbuild/images/pkg/manifest/ostree_deployment.go index 0e8c78b70af..f34cdedab16 100644 --- a/vendor/github.com/osbuild/images/pkg/manifest/ostree_deployment.go +++ b/vendor/github.com/osbuild/images/pkg/manifest/ostree_deployment.go @@ -1,6 +1,7 @@ package manifest import ( + "fmt" "os" "strings" @@ -24,12 +25,25 @@ type OSTreeDeployment struct { OSVersion string - commitSource ostree.SourceSpec - ostreeSpecs []ostree.CommitSpec + // commitSource represents the source that will be used to retrieve the + // ostree commit for this pipeline. + commitSource *ostree.SourceSpec + + // ostreeSpec is the resolved commit that will be deployed in this pipeline. + ostreeSpec *ostree.CommitSpec + + // containerSource represents the source that will be used to retrieve the + // ostree native container for this pipeline. + containerSource *container.SourceSpec + + // containerSpec is the resolved ostree native container that will be + // deployed in this pipeline. + containerSpec *container.Spec SysrootReadOnly bool osName string + ref string KernelOptionsAppend []string Keyboard string @@ -42,11 +56,9 @@ type OSTreeDeployment struct { PartitionTable *disk.PartitionTable - // Whether ignition is in use or not - ignition bool - - // Specifies the ignition platform to use - ignitionPlatform string + // Specifies the ignition platform to use. + // If empty, ignition is not enabled. + IgnitionPlatform string Directories []*fsnode.Directory Files []*fsnode.File @@ -55,25 +67,46 @@ type OSTreeDeployment struct { DisabledServices []string FIPS bool + + // Lock the root account in the deployment unless the user defined root + // user options in the build configuration. + LockRoot bool } -// NewOSTreeDeployment creates a pipeline for an ostree deployment from a +// NewOSTreeCommitDeployment creates a pipeline for an ostree deployment from a // commit. -func NewOSTreeDeployment(buildPipeline *Build, +func NewOSTreeCommitDeployment(buildPipeline *Build, m *Manifest, - commit ostree.SourceSpec, + commit *ostree.SourceSpec, osName string, - ignition bool, - ignitionPlatform string, platform platform.Platform) *OSTreeDeployment { p := &OSTreeDeployment{ - Base: NewBase(m, "ostree-deployment", buildPipeline), - commitSource: commit, - osName: osName, - platform: platform, - ignition: ignition, - ignitionPlatform: ignitionPlatform, + Base: NewBase(m, "ostree-deployment", buildPipeline), + commitSource: commit, + osName: osName, + platform: platform, + } + buildPipeline.addDependent(p) + m.addPipeline(p) + return p +} + +// NewOSTreeDeployment creates a pipeline for an ostree deployment from a +// container +func NewOSTreeContainerDeployment(buildPipeline *Build, + m *Manifest, + container *container.SourceSpec, + ref string, + osName string, + platform platform.Platform) *OSTreeDeployment { + + p := &OSTreeDeployment{ + Base: NewBase(m, "ostree-deployment", buildPipeline), + containerSource: container, + osName: osName, + ref: ref, + platform: platform, } buildPipeline.addDependent(p) m.addPipeline(p) @@ -88,89 +121,76 @@ func (p *OSTreeDeployment) getBuildPackages(Distro) []string { } func (p *OSTreeDeployment) getOSTreeCommits() []ostree.CommitSpec { - return p.ostreeSpecs + if p.ostreeSpec == nil { + return []ostree.CommitSpec{} + } + return []ostree.CommitSpec{*p.ostreeSpec} } func (p *OSTreeDeployment) getOSTreeCommitSources() []ostree.SourceSpec { + if p.commitSource == nil { + return []ostree.SourceSpec{} + } return []ostree.SourceSpec{ - p.commitSource, + *p.commitSource, + } +} + +func (p *OSTreeDeployment) getContainerSpecs() []container.Spec { + if p.containerSpec == nil { + return []container.Spec{} + } + return []container.Spec{*p.containerSpec} +} + +func (p *OSTreeDeployment) getContainerSources() []container.SourceSpec { + if p.containerSource == nil { + return []container.SourceSpec{} + } + return []container.SourceSpec{ + *p.containerSource, } } func (p *OSTreeDeployment) serializeStart(packages []rpmmd.PackageSpec, containers []container.Spec, commits []ostree.CommitSpec) { - if len(p.ostreeSpecs) > 0 { + if p.ostreeSpec != nil || p.containerSpec != nil { panic("double call to serializeStart()") } - if len(commits) != 1 { - panic("pipeline requires exactly one ostree commit") + switch { + case len(commits) == 1: + p.ostreeSpec = &commits[0] + case len(containers) == 1: + p.containerSpec = &containers[0] + default: + panic(fmt.Sprintf("pipeline requires exactly one ostree commit or one container (have commits: %v; containers: %v)", commits, containers)) } - - p.ostreeSpecs = commits } func (p *OSTreeDeployment) serializeEnd() { - if len(p.ostreeSpecs) == 0 { + switch { + case p.ostreeSpec == nil && p.containerSpec == nil: panic("serializeEnd() call when serialization not in progress") + case p.ostreeSpec != nil && p.containerSpec != nil: + panic("serializeEnd() multiple payload sources defined") } - p.ostreeSpecs = nil + p.ostreeSpec = nil + p.containerSpec = nil } -func (p *OSTreeDeployment) serialize() osbuild.Pipeline { - if len(p.ostreeSpecs) == 0 { - panic("serialization not started") - } - if len(p.ostreeSpecs) > 1 { - panic("multiple ostree commit specs found; this is a programming error") - } - commit := p.ostreeSpecs[0] - - const repoPath = "/ostree/repo" - - pipeline := p.Base.serialize() - - pipeline.AddStage(osbuild.OSTreeInitFsStage()) +func (p *OSTreeDeployment) doOSTreeSpec(pipeline *osbuild.Pipeline, repoPath string, kernelOpts []string) string { + commit := *p.ostreeSpec + ref := commit.Ref pipeline.AddStage(osbuild.NewOSTreePullStage( &osbuild.OSTreePullStageOptions{Repo: repoPath, Remote: p.Remote.Name}, - osbuild.NewOstreePullStageInputs("org.osbuild.source", commit.Checksum, commit.Ref), + osbuild.NewOstreePullStageInputs("org.osbuild.source", commit.Checksum, ref), )) - pipeline.AddStage(osbuild.NewOSTreeOsInitStage( - &osbuild.OSTreeOsInitStageOptions{ - OSName: p.osName, - }, - )) - pipeline.AddStage(osbuild.NewMkdirStage(&osbuild.MkdirStageOptions{ - Paths: []osbuild.MkdirStagePath{ - { - Path: "/boot/efi", - Mode: common.ToPtr(os.FileMode(0700)), - }, - }, - })) - kernelOpts := osbuild.GenImageKernelOptions(p.PartitionTable) - kernelOpts = append(kernelOpts, p.KernelOptionsAppend...) - - if p.ignition { - if p.ignitionPlatform == "" { - panic("ignition is enabled but ignition platform ID is not set") - } - kernelOpts = append(kernelOpts, - "coreos.no_persist_ip", // users cannot add connections as we don't have a live iso, this prevents connections to bleed into the system from the ign initrd - "ignition.platform.id="+p.ignitionPlatform, - "$ignition_firstboot", - ) - } - - if p.FIPS { - kernelOpts = append(kernelOpts, osbuild.GenFIPSKernelOptions(p.PartitionTable)...) - p.Files = append(p.Files, osbuild.GenFIPSFiles()...) - } pipeline.AddStage(osbuild.NewOSTreeDeployStage( &osbuild.OSTreeDeployStageOptions{ OsName: p.osName, - Ref: commit.Ref, + Ref: ref, Remote: p.Remote.Name, Mounts: []string{"/boot", "/boot/efi"}, Rootfs: osbuild.Rootfs{ @@ -200,11 +220,87 @@ func (p *OSTreeDeployment) serialize() osbuild.Pipeline { &osbuild.OSTreeFillvarStageOptions{ Deployment: osbuild.OSTreeDeployment{ OSName: p.osName, - Ref: commit.Ref, + Ref: ref, }, }, )) + return ref +} + +func (p *OSTreeDeployment) doOSTreeContainerSpec(pipeline *osbuild.Pipeline, repoPath string, kernelOpts []string) string { + cont := *p.containerSpec + ref := p.ref + + options := &osbuild.OSTreeDeployContainerStageOptions{ + OsName: p.osName, + KernelOpts: p.KernelOptionsAppend, + // NOTE: setting the target imgref to be the container source but + // we should make this configurable + TargetImgref: fmt.Sprintf("ostree-remote-registry:%s:%s", p.Remote.Name, p.containerSpec.Source), + Mounts: []string{"/boot", "/boot/efi"}, + Rootfs: &osbuild.Rootfs{ + Label: "root", + }, + } + images := osbuild.NewContainersInputForSources([]container.Spec{cont}) + pipeline.AddStage(osbuild.NewOSTreeDeployContainerStage(options, images)) + return ref +} + +func (p *OSTreeDeployment) serialize() osbuild.Pipeline { + switch { + case p.ostreeSpec == nil && p.containerSpec == nil: + panic("serialization not started") + case p.ostreeSpec != nil && p.containerSpec != nil: + panic("serialize() multiple payload sources defined") + } + + const repoPath = "/ostree/repo" + + pipeline := p.Base.serialize() + + pipeline.AddStage(osbuild.OSTreeInitFsStage()) + pipeline.AddStage(osbuild.NewOSTreeOsInitStage( + &osbuild.OSTreeOsInitStageOptions{ + OSName: p.osName, + }, + )) + pipeline.AddStage(osbuild.NewMkdirStage(&osbuild.MkdirStageOptions{ + Paths: []osbuild.MkdirStagePath{ + { + Path: "/boot/efi", + Mode: common.ToPtr(os.FileMode(0700)), + }, + }, + })) + kernelOpts := osbuild.GenImageKernelOptions(p.PartitionTable) + kernelOpts = append(kernelOpts, p.KernelOptionsAppend...) + + if p.IgnitionPlatform != "" { + kernelOpts = append(kernelOpts, + "ignition.platform.id="+p.IgnitionPlatform, + "$ignition_firstboot", + ) + } + + if p.FIPS { + kernelOpts = append(kernelOpts, osbuild.GenFIPSKernelOptions(p.PartitionTable)...) + p.Files = append(p.Files, osbuild.GenFIPSFiles()...) + } + + var ref string + switch { + case p.ostreeSpec != nil: + ref = p.doOSTreeSpec(&pipeline, repoPath, kernelOpts) + case p.containerSpec != nil: + ref = p.doOSTreeContainerSpec(&pipeline, repoPath, kernelOpts) + default: + // this should be caught at the top of the function, but let's check + // again to avoid bugs from bad refactoring. + panic("no content source defined for ostree deployment") + } + configStage := osbuild.NewOSTreeConfigStage( &osbuild.OSTreeConfigStageOptions{ Repo: repoPath, @@ -216,12 +312,12 @@ func (p *OSTreeDeployment) serialize() osbuild.Pipeline { }, }, ) - configStage.MountOSTree(p.osName, commit.Ref, 0) + configStage.MountOSTree(p.osName, ref, 0) pipeline.AddStage(configStage) fstabOptions := osbuild.NewFSTabStageOptions(p.PartitionTable) fstabStage := osbuild.NewFSTabStage(fstabOptions) - fstabStage.MountOSTree(p.osName, commit.Ref, 0) + fstabStage.MountOSTree(p.osName, ref, 0) pipeline.AddStage(fstabStage) if len(p.Users) > 0 { @@ -229,17 +325,17 @@ func (p *OSTreeDeployment) serialize() osbuild.Pipeline { if err != nil { panic("password encryption failed") } - usersStage.MountOSTree(p.osName, commit.Ref, 0) + usersStage.MountOSTree(p.osName, ref, 0) pipeline.AddStage(usersStage) } if len(p.Groups) > 0 { grpStage := osbuild.GenGroupsStage(p.Groups) - grpStage.MountOSTree(p.osName, commit.Ref, 0) + grpStage.MountOSTree(p.osName, ref, 0) pipeline.AddStage(grpStage) } - if p.ignition { + if p.IgnitionPlatform != "" { pipeline.AddStage(osbuild.NewIgnitionStage(&osbuild.IgnitionStageOptions{ // This is a workaround to make the systemd believe it's firstboot when ignition runs on real firstboot. // Right now, since we ship /etc/machine-id, systemd thinks it's not firstboot and ignition depends on it @@ -260,7 +356,7 @@ func (p *OSTreeDeployment) serialize() osbuild.Pipeline { // creating a preset file. if len(p.EnabledServices) != 0 || len(p.DisabledServices) != 0 { presetsStage := osbuild.GenServicesPresetStage(p.EnabledServices, p.DisabledServices) - presetsStage.MountOSTree(p.osName, commit.Ref, 0) + presetsStage.MountOSTree(p.osName, ref, 0) pipeline.AddStage(presetsStage) } } @@ -274,7 +370,7 @@ func (p *OSTreeDeployment) serialize() osbuild.Pipeline { } } - if !hasRoot { + if p.LockRoot && !hasRoot { userOptions := &osbuild.UsersStageOptions{ Users: map[string]osbuild.UsersStageOptionsUser{ "root": { @@ -283,7 +379,7 @@ func (p *OSTreeDeployment) serialize() osbuild.Pipeline { }, } rootLockStage := osbuild.NewUsersStage(userOptions) - rootLockStage.MountOSTree(p.osName, commit.Ref, 0) + rootLockStage.MountOSTree(p.osName, ref, 0) pipeline.AddStage(rootLockStage) } @@ -292,7 +388,7 @@ func (p *OSTreeDeployment) serialize() osbuild.Pipeline { Keymap: p.Keyboard, } keymapStage := osbuild.NewKeymapStage(options) - keymapStage.MountOSTree(p.osName, commit.Ref, 0) + keymapStage.MountOSTree(p.osName, ref, 0) pipeline.AddStage(keymapStage) } @@ -301,13 +397,13 @@ func (p *OSTreeDeployment) serialize() osbuild.Pipeline { Language: p.Locale, } localeStage := osbuild.NewLocaleStage(options) - localeStage.MountOSTree(p.osName, commit.Ref, 0) + localeStage.MountOSTree(p.osName, ref, 0) pipeline.AddStage(localeStage) } if p.FIPS { for _, stage := range osbuild.GenFIPSStages() { - stage.MountOSTree(p.osName, commit.Ref, 0) + stage.MountOSTree(p.osName, ref, 0) pipeline.AddStage(stage) } } @@ -319,21 +415,21 @@ func (p *OSTreeDeployment) serialize() osbuild.Pipeline { p.platform.GetBIOSPlatform(), p.platform.GetUEFIVendor(), true) grubOptions.Greenboot = true - grubOptions.Ignition = p.ignition + grubOptions.Ignition = p.IgnitionPlatform != "" grubOptions.Config = &osbuild.GRUB2Config{ Default: "saved", Timeout: 1, TerminalOutput: []string{"console"}, } bootloader := osbuild.NewGRUB2Stage(grubOptions) - bootloader.MountOSTree(p.osName, commit.Ref, 0) + bootloader.MountOSTree(p.osName, ref, 0) pipeline.AddStage(bootloader) // First create custom directories, because some of the files may depend on them if len(p.Directories) > 0 { dirStages := osbuild.GenDirectoryNodesStages(p.Directories) for _, stage := range dirStages { - stage.MountOSTree(p.osName, commit.Ref, 0) + stage.MountOSTree(p.osName, ref, 0) } pipeline.AddStages(dirStages...) } @@ -341,7 +437,7 @@ func (p *OSTreeDeployment) serialize() osbuild.Pipeline { if len(p.Files) > 0 { fileStages := osbuild.GenFileNodesStages(p.Files) for _, stage := range fileStages { - stage.MountOSTree(p.osName, commit.Ref, 0) + stage.MountOSTree(p.osName, ref, 0) } pipeline.AddStages(fileStages...) } @@ -351,7 +447,7 @@ func (p *OSTreeDeployment) serialize() osbuild.Pipeline { EnabledServices: p.EnabledServices, DisabledServices: p.DisabledServices, }) - systemdStage.MountOSTree(p.osName, commit.Ref, 0) + systemdStage.MountOSTree(p.osName, ref, 0) pipeline.AddStage(systemdStage) } @@ -359,7 +455,7 @@ func (p *OSTreeDeployment) serialize() osbuild.Pipeline { &osbuild.OSTreeSelinuxStageOptions{ Deployment: osbuild.OSTreeDeployment{ OSName: p.osName, - Ref: commit.Ref, + Ref: ref, }, }, )) diff --git a/vendor/github.com/osbuild/images/pkg/manifest/ostree_encapsulate.go b/vendor/github.com/osbuild/images/pkg/manifest/ostree_encapsulate.go new file mode 100644 index 00000000000..c266c7ad987 --- /dev/null +++ b/vendor/github.com/osbuild/images/pkg/manifest/ostree_encapsulate.go @@ -0,0 +1,57 @@ +package manifest + +import ( + "github.com/osbuild/images/pkg/artifact" + "github.com/osbuild/images/pkg/osbuild" +) + +type OSTreeEncapsulate struct { + Base + filename string + + inputPipeline Pipeline +} + +func NewOSTreeEncapsulate(buildPipeline *Build, inputPipeline Pipeline, pipelinename string) *OSTreeEncapsulate { + p := &OSTreeEncapsulate{ + Base: NewBase(inputPipeline.Manifest(), pipelinename, buildPipeline), + inputPipeline: inputPipeline, + filename: "bootable-container.tar", + } + buildPipeline.addDependent(p) + inputPipeline.Manifest().addPipeline(p) + return p +} + +func (p OSTreeEncapsulate) Filename() string { + return p.filename +} + +func (p *OSTreeEncapsulate) SetFilename(filename string) { + p.filename = filename +} + +func (p *OSTreeEncapsulate) serialize() osbuild.Pipeline { + pipeline := p.Base.serialize() + + encOptions := &osbuild.OSTreeEncapsulateStageOptions{ + Filename: p.Filename(), + } + encStage := osbuild.NewOSTreeEncapsulateStage(encOptions, p.inputPipeline.Name()) + pipeline.AddStage(encStage) + + return pipeline +} + +func (p *OSTreeEncapsulate) getBuildPackages(Distro) []string { + return []string{ + "rpm-ostree", + "python3-pyyaml", + } +} + +func (p *OSTreeEncapsulate) Export() *artifact.Artifact { + p.Base.export = true + mimeType := "application/x-tar" + return artifact.New(p.Name(), p.Filename(), &mimeType) +} diff --git a/vendor/github.com/osbuild/images/pkg/manifest/raw.go b/vendor/github.com/osbuild/images/pkg/manifest/raw.go index 22598e12d2f..9bf596789d0 100644 --- a/vendor/github.com/osbuild/images/pkg/manifest/raw.go +++ b/vendor/github.com/osbuild/images/pkg/manifest/raw.go @@ -1,9 +1,9 @@ package manifest import ( + "github.com/osbuild/images/pkg/arch" "github.com/osbuild/images/pkg/artifact" "github.com/osbuild/images/pkg/osbuild" - "github.com/osbuild/images/pkg/platform" ) // A RawImage represents a raw image file which can be booted in a @@ -65,7 +65,7 @@ func (p *RawImage) serialize() osbuild.Pipeline { } switch p.treePipeline.platform.GetArch() { - case platform.ARCH_S390X: + case arch.ARCH_S390X: loopback := osbuild.NewLoopbackDevice(&osbuild.LoopbackDeviceOptions{Filename: p.Filename()}) pipeline.AddStage(osbuild.NewZiplInstStage(osbuild.NewZiplInstStageOptions(p.treePipeline.kernelVer, pt), loopback, copyDevices, copyMounts)) default: diff --git a/vendor/github.com/osbuild/images/pkg/manifest/raw_ostree.go b/vendor/github.com/osbuild/images/pkg/manifest/raw_ostree.go index c1c1577d9b0..c6969d73557 100644 --- a/vendor/github.com/osbuild/images/pkg/manifest/raw_ostree.go +++ b/vendor/github.com/osbuild/images/pkg/manifest/raw_ostree.go @@ -76,7 +76,7 @@ func (p *RawOSTreeImage) serialize() osbuild.Pipeline { _, bootCopyDevices, bootCopyMounts := osbuild.GenCopyFSTreeOptions(inputName, p.treePipeline.Name(), p.Filename(), pt) bootCopyOptions := &osbuild.CopyStageOptions{} - commit := p.treePipeline.ostreeSpecs[0] + commit := p.treePipeline.ostreeSpec commitChecksum := commit.Checksum bootCopyInputs := osbuild.OSTreeCheckoutInputs{ diff --git a/vendor/github.com/osbuild/images/pkg/osbuild/containers_input.go b/vendor/github.com/osbuild/images/pkg/osbuild/containers_input.go index c0243672bce..167df083bd7 100644 --- a/vendor/github.com/osbuild/images/pkg/osbuild/containers_input.go +++ b/vendor/github.com/osbuild/images/pkg/osbuild/containers_input.go @@ -6,6 +6,7 @@ import ( type ContainersInputReferences interface { isContainersInputReferences() + Len() int } type ContainersInputSourceRef struct { @@ -16,6 +17,10 @@ type ContainersInputSourceMap map[string]ContainersInputSourceRef func (ContainersInputSourceMap) isContainersInputReferences() {} +func (cism ContainersInputSourceMap) Len() int { + return len(cism) +} + type ContainersInput struct { inputCommon References ContainersInputReferences `json:"references"` diff --git a/vendor/github.com/osbuild/images/pkg/osbuild/ostree_deploy_container_stage.go b/vendor/github.com/osbuild/images/pkg/osbuild/ostree_deploy_container_stage.go new file mode 100644 index 00000000000..43e0b76e958 --- /dev/null +++ b/vendor/github.com/osbuild/images/pkg/osbuild/ostree_deploy_container_stage.go @@ -0,0 +1,75 @@ +package osbuild + +import ( + "fmt" + "regexp" +) + +// adapted from the osbuild stage schema - keep in sync if it ever changes +const ostreeContainerTargetImgrefRegex = "^(ostree-remote-registry|ostree-image-signed|ostree-unverified-registry):.*$" + +// Options for the org.osbuild.ostree.deploy.container stage. +type OSTreeDeployContainerStageOptions struct { + + // Name of the stateroot to be used in the deployment + OsName string `json:"osname"` + + // Additional kernel command line options + KernelOpts []string `json:"kernel_opts,omitempty"` + + // Image ref used as the source of truth for updates + TargetImgref string `json:"target_imgref"` + + // Identifier to locate the root file system (uuid or label) + Rootfs *Rootfs `json:"rootfs,omitempty"` + + // Mount points of the final file system + Mounts []string `json:"mounts,omitempty"` +} + +func (OSTreeDeployContainerStageOptions) isStageOptions() {} + +func (options OSTreeDeployContainerStageOptions) validate() error { + if options.OsName == "" { + return fmt.Errorf("osname is required") + } + + exp := regexp.MustCompile(ostreeContainerTargetImgrefRegex) + if !exp.MatchString(options.TargetImgref) { + return fmt.Errorf("'target_imgref' %q doesn't conform to schema (%s)", options.TargetImgref, exp.String()) + } + return nil +} + +type OSTreeDeployContainerInputs struct { + Images ContainersInput `json:"images"` +} + +func (OSTreeDeployContainerInputs) isStageInputs() {} + +func (inputs OSTreeDeployContainerInputs) validate() error { + if inputs.Images.References == nil { + return fmt.Errorf("stage requires exactly 1 input container (got nil References)") + } + if ncontainers := inputs.Images.References.Len(); ncontainers != 1 { + return fmt.Errorf("stage requires exactly 1 input container (got %d)", ncontainers) + } + return nil +} + +func NewOSTreeDeployContainerStage(options *OSTreeDeployContainerStageOptions, images ContainersInput) *Stage { + if err := options.validate(); err != nil { + panic(err) + } + inputs := OSTreeDeployContainerInputs{ + Images: images, + } + if err := inputs.validate(); err != nil { + panic(err) + } + return &Stage{ + Type: "org.osbuild.ostree.deploy.container", + Options: options, + Inputs: inputs, + } +} diff --git a/vendor/github.com/osbuild/images/pkg/osbuild/ostree_encapsulate_stage.go b/vendor/github.com/osbuild/images/pkg/osbuild/ostree_encapsulate_stage.go new file mode 100644 index 00000000000..a69274c5218 --- /dev/null +++ b/vendor/github.com/osbuild/images/pkg/osbuild/ostree_encapsulate_stage.go @@ -0,0 +1,53 @@ +package osbuild + +type OSTreeEncapsulateStageOptions struct { + // Resulting image filename + Filename string `json:"filename"` + + Cmd []string `json:"cmd,omitempty"` + + // Propagate an OSTree commit metadata key to container label + CopyMeta []string `json:"copymeta,omitempty"` + + // The encapsulated container format version (default 1) + FormatVersion *int `json:"format_version,omitempty"` + + // Additional labels for the container + Labels []string `json:"labels,omitempty"` + + // Max number of container image layers + MaxLayers *int `json:"max_layers,omitempty"` +} + +func (OSTreeEncapsulateStageOptions) isStageOptions() {} + +type OSTreeEncapsulateStageInput struct { + inputCommon + References []string `json:"references"` +} + +func (OSTreeEncapsulateStageInput) isStageInput() {} + +type OSTreeEncapsulateStageInputs struct { + Commit *OSTreeEncapsulateStageInput `json:"commit"` +} + +func (OSTreeEncapsulateStageInputs) isStageInputs() {} + +func NewOSTreeEncapsulateStage(options *OSTreeEncapsulateStageOptions, inputPipeline string) *Stage { + return &Stage{ + Type: "org.osbuild.ostree.encapsulate", + Options: options, + Inputs: NewOSTreeEncapsulateStageInputs(InputOriginPipeline, inputPipeline), + } +} + +func NewOSTreeEncapsulateStageInputs(origin, pipeline string) *OSTreeEncapsulateStageInputs { + encStageInput := new(OSTreeEncapsulateStageInput) + encStageInput.Type = "org.osbuild.ostree" + encStageInput.Origin = origin + + inputRefs := []string{"name:" + pipeline} + encStageInput.References = inputRefs + return &OSTreeEncapsulateStageInputs{Commit: encStageInput} +} diff --git a/vendor/github.com/osbuild/images/pkg/platform/aarch64.go b/vendor/github.com/osbuild/images/pkg/platform/aarch64.go index 879de6becd8..2212f7d8c3e 100644 --- a/vendor/github.com/osbuild/images/pkg/platform/aarch64.go +++ b/vendor/github.com/osbuild/images/pkg/platform/aarch64.go @@ -1,12 +1,16 @@ package platform +import ( + "github.com/osbuild/images/pkg/arch" +) + type Aarch64 struct { BasePlatform UEFIVendor string } -func (p *Aarch64) GetArch() Arch { - return ARCH_AARCH64 +func (p *Aarch64) GetArch() arch.Arch { + return arch.ARCH_AARCH64 } func (p *Aarch64) GetUEFIVendor() string { @@ -34,8 +38,8 @@ type Aarch64_Fedora struct { BootFiles [][2]string } -func (p *Aarch64_Fedora) GetArch() Arch { - return ARCH_AARCH64 +func (p *Aarch64_Fedora) GetArch() arch.Arch { + return arch.ARCH_AARCH64 } func (p *Aarch64_Fedora) GetUEFIVendor() string { diff --git a/vendor/github.com/osbuild/images/pkg/platform/platform.go b/vendor/github.com/osbuild/images/pkg/platform/platform.go index 854b861d37d..22c26456883 100644 --- a/vendor/github.com/osbuild/images/pkg/platform/platform.go +++ b/vendor/github.com/osbuild/images/pkg/platform/platform.go @@ -1,15 +1,11 @@ package platform -type Arch uint64 -type ImageFormat uint64 - -const ( // architecture enum - ARCH_AARCH64 Arch = iota - ARCH_PPC64LE - ARCH_S390X - ARCH_X86_64 +import ( + "github.com/osbuild/images/pkg/arch" ) +type ImageFormat uint64 + const ( // image format enum FORMAT_UNSET ImageFormat = iota FORMAT_RAW @@ -21,21 +17,6 @@ const ( // image format enum FORMAT_OVA ) -func (a Arch) String() string { - switch a { - case ARCH_AARCH64: - return "aarch64" - case ARCH_PPC64LE: - return "ppc64le" - case ARCH_S390X: - return "s390x" - case ARCH_X86_64: - return "x86_64" - default: - panic("invalid architecture") - } -} - func (f ImageFormat) String() string { switch f { case FORMAT_RAW: @@ -58,7 +39,7 @@ func (f ImageFormat) String() string { } type Platform interface { - GetArch() Arch + GetArch() arch.Arch GetImageFormat() ImageFormat GetQCOW2Compat() string GetBIOSPlatform() string diff --git a/vendor/github.com/osbuild/images/pkg/platform/ppc64le.go b/vendor/github.com/osbuild/images/pkg/platform/ppc64le.go index bf35bf7eeae..c258c552092 100644 --- a/vendor/github.com/osbuild/images/pkg/platform/ppc64le.go +++ b/vendor/github.com/osbuild/images/pkg/platform/ppc64le.go @@ -1,12 +1,16 @@ package platform +import ( + "github.com/osbuild/images/pkg/arch" +) + type PPC64LE struct { BasePlatform BIOS bool } -func (p *PPC64LE) GetArch() Arch { - return ARCH_PPC64LE +func (p *PPC64LE) GetArch() arch.Arch { + return arch.ARCH_PPC64LE } func (p *PPC64LE) GetBIOSPlatform() string { diff --git a/vendor/github.com/osbuild/images/pkg/platform/s390x.go b/vendor/github.com/osbuild/images/pkg/platform/s390x.go index 20ca7275893..b5350d03bd7 100644 --- a/vendor/github.com/osbuild/images/pkg/platform/s390x.go +++ b/vendor/github.com/osbuild/images/pkg/platform/s390x.go @@ -1,12 +1,16 @@ package platform +import ( + "github.com/osbuild/images/pkg/arch" +) + type S390X struct { BasePlatform Zipl bool } -func (p *S390X) GetArch() Arch { - return ARCH_S390X +func (p *S390X) GetArch() arch.Arch { + return arch.ARCH_S390X } func (p *S390X) GetZiplSupport() bool { diff --git a/vendor/github.com/osbuild/images/pkg/platform/x86_64.go b/vendor/github.com/osbuild/images/pkg/platform/x86_64.go index d9403b2f743..3d7d1c7b8a4 100644 --- a/vendor/github.com/osbuild/images/pkg/platform/x86_64.go +++ b/vendor/github.com/osbuild/images/pkg/platform/x86_64.go @@ -1,5 +1,9 @@ package platform +import ( + "github.com/osbuild/images/pkg/arch" +) + type X86BootLoader uint64 type X86 struct { @@ -8,8 +12,8 @@ type X86 struct { UEFIVendor string } -func (p *X86) GetArch() Arch { - return ARCH_X86_64 +func (p *X86) GetArch() arch.Arch { + return arch.ARCH_X86_64 } func (p *X86) GetBIOSPlatform() string { diff --git a/vendor/golang.org/x/crypto/cryptobyte/asn1.go b/vendor/golang.org/x/crypto/cryptobyte/asn1.go index 6fc2838a3fb..2492f796af9 100644 --- a/vendor/golang.org/x/crypto/cryptobyte/asn1.go +++ b/vendor/golang.org/x/crypto/cryptobyte/asn1.go @@ -733,13 +733,14 @@ func (s *String) ReadOptionalASN1OctetString(out *[]byte, outPresent *bool, tag return true } -// ReadOptionalASN1Boolean sets *out to the value of the next ASN.1 BOOLEAN or, -// if the next bytes are not an ASN.1 BOOLEAN, to the value of defaultValue. -// It reports whether the operation was successful. -func (s *String) ReadOptionalASN1Boolean(out *bool, defaultValue bool) bool { +// ReadOptionalASN1Boolean attempts to read an optional ASN.1 BOOLEAN +// explicitly tagged with tag into out and advances. If no element with a +// matching tag is present, it sets "out" to defaultValue instead. It reports +// whether the read was successful. +func (s *String) ReadOptionalASN1Boolean(out *bool, tag asn1.Tag, defaultValue bool) bool { var present bool var child String - if !s.ReadOptionalASN1(&child, &present, asn1.BOOLEAN) { + if !s.ReadOptionalASN1(&child, &present, tag) { return false } @@ -748,7 +749,7 @@ func (s *String) ReadOptionalASN1Boolean(out *bool, defaultValue bool) bool { return true } - return s.ReadASN1Boolean(out) + return child.ReadASN1Boolean(out) } func (s *String) readASN1(out *String, outTag *asn1.Tag, skipHeader bool) bool { diff --git a/vendor/golang.org/x/sys/unix/fcntl.go b/vendor/golang.org/x/sys/unix/fcntl.go index 58c6bfc70f6..6200876fb28 100644 --- a/vendor/golang.org/x/sys/unix/fcntl.go +++ b/vendor/golang.org/x/sys/unix/fcntl.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build dragonfly || freebsd || linux || netbsd || openbsd +//go:build dragonfly || freebsd || linux || netbsd package unix diff --git a/vendor/golang.org/x/sys/unix/ioctl_linux.go b/vendor/golang.org/x/sys/unix/ioctl_linux.go index 0d12c0851ad..dbe680eab88 100644 --- a/vendor/golang.org/x/sys/unix/ioctl_linux.go +++ b/vendor/golang.org/x/sys/unix/ioctl_linux.go @@ -231,3 +231,8 @@ func IoctlLoopGetStatus64(fd int) (*LoopInfo64, error) { func IoctlLoopSetStatus64(fd int, value *LoopInfo64) error { return ioctlPtr(fd, LOOP_SET_STATUS64, unsafe.Pointer(value)) } + +// IoctlLoopConfigure configures all loop device parameters in a single step +func IoctlLoopConfigure(fd int, value *LoopConfig) error { + return ioctlPtr(fd, LOOP_CONFIGURE, unsafe.Pointer(value)) +} diff --git a/vendor/golang.org/x/sys/unix/mkerrors.sh b/vendor/golang.org/x/sys/unix/mkerrors.sh index cbe24150a7a..6202638bae8 100644 --- a/vendor/golang.org/x/sys/unix/mkerrors.sh +++ b/vendor/golang.org/x/sys/unix/mkerrors.sh @@ -519,6 +519,7 @@ ccflags="$@" $2 ~ /^LOCK_(SH|EX|NB|UN)$/ || $2 ~ /^LO_(KEY|NAME)_SIZE$/ || $2 ~ /^LOOP_(CLR|CTL|GET|SET)_/ || + $2 == "LOOP_CONFIGURE" || $2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|TCP|MCAST|EVFILT|NOTE|SHUT|PROT|MAP|MREMAP|MFD|T?PACKET|MSG|SCM|MCL|DT|MADV|PR|LOCAL|TCPOPT|UDP)_/ || $2 ~ /^NFC_(GENL|PROTO|COMM|RF|SE|DIRECTION|LLCP|SOCKPROTO)_/ || $2 ~ /^NFC_.*_(MAX)?SIZE$/ || @@ -560,7 +561,7 @@ ccflags="$@" $2 ~ /^RLIMIT_(AS|CORE|CPU|DATA|FSIZE|LOCKS|MEMLOCK|MSGQUEUE|NICE|NOFILE|NPROC|RSS|RTPRIO|RTTIME|SIGPENDING|STACK)|RLIM_INFINITY/ || $2 ~ /^PRIO_(PROCESS|PGRP|USER)/ || $2 ~ /^CLONE_[A-Z_]+/ || - $2 !~ /^(BPF_TIMEVAL|BPF_FIB_LOOKUP_[A-Z]+)$/ && + $2 !~ /^(BPF_TIMEVAL|BPF_FIB_LOOKUP_[A-Z]+|BPF_F_LINK)$/ && $2 ~ /^(BPF|DLT)_/ || $2 ~ /^AUDIT_/ || $2 ~ /^(CLOCK|TIMER)_/ || diff --git a/vendor/golang.org/x/sys/unix/syscall_bsd.go b/vendor/golang.org/x/sys/unix/syscall_bsd.go index 6f328e3a554..a00c3e5450b 100644 --- a/vendor/golang.org/x/sys/unix/syscall_bsd.go +++ b/vendor/golang.org/x/sys/unix/syscall_bsd.go @@ -316,7 +316,7 @@ func GetsockoptString(fd, level, opt int) (string, error) { if err != nil { return "", err } - return string(buf[:vallen-1]), nil + return ByteSliceToString(buf[:vallen]), nil } //sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_linux.go b/vendor/golang.org/x/sys/unix/syscall_linux.go index a5e1c10e341..0f85e29e621 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux.go @@ -61,15 +61,23 @@ func FanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname string) ( } //sys fchmodat(dirfd int, path string, mode uint32) (err error) - -func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) { - // Linux fchmodat doesn't support the flags parameter. Mimick glibc's behavior - // and check the flags. Otherwise the mode would be applied to the symlink - // destination which is not what the user expects. - if flags&^AT_SYMLINK_NOFOLLOW != 0 { - return EINVAL - } else if flags&AT_SYMLINK_NOFOLLOW != 0 { - return EOPNOTSUPP +//sys fchmodat2(dirfd int, path string, mode uint32, flags int) (err error) + +func Fchmodat(dirfd int, path string, mode uint32, flags int) error { + // Linux fchmodat doesn't support the flags parameter, but fchmodat2 does. + // Try fchmodat2 if flags are specified. + if flags != 0 { + err := fchmodat2(dirfd, path, mode, flags) + if err == ENOSYS { + // fchmodat2 isn't available. If the flags are known to be valid, + // return EOPNOTSUPP to indicate that fchmodat doesn't support them. + if flags&^(AT_SYMLINK_NOFOLLOW|AT_EMPTY_PATH) != 0 { + return EINVAL + } else if flags&(AT_SYMLINK_NOFOLLOW|AT_EMPTY_PATH) != 0 { + return EOPNOTSUPP + } + } + return err } return fchmodat(dirfd, path, mode) } @@ -1302,7 +1310,7 @@ func GetsockoptString(fd, level, opt int) (string, error) { return "", err } } - return string(buf[:vallen-1]), nil + return ByteSliceToString(buf[:vallen]), nil } func GetsockoptTpacketStats(fd, level, opt int) (*TpacketStats, error) { diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd.go b/vendor/golang.org/x/sys/unix/syscall_openbsd.go index d2882ee04f7..b25343c71a4 100644 --- a/vendor/golang.org/x/sys/unix/syscall_openbsd.go +++ b/vendor/golang.org/x/sys/unix/syscall_openbsd.go @@ -166,6 +166,20 @@ func Getresgid() (rgid, egid, sgid int) { //sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL +//sys fcntl(fd int, cmd int, arg int) (n int, err error) +//sys fcntlPtr(fd int, cmd int, arg unsafe.Pointer) (n int, err error) = SYS_FCNTL + +// FcntlInt performs a fcntl syscall on fd with the provided command and argument. +func FcntlInt(fd uintptr, cmd, arg int) (int, error) { + return fcntl(int(fd), cmd, arg) +} + +// FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command. +func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error { + _, err := fcntlPtr(int(fd), cmd, unsafe.Pointer(lk)) + return err +} + //sys ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) func Ppoll(fds []PollFd, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { diff --git a/vendor/golang.org/x/sys/unix/syscall_solaris.go b/vendor/golang.org/x/sys/unix/syscall_solaris.go index 60c8142d49e..21974af064d 100644 --- a/vendor/golang.org/x/sys/unix/syscall_solaris.go +++ b/vendor/golang.org/x/sys/unix/syscall_solaris.go @@ -158,7 +158,7 @@ func GetsockoptString(fd, level, opt int) (string, error) { if err != nil { return "", err } - return string(buf[:vallen-1]), nil + return ByteSliceToString(buf[:vallen]), nil } const ImplementsGetwd = true diff --git a/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go b/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go index d99d05f1bc1..b473038c615 100644 --- a/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go +++ b/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go @@ -1104,7 +1104,7 @@ func GetsockoptString(fd, level, opt int) (string, error) { return "", err } - return string(buf[:vallen-1]), nil + return ByteSliceToString(buf[:vallen]), nil } func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) { diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux.go b/vendor/golang.org/x/sys/unix/zerrors_linux.go index 9c00cbf512c..c73cfe2f10b 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux.go @@ -486,7 +486,6 @@ const ( BPF_F_ANY_ALIGNMENT = 0x2 BPF_F_BEFORE = 0x8 BPF_F_ID = 0x20 - BPF_F_LINK = 0x2000 BPF_F_NETFILTER_IP_DEFRAG = 0x1 BPF_F_QUERY_EFFECTIVE = 0x1 BPF_F_REPLACE = 0x4 @@ -1802,6 +1801,7 @@ const ( LOCK_SH = 0x1 LOCK_UN = 0x8 LOOP_CLR_FD = 0x4c01 + LOOP_CONFIGURE = 0x4c0a LOOP_CTL_ADD = 0x4c80 LOOP_CTL_GET_FREE = 0x4c82 LOOP_CTL_REMOVE = 0x4c81 diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux.go b/vendor/golang.org/x/sys/unix/zsyscall_linux.go index faca7a557b1..1488d27128c 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux.go @@ -37,6 +37,21 @@ func fchmodat(dirfd int, path string, mode uint32) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func fchmodat2(dirfd int, path string, mode uint32, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FCHMODAT2, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func ioctl(fd int, req uint, arg uintptr) (err error) { _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go index 88bfc288578..a1d061597cc 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go @@ -584,6 +584,32 @@ var libc_sysctl_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func fcntl(fd int, cmd int, arg int) (n int, err error) { + r0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_fcntl_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_fcntl fcntl "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fcntlPtr(fd int, cmd int, arg unsafe.Pointer) (n int, err error) { + r0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { r0, _, e1 := syscall_syscall6(libc_ppoll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0) n = int(r0) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s index 4cbeff171b2..41b5617316c 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s @@ -178,6 +178,11 @@ TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $4 DATA ·libc_sysctl_trampoline_addr(SB)/4, $libc_sysctl_trampoline<>(SB) +TEXT libc_fcntl_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_fcntl(SB) +GLOBL ·libc_fcntl_trampoline_addr(SB), RODATA, $4 +DATA ·libc_fcntl_trampoline_addr(SB)/4, $libc_fcntl_trampoline<>(SB) + TEXT libc_ppoll_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_ppoll(SB) GLOBL ·libc_ppoll_trampoline_addr(SB), RODATA, $4 diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go index b8a67b99af8..5b2a7409778 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go @@ -584,6 +584,32 @@ var libc_sysctl_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func fcntl(fd int, cmd int, arg int) (n int, err error) { + r0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_fcntl_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_fcntl fcntl "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fcntlPtr(fd int, cmd int, arg unsafe.Pointer) (n int, err error) { + r0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { r0, _, e1 := syscall_syscall6(libc_ppoll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0) n = int(r0) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s index 1123f27571e..4019a656f6d 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s @@ -178,6 +178,11 @@ TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8 DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB) +TEXT libc_fcntl_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_fcntl(SB) +GLOBL ·libc_fcntl_trampoline_addr(SB), RODATA, $8 +DATA ·libc_fcntl_trampoline_addr(SB)/8, $libc_fcntl_trampoline<>(SB) + TEXT libc_ppoll_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_ppoll(SB) GLOBL ·libc_ppoll_trampoline_addr(SB), RODATA, $8 diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go index af50a65c0cd..f6eda1344a8 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go @@ -584,6 +584,32 @@ var libc_sysctl_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func fcntl(fd int, cmd int, arg int) (n int, err error) { + r0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_fcntl_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_fcntl fcntl "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fcntlPtr(fd int, cmd int, arg unsafe.Pointer) (n int, err error) { + r0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { r0, _, e1 := syscall_syscall6(libc_ppoll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0) n = int(r0) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s index 82badae39fe..ac4af24f908 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s @@ -178,6 +178,11 @@ TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $4 DATA ·libc_sysctl_trampoline_addr(SB)/4, $libc_sysctl_trampoline<>(SB) +TEXT libc_fcntl_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_fcntl(SB) +GLOBL ·libc_fcntl_trampoline_addr(SB), RODATA, $4 +DATA ·libc_fcntl_trampoline_addr(SB)/4, $libc_fcntl_trampoline<>(SB) + TEXT libc_ppoll_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_ppoll(SB) GLOBL ·libc_ppoll_trampoline_addr(SB), RODATA, $4 diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go index 8fb4ff36a7d..55df20ae9d8 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go @@ -584,6 +584,32 @@ var libc_sysctl_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func fcntl(fd int, cmd int, arg int) (n int, err error) { + r0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_fcntl_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_fcntl fcntl "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fcntlPtr(fd int, cmd int, arg unsafe.Pointer) (n int, err error) { + r0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { r0, _, e1 := syscall_syscall6(libc_ppoll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0) n = int(r0) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s index 24d7eecb93b..f77d532121b 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s @@ -178,6 +178,11 @@ TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8 DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB) +TEXT libc_fcntl_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_fcntl(SB) +GLOBL ·libc_fcntl_trampoline_addr(SB), RODATA, $8 +DATA ·libc_fcntl_trampoline_addr(SB)/8, $libc_fcntl_trampoline<>(SB) + TEXT libc_ppoll_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_ppoll(SB) GLOBL ·libc_ppoll_trampoline_addr(SB), RODATA, $8 diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go index f469a83ee6e..8c1155cbc08 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go @@ -584,6 +584,32 @@ var libc_sysctl_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func fcntl(fd int, cmd int, arg int) (n int, err error) { + r0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_fcntl_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_fcntl fcntl "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fcntlPtr(fd int, cmd int, arg unsafe.Pointer) (n int, err error) { + r0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { r0, _, e1 := syscall_syscall6(libc_ppoll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0) n = int(r0) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s index 9a498a06773..fae140b62c9 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s @@ -178,6 +178,11 @@ TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8 DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB) +TEXT libc_fcntl_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_fcntl(SB) +GLOBL ·libc_fcntl_trampoline_addr(SB), RODATA, $8 +DATA ·libc_fcntl_trampoline_addr(SB)/8, $libc_fcntl_trampoline<>(SB) + TEXT libc_ppoll_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_ppoll(SB) GLOBL ·libc_ppoll_trampoline_addr(SB), RODATA, $8 diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go index c26ca2e1aa2..7cc80c58d98 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go @@ -584,6 +584,32 @@ var libc_sysctl_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func fcntl(fd int, cmd int, arg int) (n int, err error) { + r0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_fcntl_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_fcntl fcntl "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fcntlPtr(fd int, cmd int, arg unsafe.Pointer) (n int, err error) { + r0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { r0, _, e1 := syscall_syscall6(libc_ppoll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0) n = int(r0) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s index 1f224aa4162..9d1e0ff06d0 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s @@ -213,6 +213,12 @@ TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8 DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB) +TEXT libc_fcntl_trampoline<>(SB),NOSPLIT,$0-0 + CALL libc_fcntl(SB) + RET +GLOBL ·libc_fcntl_trampoline_addr(SB), RODATA, $8 +DATA ·libc_fcntl_trampoline_addr(SB)/8, $libc_fcntl_trampoline<>(SB) + TEXT libc_ppoll_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_ppoll(SB) RET diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go index bcc920dd259..0688737f494 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go @@ -584,6 +584,32 @@ var libc_sysctl_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func fcntl(fd int, cmd int, arg int) (n int, err error) { + r0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_fcntl_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_fcntl fcntl "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fcntlPtr(fd int, cmd int, arg unsafe.Pointer) (n int, err error) { + r0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { r0, _, e1 := syscall_syscall6(libc_ppoll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0) n = int(r0) diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s index 87a79c7095a..da115f9a4b6 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s @@ -178,6 +178,11 @@ TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8 DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB) +TEXT libc_fcntl_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_fcntl(SB) +GLOBL ·libc_fcntl_trampoline_addr(SB), RODATA, $8 +DATA ·libc_fcntl_trampoline_addr(SB)/8, $libc_fcntl_trampoline<>(SB) + TEXT libc_ppoll_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_ppoll(SB) GLOBL ·libc_ppoll_trampoline_addr(SB), RODATA, $8 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux.go b/vendor/golang.org/x/sys/unix/ztypes_linux.go index 997bcd55ae9..bbf8399ff58 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux.go @@ -2671,6 +2671,7 @@ const ( BPF_PROG_TYPE_LSM = 0x1d BPF_PROG_TYPE_SK_LOOKUP = 0x1e BPF_PROG_TYPE_SYSCALL = 0x1f + BPF_PROG_TYPE_NETFILTER = 0x20 BPF_CGROUP_INET_INGRESS = 0x0 BPF_CGROUP_INET_EGRESS = 0x1 BPF_CGROUP_INET_SOCK_CREATE = 0x2 @@ -2715,6 +2716,11 @@ const ( BPF_PERF_EVENT = 0x29 BPF_TRACE_KPROBE_MULTI = 0x2a BPF_LSM_CGROUP = 0x2b + BPF_STRUCT_OPS = 0x2c + BPF_NETFILTER = 0x2d + BPF_TCX_INGRESS = 0x2e + BPF_TCX_EGRESS = 0x2f + BPF_TRACE_UPROBE_MULTI = 0x30 BPF_LINK_TYPE_UNSPEC = 0x0 BPF_LINK_TYPE_RAW_TRACEPOINT = 0x1 BPF_LINK_TYPE_TRACING = 0x2 @@ -2725,6 +2731,18 @@ const ( BPF_LINK_TYPE_PERF_EVENT = 0x7 BPF_LINK_TYPE_KPROBE_MULTI = 0x8 BPF_LINK_TYPE_STRUCT_OPS = 0x9 + BPF_LINK_TYPE_NETFILTER = 0xa + BPF_LINK_TYPE_TCX = 0xb + BPF_LINK_TYPE_UPROBE_MULTI = 0xc + BPF_PERF_EVENT_UNSPEC = 0x0 + BPF_PERF_EVENT_UPROBE = 0x1 + BPF_PERF_EVENT_URETPROBE = 0x2 + BPF_PERF_EVENT_KPROBE = 0x3 + BPF_PERF_EVENT_KRETPROBE = 0x4 + BPF_PERF_EVENT_TRACEPOINT = 0x5 + BPF_PERF_EVENT_EVENT = 0x6 + BPF_F_KPROBE_MULTI_RETURN = 0x1 + BPF_F_UPROBE_MULTI_RETURN = 0x1 BPF_ANY = 0x0 BPF_NOEXIST = 0x1 BPF_EXIST = 0x2 @@ -2742,6 +2760,8 @@ const ( BPF_F_MMAPABLE = 0x400 BPF_F_PRESERVE_ELEMS = 0x800 BPF_F_INNER_MAP = 0x1000 + BPF_F_LINK = 0x2000 + BPF_F_PATH_FD = 0x4000 BPF_STATS_RUN_TIME = 0x0 BPF_STACK_BUILD_ID_EMPTY = 0x0 BPF_STACK_BUILD_ID_VALID = 0x1 @@ -2762,6 +2782,7 @@ const ( BPF_F_ZERO_CSUM_TX = 0x2 BPF_F_DONT_FRAGMENT = 0x4 BPF_F_SEQ_NUMBER = 0x8 + BPF_F_NO_TUNNEL_KEY = 0x10 BPF_F_TUNINFO_FLAGS = 0x10 BPF_F_INDEX_MASK = 0xffffffff BPF_F_CURRENT_CPU = 0xffffffff @@ -2778,6 +2799,8 @@ const ( BPF_F_ADJ_ROOM_ENCAP_L4_UDP = 0x10 BPF_F_ADJ_ROOM_NO_CSUM_RESET = 0x20 BPF_F_ADJ_ROOM_ENCAP_L2_ETH = 0x40 + BPF_F_ADJ_ROOM_DECAP_L3_IPV4 = 0x80 + BPF_F_ADJ_ROOM_DECAP_L3_IPV6 = 0x100 BPF_ADJ_ROOM_ENCAP_L2_MASK = 0xff BPF_ADJ_ROOM_ENCAP_L2_SHIFT = 0x38 BPF_F_SYSCTL_BASE_NAME = 0x1 @@ -2866,6 +2889,8 @@ const ( BPF_DEVCG_DEV_CHAR = 0x2 BPF_FIB_LOOKUP_DIRECT = 0x1 BPF_FIB_LOOKUP_OUTPUT = 0x2 + BPF_FIB_LOOKUP_SKIP_NEIGH = 0x4 + BPF_FIB_LOOKUP_TBID = 0x8 BPF_FIB_LKUP_RET_SUCCESS = 0x0 BPF_FIB_LKUP_RET_BLACKHOLE = 0x1 BPF_FIB_LKUP_RET_UNREACHABLE = 0x2 @@ -2901,6 +2926,7 @@ const ( BPF_CORE_ENUMVAL_EXISTS = 0xa BPF_CORE_ENUMVAL_VALUE = 0xb BPF_CORE_TYPE_MATCHES = 0xc + BPF_F_TIMER_ABS = 0x1 ) const ( @@ -2979,6 +3005,12 @@ type LoopInfo64 struct { Encrypt_key [32]uint8 Init [2]uint64 } +type LoopConfig struct { + Fd uint32 + Size uint32 + Info LoopInfo64 + _ [8]uint64 +} type TIPCSocketAddr struct { Ref uint32 diff --git a/vendor/golang.org/x/sys/windows/syscall_windows.go b/vendor/golang.org/x/sys/windows/syscall_windows.go index fb6cfd0462b..47dc5796769 100644 --- a/vendor/golang.org/x/sys/windows/syscall_windows.go +++ b/vendor/golang.org/x/sys/windows/syscall_windows.go @@ -155,6 +155,8 @@ func NewCallbackCDecl(fn interface{}) uintptr { //sys GetModuleFileName(module Handle, filename *uint16, size uint32) (n uint32, err error) = kernel32.GetModuleFileNameW //sys GetModuleHandleEx(flags uint32, moduleName *uint16, module *Handle) (err error) = kernel32.GetModuleHandleExW //sys SetDefaultDllDirectories(directoryFlags uint32) (err error) +//sys AddDllDirectory(path *uint16) (cookie uintptr, err error) = kernel32.AddDllDirectory +//sys RemoveDllDirectory(cookie uintptr) (err error) = kernel32.RemoveDllDirectory //sys SetDllDirectory(path string) (err error) = kernel32.SetDllDirectoryW //sys GetVersion() (ver uint32, err error) //sys FormatMessage(flags uint32, msgsrc uintptr, msgid uint32, langid uint32, buf []uint16, args *byte) (n uint32, err error) = FormatMessageW diff --git a/vendor/golang.org/x/sys/windows/zsyscall_windows.go b/vendor/golang.org/x/sys/windows/zsyscall_windows.go index db6282e00a5..146a1f0196f 100644 --- a/vendor/golang.org/x/sys/windows/zsyscall_windows.go +++ b/vendor/golang.org/x/sys/windows/zsyscall_windows.go @@ -184,6 +184,7 @@ var ( procGetAdaptersInfo = modiphlpapi.NewProc("GetAdaptersInfo") procGetBestInterfaceEx = modiphlpapi.NewProc("GetBestInterfaceEx") procGetIfEntry = modiphlpapi.NewProc("GetIfEntry") + procAddDllDirectory = modkernel32.NewProc("AddDllDirectory") procAssignProcessToJobObject = modkernel32.NewProc("AssignProcessToJobObject") procCancelIo = modkernel32.NewProc("CancelIo") procCancelIoEx = modkernel32.NewProc("CancelIoEx") @@ -330,6 +331,7 @@ var ( procReadProcessMemory = modkernel32.NewProc("ReadProcessMemory") procReleaseMutex = modkernel32.NewProc("ReleaseMutex") procRemoveDirectoryW = modkernel32.NewProc("RemoveDirectoryW") + procRemoveDllDirectory = modkernel32.NewProc("RemoveDllDirectory") procResetEvent = modkernel32.NewProc("ResetEvent") procResizePseudoConsole = modkernel32.NewProc("ResizePseudoConsole") procResumeThread = modkernel32.NewProc("ResumeThread") @@ -1605,6 +1607,15 @@ func GetIfEntry(pIfRow *MibIfRow) (errcode error) { return } +func AddDllDirectory(path *uint16) (cookie uintptr, err error) { + r0, _, e1 := syscall.Syscall(procAddDllDirectory.Addr(), 1, uintptr(unsafe.Pointer(path)), 0, 0) + cookie = uintptr(r0) + if cookie == 0 { + err = errnoErr(e1) + } + return +} + func AssignProcessToJobObject(job Handle, process Handle) (err error) { r1, _, e1 := syscall.Syscall(procAssignProcessToJobObject.Addr(), 2, uintptr(job), uintptr(process), 0) if r1 == 0 { @@ -2879,6 +2890,14 @@ func RemoveDirectory(path *uint16) (err error) { return } +func RemoveDllDirectory(cookie uintptr) (err error) { + r1, _, e1 := syscall.Syscall(procRemoveDllDirectory.Addr(), 1, uintptr(cookie), 0, 0) + if r1 == 0 { + err = errnoErr(e1) + } + return +} + func ResetEvent(event Handle) (err error) { r1, _, e1 := syscall.Syscall(procResetEvent.Addr(), 1, uintptr(event), 0, 0) if r1 == 0 { diff --git a/vendor/golang.org/x/time/rate/rate.go b/vendor/golang.org/x/time/rate/rate.go index f0e0cf3cb1d..8f6c7f493f8 100644 --- a/vendor/golang.org/x/time/rate/rate.go +++ b/vendor/golang.org/x/time/rate/rate.go @@ -52,6 +52,8 @@ func Every(interval time.Duration) Limit { // or its associated context.Context is canceled. // // The methods AllowN, ReserveN, and WaitN consume n tokens. +// +// Limiter is safe for simultaneous use by multiple goroutines. type Limiter struct { mu sync.Mutex limit Limit diff --git a/vendor/google.golang.org/api/internal/version.go b/vendor/google.golang.org/api/internal/version.go index 028e96edebd..c95bd7144f0 100644 --- a/vendor/google.golang.org/api/internal/version.go +++ b/vendor/google.golang.org/api/internal/version.go @@ -5,4 +5,4 @@ package internal // Version is the current tagged release of the library. -const Version = "0.151.0" +const Version = "0.152.0" diff --git a/vendor/modules.txt b/vendor/modules.txt index 36c8babeceb..a227d97d9fa 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1,4 +1,4 @@ -# cloud.google.com/go v0.110.8 +# cloud.google.com/go v0.110.10 ## explicit; go 1.19 cloud.google.com/go/internal cloud.google.com/go/internal/optional @@ -12,7 +12,7 @@ cloud.google.com/go/compute/internal # cloud.google.com/go/compute/metadata v0.2.3 ## explicit; go 1.19 cloud.google.com/go/compute/metadata -# cloud.google.com/go/iam v1.1.3 +# cloud.google.com/go/iam v1.1.5 ## explicit; go 1.19 cloud.google.com/go/iam cloud.google.com/go/iam/apiv1/iampb @@ -119,7 +119,7 @@ github.com/acarl005/stripansi # github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 ## explicit; go 1.13 github.com/asaskevich/govalidator -# github.com/aws/aws-sdk-go v1.48.1 +# github.com/aws/aws-sdk-go v1.48.5 ## explicit; go 1.19 github.com/aws/aws-sdk-go/aws github.com/aws/aws-sdk-go/aws/arn @@ -656,7 +656,7 @@ github.com/oracle/oci-go-sdk/v54/identity github.com/oracle/oci-go-sdk/v54/objectstorage github.com/oracle/oci-go-sdk/v54/objectstorage/transfer github.com/oracle/oci-go-sdk/v54/workrequests -# github.com/osbuild/images v0.18.0 +# github.com/osbuild/images v0.20.0 ## explicit; go 1.19 github.com/osbuild/images/internal/common github.com/osbuild/images/internal/environment @@ -668,6 +668,7 @@ github.com/osbuild/images/internal/pathpolicy github.com/osbuild/images/internal/shell github.com/osbuild/images/internal/users github.com/osbuild/images/internal/workload +github.com/osbuild/images/pkg/arch github.com/osbuild/images/pkg/artifact github.com/osbuild/images/pkg/blueprint github.com/osbuild/images/pkg/container @@ -680,6 +681,7 @@ github.com/osbuild/images/pkg/distro/rhel8 github.com/osbuild/images/pkg/distro/rhel9 github.com/osbuild/images/pkg/distro/test_distro github.com/osbuild/images/pkg/distroregistry +github.com/osbuild/images/pkg/dnfjson github.com/osbuild/images/pkg/image github.com/osbuild/images/pkg/manifest github.com/osbuild/images/pkg/osbuild @@ -878,7 +880,7 @@ go.opencensus.io/trace go.opencensus.io/trace/internal go.opencensus.io/trace/propagation go.opencensus.io/trace/tracestate -# golang.org/x/crypto v0.15.0 +# golang.org/x/crypto v0.16.0 ## explicit; go 1.18 golang.org/x/crypto/acme golang.org/x/crypto/acme/autocert @@ -915,7 +917,7 @@ golang.org/x/exp/slices golang.org/x/mod/internal/lazyregexp golang.org/x/mod/module golang.org/x/mod/semver -# golang.org/x/net v0.18.0 +# golang.org/x/net v0.19.0 ## explicit; go 1.18 golang.org/x/net/html golang.org/x/net/html/atom @@ -926,7 +928,7 @@ golang.org/x/net/http2/hpack golang.org/x/net/idna golang.org/x/net/internal/timeseries golang.org/x/net/trace -# golang.org/x/oauth2 v0.14.0 +# golang.org/x/oauth2 v0.15.0 ## explicit; go 1.18 golang.org/x/oauth2 golang.org/x/oauth2/authhandler @@ -940,14 +942,14 @@ golang.org/x/oauth2/jwt # golang.org/x/sync v0.5.0 ## explicit; go 1.18 golang.org/x/sync/semaphore -# golang.org/x/sys v0.14.0 +# golang.org/x/sys v0.15.0 ## explicit; go 1.18 golang.org/x/sys/cpu golang.org/x/sys/execabs golang.org/x/sys/plan9 golang.org/x/sys/unix golang.org/x/sys/windows -# golang.org/x/term v0.14.0 +# golang.org/x/term v0.15.0 ## explicit; go 1.18 golang.org/x/term # golang.org/x/text v0.14.0 @@ -965,8 +967,8 @@ golang.org/x/text/transform golang.org/x/text/unicode/bidi golang.org/x/text/unicode/norm golang.org/x/text/width -# golang.org/x/time v0.3.0 -## explicit +# golang.org/x/time v0.5.0 +## explicit; go 1.18 golang.org/x/time/rate # golang.org/x/tools v0.14.0 ## explicit; go 1.18 @@ -986,7 +988,7 @@ golang.org/x/tools/internal/typeparams ## explicit; go 1.17 golang.org/x/xerrors golang.org/x/xerrors/internal -# google.golang.org/api v0.151.0 +# google.golang.org/api v0.152.0 ## explicit; go 1.19 google.golang.org/api/googleapi google.golang.org/api/googleapi/transport @@ -1016,17 +1018,17 @@ google.golang.org/appengine/internal/modules google.golang.org/appengine/internal/remote_api google.golang.org/appengine/internal/urlfetch google.golang.org/appengine/urlfetch -# google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b +# google.golang.org/genproto v0.0.0-20231106174013-bbf56f31fb17 ## explicit; go 1.19 google.golang.org/genproto/googleapis/cloud/extendedops google.golang.org/genproto/googleapis/type/date google.golang.org/genproto/googleapis/type/expr google.golang.org/genproto/internal -# google.golang.org/genproto/googleapis/api v0.0.0-20231016165738-49dd2c1f3d0b +# google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17 ## explicit; go 1.19 google.golang.org/genproto/googleapis/api google.golang.org/genproto/googleapis/api/annotations -# google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405 +# google.golang.org/genproto/googleapis/rpc v0.0.0-20231120223509-83a465c0220f ## explicit; go 1.19 google.golang.org/genproto/googleapis/rpc/code google.golang.org/genproto/googleapis/rpc/errdetails