Skip to content

Commit

Permalink
distributions: add Fedora 41
Browse files Browse the repository at this point in the history
Fedora 40 branched around 2024-02-14, so Rawhide now "is" (to
some extent) Fedora 41.

Modular repos are omitted because Fedora has no Modular content
since F39. For F39+ and F40 the metalinks just redirect to the
Everything repository.

Signed-off-by: Adam Williamson <[email protected]>
  • Loading branch information
AdamWill authored and ezr-ondrej committed Mar 6, 2024
1 parent 4e92f07 commit 0f52698
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 4 deletions.
51 changes: 51 additions & 0 deletions distributions/fedora-41/fedora-41.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"module_platform_id": "platform:f41",
"oscap_name": "fedora",
"distribution": {
"name": "fedora-41",
"description": "Fedora Linux 41",
"no_package_list": true,
"restricted_access": true
},
"x86_64": {
"image_types": [
"aws",
"azure",
"guest-image",
"oci",
"vsphere",
"vsphere-ova",
"iot-commit"
],
"repositories": [
{
"id": "fedora",
"metalink": "https://mirrors.fedoraproject.org/metalink?repo=fedora-41&arch=x86_64",
"rhsm": false
},
{
"id": "updates",
"metalink": "https://mirrors.fedoraproject.org/metalink?repo=updates-released-f41&arch=x86_64",
"rhsm": false
}
]
},
"aarch64": {
"image_types": [
"aws",
"guest-image"
],
"repositories": [
{
"id": "fedora",
"metalink": "https://mirrors.fedoraproject.org/metalink?repo=fedora-41&arch=aarch64",
"rhsm": false
},
{
"id": "updates",
"metalink": "https://mirrors.fedoraproject.org/metalink?repo=updates-released-f41&arch=aarch64",
"rhsm": false
}
]
}
}
4 changes: 2 additions & 2 deletions internal/distribution/distroregistry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
)

func TestDistroRegistry_List(t *testing.T) {
allDistros := []string{"rhel-8", "rhel-8-nightly", "rhel-84", "rhel-85", "rhel-86", "rhel-87", "rhel-88", "rhel-89", "rhel-9", "rhel-9-nightly", "rhel-90", "rhel-91", "rhel-92", "rhel-93", "centos-8", "centos-9", "fedora-37", "fedora-38", "fedora-39", "fedora-40"}
notEntitledDistros := []string{"rhel-8-nightly", "rhel-9-nightly", "centos-8", "centos-9", "fedora-37", "fedora-38", "fedora-39", "fedora-40"}
allDistros := []string{"rhel-8", "rhel-8-nightly", "rhel-84", "rhel-85", "rhel-86", "rhel-87", "rhel-88", "rhel-89", "rhel-9", "rhel-9-nightly", "rhel-90", "rhel-91", "rhel-92", "rhel-93", "centos-8", "centos-9", "fedora-37", "fedora-38", "fedora-39", "fedora-40", "fedora-41"}
notEntitledDistros := []string{"rhel-8-nightly", "rhel-9-nightly", "centos-8", "centos-9", "fedora-37", "fedora-38", "fedora-39", "fedora-40", "fedora-41"}

dr, err := LoadDistroRegistry("../../distributions")
require.NoError(t, err)
Expand Down
1 change: 1 addition & 0 deletions internal/v1/api.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions internal/v1/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1003,6 +1003,7 @@ components:
- fedora-38
- fedora-39
- fedora-40
- fedora-41
ImageRequest:
type: object
additionalProperties: false
Expand Down
4 changes: 2 additions & 2 deletions internal/v1/handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,7 @@ func TestGetDistributions(t *testing.T) {
for _, distro := range result {
distros = append(distros, distro.Name)
}
require.ElementsMatch(t, []string{"rhel-8", "rhel-8-nightly", "rhel-84", "rhel-85", "rhel-86", "rhel-87", "rhel-88", "rhel-89", "rhel-9", "rhel-9-nightly", "rhel-90", "rhel-91", "rhel-92", "rhel-93", "centos-8", "centos-9", "fedora-37", "fedora-38", "fedora-39", "fedora-40"}, distros)
require.ElementsMatch(t, []string{"rhel-8", "rhel-8-nightly", "rhel-84", "rhel-85", "rhel-86", "rhel-87", "rhel-88", "rhel-89", "rhel-9", "rhel-9-nightly", "rhel-90", "rhel-91", "rhel-92", "rhel-93", "centos-8", "centos-9", "fedora-37", "fedora-38", "fedora-39", "fedora-40", "fedora-41"}, distros)
})

t.Run("No access to restricted distributions except global filter", func(t *testing.T) {
Expand Down Expand Up @@ -855,7 +855,7 @@ func TestGetProfiles(t *testing.T) {
})

t.Run("Access profiles on the other distros returns an error", func(t *testing.T) {
for _, dist := range []Distributions{Fedora37, Fedora38, Fedora39, Fedora40, Rhel90} {
for _, dist := range []Distributions{Fedora37, Fedora38, Fedora39, Fedora40, Fedora41, Rhel90} {
respStatusCode, _ := tutils.GetResponseBody(t,
fmt.Sprintf("http://localhost:8086/api/image-builder/v1/oscap/%s/profiles", dist), &tutils.AuthString0)
require.Equal(t, http.StatusBadRequest, respStatusCode)
Expand Down

0 comments on commit 0f52698

Please sign in to comment.