Commit 11e179d5 authored by Laurent Bigonville's avatar Laurent Bigonville

Update upstream source from tag 'upstream/40.1'

Update to upstream version '40.1'
with Debian dir 38720047eb09b4c4eb8cdb686cad58a433d53acf
parents 4494bfc8 6895b9fa
...@@ -21,10 +21,6 @@ Files: po/*.po ...@@ -21,10 +21,6 @@ Files: po/*.po
Copyright: 2008–2019 Rosetta Contributors and Canonical Ltd Copyright: 2008–2019 Rosetta Contributors and Canonical Ltd
License: GPL-3+ License: GPL-3+
Files: libdeja/uriutils.c libdeja/uriutils.h
Copyright: 2006–2007 Red Hat, Inc
License: GPL-3+
Files: deja-dup/nautilus/NautilusExtension.[ch] Files: deja-dup/nautilus/NautilusExtension.[ch]
Copyright: 2004–2005 Free Software Foundation, Inc. Copyright: 2004–2005 Free Software Foundation, Inc.
2009–2011 Michael Terry <mike@mterry.name> 2009–2011 Michael Terry <mike@mterry.name>
...@@ -35,18 +31,18 @@ Files: data/ui/server-hint.ui ...@@ -35,18 +31,18 @@ Files: data/ui/server-hint.ui
Copyright: 2015 Georges Basile Stavracas Neto <georges.stavracas@gmail.com> Copyright: 2015 Georges Basile Stavracas Neto <georges.stavracas@gmail.com>
License: LGPL-2.1+ License: LGPL-2.1+
Files: vapi/config.vapi Files: data/org.gnome.DejaDup.appdata.xml.in
Copyright: 2007–2008 Jaap Haitsma <jaap@haitsma.org> Copyright: 2017-2019 Michael Terry <mike@mterry.name>
License: GPL-3+ License: CC-BY-SA-4.0
Files: help/C/*.page Files: help/C/*.page
Copyright: 2010–2011,2016-2019 Michael Terry <mike@mterry.name> Copyright: 2010–2011,2016-2019 Michael Terry <mike@mterry.name>
2011-2015 Canonical Ltd 2011-2015 Canonical Ltd
License: CC-BY-SA-3.0 License: CC-BY-SA-4.0
Files: help/*.po Files: help/*.po
Copyright: 2008–2019 Rosetta Contributors and Canonical Ltd Copyright: 2008–2019 Rosetta Contributors and Canonical Ltd
License: CC-BY-SA-3.0 License: CC-BY-SA-4.0
Files: data/icons/org.gnome.DejaDup.svg Files: data/icons/org.gnome.DejaDup.svg
Copyright: 2019 Jakub Steiner <jimmac@gmail.com> Copyright: 2019 Jakub Steiner <jimmac@gmail.com>
...@@ -54,7 +50,7 @@ License: CC-BY-SA-4.0 ...@@ -54,7 +50,7 @@ License: CC-BY-SA-4.0
Files: data/icons/org.gnome.DejaDup-symbolic.svg Files: data/icons/org.gnome.DejaDup-symbolic.svg
Copyright: 2012 Barbara Muraus <barbara.muraus@gmail.com> Copyright: 2012 Barbara Muraus <barbara.muraus@gmail.com>
License: CC-BY-SA-3.0 License: CC-BY-SA-4.0
Files: data/icons/deja-dup-cloud.svg Files: data/icons/deja-dup-cloud.svg
Copyright: None Copyright: None
...@@ -80,23 +76,6 @@ License: GPL-3+ ...@@ -80,23 +76,6 @@ License: GPL-3+
On Debian systems, the full text of the GNU General Public License On Debian systems, the full text of the GNU General Public License
version 3 can be found in the file /usr/share/common-licenses/GPL-3. version 3 can be found in the file /usr/share/common-licenses/GPL-3.
License: LGPL-3+
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser 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 Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
.
On Debian systems, the full text of the GNU Lesser General Public License
version 3 can be found in the file /usr/share/common-licenses/LGPL-3.
License: LGPL-2.1+ License: LGPL-2.1+
This program is free software: you can redistribute it and/or modify This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by it under the terms of the GNU Lesser General Public License as published by
...@@ -112,22 +91,7 @@ License: LGPL-2.1+ ...@@ -112,22 +91,7 @@ License: LGPL-2.1+
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
. .
On Debian systems, the full text of the GNU Lesser General Public License On Debian systems, the full text of the GNU Lesser General Public License
version 3 can be found in the file /usr/share/common-licenses/LGPL-2.1. version 2.1 can be found in the file /usr/share/common-licenses/LGPL-2.1.
License: CC-BY-SA-3.0
You are free:
to Share (to copy, distribute and transmit the work) and
to Remix (to adapt the work) under the following conditions:
.
Attribution — You must attribute the work in the manner specified by the
author or licensor (but not in any way that suggests that they endorse you
or your use of the work).
.
Share Alike — If you alter, transform, or build upon this work, you may
distribute the resulting work only under the same, similar or a compatible
license.
.
For more information, see http://creativecommons.org/licenses/by-sa/3.0/
License: CC-BY-SA-4.0 License: CC-BY-SA-4.0
You are free: You are free:
......
This diff is collapsed.
= New to deja-dup? = # New to deja-dup?
When making a non-trivial change, remember to add yourself to AUTHORS and help/C/credits.page When making a non-trivial change, remember to add yourself to AUTHORS and help/C/credits.page
deja-dup uses meson, but for most development purposes, you can simply use the convenience top-level Makefile: deja-dup uses meson, but for most development purposes, you can simply use the convenience top-level Makefile:
* To build: make * To build: `make`
* To test: make check * To test: `make check`
* To install: make install DESTDIR=/tmp/deja-dup * To install: `make install DESTDIR=/tmp/deja-dup`
When testing a change, it is helpful to run ./tests/shell (or shell-local if you want a silo'd dbus environment too) When testing a change, it is helpful to run `./tests/shell` (or `shell-local` if you want a silo'd dbus environment too)
That will give you a full shell pointing at all your built executables. That will give you a full shell pointing at all your built executables.
== Folder Layout == ## Folder Layout
* libdeja: non-GUI library that wraps policy and hides complexity of duplicity * libdeja: non-GUI library that wraps policy and hides complexity of duplicity
* deja-dup: GNOME UI for libdeja, including integration points with nautilus and control-center * deja-dup: GNOME UI for libdeja, including integration points with nautilus and control-center
* data: shared schemas, icons, etc * data: shared schemas, icons, etc
* vapi: some helper APIs for vala * vapi: some helper APIs for vala
== Flatpak == ## Flatpak
To build a local flatpak, run 'make flatpak'. You'll want an up-to-date flatpak-builder though. To build a local flatpak, run `make flatpak`. You'll want an up-to-date flatpak-builder though.
If you're on Ubuntu: If you're on Ubuntu:
```
sudo add-apt-repository ppa:alexlarsson/flatpak sudo add-apt-repository ppa:alexlarsson/flatpak
sudo apt update sudo apt update
```
\ No newline at end of file
# 40.1
- Fix versioning to be correct
# 40.0
- Fix tests when run under glib 2.60
# 39.1
This is a development release leading up to 40.0.
- Fix a bug that could have caused backups to be encrypted with two different
passwords in some cases. This would result in difficulty backing up or
restoring by not accepting the password you expected it to.
- Fix a bug that caused duplicate save or exclude folders to appear in the
preferences.
- Delete a canary file that duplicity's pydrive puts in your Drive.
- If you don't ask for your password to be saved, we now clear out any older
saved password.
- Finally delete the ancient Ubuntu One backend code.
# 39.0
This is a development release leading up to 40.0.
- Switch away from GNOME Online Accounts to our own cloud keys
- It was brought to our attention that we shouldn't be using GNOME's keys,
as they are intended for GNOME only.
- Google accounts will have to be re-authenticated with our keys.
- Nextcloud accounts will now appear as webdav network server accounts.
- Adds new `pydrive_pkgs` option to list the package names needed for the
pydrive duplicity backend (for now, the system package that provides the
`pydrive` python2 package should suffice).
- Adds new `google_client_id` option if you want to override our default
account key and use your own. You likely won't want to do this.
- Adds new dependencies on `libjson-glib` and `libsoup`.
- Drops `libgoa-backend` dependency. The `libgoa` dependency will stay
during a transition period from the old keys to the new keys.
- Unmount a remote backup location when we are done with it, if we originally
mounted it.
# 38.4 # 38.4
- Update app icon - Update app icon
- Don't run monitor when automatic backups are disabled - Don't run monitor when automatic backups are disabled
......
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>$TITLE</title>
<style>
body {
background-color: #FFFFFD;
font-family: sans-serif;
}
.box {
height: 60vh;
width: 60vw;
margin: 18vh 20vw;
background-color: #EEE;
border-radius: 1rem;
border-width: 0.25rem;
border-style: solid;
border-color: #76ABDF;
text-align: center;
align-items: center;
display: flex;
flex-direction: column;
justify-content: center;
}
.headline {
font-size: 4rem;
width: 40vw;
}
.text {
font-size: 2rem;
width: 40vw;
}
</style>
</head>
<body>
<div class="box">
<p class="headline">$TITLE</p>
<p class="text">$TEXT</p>
</div>
</body>
</html>
\ No newline at end of file
...@@ -77,6 +77,7 @@ ...@@ -77,6 +77,7 @@
<choice value='drive'/> <choice value='drive'/>
<choice value='gcs'/> <choice value='gcs'/>
<choice value='goa'/> <choice value='goa'/>
<choice value='google'/>
<choice value='rackspace'/> <choice value='rackspace'/>
<choice value='openstack'/> <choice value='openstack'/>
<choice value='s3'/> <choice value='s3'/>
...@@ -93,6 +94,7 @@ ...@@ -93,6 +94,7 @@
<child name="s3" schema="org.gnome.DejaDup.S3"/> <child name="s3" schema="org.gnome.DejaDup.S3"/>
<child name="gcs" schema="org.gnome.DejaDup.GCS"/> <child name="gcs" schema="org.gnome.DejaDup.GCS"/>
<child name='goa' schema="org.gnome.DejaDup.GOA"/> <child name='goa' schema="org.gnome.DejaDup.GOA"/>
<child name='google' schema="org.gnome.DejaDup.Google"/>
<child name='remote' schema="org.gnome.DejaDup.Remote"/> <child name='remote' schema="org.gnome.DejaDup.Remote"/>
<child name='local' schema="org.gnome.DejaDup.Local"/> <child name='local' schema="org.gnome.DejaDup.Local"/>
<child name='drive' schema="org.gnome.DejaDup.Drive"/> <child name='drive' schema="org.gnome.DejaDup.Drive"/>
...@@ -179,6 +181,14 @@ ...@@ -179,6 +181,14 @@
</key> </key>
</schema> </schema>
<schema id="org.gnome.DejaDup.Google" path="/org/gnome/deja-dup/google/">
<key name="folder" type="s">
<default>'$HOSTNAME'</default>
<summary>The folder where backups are stored</summary>
<description>The folder path where backups are stored. Paths can be absolute or relative to the host.</description>
</key>
</schema>
<schema id="org.gnome.DejaDup.Rackspace" path="/org/gnome/deja-dup/rackspace/"> <schema id="org.gnome.DejaDup.Rackspace" path="/org/gnome/deja-dup/rackspace/">
<key name="container" type="s"> <key name="container" type="s">
<default>'$HOSTNAME'</default> <default>'$HOSTNAME'</default>
...@@ -192,24 +202,6 @@ ...@@ -192,24 +202,6 @@
</key> </key>
</schema> </schema>
<schema id="org.gnome.DejaDup.GOA" path="/org/gnome/deja-dup/goa/">
<key name="id" type="s">
<default>''</default>
<summary>Account ID</summary>
<description>The unique ID for the GNOME Online Account.</description>
</key>
<key name="type" type="s">
<default>''</default>
<summary>The type of account</summary>
<description>The cached type of account that ID represents.</description>
</key>
<key name="folder" type="s">
<default>'$HOSTNAME'</default>
<summary>The folder where backups are stored</summary>
<description>The folder hierarchy where backups are stored. Paths can be absolute or relative to the host.</description>
</key>
</schema>
<schema id="org.gnome.DejaDup.OpenStack" path="/org/gnome/deja-dup/openstack/"> <schema id="org.gnome.DejaDup.OpenStack" path="/org/gnome/deja-dup/openstack/">
<key name="container" type="s"> <key name="container" type="s">
<default>'$HOSTNAME'</default> <default>'$HOSTNAME'</default>
...@@ -233,7 +225,7 @@ ...@@ -233,7 +225,7 @@
</key> </key>
</schema> </schema>
<!-- deprecated schema --> <!-- deprecated schemas -->
<schema id="org.gnome.DejaDup.File" path="/org/gnome/deja-dup/file/"> <schema id="org.gnome.DejaDup.File" path="/org/gnome/deja-dup/file/">
<key name="path" type="s"> <key name="path" type="s">
<default>''</default> <default>''</default>
...@@ -265,4 +257,19 @@ ...@@ -265,4 +257,19 @@
</key> </key>
</schema> </schema>
<schema id="org.gnome.DejaDup.GOA" path="/org/gnome/deja-dup/goa/">
<key name="id" type="s">
<default>''</default>
</key>
<key name="type" type="s">
<default>''</default>
</key>
<key name="folder" type="s">
<default>'$HOSTNAME'</default>
</key>
<key name="migrated" type="b">
<default>false</default>
</key>
</schema>
</schemalist> </schemalist>
{
"scopes": [
"https://www.googleapis.com/auth/drive.file"
],
"id_token": null,
"id_token_jwt": null,
"user_agent": null,
"token_info_uri": "https://oauth2.googleapis.com/tokeninfo",
"token_uri": "https://accounts.google.com/o/oauth2/token",
"revoke_uri": "https://oauth2.googleapis.com/revoke",
"token_expiry": "",
"invalid": false,
"client_id": "$CLIENT_ID",
"client_secret": "",
"access_token": "$ACCESS_TOKEN",
"refresh_token": "$REFRESH_TOKEN",
"_module": "oauth2client.client",
"_class": "OAuth2Credentials"
}
client_config_backend: settings
client_config:
client_id: $CLIENT_ID
client_secret: CLIENT_SECRET_NOT_USED_BUT_REQUIRED_BY_PYDRIVE
save_credentials: True
save_credentials_backend: file
save_credentials_file: $PATH/credentials.json
get_refresh_token: True
oauth_scope:
- https://www.googleapis.com/auth/drive.file
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<gresources> <gresources>
<gresource prefix="/org/gnome/DejaDup@profile@"> <gresource prefix="/org/gnome/DejaDup@profile@">
<!-- ui files -->
<file compressed="true">restore-missing.ui</file> <file compressed="true">restore-missing.ui</file>
<file compressed="true">server-hint.ui</file> <file compressed="true">server-hint.ui</file>
<!-- files used for OAuth consent screens !-->
<file>access-granted.html</file>
<!-- templates used for pydrive support -->
<file>pydrive-credentials.json</file>
<file>pydrive-settings.yaml</file>
<!-- icons -->
<file>icons/deja-dup-google-drive.png</file>
<file compressed="true">icons/deja-dup-cloud.svg</file> <file compressed="true">icons/deja-dup-cloud.svg</file>
<!-- add our main app icons as fallbacks of last resort --> <!-- add our main app icons as fallbacks of last resort -->
<file compressed="true" alias="icons/@icon@.svg">icons/org.gnome.DejaDup.svg</file> <file compressed="true" alias="icons/@icon@.svg">icons/org.gnome.DejaDup.svg</file>
<file compressed="true" alias="icons/@icon@-symbolic.svg">icons/org.gnome.DejaDup-symbolic.svg</file> <file compressed="true" alias="icons/@icon@-symbolic.svg">icons/org.gnome.DejaDup-symbolic.svg</file>
</gresource> </gresource>
<gresource prefix="/org/gnome/DejaDup@profile@/gtk"> <gresource prefix="/org/gnome/DejaDup@profile@/gtk">
<file compressed="true">help-overlay.ui</file> <file compressed="true">help-overlay.ui</file>
......
...@@ -240,6 +240,11 @@ public abstract class Assistant : Gtk.Window ...@@ -240,6 +240,11 @@ public abstract class Assistant : Gtk.Window
{ {
var title = Markup.printf_escaped("<span size=\"xx-large\" weight=\"ultrabold\">%s</span>", info.title); var title = Markup.printf_escaped("<span size=\"xx-large\" weight=\"ultrabold\">%s</span>", info.title);
header_title.set_markup(title); header_title.set_markup(title);
if (info.title == "")
header_title.hide();
else
header_title.show();
} }
void page_changed() void page_changed()
...@@ -289,10 +294,10 @@ public abstract class Assistant : Gtk.Window ...@@ -289,10 +294,10 @@ public abstract class Assistant : Gtk.Window
return btn; return btn;
} }
void make_button_default(Gtk.Widget button) protected void make_button_default(Gtk.Widget button)
{ {
button.grab_default(); button.grab_default();
button.get_style_context().add_class(Gtk.STYLE_CLASS_SUGGESTED_ACTION); button.get_style_context().add_class(Gtk.STYLE_CLASS_SUGGESTED_ACTION);
} }
void set_buttons() void set_buttons()
......
...@@ -61,6 +61,10 @@ public abstract class AssistantOperation : Assistant ...@@ -61,6 +61,10 @@ public abstract class AssistantOperation : Assistant
List<Gtk.Widget> first_password_widgets; List<Gtk.Widget> first_password_widgets;
MainLoop password_ask_loop; MainLoop password_ask_loop;
Gtk.Label consent_label;
string consent_url;
protected Gtk.Grid consent_page {get; private set;}
Gtk.Label question_label; Gtk.Label question_label;
protected Gtk.Widget question_page {get; private set;} protected Gtk.Widget question_page {get; private set;}
...@@ -100,6 +104,7 @@ public abstract class AssistantOperation : Assistant ...@@ -100,6 +104,7 @@ public abstract class AssistantOperation : Assistant
add_confirm_page(); add_confirm_page();
add_password_page(); add_password_page();
add_nag_page(); add_nag_page();
add_consent_page();
add_question_page(); add_question_page();
add_progress_page(); add_progress_page();
add_summary_page(); add_summary_page();
...@@ -481,6 +486,33 @@ public abstract class AssistantOperation : Assistant ...@@ -481,6 +486,33 @@ public abstract class AssistantOperation : Assistant
return page; return page;
} }
protected Gtk.Grid make_consent_page()
{
int rows = 0;
var page = new Gtk.Grid();
page.row_spacing = 36;
page.column_spacing = 6;
page.border_width = 12;
var l = new Gtk.Label("");
l.xalign = 0.0f;
l.max_width_chars = 50;
l.wrap = true;
page.attach(l, 0, rows, 3, 1);
++rows;
consent_label = l;
var b = new Gtk.Button.with_mnemonic(_("_Grant Access"));
b.clicked.connect(() => {
DejaDup.show_uri(get_toplevel() as Gtk.Window, consent_url);
});
page.attach(b, 1, rows, 1, 1);
++rows;
return page;
}
protected Gtk.Widget make_question_page() protected Gtk.Widget make_question_page()
{ {
int rows = 0; int rows = 0;
...@@ -575,6 +607,13 @@ public abstract class AssistantOperation : Assistant ...@@ -575,6 +607,13 @@ public abstract class AssistantOperation : Assistant
nag_page = page; nag_page = page;
} }
void add_consent_page()
{
consent_page = make_consent_page();
append_page(consent_page, Type.INTERRUPT);
set_page_title(consent_page, _("Grant Access"));
}
void add_question_page() void add_question_page()
{ {
var page = make_question_page(); var page = make_question_page();
...@@ -632,6 +671,17 @@ public abstract class AssistantOperation : Assistant ...@@ -632,6 +671,17 @@ public abstract class AssistantOperation : Assistant
} }
} }
protected void show_oauth_consent_page(string? message, string? url)
{
consent_label.label = message;
consent_url = url;
if (url == null) {
go_forward();
} else {
interrupt(consent_page, false);
}
}
protected async void do_apply() protected async void do_apply()
{ {
/* /*
...@@ -659,6 +709,7 @@ public abstract class AssistantOperation : Assistant ...@@ -659,6 +709,7 @@ public abstract class AssistantOperation : Assistant
#endif #endif
op.backend.mount_op = new MountOperationAssistant(this); op.backend.mount_op = new MountOperationAssistant(this);
op.backend.pause_op.connect(pause_op); op.backend.pause_op.connect(pause_op);
op.backend.show_oauth_consent_page.connect(show_oauth_consent_page);
ensure_status_icon(op); ensure_status_icon(op);
...@@ -919,23 +970,29 @@ public abstract class AssistantOperation : Assistant ...@@ -919,23 +970,29 @@ public abstract class AssistantOperation : Assistant
passphrase = encrypt_entry.get_text(); passphrase = encrypt_entry.get_text();
} }
if (passphrase != "") { try {
// Save it if (passphrase != "" && encrypt_remember.active) {
if (encrypt_remember.active) { // Save passphrase long term
try { yield Secret.password_store(DejaDup.get_passphrase_schema(),
yield Secret.password_store(DejaDup.get_passphrase_schema(), Secret.COLLECTION_DEFAULT,
Secret.COLLECTION_DEFAULT, _("Backup encryption password"),
_("Backup encryption password"), passphrase,
passphrase, null,
null, "owner", Config.PACKAGE,
"owner", Config.PACKAGE, "type", "passphrase");
"type", "passphrase"); }
} else {
catch (Error e) { // If we weren't asked to save a password, clear it out. This
warning("%s\n", e.message); // prevents any attempt to accidentally use an old password.
} yield Secret.password_clear(DejaDup.get_passphrase_schema(),
null,
"owner", Config.PACKAGE,
"type", "passphrase");
} }
} }
catch (Error e) {
warning("%s\n", e.message);
}
} }
else { else {
passphrase = nag_entry.get_text().strip(); passphrase = nag_entry.get_text().strip();
...@@ -997,6 +1054,7 @@ public abstract class AssistantOperation : Assistant ...@@ -997,6 +1054,7 @@ public abstract class AssistantOperation : Assistant
interrupt(backend_install_page, false); interrupt(backend_install_page, false);
set_header_icon("system-software-install"); set_header_icon("system-software-install");
var install_button = add_button(C_("verb", "_Install"), CUSTOM_RESPONSE); var install_button = add_button(C_("verb", "_Install"), CUSTOM_RESPONSE);
make_button_default(install_button);
var loop = new MainLoop(null); var loop = new MainLoop(null);
install_button.clicked.connect(() => {start_install.begin(ids, loop);}); install_button.clicked.connect(() => {start_install.begin(ids, loop);});
forward_button = install_button; forward_button = install_button;
......
...@@ -310,7 +310,8 @@ public class DejaDupApp : Gtk.Application ...@@ -310,7 +310,8 @@ public class DejaDupApp : Gtk.Application
void backup_full(bool automatic) void backup_full(bool automatic)
{ {
assign_op(new AssistantBackup(automatic)); var backop = new AssistantBackup(automatic);
assign_op(backop);
// showing or not is handled by AssistantBackup // showing or not is handled by AssistantBackup
} }
......
...@@ -32,7 +32,13 @@ deja_dup = executable('deja-dup', ...@@ -32,7 +32,13 @@ deja_dup = executable('deja-dup',
resources, resources,
vala_args: common_vflags, vala_args: common_vflags,
c_args: common_cflags, c_args: common_cflags,
dependencies: [gio_unix_dep, goa_dep, gtk_dep, packagekit_dep, secret_dep], dependencies: [
gio_unix_dep,
goa_dep,
gtk_dep,
packagekit_dep,