From 9cfb2f2b10033898b4895f8be44f8095ba299497 Mon Sep 17 00:00:00 2001 From: Jaime Soriano Pastor Date: Mon, 27 Apr 2020 18:20:25 +0200 Subject: [PATCH] Disable repository expiration checks in Journalbeat builds (#18005) (cherry picked from commit 7f037bf7b3cd59366933daaf96ea4ba2871b1bac) --- journalbeat/magefile.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/journalbeat/magefile.go b/journalbeat/magefile.go index d119e2e7554..58fdf91dfbe 100644 --- a/journalbeat/magefile.go +++ b/journalbeat/magefile.go @@ -193,7 +193,15 @@ func installDependencies(arch string, pkgs ...string) error { return err } - params := append([]string{"install", "-y", "--no-install-recommends"}, pkgs...) + params := append([]string{"install", "-y", + "--no-install-recommends", + + // Journalbeat is built with old versions of Debian that don't update + // their repositories, so they have expired keys. + // Allow unauthenticated packages. + // This was not enough: "-o", "Acquire::Check-Valid-Until=false", + "--allow-unauthenticated", + }, pkgs...) return sh.Run("apt-get", params...) }