Move Update URL template from pref to application.ini
Categories
(Toolkit :: Application Update, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox76 | --- | fixed |
People
(Reporter: bytesized, Assigned: bytesized)
References
(Blocks 1 open bug)
Details
Attachments
(3 files)
There are a number of values that we need to generate the update URL. Since the update agent will need to generate the update URL, it should have some way of getting access to this information. By adding this information to the application.ini, we would easily be able to access this from outside of Firefox.
These are the values needed:
Assignee | ||
Comment 1•5 years ago
|
||
Glandium & Mossop-
I wanted to run these additions to application.ini by both of you. Does this sound ok? Should I be doing this a different way?
Thanks!
Comment 2•5 years ago
|
||
Do you intend to read application.ini? I'm not sure we should be doing something like this. application.ini is only there "by chance", as in, it wasn't removed because automation needed it, which it probably doesn't really anymore... so we may actually want to remove the file.
It's also worth noting that the update url template is a pref. Meaning it can be changed. And surely, the update service should be aware of that.
My gut feeling is that Firefox should write out a file for the service's consumption, rather than the service relying on a file shipped with Firefox.
Comment 3•5 years ago
•
|
||
It is only read from the default prefs so user prefs can't change it. Ideally it wouldn't be possible to modify it as a default pref as well. Writing it out from the application would allow any user process to write it out since it would have to be written to a user writable location which would allow user processes to break updating.
Assignee | ||
Comment 4•5 years ago
|
||
Yes, I intend on reading this data from application.ini.
As Robert already mentioned, we are ok with removing that pref, in part because changing the user value of the pref currently has no effect.
Also as Robert mentioned, we consider writing out a user-writable file specifying the update URL to be an unacceptable security issue. It is simply too easy to compromise.
It sounds like you do not think that this is an appropriate way of storing or accessing this data, is that accurate? I feel that I should note that we are also planning on reading data out of a similar file: distribution.ini. Do you know of any problem with that?
Comment 5•5 years ago
|
||
distribution.ini is not something we ship, but something downstreams might. It's meant to be there when it is. application.ini is a vestige.
The update service is not going to be built and shipped separately is it? So why not compile those values in?
Assignee | ||
Comment 6•5 years ago
|
||
The Background Update Agent will be built as a separate binary, but using our build system. However, it will be written in Rust, and I am still struggling to figure out an appropriate way to access these compile-time constants in Rust.
Robert had previously requested that the update.locale file's contents be moved to application.ini, and suggested that it could be a good place for the update URL template too. It seemed logical, therefore, to store the other values that we need in the same place.
But if you don't think that this is an appropriate place for some or all of that information, there are other options we can consider. I'm not sure how to access the URL template, but perhaps I could add it as a compile-time constant and access it in the same way that I would be accessing other the other constants.
Let me know what you think.
Assignee | ||
Comment 7•5 years ago
|
||
Whoops. Don't know how I managed to press that by accident...
Comment 8•5 years ago
|
||
OS_TARGET, ABI and MOZ_ASAN are already build time constants ; GRE_MILESTONE is technically in platform.ini, it's also equivalent to App.Version, so it's more or less in application.ini already. As for the URL template... considering how far we actually still are from getting rid of application.ini... ¯_(ツ)_/¯. I guess it kind of makes sense in application.ini for the same reason the crash reporter submit url is there, whatever the reason it's there is in the first place (which I think might be related to downstreams).
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Updated•5 years ago
|
Assignee | ||
Comment 9•5 years ago
|
||
This is being added to facilitate moving generation of the update URL to Rust (Bug 1567286). Once that has been completed, we should be able to remove the update URL from its current location in firefox.js so that it is not being duplicated in application.ini.
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 10•5 years ago
|
||
Depends on D43300
Assignee | ||
Comment 11•5 years ago
|
||
Depends on D45868
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Comment 12•5 years ago
|
||
Comment 13•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/4f2d89525c63
https://hg.mozilla.org/mozilla-central/rev/12efcfc5555a
https://hg.mozilla.org/mozilla-central/rev/cd6bf21b54db
Comment 14•5 years ago
|
||
After this change I get Missing values in application.ini: AppUpdate:url
This is on linux, doing an x86 build of geckoview. Not filing a new bug because I'm not sure what is special about my setup that makes this happen.
Comment 15•5 years ago
|
||
(In reply to Eitan Isaacson [:eeejay] from comment #14)
After this change I get
Missing values in application.ini: AppUpdate:url
This is on linux, doing an x86 build of geckoview. Not filing a new bug because I'm not sure what is special about my setup that makes this happen.
I get the same thing here.
Updated•5 years ago
|
Description
•