-
Notifications
You must be signed in to change notification settings - Fork 451
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
initial build of GVFS provider for Linux
We add the core GVFS.Platform.Linux classes, derived from their GVFS.Platform.Mac equivalents but with appropriate changes for syscall argument signatures and flag values, type definitions, and structure fields (e.g., mode_t is a uint, and the layout of struct stat is quite different). In order to avoid conflicting with the GNOME Virtual FileSystem, we use .vfsforgit as the name of our per-repository private directories, instead of .gvfs, which is used on Windows and Mac. The build tooling is largely a duplicate of the corresponding Mac configuration, 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, so we add distinct IsLinux and IsOSX build conditions to the .csproj file for GVFS.Upgrader, among other subprojects). The GVFS.sln configuration changes should ensure that the ProjFS.Linux.Managed and GVFS.Platform.Linux subprojects are built on all platforms (and their Mac and Windows equivalents are built on Linux), and that the GVFS.Service.Mac classes are built on Linux, so as to allow the GVFS.UnitTests subproject to build and run successfully on all three platforms. We also build the GVFS.Hooks.Linux and GVFS.Mount.Linux subprojects on both Linux and Windows, just as their Mac counterparts are built on both Mac and Windows. The GVFS.Service binary is, for the time being, only a stub on Linux, as we have yet to determine how (or if) we should handle auto-mounting repositories, and the GVFS.Upgrader binary is also non-functional on Linux at present. Note that for now the BuildGVFSForLinux.sh script does not perform any installation or packaging. Co-authored-by: Ashe Connor <ashe@kivikakk.ee>
- Loading branch information
1 parent
683dbbf
commit b304cf7
Showing
34 changed files
with
2,106 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<Import Project="..\GVFS.Build\GVFS.cs.props" /> | ||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<AssemblyName>GVFS.Hooks</AssemblyName> | ||
<TargetFramework>netcoreapp2.1</TargetFramework> | ||
<Platforms>x64</Platforms> | ||
<RunTimeIdentifiers>linux-x64</RunTimeIdentifiers> | ||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<RootNamespace>GVFS.Hooks</RootNamespace> | ||
<AssemblyName>GVFS.Hooks</AssemblyName> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> | ||
<Version>$(GVFSVersion)</Version> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> | ||
<Version>$(GVFSVersion)</Version> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Compile Remove="HooksPlatform\GVFSHooksPlatform.Mac.cs" /> | ||
<Compile Remove="HooksPlatform\GVFSHooksPlatform.Windows.cs" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<!-- | ||
Files from GVFS.Common included as links here to prevent adding | ||
project reference. The project reference leads to performance degradation | ||
due to the other dependencies that come along with GVFS.Common. | ||
--> | ||
<Compile Include="..\GVFS.Common\ConsoleHelper.cs"> | ||
<Link>Common\ConsoleHelper.cs</Link> | ||
</Compile> | ||
<Compile Include="..\GVFS.Common\Git\GitConfigHelper.cs"> | ||
<Link>Common\Git\GitConfigHelper.cs</Link> | ||
</Compile> | ||
<Compile Include="..\GVFS.Common\Git\GitConfigSetting.cs"> | ||
<Link>Common\Git\GitConfigSetting.cs</Link> | ||
</Compile> | ||
<Compile Include="..\GVFS.Common\Git\GitVersion.cs"> | ||
<Link>Common\Git\GitVersion.cs</Link> | ||
</Compile> | ||
<Compile Include="..\GVFS.Common\GVFSConstants.cs"> | ||
<Link>Common\GVFSConstants.cs</Link> | ||
</Compile> | ||
<Compile Include="..\GVFS.Common\GVFSEnlistment.Shared.cs"> | ||
<Link>Common\GVFSEnlistment.Shared.cs</Link> | ||
</Compile> | ||
<Compile Include="..\GVFS.Common\GVFSLock.Shared.cs"> | ||
<Link>Common\GVFSLock.Shared.cs</Link> | ||
</Compile> | ||
<Compile Include="..\GVFS.Common\NamedPipes\BrokenPipeException.cs"> | ||
<Link>Common\NamedPipes\BrokenPipeException.cs</Link> | ||
</Compile> | ||
<Compile Include="..\GVFS.Common\NamedPipes\LockNamedPipeMessages.cs"> | ||
<Link>Common\NamedPipes\LockNamedPipeMessages.cs</Link> | ||
</Compile> | ||
<Compile Include="..\GVFS.Common\NamedPipes\NamedPipeClient.cs"> | ||
<Link>Common\NamedPipes\NamedPipeClient.cs</Link> | ||
</Compile> | ||
<Compile Include="..\GVFS.Common\NamedPipes\NamedPipeStreamReader.cs"> | ||
<Link>Common\NamedPipes\NamedPipeStreamReader.cs</Link> | ||
</Compile> | ||
<Compile Include="..\GVFS.Common\NamedPipes\NamedPipeStreamWriter.cs"> | ||
<Link>Common\NamedPipes\NamedPipeStreamWriter.cs</Link> | ||
</Compile> | ||
<Compile Include="..\GVFS.Common\NativeMethods.Shared.cs"> | ||
<Link>Common\NativeMethods.Shared.cs</Link> | ||
</Compile> | ||
<Compile Include="..\GVFS.Common\Paths.Shared.cs"> | ||
<Link>Common\Paths.Shared.cs</Link> | ||
</Compile> | ||
<Compile Include="..\GVFS.Common\ProcessHelper.cs"> | ||
<Link>Common\ProcessHelper.cs</Link> | ||
</Compile> | ||
<Compile Include="..\GVFS.Common\ProcessResult.cs"> | ||
<Link>Common\ProcessResult.cs</Link> | ||
</Compile> | ||
<Compile Include="..\GVFS.Common\ProductUpgraderInfo.Shared.cs" Link="Common\ProductUpgraderInfo.Shared.cs" /> | ||
<Compile Include="..\GVFS.Common\Tracing\EventLevel.cs"> | ||
<Link>Common\Tracing\EventLevel.cs</Link> | ||
</Compile> | ||
<Compile Include="..\GVFS.Common\Tracing\EventMetadata.cs"> | ||
<Link>Common\Tracing\EventMetadata.cs</Link> | ||
</Compile> | ||
<Compile Include="..\GVFS.Common\Tracing\EventOpcode.cs"> | ||
<Link>Common\Tracing\EventOpcode.cs</Link> | ||
</Compile> | ||
<Compile Include="..\GVFS.Common\Tracing\ITracer.cs"> | ||
<Link>Common\Tracing\ITracer.cs</Link> | ||
</Compile> | ||
<Compile Include="..\GVFS.Common\Tracing\Keywords.cs"> | ||
<Link>Common\Tracing\Keywords.cs</Link> | ||
</Compile> | ||
<Compile Include="..\GVFS.Platform.Linux\LinuxPlatform.Shared.cs"> | ||
<Link>"LinuxPlatform.Shared.cs"</Link> | ||
</Compile> | ||
<Compile Include="..\GVFS.Platform.POSIX\POSIXFileSystem.Shared.cs"> | ||
<Link>POSIX\POSIXFileSystem.Shared.cs</Link> | ||
</Compile> | ||
<Compile Include="..\GVFS.Platform.POSIX\POSIXPlatform.Shared.cs"> | ||
<Link>POSIX\POSIXPlatform.Shared.cs</Link> | ||
</Compile> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="StyleCop.Analyzers" Version="1.0.2"> | ||
<PrivateAssets>all</PrivateAssets> | ||
</PackageReference> | ||
</ItemGroup> | ||
</Project> |
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,32 @@ | ||
using GVFS.Platform.Linux; | ||
|
||
namespace GVFS.Hooks.HooksPlatform | ||
{ | ||
public static partial class GVFSHooksPlatform | ||
{ | ||
public static string GetUpgradeHighestAvailableVersionDirectory() | ||
{ | ||
return LinuxPlatform.GetUpgradeHighestAvailableVersionDirectoryImplementation(); | ||
} | ||
|
||
public static bool TryGetGVFSEnlistmentRoot(string directory, out string enlistmentRoot, out string errorMessage) | ||
{ | ||
return LinuxPlatform.TryGetGVFSEnlistmentRootImplementation(directory, out enlistmentRoot, out errorMessage); | ||
} | ||
|
||
public static string GetNamedPipeName(string enlistmentRoot) | ||
{ | ||
return LinuxPlatform.GetNamedPipeNameImplementation(enlistmentRoot); | ||
} | ||
|
||
public static string GetGitGuiBlockedMessage() | ||
{ | ||
return "git gui is not supported in VFS for Git repos on Linux"; | ||
} | ||
|
||
public static string GetUpgradeReminderNotification() | ||
{ | ||
return LinuxPlatform.GetUpgradeReminderNotificationImplementation(); | ||
} | ||
} | ||
} |
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,35 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<Import Project="..\GVFS.Build\GVFS.cs.props" /> | ||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<AssemblyName>GVFS.Mount</AssemblyName> | ||
<TargetFramework>netcoreapp2.1</TargetFramework> | ||
<Platforms>x64</Platforms> | ||
<RunTimeIdentifiers>linux-x64</RunTimeIdentifiers> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> | ||
<Version>$(GVFSVersion)</Version> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> | ||
<Version>$(GVFSVersion)</Version> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<Compile Include="..\GVFS.PlatformLoader\PlatformLoader.Linux.cs"> | ||
<Link>PlatformLoader.Linux.cs</Link> | ||
</Compile> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\GVFS.Platform.Linux\GVFS.Platform.Linux.csproj" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="CommandLineParser" Version="2.1.1-beta" /> | ||
<PackageReference Include="StyleCop.Analyzers" Version="1.0.2"> | ||
<PrivateAssets>all</PrivateAssets> | ||
</PackageReference> | ||
</ItemGroup> | ||
|
||
</Project> |
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,34 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<Import Project="..\GVFS.Build\GVFS.cs.props" /> | ||
<PropertyGroup> | ||
<TargetFrameworks>netcoreapp2.1;netstandard2.0</TargetFrameworks> | ||
<Platforms>x64</Platforms> | ||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> | ||
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> | ||
<Version>$(GVFSVersion)</Version> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> | ||
<Version>$(GVFSVersion)</Version> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(Version)' == ''"> | ||
<Version>$(GVFSVersion)</Version> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\..\ProjFS.Linux\PrjFSLib.Linux.Managed\PrjFSLib.Linux.Managed.csproj" /> | ||
<ProjectReference Include="..\GVFS.Virtualization\GVFS.Virtualization.csproj" /> | ||
<ProjectReference Include="..\GVFS.Common\GVFS.Common.csproj" /> | ||
<ProjectReference Include="..\GVFS.Platform.POSIX\GVFS.Platform.POSIX.csproj" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="CommandLineParser" Version="2.1.1-beta" /> | ||
<PackageReference Include="StyleCop.Analyzers" Version="1.0.2"> | ||
<PrivateAssets>all</PrivateAssets> | ||
</PackageReference> | ||
</ItemGroup> | ||
</Project> |
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,27 @@ | ||
using GVFS.Common; | ||
using GVFS.DiskLayoutUpgrades; | ||
|
||
namespace GVFS.Platform.Linux | ||
{ | ||
public class LinuxDiskLayoutUpgradeData : IDiskLayoutUpgradeData | ||
{ | ||
public DiskLayoutUpgrade[] Upgrades | ||
{ | ||
get | ||
{ | ||
return new DiskLayoutUpgrade[0]; | ||
} | ||
} | ||
|
||
public DiskLayoutVersion Version => new DiskLayoutVersion( | ||
currentMajorVersion: 19, | ||
currentMinorVersion: 0, | ||
minimumSupportedMajorVersion: 19); | ||
|
||
public bool TryParseLegacyDiskLayoutVersion(string dotGVFSPath, out int majorVersion) | ||
{ | ||
majorVersion = 0; | ||
return false; | ||
} | ||
} | ||
} |
Oops, something went wrong.