-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #46 from imeoer/fix-windows-cross-compile
makefile: ensure cross-compilation compatibility
- Loading branch information
Showing
12 changed files
with
140 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
//go:build windows | ||
// +build windows | ||
|
||
/* | ||
* Copyright (c) 2022. Nydus Developers. All rights reserved. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package converter | ||
|
||
import ( | ||
"context" | ||
"fmt" | ||
"io" | ||
) | ||
|
||
func Convert(ctx context.Context, dest io.Writer, opt ConvertOption) (io.WriteCloser, error) { | ||
return nil, fmt.Errorf("not implemented") | ||
} | ||
|
||
func Merge(ctx context.Context, layers []Layer, dest io.Writer, opt MergeOption) error { | ||
return fmt.Errorf("not implemented") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* Copyright (c) 2022. Nydus Developers. All rights reserved. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package converter | ||
|
||
import ( | ||
"github.com/containerd/containerd/content" | ||
"github.com/opencontainers/go-digest" | ||
) | ||
|
||
type Layer struct { | ||
// Digest represents the hash of whole tar blob. | ||
Digest digest.Digest | ||
// ReaderAt holds the reader of whole tar blob. | ||
ReaderAt content.ReaderAt | ||
} | ||
|
||
type ConvertOption struct { | ||
// RafsVersion specifies nydus format version, possible values: | ||
// `5`, `6` (EROFS-compatible), default is `5`. | ||
RafsVersion string | ||
// ChunkDictPath holds the bootstrap path of chunk dict image. | ||
ChunkDictPath string | ||
// PrefetchPatterns holds file path pattern list want to prefetch. | ||
PrefetchPatterns string | ||
} | ||
|
||
type MergeOption struct { | ||
// ChunkDictPath holds the bootstrap path of chunk dict image. | ||
ChunkDictPath string | ||
// PrefetchPatterns holds file path pattern list want to prefetch. | ||
PrefetchPatterns string | ||
// WithTar puts bootstrap into a tar stream (no gzip). | ||
WithTar bool | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
//go:build linux | ||
// +build linux | ||
|
||
package mount | ||
|
||
import ( | ||
|
7 changes: 5 additions & 2 deletions
7
pkg/utils/mount/mount_darwin.go → pkg/utils/mount/mount_other.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,17 @@ | ||
//go:build !linux | ||
// +build !linux | ||
|
||
package mount | ||
|
||
import "fmt" | ||
|
||
type Mounter struct { | ||
} | ||
|
||
func (m *Mounter) Umount(target string) error { | ||
return nil | ||
return fmt.Errorf("not implemented") | ||
} | ||
|
||
func (m *Mounter) IsLikelyNotMountPoint(file string) (bool, error) { | ||
return true, nil | ||
return false, fmt.Errorf("not implemented") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,20 @@ | ||
//go:build linux | ||
// +build linux | ||
|
||
package snapshot | ||
|
||
import "github.com/containerd/continuity/fs" | ||
import ( | ||
"os" | ||
"syscall" | ||
|
||
"github.com/containerd/continuity/fs" | ||
) | ||
|
||
func getSupportsDType(dir string) (bool, error) { | ||
return fs.SupportsDType(dir) | ||
} | ||
|
||
func lchown(target string, st os.FileInfo) error { | ||
stat := st.Sys().(*syscall.Stat_t) | ||
return os.Lchown(target, int(stat.Uid), int(stat.Gid)) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
//go:build !linux | ||
// +build !linux | ||
|
||
package snapshot | ||
|
||
import ( | ||
"fmt" | ||
"os" | ||
) | ||
|
||
func getSupportsDType(dir string) (bool, error) { | ||
return false, fmt.Errorf("not implemented") | ||
} | ||
|
||
func lchown(target string, st os.FileInfo) error { | ||
return fmt.Errorf("not implemented") | ||
} |