Opened 12 years ago

Closed 11 years ago

Last modified 8 years ago

#1066 closed enhancement (fixed)

Provide sugar version in user-agent string

Reported by: alsroot Owned by: erikos
Priority: Unspecified by Maintainer Milestone:
Component: hulahop Version: Unspecified
Severity: Unspecified Keywords: r!
Cc: Distribution/OS: Unspecified
Bug Status: Assigned

Description

This feature will let ASLO to recognize version of current environment and add hints to prevent downloading incompatible activity versions.

The format of user-agent substring that ASLO can understand is:
"Sugar Labs/<major-version>.<minor-version>"

Currently jhconvert distros use this
http://git.sugarlabs.org/projects/jhconvert/repos/mainline/blobs/master/depends/hulahop.rb#line14

Attachments (1)

sugar-1066.patch (7.8 KB) - added by alsroot 12 years ago.

Download all attachments as: .zip

Change History (12)

comment:1 Changed 12 years ago by alsroot

  • Owner changed from marcopg to erikos
  • Status changed from new to assigned

Changed 12 years ago by alsroot

comment:2 Changed 12 years ago by alsroot

  • Keywords r? added

comment:3 Changed 12 years ago by erikos

  • Bug Status changed from Unconfirmed to Assigned

Thanks for the patch. We moved the vendor information to the package.

http://git.sugarlabs.org/projects/hulahop/repos/mainline/commits/992bd20d0d4077a3166eb82c25a5af828293610a

and from the Fedora rpm:

%prep
%setup -q

cat >> data/prefs.js << EOF
pref("general.useragent.vendor", "OLPC");
pref("general.useragent.vendorSub", "%{version}-%{release}");
pref("general.useragent.vendorComment", "XO");
EOF

I will think about how we can handle that best. The vendor OLPC is used by the olpc web services afaik.

comment:4 Changed 12 years ago by alsroot

at the end idea is having substring with format
<prefix>/<major-sugar-version>.<minor-sugar-version>

so it could be placed to general.useragent.vendorComment field
use vendors(liek OLPC) could use general.useragent.vendor

comment:5 follow-up: Changed 12 years ago by erikos

I think we can use the vendorSub field for that. At the moment we place the hulehop version there, and I doubt someone does check for that. I think for browser recognition (web apps behavior) the pref("general.useragent.extra.firefox", "Firefox/3.0") is important.

Actually, placing the vendor "OLPC" in the Fedora package does not sound as a good idea anymore - as the Fedora package is used in Soas, Fedora installs and from OLPC. I guess if OLPC needs that distinction, the prefs needs to be patched later. What do others think?

comment:6 in reply to: ↑ 5 Changed 12 years ago by tomeu

Replying to erikos:

I think we can use the vendorSub field for that. At the moment we place the hulehop version there, and I doubt someone does check for that. I think for browser recognition (web apps behavior) the pref("general.useragent.extra.firefox", "Firefox/3.0") is important.

Actually, placing the vendor "OLPC" in the Fedora package does not sound as a good idea anymore - as the Fedora package is used in Soas, Fedora installs and from OLPC. I guess if OLPC needs that distinction, the prefs needs to be patched later. What do others think?

What about using a gconf property? That way people can set the value either in the rpm or in the kickstart file, an update script, etc

comment:7 Changed 12 years ago by erikos

  • Keywords r! added; r? removed

Ok, the gconf property sounds good. Can the patch be rewritten taking this into account?

comment:8 Changed 12 years ago by erikos

  • Milestone changed from Unspecified by Release Team to 0.86

comment:9 Changed 12 years ago by erikos

Used the vendor comment for the sugar version "pref("general.useragent.vendorComment", "Sugar Labs/@SP_VERSION@");", after discussing with Aleksey.

comment:10 Changed 11 years ago by erikos

  • Resolution set to fixed
  • Status changed from assigned to closed

I think we have a good solution for now.

comment:11 Changed 8 years ago by dnarvaez

  • Milestone 0.86 deleted

Milestone 0.86 deleted

Note: See TracTickets for help on using tickets.