Skip to content

Commit f50581d

Browse files
authoredMar 9, 2025··
1.29.1.0 (#59)
* fixing local log writing and attributes * addition of print -a and ExcludedProcessNames * update to openssl 3.3.3
1 parent 2fce5a3 commit f50581d

File tree

11 files changed

+38
-21
lines changed

11 files changed

+38
-21
lines changed
 

‎external/OpenSSL/OpenSSL.Module.cs

+5-5
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namespace Microsoft.P4VFS.External
1212
{
1313
public class OpensslModule : Module
1414
{
15-
private const string OPENSSL_VERSION = "3.3.1";
15+
private const string OPENSSL_VERSION = "3.3.3";
1616
private const string PERL_PACKAGE_NAME = "StrawberryPerl";
1717
private const string PERL_VERSION = "5.28.0.1";
1818

@@ -75,7 +75,7 @@ private void BuildOpensslLibrary(string opensslArchiveFolder, string opensslTarg
7575
$"@ECHO ON",
7676
$"CALL \"{vcvarsScriptPath}\"",
7777
$"CD /D \"{opensslArchiveFolder}\"",
78-
$"\"{perlExe}\" Configure VC-WIN64A no-asm no-tests \"--prefix={opensslConfigurationFolder}\" \"--openssldir={opensslConfigurationFolder}-ssl\" --{configuration}",
78+
$"\"{perlExe}\" Configure VC-WIN64A no-asm no-apps no-tests \"--prefix={opensslConfigurationFolder}\" \"--openssldir={opensslConfigurationFolder}-ssl\" --{configuration}",
7979
$"IF %ERRORLEVEL% NEQ 0 EXIT /B 1",
8080
$"nmake clean",
8181
$"IF %ERRORLEVEL% NEQ 0 EXIT /B 1",
@@ -122,10 +122,10 @@ public override void Restore()
122122
string opensslArchiveUrl = String.Format("https://www.openssl.org/source/openssl-{0}.tar.gz", OPENSSL_VERSION);
123123
string opensslTargetFolder = String.Format("{0}\\{1}", opensslModuleFolder, OPENSSL_VERSION);
124124
string workingFolder = String.Format("{0}\\Temp", opensslModuleFolder);
125-
125+
126126
ShellUtilities.RemoveDirectoryRecursive(opensslTargetFolder);
127127
ShellUtilities.RemoveDirectoryRecursive(workingFolder);
128-
128+
129129
// Download the checksums file
130130
string checksumFilePath = ModuleInfo.DownloadFileToFolder(String.Format("{0}.sha256", opensslArchiveUrl), workingFolder);
131131
Dictionary<string, string> checksums = ModuleInfo.LoadChecksumFile(checksumFilePath);
@@ -136,7 +136,7 @@ public override void Restore()
136136

137137
// Build and deploy the release Openssl library
138138
BuildOpensslLibrary(opensslArchiveFolder, opensslTargetFolder, "release");
139-
139+
140140
// Build and deploy the debug Openssl library
141141
BuildOpensslLibrary(opensslArchiveFolder, opensslTargetFolder, "debug");
142142

‎source/P4VFS.Console/P4VFS.Notes.txt

+17
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
Microsoft P4VFS Release Notes
22

3+
Version [1.29.1.0]
4+
* Fixing bug where log output would not be written to the local log file if remote
5+
logging was enabled and writting to the remote log file had failed.
6+
* Fixing undesirable behavior in 1.29.0.0 where all attribute change directory notifications
7+
from file hydration were suppressed. This could even prevent windows explorer from
8+
showing offline attribute (icon) change without having to refresh. This fix now
9+
allows one attribute change notification when hydration is complete.
10+
* Addition of common Windows Defender process names to default ExcludedProcessNames,
11+
instead of having to rely on a custom local configuration to exclude these. Recent
12+
WD signatures have been aggressively ignoring Offline attribute and sniffing "larger"
13+
file-types (FBX,MA,SPP) making this almost essential.
14+
* Addition of `-a` to `print` command used for file hydration. This can be a significant
15+
perforce server side optimization allowing lockless reads when db.peeking=2 or 3.
16+
https://portal.perforce.com/s/article/3839
17+
* Updating to OpenSSL from 3.3.1 to 3.3.3. Now building with `no-apps` to which very
18+
slightly reduces build time
19+
320
Version [1.29.0.0]
421
* Fixing virtual file hydration to be excluded from system directory notifications.
522
This avoids unecessary FILE_NOTIFY_INFORMATION or DirectoryWatcher events indicating

‎source/P4VFS.Core/Include/SettingManager.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ namespace FileCore {
2525
_N( String, SyncResidentPattern, L"" ) \
2626
_N( bool, Unattended, false ) \
2727
_N( String, Verbosity, CSTR_ATOW(FileCore::LogChannel::ToString(FileCore::LogChannel::Info)) ) \
28-
_N( String, ExcludedProcessNames, L"" ) \
28+
_N( String, ExcludedProcessNames, L"MsSense.exe;MsMpEng.exe;SenseCE.exe;SenseIR.exe;SearchProtocolHost.exe" ) \
2929
_N( int32_t, CreateFileRetryCount, 8 ) \
3030
_N( int32_t, CreateFileRetryWaitMs, 250 ) \
3131
_N( int32_t, PoolDefaultNumberOfThreads, 8 ) \

‎source/P4VFS.Core/Source/FileOperations.cpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -1184,13 +1184,14 @@ PopulateFileByStream(
11841184
return hr;
11851185
}
11861186

1187-
hr = SetFileAttributesOnHandle(dstFile.Handle(), dstFileAttributes & ~(FILE_ATTRIBUTE_OFFLINE));
1188-
if (FAILED(hr))
1187+
dstFile.Close();
1188+
1189+
if (!SetFileAttributes(fileToPopulate.c_str(), dstFileAttributes & ~(FILE_ATTRIBUTE_OFFLINE)))
11891190
{
1191+
hr = HRESULT_FROM_WIN32(GetLastError());
11901192
return hr;
11911193
}
11921194

1193-
dstFile.Close();
11941195
return S_OK;
11951196
}
11961197

‎source/P4VFS.Core/Source/FileSystem.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class DepotPrintFileStream : public FileCore::FileStream
3737
HRESULT Read(HANDLE hWriteHandle, UINT64* bytesWritten) override
3838
{
3939
P4::FDepotResultPrintHandle printResult(hWriteHandle);
40-
m_DepotClient->Run(P4::DepotCommand("print", P4::DepotStringArray{m_DepotFileSpec}), printResult);
40+
m_DepotClient->Run(P4::DepotCommand("print", P4::DepotStringArray{"-a",m_DepotFileSpec}), printResult);
4141
if (printResult.HasError())
4242
{
4343
m_DepotClient->Log(LogChannel::Error, StringInfo::Format("DepotPrintFileStream failed '%s' with error [%s]", m_DepotFileSpec.c_str(), printResult.GetError().c_str()));
@@ -68,7 +68,7 @@ MakeFileResident(
6868
return E_POINTER;
6969
}
7070

71-
const String fileSpec = StringInfo::Format(L"%s#%u", populateInfo->depotPath.c_str(), uint32_t(populateInfo->fileRevision));
71+
const String fileSpec = StringInfo::Format(L"%s#=%u", populateInfo->depotPath.c_str(), uint32_t(populateInfo->fileRevision));
7272
const FilePopulateMethod::Enum populateMethod = FilePopulateMethod::FromString(StringInfo::ToAnsi(SettingManager::StaticInstance().PopulateMethod.GetValue()));
7373

7474
switch (populateMethod)
@@ -88,7 +88,7 @@ MakeFileResident(
8888
return HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND);
8989
}
9090

91-
P4::DepotResult print = depotClient.Run("print", P4::DepotStringArray{"-o", StringInfo::ToAnsi(tempPrintFile.GetFilePath()), StringInfo::ToAnsi(fileSpec)});
91+
P4::DepotResult print = depotClient.Run("print", P4::DepotStringArray{"-a","-o", StringInfo::ToAnsi(tempPrintFile.GetFilePath()), StringInfo::ToAnsi(fileSpec)});
9292
if (print.get() == nullptr || print->HasError())
9393
{
9494
depotClient.Log(LogChannel::Error, StringInfo::Format("MakeFileResident '%s' failed print tempfile '%s' for PopulateFile by %s", CSTR_WTOA(fileSpec), CSTR_WTOA(tempPrintFile.GetFilePath()), populateMethodName));

‎source/P4VFS.Core/Source/LogDevice.cpp

+2-4
Original file line numberDiff line numberDiff line change
@@ -143,13 +143,11 @@ void LogDeviceFile::WriteInternal(time_t time, LogChannel::Enum channel, const S
143143

144144
if (m_Impersonate.get())
145145
{
146-
if (FileOperations::ImpersonateFileAppend(ExpandVariables(m_RemoteFilePath).c_str(), line.c_str(), m_Impersonate.get()))
147-
return;
146+
FileOperations::ImpersonateFileAppend(ExpandVariables(m_RemoteFilePath).c_str(), line.c_str(), m_Impersonate.get());
148147
}
149148
else
150149
{
151-
if (FileOperations::FileAppend(ExpandVariables(m_RemoteFilePath).c_str(), line.c_str()))
152-
return;
150+
FileOperations::FileAppend(ExpandVariables(m_RemoteFilePath).c_str(), line.c_str());
153151
}
154152
}
155153

‎source/P4VFS.Driver/Include/DriverVersion.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
#define P4VFS_VER_MAJOR 1 // Increment this number almost never
66
#define P4VFS_VER_MINOR 29 // Increment this number whenever the driver changes
7-
#define P4VFS_VER_BUILD 0 // Increment this number when a major user mode change has been made
7+
#define P4VFS_VER_BUILD 1 // Increment this number when a major user mode change has been made
88
#define P4VFS_VER_REVISION 0 // Increment this number when we rebuild with any change
99

1010
#define P4VFS_VER_STRINGIZE_EX(v) L#v

‎source/P4VFS.External/Source/Module.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ public static Dictionary<string, string> LoadChecksumFile(string checksumFilePat
129129
Dictionary<string, string> checksums = new Dictionary<string, string>(StringComparer.InvariantCultureIgnoreCase);
130130
foreach (string line in File.ReadAllLines(checksumFilePath))
131131
{
132-
Match m = Regex.Match(line, @"^\s*(?<sum>[0-9a-f]+)\s+\*(?<name>\S+)\s*$", RegexOptions.IgnoreCase);
132+
Match m = Regex.Match(line, @"^\s*(?<sum>[0-9a-f]+)\s+\*?(?<name>\S+)\s*$", RegexOptions.IgnoreCase);
133133
if (m.Success)
134134
{
135135
checksums[m.Groups["name"].Value] = m.Groups["sum"].Value;

‎source/P4VFS.UnitTest/Source/UnitTestBase.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -239,11 +239,11 @@ public string ExcludedProcessNames
239239
{
240240
return String.Join(";", new[]
241241
{
242-
"SearchProtocolHost.exe",
243242
"MsSense.exe",
244243
"MsMpEng.exe",
245244
"SenseCE.exe",
246245
"SenseIR.exe",
246+
"SearchProtocolHost.exe",
247247
});
248248
}
249249
}
@@ -340,7 +340,7 @@ public void WorkspaceReset(DepotConfig config = null)
340340

341341
Extensions.SocketModel.SocketModelClient service = new Extensions.SocketModel.SocketModelClient();
342342
Assert(service.GarbageCollect());
343-
Assert(service.SetServiceSetting(nameof(SettingManager.ExcludedProcessNames), SettingNode.FromString(ExcludedProcessNames)));
343+
Assert(service.GetServiceSetting(nameof(SettingManager.ExcludedProcessNames)).ToString() == ExcludedProcessNames);
344344
}
345345

346346
public void ServiceRestart()

‎source/P4VFS.UnitTest/Source/UnitTestServer.cs

+1
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ public void StartupLocalPerforceServerTest()
5555

5656
string[] serverConfigVariables = new[] {
5757
"auth.sso.allow.passwd=1",
58+
"db.peeking=3",
5859
"dm.user.noautocreate=2",
5960
"dm.user.resetpassword=0",
6061
"lbr.autocompress=1",

‎source/P4VFS.props

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
<PerforceApiLibFiles>libclient.lib;libp4api.lib;libp4script.lib;libp4script_c.lib;libp4script_curl.lib;libp4script_sqlite.lib;librpc.lib;libsupp.lib</PerforceApiLibFiles>
7474

7575
<!-- OpenSSL -->
76-
<OpenSSLApiVersion>3.3.1</OpenSSLApiVersion>
76+
<OpenSSLApiVersion>3.3.3</OpenSSLApiVersion>
7777
<OpenSSLApiConfiguration>$(P4VFSConfiguration)</OpenSSLApiConfiguration>
7878
<OpenSSLApiDir>$(P4VFSExternalDir)/OpenSSL/$(OpenSSLApiVersion)</OpenSSLApiDir>
7979
<OpenSSLApiIncludeDir>$(OpenSSLApiDir)/include</OpenSSLApiIncludeDir>

0 commit comments

Comments
 (0)
Please sign in to comment.