-
Notifications
You must be signed in to change notification settings - Fork 68
Compile on Windows #65
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
Conversation
|
LGTM Any chance we can get the unit tests working? :p |
|
I plan to, but figured containerd is slightly more important to make progress on.... Hold fire on merging - looks like I missed some formatting on a file. |
c1349e2 to
36478f2
Compare
Signed-off-by: John Howard <jhoward@microsoft.com>
36478f2 to
281ab83
Compare
|
There was a really weird gofmt problem with manifest_test.go which I can't explain, but seems fixed now. Also noted that resource.go was failing the gofmt test, even though travis-ci appeared to complete successfully. Regardless - fixed now. |
| import "os" | ||
|
|
||
| // getUidGidFromFileInfo extracts the user and group IDs from a fileinfo. | ||
| // This is Unix-specific functionality. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there still not an owner and group in msft? We made these strings specifically to be compatible here. Seems odd removing it. How will this data be recovered when used with continuity?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UID/GID are very Unix specific. Windows uses ACES in ACLS (https://msdn.microsoft.com/en-us/library/windows/desktop/aa374872(v=vs.85).aspx). Certainly as a longer-term plan, this needs to be considered. However, I wish to re-iterate this is just to get this component to compile on Windows, not to functionally prove it. It allows forward progress on containerd.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we not foresee putting ACEs in uid/gid? If not, can we revert these fields to integers?
On other systems, I have seen these as strings since they can be used for the ACE identifier, but I may be missing something here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The easiest way to encode an ACL is in SDDL which is essentially a string. See https://msdn.microsoft.com/en-us/library/windows/desktop/aa379567(v=vs.85).aspx. You can see an example of SDDL in the docker code base such as https://github.com/moby/moby/blob/master/pkg/system/filesys_windows.go#L99-L120.
Calling them a uid or gid is really not appropriate on Windows.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jhowardmsft Sounds like we'll need another field...
|
LGTM @jhowardmsft It looks like a few things are stubbed out. It would be great to have a plan to figure out how we can pick up a windows filesystem from a lossy archive and continuity manifest and get the same result back. Ignoring the ownership seems to be unexpected from the goals of this project. |
Signed-off-by: John Howard jhoward@microsoft.com
@stevvooe @dmcgowan
I need this to compile cleanly on Windows for containerd. Fixups only - I don't know how functional it is yet. Verified it builds clean for
windows,darwinandlinuxAnd verified unit tests pass on Linux:
Note that the unit tests have not been ported to Windows yet and don't pass.