Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fs: update afero to v1.8.1 #103

Merged
merged 2 commits into from
Feb 10, 2022
Merged

fs: update afero to v1.8.1 #103

merged 2 commits into from
Feb 10, 2022

Conversation

mewmew
Copy link
Contributor

@mewmew mewmew commented Feb 8, 2022

In afero v1.6.0 the FromIOFS type was added (see afero.FromIOFS godoc),
which facilitates interopability with the fs.FS interface of the Go standard library.

To support afero.FromIOFS in eggos, afero was updated
to the latest version.

Note: the afero.FS interface has been updated since v1.4.0
to include the Chown method. As such, the logger, mount
and smb file system types were updated to include the Chown
method.

In particular, the fs/logger.logger, fs/mount.MountableFs and
fs/stripprefix.fs file system types have been updated to include
Chown.

However, as of yet, a stub implementation of Chown exist for the
smb.Fs file system type.

@mewmew mewmew changed the title fs/{logger,mount,smb,stripprefix}: update afero to v1.8.1 fs: update afero to v1.8.1 Feb 9, 2022
@mewmew mewmew force-pushed the update-afero branch 2 times, most recently from aa7b90f to 3245820 Compare February 9, 2022 14:11
In afero v1.6.0 the FromIOFS type was added [1], which
facilitates interopability with the fs.FS interface of
the Go standard library.

To support afero.FromIOFS in eggos, afero was updated
to the latest version.

Note: the afero.Fs interface has been updated since v1.4.0
to include the Chown method. As such, the logger, mount
and smb file system types were updated to include the Chown
method.

In particular, the fs/logger.logger, fs/mount.MountableFs and
fs/stripprefix.fs file system types have been updated to include
Chown.

However, as of yet, a stub implementation of Chown exist for the
smb.Fs file system type.

[1]: https://pkg.go.dev/github.com/spf13/afero#FromIOFS
@mewmew
Copy link
Contributor Author

mewmew commented Feb 9, 2022

The CI build errors have been fixed now. The only thing left is to figure out how to handle smb.Chown:

From https://github.com/icexin/eggos/pull/103/files#diff-26b2456dc89ed2b4b08c32c9291200852506c7b778997d3f90d643429109b294R86:

// Chown changes the uid and gid of the named file.
func (f *Fs) Chown(name string, uid, gid int) error {
	panic("not implemented") // TODO: figure out how to implement.
}

Edit: does anyone have an idea of how to implement Chown for smb? I don't quite know how it is supposed to be handled.

@icexin
Copy link
Owner

icexin commented Feb 9, 2022

Edit: does anyone have an idea of how to implement Chown for smb? I don't quite know how it is supposed to be handled.

There seems to be no chown semantics in the interface of the smb package. This place can simply report an error.

@mewmew
Copy link
Contributor Author

mewmew commented Feb 9, 2022

There seems to be no chown semantics in the interface of the smb package. This place can simply report an error.

You're right. From https://pkg.go.dev/github.com/hirochachacha/go-smb2#section-readme:

This package doesn't support CAP_UNIX extension.

The CAP_UNIX would be required to handle uid/guid from what I can tell.

As of commit 00ae224, this PR is ready for review (and merge).

Cheers,
Robin

@icexin icexin merged commit 4892e84 into icexin:main Feb 10, 2022
@mewmew mewmew deleted the update-afero branch February 10, 2022 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants