On Mon, Dec 11, 2017 at 9:30 AM, Alberto Garcia <be...@igalia.com> wrote:
> If the only debate is having statistics of OS popularity vs making the
> user harder to identify, I think I choose the latter. I don't know
> what the rest of the team thinks...

Like I said, I think Ubuntu wants it. How about this patch then?

Thanks,
Jeremy Bicha
From f0c8fa2e595120aab43ee9d3d901b093541dc23a Mon Sep 17 00:00:00 2001
From: Jeremy Bicha <jbi...@debian.org>
Date: Mon, 11 Dec 2017 21:37:28 -0500
Subject: [PATCH] Add Ubuntu to useragent string when built for Ubuntu

---
 debian/patches/series                    |  1 +
 debian/patches/user-agent-branding.patch | 26 ++++++++++++++++++++++++++
 debian/rules                             |  2 +-
 3 files changed, 28 insertions(+), 1 deletion(-)
 create mode 100644 debian/patches/user-agent-branding.patch

diff --git a/debian/patches/series b/debian/patches/series
index deded9b21..6c12ee364 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,3 +4,4 @@ fix-ftbfs-hurd.patch
 fix-ftbfs-x86.patch
 fix-ftbfs-m68k.patch
 detect-gstreamer-gl.patch
+user-agent-branding.patch
diff --git a/debian/patches/user-agent-branding.patch b/debian/patches/user-agent-branding.patch
new file mode 100644
index 000000000..faef5d30b
--- /dev/null
+++ b/debian/patches/user-agent-branding.patch
@@ -0,0 +1,26 @@
+From: Michael Catanzaro <mcatanz...@gnome.org>
+Date: Thu, 26 Feb 2015 21:38:13 -0500
+Subject: user-agent-branding
+
+Add optional distributor string to user agent
+
+https://bugs.webkit.org/show_bug.cgi?id=162611
+https://src.fedoraproject.org/rpms/webkitgtk4/blob/master/f/user-agent-branding.patch
+---
+ Source/WebCore/platform/glib/UserAgentGLib.cpp | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/Source/WebCore/platform/glib/UserAgentGLib.cpp b/Source/WebCore/platform/glib/UserAgentGLib.cpp
+index 8eabebe..c50e359 100644
+--- a/Source/WebCore/platform/glib/UserAgentGLib.cpp
++++ b/Source/WebCore/platform/glib/UserAgentGLib.cpp
+@@ -88,6 +88,9 @@ static String buildUserAgentString(const UserAgentQuirks& quirks)
+     else {
+         uaString.append(platformForUAString());
+         uaString.appendLiteral("; ");
++#if defined(USER_AGENT_GTK_DISTRIBUTOR_NAME)
++        uaString.appendLiteral(USER_AGENT_GTK_DISTRIBUTOR_NAME "; ");
++#endif
+         uaString.append(platformVersionForUAString());
+     }
+ 
diff --git a/debian/rules b/debian/rules
index 015745f34..f2ef97a86 100755
--- a/debian/rules
+++ b/debian/rules
@@ -47,7 +47,7 @@ else
 endif
 
 ifeq ($(shell dpkg-vendor --derives-from Ubuntu && echo yes),yes)
-	EXTRA_CMAKE_ARGUMENTS += -DUSE_GSTREAMER_GL=OFF
+	EXTRA_CMAKE_ARGUMENTS += -DUSE_GSTREAMER_GL=OFF -DUSER_AGENT_GTK_DISTRIBUTOR_NAME=\'\\"Ubuntu\\"\'
 	DEB_DH_GENCONTROL_ARGS += -- -Vgst:Recommends=""
 else
 	DEB_DH_GENCONTROL_ARGS += -- -Vgst:Recommends="gstreamer1.0-plugins-bad, gstreamer1.0-libav,"
-- 
2.14.1

Reply via email to