mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-13 15:07:10 +08:00
protobuf: remove gogoproto
Removes gogo/protobuf from buildx and updates to a version of moby/buildkit where gogo is removed. This also changes how the proto files are generated. This is because newer versions of protobuf are more strict about name conflicts. If two files have the same name (even if they are relative paths) and are used in different protoc commands, they'll conflict in the registry. Since protobuf file generation doesn't work very well with `paths=source_relative`, this removes the `go:generate` expression and just relies on the dockerfile to perform the generation. Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
This commit is contained in:
18
vendor/github.com/tonistiigi/fsutil/diskwriter.go
generated
vendored
18
vendor/github.com/tonistiigi/fsutil/diskwriter.go
generated
vendored
@ -126,10 +126,10 @@ func (dw *DiskWriter) HandleChange(kind ChangeKind, p string, fi os.FileInfo, er
|
||||
return errors.WithStack(&os.PathError{Path: p, Err: syscall.EBADMSG, Op: "change without stat info"})
|
||||
}
|
||||
|
||||
statCopy := *stat
|
||||
statCopy := stat.Clone()
|
||||
|
||||
if dw.filter != nil {
|
||||
if ok := dw.filter(p, &statCopy); !ok {
|
||||
if ok := dw.filter(p, statCopy); !ok {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
@ -148,7 +148,7 @@ func (dw *DiskWriter) HandleChange(kind ChangeKind, p string, fi os.FileInfo, er
|
||||
}
|
||||
|
||||
if oldFi != nil && fi.IsDir() && oldFi.IsDir() {
|
||||
if err := rewriteMetadata(destPath, &statCopy); err != nil {
|
||||
if err := rewriteMetadata(destPath, statCopy); err != nil {
|
||||
return errors.Wrapf(err, "error setting dir metadata for %s", destPath)
|
||||
}
|
||||
return nil
|
||||
@ -172,7 +172,7 @@ func (dw *DiskWriter) HandleChange(kind ChangeKind, p string, fi os.FileInfo, er
|
||||
}
|
||||
dw.dirModTimes[destPath] = statCopy.ModTime
|
||||
case fi.Mode()&os.ModeDevice != 0 || fi.Mode()&os.ModeNamedPipe != 0:
|
||||
if err := handleTarTypeBlockCharFifo(newPath, &statCopy); err != nil {
|
||||
if err := handleTarTypeBlockCharFifo(newPath, statCopy); err != nil {
|
||||
return errors.Wrapf(err, "failed to create device %s", newPath)
|
||||
}
|
||||
case fi.Mode()&os.ModeSymlink != 0:
|
||||
@ -200,7 +200,7 @@ func (dw *DiskWriter) HandleChange(kind ChangeKind, p string, fi os.FileInfo, er
|
||||
}
|
||||
}
|
||||
|
||||
if err := rewriteMetadata(newPath, &statCopy); err != nil {
|
||||
if err := rewriteMetadata(newPath, statCopy); err != nil {
|
||||
return errors.Wrapf(err, "error setting metadata for %s", newPath)
|
||||
}
|
||||
|
||||
@ -218,7 +218,7 @@ func (dw *DiskWriter) HandleChange(kind ChangeKind, p string, fi os.FileInfo, er
|
||||
|
||||
if isRegularFile {
|
||||
if dw.opt.AsyncDataCb != nil {
|
||||
dw.requestAsyncFileData(p, destPath, fi, &statCopy)
|
||||
dw.requestAsyncFileData(p, destPath, fi, statCopy)
|
||||
}
|
||||
} else {
|
||||
return dw.processChange(dw.ctx, kind, p, fi, nil)
|
||||
@ -351,8 +351,10 @@ func (lfw *lazyFileWriter) Close() error {
|
||||
// We generate random temporary file names so that there's a good
|
||||
// chance the file doesn't exist yet - keeps the number of tries in
|
||||
// TempFile to a minimum.
|
||||
var rand uint32
|
||||
var randmu sync.Mutex
|
||||
var (
|
||||
rand uint32
|
||||
randmu sync.Mutex
|
||||
)
|
||||
|
||||
func reseed() uint32 {
|
||||
return uint32(time.Now().UnixNano() + int64(os.Getpid()))
|
||||
|
Reference in New Issue
Block a user