whonix-setup-wizard, more generic state file mechanism for status files

Information

ID: 155
PHID: PHID-TASK-tzqbaoqwiqfbuqswjma2
Author: Patrick
Status at Migration Time: resolved
Priority at Migration Time: Normal

Description

We have

  • /home/user/.gateway/first_use_check.done
  • /var/lib/whonix/do_once/whonixsetup.done as whonix-repository-wizard done file
  • We also need one for locale_settings_finish?

I am prosing a more generic approach. Here is an example:

  • /var/lib/whonix-setup-wizard/status-files/disclaimer.skip

  • /var/lib/whonix-setup-wizard/status-files/disclaimer.done

  • /var/cache/whonix-setup-wizard/status-files/disclaimer.skip

  • /var/cache/whonix-setup-wizard/status-files/disclaimer.done


/var/lib/whonix-setup-wizard:

Users, custom builders and derivative distributions (Whonix Qubes can be considered a derivative of Whonix) can use that one. whonix-setup-wizard never touches folder for writing. Also not during apt-get purge. Only for reading.

Whonix Qubes does not need/want the disclaimer, so their qubes-whonix package could ship a /var/lib/whonix-setup-wizard/status-files/disclaimer.skip file.


/var/cache/whonix-setup-wizard/status-files:

Used by whonix-setup-wizard for status files. Once the user accepted the disclaimer, a file /var/lib/whonix-setup-wizard/status-files/disclaimer.done could be created. And on next run, we can skip the disclaimer wizard page. The /var/cache/whonix-setup-wizard/status-files folder would not be deleted on apt-get remove, but it would be removed on apt-get purge.


We could also stick to the current convention whonix/do_once, since it’s a Whonix specific application.


Having this mechanism, we could have a python function, that abstracts checking these two folders for existing status files. So we can run that function and say “if function says, state file exists, skip it, otherwise continue”.


The apt-get remove vs purge distinction can very easily be implemented by me in debian/ maintainer scripts.


What do you think?

Comments


troubadour

2015-02-10 22:00:31 UTC


Patrick

2015-02-11 01:30:23 UTC


troubadour

2015-02-11 19:51:21 UTC


troubadour

2015-02-11 20:16:51 UTC


Patrick

2015-02-11 21:31:09 UTC


troubadour

2015-02-11 21:46:51 UTC


Patrick

2015-02-11 22:02:48 UTC


troubadour

2015-02-11 22:10:05 UTC


Patrick

2015-02-11 22:41:16 UTC


troubadour

2015-02-12 20:39:35 UTC


nrgaway

2015-02-12 21:35:22 UTC


Patrick

2015-02-12 21:42:38 UTC


Patrick

2015-02-12 22:00:47 UTC


Patrick

2015-02-12 22:06:39 UTC


troubadour

2015-02-13 20:21:16 UTC


Patrick

2015-02-14 03:18:37 UTC


troubadour

2015-02-15 21:06:30 UTC


Patrick

2015-02-16 07:41:57 UTC


troubadour

2015-02-16 20:23:18 UTC


Patrick

2015-02-16 21:17:49 UTC


Patrick

2015-03-09 20:09:23 UTC


Patrick

2015-03-09 20:15:22 UTC


Patrick

2015-03-09 20:20:53 UTC


Patrick

2015-03-09 20:30:39 UTC


Patrick

2015-03-10 09:20:21 UTC


Patrick

2015-03-10 09:27:00 UTC


Patrick

2015-03-10 09:42:06 UTC


Patrick

2015-03-10 09:43:32 UTC


Patrick

2015-03-10 09:45:40 UTC


Patrick

2015-03-10 10:25:24 UTC


Patrick

2015-03-10 12:03:22 UTC


troubadour

2015-03-11 20:30:15 UTC