+
Skip to content

CRI-O 1.29 and 1.30 build error on Fedora rawhide #8923

@buckaroogeek

Description

@buckaroogeek

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.

  1. Start a Fedora 41 machine
  2. Install and configure packaging tools. sudo dnf install fedora-packager fedora-review go-vendor-tools*
  3. Add user to mock sudo usermod -a -G mock <your_local_username>
  4. Clone repo: git clone https://src.fedoraproject.org/rpms/cri-tools1.30.git
  5. Run newrelease in repo directory to generate the newrelease.conf file.
  6. 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
  1. Generate the spec file (newrelease -y).
  2. Generate the vendor tar file: go_vendor_archive create --config go-vendor-tools.toml cri-o1.30.spec
  3. 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

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载