[HOME] [DOWNLOAD] [DOCS] [BLOG] [SUPPORT] [TIPS] [ISSUES] [Priority Support]

[graphical gui] Whonix Setup Wizard / Anon Connection Wizard - Technical Discussion


#41

Done.

Will have to add some description (docstring). Later…


#42

A small typo, big in consequences.


#43

python-guimessages: Tested packaging some more. Purging the package works. All files are removed. (Both folders, /usr/share/pyshared/guimessages and /usr/share/pyshared/guimessages are removed.)

When installing the package, somehow

ends up in

Not bad per se.

whonix-setup-wizard (purged and reinstalled) still works fine.

But we have to keep in mind that the installed package files location derivatives from a simple “sudo make install”.

Debhelper is adding some update-python-modules “magic” to the maintainer scripts.

.pyc files end up in

Probably all fine and the standard behavior.

[hr]

May or may not be related. Happened after I purged and reinstalled python-guimessages. (Without using “sudo make install” again.)

kdesudo whonix-setup-wizard 
Traceback (most recent call last):
  File "/usr/bin/whonix-setup-wizard", line 4, in <module>
    whonix_setup_wizard.main()
  File "/usr/lib/pymodules/python2.7/whonix_setup_wizard/whonix_setup_wizard.py", line 277, in main
    wizard = whonix_setup_wizard()
  File "/usr/lib/pymodules/python2.7/whonix_setup_wizard/whonix_setup_wizard.py", line 163, in __init__
    self.setupUi()
  File "/usr/lib/pymodules/python2.7/whonix_setup_wizard/whonix_setup_wizard.py", line 167, in setupUi
    self.disclaimer_1.text.setText(self._('disclaimer1'))
  File "/usr/lib/pymodules/python2.7/guimessages/translations.py", line 34, in gettext
    return self.language.get(key, None)
AttributeError: _translations instance has no attribute 'language'

#44

[quote=“Patrick, post:43, topic:650”]May or may not be related. Happened after I purged and reinstalled python-guimessages. (Without using “sudo make install” again.)

kdesudo whonix-setup-wizard Traceback (most recent call last): File "/usr/bin/whonix-setup-wizard", line 4, in <module> whonix_setup_wizard.main() File "/usr/lib/pymodules/python2.7/whonix_setup_wizard/whonix_setup_wizard.py", line 277, in main wizard = whonix_setup_wizard() File "/usr/lib/pymodules/python2.7/whonix_setup_wizard/whonix_setup_wizard.py", line 163, in __init__ self.setupUi() File "/usr/lib/pymodules/python2.7/whonix_setup_wizard/whonix_setup_wizard.py", line 167, in setupUi self.disclaimer_1.text.setText(self._('disclaimer1')) File "/usr/lib/pymodules/python2.7/guimessages/translations.py", line 34, in gettext return self.language.get(key, None) AttributeError: _translations instance has no attribute 'language' [/quote]
Different experience here, and it is quite confusing

I install the packages in this order:

  • python-guimessages
  • whonix-repository-wizard
  • whonix-setup-wizard
    with
make deb-icup
sudo make install

The wizards are working.
After purging python-guimessages, it looks like whonix-setup-wizard and whonix-repository-wizard are purged too.

$ dpkg -l whonix-setup-wizard
dpkg-query: no packages found matching whonix-setup-wizard
$ dpkg -l whonix-repository-wizard
dpkg-query: no packages found matching whonix-repository-wizard

Reinstalling the three packages with make deb-icup (no sudo make install) works.


#45

To be able to install the packages (make deb-pkg or following commands), I had to install ruby-ronn. (command ronn not found). I thought it was installed with config-package-dev.


#46

[quote=“troubadour, post:44, topic:650”]I install the packages in this order:

  • python-guimessages
  • whonix-repository-wizard
  • whonix-setup-wizard[/quote]
    Correct.
with [code] make deb-icup sudo make install [/code]
"sudo make install" should not be used for that package. (Causes confusion - see below.) "make deb-icup" alone has to do. (Which means build, install the package and cleanup temp files.)
Reinstalling the three packages with make deb-icup (no sudo make install) works.
Because the "sudo make install" from previous time is still in effect. You need to run "sudo make uninstall" to clean that up before hand. Perhaps manually making sure all old files are removed. (The case when files have been renamed/moved in meanwhile.)

Please create the package with “make deb-pkg”. Then open the the .deb file (in parent folder) and look around. During packaging, debhelper rearranges the installation paths. That’s where the confusion is coming from, I think.

No, those two packages do not depend on each other. I fixed the missing build dependencies in git.


#47

Pushed a big commit. https://github.com/troubadoour/whonix-setup-wizard/commit/5fac5ddba95d14f0424224c6add4c90eec3d09f4.

There is no detailed description of the work, it is the first step in the Gateway setup wizard. For my own peace of mind, I have to commit, purge the package and and reinstall it once in a while. So far, so good (here).

Can you review and comment? All suggestions are welcome, of course.


#48

Getting an error.

kdesudo whonix-setup-wizard 
Traceback (most recent call last):
  File "/usr/bin/whonix-setup-wizard", line 4, in <module>
    whonix_setup_wizard.main()
  File "/usr/lib/pymodules/python2.7/whonix_setup_wizard/whonix_setup_wizard.py", line 277, in main
    self.whonix_repo_page = whonix_repository_page()
  File "/usr/lib/pymodules/python2.7/whonix_setup_wizard/whonix_setup_wizard.py", line 163, in __init__
    def __init__(self):
  File "/usr/lib/pymodules/python2.7/whonix_setup_wizard/whonix_setup_wizard.py", line 167, in setupUi
    self.steps = self.common.wizard_steps
  File "/usr/lib/pymodules/python2.7/guimessages/translations.py", line 34, in gettext
    return self.language.get(key, None)
AttributeError: _translations instance has no attribute 'language'

#49

[quote=“Patrick, post:48, topic:650”]Getting an error.

kdesudo whonix-setup-wizard Traceback (most recent call last): File "/usr/bin/whonix-setup-wizard", line 4, in <module> whonix_setup_wizard.main() File "/usr/lib/pymodules/python2.7/whonix_setup_wizard/whonix_setup_wizard.py", line 277, in main self.whonix_repo_page = whonix_repository_page() File "/usr/lib/pymodules/python2.7/whonix_setup_wizard/whonix_setup_wizard.py", line 163, in __init__ def __init__(self): File "/usr/lib/pymodules/python2.7/whonix_setup_wizard/whonix_setup_wizard.py", line 167, in setupUi self.steps = self.common.wizard_steps File "/usr/lib/pymodules/python2.7/guimessages/translations.py", line 34, in gettext return self.language.get(key, None) AttributeError: _translations instance has no attribute 'language' [/quote]
“make deb-install” installs the packages in /usr/lib/pymodules/python2.7. In the wizards, the path to the translations files is hard coded to /usr/lib/python2.7/dist-packages/[wizard_name].

First, I have added a [check_which_path_is_valid] option, but a new problem arose: whonix_repository_wizard was expecting guimessages from import in /usr/lib/python2.7/dist-packages/ too. No idea why, so I have packaged everything with python-stdeb (in setup.py).

The packages install as expected in /usr/lib/python2.7/dist-packages (actually the .py files are symlinks to the real files in /usr/share/pyshared. Do not know why yet). The .yaml files are in /usr/share/translations because it does not look quite a standard practice to install data files in the python modules directories.

The original repositories are deleted. The new ones have the same name.



Yuo can read BUILD.md for installation. The packaging was inspired by torbrowser-launcher.


#50

Quite drastic changes. But well, maybe that method will be a more standard conform and simpler way. Still reviewing.

Unfortunately, the build results aren’t deterministic.

The [font=courier] ./deb_dist[/font] is non-ideal, because the build script expects all packages within the parent [font=courier]…/[/font] folder. A solution can be found for that. Allegedly setup.py supports --dist-dir. (https://stackoverflow.com/questions/13643167/change-default-dist-folder-with-setuptools) Any idea why this won’t work?

Is Debian wheezy’s setup.py just too old?

As a fall back, the generic makefile could move the files from [font=courier] ./deb_dist[/font] to [font=courier]…/[/font]. Not that a big deal either.

I would like to make the generic makefile fit to cope up with the python packaging method, so stuff like “make deb-(icup|cleanup|purge)” and so forth works again. (Also the build script relies on that at the moment.) Shouldn’t be hard having the generic makefile do execute some file ([font=courier]build_deb.sh[/font]) that does the packaging instead of packaging it using debhelper or moving some files around. Got some work on the makefile to do anyhow.


#51

Unfortunately, I do not fully grasp the concept of deterministic builds (I do not understand (yet) how it is done in Whonix packaging).

The [font=courier] ./deb_dist[/font] is non-ideal, because the build script expects all packages within the parent [font=courier]../[/font] folder. A solution can be found for that. Allegedly setup.py supports --dist-dir. (https://stackoverflow.com/questions/13643167/change-default-dist-folder-with-setuptools) Any idea why this won't work? [code]python setup.py --command-packages=stdeb.command debianize[/code]

Is Debian wheezy’s setup.py just too old?


I could not get “–dist-dir=” working, neither with python-stdeb 0.6 (wheezy), nor with 0.8 (jessie). From version 0.7, there is a new command [install_deb] that build and install the package. deb cleaning could be a simple “rm -r deb_dist”.
As a fall back, the generic makefile could move the files from [font=courier] ./deb_dist[/font] to [font=courier]../[/font]. Not that a big deal either.
For info, might be interesting. In When you run [code]python setup.py --command-packages=stdeb.command debianize[/code] it only creates a debian folder along setup.py, with source, changelog, compat, control and rules (python_distutils).

#52

[quote=“troubadour, post:51, topic:650”][quote author=Patrick link=topic=705.msg5834#msg5834 date=1417474712]
Unfortunately, the build results aren’t deterministic.[/quote]
Unfortunately, I do not fully grasp the concept of deterministic builds (I do not understand (yet) how it is done in Whonix packaging).[/quote]
Deterministic means, the packages have the same sha512hash when building them again.

How? It’s a trick I read here a while ago https://wiki.debian.org/ReproducibleBuilds.

In [font=courier]make-helper.bsh[/font] using [font=courier]debuild[/font] with -[font=courier]-rootcmd="$PWD/debian/gain-root-command"[/font] that uses [font=courier]debian/gain-root-command[/font] that uses [font=courier]faketime[/font]. Used by other packages such as anon-base-files etc.

So maybe if we can sneak that in again it may or may not make the package deterministic.


#53

Finished reviewing whonix-setup-wizard. Looks good so far!

[hr]

Can you please check, that whonix-setup-wizard won’t break if whonix-repository-wizard isn’t installed? If it’s not installed, it shouldn’t ask/attempt to start it.

[hr]

There are a few lintian warnings.

W: whonix-setup-wizard: new-package-should-close-itp-bug
E: whonix-setup-wizard: no-copyright-file
E: whonix-setup-wizard: extended-description-is-empty
W: whonix-setup-wizard: binary-without-manpage usr/bin/whonix-setup-wizard

Would be fixed upon next changelog entry.

E: whonix-setup-wizard: no-copyright-file
E: whonix-setup-wizard: extended-description-is-empty

These two are probably not that hard to fix.

That one, if we abstain from automatic man file (roff format) creation from ruby ronn markup using ruby-ronn, should be also easy to fix.

Or we could just ignore them to safe time. Although automated lintian checks are useful. It sometimes reports important stuff.

[hr]

Could you make it so, that the disclaimer text does not need to be scrolled? Either a wider window or splitting it into three screens?

Can you consider please implementing https://github.com/Whonix/Whonix/issues/15 as well? Forget about Tails greeter. See that ticket as just a reminder to some day implement a keyboard layout and language selector. Would fit well into whonix-setup-wizard? Might require some prerequisite research. (What commands to run to make it happen / what config file to change how / what languages are supported [by Debian].)


#54

Finished reviewing whonix-repository-wizard. Works as good as before. (Saw no changes since last time, just the packaging apparently works now.) Removed the pyc files.

Minor commits on top of all 3 packages. Please try to merge them. I did a normal merge after your forced commit and deleted the same files that you deleted. I guess you should be able to do a normal merge. Otherwise please try a clone. (And by the way, for verification purposes… Meld [and other] diff viewer support diffing whole folders. To make sure no mitm sneaked something in on re-clone and comparison with own folder.)


#55

I have pushed two commits in python-guimessages (the second one is a mistake correction). Could you merge them before I make Whonix my origin? No hurry, still have a bit of work before pushing some good progress.


#56

Merged. Pushed some very minor stuff myself. Currently looking how to integrate with the generic makefile. The debianze command from above could help.


#57

Updated the generic packaging files in all packages. Please merge them next time before you modify a package.

In python packages, we cannot use a default [font=courier]Makefile[/font] because [font=courier]setup.py[/font] does not like that. So we need a little exception.

You can use the existing build command as well as the following.


#58

[quote=“Patrick, post:57, topic:650”]Updated the generic packaging files in all packages. Please merge them next time before you modify a package.

In python packages, we cannot use a default [font=courier]Makefile[/font] because [font=courier]setup.py[/font] does not like that. So we need a little exception.

You can use the existing build command as well as the following.

“make -f makefile_generic deb-icup” works great! This is white magic again :).

Added tor status (only enable-disable Tor networking) to whonix-setup-wizard.

Please review the logic, along with the text in the different help and error messages. Because I have concentrated on the logic, my literature is rather a template than a finished product.

From now, we will have to decide of the next steps for the remaining options (bridge, proxies and so on).


#59

Pushed 98f9860a, some improvements in the connection help.


#60

Looks good! Haven’t tested on an actual Whonix-Gateway yet. (Just faked “sudo mkdir /usr/share/anon-gw-base-files”.)

I don’t know about the Help button usability and unfortunately Jason is not available at the moment. Not a big deal. If it’s functional and robust, we could use that for Whonix 10 already. Would it be hard to make more like a info symbol one can hover over by mouse?

For bridges/proxies, I’d say let’s go for the textual features as in whonixsetup? Re-implementing tor-launcher with all the pluggable transports that are constantly released seems like a huge task. Not sure if you had that in mind. I think the “Tor, tor-launcher, pluggable transports from TBB package as system Tor on Whonix-Gateway” idea would lead to much better circumvention support that costs much less maintenance.