diff options
author | kali <kali@leap.se> | 2013-02-13 01:45:14 +0900 |
---|---|---|
committer | kali <kali@leap.se> | 2013-02-13 01:45:14 +0900 |
commit | 0e678fd57550bb80e6afe3b2019681a9911f2012 (patch) | |
tree | b3ecd3d2b98f0474ec83a7a78dae3db62a6f066e | |
parent | aa20645e24478f5250cfca75ca035162a67cfac4 (diff) | |
parent | 16827bab2f31b3e66a90141fc511bf3729d77ed3 (diff) |
Merge branch 'release/v0.2.0' into debian
-rw-r--r-- | docs/checklist_for_leap_client_release.wiki | 48 | ||||
-rw-r--r-- | pkg/requirements.pip | 2 | ||||
-rw-r--r-- | src/leap/app.py | 6 | ||||
-rw-r--r-- | src/leap/eip/checks.py | 7 | ||||
-rw-r--r-- | src/leap/util/polkit.py | 26 |
5 files changed, 87 insertions, 2 deletions
diff --git a/docs/checklist_for_leap_client_release.wiki b/docs/checklist_for_leap_client_release.wiki new file mode 100644 index 00000000..c61b258c --- /dev/null +++ b/docs/checklist_for_leap_client_release.wiki @@ -0,0 +1,48 @@ += LEAP CLient Release Checklist (*) = + + * [ ] validate rc + * [ ] all rc-critical closed! + * [ ] all bbots green + * [ ] uploaded translations: make translations + * [ ] re-generate pyqt resources + + * [ ] update docs + * [ ] CREDITS + * [ ] relnotes.txt + * [ ] docs/known_issues.rst + * [ ] NEWS.rst: Add release name and date to top-most item in NEWS. + + * [ ] change docs/quickstart.rst to point to just the current + leap-client-X.Y.Z.deb binaries and .tar.gz source code files + * [ ] on release/vX.Y.Z branch: git pull + * [ ] git tag X.Y.Z + * [ ] build locally to make sure the release is reporting itself as the + intended version (FIXME!) + * [ ] make sure buildbot is green + * [ ] make sure other people aren't committing at that moment + * [ ] FUTURE: push tag along with some other documentation-only patch (typically to + relnotes.txt) to trigger buildslaves + * [ ] git push --tags official; git push official + * [ ] that will build tarballs + * [ ] make sure buildbot is green (in a parallel universe, he) + * [ ] download tarballs, sign with "gpg -ba -u deadbeef TAR", upload *.asc + * [ ] symlink the release tarball on leap.se downloads page: + /var/www/source/leap-client/releases/ CHANGEME XXX + + * [ ] update news pages. release notes. + * [ ] send out relnotes.txt to internal list. + * [ ] wait ...? + + * [ ] PYPI UPLOAD: with "python ./setup.py sdist upload register" + * [ ] login to pypi + * [ ] from Edit, add new release + * [ ] upload .tar.gz, .asc + + * [ ] make an "announcement of new release" on leap.se + * [ ] close the Milestone on the chili Roadmap + * [ ] send out relnotes.txt to: + * [ ] mailing lists... + +notes +----- +(*) this checklist kindly borrowed from tahoe-lafs documentation =) diff --git a/pkg/requirements.pip b/pkg/requirements.pip index 6a5f9311..01d4289f 100644 --- a/pkg/requirements.pip +++ b/pkg/requirements.pip @@ -6,7 +6,7 @@ requests<1.0.0 psutil netifaces pyopenssl -jsonschema +jsonschema #>0.7 srp>=1.0.2 pycrypto keyring diff --git a/src/leap/app.py b/src/leap/app.py index eb38751c..1b2ccd61 100644 --- a/src/leap/app.py +++ b/src/leap/app.py @@ -1,6 +1,7 @@ # vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4 from functools import partial import logging +import platform import signal # This is only needed for Python v2 but is harmless for Python v3. @@ -12,6 +13,7 @@ from PyQt4 import QtCore from leap import __version__ as VERSION from leap.baseapp.mainwindow import LeapWindow +from leap.util import polkit from leap.gui import locale_rc @@ -62,6 +64,10 @@ def main(): logger.info('Starting app') app = QApplication(sys.argv) + # launch polkit-auth agent if needed + if platform.system() == "Linux": + polkit.check_if_running_polkit_auth() + # To test: # $ LANG=es ./app.py locale = QtCore.QLocale.system().name() diff --git a/src/leap/eip/checks.py b/src/leap/eip/checks.py index 9a34a428..af824c57 100644 --- a/src/leap/eip/checks.py +++ b/src/leap/eip/checks.py @@ -120,7 +120,12 @@ class ProviderCertChecker(object): def verify_api_https(self, uri): assert uri.startswith('https://') cacert = self.ca_cert_path - verify = cacert and cacert or True + verify = cacert or True + + # DEBUG + logger.debug('uri -> %s' % uri) + logger.debug('cacertpath -> %s' % cacert) + req = self.fetcher.get(uri, verify=verify) req.raise_for_status() return True diff --git a/src/leap/util/polkit.py b/src/leap/util/polkit.py new file mode 100644 index 00000000..70671124 --- /dev/null +++ b/src/leap/util/polkit.py @@ -0,0 +1,26 @@ +import logging + +import sh +from sh import grep +from sh import ps + +logger = logging.getLogger(__name__) + + +def run_polkit_auth_agent(): + logger.debug('launching policykit authentication agent in background...') + polkit = sh.Command('/usr/lib/policykit-1-gnome/' + 'polkit-gnome-authentication-agent-1') + polkit(_bg=True) + + +def check_if_running_polkit_auth(): + """ + check if polkit authentication agent is running + and launch it if it is not + """ + try: + grep(ps('aux'), '[p]olkit-gnome-authentication-agent-1') + except sh.ErrorReturnCode_1: + logger.debug('polkit auth agent not found, trying to launch it...') + run_polkit_auth_agent() |