From e9ca807ed63bd76c91f56007883b62eea7d13dd0 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Mon, 4 Apr 2022 18:22:59 +0200 Subject: [PATCH 1/4] fs: fix minor linting and gofmt issue Signed-off-by: Sebastiaan van Stijn --- fs/copy.go | 2 +- fs/diff.go | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/fs/copy.go b/fs/copy.go index b7af7a30..6982a761 100644 --- a/fs/copy.go +++ b/fs/copy.go @@ -33,7 +33,7 @@ var bufferPool = &sync.Pool{ }, } -// XAttrErrorHandlers transform a non-nil xattr error. +// XAttrErrorHandler transform a non-nil xattr error. // Return nil to ignore an error. // xattrKey can be empty for listxattr operation. type XAttrErrorHandler func(dst, src, xattrKey string, err error) error diff --git a/fs/diff.go b/fs/diff.go index e64f9e73..3cd4eee6 100644 --- a/fs/diff.go +++ b/fs/diff.go @@ -22,9 +22,8 @@ import ( "path/filepath" "strings" - "golang.org/x/sync/errgroup" - "github.com/sirupsen/logrus" + "golang.org/x/sync/errgroup" ) // ChangeKind is the type of modification that From de7fd6b43f553b9b106ee818597404c2f408efc7 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Mon, 4 Apr 2022 18:29:11 +0200 Subject: [PATCH 2/4] sysx: remove unused sysx/generate.sh script This script was added in 0817db4d851b63a8d6eafde9dd796f4811312848, but the code it generated was upstreamed to golang.org/x/sys, and replaced in 6268e2853725013ad865fccb576bc215d48ecb08, so should no longer be needed. Signed-off-by: Sebastiaan van Stijn --- sysx/generate.sh | 52 ------------------------------------------------ 1 file changed, 52 deletions(-) delete mode 100755 sysx/generate.sh diff --git a/sysx/generate.sh b/sysx/generate.sh deleted file mode 100755 index 87d708d7..00000000 --- a/sysx/generate.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/bash - -# Copyright The containerd Authors. - -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at - -# http://www.apache.org/licenses/LICENSE-2.0 - -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -set -e - -mksyscall="$(go env GOROOT)/src/syscall/mksyscall.pl" - -fix() { - sed 's,^package syscall$,package sysx,' \ - | sed 's,^import "unsafe"$,import (\n\t"syscall"\n\t"unsafe"\n),' \ - | gofmt -r='BytePtrFromString -> syscall.BytePtrFromString' \ - | gofmt -r='Syscall6 -> syscall.Syscall6' \ - | gofmt -r='Syscall -> syscall.Syscall' \ - | gofmt -r='SYS_GETXATTR -> syscall.SYS_GETXATTR' \ - | gofmt -r='SYS_LISTXATTR -> syscall.SYS_LISTXATTR' \ - | gofmt -r='SYS_SETXATTR -> syscall.SYS_SETXATTR' \ - | gofmt -r='SYS_REMOVEXATTR -> syscall.SYS_REMOVEXATTR' \ - | gofmt -r='SYS_LGETXATTR -> syscall.SYS_LGETXATTR' \ - | gofmt -r='SYS_LLISTXATTR -> syscall.SYS_LLISTXATTR' \ - | gofmt -r='SYS_LSETXATTR -> syscall.SYS_LSETXATTR' \ - | gofmt -r='SYS_LREMOVEXATTR -> syscall.SYS_LREMOVEXATTR' -} - -if [ "$GOARCH" == "" ] || [ "$GOOS" == "" ]; then - echo "Must specify \$GOARCH and \$GOOS" - exit 1 -fi - -mkargs="" - -if [ "$GOARCH" == "386" ] || [ "$GOARCH" == "arm" ]; then - mkargs="-l32" -fi - -for f in "$@"; do - $mksyscall $mkargs "${f}_${GOOS}.go" | fix > "${f}_${GOOS}_${GOARCH}.go" -done - From 791754940833264651ac315318beb6998722731d Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Mon, 4 Apr 2022 18:33:08 +0200 Subject: [PATCH 3/4] golangci-lint: replace "golint" with "revive" The linter 'golint' is deprecated (since v1.41.0) due to: The repository of the linter has been archived by the owner. Replaced by revive. Signed-off-by: Sebastiaan van Stijn --- .golangci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.golangci.yml b/.golangci.yml index 92a74904..2924bc4c 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -6,8 +6,8 @@ linters: - unconvert - gofmt - goimports - - golint - ineffassign + - revive - vet - unused - misspell From 7fa1569efc4aa48f382a1c9ea565bcb62817f1b2 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Mon, 4 Apr 2022 18:41:06 +0200 Subject: [PATCH 4/4] README: update badges and links The Build Status badge was still linked to travis, which we no longer use. While at it, also updated the links to the documentation, and updated a link to the runtime-spec. Signed-off-by: Sebastiaan van Stijn --- README.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index f47b4afe..10996df1 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,20 @@ # continuity -[![GoDoc](https://godoc.org/github.com/containerd/continuity?status.svg)](https://godoc.org/github.com/containerd/continuity) -[![Build Status](https://travis-ci.org/containerd/continuity.svg?branch=main)](https://travis-ci.org/containerd/continuity) +[![Go Reference](https://pkg.go.dev/badge/github.com/containerd/continuity.svg)](https://pkg.go.dev/github.com/containerd/continuity) +[![Build Status](https://github.com/containerd/continuity/workflows/Continuity/badge.svg)](https://github.com/containerd/continuity/actions?query=workflow%3AContinuity+branch%3Amain) A transport-agnostic, filesystem metadata manifest system This project is a staging area for experiments in providing transport agnostic metadata storage. -Please see https://github.com/opencontainers/specs/issues/11 for more details. +See [opencontainers/runtime-spec#11](https://github.com/opencontainers/runtime-spec/issues/11) +for more details. ## Manifest Format A continuity manifest encodes filesystem metadata in Protocol Buffers. -Please refer to [proto/manifest.proto](proto/manifest.proto). +Refer to [proto/manifest.proto](proto/manifest.proto) for more details. ## Usage @@ -65,7 +66,7 @@ $ ./bin/continuity verify . /tmp/a.pb ## Platforms -continuity primarily targets Linux. continuity may compile for and work on +continuity primarily targets Linux. Continuity may compile for and work on other operating systems, but those platforms are not tested. ## Contribution Guide