mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-09 21:17:09 +08:00
vendor: github.com/tonistiigi/fsutil 8d32dbdd27d3
full diff: 397af5306b...8d32dbdd27
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
14
vendor/github.com/tonistiigi/fsutil/.golangci.yml
generated
vendored
14
vendor/github.com/tonistiigi/fsutil/.golangci.yml
generated
vendored
@ -1,7 +1,5 @@
|
||||
run:
|
||||
timeout: 10m
|
||||
skip-files:
|
||||
- ".*\\.pb\\.go$"
|
||||
timeout: 30m
|
||||
|
||||
linters:
|
||||
enable:
|
||||
@ -25,6 +23,10 @@ linters-settings:
|
||||
- pkg: "io/ioutil"
|
||||
desc: The io/ioutil package has been deprecated.
|
||||
|
||||
# show all
|
||||
max-issues-per-linter: 0
|
||||
max-same-issues: 0
|
||||
issues:
|
||||
exclude-files:
|
||||
- ".*\\.pb\\.go$"
|
||||
|
||||
# show all
|
||||
max-issues-per-linter: 0
|
||||
max-same-issues: 0
|
||||
|
1
vendor/github.com/tonistiigi/fsutil/chtimes_nolinux.go
generated
vendored
1
vendor/github.com/tonistiigi/fsutil/chtimes_nolinux.go
generated
vendored
@ -1,3 +1,4 @@
|
||||
//go:build !linux
|
||||
// +build !linux
|
||||
|
||||
package fsutil
|
||||
|
38
vendor/github.com/tonistiigi/fsutil/copy/copy_openbsd.go
generated
vendored
Normal file
38
vendor/github.com/tonistiigi/fsutil/copy/copy_openbsd.go
generated
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
//go:build openbsd
|
||||
// +build openbsd
|
||||
|
||||
package fs
|
||||
|
||||
import (
|
||||
"io"
|
||||
"os"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
func copyFile(source, target string) error {
|
||||
src, err := os.Open(source)
|
||||
if err != nil {
|
||||
return errors.Wrapf(err, "failed to open source %s", source)
|
||||
}
|
||||
defer src.Close()
|
||||
tgt, err := os.Create(target)
|
||||
if err != nil {
|
||||
return errors.Wrapf(err, "failed to open target %s", target)
|
||||
}
|
||||
defer tgt.Close()
|
||||
|
||||
return copyFileContent(tgt, src)
|
||||
}
|
||||
|
||||
func copyFileContent(dst, src *os.File) error {
|
||||
buf := bufferPool.Get().(*[]byte)
|
||||
_, err := io.CopyBuffer(dst, src, *buf)
|
||||
bufferPool.Put(buf)
|
||||
return err
|
||||
}
|
||||
|
||||
func mknod(dst string, mode uint32, rDev int) error {
|
||||
return unix.Mknod(dst, uint32(mode), rDev)
|
||||
}
|
4
vendor/github.com/tonistiigi/fsutil/copy/copy_unix.go
generated
vendored
4
vendor/github.com/tonistiigi/fsutil/copy/copy_unix.go
generated
vendored
@ -1,5 +1,5 @@
|
||||
//go:build solaris || darwin || freebsd
|
||||
// +build solaris darwin freebsd
|
||||
//go:build solaris || darwin || freebsd || openbsd
|
||||
// +build solaris darwin freebsd openbsd
|
||||
|
||||
package fs
|
||||
|
||||
|
3
vendor/github.com/tonistiigi/fsutil/copy/stat_bsd.go
generated
vendored
3
vendor/github.com/tonistiigi/fsutil/copy/stat_bsd.go
generated
vendored
@ -1,4 +1,5 @@
|
||||
// +build darwin freebsd netbsd openbsd
|
||||
//go:build darwin || freebsd || netbsd
|
||||
// +build darwin freebsd netbsd
|
||||
|
||||
package fs
|
||||
|
||||
|
18
vendor/github.com/tonistiigi/fsutil/copy/stat_openbsd.go
generated
vendored
Normal file
18
vendor/github.com/tonistiigi/fsutil/copy/stat_openbsd.go
generated
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
//go:build openbsd
|
||||
// +build openbsd
|
||||
|
||||
package fs
|
||||
|
||||
import (
|
||||
"syscall"
|
||||
)
|
||||
|
||||
// Returns the last-accessed time
|
||||
func StatAtime(st *syscall.Stat_t) syscall.Timespec {
|
||||
return st.Atim
|
||||
}
|
||||
|
||||
// Returns the last-modified time
|
||||
func StatMtime(st *syscall.Stat_t) syscall.Timespec {
|
||||
return st.Mtim
|
||||
}
|
26
vendor/github.com/tonistiigi/fsutil/docker-bake.hcl
generated
vendored
26
vendor/github.com/tonistiigi/fsutil/docker-bake.hcl
generated
vendored
@ -6,6 +6,25 @@ variable "DESTDIR" {
|
||||
default = "./bin"
|
||||
}
|
||||
|
||||
target "_platforms" {
|
||||
platforms = [
|
||||
"darwin/amd64",
|
||||
"darwin/arm64",
|
||||
"freebsd/amd64",
|
||||
"freebsd/arm64",
|
||||
"linux/386",
|
||||
"linux/amd64",
|
||||
"linux/arm",
|
||||
"linux/arm64",
|
||||
"linux/ppc64le",
|
||||
"linux/s390x",
|
||||
"openbsd/amd64",
|
||||
"openbsd/arm64",
|
||||
"windows/amd64",
|
||||
"windows/arm64"
|
||||
]
|
||||
}
|
||||
|
||||
group "default" {
|
||||
targets = ["build"]
|
||||
}
|
||||
@ -40,6 +59,10 @@ target "lint" {
|
||||
}
|
||||
}
|
||||
|
||||
target "lint-cross" {
|
||||
inherits = ["lint", "_platforms"]
|
||||
}
|
||||
|
||||
target "validate-generated-files" {
|
||||
dockerfile = "./hack/dockerfiles/generated-files.Dockerfile"
|
||||
output = ["type=cacheonly"]
|
||||
@ -86,6 +109,5 @@ target "shfmt" {
|
||||
}
|
||||
|
||||
target "cross" {
|
||||
inherits = ["build"]
|
||||
platforms = ["linux/amd64", "linux/386", "linux/arm64", "linux/arm", "linux/ppc64le", "linux/s390x", "darwin/amd64", "darwin/arm64", "windows/amd64", "windows/arm64", "freebsd/amd64", "freebsd/arm64"]
|
||||
inherits = ["build", "_platforms"]
|
||||
}
|
||||
|
1
vendor/github.com/tonistiigi/fsutil/stat_windows.go
generated
vendored
1
vendor/github.com/tonistiigi/fsutil/stat_windows.go
generated
vendored
@ -1,3 +1,4 @@
|
||||
//go:build windows
|
||||
// +build windows
|
||||
|
||||
package fsutil
|
||||
|
Reference in New Issue
Block a user