Commit 71fdadb5 authored by sajolida's avatar sajolida
Browse files

Merge remote-tracking branch 'origin/stable' into feature/18236-remove-poedit

parents 56f5ade8 908ed34e
......@@ -48,29 +48,11 @@ my $notify = Desktop::Notify->new()
or die "Failed creating Desktop::Notify object.";
debug('$notify:' . "\n" . Dumper($notify));
my $summary = __("Synchronizing the system's clock");
my $body = __("Tor needs an accurate clock to work properly, especially for Onion Services. Please wait...");
my $notification = $notify->create(summary => $summary,
body => $body,
timeout => 0)
or die "Failed to create notification object";
debug('$notification:' . "\n" . Dumper($notification));
# Wait until notifications can be shown
until (system("pidof", "ibus-daemon") == 0) {
sleep 1
}
$notification->show() or warn "Failed showing notification.";
# Wait until htpdate is done
until ( -e $htp_done_file ) {
sleep 1;
}
$notification->close();
# in case htpdate failed, notify the user with the corresponding logs
unless (-e $htp_success_file) {
open(my $htp_log, '<', $htp_log_file)
......
......@@ -284,11 +284,27 @@ method checked_upgrades_file () {
}
method refresh_signing_key () {
my $new_key_content = Tails::Download::HTTPS->new(
max_download_size => 128 * 2**10,
)->get_url(
$self->running_system->baseurl . '/tails-signing-minimal.key'
);
my ($error_msg, $new_key_content);
$error_msg =
__(
q{<b>An error occured while updating the signing key.</b>\n\n}.
q{<b>This prevents determining whether an upgrade is available from our website.</b>\n\n}.
q{Check your network connection, and restart Tails to try upgrading again.\n\n}.
q{If the problem persists, go to file:///usr/share/doc/tails/website/doc/upgrade/error/check.en.html},
);
try {
$new_key_content = Tails::Download::HTTPS->new(
max_download_size => 128 * 2**10,
)->get_url(
$self->running_system->baseurl . '/tails-signing-minimal.key'
);
} catch {
$self->fatal(
$error_msg,
title => __(q{Error while downloading the signing key}),
debugging_info => $self->encoding->decode($_),
);
};
my ($stdout, $stderr, $exit_code);
my $success = 1;
IPC::Run::run ['gpg', '--import'],
......@@ -296,12 +312,7 @@ method refresh_signing_key () {
or $success = 0;
$exit_code = $?;
$success or $self->fatal(
__(
q{<b>An error occured while updating the signing key.</b>\n\n}.
q{<b>This prevents determining whether an upgrade is available from our website.</b>\n\n}.
q{Check your network connection, and restart Tails to try upgrading again.\n\n}.
q{If the problem persists, go to file:///usr/share/doc/tails/website/doc/upgrade/error/check.en.html},
),
$error_msg,
title => __(q{Error while updating the signing key}),
debugging_info => $self->encoding->decode(errf(
"exit code: %{exit_code}i\n\n".
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment