diff --git a/CHANGES b/CHANGES index 1d1657ab0..f3b3be7d1 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,7 @@ Back In Time Version 1.0.28 +* Fix bug: AttributeError with python-keyring>1.6.1 [#1234024](https://bugs.launchpad.net/backintime/+bug/1234024) * Fix bug: TypeError: KDirModel.removeColumns() is a private method in kde4/app.py [#1232694](https://bugs.launchpad.net/backintime/+bug/1232694) * add '--checksum' commandline option [#886021](https://bugs.launchpad.net/backintime/+bug/886021) * Fix bug: sshfs mount disconnect after a while due to some firewalls (add ServerAliveInterval) [#235685](https://answers.launchpad.net/backintime/+question/235685) diff --git a/README b/README index ee4b58902..9e17ff200 100644 --- a/README +++ b/README @@ -1,6 +1,6 @@ Back In Time -Copyright (C) 2008-2009 Oprea Dan, Bart de Koning, Richard Bailey +Copyright (C) 2008-2013 Oprea Dan, Bart de Koning, Richard Bailey, Germar Reitze 1. About @@ -25,44 +25,54 @@ Copyright (C) 2008-2009 Oprea Dan, Bart de Koning, Richard Bailey 2. INSTALL -2.1. Ubuntu packages +2.1. Debian/Ubuntu packages GNOME: ./makedeb.sh sudo dpkg -i backintime-common-.deb sudo dpkg -i backintime-gnome-.deb + sudo dpkg -i backintime-notify-.deb KDE4: (KDE4 >= 4.1) ./makedeb.sh sudo dpkg -i backintime-common-.deb sudo dpkg -i backintime-kde4-.deb - - NOTE: - Ubuntu 8.04: to install KDE4 4.1 check this link: - http://news.softpedia.com/news/How-To-Install-KDE-4-1-On-Ubuntu-8-04-91034.shtml + sudo dpkg -i backintime-notify-.deb 2.2. From sources - Common (dependencies: python, rsync, cron): + Common (dependencies: python, rsync, cron, openssh-client, + python-keyring + recomended: powermgmt-base, sshfs, encfs): + cd common ./configure make sudo make install - GNOME (dependencies: python-glade2, python-gnome2, meld): + GNOME (dependencies: x11-utils, python-glade2, python-gnome2, meld, + gksu, libnotify-bin, python-gnomekeyring): cd gnome ./configure make sudo make install - KDE4 (dependencies: x11-utils, python-kde4 (>= 4.1), kompare): + KDE4 (dependencies: x11-utils, python-kde4 (>= 4.1), kompare, kdesudo, + libnotify-bin, python-keyring-kwallet): cd kde4 ./configure make sudo make install + NOTIFY (dependencies: libnotify-bin): + cd notify + ./configure + make + sudo make install + + NOTE: if want to run configure without check (gnome or kde), just run: ./configure --no-check @@ -83,3 +93,5 @@ Copyright (C) 2008-2009 Oprea Dan, Bart de Koning, Richard Bailey * Press OK and you will see the new actions called "Open with Back In Time" when you right-click an item +Oct 2013 + diff --git a/common/config.py b/common/config.py index b32318fc6..74f26119d 100644 --- a/common/config.py +++ b/common/config.py @@ -582,14 +582,6 @@ def mode_need_password(self, mode, pw_id = 1): return False return True - def get_keyring_backend(self): - #?Backend used for \fIprofile.snapshots..password.save\fR - #?;gnomekeyring|kwallet - return self.get_str_value('keyring.backend', '') - - def set_keyring_backend(self, value): - self.set_str_value('keyring.backend', value) - def get_keyring_service_name( self, profile_id = None, mode = None, pw_id = 1 ): if mode is None: mode = self.get_snapshots_mode(profile_id) diff --git a/common/create-manpage-backintime-config.py b/common/create-manpage-backintime-config.py old mode 100755 new mode 100644 index 1787ddfe1..d8dd9e247 --- a/common/create-manpage-backintime-config.py +++ b/common/create-manpage-backintime-config.py @@ -19,6 +19,7 @@ import re import os import sys +from time import strftime, gmtime PATH = os.path.join(os.getcwd(), os.path.dirname(sys.argv[0])) @@ -29,7 +30,7 @@ SORT = True #True = sort by alphabet; False = sort by line numbering c = re.compile(r'.*?self\.get((?:_profile)?)_(.*?)_value ?\( ?[\'"](.*?)[\'"] ?(%?[^,]*?), ?[\'"]?([^\'",\)]*)[\'"]?') -HEADER = '''.TH backintime-config 1 "July 2013" "version %s" "USER COMMANDS" +HEADER = '''.TH backintime-config 1 "%s" "version %s" "USER COMMANDS" .SH NAME config \- BackInTime configuration files. .SH SYNOPSIS @@ -58,7 +59,7 @@ .br 0 */2 * * * nice -n 19 ionice -c2 -n7 /usr/bin/backintime --backup-job >/dev/null 2>&1 .SH POSSIBLE KEYWORDS -''' % VERSION +''' % (strftime('%b %Y', gmtime()), VERSION) FOOTER = '''.SH SEE ALSO backintime, backintime-gnome, backintime-kde4. diff --git a/common/man/C/backintime-config.1 b/common/man/C/backintime-config.1 index 5e4f1c99b..d2c4472c9 100644 --- a/common/man/C/backintime-config.1 +++ b/common/man/C/backintime-config.1 @@ -1,4 +1,4 @@ -.TH backintime-config 1 "July 2013" "version 1.0.27" "USER COMMANDS" +.TH backintime-config 1 "Oct 2013" "version 1.0.27" "USER COMMANDS" .SH NAME config \- BackInTime configuration files. .SH SYNOPSIS @@ -36,15 +36,6 @@ Internal value used to prevent hash collisions on mountpoints. Do not change thi Default: 0 .RE -.IP "\fIkeyring.backend\fR" 6 -.RS -Type: str Allowed Values: gnomekeyring|kwallet -.br -Backend used for \fIprofile.snapshots..password.save\fR -.PP -Default: '' -.RE - .IP "\fIprofile.name\fR" 6 .RS Type: str Allowed Values: text diff --git a/common/man/C/backintime.1 b/common/man/C/backintime.1 index 5d3678cf9..a44994d38 100644 --- a/common/man/C/backintime.1 +++ b/common/man/C/backintime.1 @@ -1,4 +1,4 @@ -.TH backintime 1 "June 2013" "version 1.0.27" "USER COMMANDS" +.TH backintime 1 "Oct 2013" "version 1.0.27" "USER COMMANDS" .SH NAME backintime \- a simple backup tool for Linux. .PP diff --git a/common/password.py b/common/password.py index 70e8dcb3b..6239a0d70 100644 --- a/common/password.py +++ b/common/password.py @@ -249,8 +249,7 @@ def __init__(self, cfg = None, *args, **kwargs): self.db_usr = {} self.fifo = password_ipc.FIFO(self.config.get_password_cache_fifo()) - backend = self.config.get_keyring_backend() - self.keyring_supported = tools.set_keyring(backend) + self.keyring_supported = tools.keyring_supported() def run(self): """ @@ -354,8 +353,7 @@ def __init__(self, cfg = None): self.fifo = password_ipc.FIFO(self.config.get_password_cache_fifo()) self.db = {} - backend = self.config.get_keyring_backend() - self.keyring_supported = tools.set_keyring(backend) + self.keyring_supported = tools.keyring_supported() def get_password(self, parent, profile_id, mode, pw_id = 1, only_from_keyring = False): """ diff --git a/common/tools.py b/common/tools.py index 714fb855d..cbf9621f5 100644 --- a/common/tools.py +++ b/common/tools.py @@ -500,15 +500,16 @@ def set_env_key(env, env_file, key): if key in env.keys(): env_file.set_str_value(key, env[key]) -def set_keyring(prefered): - if prefered in ('', 'gnomekeyring'): - backends = (keyring.backend.GnomeKeyring(), keyring.backend.KDEKWallet()) - elif prefered == 'kwallet': - backends = (keyring.backend.KDEKWallet(), keyring.backend.GnomeKeyring()) - for backend in backends: - if backend.supported() == 1: - keyring.set_keyring(backend) - return True +def keyring_supported(): + try: + backends = (keyring.backends.SecretService.Keyring, + keyring.backends.Gnome.Keyring, + keyring.backends.kwallet.Keyring) + except AttributeError: + backends = (keyring.backend.GnomeKeyring, + keyring.backend.KDEKWallet) + if isinstance(keyring.get_keyring(), backends): + return True return False diff --git a/gnome/app.py b/gnome/app.py index adc2e02fd..d65284948 100644 --- a/gnome/app.py +++ b/gnome/app.py @@ -20,6 +20,7 @@ import os.path import stat import sys +import keyring if len( os.getenv( 'DISPLAY', '' ) ) == 0: os.putenv( 'DISPLAY', ':0.0' ) diff --git a/gnome/man/C/backintime-gnome.1 b/gnome/man/C/backintime-gnome.1 index dd4f99a02..274dd6883 100644 --- a/gnome/man/C/backintime-gnome.1 +++ b/gnome/man/C/backintime-gnome.1 @@ -1,4 +1,4 @@ -.TH backintime-gnome 1 "June 2013" "version 1.0.27" "USER COMMANDS" +.TH backintime-gnome 1 "Oct 2013" "version 1.0.27" "USER COMMANDS" .SH NAME backintime-gnome \- a simple backup tool for Gnome. .SH SYNOPSIS diff --git a/gnome/settingsdialog.py b/gnome/settingsdialog.py index 261248fa5..0347e65fe 100644 --- a/gnome/settingsdialog.py +++ b/gnome/settingsdialog.py @@ -27,7 +27,6 @@ import datetime import gettext import subprocess -import keyring import config import messagebox @@ -190,11 +189,7 @@ def __init__( self, config, snapshots, parent ): self.cb_password_save = get('cb_password_save') self.cb_password_use_cache = get('cb_password_use_cache') - backend = self.config.get_keyring_backend() - if len(backend) <= 0: - backend = 'gnomekeyring' - self.config.set_keyring_backend(backend) - self.keyring_supported = tools.set_keyring(backend) + self.keyring_supported = tools.keyring_supported() self.cb_password_save.set_sensitive(self.keyring_supported) #automatic backup mode store diff --git a/kde4/man/C/backintime-kde4.1 b/kde4/man/C/backintime-kde4.1 index 9dc16f7f6..47f4b64a3 100644 --- a/kde4/man/C/backintime-kde4.1 +++ b/kde4/man/C/backintime-kde4.1 @@ -1,4 +1,4 @@ -.TH backintime-kde4 1 "June 2013" "version 1.0.27" "USER COMMANDS" +.TH backintime-kde4 1 "Oct 2013" "version 1.0.27" "USER COMMANDS" .SH NAME backintime-kde4 \- a simple backup tool for KDE4. .SH SYNOPSIS diff --git a/kde4/settingsdialog.py b/kde4/settingsdialog.py index d3372abe2..5c1979cf5 100644 --- a/kde4/settingsdialog.py +++ b/kde4/settingsdialog.py @@ -23,7 +23,6 @@ import gettext import copy import subprocess -import keyring from PyQt4.QtGui import * from PyQt4.QtCore import * @@ -253,11 +252,7 @@ def __init__( self, parent ): self.cb_password_use_cache = QCheckBox( QString.fromUtf8( _( 'Cache Password for Cron (Security issue: root can read password)' ) ), self ) vlayout.addWidget( self.cb_password_use_cache ) - backend = self.config.get_keyring_backend() - if len(backend) <= 0: - backend = 'kwallet' - self.config.set_keyring_backend(backend) - self.keyring_supported = tools.set_keyring(backend) + self.keyring_supported = tools.keyring_supported() self.cb_password_save.setEnabled(self.keyring_supported) #mode change