-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.
Description
What happened?
Fedora rawhide (Fedora 42) has golang v1.24 (rc1) installed.
ok github.com/cri-o/cri-o/internal/registrar 0.005s
github.com/cri-o/cri-o/internal/resourcestore
# github.com/cri-o/cri-o/internal/resourcestore
./resourcecleaner.go:69:18: non-constant format string in call to github.com/cri-o/cri-o/internal/log.Infof
FAIL github.com/cri-o/cri-o/internal/resourcestore [build failed]
error: Bad exit status from /var/tmp/rpm-tmp.93XyBJ (%check)
/builddir/build/SPECS/cri-o1.30.spec line 99: autopatch: no matching patches in range
Bad exit status from /var/tmp/rpm-tmp.93XyBJ (%check)
Apparently golang 1.24 implements a stricter vet check (https://tip.golang.org/doc/go1.24#vet) which will trigger this type of error (non-constant format string in call to <function_name>
).
I suspect that the changes in commit 99b02b9 will resolve the problem (at least in resourcecleaner.go
) but not 100% sure.
CRI-O v1.30.9 builds successfully on Fedora 41which has golang 1.23.4 currently.
What did you expect to happen?
Error free build.
How can we reproduce it (as minimally and precisely as possible)?
This error occurs when packaging the cri-o1.30 rpm for Fedora as this rpm is available in both rawhide (F42) and Fedora 41.
- Start a Fedora 41 machine
- Install and configure packaging tools.
sudo dnf install fedora-packager fedora-review go-vendor-tools*
- Add user to mock
sudo usermod -a -G mock <your_local_username>
- Clone repo:
git clone https://src.fedoraproject.org/rpms/cri-tools1.30.git
- Run
newrelease
in repo directory to generate thenewrelease.conf
file. - Edit
newrelease.conf
:
# spec file name
export SPEC_NAME=cri-o1.30
# spec template name and path
TEMPLATE=./template/cri-o-template.spec
# cri-o release tag from git repository
export GIT_TAG=v1.30.9
# the 'built-with' golang version - expressed as SEMVER
export GOLANG_VERSION=1.22.2
# optional configuration variables:
export COMMIT=03ef12bcc353426d343d55ac72b91c9d6368f94f
- Generate the spec file (
newrelease -y
). - Generate the vendor tar file:
go_vendor_archive create --config go-vendor-tools.toml cri-o1.30.spec
- Build locally:
fedpkg --release rawhide mockbuild
Anything else we need to know?
Not at this time
CRI-O and Kubernetes version
Not applicable
OS version
The mock build environment for rawhide
Additional environment details (AWS, VirtualBox, physical, etc.)
Metadata
Metadata
Assignees
Labels
kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.