diff options
-rw-r--r-- | docs/checklist_for_leap_client_release.wiki | 45 | ||||
-rw-r--r-- | docs/release_checklist.wiki | 34 | ||||
-rwxr-xr-x | pkg/linux/build_bundle.sh | 106 | ||||
-rwxr-xr-x | pkg/osx/build_bundle.sh | 123 | ||||
-rw-r--r-- | pkg/osx/build_bundle_from_linux.sh | 84 | ||||
-rw-r--r-- | src/leap/bitmask/gui/mainwindow.py | 21 | ||||
-rw-r--r-- | src/leap/bitmask/gui/preferenceswindow.py | 20 | ||||
-rw-r--r-- | src/leap/bitmask/util/requirement_checker.py | 2 |
8 files changed, 379 insertions, 56 deletions
diff --git a/docs/checklist_for_leap_client_release.wiki b/docs/checklist_for_leap_client_release.wiki deleted file mode 100644 index d3bdf1ee..00000000 --- a/docs/checklist_for_leap_client_release.wiki +++ /dev/null @@ -1,45 +0,0 @@ -= LEAP CLient Release Checklist (*) = - - * [ ] validate rc - * [ ] all rc-critical closed! - * [ ] all bbots green - * [ ] uploaded translations: make translations - * [ ] re-generate pyside 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" - - * [ ] 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/docs/release_checklist.wiki b/docs/release_checklist.wiki new file mode 100644 index 00000000..8987f0b8 --- /dev/null +++ b/docs/release_checklist.wiki @@ -0,0 +1,34 @@ += Bitmask Release Checklist (*) = + * [ ] Tag everything + * Should be done for the following packages, in order: + 1. leap.common + 2. leap.keymanager + 3. leap.soledad + 4. leap.mail + 5. leap.bitmask + 6. leap.mx + * NOTE: It's assumed that origin is the leap.se repo + * [ ] git fetch origin + * [ ] git tag -l, and see the latest tagged version (unless it's not a minor version bump, in which case, just bump to it) + * [ ] Checkout release-X.Y.Z (locally, never pushed) + * [ ] Fold in changes files into the CHANGELOG + - NOTE: For leap.soledad, the CHANGELOG entries should be divided per package (common, client, server). See older releases for reference. + - Helper bash line: for i in $(ls changes); do cat changes/$i; echo; done + * [ ] Update relnotes.txt if needed. + * [ ] git rm changes/* + * [ ] git commit -av + * [ ] Update dependencies on the current package in the packages that remain if needed (that's why the order). + * [ ] git tag -s X.Y.Z (note the -s so that it's a signed tag) The message should be something like: Tag <package> version X.Y.Z + * [ ] git push origin X.Y.Z + * [ ] git checkout master && git pull origin master && git merge release-X.Y.Z && git push origin master + * [ ] git checkout develop && git pull origin develop && git merge release-X.Y.Z && git push origin develop + * [ ] Build bundles + * [ ] Use the scripts under pkg/<os>/ to build the the bundles. + * [ ] Sign them with gpg -a <path/to/bundle> + * [ ] Upload bundle and signature to web-uploads@salmon.leap.se:~/public/client/<os>/ + * [ ] Announce + * [ ] Mail leap@lists.riseup.net + +Notes +----- +(*) this checklist kindly borrowed from tahoe-lafs documentation =) diff --git a/pkg/linux/build_bundle.sh b/pkg/linux/build_bundle.sh new file mode 100755 index 00000000..781884cb --- /dev/null +++ b/pkg/linux/build_bundle.sh @@ -0,0 +1,106 @@ +REPOS_ROOT=$1 +VERSION=$2 +TEMPLATE_BUNDLE=$3 +JOINT_CHANGELOG=$4 +DEST=$5 + +# clean template + +rm $TEMPLATE_BUNDLE/CHANGELOG +rm $TEMPLATE_BUNDLE/relnotes.txt +rm -rf $TEMPLATE_BUNDLE/apps/leap +rm $TEMPLATE_BUNDLE/lib/leap/{common,keymanager,soledad,mail} + +# checkout VERSION in all repos + +for i in {leap_client,leap_pycommon,soledad,keymanager,leap_mail} + do + cd $REPOS_ROOT/$i + git checkout $VERSION + done + +# make ui in client + +cd $REPOS_ROOT/leap_client +make + +# cp client + +cp -r $REPOS_ROOT/leap_client/src/leap $TEMPLATE_BUNDLE/apps/leap + +# setup sdist client + +cd $REPOS_ROOT/leap_client +python setup.py sdist + +# extract $VERSION and copy _version.py to TEMPLATE_BUNDLE/Bitmask.app/Contents/MacOS/apps/leap/bitmask/_version.py + +cd dist +rm -rf leap.bitmask-$VERSION +tar xzf leap.bitmask-$VERSION.tar.gz +cp leap.bitmask-$VERSION/src/leap/bitmask/_version.py $TEMPLATE_BUNDLE/apps/leap/bitmask/_version.py +cp leap.bitmask-$VERSION/src/leap/bitmask/util/reqs.txt $TEMPLATE_BUNDLE/apps/leap/bitmask/util/reqs.txt + +# cp common, soledad(client and common), mail and keymanager in TEMPLATE_BUNDLE/Bitmask.app/Contents/MacOS/lib/leap/ + +LEAP_LIB=$TEMPLATE_BUNDLE/lib/leap/ + +cp -r $REPOS_ROOT/leap_pycommon/src/leap/common $LEAP_LIB +cp -r $REPOS_ROOT/soledad/common/src/leap/soledad $LEAP_LIB +cp -r $REPOS_ROOT/soledad/client/src/leap/soledad/client $LEAP_LIB/soledad +cp -r $REPOS_ROOT/leap_mail/src/leap/mail $LEAP_LIB +cp -r $REPOS_ROOT/keymanager/src/leap/keymanager $LEAP_LIB + +# cp leap_client launcher to TEMPLATE_BUNDLE/Bitmask.app/Contents/MacOS/Bitmask + +BITMASK_BIN=$TEMPLATE_BUNDLE/bitmask + +cd $REPOS_ROOT/leap_client_launcher/build/ +make +cp src/launcher $BITMASK_BIN + +# cp launcher.py to TEMPLATE_BUNDLE/Bitmask.app/Contents/MacOS/apps/ + +cd $REPOS_ROOT/leap_client_launcher/src/ +cp launcher.py $TEMPLATE_BUNDLE/apps/ + +# cp relnotes to TEMPLATE_BUNDLE + +cp $REPOS_ROOT/leap_client/relnotes.txt $TEMPLATE_BUNDLE + +# cp joint_chglog to TEMPLATE_BUNDLE + +cp $JOINT_CHANGELOG $TEMPLATE_BUNDLE/CHANGELOG + +# cp LICENSE to TEMPLATE_BUNDLE + +cp $REPOS_ROOT/leap_client/LICENSE $TEMPLATE_BUNDLE/LICENSE + +# clean pyc$ + +cd $TEMPLATE_BUNDLE +for i in $(find . | grep pyc$); + do + rm $i + done + +# create tarball + +ARCH=$(uname -m | sed 's/x86_//;s/i[3-6]86/32/') +BUNDLE_NAME=Bitmask-linux$ARCH-$VERSION +TMP=/tmp/$BUNDLE_NAME + +rm -rf $TMP +mkdir -p $TMP +cp -R $TEMPLATE_BUNDLE/* $TMP +cd /tmp +tar cjf $DEST/$BUNDLE_NAME.tar.bz2 $BUNDLE_NAME +cd +rm -rf $TMP + +# go back to develop in all repos +for i in {leap_client,leap_pycommon,soledad,keymanager,leap_mail} + do + cd $REPOS_ROOT/$i + git checkout develop + done diff --git a/pkg/osx/build_bundle.sh b/pkg/osx/build_bundle.sh new file mode 100755 index 00000000..a13746bf --- /dev/null +++ b/pkg/osx/build_bundle.sh @@ -0,0 +1,123 @@ +REPOS_ROOT=$1 +VERSION=$2 +TEMPLATE_BUNDLE=$3 +JOINT_CHANGELOG=$4 +DEST=$5 + +# clean template + +rm $TEMPLATE_BUNDLE/CHANGELOG.txt +rm $TEMPLATE_BUNDLE/relnotes.txt +rm -rf $TEMPLATE_BUNDLE/Bitmask.app/Contentes/MacOS/apps/leap +rm $TEMPLATE_BUNDLE/Bitmask.app/Contentes/MacOS/lib/leap/{common,keymanager,soledad,mail} + +# checkout VERSION in all repos + +for i in {leap_client,leap_pycommon,soledad,keymanager,leap_mail} + do + cd $REPOS_ROOT/$i + git checkout $VERSION + done + +# make ui in client + +cd $REPOS_ROOT/leap_client +make + +# cp client + +cp -r $REPOS_ROOT/leap_client/src/leap $TEMPLATE_BUNDLE/Bitmask.app/Contents/MacOS/apps/leap + +# setup sdist client + +cd $REPOS_ROOT/leap_client +python setup.py sdist + +# extract $VERSION and copy _version.py to TEMPLATE_BUNDLE/Bitmask.app/Contents/MacOS/apps/leap/bitmask/_version.py + +cd dist +rm -rf leap.bitmask-$VERSION +tar xzf leap.bitmask-$VERSION.tar.gz +cp leap.bitmask-$VERSION/src/leap/bitmask/_version.py $TEMPLATE_BUNDLE/Bitmask.app/Contents/MacOS/apps/leap/bitmask/_version.py +cp leap.bitmask-$VERSION/src/leap/bitmask/util/reqs.txt $TEMPLATE_BUNDLE/Bitmask.app/Contents/MacOS/apps/leap/bitmask/util/reqs.txt + +# cp common, soledad(client and common), mail and keymanager in TEMPLATE_BUNDLE/Bitmask.app/Contents/MacOS/lib/leap/ + +LEAP_LIB=$TEMPLATE_BUNDLE/Bitmask.app/Contents/MacOS/lib/leap/ + +cp -r $REPOS_ROOT/leap_pycommon/src/leap/common $LEAP_LIB +cp -r $REPOS_ROOT/soledad/common/src/leap/soledad $LEAP_LIB +cp -r $REPOS_ROOT/soledad/client/src/leap/soledad/client $LEAP_LIB/soledad +cp -r $REPOS_ROOT/leap_mail/src/leap/mail $LEAP_LIB +cp -r $REPOS_ROOT/keymanager/src/leap/keymanager $LEAP_LIB + +# cp leap_client launcher to TEMPLATE_BUNDLE/Bitmask.app/Contents/MacOS/Bitmask + +BITMASK_BIN=$TEMPLATE_BUNDLE/Bitmask.app/Contents/MacOS/Bitmask + +cd $REPOS_ROOT/leap_client_launcher/build/ +make +cp src/launcher $BITMASK_BIN + +# cp launcher.py to TEMPLATE_BUNDLE/Bitmask.app/Contents/MacOS/apps/ + +cd $REPOS_ROOT/leap_client_launcher/src/ +cp launcher.py $TEMPLATE_BUNDLE/Bitmask.app/Contents/MacOS/apps/ + +# install_name_tool it + +install_name_tool -change libboost_python.dylib lib/libboost_python.dylib $BITMASK_BIN +install_name_tool -change libboost_filesystem.dylib lib/libboost_filesystem.dylib $BITMASK_BIN +install_name_tool -change libboost_system.dylib lib/libboost_system.dylib $BITMASK_BIN + +# cp relnotes to TEMPLATE_BUNDLE + +cp $REPOS_ROOT/leap_client/relnotes.txt $TEMPLATE_BUNDLE + +# cp joint_chglog to TEMPLATE_BUNDLE + +cp $JOINT_CHANGELOG $TEMPLATE_BUNDLE/CHANGELOG.txt + +# cp LICENSE to TEMPLATE_BUNDLE + +cp $REPOS_ROOT/leap_client/LICENSE $TEMPLATE_BUNDLE/LICENSE.txt + +# clean pyc$ + +cd $TEMPLATE_BUNDLE +for i in $(find . | grep pyc$); + do + rm $i + done + +# create dmg + +TMP=/tmp/Bitmask +VOLUME_NAME=Bitmask +DMG_FILE=Bitmask-OSX-$VERSION.dmg + +rm -rf $TMP +mkdir -p $TMP +cp -R $TEMPLATE_BUNDLE/* $TMP +cp $REPOS_ROOT/leap_assets/mac/bitmask.icns $TMP/.VolumeIcon.icns +SetFile -c icnC $TMP/.VolumeIcon.icns +hdiutil create -srcfolder $TMP -volname $VOLUME_NAME -format UDRW -ov $DEST/raw-$DMG_FILE + +rm -rf $TMP +mkdir -p $TMP +hdiutil attach $DEST/raw-$DMG_FILE -mountpoint $TMP + +SetFile -a C $TMP +hdiutil detach $TMP + +rm -rf $TMP +rm -f $DEST/$DMG_FILE +hdiutil convert $DEST/raw-$DMG_FILE -format UDZO -o $DEST/$DMG_FILE +rm -f $DEST/raw-$DMG_FILE + +# go back to develop in all repos +for i in {leap_client,leap_pycommon,soledad,keymanager,leap_mail} + do + cd $REPOS_ROOT/$i + git checkout develop + done diff --git a/pkg/osx/build_bundle_from_linux.sh b/pkg/osx/build_bundle_from_linux.sh new file mode 100644 index 00000000..c98e1b7a --- /dev/null +++ b/pkg/osx/build_bundle_from_linux.sh @@ -0,0 +1,84 @@ +REPOS_ROOT=$1 +VERSION=$2 +TEMPLATE_BUNDLE=$3 +JOINT_CHANGELOG=$4 +DEST=$5 + +# clean template + +rm $TEMPLATE_BUNDLE/CHANGELOG.txt +rm $TEMPLATE_BUNDLE/relnotes.txt +rm -rf $TEMPLATE_BUNDLE/Bitmask.app/Contentes/MacOS/apps/leap +rm $TEMPLATE_BUNDLE/Bitmask.app/Contentes/MacOS/lib/leap/{common,keymanager,soledad,mail} + +# checkout VERSION in all repos + +for i in {leap_client,leap_pycommon,soledad,keymanager,leap_mail} + do + cd $REPOS_ROOT/$i + git checkout $VERSION + done + +# make ui in client + +cd $REPOS_ROOT/leap_client +make + +# cp client + +cp -r $REPOS_ROOT/leap_client/src/leap $TEMPLATE_BUNDLE/Bitmask.app/Contents/MacOS/apps/leap + +# setup sdist client + +cd $REPOS_ROOT/leap_client +python setup.py sdist + +# extract $VERSION and copy _version.py to TEMPLATE_BUNDLE/Bitmask.app/Contents/MacOS/apps/leap/bitmask/_version.py + +cd dist +rm -rf leap.bitmask-$VERSION +tar xzf leap.bitmask-$VERSION.tar.gz +cp leap.bitmask-$VERSION/src/leap/bitmask/_version.py $TEMPLATE_BUNDLE/Bitmask.app/Contents/MacOS/apps/leap/bitmask/_version.py +cp leap.bitmask-$VERSION/src/leap/bitmask/util/reqs.txt $TEMPLATE_BUNDLE/Bitmask.app/Contents/MacOS/apps/leap/bitmask/util/reqs.txt + +# cp common, soledad(client and common), mail and keymanager in TEMPLATE_BUNDLE/Bitmask.app/Contents/MacOS/lib/leap/ + +LEAP_LIB=$TEMPLATE_BUNDLE/Bitmask.app/Contents/MacOS/lib/leap/ + +cp -r $REPOS_ROOT/leap_pycommon/src/leap/common $LEAP_LIB +cp -r $REPOS_ROOT/soledad/common/src/leap/soledad $LEAP_LIB +cp -r $REPOS_ROOT/soledad/client/src/leap/soledad/client $LEAP_LIB/soledad +cp -r $REPOS_ROOT/leap_mail/src/leap/mail $LEAP_LIB +cp -r $REPOS_ROOT/keymanager/src/leap/keymanager $LEAP_LIB + +# cp relnotes to TEMPLATE_BUNDLE + +cp $REPOS_ROOT/leap_client/relnotes.txt $TEMPLATE_BUNDLE + +# cp joint_chglog to TEMPLATE_BUNDLE + +cp $JOINT_CHANGELOG $TEMPLATE_BUNDLE/CHANGELOG.txt + +# cp LICENSE to TEMPLATE_BUNDLE + +cp $REPOS_ROOT/leap_client/LICENSE $TEMPLATE_BUNDLE/LICENSE.txt + +# clean pyc$ + +cd $TEMPLATE_BUNDLE +for i in $(find . | grep pyc$); + do + rm $i + done + +# create dmg + +genisoimage -D -V "Bitmask" -no-pad -r -apple -o raw-Bitmask-OSX-$VERSION.dmg $TEMPLATE_BUNDLE +dmg dmg raw-Bitmask-OSX-$VERSION.dmg Bitmask-OSX-$VERSION.dmg + +# go back to develop in all repos +for i in {leap_client,leap_pycommon,soledad,keymanager,leap_mail} + do + cd $REPOS_ROOT/$i + git checkout develop + done diff --git a/src/leap/bitmask/gui/mainwindow.py b/src/leap/bitmask/gui/mainwindow.py index 34451928..6d612d4e 100644 --- a/src/leap/bitmask/gui/mainwindow.py +++ b/src/leap/bitmask/gui/mainwindow.py @@ -284,6 +284,7 @@ class MainWindow(QtGui.QMainWindow): # Services signals/slots connection self.new_updates.connect(self._react_to_new_updates) self.soledad_ready.connect(self._start_imap_service) + self.soledad_ready.connect(self._set_soledad_ready) self.mail_client_logged_in.connect(self._fetch_incoming_mail) ################################# end Qt Signals connection ######## @@ -298,6 +299,7 @@ class MainWindow(QtGui.QMainWindow): self._bypass_checks = bypass_checks self._soledad = None + self._soledad_ready = False self._keymanager = None self._imap_service = None @@ -415,11 +417,26 @@ class MainWindow(QtGui.QMainWindow): Displays the preferences window. """ preferences_window = PreferencesWindow( - self, self._srp_auth, self._soledad, - self._settings, self._standalone) + self, self._srp_auth, self._settings, self._standalone) + + if self._soledad_ready: + preferences_window.set_soledad_ready(self._soledad) + else: + self.soledad_ready.connect( + lambda: preferences_window.set_soledad_ready(self._soledad)) preferences_window.show() + def _set_soledad_ready(self): + """ + SLOT + TRIGGERS: + self.soledad_ready + + It sets the soledad object as ready to use. + """ + self._soledad_ready = True + def _uncheck_logger_button(self): """ SLOT diff --git a/src/leap/bitmask/gui/preferenceswindow.py b/src/leap/bitmask/gui/preferenceswindow.py index 05f616b0..17e12304 100644 --- a/src/leap/bitmask/gui/preferenceswindow.py +++ b/src/leap/bitmask/gui/preferenceswindow.py @@ -42,14 +42,12 @@ class PreferencesWindow(QtGui.QDialog): WEAK_PASSWORDS = ("123456", "qweasd", "qwerty", "password") - def __init__(self, parent, srp_auth, soledad, leap_settings, standalone): + def __init__(self, parent, srp_auth, leap_settings, standalone): """ :param parent: parent object of the PreferencesWindow. :parent type: QWidget :param srp_auth: SRPAuth object configured in the main app. :type srp_auth: SRPAuth - :param soledad: Soledad object configured in the main app. - :type soledad: Soledad :param standalone: If True, the application is running as standalone and the preferences dialog should display some messages according to this. @@ -58,9 +56,9 @@ class PreferencesWindow(QtGui.QDialog): QtGui.QDialog.__init__(self, parent) self._srp_auth = srp_auth - self._soledad = soledad self._settings = leap_settings self._standalone = standalone + self._soledad = None # Load UI self.ui = Ui_Preferences() @@ -76,21 +74,23 @@ class PreferencesWindow(QtGui.QDialog): self.ui.cbProvidersServices.currentIndexChanged[unicode].connect( self._populate_services) - parent.soledad_ready.connect(self._soledad_ready) - if not self._settings.get_configured_providers(): self.ui.gbEnabledServices.setEnabled(False) else: self._add_configured_providers() - def _soledad_ready(self): + def set_soledad_ready(self, soledad): """ SLOT TRIGGERS: parent.soledad_ready + It sets the soledad object as ready to use. + + :param soledad: Soledad object configured in the main app. + :type soledad: Soledad """ - self._soledad_ready = True + self._soledad = soledad self.ui.gbPasswordChange.setEnabled(True) def _set_password_change_status(self, status, error=False, success=False): @@ -128,6 +128,10 @@ class PreferencesWindow(QtGui.QDialog): def _change_password(self): """ + SLOT + TRIGGERS: + self.ui.pbChangePassword.clicked + Changes the user's password if the inputboxes are correctly filled. """ username = self._srp_auth.get_username() diff --git a/src/leap/bitmask/util/requirement_checker.py b/src/leap/bitmask/util/requirement_checker.py index bd3c1412..37e8e693 100644 --- a/src/leap/bitmask/util/requirement_checker.py +++ b/src/leap/bitmask/util/requirement_checker.py @@ -53,7 +53,7 @@ def get_requirements(): if not develop: requires_file_name = os.path.join( 'leap', 'bitmask', 'util', 'reqs.txt') - dist_name = Requirement.parse('bitmask') + dist_name = Requirement.parse('leap.bitmask') try: with resource_stream(dist_name, requires_file_name) as stream: |