From 02dbd49e32406dbf7af9f8cd078ac6077dd624ca Mon Sep 17 00:00:00 2001 From: Omair Majid Date: Oct 15 2018 17:49:49 +0000 Subject: Disable telemetry by default Users will have to explicitly export DOTNET_CLI_TELEMETRY_OPTOUT=0 to enable telemetry. --- diff --git a/cli-telemetry-optout.patch b/cli-telemetry-optout.patch new file mode 100644 index 0000000..9b01f13 --- /dev/null +++ b/cli-telemetry-optout.patch @@ -0,0 +1,18 @@ +diff --git a/src/dotnet/Program.cs b/src/dotnet/Program.cs +index de1ebb9e6..6bbf479de 100644 +--- a/src/dotnet/Program.cs ++++ b/src/dotnet/Program.cs +@@ -28,6 +28,13 @@ public class Program + + public static int Main(string[] args) + { ++ // opt out of telemetry by default if the env var is unset ++ string telemetryValue = Environment.GetEnvironmentVariable("DOTNET_CLI_TELEMETRY_OPTOUT"); ++ if (String.IsNullOrEmpty(telemetryValue)) ++ { ++ Environment.SetEnvironmentVariable("DOTNET_CLI_TELEMETRY_OPTOUT", "1"); ++ } ++ + DebugHelper.HandleDebugSwitch(ref args); + + new MulticoreJitActivator().TryActivateMulticoreJit(); diff --git a/dotnet.spec b/dotnet.spec index 2971554..9a109c1 100644 --- a/dotnet.spec +++ b/dotnet.spec @@ -23,7 +23,7 @@ Name: dotnet Version: %{sdk_version} -Release: 1%{?dist} +Release: 2%{?dist} Summary: .NET Core CLI tools and runtime License: MIT and ASL 2.0 and BSD URL: https://github.com/dotnet/ @@ -40,6 +40,7 @@ Source1: check-debug-symbols.py Source2: dotnet.sh Patch1: corefx-optflags-support.patch +Patch2: cli-telemetry-optout.patch ExclusiveArch: x86_64 @@ -159,6 +160,10 @@ pushd src/corefx %patch1 -p1 popd +pushd src/cli +%patch2 -p1 +popd + %build export CFLAGS="%{dotnet_cflags}" @@ -236,6 +241,10 @@ echo "Testing build results for debug symbols..." %{_libdir}/%{name}/sdk/%{sdk_version} %changelog +* Mon Oct 15 2018 Omair Majid - 2.1.403-2 +- Disable telemetry by default +- Users have to manually export DOTNET_CLI_TELEMETRY_OPTOUT=0 to enable + * Tue Oct 02 2018 Omair Majid - 2.1.403-1 - Update to .NET Core Runtime 2.1.5 and SDK 2.1.403