From patchwork Thu Sep 24 01:10:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 83 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:eb04:0:0:0:0:0 with SMTP id f4csp180525ooj; Thu, 24 Sep 2020 02:11:02 -0700 (PDT) X-Received: by 2002:adf:f6c2:: with SMTP id y2mr3913980wrp.79.1600938662041; Thu, 24 Sep 2020 02:11:02 -0700 (PDT) ARC-Seal: i=3; a=rsa-sha256; t=1600938662; cv=pass; d=google.com; s=arc-20160816; b=YC4g+Pq4/UST7S46ynWdgWYUm+kcd4Sda/G6ZVmgO57phH4w6TgreVD+8MjVNnBTey GmV5cx/SDhK7F08uE7DcZurxAn+Hvvcb0A6tXGehRa6dBfVCFXXE+AO8frNQNhu+pbWr 9diYe0rXp5J/cp7SU5B/LsJpqtFlQrubjgdiw+l8xARVmIY7s24x0NLF2/otnqz1em0c bjdTTv6FERuuQrtXb+sBu9ZHLL+NHGN9eG9hdZWSBpdpzuzPSM8QRrUTnxLuFBJla/8s XC9t2vhrc9jlP+IO1m99W7N7yDlXgKt5NZDcZuXJzJRq5KBOkdFfnFzowu5RUiGuioFD Ao4g== ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:content-language:in-reply-to :mime-version:user-agent:date:message-id:from:references:to:subject :sender:dkim-signature; bh=uYubJkhJExx5j7LQ7OYHxwWWS5tjADOVVVsPtuSkPIk=; b=RCb8CbSBxmZr322r3/JZLD7PZcBh/SR1ZRfFUlF+UdHiZjYOGOaEPjihA52BNHYJO3 85vjcdkiWAUhaVQ/94Lnd2rNy3hU7KsDjdrmFzUEe482IX97bKogJSbrKzR202Azy4TH kZdnlKcB+m1Bbynoj8SQoc8kdQho6yAfbrrG4g0+3jgDMt0hzd6yMrjwiX//94a9bTnb IgAhLdP3l7GYaR/3qjCYgG5cFptBLQGBGF12V2Mx7OC9ut4zcCcVWaJZb19PD+dBLR0N NwCYzPUdLZPwS1bXphqtOvruRU7WxyVRe0SbjCC2PwbxbXkkAhnXKTp8RUI1Khytkxjq 97Ag== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=f5ZqDY1q; arc=pass (i=2 spf=pass spfdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of isar-users+bncbcji7smnv4nbbjofwh5qkgqerqif7qq@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCJI7SMNV4NBBJOFWH5QKGQERQIF7QQ@googlegroups.com; dmarc=fail (p=NONE sp=NONE dis=NONE arc=pass) header.from=siemens.com Received: from mail-sor-f55.google.com (mail-sor-f55.google.com. [209.85.220.55]) by mx.google.com with SMTPS id w1sor1399817wrr.11.2020.09.24.02.11.01 (Google Transport Security); Thu, 24 Sep 2020 02:11:02 -0700 (PDT) Received-SPF: pass (google.com: domain of isar-users+bncbcji7smnv4nbbjofwh5qkgqerqif7qq@googlegroups.com designates 209.85.220.55 as permitted sender) client-ip=209.85.220.55; Authentication-Results: mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=f5ZqDY1q; arc=pass (i=2 spf=pass spfdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of isar-users+bncbcji7smnv4nbbjofwh5qkgqerqif7qq@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCJI7SMNV4NBBJOFWH5QKGQERQIF7QQ@googlegroups.com; dmarc=fail (p=NONE sp=NONE dis=NONE arc=pass) header.from=siemens.com ARC-Seal: i=2; a=rsa-sha256; t=1600938661; cv=pass; d=google.com; s=arc-20160816; b=muPVV7vNBkVFglJ2yHdtbPN5sFKXgczK9xOjoETVDrIlr2MN1snwwy3VzaEN5CCDG9 DvB7QXY95LMMX8xg2NEfbPZhOGD+De5gn3lH3srZcI7CekdQT9XIuJnUXLCYenJPSGr8 x0T7tGE6QFhfW7wjNefJuJ0KOrs3k35MgCxne6F4B1rOR042MB/mIR5HKsMfKS2oTfJF Ds3hikriPW9F6d1MgMfYrY51ec5uqId/5VE3uc3vXIL+ufMPWeUznAeTbSvlZSARGFqz X4KxE2S5iQwFlAKgvlT5tw0vlrQrYFlbKaKlSbAkPnihvlvrUnDxmBxR+XA3KomqcfRM jVkg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:content-language:in-reply-to :mime-version:user-agent:date:message-id:from:references:to:subject :sender:dkim-signature; bh=uYubJkhJExx5j7LQ7OYHxwWWS5tjADOVVVsPtuSkPIk=; b=e1FieRrdasCcBUAAwTAozld+YP9xfCo6sB9x9y5d5RqMGezuN3+PnVdN5qbLhgrIGt KtfO/4Dx9GxEvGgzEQ6+qRenuS6er5OnrsFiYSVOSnO2G4QIvRkRV287rGW2WMjU1f11 aXWxUii7Jp0TIkiFBuG5qvy2TathFnjvFy5c59R5S3xlsQ46wCmy3uPZPMRMkE4TOHEg Z2NzHv23I8j+UXkjgnWQ0JNFfb7QJe0EgEeeKs2cLz+s/3U5sLpbpXFjs73ee3jS2bAn vblw0JHIcEiz/YcF5njD6HNPp4+Ufwb5Q9bPoaqeZL8uBqjh3adelgowWEI0TgxGTOQz 40gA== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 192.35.17.28 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=uYubJkhJExx5j7LQ7OYHxwWWS5tjADOVVVsPtuSkPIk=; b=f5ZqDY1qUoLLRE7yNRdfFwMj9R3JfUVggjenqkzilCwDcjo99s7+g2oSA4l44gl8IW M/jUXzJSiV262RIhsx2hk1pCKW2p6tyB1HxGvJZKxFoFh+vtBdBtkV1rp56i3QnErzfS vnie5fnno2G2B+tFhx3uMx9MKs7z8QQWtT68tj3xJoHtaepCFNcNM73QHwWNJ9mCRXrq fl2rzY9kOnz6k236Qcd5RtvE3HaiQ6QRtD0ParDXqjLw3CUhonpFYyASdweFCBtDxAYS qIYUUKoLZqQDjzY9Zi8VgxA6WlrfsD4nVVOOriPLSGnHCDUxFTLRIxQHRwYpyJe/NvzF 2RbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:x-spam-checked-in-group:list-post:list-help :list-archive:list-subscribe:list-unsubscribe; bh=uYubJkhJExx5j7LQ7OYHxwWWS5tjADOVVVsPtuSkPIk=; b=brLVExevvKVGZkjey3Pm2zEC8l0LvE3FPPY8HXl4UJNRGuzOcw3hmIoISTOC+ocgkX SY54/tsUuJaWIGHAHBCf6UL3EIGiTfmI2klDguT3ycD5soh5bF7Smd52tujLmnBuQa2A z3nu5zjapBznSUL2p1jVpzfQT8ZcmdIsOXOQ5+2p65x91tLyxBf/OQCS0hgLmCJIwSNX suKglvJOPvYj/jQ0M7ZwFVaNSSxjkJMrHbGr/JYaSSxE5zil8sYBS9Qk100p8L23NorG lQ2bm2MXmgLdErnTrtSj465BQa1raIXq7EyKFVC+6Ag9QMEfjbnW5IqmDXHyLnm9yJ+6 yimA== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM532tKTfmjVr6fTeY/FT69Bgs4ZovwJjhnTECCyUQ+brZKhSCEkSb SUgWOgAwdbYKpqCJqwbqqXM= X-Google-Smtp-Source: ABdhPJwzLV1G58TfhDoi/JNVILw1akWqSNg5wxSKEuJO99Sv+KmjC7urWWYBRAGIg/rPRIpzZG8rXw== X-Received: by 2002:a5d:55c8:: with SMTP id i8mr4004727wrw.331.1600938661207; Thu, 24 Sep 2020 02:11:01 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a1c:c2c1:: with SMTP id s184ls1144576wmf.2.canary-gmail; Thu, 24 Sep 2020 02:11:00 -0700 (PDT) X-Received: by 2002:a1c:e1c2:: with SMTP id y185mr3846014wmg.182.1600938660202; Thu, 24 Sep 2020 02:11:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600938660; cv=none; d=google.com; s=arc-20160816; b=HgPGY9y3RIibPP4z8PzWerxBoco9rDfsaaoI+JNsumEapp1uffmQtS84rolrkZwv/D KgH3BFalIgPUVTqCBg1HOuRn+B2gJhZEh5okOF4fbeSN4ymlSWg2KmKqe6d41Eids8j2 XJHdt+D2GhVOJLMcO75L+1kWDLknlw4j1AhMlKZOg+ILnny/dwT4RX33WKj64gjGC0MY 7TzNEp8Y6+2MbamWiuCLnRSid5UFWg/K7z2ZAhUxqDYxi7efZmbuDNpjfpzw8Qlgry7Q A05BmwbZG/flNFfjtIoOQ8urYWq+MxxPSclUBrYVgROy32hZ1EGlbBk4PM2uzby17giP UdrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:to:subject; bh=rn5anVWI8N5QMZv0iIBzi/NxMpCMYMmU7lVF5bjFPYw=; b=Tgye5ItaTdj2CaSWQBGCocy4uq0sruLUhNrsE9pyC2VCh2H8045+mpjvIj3NihWnka aNMSackKl9/VDlF8AUthCTTAceWOyur+1LQ34rhb/pEZfOvYWiFAQDRZXc4jV/Dvn7g1 IbnZ6iS6H+qVbyVdJMJCKQScrTWyhWtF0bHRWAhOj/9Z+RCSgOySBA2EFyE2ENRyx+sg 0pjxktD0ze38/58GCZH2mP49g2ooWSmdaXPWSyoJifZkak6lPOE32ymVGfv4kHE6Kr6s sP1b/zaGTsD1XtKaC4mz8Y3twgyqXhW6/oOOjve2v/f74pR3EULX5+klbfSUhB36ZPhb FSEw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 192.35.17.28 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: from goliath.siemens.de (goliath.siemens.de. [192.35.17.28]) by gmr-mx.google.com with ESMTPS id c144si60845wme.2.2020.09.24.02.11.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Sep 2020 02:11:00 -0700 (PDT) Received-SPF: pass (google.com: domain of jan.kiszka@siemens.com designates 192.35.17.28 as permitted sender) client-ip=192.35.17.28; Received: from mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by goliath.siemens.de (8.15.2/8.15.2) with ESMTPS id 08O9AxxE015436 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 24 Sep 2020 11:10:59 +0200 Received: from [167.87.1.32] ([167.87.1.32]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id 08O9AxTp021531 for ; Thu, 24 Sep 2020 11:10:59 +0200 Subject: [PATCH v4 16/16] isar-bootstrap: Connect to gpg-agent before adding keys To: isar-users References: <318651e8-1fa0-0928-8a7d-263cb81aba6a@siemens.com> <20200923202916.GV16317@yssyq.m.ilbers.de> From: Jan Kiszka Message-ID: Date: Thu, 24 Sep 2020 11:10:59 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <20200923202916.GV16317@yssyq.m.ilbers.de> Content-Language: en-US X-Original-Sender: jan.kiszka@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 192.35.17.28 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: =?utf-8?q?1678548445637502621?= X-GMAIL-MSGID: =?utf-8?q?1678705858714699726?= From: Jan Kiszka We have recurring issues in CI with the gpg-agent not being ready when trying to use apt-key: gpg: can't connect to the agent: IPC connect call failed Work around this by connecting upfront to the agent, retrying that in a bounded loop. Signed-off-by: Jan Kiszka --- This one seems to work fine. Not sure if killing the agent is needed. In most cases, Isar runs in more (VMs) or less (containers) isolated environments anyway. I case it doesn't, wouldn't killing possibly affects what the user started before running Isar? meta/recipes-core/isar-bootstrap/isar-bootstrap.inc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc index fbfe669d..1c5dba74 100644 --- a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc +++ b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc @@ -303,10 +303,13 @@ isar_bootstrap() { "${ROOTFSDIR}/etc/apt/apt.conf.d/50isar.conf" find ${APT_KEYS_DIR}/ -type f | while read keyfile do - kfn="$(basename $keyfile)" + export kfn="$(basename $keyfile)" cp $keyfile "${ROOTFSDIR}/tmp/$kfn" - chroot "${ROOTFSDIR}" /usr/bin/apt-key \ - --keyring ${THIRD_PARTY_APT_KEYRING} add "/tmp/$kfn" + chroot "${ROOTFSDIR}" sh -c ' + for i in $(seq 10); do + /usr/bin/apt-key --keyring ${THIRD_PARTY_APT_KEYRING} add "/tmp/$kfn" && break + sleep 1 + done' rm "${ROOTFSDIR}/tmp/$kfn" done