From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6875334414772994048 X-Received: by 2002:ac2:485c:: with SMTP id 28mr2481190lfy.584.1600808636551; Tue, 22 Sep 2020 14:03:56 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a2e:b0e9:: with SMTP id h9ls2393747ljl.5.gmail; Tue, 22 Sep 2020 14:03:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwlIeVGkanutLT4IsamcXWsNDysihYXukaHdEMKiMgDcXn5bYGV2bx4AvI5ldud5X6ntjqO X-Received: by 2002:a2e:3509:: with SMTP id z9mr2227000ljz.395.1600808635125; Tue, 22 Sep 2020 14:03:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600808635; cv=none; d=google.com; s=arc-20160816; b=M00nYF9MZ+/BoQya0tBg5owZSxKx7OwHVrwfxIj+Yw6DezFowYHYQQH5HB+9Elt//M jlZv4DhwP61bkF6wgsTgnnw331ZKfvFgHfK5BGTvbdf/6tUuybhhAqrcbBgEI7RMfmHu zjfb7Yjs4ymtCjRYHxik7xke216AYUdUT2su8uoDLq9ib4rPBygGJV10agO53R4lC+13 u7zsZj71lGvSqhuPm5NNrZMhMx8ng1qs6Vhszk4kH5rw2xNui84n0LAQI8Xic3Qe07/s Ypv7v/e0ptSJL9TcLF8GqJgbhbYpoEg5ubmWl2Jc3Nx9HTfhvbz9U4l8xMtw3zDvIec8 fc+g== 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:references:to:from:subject; bh=uj1u+9F0/mLBjab57O84uAwsbSTnOJRjhSPPoEZkrhY=; b=z5ADPH/0tsJzgps+qXJ+ea4ZQrnUWnWJoF2C8qZ0yKteecA3iBbrY7R6GT1RuCSrLy P2p8KhVWAsqx7ppsN1fDMnONj1QEmOAmGlDvIe+DCeACD7f42Nn+ervZ6FKPX/Jfag/I ElVNOTF2SWT0uhg3gMu2z2akhnjSUmlkv9n2mBLPAYu65O/pPtftF6Cn8wXRAs3Z7wzx 4PZkBcQYxrp3s+xJ9EpgbgtPepei6zKALrZDOIwVoVmHm47bT6IXNoDCQG7UTI1AvnXP kBshWjWjPU4JWq7zRhuP1/3FKQW8RFZFF+bDTMCJQaCT6qSbfTuf3RO4DjbnUu7EBA+v LWlg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 192.35.17.2 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Return-Path: Received: from thoth.sbs.de (thoth.sbs.de. [192.35.17.2]) by gmr-mx.google.com with ESMTPS id r13si436982ljm.3.2020.09.22.14.03.54 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Sep 2020 14:03:54 -0700 (PDT) Received-SPF: pass (google.com: domain of jan.kiszka@siemens.com designates 192.35.17.2 as permitted sender) client-ip=192.35.17.2; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 192.35.17.2 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: from mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by thoth.sbs.de (8.15.2/8.15.2) with ESMTPS id 08ML3sj1024166 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 22 Sep 2020 23:03:54 +0200 Received: from [139.22.130.132] ([139.22.130.132]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id 08ML3qpm017279 for ; Tue, 22 Sep 2020 23:03:53 +0200 Subject: Re: [PATCH v3 16/16] isar-bootstrap: Connect to gpg-agent before adding keys From: Jan Kiszka To: isar-users References: Message-ID: <318651e8-1fa0-0928-8a7d-263cb81aba6a@siemens.com> Date: Tue, 22 Sep 2020 23:03:52 +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: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-TUID: 7yUZd8CdMUlb On 22.09.20 17:28, [ext] Jan Kiszka wrote: > 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 > --- > meta/recipes-core/isar-bootstrap/isar-bootstrap.inc | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc > index fbfe669d..957dfd6a 100644 > --- a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc > +++ b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc > @@ -303,6 +303,10 @@ isar_bootstrap() { > "${ROOTFSDIR}/etc/apt/apt.conf.d/50isar.conf" > find ${APT_KEYS_DIR}/ -type f | while read keyfile > do > + for i in $(seq 10); do > + gpg-connect-agent && break > + sleep 1 > + done > kfn="$(basename $keyfile)" > cp $keyfile "${ROOTFSDIR}/tmp/$kfn" > chroot "${ROOTFSDIR}" /usr/bin/apt-key \ > Strike this, nonsense. Got confused by the levels of chroots. New version will follow that retries the key addition itself, inside the chroot. Jan -- Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux