diff --git a/go.mod b/go.mod index f6fe925900..fbf8a2f873 100644 --- a/go.mod +++ b/go.mod @@ -254,3 +254,5 @@ require ( gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) + +replace github.com/osbuild/images => github.com/achilleas-k/images v0.0.0-20241028111523-6e94a3ec4b70 diff --git a/go.sum b/go.sum index 3bfceefe69..5e62c0898b 100644 --- a/go.sum +++ b/go.sum @@ -98,6 +98,8 @@ github.com/VividCortex/ewma v1.2.0 h1:f58SaIzcDXrSy3kWaHNvuJgJ3Nmz59Zji6XoJR/q1o github.com/VividCortex/ewma v1.2.0/go.mod h1:nz4BbCtbLyFDeC9SUHbtcT5644juEuWfUAUnGx7j5l4= github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d h1:licZJFw2RwpHMqeKTCYkitsPqHNxTmd4SNR5r94FGM8= github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d/go.mod h1:asat636LX7Bqt5lYEZ27JNDcqxfjdBQuJ/MM4CN/Lzo= +github.com/achilleas-k/images v0.0.0-20241028111523-6e94a3ec4b70 h1:+GlJmqwCfVtqLT50MunZBeeHR6SABnnSkIyMuWZ363U= +github.com/achilleas-k/images v0.0.0-20241028111523-6e94a3ec4b70/go.mod h1:4bNmMQOVadIKVC1q8zsLO8tdEQFH90zIp+MQBQUnCiE= 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-v2 v1.30.4 h1:frhcagrVNrzmT95RJImMHgabt99vkXGslubDaDagTk8= @@ -534,8 +536,6 @@ github.com/openshift-online/ocm-sdk-go v0.1.438 h1:tsLCCUzbLCTL4RZG02y9RuopmGCXp github.com/openshift-online/ocm-sdk-go v0.1.438/go.mod h1:CiAu2jwl3ITKOxkeV0Qnhzv4gs35AmpIzVABQLtcI2Y= 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.94.0 h1:bdvVW+qIAwfyoYdMH5f4ZVJBVxEVWPyqpDXNhrwN2MI= -github.com/osbuild/images v0.94.0/go.mod h1:4bNmMQOVadIKVC1q8zsLO8tdEQFH90zIp+MQBQUnCiE= github.com/osbuild/osbuild-composer/pkg/splunk_logger v0.0.0-20240814102216-0239db53236d h1:r9BFPDv0uuA9k1947Jybcxs36c/pTywWS1gjeizvtcQ= github.com/osbuild/osbuild-composer/pkg/splunk_logger v0.0.0-20240814102216-0239db53236d/go.mod h1:zR1iu/hOuf+OQNJlk70tju9IqzzM4ycq0ectkFBm94U= github.com/osbuild/pulp-client v0.1.0 h1:L0C4ezBJGTamN3BKdv+rKLuq/WxXJbsFwz/Hj7aEmJ8= diff --git a/vendor/github.com/osbuild/images/pkg/distro/rhel/rhel8/azure.go b/vendor/github.com/osbuild/images/pkg/distro/rhel/rhel8/azure.go index e65ace67c9..589b702588 100644 --- a/vendor/github.com/osbuild/images/pkg/distro/rhel/rhel8/azure.go +++ b/vendor/github.com/osbuild/images/pkg/distro/rhel/rhel8/azure.go @@ -529,7 +529,6 @@ var defaultAzureImageConfig = &distro.ImageConfig{ "nm-cloud-setup.service", "nm-cloud-setup.timer", "sshd", - "systemd-resolved", "waagent", }, SshdConfig: &osbuild.SshdConfigStageOptions{ diff --git a/vendor/github.com/osbuild/images/pkg/reporegistry/error.go b/vendor/github.com/osbuild/images/pkg/reporegistry/error.go new file mode 100644 index 0000000000..7e0938d7fe --- /dev/null +++ b/vendor/github.com/osbuild/images/pkg/reporegistry/error.go @@ -0,0 +1,13 @@ +package reporegistry + +import "fmt" + +// NoReposLoadedError is an error type that is returned when no repositories +// are loaded from the given paths. +type NoReposLoadedError struct { + Paths []string +} + +func (e *NoReposLoadedError) Error() string { + return fmt.Sprintf("no repositories found in the given paths: %v", e.Paths) +} diff --git a/vendor/github.com/osbuild/images/pkg/reporegistry/reporegistry.go b/vendor/github.com/osbuild/images/pkg/reporegistry/reporegistry.go index 8934fde245..24209c9b51 100644 --- a/vendor/github.com/osbuild/images/pkg/reporegistry/reporegistry.go +++ b/vendor/github.com/osbuild/images/pkg/reporegistry/reporegistry.go @@ -23,9 +23,6 @@ func New(repoConfigPaths []string) (*RepoRegistry, error) { if err != nil { return nil, err } - if len(repositories) == 0 { - return nil, fmt.Errorf("no repositories found in the given paths: %v", repoConfigPaths) - } return &RepoRegistry{repositories}, nil } diff --git a/vendor/github.com/osbuild/images/pkg/reporegistry/repository.go b/vendor/github.com/osbuild/images/pkg/reporegistry/repository.go index a65e194681..8b9b7ab87a 100644 --- a/vendor/github.com/osbuild/images/pkg/reporegistry/repository.go +++ b/vendor/github.com/osbuild/images/pkg/reporegistry/repository.go @@ -1,7 +1,6 @@ package reporegistry import ( - "fmt" "log" "os" "path/filepath" @@ -66,6 +65,10 @@ func LoadAllRepositories(confPaths []string) (rpmmd.DistrosRepoConfigs, error) { } } + if len(distrosRepoConfigs) == 0 { + return nil, &NoReposLoadedError{confPaths} + } + return distrosRepoConfigs, nil } @@ -93,7 +96,7 @@ func LoadRepositories(confPaths []string, distro string) (map[string][]rpmmd.Rep } if repoConfigs == nil { - return nil, fmt.Errorf("LoadRepositories failed: none of the provided paths contain distro configuration") + return nil, &NoReposLoadedError{confPaths} } return repoConfigs, nil diff --git a/vendor/modules.txt b/vendor/modules.txt index b8b27d2509..7e760a7ff8 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1022,7 +1022,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.94.0 +# github.com/osbuild/images v0.94.0 => github.com/achilleas-k/images v0.0.0-20241028111523-6e94a3ec4b70 ## explicit; go 1.21.0 github.com/osbuild/images/internal/common github.com/osbuild/images/internal/environment @@ -1664,3 +1664,4 @@ gopkg.in/yaml.v2 # gopkg.in/yaml.v3 v3.0.1 ## explicit gopkg.in/yaml.v3 +# github.com/osbuild/images => github.com/achilleas-k/images v0.0.0-20241028111523-6e94a3ec4b70