#9 Disable telemetry by default
Merged 5 years ago by rhea. Opened 5 years ago by omajid.
dotnet-sig/ omajid/dotnet-2-1 master  into  master

@@ -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();

file modified
+10 -1
@@ -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 @@ 

  Source2:        dotnet.sh

  

  Patch1:         corefx-optflags-support.patch

+ Patch2:         cli-telemetry-optout.patch

  

  ExclusiveArch:  x86_64

  
@@ -159,6 +160,10 @@ 

  %patch1 -p1

  popd

  

+ pushd src/cli

+ %patch2 -p1

+ popd

+ 

  %build

  

  export CFLAGS="%{dotnet_cflags}"
@@ -236,6 +241,10 @@ 

  %{_libdir}/%{name}/sdk/%{sdk_version}

  

  %changelog

+ * Mon Oct 15 2018 Omair Majid <omajid@redhat.com> - 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 <omajid@redhat.com> - 2.1.403-1

  - Update to .NET Core Runtime 2.1.5 and SDK 2.1.403

  

Users will have to explicitly export DOTNET_CLI_TELEMETRY_OPTOUT=0 to enable telemetry.

Build: https://copr.fedorainfracloud.org/coprs/g/dotnet-sig/dotnet/build/809939/

The other option was to add to /etc/profile.d/dotnet.sh but that wouldn't get sourced until the user logs in again. Until then, dotnet would be sending telemetry data (unintentionally).

Pull-Request has been merged by rhea

5 years ago
Metadata