Project

General

Profile

Feature #15332

tails-documentation should prefer online docs

Added by anonym over 1 year ago. Updated over 1 year ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Start date:
02/20/2018
Due date:
% Done:

100%

Feature Branch:
feature/15332-prefer-online-docs
Type of work:
Code
Blueprint:
Starter:
Affected tool:

Description

I.e. what sajolida requested in #14962#note-15: "How crazy would it be to open the doc online if Tor is ready and in the help browser if Tor is not ready?"


Related issues

Related to Tails - Bug #15371: Tails documentation is not translated when browsing online Resolved 03/02/2018

Associated revisions

Revision 8941132b (diff)
Added by anonym over 1 year ago

tails-documentation: prefer online resources.

I.e. if Tor is working, open the requested page of our website in Tor
Browser, to show the most up-to-date information.

Will-fix: #15332

Revision db070816 (diff)
Added by anonym over 1 year ago

Test suite: test that Tor Browser opens docs when online.

Refs: #15332

Revision d3290f21
Added by bertagaz over 1 year ago

Merge remote-tracking branch 'origin/feature/15332-prefer-online-docs' into devel

Fix-committed: #15332

Revision 27249415 (diff)
Added by intrigeri over 1 year ago

tails-documentation: use documented syntax for os.execv (refs: #15332).

Passing the command to be run is not enforced according to the doc,
but still: let's use the documented form.

Revision 1d21bc73
Added by anonym over 1 year ago

Merge branch 'feature/15332-prefer-online-docs' into stable

Fix-committed: #15332, #15371

History

#1 Updated by anonym over 1 year ago

  • % Done changed from 0 to 50
  • QA Check set to Ready for QA
  • Feature Branch set to feature/15332-prefer-online-docs

Let's see what Jenkins thinks...

#2 Updated by anonym over 1 year ago

  • Status changed from Confirmed to In Progress

#3 Updated by anonym over 1 year ago

  • Assignee changed from anonym to bertagaz

Jenkins' results does not look good, but the old tests on devel looks equally poor (see runs 1203-1205) so I don't think the merge should be blocked.

#4 Updated by bertagaz over 1 year ago

  • Status changed from In Progress to Fix committed
  • Assignee deleted (bertagaz)
  • % Done changed from 50 to 100
  • QA Check changed from Ready for QA to Pass

anonym wrote:

Jenkins' results does not look good, but the old tests on devel looks equally poor (see runs 1203-1205) so I don't think the merge should be blocked.

Yeah, works manually and when I run the test locally. This change is not so crazy, so I've merged it into devel for 3.6, congrats.

#5 Updated by intrigeri over 1 year ago

  • Status changed from Fix committed to In Progress
  • Assignee set to anonym
  • % Done changed from 100 to 90
  • QA Check changed from Pass to Info Needed

I'm surprised this works:

    os.execv('/usr/local/bin/tor-browser',
             ['--new-tab', 'https://tails.boum.org/' + page])

… as the first element of the list passed as the 2nd argument should be the command to be run. The doc says this is not enforced but I wonder if we're just lucky that it works, given on my sid system:

$ python3 -c "import os ; os.execv('/bin/touch', ['/tmp/without'])" ; ls /tmp/without
/tmp/without: missing file operand
Try '/tmp/without --help' for more information.
zsh: exit 1     python3 -c "import os ; os.execv('/bin/touch', ['/tmp/without'])" 
ls: cannot access '/tmp/without': No such file or directory
$ python3 -c "import os ; os.execv('/bin/touch', ['/bin/touch', '/tmp/with'])" && ls /tmp/with
/tmp/with

So I think it would be safer to apply this patch:

--- a/config/chroot_local-includes/usr/local/bin/tails-documentation
+++ b/config/chroot_local-includes/usr/local/bin/tails-documentation
@@ -91,7 +91,8 @@ except IndexError:
 # up-to-date option.
 if os.system('/usr/local/sbin/tor-has-bootstrapped') == 0:
     os.execv('/usr/local/bin/tor-browser',
-             ['--new-tab', 'https://tails.boum.org/' + page])
+             ['/usr/local/bin/tor-browser', '--new-tab',
+              'https://tails.boum.org/' + page])

 wiki_path = '/usr/share/doc/tails/website'
 lang_code = os.getenv('LANG', 'en')[0:2]

What do you think?

#6 Updated by bertagaz over 1 year ago

  • Related to Bug #15371: Tails documentation is not translated when browsing online added

#7 Updated by bertagaz over 1 year ago

  • Target version changed from Tails_3.6 to Tails_3.7

#8 Updated by intrigeri over 1 year ago

  • Assignee changed from anonym to intrigeri

#9 Updated by intrigeri over 1 year ago

  • QA Check changed from Info Needed to Ready for QA

#10 Updated by intrigeri over 1 year ago

  • Assignee changed from intrigeri to anonym

#11 Updated by intrigeri over 1 year ago

  • Target version changed from Tails_3.7 to Tails_3.6.2

#12 Updated by anonym over 1 year ago

  • Status changed from In Progress to Fix committed
  • Assignee deleted (anonym)
  • % Done changed from 90 to 100
  • QA Check changed from Ready for QA to Pass

#13 Updated by anonym over 1 year ago

  • Status changed from Fix committed to Resolved

Also available in: Atom PDF