User-Agent and Debian version

Loïc Minier lool@dooz.org
Thu, 10 Feb 2005 17:35:37 +0100


--bp/iNruPH9dso1Pn
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Jordi Mallach <jordi@debian.org> - Thu, Feb 10, 2005:

>      * #268655: epiphany-browser: Please use user-agent branding to not=
e
>        debian package version in ua string

 I thought you could patch /usr/share/epiphany-browser/default-prefs.js
 in your package, but it isn't enough for Galeon not Epiphany, you have
 to apply a patch.  Firefox can easily be faked in a cool browser if you
 use:
    pref("general.useragent.vendor", "Galeon");
    pref("general.useragent.vendorSub", "42 (Debian package 42-1)");

 in /etc/mozilla-firefox/pref/firefox.js, and load "about:".

 Here's a patch against desktop/trunk/epiphany-browser for you.

   Bye,

--=20
Lo=EFc Minier <lool@dooz.org>
"Neutral President: I have no strong feelings one way or the other."

--bp/iNruPH9dso1Pn
Content-Type: text/plain; charset=iso-8859-15
Content-Disposition: attachment; filename="epi-debian-user-agent.patch"
Content-Transfer-Encoding: quoted-printable

Index: debian/control
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- debian/control	(revision 2557)
+++ debian/control	(working copy)
@@ -2,7 +2,7 @@
 Section: gnome
 Priority: optional
 Maintainer: Jordi Mallach <jordi@debian.org>
-Uploaders: Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.=
debian.org>, Akira TAGOH <tagoh@debian.org>, Andreas Rottmann <rotty@debi=
an.org>, Andrew Lau <netsnipe@users.sourceforge.net>, Carlos Perell=C3=B3=
 Mar=C3=ADn <carlos@pemas.net>, Edd Dumbill <ejad@debian.org>, Emil Soley=
man-Zomalan <emil@nishra.com>, Gustavo Noronha Silva <kov@debian.org>, J.=
H.M. Dassen (Ray) <jdassen@debian.org>, Joe Drew <drew@debian.org>, Johan=
nes Rohr <j.rohr@comlink.org>, Jose Carlos Garcia Sogo <jsogo@debian.org>=
, Josselin Mouette <joss@debian.org>, Marc 'HE' Brockschmidt <he@debian.o=
rg>, Ond=C5=99ej Sur=C3=BD <ondrej@debian.org>, Rob Bradford <rob@debianp=
lanet.org>, Robert McQueen <robot101@debian.org>, Ross Burton <ross@debia=
n.org>, Sebastien Bacher <seb128@debian.org>, Takuo KITAME <kitame@debian=
.org>
+Uploaders: Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.=
debian.org>, Akira TAGOH <tagoh@debian.org>, Andreas Rottmann <rotty@debi=
an.org>, Andrew Lau <netsnipe@users.sourceforge.net>, Carlos Perell=C3=B3=
 Mar=C3=ADn <carlos@pemas.net>, Edd Dumbill <ejad@debian.org>, Emil Soley=
man-Zomalan <emil@nishra.com>, Gustavo Noronha Silva <kov@debian.org>, J.=
H.M. Dassen (Ray) <jdassen@debian.org>, Joe Drew <drew@debian.org>, Johan=
nes Rohr <j.rohr@comlink.org>, Jose Carlos Garcia Sogo <jsogo@debian.org>=
, Josselin Mouette <joss@debian.org>, Marc 'HE' Brockschmidt <he@debian.o=
rg>, Ond=C5=99ej Sur=C3=BD <ondrej@debian.org>, Rob Bradford <rob@debianp=
lanet.org>, Robert McQueen <robot101@debian.org>, Ross Burton <ross@debia=
n.org>, Sebastien Bacher <seb128@debian.org>, Sjoerd Simons <sjoerd@debia=
n.org>, Takuo KITAME <kitame@debian.org>
 Build-Depends: debhelper (>=3D 4.2.22), liborbit2-dev, pkg-config, libgl=
ade2-dev (>=3D 2.3.1), libglib2.0-dev (>=3D 2.4.1), libgtk2.0-dev (>=3D 2=
.4.0), libpango1.0-dev (>=3D 1.5.1), libbonobo2-dev (>=3D 2.1.1), libbono=
bo-activation-dev, libgconf2-dev, mozilla-dev (>=3D 2:1.7.5), libgnomeui-=
dev (>=3D 2.6.0), libgnomevfs2-dev (>=3D 2.3.1), scrollkeeper, cdbs (>=3D=
 0.4.24), libgnome-desktop-dev, perl, libxml2-dev (>=3D 2.6.6), gnome-pkg=
-tools, libxml-parser-perl
 Standards-Version: 3.6.1
=20
Index: debian/patches/04_debian-user-agent.patch
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- debian/patches/04_debian-user-agent.patch	(revision 0)
+++ debian/patches/04_debian-user-agent.patch	(revision 0)
@@ -0,0 +1,12 @@
+diff -urN epiphany-browser-1.4.7.orig/embed/mozilla/mozilla-embed-single=
.cpp epiphany-browser-1.4.7/embed/mozilla/mozilla-embed-single.cpp
+--- epiphany-browser-1.4.7.orig/embed/mozilla/mozilla-embed-single.cpp	2=
004-11-18 14:22:36.000000000 +0100
++++ epiphany-browser-1.4.7/embed/mozilla/mozilla-embed-single.cpp	2005-0=
2-10 17:17:10.000000000 +0100
+@@ -241,7 +241,7 @@
+ 	/* FIXME We need to do this because mozilla doesnt set product
+ 	sub for embedding apps */
+ 	pref->SetCharPref ("general.useragent.vendor", "Epiphany");
+-	pref->SetCharPref ("general.useragent.vendorSub", VERSION);
++	pref->SetCharPref ("general.useragent.vendorSub", VERSION " (Debian pa=
ckage " G_STRINGIFY(DEB_VERSION) ")");
+=20
+ 	/* Open ftp uris with an external handler if one is setup */
+ 	pref->SetBoolPref("network.protocol-handler.external.ftp",
Index: debian/rules
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- debian/rules	(revision 2557)
+++ debian/rules	(working copy)
@@ -4,6 +4,10 @@
 include /usr/share/cdbs/1/rules/simple-patchsys.mk
 include /usr/share/gnome-pkg-tools/1/rules/uploaders.mk
=20
+# provide a Debian package version macro for C++ source code (used to ad=
d
+# Debian package version to the User-Agent header and to the about: page=
)
+CXXFLAGS +=3D -DDEB_VERSION=3D$(DEB_VERSION)
+
 # set to compile with gcc-3.2 explicitly
=20
 # DEB_CONFIGURE_INVOKE :=3D cd $(DEB_BUILDDIR) && CC=3Dgcc-3.2 CXX=3Dg++=
-3.2 $(DEB_CONFIGURE_SCRIPT) $(DEB_CONFIGURE_NORMAL_ARGS) --disable-maint=
ainer-mode

--bp/iNruPH9dso1Pn--