From d8bf59b600b6a08eeb963d8ad0c28db3e3f78980 Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Mon, 5 Aug 2013 13:14:25 +0200 Subject: add imap service --- src/leap/services/mail/imap.py | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 src/leap/services/mail/imap.py diff --git a/src/leap/services/mail/imap.py b/src/leap/services/mail/imap.py new file mode 100644 index 00000000..65fbe3b5 --- /dev/null +++ b/src/leap/services/mail/imap.py @@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- +# imap.py +# Copyright (C) 2013 LEAP +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +""" +Initialization of imap service +""" +import logging +import sys + +from leap.mail.imap.service import imap +from twisted.python import log + +logger = logging.getLogger(__name__) + + +def start_imap_service(*args, **kwargs): + """ + Initializes and run imap service. + """ + logger.debug('Launching imap service') + + # XXX handle this in a more appropriate manner + log.startLogging(open('/tmp/leap-imap.log', 'w')) + log.startLogging(sys.stdout) + + imap.run_service(*args, **kwargs) -- cgit v1.2.3 From 9ede79b2d3a6172bcc5d458e70508b06d0033323 Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Mon, 5 Aug 2013 13:14:54 +0200 Subject: comment out common service initialization --- src/leap/app.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/leap/app.py b/src/leap/app.py index 6ba27813..774ae41f 100644 --- a/src/leap/app.py +++ b/src/leap/app.py @@ -210,8 +210,10 @@ def main(): if IS_MAC: window.raise_() - tx_app = leap_services() - assert(tx_app) + # This was a good idea, but for this to work as intended we + # should centralize the start of all services in there. + #tx_app = leap_services() + #assert(tx_app) # Run main loop twisted_main.start(app) -- cgit v1.2.3 From 485d3cf64e5102aeafcefed775b99f850cdf6686 Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Mon, 5 Aug 2013 13:15:55 +0200 Subject: catch errors during soledad initialization --- src/leap/services/soledad/soledadbootstrapper.py | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/leap/services/soledad/soledadbootstrapper.py b/src/leap/services/soledad/soledadbootstrapper.py index ac3243c1..d53aeadb 100644 --- a/src/leap/services/soledad/soledadbootstrapper.py +++ b/src/leap/services/soledad/soledadbootstrapper.py @@ -23,6 +23,7 @@ import logging import os from PySide import QtCore +from u1db import errors as u1db_errors from leap.common.check import leap_assert, leap_assert_type from leap.common.files import get_mtime @@ -103,15 +104,18 @@ class SoledadBootstrapper(AbstractBootstrapper): # TODO: If selected server fails, retry with another host # (issue #3309) - self._soledad = Soledad(uuid, - self._password.encode("utf-8"), - secrets_path=secrets_path, - local_db_path=local_db_path, - server_url=server_url, - cert_file=cert_file, - auth_token=srp_auth.get_token()) - - self._soledad.sync() + try: + self._soledad = Soledad( + uuid, + self._password.encode("utf-8"), + secrets_path=secrets_path, + local_db_path=local_db_path, + server_url=server_url, + cert_file=cert_file, + auth_token=srp_auth.get_token()) + self._soledad.sync() + except u1db_errors.Unauthorized: + logger.error("Error while initializing soledad.") else: raise Exception("No soledad server found") -- cgit v1.2.3 From 63d1e561c7d3705196216e11dd8bf267de8fb8ff Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Mon, 5 Aug 2013 13:29:03 +0200 Subject: reindent for clarity --- src/leap/gui/mainwindow.py | 89 ++++++++++++++++++++++++---------------------- 1 file changed, 46 insertions(+), 43 deletions(-) diff --git a/src/leap/gui/mainwindow.py b/src/leap/gui/mainwindow.py index 87dd4f5c..c938a064 100644 --- a/src/leap/gui/mainwindow.py +++ b/src/leap/gui/mainwindow.py @@ -942,29 +942,32 @@ class MainWindow(QtGui.QMainWindow): passed = data[self._soledad_bootstrapper.PASSED_KEY] if not passed: logger.error(data[self._soledad_bootstrapper.ERROR_KEY]) - else: - logger.debug("Done bootstrapping Soledad") + return - self._soledad = self._soledad_bootstrapper.soledad - self._keymanager = self._soledad_bootstrapper.keymanager + logger.debug("Done bootstrapping Soledad") - if self._provider_config.provides_mx() and \ - self._enabled_services.count(self.MX_SERVICE) > 0: - self._smtp_bootstrapper.run_smtp_setup_checks( - self._provider_config, - self._smtp_config, - True) + self._soledad = self._soledad_bootstrapper.soledad + self._keymanager = self._soledad_bootstrapper.keymanager + + if self._provider_config.provides_mx() and \ + self._enabled_services.count(self.MX_SERVICE) > 0: + self._smtp_bootstrapper.run_smtp_setup_checks( + self._provider_config, + self._smtp_config, + True) + else: + if self._enabled_services.count(self.MX_SERVICE) > 0: + pass # TODO: show MX status + #self._status_panel.set_eip_status( + # self.tr("%s does not support MX") % + # (self._provider_config.get_domain(),), + # error=True) else: - if self._enabled_services.count(self.MX_SERVICE) > 0: - pass # TODO: show MX status - #self._status_panel.set_eip_status( - # self.tr("%s does not support MX") % - # (self._provider_config.get_domain(),), - # error=True) - else: - pass # TODO: show MX status - #self._status_panel.set_eip_status( - # self.tr("MX is disabled")) + pass # TODO: show MX status + #self._status_panel.set_eip_status( + # self.tr("MX is disabled")) + + # Service control methods: eip def _smtp_bootstrapped_stage(self, data): """ @@ -982,29 +985,29 @@ class MainWindow(QtGui.QMainWindow): passed = data[self._smtp_bootstrapper.PASSED_KEY] if not passed: logger.error(data[self._smtp_bootstrapper.ERROR_KEY]) - else: - logger.debug("Done bootstrapping SMTP") - - hosts = self._smtp_config.get_hosts() - # TODO: handle more than one host and define how to choose - if len(hosts) > 0: - hostname = hosts.keys()[0] - logger.debug("Using hostname %s for SMTP" % (hostname,)) - host = hosts[hostname][self.IP_KEY].encode("utf-8") - port = hosts[hostname][self.PORT_KEY] - # TODO: pick local smtp port in a better way - # TODO: Make the encrypted_only configurable - - from leap.mail.smtp import setup_smtp_relay - client_cert = self._eip_config.get_client_cert_path( - self._provider_config) - setup_smtp_relay(port=1234, - keymanager=self._keymanager, - smtp_host=host, - smtp_port=port, - smtp_cert=client_cert, - smtp_key=client_cert, - encrypted_only=False) + return + logger.debug("Done bootstrapping SMTP") + + hosts = self._smtp_config.get_hosts() + # TODO: handle more than one host and define how to choose + if len(hosts) > 0: + hostname = hosts.keys()[0] + logger.debug("Using hostname %s for SMTP" % (hostname,)) + host = hosts[hostname][self.IP_KEY].encode("utf-8") + port = hosts[hostname][self.PORT_KEY] + # TODO: pick local smtp port in a better way + # TODO: Make the encrypted_only configurable + + from leap.mail.smtp import setup_smtp_relay + client_cert = self._eip_config.get_client_cert_path( + self._provider_config) + setup_smtp_relay(port=1234, + keymanager=self._keymanager, + smtp_host=host, + smtp_port=port, + smtp_cert=client_cert, + smtp_key=client_cert, + encrypted_only=False) def _get_socket_host(self): """ -- cgit v1.2.3 From f757e73a4d2fb05e90dba306c4d918f6aa7f1413 Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Mon, 5 Aug 2013 13:38:12 +0200 Subject: start imap service --- src/leap/gui/mainwindow.py | 61 +++++++++++++++++++++++++++++++++--------- src/leap/services/mail/imap.py | 4 ++- 2 files changed, 52 insertions(+), 13 deletions(-) diff --git a/src/leap/gui/mainwindow.py b/src/leap/gui/mainwindow.py index c938a064..07ad9b9a 100644 --- a/src/leap/gui/mainwindow.py +++ b/src/leap/gui/mainwindow.py @@ -45,6 +45,7 @@ from leap.services.eip.providerbootstrapper import ProviderBootstrapper # XXX: Soledad might not work out of the box in Windows, issue #2932 from leap.services.soledad.soledadbootstrapper import SoledadBootstrapper from leap.services.mail.smtpbootstrapper import SMTPBootstrapper +from leap.services.mail import imap from leap.platform_init import IS_WIN, IS_MAC from leap.platform_init.initializers import init_platform @@ -94,6 +95,7 @@ class MainWindow(QtGui.QMainWindow): # Signals new_updates = QtCore.Signal(object) raise_window = QtCore.Signal([]) + soledad_ready = QtCore.Signal([]) # We use this flag to detect abnormal terminations user_stopped_eip = False @@ -140,6 +142,9 @@ class MainWindow(QtGui.QMainWindow): self.ui.stackedWidget.widget(self.LOGIN_INDEX)) self.ui.loginLayout.addWidget(self._login_widget) + # Signals + # TODO separate logic from ui signals. + self._login_widget.login.connect(self._login) self._login_widget.cancel_login.connect(self._cancel_login) self._login_widget.show_wizard.connect( @@ -260,7 +265,9 @@ class MainWindow(QtGui.QMainWindow): self.ui.lblNewUpdates.setVisible(False) self.ui.btnMore.setVisible(False) self.ui.btnMore.clicked.connect(self._updates_details) + self.new_updates.connect(self._react_to_new_updates) + self.soledad_ready.connect(self._start_imap_service) init_platform() @@ -273,6 +280,7 @@ class MainWindow(QtGui.QMainWindow): self._soledad = None self._keymanager = None + self._imap_service = None self._login_defer = None self._download_provider_defer = None @@ -949,6 +957,15 @@ class MainWindow(QtGui.QMainWindow): self._soledad = self._soledad_bootstrapper.soledad self._keymanager = self._soledad_bootstrapper.keymanager + # Ok, now soledad is ready, so we can allow other things that + # depend on soledad to start. + + # this will trigger start_imap_service + self.soledad_ready.emit() + + # TODO connect all these activations to the soledad_ready + # signal so the logic is clearer to follow. + if self._provider_config.provides_mx() and \ self._enabled_services.count(self.MX_SERVICE) > 0: self._smtp_bootstrapper.run_smtp_setup_checks( @@ -967,7 +984,7 @@ class MainWindow(QtGui.QMainWindow): #self._status_panel.set_eip_status( # self.tr("MX is disabled")) - # Service control methods: eip + # Service control methods: smtp def _smtp_bootstrapped_stage(self, data): """ @@ -1009,6 +1026,19 @@ class MainWindow(QtGui.QMainWindow): smtp_key=client_cert, encrypted_only=False) + def _start_imap_service(self): + """ + SLOT + TRIGGERS: + soledad_ready + """ + logger.debug('Starting imap service') + logger.debug('DEBUG: NOT STARTING IT REALLY ----------------') + + #self._imap_service = imap.start_imap_service( + #self._soledad, + #self._keymanager) + def _get_socket_host(self): """ Returns the socket and port to be used for VPN @@ -1398,6 +1428,9 @@ class MainWindow(QtGui.QMainWindow): """ logger.debug('About to quit, doing cleanup...') + if self._imap_service is not None: + self._imap_service.stop() + if self._srp_auth is not None: if self._srp_auth.get_session_id() is not None or \ self._srp_auth.get_token() is not None: @@ -1410,16 +1443,28 @@ class MainWindow(QtGui.QMainWindow): else: logger.error("No instance of soledad was found.") - logger.debug('Cleaning pidfiles') - self._cleanup_pidfiles() - logger.debug('Terminating vpn') self._vpn.terminate(shutdown=True) + if self._login_defer: + logger.debug("Cancelling login defer.") + self._login_defer.cancel() + + if self._download_provider_defer: + logger.debug("Cancelling download provider defer.") + self._download_provider_defer.cancel() + + # TODO missing any more cancels? + + logger.debug('Cleaning pidfiles') + self._cleanup_pidfiles() + def quit(self): """ Cleanup and tidely close the main window before quitting. """ + # TODO: separate the shutting down of services from the + # UI stuff. self._cleanup_and_quit() self._really_quit = True @@ -1430,14 +1475,6 @@ class MainWindow(QtGui.QMainWindow): if self._logger_window: self._logger_window.close() - if self._login_defer: - logger.debug("Cancelling login defer.") - self._login_defer.cancel() - - if self._download_provider_defer: - logger.debug("Cancelling download provider defer.") - self._download_provider_defer.cancel() - self.close() if self._quit_callback: diff --git a/src/leap/services/mail/imap.py b/src/leap/services/mail/imap.py index 65fbe3b5..5fdc7492 100644 --- a/src/leap/services/mail/imap.py +++ b/src/leap/services/mail/imap.py @@ -29,6 +29,8 @@ logger = logging.getLogger(__name__) def start_imap_service(*args, **kwargs): """ Initializes and run imap service. + + :returns: twisted.internet.task.LoopingCall instance """ logger.debug('Launching imap service') @@ -36,4 +38,4 @@ def start_imap_service(*args, **kwargs): log.startLogging(open('/tmp/leap-imap.log', 'w')) log.startLogging(sys.stdout) - imap.run_service(*args, **kwargs) + return imap.run_service(*args, **kwargs) -- cgit v1.2.3 From 512acc5b039f4ba76db3e1ec4abe4c002d4dc0ea Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Fri, 2 Aug 2013 11:10:01 +0200 Subject: Properly shutdown soledad instance. --- src/leap/gui/mainwindow.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/leap/gui/mainwindow.py b/src/leap/gui/mainwindow.py index 07ad9b9a..73354684 100644 --- a/src/leap/gui/mainwindow.py +++ b/src/leap/gui/mainwindow.py @@ -1033,11 +1033,10 @@ class MainWindow(QtGui.QMainWindow): soledad_ready """ logger.debug('Starting imap service') - logger.debug('DEBUG: NOT STARTING IT REALLY ----------------') - #self._imap_service = imap.start_imap_service( - #self._soledad, - #self._keymanager) + self._imap_service = imap.start_imap_service( + self._soledad, + self._keymanager) def _get_socket_host(self): """ -- cgit v1.2.3 From baf3738bec7a712f90316f79255d4c91259e3fdf Mon Sep 17 00:00:00 2001 From: Ivan Alejandro Date: Tue, 6 Aug 2013 18:04:38 -0300 Subject: Add multiple schemas support for SMTP --- src/leap/services/mail/smtpspec.py | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/src/leap/services/mail/smtpspec.py b/src/leap/services/mail/smtpspec.py index 270dfb76..9fc1984a 100644 --- a/src/leap/services/mail/smtpspec.py +++ b/src/leap/services/mail/smtpspec.py @@ -15,7 +15,14 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -smtp_config_spec = { +# Schemas dict +# To add a schema for a version you should follow the form: +# { '1': schema_v1, '2': schema_v2, ... etc } +# so for instance, to add the '2' version, you should do: +# eipservice_config_spec['2'] = schema_v2 +smtp_config_spec = {} + +smtp_config_spec['1'] = { 'description': 'sample smtp service config', 'type': 'object', 'properties': { @@ -49,3 +56,15 @@ smtp_config_spec = { } } } + + +def get_schema(version): + """ + Returns the schema corresponding to the version given. + + :param version: the version of the schema to get. + :type version: str + :rtype: dict or None if the version is not supported. + """ + schema = smtp_config_spec.get(version, None) + return schema -- cgit v1.2.3 From 03ebed92556e965d5bc39b256e77cf9cf18fb11b Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Tue, 6 Aug 2013 02:45:41 +0200 Subject: Allow to change openvpn verbosity in logs --- changes/feature_3305_openvpn_verbosity | 1 + src/leap/app.py | 2 ++ src/leap/gui/mainwindow.py | 7 +++++-- src/leap/services/eip/vpnlaunchers.py | 26 +++++++++++++++++++------- src/leap/services/eip/vpnprocess.py | 27 +++++++++++++++++++++++---- 5 files changed, 50 insertions(+), 13 deletions(-) create mode 100644 changes/feature_3305_openvpn_verbosity diff --git a/changes/feature_3305_openvpn_verbosity b/changes/feature_3305_openvpn_verbosity new file mode 100644 index 00000000..d838861f --- /dev/null +++ b/changes/feature_3305_openvpn_verbosity @@ -0,0 +1 @@ + o Accept flag for changing openvpn verbosity in logs. Closes: #3305 diff --git a/src/leap/app.py b/src/leap/app.py index 6ba27813..34eac6dc 100644 --- a/src/leap/app.py +++ b/src/leap/app.py @@ -142,6 +142,7 @@ def main(): bypass_checks = getattr(opts, 'danger', False) debug = opts.debug logfile = opts.log_file + openvpn_verb = opts.openvpn_verb logger = add_logger_handlers(debug, logfile) replace_stdout_stderr_with_logging(logger) @@ -202,6 +203,7 @@ def main(): window = MainWindow( lambda: twisted_main.quit(app), standalone=standalone, + openvpn_verb=openvpn_verb, bypass_checks=bypass_checks) sigint_window = partial(sigint_handler, window, logger=logger) diff --git a/src/leap/gui/mainwindow.py b/src/leap/gui/mainwindow.py index 87dd4f5c..8195d23a 100644 --- a/src/leap/gui/mainwindow.py +++ b/src/leap/gui/mainwindow.py @@ -99,7 +99,9 @@ class MainWindow(QtGui.QMainWindow): user_stopped_eip = False def __init__(self, quit_callback, - standalone=False, bypass_checks=False): + standalone=False, + openvpn_verb=1, + bypass_checks=False): """ Constructor for the client main window @@ -210,7 +212,7 @@ class MainWindow(QtGui.QMainWindow): self._smtp_bootstrapper.download_config.connect( self._smtp_bootstrapped_stage) - self._vpn = VPN() + self._vpn = VPN(openvpn_verb=openvpn_verb) self._vpn.qtsigs.state_changed.connect( self._status_panel.update_vpn_state) self._vpn.qtsigs.status_changed.connect( @@ -1059,6 +1061,7 @@ class MainWindow(QtGui.QMainWindow): self._status_panel.eip_started() + # XXX refactor into status_panel method? self._action_eip_startstop.setText(self.tr("Turn OFF")) self._action_eip_startstop.disconnect(self) self._action_eip_startstop.triggered.connect( diff --git a/src/leap/services/eip/vpnlaunchers.py b/src/leap/services/eip/vpnlaunchers.py index 0151c1c6..95d95c0e 100644 --- a/src/leap/services/eip/vpnlaunchers.py +++ b/src/leap/services/eip/vpnlaunchers.py @@ -352,7 +352,7 @@ class LinuxVPNLauncher(VPNLauncher): return None def get_vpn_command(self, eipconfig=None, providerconfig=None, - socket_host=None, socket_port="unix"): + socket_host=None, socket_port="unix", openvpn_verb=1): """ Returns the platform dependant vpn launching command. It will look for openvpn in the regular paths and algo in @@ -375,6 +375,9 @@ class LinuxVPNLauncher(VPNLauncher): socket, or port otherwise :type socket_port: str + :param openvpn_verb: openvpn verbosity wanted + :type openvpn_verb: int + :return: A VPN command ready to be launched :rtype: list """ @@ -404,7 +407,7 @@ class LinuxVPNLauncher(VPNLauncher): args.append(openvpn) openvpn = first(pkexec) - # TODO: handle verbosity + args += ['--verb', '%d' % (openvpn_verb,)] gateway_selector = VPNGatewaySelector(eipconfig) gateways = gateway_selector.get_gateways() @@ -604,7 +607,7 @@ class DarwinVPNLauncher(VPNLauncher): return self.COCOASUDO, args def get_vpn_command(self, eipconfig=None, providerconfig=None, - socket_host=None, socket_port="unix"): + socket_host=None, socket_port="unix", openvpn_verb=1): """ Returns the platform dependant vpn launching command @@ -623,6 +626,9 @@ class DarwinVPNLauncher(VPNLauncher): socket, or port otherwise :type socket_port: str + :param openvpn_verb: openvpn verbosity wanted + :type openvpn_verb: int + :return: A VPN command ready to be launched :rtype: list """ @@ -651,7 +657,7 @@ class DarwinVPNLauncher(VPNLauncher): openvpn = first(openvpn_possibilities) args = [openvpn] - # TODO: handle verbosity + args += ['--verb', '%d' % (openvpn_verb,)] gateway_selector = VPNGatewaySelector(eipconfig) gateways = gateway_selector.get_gateways() @@ -768,9 +774,10 @@ class WindowsVPNLauncher(VPNLauncher): OPENVPN_BIN = 'openvpn_leap.exe' # XXX UPDOWN_FILES ... we do not have updown files defined yet! + # (and maybe we won't) def get_vpn_command(self, eipconfig=None, providerconfig=None, - socket_host=None, socket_port="9876"): + socket_host=None, socket_port="9876", openvpn_verb=1): """ Returns the platform dependant vpn launching command. It will look for openvpn in the regular paths and algo in @@ -780,14 +787,20 @@ class WindowsVPNLauncher(VPNLauncher): :param eipconfig: eip configuration object :type eipconfig: EIPConfig + :param providerconfig: provider specific configuration :type providerconfig: ProviderConfig + :param socket_host: either socket path (unix) or socket IP :type socket_host: str + :param socket_port: either string "unix" if it's a unix socket, or port otherwise :type socket_port: str + :param openvpn_verb: the openvpn verbosity wanted + :type openvpn_verb: int + :return: A VPN command ready to be launched :rtype: list """ @@ -810,8 +823,7 @@ class WindowsVPNLauncher(VPNLauncher): openvpn = first(openvpn_possibilities) args = [] - - # TODO: handle verbosity + args += ['--verb', '%d' % (openvpn_verb,)] gateway_selector = VPNGatewaySelector(eipconfig) gateways = gateway_selector.get_gateways() diff --git a/src/leap/services/eip/vpnprocess.py b/src/leap/services/eip/vpnprocess.py index c4bdb30c..5b07a3cf 100644 --- a/src/leap/services/eip/vpnprocess.py +++ b/src/leap/services/eip/vpnprocess.py @@ -80,7 +80,9 @@ class VPN(object): TERMINATE_MAXTRIES = 10 TERMINATE_WAIT = 1 # secs - def __init__(self): + OPENVPN_VERB = "openvpn_verb" + + def __init__(self, **kwargs): """ Instantiate empty attributes and get a copy of a QObject containing the QSignals that we will pass along @@ -92,6 +94,8 @@ class VPN(object): self._reactor = reactor self._qtsigs = VPNSignals() + self._openvpn_verb = kwargs.get(self.OPENVPN_VERB, None) + @property def qtsigs(self): return self._qtsigs @@ -108,9 +112,12 @@ class VPN(object): """ self._stop_pollers() kwargs['qtsigs'] = self.qtsigs + kwargs['openvpn_verb'] = self._openvpn_verb # start the main vpn subprocess vpnproc = VPNProcess(*args, **kwargs) + #qtsigs=self.qtsigs, + #openvpn_verb=self._openvpn_verb) if vpnproc.get_openvpn_process(): logger.info("Another vpn process is running. Will try to stop it.") @@ -566,7 +573,12 @@ class VPNManager(object): # we should check that cmdline BEGINS # with openvpn or with our wrapper # (pkexec / osascript / whatever) - if "openvpn" in ' '.join(p.cmdline): + + # This needs more work, see #3268, but for the moment + # we need to be able to filter out arguments in the form + # --openvpn-foo, since otherwise we are shooting ourselves + # in the feet. + if any(map(lambda s: s.startswith("openvpn"), p.cmdline)): openvpn_process = p break except psutil.error.AccessDenied: @@ -645,7 +657,7 @@ class VPNProcess(protocol.ProcessProtocol, VPNManager): """ def __init__(self, eipconfig, providerconfig, socket_host, socket_port, - qtsigs): + qtsigs, openvpn_verb): """ :param eipconfig: eip configuration object :type eipconfig: EIPConfig @@ -663,6 +675,10 @@ class VPNProcess(protocol.ProcessProtocol, VPNManager): :param qtsigs: a QObject containing the Qt signals used to notify the UI. :type qtsigs: QObject + + :param openvpn_verb: the desired level of verbosity in the + openvpn invocation + :type openvpn_verb: int """ VPNManager.__init__(self, qtsigs=qtsigs) leap_assert_type(eipconfig, EIPConfig) @@ -682,6 +698,8 @@ class VPNProcess(protocol.ProcessProtocol, VPNManager): self._last_status = None self._alive = False + self._openvpn_verb = openvpn_verb + # processProtocol methods def connectionMade(self): @@ -757,7 +775,8 @@ class VPNProcess(protocol.ProcessProtocol, VPNManager): eipconfig=self._eipconfig, providerconfig=self._providerconfig, socket_host=self._socket_host, - socket_port=self._socket_port) + socket_port=self._socket_port, + openvpn_verb=self._openvpn_verb) return map(str, cmd) # shutdown -- cgit v1.2.3 From ff2ab59bf6b5473ef58386978a88bd5346a8718a Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Tue, 6 Aug 2013 16:51:51 +0200 Subject: changes file --- changes/feature_add-imap-service | 1 + 1 file changed, 1 insertion(+) create mode 100644 changes/feature_add-imap-service diff --git a/changes/feature_add-imap-service b/changes/feature_add-imap-service new file mode 100644 index 00000000..6721e2cd --- /dev/null +++ b/changes/feature_add-imap-service @@ -0,0 +1 @@ + o Add imap service to the client. Closes: #2579 -- cgit v1.2.3 From 4ee2773660a571b180732ef41446399edf8501ac Mon Sep 17 00:00:00 2001 From: Ivan Alejandro Date: Tue, 6 Aug 2013 18:05:06 -0300 Subject: Update code to use the new SMTP schema selection. --- src/leap/services/mail/smtpbootstrapper.py | 8 ++++++-- src/leap/services/mail/smtpconfig.py | 9 ++------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/leap/services/mail/smtpbootstrapper.py b/src/leap/services/mail/smtpbootstrapper.py index e8af5349..48040035 100644 --- a/src/leap/services/mail/smtpbootstrapper.py +++ b/src/leap/services/mail/smtpbootstrapper.py @@ -72,10 +72,12 @@ class SMTPBootstrapper(AbstractBootstrapper): if self._download_if_needed and mtime: headers['if-modified-since'] = mtime + api_version = self._provider_config.get_api_version() + # there is some confusion with this uri, config_uri = "%s/%s/config/smtp-service.json" % ( - self._provider_config.get_api_uri(), - self._provider_config.get_api_version()) + self._provider_config.get_api_uri(), api_version) + logger.debug('Downloading SMTP config from: %s' % config_uri) srp_auth = SRPAuth(self._provider_config) @@ -91,6 +93,8 @@ class SMTPBootstrapper(AbstractBootstrapper): cookies=cookies) res.raise_for_status() + self._smtp_config.set_api_version(api_version) + # Not modified if res.status_code == 304: logger.debug("SMTP definition has not been modified") diff --git a/src/leap/services/mail/smtpconfig.py b/src/leap/services/mail/smtpconfig.py index 30371005..ca974fcf 100644 --- a/src/leap/services/mail/smtpconfig.py +++ b/src/leap/services/mail/smtpconfig.py @@ -21,7 +21,7 @@ SMTP configuration import logging from leap.common.config.baseconfig import BaseConfig -from leap.services.mail.smtpspec import smtp_config_spec +from leap.services.mail.smtpspec import get_schema logger = logging.getLogger(__name__) @@ -33,12 +33,7 @@ class SMTPConfig(BaseConfig): def __init__(self): BaseConfig.__init__(self) - - def _get_spec(self): - """ - Returns the spec object for the specific configuration - """ - return smtp_config_spec + self._get_schema = get_schema def get_hosts(self): return self._safe_get_value("hosts") -- cgit v1.2.3 From 088db436880edd8c8ae51f792fc707d962927485 Mon Sep 17 00:00:00 2001 From: Ivan Alejandro Date: Tue, 6 Aug 2013 18:05:25 -0300 Subject: Move code to common.BaseConfig --- src/leap/services/eip/eipconfig.py | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/src/leap/services/eip/eipconfig.py b/src/leap/services/eip/eipconfig.py index 2f2f6e7c..da44c3a6 100644 --- a/src/leap/services/eip/eipconfig.py +++ b/src/leap/services/eip/eipconfig.py @@ -137,26 +137,7 @@ class EIPConfig(BaseConfig): def __init__(self): BaseConfig.__init__(self) self._api_version = None - - def _get_spec(self): - """ - Returns the spec object for the specific configuration - """ - leap_assert(self._api_version is not None, - "You should set the API version.") - - return get_schema(self._api_version) - - def set_api_version(self, version): - """ - Sets the supported api version. - - :param api_version: the version of the api supported by the provider. - :type api_version: str - """ - self._api_version = version - leap_assert(get_schema(self._api_version) is not None, - "Version %s is not supported." % (version, )) + self._get_schema = get_schema def get_clusters(self): # TODO: create an abstraction for clusters -- cgit v1.2.3 From 7f252785df20f395cb740a8cca79e70943431748 Mon Sep 17 00:00:00 2001 From: Ivan Alejandro Date: Wed, 7 Aug 2013 13:02:47 -0300 Subject: Bugfix ui, login-cancel consistency. Closes #3401. --- changes/bug-3401_login-fail-left-ui-inconsistent | 1 + src/leap/gui/login.py | 6 +++--- src/leap/gui/mainwindow.py | 3 --- 3 files changed, 4 insertions(+), 6 deletions(-) create mode 100644 changes/bug-3401_login-fail-left-ui-inconsistent diff --git a/changes/bug-3401_login-fail-left-ui-inconsistent b/changes/bug-3401_login-fail-left-ui-inconsistent new file mode 100644 index 00000000..2403fe0e --- /dev/null +++ b/changes/bug-3401_login-fail-left-ui-inconsistent @@ -0,0 +1 @@ + o Properly handle login failures. Closes bug #3401. diff --git a/src/leap/gui/login.py b/src/leap/gui/login.py index 3c994597..de0b2d50 100644 --- a/src/leap/gui/login.py +++ b/src/leap/gui/login.py @@ -197,18 +197,18 @@ class LoginWidget(QtGui.QWidget): """ self.ui.lnUser.setEnabled(enabled) self.ui.lnPassword.setEnabled(enabled) - self.ui.btnLogin.setEnabled(enabled) self.ui.chkRemember.setEnabled(enabled) self.ui.cmbProviders.setEnabled(enabled) - def set_cancel(self, enabled=False): + self._set_cancel(not enabled) + + def _set_cancel(self, enabled=False): """ Enables or disables the cancel action in the "log in" process. :param enabled: wether it should be enabled or not :type enabled: bool """ - self.ui.btnLogin.setEnabled(enabled) text = self.tr("Cancel") login_or_cancel = self.cancel_login diff --git a/src/leap/gui/mainwindow.py b/src/leap/gui/mainwindow.py index a1ba4df4..6b31fb6c 100644 --- a/src/leap/gui/mainwindow.py +++ b/src/leap/gui/mainwindow.py @@ -804,7 +804,6 @@ class MainWindow(QtGui.QMainWindow): self._login_widget.set_status(self.tr("Logging in..."), error=False) self._login_widget.set_enabled(False) - self._login_widget.set_cancel(True) if self._login_widget.get_remember() and has_keyring(): # in the keyring and in the settings @@ -832,7 +831,6 @@ class MainWindow(QtGui.QMainWindow): Stops the login sequence. """ logger.debug("Cancelling log in.") - self._login_widget.set_cancel(False) if self._download_provider_defer: logger.debug("Cancelling download provider defer.") @@ -1301,7 +1299,6 @@ class MainWindow(QtGui.QMainWindow): """ passed = data[self._provider_bootstrapper.PASSED_KEY] if not passed: - self._login_widget.set_cancel(False) self._login_widget.set_enabled(True) self._login_widget.set_status( self.tr("Unable to connect: Problem with provider")) -- cgit v1.2.3 From 959c24f3eae90f5b306aa99401bc11c5021b0faa Mon Sep 17 00:00:00 2001 From: Ivan Alejandro Date: Wed, 7 Aug 2013 14:50:16 -0300 Subject: Define abstract methods from BaseConfig. --- src/leap/services/eip/eipconfig.py | 9 ++++++++- src/leap/services/mail/smtpconfig.py | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/leap/services/eip/eipconfig.py b/src/leap/services/eip/eipconfig.py index da44c3a6..d69e1fd8 100644 --- a/src/leap/services/eip/eipconfig.py +++ b/src/leap/services/eip/eipconfig.py @@ -137,7 +137,14 @@ class EIPConfig(BaseConfig): def __init__(self): BaseConfig.__init__(self) self._api_version = None - self._get_schema = get_schema + + def _get_schema(self): + """ + Returns the schema corresponding to the version given. + + :rtype: dict or None if the version is not supported. + """ + return get_schema(self._api_version) def get_clusters(self): # TODO: create an abstraction for clusters diff --git a/src/leap/services/mail/smtpconfig.py b/src/leap/services/mail/smtpconfig.py index ca974fcf..ea0f9c37 100644 --- a/src/leap/services/mail/smtpconfig.py +++ b/src/leap/services/mail/smtpconfig.py @@ -33,7 +33,14 @@ class SMTPConfig(BaseConfig): def __init__(self): BaseConfig.__init__(self) - self._get_schema = get_schema + + def _get_schema(self): + """ + Returns the schema corresponding to the version given. + + :rtype: dict or None if the version is not supported. + """ + return get_schema(self._api_version) def get_hosts(self): return self._safe_get_value("hosts") -- cgit v1.2.3 From 52d33ab34cfdb9464b25101843dba3b221aa3b45 Mon Sep 17 00:00:00 2001 From: Ivan Alejandro Date: Wed, 7 Aug 2013 11:51:54 -0300 Subject: Add changelog for #3403. --- changes/feature-3403_support-multiple-schemas | 1 + 1 file changed, 1 insertion(+) create mode 100644 changes/feature-3403_support-multiple-schemas diff --git a/changes/feature-3403_support-multiple-schemas b/changes/feature-3403_support-multiple-schemas new file mode 100644 index 00000000..9ed7ac89 --- /dev/null +++ b/changes/feature-3403_support-multiple-schemas @@ -0,0 +1 @@ + o Add multiple schema support for SMTP. Closes #3403. -- cgit v1.2.3 From 98f014d99e13651e7dfb0789f8dac0a81aea172e Mon Sep 17 00:00:00 2001 From: Ivan Alejandro Date: Wed, 7 Aug 2013 14:50:16 -0300 Subject: Define abstract methods from BaseConfig. --- src/leap/config/providerconfig.py | 17 +++++++++++++++-- src/leap/services/eip/eipconfig.py | 9 ++++++++- src/leap/services/mail/smtpconfig.py | 9 ++++++++- 3 files changed, 31 insertions(+), 4 deletions(-) diff --git a/src/leap/config/providerconfig.py b/src/leap/config/providerconfig.py index eb097034..f899b17c 100644 --- a/src/leap/config/providerconfig.py +++ b/src/leap/config/providerconfig.py @@ -42,12 +42,25 @@ class ProviderConfig(BaseConfig): def __init__(self): BaseConfig.__init__(self) - def _get_spec(self): + def _get_schema(self): """ - Returns the spec object for the specific configuration + Returns the schema corresponding to the version given. + + :rtype: dict or None if the version is not supported. """ return leap_provider_spec + def _get_spec(self): + """ + Returns the spec object for the specific configuration. + + Override the BaseConfig one because we do not support multiple schemas + for the provider yet. + + :rtype: dict or None if the version is not supported. + """ + return self._get_schema() + def get_api_uri(self): return self._safe_get_value("api_uri") diff --git a/src/leap/services/eip/eipconfig.py b/src/leap/services/eip/eipconfig.py index da44c3a6..d69e1fd8 100644 --- a/src/leap/services/eip/eipconfig.py +++ b/src/leap/services/eip/eipconfig.py @@ -137,7 +137,14 @@ class EIPConfig(BaseConfig): def __init__(self): BaseConfig.__init__(self) self._api_version = None - self._get_schema = get_schema + + def _get_schema(self): + """ + Returns the schema corresponding to the version given. + + :rtype: dict or None if the version is not supported. + """ + return get_schema(self._api_version) def get_clusters(self): # TODO: create an abstraction for clusters diff --git a/src/leap/services/mail/smtpconfig.py b/src/leap/services/mail/smtpconfig.py index ca974fcf..ea0f9c37 100644 --- a/src/leap/services/mail/smtpconfig.py +++ b/src/leap/services/mail/smtpconfig.py @@ -33,7 +33,14 @@ class SMTPConfig(BaseConfig): def __init__(self): BaseConfig.__init__(self) - self._get_schema = get_schema + + def _get_schema(self): + """ + Returns the schema corresponding to the version given. + + :rtype: dict or None if the version is not supported. + """ + return get_schema(self._api_version) def get_hosts(self): return self._safe_get_value("hosts") -- cgit v1.2.3 From 238d56066ed9a6f928d21ac8e3dbceef2189d8df Mon Sep 17 00:00:00 2001 From: Ivan Alejandro Date: Wed, 7 Aug 2013 11:51:54 -0300 Subject: Add changelog for #3403. --- changes/feature-3403_support-multiple-schemas | 1 + 1 file changed, 1 insertion(+) create mode 100644 changes/feature-3403_support-multiple-schemas diff --git a/changes/feature-3403_support-multiple-schemas b/changes/feature-3403_support-multiple-schemas new file mode 100644 index 00000000..9ed7ac89 --- /dev/null +++ b/changes/feature-3403_support-multiple-schemas @@ -0,0 +1 @@ + o Add multiple schema support for SMTP. Closes #3403. -- cgit v1.2.3 From 9b48a6286cd421caf1cca98709aa4811753b77c9 Mon Sep 17 00:00:00 2001 From: Ivan Alejandro Date: Wed, 7 Aug 2013 18:35:14 -0300 Subject: Add pyside-uic support inside venv. Closes #3411. --- changes/feature_add-uic-support-in-virtualenv | 1 + pkg/postmkvenv.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changes/feature_add-uic-support-in-virtualenv diff --git a/changes/feature_add-uic-support-in-virtualenv b/changes/feature_add-uic-support-in-virtualenv new file mode 100644 index 00000000..2c067f80 --- /dev/null +++ b/changes/feature_add-uic-support-in-virtualenv @@ -0,0 +1 @@ + o Add pyside-uic support inside the virtualenv. This way it won't fail to 'make' if the virtualenv is activated. Closes #3411. diff --git a/pkg/postmkvenv.sh b/pkg/postmkvenv.sh index 2f0cba45..04f8d372 100755 --- a/pkg/postmkvenv.sh +++ b/pkg/postmkvenv.sh @@ -16,7 +16,7 @@ elif [[ "$unamestr" == 'Darwin' ]]; then platform='darwin' fi -LIBS=( PySide ) +LIBS=( PySide pysideuic ) PYTHON_VERSION=python$(python -c "import sys; print (str(sys.version_info[0])+'.'+str(sys.version_info[1]))") VAR=( $(which -a $PYTHON_VERSION) ) -- cgit v1.2.3 From 3fd9833f3392050068b42e9fd3f7b982b1040d64 Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Thu, 8 Aug 2013 14:01:18 +0200 Subject: remove separate logging --- src/leap/services/mail/imap.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/leap/services/mail/imap.py b/src/leap/services/mail/imap.py index 5fdc7492..4dceb2ad 100644 --- a/src/leap/services/mail/imap.py +++ b/src/leap/services/mail/imap.py @@ -34,8 +34,9 @@ def start_imap_service(*args, **kwargs): """ logger.debug('Launching imap service') - # XXX handle this in a more appropriate manner - log.startLogging(open('/tmp/leap-imap.log', 'w')) - log.startLogging(sys.stdout) + # Uncomment the next two lines to get a separate debugging log + # TODO handle this by a separate flag. + #log.startLogging(open('/tmp/leap-imap.log', 'w')) + #log.startLogging(sys.stdout) return imap.run_service(*args, **kwargs) -- cgit v1.2.3 From 9cd81d9be4e8bb5303b8843f6fe7bab8202d4f2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Touceda?= Date: Thu, 8 Aug 2013 11:56:50 -0300 Subject: Do not provider --verb is no openvpn_verb is defined --- src/leap/services/eip/vpnlaunchers.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/leap/services/eip/vpnlaunchers.py b/src/leap/services/eip/vpnlaunchers.py index dadbf859..cbbd4de2 100644 --- a/src/leap/services/eip/vpnlaunchers.py +++ b/src/leap/services/eip/vpnlaunchers.py @@ -407,7 +407,8 @@ class LinuxVPNLauncher(VPNLauncher): args.append(openvpn) openvpn = first(pkexec) - args += ['--verb', '%d' % (openvpn_verb,)] + if openvpn_verb is not None: + args += ['--verb', '%d' % (openvpn_verb,)] gateway_selector = VPNGatewaySelector(eipconfig) gateways = gateway_selector.get_gateways() @@ -657,7 +658,8 @@ class DarwinVPNLauncher(VPNLauncher): openvpn = first(openvpn_possibilities) args = [openvpn] - args += ['--verb', '%d' % (openvpn_verb,)] + if openvpn_verb is not None: + args += ['--verb', '%d' % (openvpn_verb,)] gateway_selector = VPNGatewaySelector(eipconfig) gateways = gateway_selector.get_gateways() @@ -823,7 +825,8 @@ class WindowsVPNLauncher(VPNLauncher): openvpn = first(openvpn_possibilities) args = [] - args += ['--verb', '%d' % (openvpn_verb,)] + if openvpn_verb is not None: + args += ['--verb', '%d' % (openvpn_verb,)] gateway_selector = VPNGatewaySelector(eipconfig) gateways = gateway_selector.get_gateways() -- cgit v1.2.3 From 55f51fee46c6b6a9189161a9a5648410400772ad Mon Sep 17 00:00:00 2001 From: Ivan Alejandro Date: Thu, 8 Aug 2013 12:10:18 -0300 Subject: Add multiple schema support for Soledad. Also fix comment typo. --- src/leap/services/mail/smtpspec.py | 2 +- src/leap/services/soledad/soledadspec.py | 21 ++++++++++++++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/src/leap/services/mail/smtpspec.py b/src/leap/services/mail/smtpspec.py index 9fc1984a..ff9d1bf8 100644 --- a/src/leap/services/mail/smtpspec.py +++ b/src/leap/services/mail/smtpspec.py @@ -19,7 +19,7 @@ # To add a schema for a version you should follow the form: # { '1': schema_v1, '2': schema_v2, ... etc } # so for instance, to add the '2' version, you should do: -# eipservice_config_spec['2'] = schema_v2 +# smtp_config_spec['2'] = schema_v2 smtp_config_spec = {} smtp_config_spec['1'] = { diff --git a/src/leap/services/soledad/soledadspec.py b/src/leap/services/soledad/soledadspec.py index 8233d6a0..111175dd 100644 --- a/src/leap/services/soledad/soledadspec.py +++ b/src/leap/services/soledad/soledadspec.py @@ -15,7 +15,14 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -soledad_config_spec = { +# Schemas dict +# To add a schema for a version you should follow the form: +# { '1': schema_v1, '2': schema_v2, ... etc } +# so for instance, to add the '2' version, you should do: +# soledad_config_spec['2'] = schema_v2 +soledad_config_spec = {} + +soledad_config_spec['1'] = { 'description': 'sample soledad service config', 'type': 'object', 'properties': { @@ -55,3 +62,15 @@ soledad_config_spec = { } } } + + +def get_schema(version): + """ + Returns the schema corresponding to the version given. + + :param version: the version of the schema to get. + :type version: str + :rtype: dict or None if the version is not supported. + """ + schema = soledad_config_spec.get(version, None) + return schema -- cgit v1.2.3 From 6060b522bfcbcc379a37c315af83f830c0b0dd71 Mon Sep 17 00:00:00 2001 From: Ivan Alejandro Date: Thu, 8 Aug 2013 12:12:51 -0300 Subject: Update code to use new Soledad schema selection. --- src/leap/services/soledad/soledadbootstrapper.py | 6 +++++- src/leap/services/soledad/soledadconfig.py | 10 ++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/leap/services/soledad/soledadbootstrapper.py b/src/leap/services/soledad/soledadbootstrapper.py index ac3243c1..422352ea 100644 --- a/src/leap/services/soledad/soledadbootstrapper.py +++ b/src/leap/services/soledad/soledadbootstrapper.py @@ -139,10 +139,12 @@ class SoledadBootstrapper(AbstractBootstrapper): if self._download_if_needed and mtime: headers['if-modified-since'] = mtime + api_version = self._provider_config.get_api_version() + # there is some confusion with this uri, config_uri = "%s/%s/config/soledad-service.json" % ( self._provider_config.get_api_uri(), - self._provider_config.get_api_version()) + api_version) logger.debug('Downloading soledad config from: %s' % config_uri) srp_auth = SRPAuth(self._provider_config) @@ -158,6 +160,8 @@ class SoledadBootstrapper(AbstractBootstrapper): cookies=cookies) res.raise_for_status() + self._soledad_config.set_api_version(api_version) + # Not modified if res.status_code == 304: logger.debug("Soledad definition has not been modified") diff --git a/src/leap/services/soledad/soledadconfig.py b/src/leap/services/soledad/soledadconfig.py index 80a82d11..a2367692 100644 --- a/src/leap/services/soledad/soledadconfig.py +++ b/src/leap/services/soledad/soledadconfig.py @@ -21,7 +21,7 @@ Soledad configuration import logging from leap.common.config.baseconfig import BaseConfig -from leap.services.soledad.soledadspec import soledad_config_spec +from leap.services.soledad.soledadspec import get_schema logger = logging.getLogger(__name__) @@ -34,11 +34,13 @@ class SoledadConfig(BaseConfig): def __init__(self): BaseConfig.__init__(self) - def _get_spec(self): + def _get_schema(self): """ - Returns the spec object for the specific configuration + Returns the schema corresponding to the version given. + + :rtype: dict or None if the version is not supported. """ - return soledad_config_spec + return get_schema(self._api_version) def get_hosts(self): return self._safe_get_value("hosts") -- cgit v1.2.3 From 3d07947ebca6b9dc339fc040cc4498ee94b9a42c Mon Sep 17 00:00:00 2001 From: Ivan Alejandro Date: Thu, 8 Aug 2013 12:13:56 -0300 Subject: Add changes file. Closes #3404. --- changes/feature-3404_support-multiple-schemas | 1 + 1 file changed, 1 insertion(+) create mode 100644 changes/feature-3404_support-multiple-schemas diff --git a/changes/feature-3404_support-multiple-schemas b/changes/feature-3404_support-multiple-schemas new file mode 100644 index 00000000..354dc71e --- /dev/null +++ b/changes/feature-3404_support-multiple-schemas @@ -0,0 +1 @@ + o Add multiple schema support for Soledad. Closes #3404. -- cgit v1.2.3 From b9eed0c824651a67dca3ea68c646c6361f40f288 Mon Sep 17 00:00:00 2001 From: Ivan Alejandro Date: Wed, 7 Aug 2013 18:24:37 -0300 Subject: Replace leap client texts with Bitmask. --- pkg/osx/install/install-leapc.sh | 4 ++-- src/leap/app.py | 6 +++--- src/leap/gui/mainwindow.py | 24 +++++++++++++++--------- src/leap/gui/ui/mainwindow.ui | 4 ++-- src/leap/gui/ui/wizard.ui | 6 +++--- src/leap/platform_init/initializers.py | 6 +++--- src/leap/services/eip/vpnlaunchers.py | 4 ++-- src/leap/services/tx.py | 2 +- src/leap/util/leap_argparse.py | 6 +++--- 9 files changed, 34 insertions(+), 28 deletions(-) diff --git a/pkg/osx/install/install-leapc.sh b/pkg/osx/install/install-leapc.sh index ec3c2834..e47abb7c 100755 --- a/pkg/osx/install/install-leapc.sh +++ b/pkg/osx/install/install-leapc.sh @@ -1,6 +1,6 @@ #!/bin/bash -# LEAP CLient Installer Script. +# Bitmask Installer Script. # # Copyright (C) 2013 LEAP Encryption Access Project # @@ -20,7 +20,7 @@ leapdir=/Applications/LEAP\ Client.app leaplibs=${leapdir}/Contents/MacOS tunstartup=/Library/StartupItems/tun/tun -echo "Installing LEAP Client in /Applications..." +echo "Installing Bitmask in /Applications..." cp -r "LEAP Client.app" /Applications echo "Copying openvpn binary..." diff --git a/src/leap/app.py b/src/leap/app.py index e7a8aa42..22340d4d 100644 --- a/src/leap/app.py +++ b/src/leap/app.py @@ -148,16 +148,16 @@ def main(): replace_stdout_stderr_with_logging(logger) if not we_are_the_one_and_only(): - # leap-client is already running + # Bitmask is already running logger.warning("Tried to launch more than one instance " - "of leap-client. Raising the existing " + "of Bitmask. Raising the existing " "one instead.") sys.exit(1) check_requirements() logger.info('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~') - logger.info('LEAP client version %s', VERSION) + logger.info('Bitmask version %s', VERSION) logger.info('~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~') logger.info('Starting app') diff --git a/src/leap/gui/mainwindow.py b/src/leap/gui/mainwindow.py index 5c7a3928..90492e45 100644 --- a/src/leap/gui/mainwindow.py +++ b/src/leap/gui/mainwindow.py @@ -83,7 +83,7 @@ class MainWindow(QtGui.QMainWindow): EIP_STATUS_INDEX = 1 # Keyring - KEYRING_KEY = "leap_client" + KEYRING_KEY = "bitmask" # SMTP PORT_KEY = "port" @@ -423,11 +423,11 @@ class MainWindow(QtGui.QMainWindow): Parses and displays the updates details """ - msg = self.tr("The LEAPClient app is ready to update, please" + msg = self.tr("The Bitmask app is ready to update, please" " restart the application.") # We assume that if there is nothing in the contents, then - # the LEAPClient bundle is what needs updating. + # the Bitmask bundle is what needs updating. if len(self._updates_content) > 0: files = self._updates_content.split(", ") files_str = "" @@ -655,17 +655,23 @@ class MainWindow(QtGui.QMainWindow): SLOT TRIGGERS: self.ui.action_about_leap.triggered - Display the About LEAP dialog + Display the About Bitmask dialog """ QtGui.QMessageBox.about( - self, self.tr("About LEAP - %s") % (VERSION,), - self.tr("version: %s
" + self, self.tr("About Bitmask - %s") % (VERSION,), + self.tr("Version: %s
" + "
" + "Bitmask is the Desktop client application for " + "the LEAP platform, supporting encrypted internet " + "proxy, secure email, and secure chat (coming soon).
" + "
" "LEAP is a non-profit dedicated to giving " "all internet users access to secure " "communication. Our focus is on adapting " "encryption technology to make it easy to use " - "and widely available. " - "More about LEAP" + "and widely available.
" + "
" + "
More about LEAP" "") % (VERSION,)) def changeEvent(self, e): @@ -1145,7 +1151,7 @@ class MainWindow(QtGui.QMainWindow): self._status_panel.set_global_status( self.tr("Another openvpn instance is already running, and " "could not be stopped because it was not launched by " - "LEAP. Please stop it and try again."), + "Bitmask. Please stop it and try again."), error=True) self._set_eipstatus_off() except VPNLauncherException as e: diff --git a/src/leap/gui/ui/mainwindow.ui b/src/leap/gui/ui/mainwindow.ui index 67d78736..c3523823 100644 --- a/src/leap/gui/ui/mainwindow.ui +++ b/src/leap/gui/ui/mainwindow.ui @@ -11,7 +11,7 @@ - LEAP + Bitmask @@ -288,7 +288,7 @@ - About &LEAP + About &Bitmask diff --git a/src/leap/gui/ui/wizard.ui b/src/leap/gui/ui/wizard.ui index d8acd69a..d7355d5d 100644 --- a/src/leap/gui/ui/wizard.ui +++ b/src/leap/gui/ui/wizard.ui @@ -11,7 +11,7 @@ - LEAP First run + Bitmask first run @@ -31,7 +31,7 @@ Welcome - This is the LEAP Client first run wizard + This is the Bitmask first run wizard 0 @@ -733,7 +733,7 @@ Congratulations! - You have successfully configured the LEAP Client. + You have successfully configured Bitmask. 6 diff --git a/src/leap/platform_init/initializers.py b/src/leap/platform_init/initializers.py index cc5f6e87..46488250 100644 --- a/src/leap/platform_init/initializers.py +++ b/src/leap/platform_init/initializers.py @@ -84,7 +84,7 @@ def get_missing_updown_dialog(): :rtype: QtGui.QMessageBox instance """ WE_NEED_POWERS = ("To better protect your privacy, " - "LEAP needs administrative privileges " + "Bitmask needs administrative privileges " "to install helper files. " "Do you want to proceed?") msg = QtGui.QMessageBox() @@ -180,7 +180,7 @@ def WindowsInitializer(): if not _windows_has_tap_device(): msg = QtGui.QMessageBox() msg.setWindowTitle(msg.tr("TAP Driver")) - msg.setText(msg.tr("LEAPClient needs to install the necessary drivers " + msg.setText(msg.tr("Bitmask needs to install the necessary drivers " "for Encrypted Internet to work. Would you like to " "proceed?")) msg.setInformativeText(msg.tr("Encrypted Internet uses VPN, which " @@ -306,7 +306,7 @@ def DarwinInitializer(): if not _darwin_has_tun_kext(): msg = QtGui.QMessageBox() msg.setWindowTitle(msg.tr("TUN Driver")) - msg.setText(msg.tr("LEAPClient needs to install the necessary drivers " + msg.setText(msg.tr("Bitmask needs to install the necessary drivers " "for Encrypted Internet to work. Would you like to " "proceed?")) msg.setInformativeText(msg.tr("Encrypted Internet uses VPN, which " diff --git a/src/leap/services/eip/vpnlaunchers.py b/src/leap/services/eip/vpnlaunchers.py index cbbd4de2..17950a25 100644 --- a/src/leap/services/eip/vpnlaunchers.py +++ b/src/leap/services/eip/vpnlaunchers.py @@ -520,9 +520,9 @@ class DarwinVPNLauncher(VPNLauncher): COCOASUDO = "cocoasudo" # XXX need the good old magic translate for these strings # (look for magic in 0.2.0 release) - SUDO_MSG = ("LEAP needs administrative privileges to run " + SUDO_MSG = ("Bitmask needs administrative privileges to run " "Encrypted Internet.") - INSTALL_MSG = ("\"LEAP needs administrative privileges to install " + INSTALL_MSG = ("\"Bitmask needs administrative privileges to install " "missing scripts and fix permissions.\"") INSTALL_PATH = os.path.realpath(os.getcwd() + "/../../") diff --git a/src/leap/services/tx.py b/src/leap/services/tx.py index ef08fcc6..7da1cb01 100644 --- a/src/leap/services/tx.py +++ b/src/leap/services/tx.py @@ -40,7 +40,7 @@ def leap_services(): register them. """ logger.debug('starting leap services') - application = Application("LEAP Client Local Services") + application = Application("Bitmask Local Services") #lc = LoopingCall(task) #lc.start(5) return application diff --git a/src/leap/util/leap_argparse.py b/src/leap/util/leap_argparse.py index bdf80401..f60c4e10 100644 --- a/src/leap/util/leap_argparse.py +++ b/src/leap/util/leap_argparse.py @@ -27,9 +27,9 @@ def build_parser(): """ epilog = "Copyright 2012 The LEAP Encryption Access Project" parser = argparse.ArgumentParser(description=""" -Launches the LEAP Client""", epilog=epilog) +Launches Bitmask""", epilog=epilog) parser.add_argument('-d', '--debug', action="store_true", - help=("Launches client in debug mode, writing debug" + help=("Launches Bitmask in debug mode, writing debug" "info to stdout")) # TODO: when we are ready to disable the --danger flag remove 'True or ' if True or not IS_RELEASE_VERSION: @@ -45,7 +45,7 @@ Launches the LEAP Client""", epilog=epilog) action="store", dest="openvpn_verb", help='verbosity level for openvpn logs [1-6]') parser.add_argument('-s', '--standalone', action="store_true", - help='Makes the client use standalone' + help='Makes Bitmask use standalone' 'directories for configuration and binary' 'searching') -- cgit v1.2.3 From 8ad62f8d8880db9d416f8a60ec5e1e7f69136418 Mon Sep 17 00:00:00 2001 From: Ivan Alejandro Date: Wed, 7 Aug 2013 18:54:04 -0300 Subject: Update README and packaging names. --- README.rst | 36 ++++++++++++++++++------------------ setup.py | 10 +++++----- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/README.rst b/README.rst index 7b4924ab..d5d6c946 100644 --- a/README.rst +++ b/README.rst @@ -3,13 +3,13 @@ The LEAP Encryption Access Project Client *your internet encryption toolkit* -.. image:: https://pypip.in/v/leap-client/badge.png - :target: https://crate.io/packages/leap.client +.. image:: https://pypip.in/v/bitmask/badge.png + :target: https://crate.io/packages/bitmask Dependencies ------------------ -LEAP Client depends on these libraries: +Bitmask depends on these libraries: * ``python 2.6`` or ``2.7`` * ``qt4 libraries`` @@ -21,14 +21,14 @@ Python packages are listed in ``pkg/requirements.pip`` and ``pkg/test-requiremen Debian ^^^^^^ -With a Debian based system, to be able to run leap-client you need to run the following command:: +With a Debian based system, to be able to run Bitmask you need to run the following command:: $ sudo apt-get install openvpn python-pyside pyside-tools python-setuptools python-all-dev python-pip python-dev python-openssl Installing ----------- -After getting the source and installing all the dependencies, proceed to install ``leap-client`` package:: +After getting the source and installing all the dependencies, proceed to install ``bitmask`` package:: $ make $ sudo LEAP_VENV_SKIP_PYSIDE=1 python setup.py install @@ -36,13 +36,13 @@ After getting the source and installing all the dependencies, proceed to install Running ------- -After a successful installation, there should be a launcher called ``leap-client`` somewhere in your path:: +After a successful installation, there should be a launcher called ``bitmask`` somewhere in your path:: - $ leap-client + $ bitmask -If you are testing a new provider and do not have a CA certificate chain tied to your SSL certificate, you should execute leap-client in the following way:: +If you are testing a new provider and do not have a CA certificate chain tied to your SSL certificate, you should execute Bitmask in the following way:: - $ leap-client --danger + $ bitmask --danger But **DO NOT use it on a regular bases**. @@ -53,9 +53,9 @@ But **DO NOT use it on a regular bases**. Hacking ======= -The LEAP client git repository is available at:: +The Bitmask git repository is available at:: - git://leap.se/leap_client + git://leap.se/bitmask Some steps need to be run when setting a development environment for the first time. @@ -66,19 +66,19 @@ Enable a **virtualenv** to isolate your libraries. (Current *.gitignore* knows a Make sure you are in the development branch:: - (leap_client)$ git checkout develop + (bitmask)$ git checkout develop Symlink your global pyside libraries:: - (leap_client)$ pkg/postmkvenv.sh + (bitmask)$ pkg/postmkvenv.sh And make your working tree available to your pythonpath:: - (leap_client)$ python setup.py develop + (bitmask)$ python setup.py develop -Run the client:: +Run Bitmask:: - (leap_client)$ python src/leap/app.py -d + (bitmask)$ python src/leap/app.py -d If you are testing a new provider that doesn't have the proper certificates yet, you can use --danger flag, but **DO NOT use it on a regular bases**. @@ -101,8 +101,8 @@ which the first time should automagically install all the needed dependencies in License ======= -.. image:: https://raw.github.com/leapcode/leap_client/develop/docs/user/gpl.png +.. image:: https://raw.github.com/leapcode/bitmask/develop/docs/user/gpl.png -The LEAP Client is released under the terms of the `GNU GPL version 3`_ or later. +Bitmask is released under the terms of the `GNU GPL version 3`_ or later. .. _`GNU GPL version 3`: http://www.gnu.org/licenses/gpl.txt diff --git a/setup.py b/setup.py index 4b39189c..4c37c56d 100755 --- a/setup.py +++ b/setup.py @@ -19,7 +19,7 @@ import versioneer versioneer.versionfile_source = 'src/leap/_version.py' versioneer.versionfile_build = 'leap/_version.py' versioneer.tag_prefix = '' # tags are like 1.2.0 -versioneer.parentdir_prefix = 'leap_client-' +versioneer.parentdir_prefix = 'bitmask-' from setuptools import Command @@ -52,7 +52,7 @@ trove_classifiers = [ parsed_reqs = utils.parse_requirements() cmdclass = versioneer.get_cmdclass() -leap_launcher = 'leap-client=leap.app:main' +leap_launcher = 'bitmask=leap.app:main' from setuptools.command.develop import develop as _develop @@ -109,7 +109,7 @@ cmdclass["sdist"] = cmd_sdist setup( - name="leap-client", + name="bitmask", package_dir={"": "src"}, version=versioneer.get_version(), cmdclass=cmdclass, @@ -131,7 +131,7 @@ setup( test_suite='nose.collector', tests_require=utils.parse_requirements( reqfiles=['pkg/requirements-testing.pip']), - keywords='LEAP, client, qt, encryption, proxy, openvpn, imap, smtp', + keywords='Bitmask, LEAP, client, qt, encryption, proxy, openvpn, imap, smtp', author='The LEAP Encryption Access Project', author_email='info@leap.se', url='https://leap.se', @@ -146,7 +146,7 @@ setup( # looks like debhelper is honoring it... data_files=[ # ("share/man/man1", - # ["docs/man/leap-client.1"]), + # ["docs/man/bitmask.1"]), ("share/polkit-1/actions", ["pkg/linux/polkit/net.openvpn.gui.leap.policy"]), ], -- cgit v1.2.3 From 9cfc75767ae440bef83e5cd7a5e34c1b3ba7a215 Mon Sep 17 00:00:00 2001 From: Ivan Alejandro Date: Thu, 8 Aug 2013 11:11:05 -0300 Subject: pep8 fixes --- setup.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index 4c37c56d..4b36ad72 100755 --- a/setup.py +++ b/setup.py @@ -70,6 +70,7 @@ def copy_reqs(path, withsrc=False): with open(reqsfile, "w") as f: f.write('\n'.join(parsed_reqs)) + class cmd_develop(_develop): def run(self): # versioneer: @@ -131,7 +132,8 @@ setup( test_suite='nose.collector', tests_require=utils.parse_requirements( reqfiles=['pkg/requirements-testing.pip']), - keywords='Bitmask, LEAP, client, qt, encryption, proxy, openvpn, imap, smtp', + keywords=('Bitmask, LEAP, client, qt, encryption, ' + 'proxy, openvpn, imap, smtp'), author='The LEAP Encryption Access Project', author_email='info@leap.se', url='https://leap.se', @@ -145,10 +147,10 @@ setup( # not being used? -- setuptools does not like it. # looks like debhelper is honoring it... data_files=[ - # ("share/man/man1", - # ["docs/man/bitmask.1"]), + # ("share/man/man1", + # ["docs/man/bitmask.1"]), ("share/polkit-1/actions", - ["pkg/linux/polkit/net.openvpn.gui.leap.policy"]), + ["pkg/linux/polkit/net.openvpn.gui.leap.policy"]), ], zip_safe=False, platforms="all", -- cgit v1.2.3 From 948f4a768666ef5894c8daaa8260d2ddb82c38de Mon Sep 17 00:00:00 2001 From: Ivan Alejandro Date: Thu, 8 Aug 2013 11:41:12 -0300 Subject: Update docs/, leap-client to bitmask. --- docs/config/files.rst | 2 +- docs/dev/environment.rst | 14 +++---- docs/dev/internals.rst | 2 +- docs/dev/internationalization.rst | 10 ++--- docs/man/bitmask.1.rst | 86 +++++++++++++++++++++++++++++++++++++++ docs/man/leap-client.1.rst | 86 --------------------------------------- docs/testers/howto.rst | 28 ++++++------- docs/user/install.rst | 14 +++---- docs/user/intro.rst | 16 ++++---- docs/user/running.rst | 20 ++++----- 10 files changed, 139 insertions(+), 139 deletions(-) create mode 100644 docs/man/bitmask.1.rst delete mode 100644 docs/man/leap-client.1.rst diff --git a/docs/config/files.rst b/docs/config/files.rst index 0f4abead..70d3bff8 100644 --- a/docs/config/files.rst +++ b/docs/config/files.rst @@ -3,7 +3,7 @@ Configuration Files =================== -This document covers the different configuration files used by the LEAP Client. +This document covers the different configuration files used by Bitmask. leap.conf --------- diff --git a/docs/dev/environment.rst b/docs/dev/environment.rst index 010ccc83..7ce536f9 100644 --- a/docs/dev/environment.rst +++ b/docs/dev/environment.rst @@ -3,7 +3,7 @@ Setting up a development environment ==================================== -This document covers how to get an enviroment ready to contribute code to the LEAP Client. +This document covers how to get an enviroment ready to contribute code to Bitmask. Cloning the repo ---------------- @@ -13,12 +13,12 @@ Cloning the repo :: - git clone git://leap.se/leap_client + git clone git://leap.se/bitmask git checkout develop Base Dependencies ------------------ -Leap client depends on these libraries: +Bitmask depends on these libraries: * `python 2.6 or 2.7` * `qt4` libraries (see also :ref:`Troubleshooting PySide install ` about how to install inside your virtualenv) @@ -100,10 +100,10 @@ You can install python dependencies with ``pip``. If you do it inside your worki Copy script files ----------------- -The openvpn invocation expects some files to be in place. If you have not installed `leap-client` from a debian package, you must copy these files manually by now:: +The openvpn invocation expects some files to be in place. If you have not installed `bitmask` from a debian package, you must copy these files manually by now:: $ sudo mkdir -p /etc/leap - $ sudo cp pkg/linux/resolv-update /etc/leap + $ sudo cp pkg/linux/resolv-update /etc/leap .. _policykit: @@ -111,9 +111,9 @@ Running openvpn without root privileges --------------------------------------- In linux, we are using ``policykit`` to be able to run openvpn without root privileges, and a policy file is needed to be installed for that to be possible. -The setup script tries to install the policy file when installing the client system-wide, so if you have installed the client in your global site-packages at least once it should have copied this file for you. +The setup script tries to install the policy file when installing bitmask system-wide, so if you have installed bitmask in your global site-packages at least once it should have copied this file for you. -If you *only* are running the client from inside a virtualenv, you will need to copy this file by hand:: +If you *only* are running bitmask from inside a virtualenv, you will need to copy this file by hand:: $ sudo cp pkg/linux/polkit/net.openvpn.gui.leap.policy /usr/share/polkit-1/actions/ diff --git a/docs/dev/internals.rst b/docs/dev/internals.rst index 8bb19211..e43868f3 100644 --- a/docs/dev/internals.rst +++ b/docs/dev/internals.rst @@ -3,7 +3,7 @@ Internals ========= -This section covers briefly the internal organization of the LEAP Client source tree. +This section covers briefly the internal organization of Bitmask source tree. .. note:: diff --git a/docs/dev/internationalization.rst b/docs/dev/internationalization.rst index 8c584fdd..38db8d75 100644 --- a/docs/dev/internationalization.rst +++ b/docs/dev/internationalization.rst @@ -3,11 +3,11 @@ Internationalization ==================== -This part of the documentation covers the localization and translation of LEAP Client. +This part of the documentation covers the localization and translation of Bitmask. Because we want to *bring fire to the people*, in as many countries and languages as possible. -Translating the LEAP Client PySide Application --------------------------------------------- +Translating Bitmask PySide Application +-------------------------------------- .. raw:: html @@ -61,7 +61,7 @@ You need ``pyside-lupdate`` and ``lrelease`` for these steps. To get it, in debi If you do not already have it, install the ``transifex-client`` from the cheese shop:: - pip install transifex-client + pip install transifex-client You can learn more about the transifex-client `here `_. @@ -89,7 +89,7 @@ Note that there is a configuration option in ``.tx/config`` for setting the mini **6.** Generate .qm files from the updated .ts files:: - $ make translations + $ make translations and yes, it's the same command than in step 2. One less thing to remember :) diff --git a/docs/man/bitmask.1.rst b/docs/man/bitmask.1.rst new file mode 100644 index 00000000..12c87a5d --- /dev/null +++ b/docs/man/bitmask.1.rst @@ -0,0 +1,86 @@ +======= +bitmask +======= + +------------------------------------------------------------------------ +graphical client to control LEAP, the encrypted internet access toolkit. +------------------------------------------------------------------------ + +:Author: LEAP Encryption Access Project https://leap.se +:Date: 2013-01-30 +:Copyright: GPLv3+ +:Version: 0.2 +:Manual section: 1 +:Manual group: General Commands Manual + +SYNOPSIS +======== + +bitmask [-h] [-d] [-l [LOG FILE]] [--openvpn-verbosity [OPENVPN_VERB]] + +DESCRIPTION +=========== + +*bitmask* is a graphical client to control LEAP, the encrypted internet access toolkit. + +When launched, it places an icon in the system tray from where the LEAP services can be controlled. + + +OPTIONS +======= + +general options +--------------- + +**-h, --help** Print a help message and exit. + +**-d, --debug** Launches client in debug mode, writing debug info to stdout. + +**---logfile=** Writes log to file. + +openvpn options +--------------- + +**--openvpn-verbosity** [0-5] Verbosity level for openvpn logs. + + +WARNING +======= + +This software is still in early alfa testing. So don't trust your life to it! + +At the current time, Bitmask is not compatible with ``openresolv``, but it works with ``resolvconf``. + +FILES +===== + +/etc/leap/resolv-update +----------------------- +Post up/down script passed to openvpn. It writes /etc/resolv.conf to avoid dns leaks, and restores the original resolv.conf on exit. + +/etc/leap/resolv-head +--------------------- +/etc/leap/resolv-tail +--------------------- + +Custom entries that will appear in the written resolv.conf + +/usr/share/polkit-1/actions/net.openvpn.gui.leap.policy +------------------------------------------------------- + +PolicyKit policy file, used for granting access to openvpn without the need of entering a password each time. + +~/.config/leap/ +--------------- + +Main config folder + +~/.config/leap/leap.conf +------------------------ + +GUI options + +BUGS +==== + +Please report any bugs to https://leap.se/code diff --git a/docs/man/leap-client.1.rst b/docs/man/leap-client.1.rst deleted file mode 100644 index 1ef5b3cc..00000000 --- a/docs/man/leap-client.1.rst +++ /dev/null @@ -1,86 +0,0 @@ -=========== -leap-client -=========== - ------------------------------------------------------------------------- -graphical client to control LEAP, the encrypted internet access toolkit. ------------------------------------------------------------------------- - -:Author: LEAP Encryption Access Project https://leap.se -:Date: 2013-01-30 -:Copyright: GPLv3+ -:Version: 0.2 -:Manual section: 1 -:Manual group: General Commands Manual - -SYNOPSIS -======== - -leap-client [-h] [-d] [-l [LOG FILE]] [--openvpn-verbosity [OPENVPN_VERB]] - -DESCRIPTION -=========== - -*leap-client* is a graphical client to control LEAP, the encrypted internet access toolkit. - -When launched, it places an icon in the system tray from where the LEAP services can be controlled. - - -OPTIONS -======= - -general options ---------------- - -**-h, --help** Print a help message and exit. - -**-d, --debug** Launches client in debug mode, writing debug info to stdout. - -**---logfile=** Writes log to file. - -openvpn options ---------------- - -**--openvpn-verbosity** [0-5] Verbosity level for openvpn logs. - - -WARNING -======= - -This software is still in early alfa testing. So don't trust your life to it! - -At the current time, the LEAP Client is not compatible with ``openresolv``, but it works with ``resolvconf``. - -FILES -===== - -/etc/leap/resolv-update ------------------------ -Post up/down script passed to openvpn. It writes /etc/resolv.conf to avoid dns leaks, and restores the original resolv.conf on exit. - -/etc/leap/resolv-head ---------------------- -/etc/leap/resolv-tail ---------------------- - -Custom entries that will appear in the written resolv.conf - -/usr/share/polkit-1/actions/net.openvpn.gui.leap.policy -------------------------------------------------------- - -PolicyKit policy file, used for granting access to openvpn without the need of entering a password each time. - -~/.config/leap/ ---------------- - -Main config folder - -~/.config/leap/leap.conf ------------------------- - -GUI options - -BUGS -==== - -Please report any bugs to https://leap.se/code diff --git a/docs/testers/howto.rst b/docs/testers/howto.rst index a3f8da09..520d9dd0 100644 --- a/docs/testers/howto.rst +++ b/docs/testers/howto.rst @@ -34,19 +34,19 @@ Bootstrap script This will fetch the *develop* branch. If you want to test another branch, just change it in the line starting with *pip install...*. Alternatively, bug kali so she add an option branch to a decent script. .. note:: - This script could make use of the after_install hook. Read http://pypi.python.org/pypi/virtualenv/ + This script could make use of the after_install hook. Read http://pypi.python.org/pypi/virtualenv/ Download and source the following script in the parent folder where you want your testing build to be downloaded. For instance, to `/tmp/`: .. code-block:: bash cd /tmp - wget https://raw.github.com/leapcode/leap_client/develop/pkg/scripts/leap_client_bootstrap.sh + wget https://raw.github.com/leapcode/bitmask/develop/pkg/scripts/leap_client_bootstrap.sh source leap_client_bootstrap.sh -Tada! If everything went well, you should be able to run the client by typing:: +Tada! If everything went well, you should be able to run bitmask by typing:: - bin/leap-client + bin/bitmask Noticed that your prompt changed? That was *virtualenv*. Keep reading... @@ -54,7 +54,7 @@ Activating the virtualenv ^^^^^^^^^^^^^^^^^^^^^^^^^ The above bootstrap script has fetched latest code inside a virtualenv, which is an isolated, *virtual* python local environment that avoids messing with your global paths. You will notice you are *inside* a virtualenv because you will see a modified prompt reminding it to you (*leap-client-testbuild* in this case). -Thus, if you forget to *activate your virtualenv*, the client will not run from the local path, and it will be looking for something else in your global path. So, **you have to remember to activate your virtualenv** each time that you open a new shell and want to execute the code you are testing. You can do this by typing:: +Thus, if you forget to *activate your virtualenv*, bitmask will not run from the local path, and it will be looking for something else in your global path. So, **you have to remember to activate your virtualenv** each time that you open a new shell and want to execute the code you are testing. You can do this by typing:: $ source bin/activate @@ -65,11 +65,11 @@ Refer to :ref:`Working with virtualenv ` to learn more about virtual Copying config files ^^^^^^^^^^^^^^^^^^^^ -If you have never installed the ``leap-client`` globally, **you need to copy some files to its proper path before running it for the first time** (you only need to do this once). This, unless the virtualenv-based operations, will need root permissions. See :ref:`copy script files ` and :ref:`running openvpn without root privileges ` sections for more info on this. In short:: +If you have never installed ``bitmask`` globally, **you need to copy some files to its proper path before running it for the first time** (you only need to do this once). This, unless the virtualenv-based operations, will need root permissions. See :ref:`copy script files ` and :ref:`running openvpn without root privileges ` sections for more info on this. In short:: $ sudo cp pkg/linux/polkit/net.openvpn.gui.leap.policy /usr/share/polkit-1/actions/ $ sudo mkdir -p /etc/leap - $ sudo cp pkg/linux/resolv-update /etc/leap + $ sudo cp pkg/linux/resolv-update /etc/leap Local config files ^^^^^^^^^^^^^^^^^^^ @@ -83,8 +83,8 @@ Pulling latest changes You should be able to cd into the downloaded repo and pull latest changes:: - (leap-client-testbuild)$ cd src/leap-client - (leap-client-testbuild)$ git pull origin develop + (bitmask-testbuild)$ cd src/bitmask + (bitmask-testbuild)$ git pull origin develop However, as a tester you are encouraged to run the whole bootstrap process from time to time to help us catching install and versioniing bugs too. @@ -97,11 +97,11 @@ Testing the status of translations We need translators! You can go to `transifex `_, get an account and start contributing. -If you want to check the current status of the client localization in a language other than the one set in your machine, you can do it with a simple trick (under linux). For instance, do:: +If you want to check the current status of bitmask localization in a language other than the one set in your machine, you can do it with a simple trick (under linux). For instance, do:: - $ lang=es_ES leap-client + $ lang=es_ES bitmask -for running LEAP Client with the spanish locales. +for running Bitmask with the spanish locales. Reporting bugs -------------- @@ -110,6 +110,6 @@ Reporting bugs There is a great text on the art of bug reporting, that can be found `online `_. -.. TODO add a line with ref. to running the client in debug mode... +.. TODO add a line with ref. to running Bitmask in debug mode... -We use the `LEAP Client Bug Tracker `_, although you can also use `Github issues `_. +We use the `Bitmask Bug Tracker `_, although you can also use `Github issues `_. diff --git a/docs/user/install.rst b/docs/user/install.rst index 0467ba8b..da1d914c 100644 --- a/docs/user/install.rst +++ b/docs/user/install.rst @@ -3,7 +3,7 @@ Installation ============ -This part of the documentation covers the installation of the LEAP Client. +This part of the documentation covers the installation of Bitmask. We assume that you want to get it properly installed before being able to use it. .. note:: @@ -16,9 +16,9 @@ Distribute & Pip .. warning:: The package in the cheese shop is from the stable, `0.2.0` release, which is now outdated. You are encouraged to install the development version instead. -Installing LEAP Client is as simple as using `pip `_ for the already released versions :: +Installing Bitmask is as simple as using `pip `_ for the already released versions :: - $ pip install leap-client + $ pip install bitmask Debian package -------------- @@ -40,20 +40,20 @@ Add the archive to your sources.list:: # apt-get update # apt-get install leap-keyring -And then you can happily install leap-client:: +And then you can happily install bitmask:: - apt-get install leap-client + apt-get install bitmask Show me the code! ----------------- You can get the code from LEAP public git repository :: - $ git clone git://leap.se/leap_client + $ git clone git://leap.se/bitmask Or from the github mirror :: - $ git clone git://github.com/leapcode/leap_client.git + $ git clone git://github.com/leapcode/bitmask.git Once you have grabbed a copy of the sources, you can install it into your site-packages easily :: diff --git a/docs/user/intro.rst b/docs/user/intro.rst index 9461d5f2..22ad9356 100644 --- a/docs/user/intro.rst +++ b/docs/user/intro.rst @@ -3,15 +3,15 @@ Introduction ============ -The LEAP Client ---------------- +Bitmask +------- .. if yoy change this, change it also in the index.rst -The **LEAP Client** is a :ref:`GPL3 Licensed ` multiplatform client, written in python using PySide, that supports the features offered by :ref:`the LEAP Platform `. Currently is being tested on Linux, support for OSX and Windows will come soon. +**Bitmask** is a :ref:`GPL3 Licensed ` multiplatform client, written in python using PySide, that supports the features offered by :ref:`the LEAP Platform `. Currently is being tested on Linux, support for OSX and Windows will come soon. Features ^^^^^^^^ -The LEAP Client allows to easily secure communications. +Bitmask allows to easily secure communications. - Provider selection - User registration @@ -78,22 +78,22 @@ GPLv3 License .. image:: gpl.* -The LEAP Client is released under the terms of the `GNU GPL version 3`_ or later. +Bitmask is released under the terms of the `GNU GPL version 3`_ or later. :: - The LEAP Client is free software: you can redistribute it and/or modify + Bitmask is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - The LEAP Client is distributed in the hope that it will be useful, + Bitmask is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with the LEAP Client. If not, see http://www.gnu.org/licenses/. + along with Bitmask. If not, see http://www.gnu.org/licenses/. .. _`GNU GPL version 3`: http://www.gnu.org/licenses/gpl.txt diff --git a/docs/user/running.rst b/docs/user/running.rst index 43f3e87c..da83e9ef 100644 --- a/docs/user/running.rst +++ b/docs/user/running.rst @@ -3,13 +3,13 @@ Running ================== -This document covers how to launch the LEAP Client. +This document covers how to launch Bitmask. -Launching the client --------------------- -After a successful installation, there should be a launcher called `leap-client` somewhere in your path:: +Launching Bitmask +----------------- +After a successful installation, there should be a launcher called `bitmask` somewhere in your path:: - % leap-client + % bitmask The first time you launch it, it should launch the first run wizard that will guide you through the setup of the LEAP Services. @@ -21,13 +21,13 @@ The first time you launch it, it should launch the first run wizard that will gu Debug mode ---------- -If you are happy having lots of output in your terminal, you will like to know that you can run the client in debug mode:: +If you are happy having lots of output in your terminal, you will like to know that you can run bitmask in debug mode:: - $ leap-client --debug + $ bitmask --debug If you ask for it, you can also have all that debug info in a beautiful file ready to be attached to your bug reports:: - $ leap-client --debug --logfile /tmp/leap.log + $ bitmask --debug --logfile /tmp/leap.log .. warning .. the following is broken since it will clutter your stdout with all the commands sent to the management interface. @@ -35,10 +35,10 @@ If you ask for it, you can also have all that debug info in a beautiful file rea .. not working... .. If you want to increment the level of verbosity passed to openvpn, you can do:: -.. $ leap-client --openvpn-verbosity 4 +.. $ bitmask --openvpn-verbosity 4 Options ------------ To see all the available command line options:: - $ leap-client --help + $ bitmask --help -- cgit v1.2.3 From fbb4dd62e2e70fb467b2fe6fb05911c989fb34ee Mon Sep 17 00:00:00 2001 From: Ivan Alejandro Date: Thu, 8 Aug 2013 12:55:53 -0300 Subject: Update images, jumping guy -> rainbow mask. --- data/images/mask-icon.png | Bin 0 -> 16575 bytes data/images/mask-launcher.png | Bin 0 -> 37759 bytes data/resources/mainwindow.qrc | 2 ++ src/leap/gui/ui/loggerwindow.ui | 2 +- src/leap/gui/ui/mainwindow.ui | 4 ++-- src/leap/gui/ui/wizard.ui | 2 +- 6 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 data/images/mask-icon.png create mode 100644 data/images/mask-launcher.png diff --git a/data/images/mask-icon.png b/data/images/mask-icon.png new file mode 100644 index 00000000..3504bae9 Binary files /dev/null and b/data/images/mask-icon.png differ diff --git a/data/images/mask-launcher.png b/data/images/mask-launcher.png new file mode 100644 index 00000000..cb27f8d3 Binary files /dev/null and b/data/images/mask-launcher.png differ diff --git a/data/resources/mainwindow.qrc b/data/resources/mainwindow.qrc index 655f2812..d1268186 100644 --- a/data/resources/mainwindow.qrc +++ b/data/resources/mainwindow.qrc @@ -1,5 +1,7 @@ + ../images/mask-launcher.png + ../images/mask-icon.png ../images/watermark.png ../images/leap-gray-big.png ../images/Blue-Arrow-Right-32.png diff --git a/src/leap/gui/ui/loggerwindow.ui b/src/leap/gui/ui/loggerwindow.ui index 28325cdf..b08428a9 100644 --- a/src/leap/gui/ui/loggerwindow.ui +++ b/src/leap/gui/ui/loggerwindow.ui @@ -15,7 +15,7 @@ - :/images/leap-color-big.png:/images/leap-color-big.png + :/images/mask-icon.png:/images/mask-icon.png diff --git a/src/leap/gui/ui/mainwindow.ui b/src/leap/gui/ui/mainwindow.ui index c3523823..ecd3cbe9 100644 --- a/src/leap/gui/ui/mainwindow.ui +++ b/src/leap/gui/ui/mainwindow.ui @@ -15,7 +15,7 @@ - :/images/leap-color-big.png:/images/leap-color-big.png + :/images/mask-icon.png:/images/mask-icon.png Qt::ImhHiddenText @@ -166,7 +166,7 @@ - :/images/leap-color-big.png + :/images/mask-launcher.png Qt::AlignCenter diff --git a/src/leap/gui/ui/wizard.ui b/src/leap/gui/ui/wizard.ui index d7355d5d..a8f66bbc 100644 --- a/src/leap/gui/ui/wizard.ui +++ b/src/leap/gui/ui/wizard.ui @@ -15,7 +15,7 @@ - :/images/leap-color-big.png:/images/leap-color-big.png + :/images/mask-icon.png:/images/mask-icon.png true -- cgit v1.2.3 From 1f03efa202e4b604b9fb50d0742dc756691e9803 Mon Sep 17 00:00:00 2001 From: Ivan Alejandro Date: Thu, 8 Aug 2013 14:50:51 -0300 Subject: Add changes file, feature 3313. --- changes/feature-3313_rebrand-the-client | 1 + 1 file changed, 1 insertion(+) create mode 100644 changes/feature-3313_rebrand-the-client diff --git a/changes/feature-3313_rebrand-the-client b/changes/feature-3313_rebrand-the-client new file mode 100644 index 00000000..4e10345e --- /dev/null +++ b/changes/feature-3313_rebrand-the-client @@ -0,0 +1 @@ + o Rebrand the client to be named Bitmask. Feature #3313. -- cgit v1.2.3 From 0e844310a49b06e3fcf6184b058915aa8b572642 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Touceda?= Date: Thu, 8 Aug 2013 15:21:37 -0300 Subject: Set default port for SMTP to be 2013 --- src/leap/gui/mainwindow.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/leap/gui/mainwindow.py b/src/leap/gui/mainwindow.py index 90492e45..1fa962a1 100644 --- a/src/leap/gui/mainwindow.py +++ b/src/leap/gui/mainwindow.py @@ -1033,7 +1033,7 @@ class MainWindow(QtGui.QMainWindow): from leap.mail.smtp import setup_smtp_relay client_cert = self._eip_config.get_client_cert_path( self._provider_config) - setup_smtp_relay(port=1234, + setup_smtp_relay(port=2013, keymanager=self._keymanager, smtp_host=host, smtp_port=port, -- cgit v1.2.3 From 27a059b28be9b05995b74b968d509c3cea19b72c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Touceda?= Date: Thu, 8 Aug 2013 15:21:53 -0300 Subject: Support bundled gpg --- changes/feature_support_bundled_gpg | 2 ++ src/leap/gui/mainwindow.py | 3 ++- src/leap/services/soledad/soledadbootstrapper.py | 22 ++++++++++++++++++++-- 3 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 changes/feature_support_bundled_gpg diff --git a/changes/feature_support_bundled_gpg b/changes/feature_support_bundled_gpg new file mode 100644 index 00000000..8ef3d522 --- /dev/null +++ b/changes/feature_support_bundled_gpg @@ -0,0 +1,2 @@ + o Support bundled gpg. Related to #3397. + o Set the default port for SMTP to be 2013. \ No newline at end of file diff --git a/src/leap/gui/mainwindow.py b/src/leap/gui/mainwindow.py index 1fa962a1..463ba2c4 100644 --- a/src/leap/gui/mainwindow.py +++ b/src/leap/gui/mainwindow.py @@ -927,7 +927,8 @@ class MainWindow(QtGui.QMainWindow): self._provider_config, self._login_widget.get_user(), self._login_widget.get_password(), - download_if_needed=True) + download_if_needed=True, + stanalone=self._standalone) self._download_eip_config() diff --git a/src/leap/services/soledad/soledadbootstrapper.py b/src/leap/services/soledad/soledadbootstrapper.py index 7ac4203b..c67bc004 100644 --- a/src/leap/services/soledad/soledadbootstrapper.py +++ b/src/leap/services/soledad/soledadbootstrapper.py @@ -198,6 +198,14 @@ class SoledadBootstrapper(AbstractBootstrapper): logger.debug("Retrieving key for %s" % (address,)) srp_auth = SRPAuth(self._provider_config) + + # TODO: Fix for Windows + gpgbin = "/usr/bin/gpg" + + if self._standalone: + gpgbin = os.path.join(self._provider_config.get_path_prefix(), + "..", "apps", "mail", "gpg") + self._keymanager = KeyManager( address, "https://nicknym.%s:6425" % (self._provider_config.get_domain(),), @@ -207,7 +215,8 @@ class SoledadBootstrapper(AbstractBootstrapper): ca_cert_path=self._provider_config.get_ca_cert_path(), api_uri=self._provider_config.get_api_uri(), api_version=self._provider_config.get_api_version(), - uid=srp_auth.get_uid()) + uid=srp_auth.get_uid(), + gpgbinary=gpgbin) try: self._keymanager.get_key(address, openpgp.OpenPGPKey, private=True, fetch_remote=False) @@ -221,7 +230,8 @@ class SoledadBootstrapper(AbstractBootstrapper): provider_config, user, password, - download_if_needed=False): + download_if_needed=False, + standalone=False): """ Starts the checks needed for a new soledad setup @@ -231,6 +241,13 @@ class SoledadBootstrapper(AbstractBootstrapper): :type user: str :param password: User's password :type password: str + :param download_if_needed: If True, it will only download + files if the have changed since the + time it was previously downloaded. + :type download_if_needed: bool + :param standalone: If True, it'll look for paths inside the + bundle (like for gpg) + :type standalone: bool """ leap_assert_type(provider_config, ProviderConfig) @@ -238,6 +255,7 @@ class SoledadBootstrapper(AbstractBootstrapper): self._download_if_needed = download_if_needed self._user = user self._password = password + self._standalone = standalone cb_chain = [ (self._download_config, self.download_config), -- cgit v1.2.3 From b0ea78859d2b237e9a6f1e4731ea10351f568b71 Mon Sep 17 00:00:00 2001 From: Ivan Alejandro Date: Thu, 8 Aug 2013 16:20:14 -0300 Subject: Update Transifex project name & translators' docs. --- .tx/config | 2 +- changes/feature-3418_update-transifex-project-name | 1 + docs/dev/internationalization.rst | 8 ++++---- docs/testers/howto.rst | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) create mode 100644 changes/feature-3418_update-transifex-project-name diff --git a/.tx/config b/.tx/config index db998b21..31ea5b1c 100644 --- a/.tx/config +++ b/.tx/config @@ -1,7 +1,7 @@ [main] host = https://www.transifex.com -[leap-client.leap-client] +[bitmask.bitmask] file_filter = data/translations/.ts source_file = data/ts/en_US.ts diff --git a/changes/feature-3418_update-transifex-project-name b/changes/feature-3418_update-transifex-project-name new file mode 100644 index 00000000..2ac7485a --- /dev/null +++ b/changes/feature-3418_update-transifex-project-name @@ -0,0 +1 @@ + o Update Transifex project name and translators' documentation. Closes #3418. diff --git a/docs/dev/internationalization.rst b/docs/dev/internationalization.rst index 38db8d75..21d58924 100644 --- a/docs/dev/internationalization.rst +++ b/docs/dev/internationalization.rst @@ -11,7 +11,7 @@ Translating Bitmask PySide Application .. raw:: html - + For translators @@ -21,7 +21,7 @@ For translators as internal notes. -We are using `transifex `_ to coordinate translation efforts. If you want to contribute, just sign up there and ... +We are using `transifex `_ to coordinate translation efforts. If you want to contribute, just sign up there and ... .. note:: ... and what?? @@ -80,7 +80,7 @@ You can learn more about the transifex-client `here es: data/translations/es.ts Done. @@ -101,7 +101,7 @@ and yes, it's the same command than in step 2. One less thing to remember :) If you want to try it, just set your LANG environment variable:: - $ LANG=es_ES leap-client + $ LANG=es_ES bitmask Translating the Documentation diff --git a/docs/testers/howto.rst b/docs/testers/howto.rst index 520d9dd0..dde893d1 100644 --- a/docs/testers/howto.rst +++ b/docs/testers/howto.rst @@ -95,7 +95,7 @@ When we have a release candidate for the supported platforms (Debian stable, Ubu Testing the status of translations ---------------------------------- -We need translators! You can go to `transifex `_, get an account and start contributing. +We need translators! You can go to `transifex `_, get an account and start contributing. If you want to check the current status of bitmask localization in a language other than the one set in your machine, you can do it with a simple trick (under linux). For instance, do:: -- cgit v1.2.3 From 3f85d90c1d0dd2a18190fad4c43c20e9615a43e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Touceda?= Date: Thu, 8 Aug 2013 16:37:47 -0300 Subject: Fix typo in standalone param --- src/leap/gui/mainwindow.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/leap/gui/mainwindow.py b/src/leap/gui/mainwindow.py index 463ba2c4..5ace1043 100644 --- a/src/leap/gui/mainwindow.py +++ b/src/leap/gui/mainwindow.py @@ -928,7 +928,7 @@ class MainWindow(QtGui.QMainWindow): self._login_widget.get_user(), self._login_widget.get_password(), download_if_needed=True, - stanalone=self._standalone) + standalone=self._standalone) self._download_eip_config() -- cgit v1.2.3 From f361f4ba74a6a34b7b524ca2a828bd888c7d135c Mon Sep 17 00:00:00 2001 From: Ivan Alejandro Date: Fri, 9 Aug 2013 11:46:41 -0300 Subject: Update documentation. --- Makefile | 4 +-- data/bitmask.pro | 56 +++++++++++++++++++++++++++++++++++++++ data/leap_client.pro | 56 --------------------------------------- docs/dev/internationalization.rst | 2 +- docs/dev/tests.rst | 4 +-- 5 files changed, 61 insertions(+), 61 deletions(-) create mode 100644 data/bitmask.pro delete mode 100644 data/leap_client.pro diff --git a/Makefile b/Makefile index 7d8f2c23..0c9b7951 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ COMPILED_DIR = src/leap/gui TRANSLAT_DIR = data/translations #Project file, used for translations -PROJFILE = data/leap_client.pro +PROJFILE = data/bitmask.pro #UI files to compile UI_FILES = loggerwindow.ui mainwindow.ui wizard.ui login.ui statuspanel.ui @@ -58,7 +58,7 @@ $(COMPILED_DIR)/%_rc.py : $(RESOURCE_DIR)/%.qrc $(PYRCC) $< -o $@ manpages: - rst2man docs/man/leap.1.rst docs/man/leap.1 + rst2man docs/man/bitmask.1.rst docs/man/bitmask.1 apidocs: @sphinx-apidoc -o docs/api src/leap diff --git a/data/bitmask.pro b/data/bitmask.pro new file mode 100644 index 00000000..ff26ad1a --- /dev/null +++ b/data/bitmask.pro @@ -0,0 +1,56 @@ +# qmake file + +# is not there a f*** way of expanding this? other to template with python I mean... + +# to get a list of python files we can use: +# find . -iname "*.py" | grep -Ev "__init__.py|/build/|/docs/|/gui/ui_[a-z]*.py|/gui/[a-z]*_rc.py|./.venv/|/tests/" +# and remove by hand the few files that we do not want. + +SOURCES += ../src/leap/app.py \ + ../src/leap/config/leapsettings.py \ + ../src/leap/config/providerconfig.py \ + ../src/leap/crypto/srpauth.py \ + ../src/leap/crypto/srpregister.py \ + ../src/leap/gui/loggerwindow.py \ + ../src/leap/gui/login.py \ + ../src/leap/gui/mainwindow.py \ + ../src/leap/gui/statuspanel.py \ + ../src/leap/gui/twisted_main.py \ + ../src/leap/gui/wizardpage.py \ + ../src/leap/gui/wizard.py \ + ../src/leap/platform_init/initializers.py \ + ../src/leap/platform_init/locks.py \ + ../src/leap/provider/supportedapis.py \ + ../src/leap/services/abstractbootstrapper.py \ + ../src/leap/services/eip/eipbootstrapper.py \ + ../src/leap/services/eip/eipconfig.py \ + ../src/leap/services/eip/providerbootstrapper.py \ + ../src/leap/services/eip/udstelnet.py \ + ../src/leap/services/eip/vpnlaunchers.py \ + ../src/leap/services/eip/vpnprocess.py \ + ../src/leap/services/mail/smtpbootstrapper.py \ + ../src/leap/services/mail/smtpconfig.py \ + ../src/leap/services/soledad/soledadbootstrapper.py \ + ../src/leap/services/soledad/soledadconfig.py \ + ../src/leap/services/tx.py \ + ../src/leap/util/constants.py \ + ../src/leap/util/keyring_helpers.py \ + ../src/leap/util/leap_argparse.py \ + ../src/leap/util/leap_log_handler.py \ + ../src/leap/util/privilege_policies.py \ + ../src/leap/util/pyside_tests_helper.py \ + ../src/leap/util/request_helpers.py \ + ../src/leap/util/requirement_checker.py + +FORMS += ../src/leap/gui/ui/loggerwindow.ui \ + ../src/leap/gui/ui/login.ui \ + ../src/leap/gui/ui/mainwindow.ui \ + ../src/leap/gui/ui/statuspanel.ui \ + ../src/leap/gui/ui/wizard.ui \ + +# where to generate ts files -- tx will pick from here + +# original file, english + +TRANSLATIONS += ts/en_US.ts + diff --git a/data/leap_client.pro b/data/leap_client.pro deleted file mode 100644 index ff26ad1a..00000000 --- a/data/leap_client.pro +++ /dev/null @@ -1,56 +0,0 @@ -# qmake file - -# is not there a f*** way of expanding this? other to template with python I mean... - -# to get a list of python files we can use: -# find . -iname "*.py" | grep -Ev "__init__.py|/build/|/docs/|/gui/ui_[a-z]*.py|/gui/[a-z]*_rc.py|./.venv/|/tests/" -# and remove by hand the few files that we do not want. - -SOURCES += ../src/leap/app.py \ - ../src/leap/config/leapsettings.py \ - ../src/leap/config/providerconfig.py \ - ../src/leap/crypto/srpauth.py \ - ../src/leap/crypto/srpregister.py \ - ../src/leap/gui/loggerwindow.py \ - ../src/leap/gui/login.py \ - ../src/leap/gui/mainwindow.py \ - ../src/leap/gui/statuspanel.py \ - ../src/leap/gui/twisted_main.py \ - ../src/leap/gui/wizardpage.py \ - ../src/leap/gui/wizard.py \ - ../src/leap/platform_init/initializers.py \ - ../src/leap/platform_init/locks.py \ - ../src/leap/provider/supportedapis.py \ - ../src/leap/services/abstractbootstrapper.py \ - ../src/leap/services/eip/eipbootstrapper.py \ - ../src/leap/services/eip/eipconfig.py \ - ../src/leap/services/eip/providerbootstrapper.py \ - ../src/leap/services/eip/udstelnet.py \ - ../src/leap/services/eip/vpnlaunchers.py \ - ../src/leap/services/eip/vpnprocess.py \ - ../src/leap/services/mail/smtpbootstrapper.py \ - ../src/leap/services/mail/smtpconfig.py \ - ../src/leap/services/soledad/soledadbootstrapper.py \ - ../src/leap/services/soledad/soledadconfig.py \ - ../src/leap/services/tx.py \ - ../src/leap/util/constants.py \ - ../src/leap/util/keyring_helpers.py \ - ../src/leap/util/leap_argparse.py \ - ../src/leap/util/leap_log_handler.py \ - ../src/leap/util/privilege_policies.py \ - ../src/leap/util/pyside_tests_helper.py \ - ../src/leap/util/request_helpers.py \ - ../src/leap/util/requirement_checker.py - -FORMS += ../src/leap/gui/ui/loggerwindow.ui \ - ../src/leap/gui/ui/login.ui \ - ../src/leap/gui/ui/mainwindow.ui \ - ../src/leap/gui/ui/statuspanel.ui \ - ../src/leap/gui/ui/wizard.ui \ - -# where to generate ts files -- tx will pick from here - -# original file, english - -TRANSLATIONS += ts/en_US.ts - diff --git a/docs/dev/internationalization.rst b/docs/dev/internationalization.rst index 21d58924..f9f522b9 100644 --- a/docs/dev/internationalization.rst +++ b/docs/dev/internationalization.rst @@ -65,7 +65,7 @@ If you do not already have it, install the ``transifex-client`` from the cheese You can learn more about the transifex-client `here `_. -**1.** Add any new source files to the project file, ``data/leap_client.pro``. *We should automate this with some templating, it's tedious.* +**1.** Add any new source files to the project file, ``data/bitmask.pro``. *We should automate this with some templating, it's tedious.* **2.** Update the source .ts file ``data/ts/en_US.ts``.:: diff --git a/docs/dev/tests.rst b/docs/dev/tests.rst index 7f5fbaaf..d55c206a 100644 --- a/docs/dev/tests.rst +++ b/docs/dev/tests.rst @@ -39,8 +39,8 @@ Hint: colorized output Install ``rednose`` locally, export the ``NOSE_REDNOSE`` variable, and give your eyes a rest :):: - (leap_client)% pip install rednose - (leap_client)% export NOSE_REDNOSE=1 + (bitmask)% pip install rednose + (bitmask)% export NOSE_REDNOSE=1 Testing all the supported python versions ----------------------------------------- -- cgit v1.2.3 From 0635f067d5c5b4c186abe7de4d8e692ad09a1416 Mon Sep 17 00:00:00 2001 From: Ivan Alejandro Date: Fri, 9 Aug 2013 11:47:15 -0300 Subject: Change prefix name, refactor imports. --- src/leap/_version.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/leap/_version.py b/src/leap/_version.py index 6f7e3d05..05542975 100644 --- a/src/leap/_version.py +++ b/src/leap/_version.py @@ -16,6 +16,8 @@ git_full = "$Format:%H$" import subprocess import sys +import re +import os.path def run_command(args, cwd=None, verbose=False): @@ -38,11 +40,6 @@ def run_command(args, cwd=None, verbose=False): return stdout -import sys -import re -import os.path - - def get_expanded_variables(versionfile_source): # the code embedded in _version.py can just fetch the value of these # variables. When used from setup.py, we don't want to import @@ -187,7 +184,7 @@ def versions_from_parentdir(parentdir_prefix, versionfile_source, return {"version": dirname[len(parentdir_prefix):], "full": ""} tag_prefix = "" -parentdir_prefix = "leap_client-" +parentdir_prefix = "bitmask-" versionfile_source = "src/leap/_version.py" -- cgit v1.2.3 From b942468aac94be2bf4bb9bc1849391e72c366697 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Touceda?= Date: Fri, 9 Aug 2013 12:14:07 -0300 Subject: Add relnotes back --- relnotes.txt | 81 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 relnotes.txt diff --git a/relnotes.txt b/relnotes.txt new file mode 100644 index 00000000..5f711005 --- /dev/null +++ b/relnotes.txt @@ -0,0 +1,81 @@ +ANNOUNCING Bitmask, the internet encryption toolkit, v0.3.0 + +The LEAP team is pleased to announce the immediate availability of +version 0.3.0 of Bitmask + +https://downloads.leap.se/client/ + +LEAP (LEAP Encryption Access Project) develops a plan to secure +everyday communication, breaking down into discrete services. + +The client for the current phase gives support to the EIP Service and +the first beta release of Encrypted Mail. +EIP (the Encrypted Internet Proxy) provides circumvention, +location anonymization, and traffic encryption in a hassle-free, +automatically self-configuring fashion. +Encrypted Mail + +You can read the user manual and the developer notes online at: + +http://bitmask.readthedocs.org/ + +WARNING: This is still a beta release of our services, a lot of +testing and audits are still needed so DO NOT use this for strong +security. + + +WHAT CAN THIS VERSION OF THE CLIENT DO FOR ME? + +You can connect to the EIP service offered by a provider of your +choice, and enjoy a encrypted internet connection. + +The first run wizard allows to register an user with the selected +provider, downloading all the config files needed to connect to the +eip service. There are also some minimal network checks in place. + + +LICENCE + +You may use this package under the GNU General Public License, +version 3 or, at your option, any later version. See the file +"COPYING.GPL" for the terms of the GNU General Public +License, version 3. + +In addition, as a special exception, the copyright holders give +permission to link the code of portions of this program with the +OpenSSL library under certain conditions as described in each +individual source file, and distribute linked combinations +including the two. + + +INSTALLATION + +The current version of the LEAP Client has been tested on GNU/Linux +and OSX, but it is likely that you are able to run it under other +systems, specially if you are skillful and patient is one of your +virtues. + +Have a look at "docs/user/install.rst". + +Packages are provided for debian and ubuntu. OSX and win installers +will be following soon. + + +BUGS + +You can send the bugs our way by pointing your telnet session to port 443 on +https://leap.se/code. We will do our best to make them follow our +intensive bug-reeducation program. + + +HACKING + +You can find us in the #leap-dev channel on the freenode network. +If you are lucky enough, you can spot us sleepless in night trains, +rooftops, rainforests, and beyond any border. + + +The LEAP team. + +Aug 9, 2013 +Somewhere in the middle of the intertubes. -- cgit v1.2.3