Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: dragonflyoss/nydus
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 418051d6918e9d2b3a8d857b77cb73b3788698ee
Choose a base ref
..
head repository: dragonflyoss/nydus
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: adfd9d96c3bc929128accce202ace9f42404d952
Choose a head ref
Showing with 6 additions and 7 deletions.
  1. +3 −2 builder/src/core/node.rs
  2. +3 −5 contrib/nydusify/pkg/external/modctl/remote.go
5 changes: 3 additions & 2 deletions builder/src/core/node.rs
Original file line number Diff line number Diff line change
@@ -794,8 +794,9 @@ impl Node {
// directory entries, so let's ignore the value provided by source filesystem and
// calculate it later by ourself.
if !self.is_dir() {
// If the file size is not 0, and the meta size is 0, it means the file is an
// external dummy file. Weeneed to set the size to file_size.
// If the file size is non-zero but the metadata reports a size of zero,
// it indicates that the file is an external dummy file. In this case,
// the size should be explicitly set to `file_size`.
if file_size != 0 && meta.st_size() == 0 {
self.inode.set_size(file_size);
} else {
8 changes: 3 additions & 5 deletions contrib/nydusify/pkg/external/modctl/remote.go
Original file line number Diff line number Diff line change
@@ -145,15 +145,13 @@ func (handler *RemoteHandler) handle(ctx context.Context, layer ocispec.Descript

blobInfo := handler.blobs[index].Config
fileAttrs := make([]backend.FileAttribute, len(files))
// HACK
hackFile := os.Getenv("HACK_FILE")
if hackFile == "" {
hackFile = "config.json"
}
for idx, f := range files {
if f.name == hackFile {
// HACK to chmod config.json to 0640
// HACK to chmod to 0640
hackMode := uint32(0640)
// etc 640.
// etc HACK_MODE=640
hackModeStr := os.Getenv("HACK_MODE")
if hackModeStr != "" {
modeValue, err := strconv.ParseUint(hackModeStr, 8, 32)