Skip to content

Commit 04f196a

Browse files
Merge pull request containers#6502 from nalind/format
Update VMs, linter, fix warnings, add a "fmt" target
2 parents 2c5d71f + 7690a56 commit 04f196a

31 files changed

+61
-109
lines changed

.cirrus.yml

Lines changed: 26 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ env:
3333
FEDORA_NAME: "fedora-42"
3434
PRIOR_FEDORA_NAME: "fedora-41"
3535
RAWHIDE_NAME: "rawhide"
36-
DEBIAN_NAME: "debian-13"
36+
DEBIAN_NAME: "debian-14"
3737

3838
# Image identifiers
39-
IMAGE_SUFFIX: "c20250910t092246z-f42f41d13"
39+
IMAGE_SUFFIX: "c20251110t154831z-f42f41d14"
4040
FEDORA_CACHE_IMAGE_NAME: "fedora-${IMAGE_SUFFIX}"
4141
PRIOR_FEDORA_CACHE_IMAGE_NAME: "prior-fedora-${IMAGE_SUFFIX}"
4242
RAWHIDE_CACHE_IMAGE_NAME: "rawhide-${IMAGE_SUFFIX}" # Used temporarily for rust-podman-sequoia. After that RPM is available in stable Fedora releases, we can stop testing against Rawhide again.
@@ -224,6 +224,18 @@ integration_task:
224224
DISTRO_NV: "${DEBIAN_NAME}"
225225
IMAGE_NAME: "${DEBIAN_CACHE_IMAGE_NAME}"
226226
STORAGE_DRIVER: 'vfs'
227+
- env:
228+
DISTRO_NV: "${FEDORA_NAME}"
229+
IMAGE_NAME: "${FEDORA_CACHE_IMAGE_NAME}"
230+
STORAGE_DRIVER: 'vfs'
231+
BUILDAH_RUNTIME: runc
232+
RUNTIME_N: " using runc"
233+
- env:
234+
DISTRO_NV: "${PRIOR_FEDORA_NAME}"
235+
IMAGE_NAME: "${PRIOR_FEDORA_CACHE_IMAGE_NAME}"
236+
STORAGE_DRIVER: 'vfs'
237+
BUILDAH_RUNTIME: runc
238+
RUNTIME_N: " using runc"
227239
# OVERLAY
228240
- env:
229241
DISTRO_NV: "${FEDORA_NAME}"
@@ -246,6 +258,18 @@ integration_task:
246258
IMAGE_NAME: "${RAWHIDE_CACHE_IMAGE_NAME}"
247259
STORAGE_DRIVER: 'overlay'
248260
TEST_BUILD_TAGS: 'containers_image_sequoia'
261+
- env:
262+
DISTRO_NV: "${FEDORA_NAME}"
263+
IMAGE_NAME: "${FEDORA_CACHE_IMAGE_NAME}"
264+
STORAGE_DRIVER: 'overlay'
265+
BUILDAH_RUNTIME: runc
266+
RUNTIME_N: " using runc"
267+
- env:
268+
DISTRO_NV: "${PRIOR_FEDORA_NAME}"
269+
IMAGE_NAME: "${PRIOR_FEDORA_CACHE_IMAGE_NAME}"
270+
STORAGE_DRIVER: 'overlay'
271+
BUILDAH_RUNTIME: runc
272+
RUNTIME_N: " using runc"
249273

250274
gce_instance: &integration_gce_instance
251275
image_name: "$IMAGE_NAME"
@@ -270,53 +294,6 @@ integration_task:
270294
package_versions_script: '$GOSRC/$SCRIPT_BASE/logcollector.sh packages'
271295
golang_version_script: '$GOSRC/$SCRIPT_BASE/logcollector.sh golang'
272296

273-
non_blocking_integration_task:
274-
name: "Integration $DISTRO_NV$RUNTIME_N w/ $STORAGE_DRIVER (non-blocking)"
275-
alias: non_blocking_integration
276-
skip: *not_build_docs
277-
depends_on: *smoke_vendor
278-
279-
matrix:
280-
# VFS
281-
- env:
282-
DISTRO_NV: "${FEDORA_NAME}"
283-
IMAGE_NAME: "${FEDORA_CACHE_IMAGE_NAME}"
284-
STORAGE_DRIVER: 'vfs'
285-
BUILDAH_RUNTIME: runc
286-
RUNTIME_N: " using runc"
287-
- env:
288-
DISTRO_NV: "${PRIOR_FEDORA_NAME}"
289-
IMAGE_NAME: "${PRIOR_FEDORA_CACHE_IMAGE_NAME}"
290-
STORAGE_DRIVER: 'vfs'
291-
BUILDAH_RUNTIME: runc
292-
RUNTIME_N: " using runc"
293-
# OVERLAY
294-
- env:
295-
DISTRO_NV: "${FEDORA_NAME}"
296-
IMAGE_NAME: "${FEDORA_CACHE_IMAGE_NAME}"
297-
STORAGE_DRIVER: 'overlay'
298-
BUILDAH_RUNTIME: runc
299-
RUNTIME_N: " using runc"
300-
- env:
301-
DISTRO_NV: "${PRIOR_FEDORA_NAME}"
302-
IMAGE_NAME: "${PRIOR_FEDORA_CACHE_IMAGE_NAME}"
303-
STORAGE_DRIVER: 'overlay'
304-
BUILDAH_RUNTIME: runc
305-
RUNTIME_N: " using runc"
306-
307-
gce_instance:
308-
<<: *integration_gce_instance
309-
310-
# Separate scripts for separate outputs, makes debugging easier.
311-
setup_script: '${SCRIPT_BASE}/setup.sh |& ${_TIMESTAMP}'
312-
build_script: '${SCRIPT_BASE}/build.sh |& ${_TIMESTAMP}'
313-
integration_test_script: '${SCRIPT_BASE}/test.sh integration |& ${_TIMESTAMP}'
314-
315-
binary_artifacts:
316-
path: ./bin/*
317-
318-
always: *standardlogs
319-
320297
integration_rootless_task:
321298
name: "Integration rootless $DISTRO_NV$RUNTIME_N w/ $STORAGE_DRIVER"
322299
alias: integration_rootless
@@ -345,28 +322,6 @@ integration_rootless_task:
345322
IMAGE_NAME: "${DEBIAN_CACHE_IMAGE_NAME}"
346323
STORAGE_DRIVER: 'overlay'
347324
PRIV_NAME: rootless
348-
349-
gce_instance:
350-
<<: *integration_gce_instance
351-
352-
# Separate scripts for separate outputs, makes debugging easier.
353-
setup_script: '${SCRIPT_BASE}/setup.sh |& ${_TIMESTAMP}'
354-
build_script: '${SCRIPT_BASE}/build.sh |& ${_TIMESTAMP}'
355-
integration_test_script: '${SCRIPT_BASE}/test.sh integration |& ${_TIMESTAMP}'
356-
357-
binary_artifacts:
358-
path: ./bin/*
359-
360-
always:
361-
<<: *standardlogs
362-
363-
non_blocking_integration_rootless_task:
364-
name: "Integration rootless $DISTRO_NV$RUNTIME_N w/ $STORAGE_DRIVER (non-blocking)"
365-
alias: non_blocking_integration_rootless
366-
skip: *not_build_docs
367-
depends_on: *smoke_vendor
368-
369-
matrix:
370325
- env:
371326
DISTRO_NV: "${FEDORA_NAME}"
372327
IMAGE_NAME: "${FEDORA_CACHE_IMAGE_NAME}"

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ ifeq ($(BUILDDEBUG), 1)
5454
endif
5555

5656
# Managed by renovate.
57-
export GOLANGCI_LINT_VERSION := 2.1.0
57+
export GOLANGCI_LINT_VERSION := 2.6.1
5858

5959
# make all BUILDDEBUG=1
6060
# Note: Uses the -N -l go compiler options to disable compiler optimizations
@@ -212,6 +212,10 @@ lint: install.tools
212212
./tests/tools/build/golangci-lint run $(LINTFLAGS)
213213
./tests/tools/build/golangci-lint run --tests=false $(LINTFLAGS)
214214

215+
.PHONY: fmt
216+
fmt: install.tools
217+
./tests/tools/build/golangci-lint fmt $(LINTFLAGS)
218+
215219
# CAUTION: This is not a replacement for RPMs provided by your distro.
216220
# Only intended to build and test the latest unreleased changes.
217221
.PHONY: rpm

chroot/run_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
"strings"
1515
"testing"
1616

17-
"github.com/containers/buildah/tests/testreport/types"
17+
types "github.com/containers/buildah/tests/testreport/types"
1818
"github.com/containers/buildah/util"
1919
specs "github.com/opencontainers/runtime-spec/specs-go"
2020
"github.com/opencontainers/runtime-tools/generate"

copier/copier.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1168,7 +1168,7 @@ func copierHandlerStat(req request, pm *fileutils.PatternMatcher, idMappings *id
11681168
hostPair := idtools.IDPair{UID: uid, GID: gid}
11691169
uid, gid, err = idMappings.ToContainer(hostPair)
11701170
if err != nil {
1171-
return errorResponse("copier: stat: mapping host filesystem owners %#v to container filesystem owners: %w", hostPair, err)
1171+
return errorResponse("copier: stat: mapping host filesystem owners %#v to container filesystem owners: %v", hostPair, err)
11721172
}
11731173
}
11741174
result.UID, result.GID = int64(uid), int64(gid)
@@ -2227,7 +2227,7 @@ func copierHandlerMkdir(req request, idMappings *idtools.IDMappings) (*response,
22272227
return errorResponse("copier: mkdir: error setting owner of %q to %d:%d: %v", path, dirUID, dirGID, err)
22282228
}
22292229
if err = chmod(path, dirMode); err != nil {
2230-
return errorResponse("copier: mkdir: error setting permissions on %q to 0%o: %v", path, dirMode)
2230+
return errorResponse("copier: mkdir: error setting permissions on %q to 0%o: %v", path, dirMode, err)
22312231
}
22322232
created = append(created, path)
22332233
} else {
@@ -2409,7 +2409,7 @@ func copierHandlerEnsure(req request, idMappings *idtools.IDMappings) *response
24092409
return errorResponse("copier: ensure: error setting owner of %q to %d:%d: %v", leaf, uid, gid, err)
24102410
}
24112411
if err = chmod(filepath.Join(req.Root, leaf), mode); err != nil {
2412-
return errorResponse("copier: ensure: error setting permissions on %q to 0%o: %v", leaf, mode)
2412+
return errorResponse("copier: ensure: error setting permissions on %q to 0%o: %v", leaf, mode, err)
24132413
}
24142414
if item.ModTime != nil {
24152415
if err := os.Chtimes(filepath.Join(req.Root, leaf), *item.ModTime, *item.ModTime); err != nil {

hack/Dockerfile

Lines changed: 0 additions & 7 deletions
This file was deleted.

internal/mkcw/attest.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
"path/filepath"
1515
"strings"
1616

17-
"github.com/containers/buildah/internal/mkcw/types"
17+
types "github.com/containers/buildah/internal/mkcw/types"
1818
"github.com/sirupsen/logrus"
1919
"go.podman.io/storage/pkg/fileutils"
2020
)

internal/mkcw/types/attest.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package types
1+
package mkcwtypes
22

33
// RegistrationRequest is the body of the request which we use for registering
44
// this confidential workload with the attestation server.

internal/mkcw/types/workload.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package types
1+
package mkcwtypes
22

33
import "github.com/containers/buildah/define"
44

internal/mkcw/workload.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"os"
1111

1212
"github.com/containers/buildah/define"
13-
"github.com/containers/buildah/internal/mkcw/types"
13+
types "github.com/containers/buildah/internal/mkcw/types"
1414
)
1515

1616
type (

internal/util/util.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package util
1+
package internalutil
22

33
import (
44
"fmt"

0 commit comments

Comments
 (0)