Bug 108563 - Remove global variable gArchiveReader in onlineupdater
Summary: Remove global variable gArchiveReader in onlineupdater
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Chris
URL:
Whiteboard: target:6.0.0
Keywords: difficultyBeginner, easyHack, skillCpp
Depends on:
Blocks:
 
Reported: 2017-06-16 11:17 UTC by Markus Mohrhard
Modified: 2017-06-27 18:38 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Mohrhard 2017-06-16 11:17:50 UTC
In the new onlineupdater code we have a global variable gArchiveReader in the file onlineupdate/source/update/updater/updater.cxx

We should replace that global variable with local variables and pass them around through parameters.
Comment 1 Markus Mohrhard 2017-06-16 11:18:57 UTC
You need to compile with the flag --enable-online-update=mar for this task.
Comment 2 Chris 2017-06-24 20:31:48 UTC
I want to work on this ticket but got stuck on building the software.
I did the autogen.sh with the following command (that worked fine so far):
./autogen.sh --enable-online-update=mar --with-update-config=/tmp/update.ini

But on additional "make" command the build stopped by complaining about the content of the "update.ini" file. Is there a something about the syntax of this file in the docs?
Comment 3 Markus Mohrhard 2017-06-25 08:57:25 UTC
(In reply to Chris from comment #2)
> I want to work on this ticket but got stuck on building the software.
> I did the autogen.sh with the following command (that worked fine so far):
> ./autogen.sh --enable-online-update=mar --with-update-config=/tmp/update.ini
> 
> But on additional "make" command the build stopped by complaining about the
> content of the "update.ini" file. Is there a something about the syntax of
> this file in the docs?

Hey Chris,

oh. I forgot that the file is now required.

The content of the file is a typical windows based ini file and for you the content needs to be at least. For path_to_a_simple_text_file you can use to any simple few character text file that contains a few characters. You don't need a valid certificate right now as you don't need to execute an update to test your code.

[Updater]
certificate-der=path_to_a_simple_text_file
Comment 4 Chris 2017-06-26 04:50:19 UTC
Moved the global variable to local one:
https://gerrit.libreoffice.org/#/c/39243/
Comment 5 Commit Notification 2017-06-26 13:25:51 UTC
Christian Barth committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=c806dab3c99a730430e02ea0d1ccecdb5d688423

tdf#108563 Transform global variable gArchiveReader to local variable

It will be available in 6.0.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Markus Mohrhard 2017-06-26 20:19:24 UTC
Chris, if you are interested in other easy hacks around the online updater please let me know.
Comment 7 Chris 2017-06-27 18:38:13 UTC
Sure Markus, if you have more work for the onlineupdater just tell. :)