diff options
-rw-r--r-- | CHANGELOG | 2 | ||||
-rw-r--r-- | changes/bug-3617_remove-exec-bits-from-text-in-bundle | 1 | ||||
-rw-r--r-- | changes/bug-3778_fix-path-prefix-helper | 1 | ||||
-rw-r--r-- | changes/feature-3758_show-eip-and-mx-status-in-systray-tooltip | 2 | ||||
-rw-r--r-- | docs/dev/environment.rst | 10 | ||||
-rw-r--r-- | docs/release_checklist.wiki | 2 | ||||
-rwxr-xr-x | pkg/linux/build_bundle.sh | 12 | ||||
-rw-r--r-- | relnotes.txt | 2 | ||||
-rw-r--r-- | src/leap/bitmask/config/leapsettings.py | 12 | ||||
-rw-r--r-- | src/leap/bitmask/config/tests/test_leapsettings.py | 71 | ||||
-rw-r--r-- | src/leap/bitmask/gui/mainwindow.py | 2 | ||||
-rw-r--r-- | src/leap/bitmask/gui/statuspanel.py | 24 |
12 files changed, 120 insertions, 21 deletions
@@ -1,4 +1,4 @@ -0.3.2 Sep 9: +0.3.2 Sep 6 -- the "no crashes or anything" release: o Fix up script in non-bundle linuces. Closes: #3450 o Logout stops imap and smtp services. Closes: #3553 o Properly daemonize polkit-gnome-authentication-agent. Closes: #3554 diff --git a/changes/bug-3617_remove-exec-bits-from-text-in-bundle b/changes/bug-3617_remove-exec-bits-from-text-in-bundle new file mode 100644 index 00000000..caf3a62e --- /dev/null +++ b/changes/bug-3617_remove-exec-bits-from-text-in-bundle @@ -0,0 +1 @@ + o Remove execution bits in text files in bundle. Closes #3617. diff --git a/changes/bug-3778_fix-path-prefix-helper b/changes/bug-3778_fix-path-prefix-helper new file mode 100644 index 00000000..e7cec539 --- /dev/null +++ b/changes/bug-3778_fix-path-prefix-helper @@ -0,0 +1 @@ + o Fix path prefix helper for the bundle and add regresion tests. Closes #3778. diff --git a/changes/feature-3758_show-eip-and-mx-status-in-systray-tooltip b/changes/feature-3758_show-eip-and-mx-status-in-systray-tooltip new file mode 100644 index 00000000..edbb3ea0 --- /dev/null +++ b/changes/feature-3758_show-eip-and-mx-status-in-systray-tooltip @@ -0,0 +1,2 @@ + o Display the Encrypted Internet and Encrypted Email status in the systray + tooltip. Closes #3758. diff --git a/docs/dev/environment.rst b/docs/dev/environment.rst index 7ce536f9..5ae3871a 100644 --- a/docs/dev/environment.rst +++ b/docs/dev/environment.rst @@ -13,9 +13,11 @@ Cloning the repo :: - git clone git://leap.se/bitmask + git clone git://leap.se/leap_client git checkout develop +.. XXX change this when repo changes. + Base Dependencies ------------------ Bitmask depends on these libraries: @@ -121,6 +123,10 @@ If you *only* are running bitmask from inside a virtualenv, you will need to cop Missing Authentication agent ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -If you are running a desktop other than gnome or unity, you might get an error saying that you are not running the authentication agent. You can launch it like this:: +If you are using linux and running a desktop other than unity or gnome, you might get an error saying that you are not running the authentication agent. For systems with gnome libraries installed you can launch it like this:: /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1 & + +or if you are a kde user:: + + /usr/lib/kde4/libexec/polkit-kde-authentication-agent-1 & diff --git a/docs/release_checklist.wiki b/docs/release_checklist.wiki index e6467048..273804c7 100644 --- a/docs/release_checklist.wiki +++ b/docs/release_checklist.wiki @@ -27,7 +27,7 @@ * [ ] git checkout develop && git pull origin develop && git merge release-X.Y.Z && git push origin develop * [ ] Build and upload bundles * [ ] Use the scripts under pkg/<os>/ to build the the bundles. - * [ ] Sign them with gpg -a <path/to/bundle> + * [ ] Sign them with gpg -a --sign --detach-sign <path/to/bundle> * [ ] Upload bundle and signature to web-uploads@salmon.leap.se:~/public/client/<os>/Bitmask-<os>-<ver>.(tar.bz2,dmg,zip) * [ ] Update symbolic link for latest upload and signature: * [ ] ~/public/client/Bitmask-<os>-latest diff --git a/pkg/linux/build_bundle.sh b/pkg/linux/build_bundle.sh index e6a1043f..879579f0 100755 --- a/pkg/linux/build_bundle.sh +++ b/pkg/linux/build_bundle.sh @@ -77,13 +77,13 @@ cp $JOINT_CHANGELOG $TEMPLATE_BUNDLE/CHANGELOG cp $REPOS_ROOT/leap_client/LICENSE $TEMPLATE_BUNDLE/LICENSE -# clean pyc$ - +# clean *.pyc files cd $TEMPLATE_BUNDLE -for i in $(find . | grep pyc$); - do - rm $i - done +find . -name "*.pyc" -delete + +# remove execution flags (because vbox fs) and set all read permissions +chmod -x CHANGELOG LICENSE README +chmod +r CHANGELOG LICENSE README # create tarball diff --git a/relnotes.txt b/relnotes.txt index 349b430c..7a9696cc 100644 --- a/relnotes.txt +++ b/relnotes.txt @@ -53,7 +53,7 @@ LICENSE You may use Bitmask 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" for the terms of the GNU General Public License, version 3. In addition, as a special exception, the copyright holders give diff --git a/src/leap/bitmask/config/leapsettings.py b/src/leap/bitmask/config/leapsettings.py index ad67b29e..7d8b5977 100644 --- a/src/leap/bitmask/config/leapsettings.py +++ b/src/leap/bitmask/config/leapsettings.py @@ -75,12 +75,12 @@ class LeapSettings(object): """ Constructor - :param standalone: parameter used to define the location of - the config + :param standalone: parameter used to define the location of the config. :type standalone: bool """ - settings_path = os.path.join( - get_path_prefix(standalone=standalone), "leap", self.CONFIG_NAME) + self._path_prefix = get_path_prefix(standalone=standalone) + settings_path = os.path.join(self._path_prefix, + "leap", self.CONFIG_NAME) self._settings = QtCore.QSettings(settings_path, QtCore.QSettings.IniFormat) @@ -132,8 +132,8 @@ class LeapSettings(object): # other things, not just the directories providers = [] try: - providers_path = os.path.join( - get_path_prefix(), "leap", "providers") + providers_path = os.path.join(self._path_prefix, + "leap", "providers") providers = os.listdir(providers_path) except Exception as e: logger.debug("Error listing providers, assume there are none. %r" diff --git a/src/leap/bitmask/config/tests/test_leapsettings.py b/src/leap/bitmask/config/tests/test_leapsettings.py new file mode 100644 index 00000000..18166923 --- /dev/null +++ b/src/leap/bitmask/config/tests/test_leapsettings.py @@ -0,0 +1,71 @@ +# -*- coding: utf-8 -*- +# test_leapsettings.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 <http://www.gnu.org/licenses/>. + +""" +Tests for leapsettings module. +""" + +try: + import unittest2 as unittest +except ImportError: + import unittest + +import os +import mock + +from leap.common.testing.basetest import BaseLeapTest +from leap.bitmask.config.leapsettings import LeapSettings + + +class LeapSettingsTest(BaseLeapTest): + """Tests for LeapSettings""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def test_get_configured_providers(self): + """ + Test that the config file IS NOT stored under the CWD. + """ + self._leapsettings = LeapSettings() + with mock.patch('os.listdir') as os_listdir: + # use this method only to spy where LeapSettings is looking for + self._leapsettings.get_configured_providers() + args, kwargs = os_listdir.call_args + config_dir = args[0] + self.assertFalse(config_dir.startswith(os.getcwd())) + self.assertFalse(config_dir.endswith('config')) + + def test_get_configured_providers_in_bundle(self): + """ + Test that the config file IS stored under the CWD. + """ + self._leapsettings = LeapSettings(standalone=True) + with mock.patch('os.listdir') as os_listdir: + # use this method only to spy where LeapSettings is looking for + self._leapsettings.get_configured_providers() + args, kwargs = os_listdir.call_args + config_dir = args[0] + self.assertTrue(config_dir.startswith(os.getcwd())) + self.assertFalse(config_dir.endswith('config')) + + +if __name__ == "__main__": + unittest.main() diff --git a/src/leap/bitmask/gui/mainwindow.py b/src/leap/bitmask/gui/mainwindow.py index 0950462b..6141a3a2 100644 --- a/src/leap/bitmask/gui/mainwindow.py +++ b/src/leap/bitmask/gui/mainwindow.py @@ -256,7 +256,7 @@ class MainWindow(QtGui.QMainWindow): self._action_eip_provider.setEnabled(False) self._action_eip_status = QtGui.QAction( - self.tr("Encrypted internet is OFF"), + self.tr("Encrypted Internet is OFF"), self) self._action_eip_status.setEnabled(False) self._status_panel.set_action_eip_status( diff --git a/src/leap/bitmask/gui/statuspanel.py b/src/leap/bitmask/gui/statuspanel.py index 3a91f08e..10e6bca3 100644 --- a/src/leap/bitmask/gui/statuspanel.py +++ b/src/leap/bitmask/gui/statuspanel.py @@ -141,6 +141,9 @@ class StatusPanelWidget(QtGui.QWidget): self.hide_status_box() + # set systray tooltip statuses + self._eip_status = self._mx_status = "" + # Set the EIP status icons self.CONNECTING_ICON = None self.CONNECTED_ICON = None @@ -336,6 +339,16 @@ class StatusPanelWidget(QtGui.QWidget): """ leap_assert_type(systray, QtGui.QSystemTrayIcon) self._systray = systray + self._systray.setToolTip(self.tr("All services are OFF")) + + def _update_systray_tooltip(self): + """ + Updates the system tray icon tooltip using the eip and mx statuses. + """ + status = self.tr("Encrypted Internet is {0}").format(self._eip_status) + status += '\n' + status += self.tr("Encrypted Mail is {0}").format(self._mx_status) + self._systray.setToolTip(status) def set_action_eip_startstop(self, action_eip_startstop): """ @@ -400,10 +413,12 @@ class StatusPanelWidget(QtGui.QWidget): """ leap_assert_type(error, bool) - self._systray.setToolTip(status) + self._eip_status = status + if error: status = "<font color='red'>%s</font>" % (status,) self.ui.lblEIPStatus.setText(status) + self._update_systray_tooltip() def set_startstop_enabled(self, value): """ @@ -530,14 +545,14 @@ class StatusPanelWidget(QtGui.QWidget): """ selected_pixmap = self.ERROR_ICON selected_pixmap_tray = self.ERROR_ICON_TRAY - tray_message = self.tr("Encryption is OFF") + tray_message = self.tr("Encrypted Internet is OFF") if status in ("WAIT", "AUTH", "GET_CONFIG", "RECONNECTING", "ASSIGN_IP"): selected_pixmap = self.CONNECTING_ICON selected_pixmap_tray = self.CONNECTING_ICON_TRAY tray_message = self.tr("Turning ON") elif status in ("CONNECTED"): - tray_message = self.tr("Encryption is ON") + tray_message = self.tr("Encrypted Internet is ON") selected_pixmap = self.CONNECTED_ICON selected_pixmap_tray = self.CONNECTED_ICON_TRAY @@ -559,15 +574,18 @@ class StatusPanelWidget(QtGui.QWidget): """ self.ui.lblMailStatus.setText(status) + self._mx_status = self.tr('OFF') tray_status = self.tr('Encrypted Mail is OFF') icon = QtGui.QPixmap(self.MAIL_OFF_ICON) if ready: icon = QtGui.QPixmap(self.MAIL_ON_ICON) + self._mx_status = self.tr('ON') tray_status = self.tr('Encrypted Mail is ON') self.ui.lblMailIcon.setPixmap(icon) self._action_mail_status.setText(tray_status) + self._update_systray_tooltip() def _mail_handle_soledad_events(self, req): """ |