summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--changes/bug-3617_remove-exec-bits-from-text-in-bundle1
-rw-r--r--changes/bug-3778_fix-path-prefix-helper1
-rw-r--r--docs/dev/environment.rst10
-rw-r--r--docs/release_checklist.wiki2
-rwxr-xr-xpkg/linux/build_bundle.sh12
-rw-r--r--relnotes.txt2
-rw-r--r--src/leap/bitmask/config/leapsettings.py12
-rw-r--r--src/leap/bitmask/config/tests/test_leapsettings.py71
8 files changed, 95 insertions, 16 deletions
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/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()