Skip to content

Commit

Permalink
Add support for fc40-unsafe and fc40-snapshot repo
Browse files Browse the repository at this point in the history
eext packages have a dependency on Fedora distro rpms. Adding these rpms
to eext was cumbersome due to the number of new rpms introduced.
Instead we will satisfy Fedora dependencies through a new repo bundle,
fc40-unsafe and create a snapshot fc40-snapshot to ensure build
reproducibility.

fc40-unsafe is a local cache of the required dependencies pulled in from
upstream by eext. eext developers snapshot this repo when requested by
repo owners to pull in fedora dependencies.
  • Loading branch information
manith-arista committed Jul 25, 2024
1 parent 2699b9d commit aaa7368
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 0 deletions.
41 changes: 41 additions & 0 deletions configfiles/dnfconfig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,25 @@ repo-bundle:
priority: 3
#---------------------------------------------------------------------------------------------

Check warning on line 75 in configfiles/dnfconfig.yaml

View workflow job for this annotation

GitHub Actions / Lint

75:2 [comments] missing starting space in comment

Check warning on line 75 in configfiles/dnfconfig.yaml

View workflow job for this annotation

GitHub Actions / Lint

75:1 [comments-indentation] comment not indented like content

#---------------------------------------------------------------------------------------------

Check warning on line 77 in configfiles/dnfconfig.yaml

View workflow job for this annotation

GitHub Actions / Lint

77:2 [comments] missing starting space in comment
fc40-snapshot:
# DO NOT use fc40-snapshot as a repo-bundle in your eext.yaml,
# unless recommended to you by the eext team.
# The eext team is responsible for creating these snapshots.

gpgcheck: true
gpgkey: file:///usr/share/distribution-gpg-keys/fedora/RPM-GPG-KEY-fedora-40-primary

# fc40 publishes i686 RPMS in x86_64 repo. This ensures that we point to the x86_64 repo
# when target is i686.
use-base-arch: true
baseurl: "{{.Host}}/artifactory/eext-snapshots-local/fc40/{{.Version}}/{{.RepoName}}/40/Everything/{{.Arch}}/os"
repo:
releases:
enabled: true
priority: 4
#---------------------------------------------------------------------------------------------

Check warning on line 94 in configfiles/dnfconfig.yaml

View workflow job for this annotation

GitHub Actions / Lint

94:2 [comments] missing starting space in comment

Check warning on line 94 in configfiles/dnfconfig.yaml

View workflow job for this annotation

GitHub Actions / Lint

94:1 [comments-indentation] comment not indented like content

# --------------------------------------------------------------------------------------------
el9-unsafe:
# DO NOT use el9-unsafe as a repo-bundle in your eext.yaml unless you know what you're doing.
Expand Down Expand Up @@ -182,3 +201,25 @@ repo-bundle:
default: 9
priority: 3
# --------------------------------------------------------------------------------------------

#---------------------------------------------------------------------------------------------
fc40-unsafe:
# DO NOT use fc40-unsafe as a repo-bundle in your eext.yaml
# unless you know what you're doing. Use fc40-snapshot instead because this
# will ensure build reproducibility.
# fc40-unsafe is used by the eext team for experiments.

gpgcheck: true
gpgkey: file:///usr/share/distribution-gpg-keys/fedora/RPM-GPG-KEY-fedora-40-primary

# fc40 publishes i686 RPMS in x86_64 repo. This ensures that we point to the x86_64 repo
# when target is i686.
use-base-arch: true
baseurl: "{{.Host}}/artifactory/eext-fedora-linux/{{.RepoName}}/{{.Version}}/Everything/{{.Arch}}/os"
repo:
releases:
enabled: true
version-labels:
default: 40
priority: 4
#---------------------------------------------------------------------------------------------
32 changes: 32 additions & 0 deletions dnfconfig/defaultconfig_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,38 @@ func TestDefaultDnfRepoConfig(t *testing.T) {
},
defaultVersion: "9",
},
"fc40-unsafe": ExpectedDefaultRepoBundle{
repoToURLFormatString: map[string]string{
"releases": "%s/artifactory/%s/releases/%s/Everything/%s/os",
},
archToArtifactoryRepo: map[string]string{
"i686": "eext-fedora-linux",
"x86_64": "eext-fedora-linux",
"aarch64": "eext-fedora-linux",
},
archToURLFormatArch: map[string]string{
"i686": "x86_64", // baseArch
"x86_64": "x86_64",
"aarch64": "aarch64",
},
defaultVersion: "40",
},
"fc40-snapshot": ExpectedDefaultRepoBundle{
repoToURLFormatString: map[string]string{
"releases": "%s/artifactory/%s/fc40/default/releases/%s/Everything/%s/os",
},
archToArtifactoryRepo: map[string]string{
"i686": "eext-snapshots-local",
"x86_64": "eext-snapshots-local",
"aarch64": "eext-snapshots-local",
},
archToURLFormatArch: map[string]string{
"i686": "x86_64", // baseArch
"x86_64": "x86_64",
"aarch64": "aarch64",
},
defaultVersion: "40",
},
}

t.Log("Testing expected defaults")
Expand Down

0 comments on commit aaa7368

Please sign in to comment.