[WIP] initial build of GVFS provider for Linux#810
[WIP] initial build of GVFS provider for Linux#810chrisd8088 wants to merge 13 commits intomicrosoft:features/linuxprototypefrom
Conversation
|
Huh, OK -- well, that passed CI, somewhat to my surprise! @jrbriggs, @wilbaker, et al -- would you be able to check that you can still load things in Visual Studio, run builds on Windows and Mac, etc., with these changes? And if they look OK, merge them (or make suggestions as necessary)? Thanks very much! |
|
I've opened a PR that stacks on top of this one at github#4 which extracts |
e8eb0a6 to
ebec5f1
Compare
7355332 to
17928ab
Compare
|
This PR has been rebased (as of the reset in #818). |
e1dee1c to
130fa35
Compare
|
@jrbiggs I've refactored the Linux and Mac platforms into a common base in this PR; seeing as this may not get merged for some time, the drift in the Mac platform will make rebasing this painful, as most of the changes will need to get moved to the Would you accept a PR to |
|
Hey @kivikakk sorry for the delay. I like the idea of just doing the |
ca7819c to
ab13aa6
Compare
Happy to! I'll get a PR up for that soon. |
41cfe3a to
59a5633
Compare
59a5633 to
1390343
Compare
|
➡️ #926 |
This is largely a duplicate of the macOS build tooling and platform-specific code, with some changes to ensure we build successfully on Linux (e.g., testing for "!= Windows" is no longer sufficient to determine that the platform is OS X). Note that for now the BuildGVFSForLinux.sh script exits early, without checking if a native libprojfs library is available, performing any installation or packaging, etc. The GVFS.sln configuration changes should ensure that the ProjFS.Linux.Managed and GVFS.Platform.Linux subprojects are built on all platforms (and the Mac and Windows equivalents are built on Linux), so as to allow the GVFS.UnitTests project to build on Linux, as it seems to do multi-platform unit testing. However, we don't yet require the GVFS.Mount.Linux project to build on other platforms, and the GVFS.FunctionalTests project's configuration and depedencies will also need to be revisited once the Linux code is actually functional.
Since the GVFS.Mount.Mac project is also built for Windows, build the Linux counterpart as well. Co-authored-by: Ashe Connor <ashe@kivikakk.ee>
1390343 to
0f7f437
Compare
Upgrade the required libgit2 native binary to the latest LibGit2Sharp.NativeBinaries release (2.0.267), as recent NuGet packages eliminate most external dependencies other than OpenSSL, and the OpenSSL dependency no longer requires an older version of that library with now-deprecated CURL_OPENSSL_3 symbols. This allows us to include the compiled libgit2.so from the LibGit2Sharp.NativeBinaries NuGet package in our Linux build.
As we ported this code from the macOS implementation which uses BSD sizes and constants, they need to be revised for Linux.
551e24e to
e1a3ffa
Compare
As with commit 256334e, we need to revise the size of the mode_t type for Linux (as we ported this code from the Darwin/BSD version), as well as change the order and size of data fields in the stat(2) structure and the function signatures of various libc calls such as chmod() and read() to confirm to their Linux definitions.
Also add a TODO note regarding the git.cmd script which is ignored on Linux as it's not in $PATH and also not named "git".
Rename common.mac.cpp to common.posix.cpp so it can be used as a basis for Linux hook programs as well.
Note that we need to include <string.h> for the hook programs' C++ code to compile, at least on some Linux systems.
Also fix our out-of-date and previously unused copy of GVFS.Hooks.Linux.csproj so it fully aligns with the Mac version.
The storage configuration file is unique to Linux and will be read at mount time to locate the lower storage directory.
bd65c2a to
1e706e5
Compare
Please DO NOT MERGE -- this is a WIP branch to debug issues getting the GVFS provider to build and run on Linux.
(Note to @jrbriggs et al: I'm opening this PR because I want to see if this passes the CI checks on Mac and Windows; there may well be additional things I need to tweak in the tooling before it does. Thanks and apologies!)
This is largely a duplicate of the macOS build tooling and platform-specific code, with some changes to ensure we build successfully on Linux (e.g., testing for
'$(OS)' != 'Windows_NT'is no longer sufficient to determine that the platform is OS X).Note that for now the
BuildGVFSForLinux.shscript exits early, without checking if a native libprojfs library is available, performing any installation or packaging, etc.The
GVFS.slnconfiguration changes should ensure that theProjFS.Linux.ManagedandGVFS.Platform.Linuxsubprojects are built on all platforms (and the Mac and Windows equivalentsare built on Linux), so as to allow the
GVFS.UnitTestsproject to build on Linux, as it seems to do multi-platform unit testing.However, we don't yet require the
GVFS.Mount.Linuxproject to build on other platforms, and theGVFS.FunctionalTestsproject's configuration and dependencies will also need to be revisitedonce the Linux code is actually functional.
/cc @kivikakk @wrighty