|
|
||
|---|---|---|
| template | ||
| .gitignore | ||
| cri-o1.34.spec | ||
| go-vendor-tools.toml | ||
| legacy-changelog.txt | ||
| newrelease | ||
| README.md | ||
| sources | ||
cri-o1.34
cri-o1.34 rpms for Fedora
Introduction
CRI-O is the Open Container Initiative-based implementation of Kubernetes Container Runtime Interface.
CRI-O releases are tracked upstream at https://github.com/cri-o/cri-o. CRI-O versions are matched with Kubernetes versions at the minor version level (e.g. v1.34).
CRI-O Package Notes
Spec file creation
go2rpm with a vendor profile is used to generate the initial spec file which has then been modified manually to adapt to using the spec file template and newrelease workflow. An example go2rpm command to create an initial, draft spec file:
go2rpm --profile vendor -d --no-clean github.com/kubernetes-sigs/cri-o --name cri-o1.34
The vendor profile extracts the ./vendor subdirectory for the source archive, and creates a stand-alone vendor source archive (s1 in the spec file). In addition, a list of license information for each module in the ./vendor subdirectory is accumulated and incorporated into this supplemental archive. All modules in the ./vendor subdirectory are also identified as bundled provides in the binary rpm.
Use go2rpm to completely regenerate the spec file. Modify as needed to use as a template. This step is only needed if/when go2rpm has improved features and capabilities. In most cases, use the Package Workflow below to generate a new spec from the existing template.
For more information see:
Spec file template
The cri-o1.34 package borrows the spec file generation model used in the versioned Kubernetes and CRI-Tools packages. A spec file template and newrelease script are used to generate a new spec file with each new release. This template model facilitates sharing spec file modifications (excluding new releases) between all dist-git repositories for CRI-O. Version metadata are injected via the newrelease.conf file into the spec file, therefore keep version specific changes within this repository. At any one time there will be three (3) supported releases and possibly one alpha/beta/rc release available in Fedora.
CRI-O Package Workflow
The workflow to revise the spec file uses the newrelease script. This script uses a configuration file (newrelease.conf) and a template spec file to generate a revised spec file for use in the standard Fedora build processes. Edits made directly to the spec file will be over-written during the next update cycle.
Generate a configuration file, if not present
-
Run
newrelease -c -
Edit
newrelease.confwith the template name and path, the name of the spec file, git tag for the release, and set a value for golang (check go.mod for the release online in the upstream repository). Be sure to include the full git commit hash as this is used during the package build process. -
Follow directions in the next section below.
-
The
newrelease.conffile is not stored in git.
Upstream has a new minor or patch release
Assuming that the maintainer has an existing local copy of the dist-git repository:
-
Edit
newrelease.confwith the git tag for the release and validate that the golang value is suitable. -
Run both
newreleaseandgo_vendor_archive:newrelease -ygo_vendor_archive create --config go-vendor-tools.toml cri-o1.34.spec -
Follow normal Fedora build and release processes.
Other modifications to the spec file to fix errors or add features
Assuming the maintainer has an existing local copy of the dist-git repository:
-
Edit the template (initially
./template/cri-o-template.specbut can be set in configuration file). -
To generate an updated spec file, run both
newreleaseto update the spec file andgo_vendor_archive, if needed, to update the vendor archive:vnewrelease -ygo_vendor_archive create --config go-vendor-tools.toml cri-o1.34.spec -
Check license information.
go_vendor_license --config go-vendor-tools.toml --path cri-o1.34.spec --detector askalono report -
If license file corrections are needed:
fedpkg prep cd cri-o-1.34.0 rm -rf _build go_vendor_license --config ../go-vendor-tools.toml --detector askalono explicit -f vendor/gopkg.in/yaml.v3/LICENSE "Apache-2.0 AND MIT" -
Verify with report as in step 3 above.
-
Follow normal Fedora build and release processes.