diff -Nru gnome-online-accounts-3.28.0/debian/changelog gnome-online-accounts-3.28.0/debian/changelog --- gnome-online-accounts-3.28.0/debian/changelog 2018-04-18 10:04:29.000000000 -0500 +++ gnome-online-accounts-3.28.0/debian/changelog 2018-05-25 09:04:11.000000000 -0500 @@ -1,3 +1,11 @@ +gnome-online-accounts (3.28.0-0ubuntu3) UNRELEASED; urgency=medium + + * debian/patches/0001-ubuntu-sso-provider.patch: Add a link to the + link to the privacy policy in U1 login dialog (LP: #1773213). + * debian/patches/0002-livepatch-auth: Refresh patch. + + -- Andrea Azzarone Fri, 25 May 2018 09:04:11 -0500 + gnome-online-accounts (3.28.0-0ubuntu2) bionic; urgency=medium * debian/patches/0002-livepatch-auth: Don't show an error message if the diff -Nru gnome-online-accounts-3.28.0/debian/control gnome-online-accounts-3.28.0/debian/control --- gnome-online-accounts-3.28.0/debian/control 2018-04-18 10:04:36.000000000 -0500 +++ gnome-online-accounts-3.28.0/debian/control 2018-05-25 09:04:11.000000000 -0500 @@ -1,5 +1,5 @@ # This file is autogenerated. DO NOT EDIT! -# +# # Modifications should be made to debian/control.in instead. # This file is regenerated automatically in the clean target. Source: gnome-online-accounts @@ -7,7 +7,7 @@ Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Debian GNOME Maintainers -Uploaders: Jeremy Bicha , Michael Biebl +Uploaders: Jeremy Bicha , Michael Biebl Build-Depends: debhelper (>= 10.3), autoconf-archive, gnome-pkg-tools (>= 0.10), diff -Nru gnome-online-accounts-3.28.0/debian/patches/0001-ubuntu-sso-provider.patch gnome-online-accounts-3.28.0/debian/patches/0001-ubuntu-sso-provider.patch --- gnome-online-accounts-3.28.0/debian/patches/0001-ubuntu-sso-provider.patch 2018-04-18 10:04:16.000000000 -0500 +++ gnome-online-accounts-3.28.0/debian/patches/0001-ubuntu-sso-provider.patch 2018-05-25 09:04:11.000000000 -0500 @@ -24,9 +24,9 @@ po/POTFILES.in | 1 + src/goabackend/Makefile.am | 3 + src/goabackend/goaprovider.c | 4 + - src/goabackend/goaubuntussoprovider.c | 889 +++++++++++++++++++++++++++++ + src/goabackend/goaubuntussoprovider.c | 943 +++++++++++++++++++++++++++++ src/goabackend/goaubuntussoprovider.h | 39 ++ - 18 files changed, 959 insertions(+) + 18 files changed, 1013 insertions(+) create mode 100644 data/icons/16x16/goa-account-ubuntusso.png create mode 100644 data/icons/22x22/goa-account-ubuntusso.png create mode 100644 data/icons/24x24/goa-account-ubuntusso.png @@ -291,10 +291,10 @@ #endif diff --git a/src/goabackend/goaubuntussoprovider.c b/src/goabackend/goaubuntussoprovider.c new file mode 100644 -index 0000000..7e3b6ac +index 0000000..be22a1b --- /dev/null +++ b/src/goabackend/goaubuntussoprovider.c -@@ -0,0 +1,889 @@ +@@ -0,0 +1,943 @@ +/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ +/* + * Copyright © 2018 Canonical Ltd @@ -638,6 +638,39 @@ + } +} + ++static char * ++get_item (const char *buffer, const char *name) ++{ ++ char *label, *start, *end, *result; ++ char end_char; ++ ++ result = NULL; ++ start = NULL; ++ end = NULL; ++ label = g_strconcat (name, "=", NULL); ++ if ((start = strstr (buffer, label)) != NULL) ++ { ++ start += strlen (label); ++ end_char = '\n'; ++ if (*start == '"') ++ { ++ start++; ++ end_char = '"'; ++ } ++ ++ end = strchr (start, end_char); ++ } ++ ++ if (start != NULL && end != NULL) ++ { ++ result = g_strndup (start, end - start); ++ } ++ ++ g_free (label); ++ ++ return result; ++} ++ +static void +create_account_details_ui (GoaProvider *provider, + GtkDialog *dialog, @@ -650,10 +683,14 @@ + GtkWidget *grid1; + GtkWidget *grid2; + GtkWidget *label; ++ GtkWidget *footer_box; ++ GtkWidget *privacy_button; + GObject *revealer; + GtkWidget *spinner; + gint row; + gint width; ++ g_autofree gchar *buffer = NULL; ++ g_autofree gchar* privacy_policy = NULL; + + goa_utils_set_dialog_title (provider, dialog, new_account); + @@ -735,10 +772,14 @@ + gtk_dialog_set_default_response (data->dialog, GTK_RESPONSE_OK); + gtk_dialog_set_response_sensitive (data->dialog, GTK_RESPONSE_OK, FALSE); + ++ footer_box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 3); ++ gtk_widget_show (footer_box); ++ gtk_container_add (GTK_CONTAINER (grid0), footer_box); ++ + data->progress_grid = gtk_grid_new (); + gtk_orientable_set_orientation (GTK_ORIENTABLE (data->progress_grid), GTK_ORIENTATION_HORIZONTAL); + gtk_grid_set_column_spacing (GTK_GRID (data->progress_grid), 3); -+ gtk_container_add (GTK_CONTAINER (grid0), data->progress_grid); ++ gtk_box_pack_start (GTK_CONTAINER (footer_box), data->progress_grid, TRUE, TRUE, 0); + + spinner = gtk_spinner_new (); + gtk_widget_set_opacity (spinner, 0.0); @@ -750,6 +791,19 @@ + gtk_widget_set_opacity (label, 0.0); + gtk_container_add (GTK_CONTAINER (data->progress_grid), label); + ++ if (g_file_get_contents ("/etc/os-release", &buffer, NULL, NULL)) ++ { ++ privacy_policy = get_item (buffer, "PRIVACY_POLICY_URL"); ++ ++ if (privacy_policy) ++ { ++ privacy_button = gtk_link_button_new_with_label (privacy_policy, ++ _("Privacy Policy")); ++ gtk_widget_show (privacy_button); ++ gtk_box_pack_end (GTK_BOX (footer_box), privacy_button, FALSE, FALSE, 0); ++ } ++ } ++ + if (new_account) + { + gtk_window_get_size (GTK_WINDOW (data->dialog), &width, NULL); diff -Nru gnome-online-accounts-3.28.0/debian/patches/0002-livepatch-auth.patch gnome-online-accounts-3.28.0/debian/patches/0002-livepatch-auth.patch --- gnome-online-accounts-3.28.0/debian/patches/0002-livepatch-auth.patch 2018-04-18 10:04:16.000000000 -0500 +++ gnome-online-accounts-3.28.0/debian/patches/0002-livepatch-auth.patch 2018-05-25 09:04:11.000000000 -0500 @@ -1,25 +1,25 @@ From: Andrea Azzarone +Date: Wed, 28 Feb 2018 08:53:38 +0000 Bug: https://bugzilla.gnome.org/show_bug.cgi?id=793755 Bug-Ubuntu: https://bugs.launchpad.net/bugs/1752472 Forwarded: not-needed -Date: Wed, 28 Feb 2018 08:53:38 +0000 Subject: Get livepatch authentication token. --- configure.ac | 1 + data/Makefile.am | 3 +- data/scripts/Makefile.am | 14 +++ - data/scripts/lpa_helper.py | 139 +++++++++++++++++++++++ + data/scripts/lpa_helper.py | 139 ++++++++++++++++++++++ src/goabackend/Makefile.am | 1 + - src/goabackend/goaubuntussoprovider.c | 207 +++++++++++++++++++++++++++++++++- - 6 files changed, 360 insertions(+), 5 deletions(-) + src/goabackend/goaubuntussoprovider.c | 209 +++++++++++++++++++++++++++++++++- + 6 files changed, 362 insertions(+), 5 deletions(-) create mode 100644 data/scripts/Makefile.am - create mode 100755 data/scripts/lpa_helper.py + create mode 100644 data/scripts/lpa_helper.py -Index: gnome-online-accounts/configure.ac -=================================================================== ---- gnome-online-accounts.orig/configure.ac -+++ gnome-online-accounts/configure.ac +diff --git a/configure.ac b/configure.ac +index ab2ec82..c90dacd 100644 +--- a/configure.ac ++++ b/configure.ac @@ -581,6 +581,7 @@ data/icons/32x32/Makefile data/icons/48x48/Makefile data/icons/96x96/Makefile @@ -28,10 +28,10 @@ src/Makefile src/goa/Makefile src/goa/goa-1.0.pc -Index: gnome-online-accounts/data/Makefile.am -=================================================================== ---- gnome-online-accounts.orig/data/Makefile.am -+++ gnome-online-accounts/data/Makefile.am +diff --git a/data/Makefile.am b/data/Makefile.am +index 286dcd0..646613a 100644 +--- a/data/Makefile.am ++++ b/data/Makefile.am @@ -1,7 +1,7 @@ NULL = @@ -46,10 +46,11 @@ -include $(top_srcdir)/git.mk + -Index: gnome-online-accounts/data/scripts/Makefile.am -=================================================================== +diff --git a/data/scripts/Makefile.am b/data/scripts/Makefile.am +new file mode 100644 +index 0000000..5133c5b --- /dev/null -+++ gnome-online-accounts/data/scripts/Makefile.am ++++ b/data/scripts/Makefile.am @@ -0,0 +1,14 @@ +NULL = + @@ -66,10 +67,11 @@ + +-include $(top_srcdir)/git.mk \ No newline at end of file -Index: gnome-online-accounts/data/scripts/lpa_helper.py -=================================================================== +diff --git a/data/scripts/lpa_helper.py b/data/scripts/lpa_helper.py +new file mode 100644 +index 0000000..3836e9e --- /dev/null -+++ gnome-online-accounts/data/scripts/lpa_helper.py ++++ b/data/scripts/lpa_helper.py @@ -0,0 +1,139 @@ +#!/usr/bin/env python3 +import json @@ -210,10 +212,10 @@ + except Exception as e: + print(generic_error, e, file=sys.stderr) + sys.exit(1) -Index: gnome-online-accounts/src/goabackend/Makefile.am -=================================================================== ---- gnome-online-accounts.orig/src/goabackend/Makefile.am -+++ gnome-online-accounts/src/goabackend/Makefile.am +diff --git a/src/goabackend/Makefile.am b/src/goabackend/Makefile.am +index 3db1ebf..2ed7eda 100644 +--- a/src/goabackend/Makefile.am ++++ b/src/goabackend/Makefile.am @@ -12,6 +12,7 @@ AM_CPPFLAGS = \ -DG_LOG_DOMAIN=\"GoaBackend\" \ -DGOA_BACKEND_COMPILATION \ @@ -222,10 +224,10 @@ -DPACKAGE_LIBEXEC_DIR=\""$(libexecdir)"\" \ -DPACKAGE_SYSCONF_DIR=\""$(sysconfdir)"\" \ -DPACKAGE_DATA_DIR=\""$(pkgdatadir)"\" \ -Index: gnome-online-accounts/src/goabackend/goaubuntussoprovider.c -=================================================================== ---- gnome-online-accounts.orig/src/goabackend/goaubuntussoprovider.c -+++ gnome-online-accounts/src/goabackend/goaubuntussoprovider.c +diff --git a/src/goabackend/goaubuntussoprovider.c b/src/goabackend/goaubuntussoprovider.c +index be22a1b..f942cc7 100644 +--- a/src/goabackend/goaubuntussoprovider.c ++++ b/src/goabackend/goaubuntussoprovider.c @@ -20,6 +20,7 @@ #include "config.h" @@ -242,7 +244,7 @@ gchar *account_object_path; GError *error; -@@ -91,6 +93,7 @@ add_account_data_clear (AddAccountData * +@@ -91,6 +93,7 @@ add_account_data_clear (AddAccountData *data) g_clear_object (&data->snapd_client); g_free (data->macaroon); g_strfreev (data->discharges); @@ -250,7 +252,7 @@ g_free (data->account_object_path); g_clear_error (&data->error); } -@@ -196,6 +199,9 @@ ensure_credentials_sync (GoaProvider * +@@ -196,6 +199,9 @@ ensure_credentials_sync (GoaProvider *provider, if (!goa_utils_get_credentials (provider, object, "discharges", NULL, &discharges_str, cancellable, error)) goto edit_error_and_return; @@ -260,7 +262,7 @@ if (discharges_str) discharges_var = g_variant_parse (G_VARIANT_TYPE ("as"), discharges_str, NULL, NULL, NULL); if (discharges_var) -@@ -430,7 +436,6 @@ create_account_details_ui (GoaProvider +@@ -467,7 +473,6 @@ create_account_details_ui (GoaProvider *provider, row = 0; add_entry (grid2, row++, _("Passc_ode:"), &data->otp_entry); @@ -268,7 +270,7 @@ g_signal_connect (data->otp_entry, "changed", G_CALLBACK (on_otp_changed), data); gtk_dialog_add_button (data->dialog, _("_Cancel"), GTK_RESPONSE_CANCEL); -@@ -481,8 +486,8 @@ get_snapd_error_message (GError *error) +@@ -535,8 +540,8 @@ get_snapd_error_message (GError *error) { g_return_val_if_fail (error != NULL, NULL); @@ -279,7 +281,7 @@ if (g_error_matches (error, SNAPD_ERROR, SNAPD_ERROR_AUTH_DATA_REQUIRED)) return _("Provided email/password is not correct"); -@@ -492,6 +497,31 @@ get_snapd_error_message (GError *error) +@@ -546,6 +551,31 @@ get_snapd_error_message (GError *error) return _("Something went wrong, please try again"); } @@ -311,10 +313,11 @@ static void dialog_response_cb (GtkDialog *dialog, gint response_id, -@@ -526,6 +556,120 @@ snapd_login_ready_cb (GObject *object, +@@ -579,6 +609,120 @@ snapd_login_ready_cb (GObject *object, + g_main_loop_quit (data->loop); } - static void ++static void +subprocess_wait_cb (GObject *object, + GAsyncResult *res, + gpointer user_data) @@ -428,11 +431,10 @@ + g_main_loop_quit (data->loop); +} + -+static void + static void add_account_cb (GoaManager *manager, GAsyncResult *res, - gpointer user_data) -@@ -549,8 +693,8 @@ add_credentials_key_values (GVariantBuil +@@ -603,8 +747,8 @@ add_credentials_key_values (GVariantBuilder *builder, discharges_var = g_variant_new_strv ((const gchar * const*) data->discharges, -1); discharges_str = g_variant_print (discharges_var, FALSE); g_variant_builder_add (builder, "{sv}", "discharges", g_variant_new_string (discharges_str)); @@ -442,7 +444,7 @@ static gboolean get_tokens_and_identity (GoaProvider *provider, gboolean add_account, -@@ -564,6 +708,7 @@ get_tokens_and_identity (GoaProvider +@@ -618,6 +762,7 @@ get_tokens_and_identity (GoaProvider *provider, const gchar *username; const gchar *otp; gint response; @@ -450,7 +452,7 @@ g_return_val_if_fail (GOA_IS_UBUNTU_SSO_PROVIDER (provider), FALSE); g_return_val_if_fail ((!add_account && existing_identity != NULL && existing_identity[0] != '\0') -@@ -608,6 +753,9 @@ get_tokens_and_identity (GoaProvider +@@ -662,6 +807,9 @@ get_tokens_and_identity (GoaProvider *provider, otp = gtk_entry_get_text (GTK_ENTRY (data->otp_entry)); otp = otp && strlen (otp) > 0 ? otp : NULL; @@ -460,7 +462,7 @@ g_clear_object (&data->cancellable); data->cancellable = g_cancellable_new (); -@@ -668,6 +816,59 @@ get_tokens_and_identity (GoaProvider +@@ -722,6 +870,59 @@ get_tokens_and_identity (GoaProvider *provider, goto login_again; }