Feature #9380
Create a tails-installer-launcher
100%
Description
create a tails-installer-launcher that only proposes these two options:
* add support for “install from ISO”
* make sure “upgrade from ISO” works outside of Tails
Subtasks
History
#1 Updated by Anonymous 2015-05-12 10:16:04
- Assignee deleted (
None)
#2 Updated by Anonymous 2015-06-11 11:26:54
I think I managed to implement this in liveusb/launcher.py
, but I am unsure about the file structure. Should I simple create a new file / executable in the upstream code? What’s the cleanest way to do this?
We want to keep the old launcher, is that correct?
Thanks for your input.
#3 Updated by Anonymous 2015-06-11 11:27:20
- Status changed from Confirmed to In Progress
- QA Check set to Info Needed
#4 Updated by intrigeri 2015-06-11 11:51:52
- QA Check changed from Info Needed to Dev Needed
> I think I managed to implement this in liveusb/launcher.py
,
Yay! :)
> Should I simple create a new file / executable in the upstream code?
Yes.
> What’s the cleanest way to do this?
I would git grep liveusb-creator-launcher
and do the same for the new, additional launcher.
> We want to keep the old launcher, is that correct?
Yes, because Tails still needs the clone options.
#5 Updated by Anonymous 2015-06-17 08:15:38
- % Done changed from 0 to 20
- QA Check changed from Dev Needed to Info Needed
- Feature Branch set to u451f:liveusb-creator/feature/jessie_tails_launcher
I’ve managed to create the new GUI and to run the tails-installer-launcher.
What still needs to be done is:
in init.py add one line if we are not on Tails:
from liveusb.tails_launcher_ui import Ui_Dialog as LiveUSBLauncherInterface
in launcher.py => deactivate the slots we do not need if we are not on Tails
I thought that it’s not necessary to create new files. Instead, i wanted to add an if condition for those two, to check if we are running on Tails or not.
I don’t know if there is a good way to do that? I’ve found that for example in onionshare, Micah checks if we are on Linux and if the username is amnesia. What do you think?
#6 Updated by Anonymous 2015-06-17 08:17:40
- Feature Branch changed from u451f:liveusb-creator/feature/jessie_tails_launcher to u451f:liveusb-creator/feature/jessie_tails_launcher_poc
The poc can be seen here u451f:liveusb-creator/feature/jessie_tails_launcher
u451f:liveusb-creator/feature/jessie_tails_launcher_poc is actually the branch which does not have the poc.. that’s a small mistake of mine.
#7 Updated by intrigeri 2015-06-18 02:46:05
- QA Check deleted (
Info Needed)
(Requested info was provided over private email.)
#8 Updated by Anonymous 2015-06-20 07:31:01
- Feature Branch changed from u451f:liveusb-creator/feature/jessie_tails_launcher_poc to u451f:liveusb-creator/feature/jessie_launcher
#9 Updated by Anonymous 2015-06-22 02:12:44
- Assignee set to intrigeri
- % Done changed from 20 to 50
- QA Check set to Ready for QA
#10 Updated by intrigeri 2015-06-22 11:00:53
- Assignee deleted (
intrigeri) - QA Check changed from Ready for QA to Dev Needed
Looks good!
- The history seems to have the same problems as the branch for adding “Install from ISO”, no? By the way, it seems to make sense to work on these two tickets on the same branch, given how strongly tight together they are.
- Thanks for the atomic commits!
- I think that
is_tails
is not very clear a function name: e.g. one might believe that it’s about checking if a given ISO is a Tails one, or something. How aboutrunning_in_Tails
? - Why is commit b288973 removing
from liveusb import _
? - I think that the algorithm in
for line in file_to_read
is wrong: it seems that it will return False unless the line we’re searching for is the first one in that file, which is not your intention I think. Thereturn False
should probably be moved to the end of the function, and theelse
block can then be dropped. Please make sure you test this function withVendor: Tails
both on the first line, and elsewhere in the file. - Does the dpkg origins format support multiple spaces between
Vendor:
andTails
? If yes, then we should use a regexp that supports it too. if search_vendor in line
feels overly broad; e.g. it would match a line that containsWhateverVendor: TailsBla
, no? If so, please make the regexp stricter. IIRC I’ve provided a much stricter regexp when you asked for info over email.- commit d7829b68 seems to do more than what it says (and should); please use
git add -p
in the future to avoid mixing unrelated changes in a single commit. Thanks! :) - Was this code tested on current Debian sid, or only on Jessie?
I’ve not tested the code yet. Once the above-mentioned problems are fixed, I guess I’ll import the diff as a quilt patch into some temporary debian_*
branch, build, and test both on Jessie and sid.
#11 Updated by Anonymous 2015-06-23 10:00:54
- Feature Branch changed from u451f:liveusb-creator/feature/jessie_launcher to u451f:liveusb-creator/feature/jessie_launcher_1
intrigeri wrote:
> Looks good!
>
> * The history seems to have the same problems as the branch for adding “Install from ISO”, no? By the way, it seems to make sense to work on these two tickets on the same branch, given how strongly tight together they are.
yes, that was a mistake again. See updated feature branch.
> * Thanks for the atomic commits!
\o/
> * I think that is_tails
is not very clear a function name: e.g. one might believe that it’s about checking if a given ISO is a Tails one, or something. How about running_in_Tails
?
ack
> * I think that the algorithm in for line in file_to_read
is wrong: it seems that it will return False unless the line we’re searching for is the first one in that file, which is not your intention I think. The return False
should probably be moved to the end of the function, and the else
block can then be dropped. Please make sure you test this function with Vendor: Tails
both on the first line, and elsewhere in the file.
ack
> * Does the dpkg origins format support multiple spaces between Vendor:
and Tails
? If yes, then we should use a regexp that supports it too.
it does. And i’ve changed the regexp.
> * if search_vendor in line
feels overly broad; e.g. it would match a line that contains WhateverVendor: TailsBla
, no? If so, please make the regexp stricter. IIRC I’ve provided a much stricter regexp when you asked for info over email.
ack
> * commit d7829b68 seems to do more than what it says (and should); please use git add -p
in the future to avoid mixing unrelated changes in a single commit. Thanks! :)
ack
> * Why is commit b288973 removing from liveusb import _
?
That was a mistake, I am unsure how to resolve it though. There seems to be some sort of circular importing issue since I added the import to init.py
The weird thing though is that it works :) I’ll send an email about it.
> * Was this code tested on current Debian sid, or only on Jessie?
Only on Jessie.
> I’ve not tested the code yet. Once the above-mentioned problems are fixed, I guess I’ll import the diff as a quilt patch into some temporary debian_*
branch, build, and test both on Jessie and sid.
ack.
#12 Updated by Anonymous 2015-06-28 10:03:08
- Target version changed from Tails_1.4.1 to Tails_1.5
#13 Updated by intrigeri 2015-06-28 12:53:20
>> * Was this code tested on current Debian sid, or only on Jessie?
> Only on Jessie.
Then please do test on sid as well, since that’s where we’re going to upload the package :)
Wrt. other changes: great, I’ll take a look ASAP (most likely after 1.4.1 is out, though).
#14 Updated by Anonymous 2015-07-03 06:55:01
- Assignee set to intrigeri
- QA Check changed from Dev Needed to Ready for QA
- Feature Branch changed from u451f:liveusb-creator/feature/jessie_launcher_1 to u451f:liveusb-creator/feature/jessie_launcher_2
I’ve created a new branch based on feature/jessie again.
#15 Updated by intrigeri 2015-07-04 03:11:04
- Assignee deleted (
intrigeri) - % Done changed from 50 to 60
- QA Check changed from Ready for QA to Dev Needed
- I see
include liveusb/tails_launcher.py
is added toMANIFEST.in
, but I see no such file around. OTOHliveusb/tails_launcher_ui.py
wasn’t added toMANIFEST.in
. Anything wrong? - If I understand correctly,
liveusb.launcher_ui
andliveusb-creator-launcher.ui
are used from within Tails, whileliveusb.tails_launcher_ui
andtails-installer-launcher.ui
are used elsewhere, right? I find this naming a little bit confusing. OTOH the plan is to soon merge both and dynamically modify the GUI at runtime, right? If that’s correct, then you can ignore this remark for now :) - Shouldn’t
liveusb/tails_launcher_ui.py
be added topo/POTFILES.in
, so that its strings can be translated? - Any particular reason why the dialog in
tails-installer-launcher.ui
has a different width than the one inliveusb-creator-launcher.ui
? - This branch introduces tab indentation in
liveusb/config.py
. Please make it consistent with the existing code in there :) - Why is
liveusb/dialog.py
modified, while the correspondingdata/liveusb-creator.ui
was not? I suggest reverting this change if it’s not needed. Same forliveusb/launcher_ui.py
andliveusb/resources_rc.py
. - I suggest s/from our website/from the Tails website/
- On my sid system, the text in the right column of the launcher doesn’t fit in the corresponding widgets.
#16 Updated by Anonymous 2015-07-04 04:27:34
intrigeri wrote:
> * I see include liveusb/tails_launcher.py
is added to MANIFEST.in
, but I see no such file around. OTOH liveusb/tails_launcher_ui.py
wasn’t added to MANIFEST.in
. Anything wrong?
correct. thanks.
> * If I understand correctly, liveusb.launcher_ui
and liveusb-creator-launcher.ui
are used from within Tails, while liveusb.tails_launcher_ui
and tails-installer-launcher.ui
are used elsewhere, right? I find this naming a little bit confusing. OTOH the plan is to soon merge both and dynamically modify the GUI at runtime, right? If that’s correct, then you can ignore this remark for now :)
Either I’ll do that during the renaming or after the port to GTK3, yes.
> * Shouldn’t liveusb/tails_launcher_ui.py
be added to po/POTFILES.in
, so that its strings can be translated?
ok.
> * This branch introduces tab indentation in liveusb/config.py
. Please make it consistent with the existing code in there :)
ok
> * Why is liveusb/dialog.py
modified, while the corresponding data/liveusb-creator.ui
was not? I suggest reverting this change if it’s not needed. Same for liveusb/launcher_ui.py
and liveusb/resources_rc.py
.
That’s because make gui
updates the files’ timestamps.
Reverted and ran make gui
only on tails_launcher_ui.py
> * Any particular reason why the dialog in tails-installer-launcher.ui
has a different width than the one in liveusb-creator-launcher.ui
?
No particular reason. The new wording on my branch jessie_wording introduced another width for liveusb-creator-launcher.ui
too, as the new explanations are much longer. I’ll try to adapt them so they have the same size.
> * I suggest s/from our website/from the Tails website/
ok.
> * On my sid system, the text in the right column of the launcher doesn’t fit in the corresponding widgets.
keeping this for later.
i updated the branch.
#17 Updated by Anonymous 2015-07-04 05:57:51
- Assignee set to intrigeri
- QA Check changed from Dev Needed to Ready for QA
#18 Updated by intrigeri 2015-07-04 08:21:07
- Status changed from In Progress to Resolved
- Assignee deleted (
intrigeri) - % Done changed from 60 to 100
- QA Check changed from Ready for QA to Pass
Everything seems fine except what follows. Merged into feature/jessie.
u wrote:
> intrigeri wrote:
> > * Why is liveusb/dialog.py
modified, while the corresponding data/liveusb-creator.ui
was not? I suggest reverting this change if it’s not needed. Same for liveusb/launcher_ui.py
and liveusb/resources_rc.py
.
>
> That’s because make gui
updates the files’ timestamps.
>
> Reverted and ran make gui
only on tails_launcher_ui.py
Well, no, some of these files still have useless changes. Fixed in commit fc98c91.