From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Tue, 23 Jul 2024 09:38:57 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-lj1-f187.google.com (mail-lj1-f187.google.com [209.85.208.187]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 46N7crYo025358 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 23 Jul 2024 09:38:53 +0200 Received: by mail-lj1-f187.google.com with SMTP id 38308e7fff4ca-2ef1c0f5985sf2383951fa.2 for ; Tue, 23 Jul 2024 00:38:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1721720328; cv=pass; d=google.com; s=arc-20160816; b=UGAFjydDf9k28DuTZT5HTI6uzyntWVNzGnc+e4BOlLtZTVmB34AsYdz8ATyqumjP1U TA+27uU8I61E66GZhSQ0xzAVqpurYsDZPvyv/55ywJA2p5Q0IRUyssFWHF9Lsfaj1n2L uh0EM8ZUm8jmO3C/h1EFkvqRfY7+Xbc3eZRz54hcGO6gScFDFmGzyMN1OX2CU55PK3Am 5mK7OlSx6Rb9zYp1jiOAWB02urB0mqnrCv5mEgk20Tr+4pZBskhEgIgO1XUHoxSpftHt SmE7b2qrHBHgzQGZ+mlitxIvYZcexEQYX9cpCHGbj8MqtTO+R7+CERwCxRDsuPS6kIwu rklw== 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:mime-version:user-agent :content-transfer-encoding:autocrypt:references:in-reply-to:date:to :from:subject:message-id:sender:dkim-signature; bh=2bWGe/6pKY0xqEWWtaENQPBAlrge93Y5iuzRm6wMvug=; fh=Uq2hRHzhDc4r9gOD1EwpwgZDHSOWwbK4TpdfrTPAPA8=; b=LZhy+xywCDfXbsDNCC+UpJd4ZkWBDtQxvnvRl//bBBHDrea5FDA0C86dScgo+9A17y DFuKtSh5YQFlD8d199TrF1OMdDFqLegrIpazsdb2VjwN6v+6Owhukub0TaK0IFnGhOap 5Wykdy36ufI98oJeg6bn0wBDAgFTWJfAmcVywOHMQTqbEW1KOeDgC1+qkjA778H72fvB mz/iUPDvOVIfk4fUob+7iGjvZpMWCYWAqE5kJaQj9sz9n/otgJZTelabuY2Nmzu1ktII iag358CZuqCVF/9enYJUSuz6VhOYSqpnL6m+5mk9sONf8N169ns/vR/Hnsb+brFQ27yw BOfw==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1721720328; x=1722325128; darn=isar-build.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:user-agent:content-transfer-encoding :autocrypt:references:in-reply-to:date:to:from:subject:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=2bWGe/6pKY0xqEWWtaENQPBAlrge93Y5iuzRm6wMvug=; b=mgiwPZ3zhfcJ/XqB0CJW3SJsgsnwKp1q+KXJON+5YiUrzidVsPs6Tg+qEpIbrY0wXn zGnxOkAglP9JthRnoKNeGDwCB9TmlPmUmv7NT+eZInSgdjO9LUxbNPyxfDC0iuAP781P Y+GnT4gulLenW4aXLhLroNwihUCRTx50FUDBAjigtks4apGb2GB70HPka4I8Ze0ONUFC ErkXP4fyY93POQDLTy31MIOo3MsStILzHKXd7VgGJoZ6Ow+0wEJ9LUUBanFOBHO7+AdP EGkqb6jXdQjUSSWek64h/wjqZjzp9egrraC0p7wFpfib0lodzvEn7oYiQqqH5LK7vKeY 11gQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721720328; x=1722325128; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :user-agent:content-transfer-encoding:autocrypt:references :in-reply-to:date:to:from:subject:message-id:x-beenthere :x-gm-message-state:sender:from:to:cc:subject:date:message-id :reply-to; bh=2bWGe/6pKY0xqEWWtaENQPBAlrge93Y5iuzRm6wMvug=; b=KbkYu+2ghI2Kmkgu6kBYsW+F5bOPtv1PTUNcjAC1QB/SVk3ZX67H4A1QtZtjpYRxBH ONZhc1ttUmGzjxiGvqxyxvrPa9iXDp4YneSJjOXJ1jRQ0UQAhFKKEe4JI8nTk3dcZkLk QwasEHjGRoKEVJ+Tc50lNiA9OeCzPSzo6bJDR3Ajm12YxpR2CGtv+DLTUag+VMidYjFP 555S+ixtpR/tDN17zhB50PvSw2y1Ape8gsD8tgQcQ7RPO/T5vzFxcN2VtUSbeHVJUSTS KJlepj/5FaCwG9C4dBUp4gJbaNxU+ZDbgRSFS6B0DB3L+so5WyAUXU+c+bbPChzvMljY CM3g== Sender: isar-users@googlegroups.com X-Forwarded-Encrypted: i=2; AJvYcCUp8lPg3OOIi7ZcKlrGIZ4gFdCQIxcTDExXiPoRR5Su2tqnlSUmHuxdfbNL61lmQdJuLPYgPQxJJgsLQz4PViF+M1s= X-Gm-Message-State: AOJu0YyP+ZtjKgPY9n/ALn+/1tpZ51Bx61DooLAt2VXKF4HMdyrb9hMd nBOC4tDa06rrVoxDrZgLblq45pdh0Az7jE9gOUCZ0GVjfzipaQh2 X-Google-Smtp-Source: AGHT+IE+kzARaqG07bGth6ovVKQcl4owJ2fxTjtoB2I7OlglbWhayG2vYOXqASo+93LL6MU/ffhoWA== X-Received: by 2002:a05:6512:b82:b0:52e:9beb:bc09 with SMTP id 2adb3069b0e04-52ef8da523cmr3612278e87.3.1721720327335; Tue, 23 Jul 2024 00:38:47 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6512:b96:b0:52f:c72f:ddd with SMTP id 2adb3069b0e04-52fc72f1116ls92150e87.0.-pod-prod-00-eu; Tue, 23 Jul 2024 00:38:45 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXovLNg4kWJCk5v/aN1LxU83V/n//Kp1bF+IxBjGoh4WBUDk79d+lhmSL7v3jAYZFyfvUKQYg1XXc8BQxZcQpgr864LgNA74gYxsjc= X-Received: by 2002:a05:6512:1284:b0:52e:a644:98e8 with SMTP id 2adb3069b0e04-52fc6778e83mr361298e87.27.1721720325140; Tue, 23 Jul 2024 00:38:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1721720325; cv=none; d=google.com; s=arc-20160816; b=C9hQOuWm3CJU+7E1Z6Zr0gAk4xjMDoBxobHXlBGyHRtJViGgIzJrSezkXsNLhtxt1B ySV2iO/19rzh2tT2JrxTyNu4rZAQI9Gf8SXVb9d1hxv3NETx+hkG/6VMx2wVVl0sEsQx doWCJ6m9zb4PKoUjBD72jhbY2Yf7y7+Bq6ZCtqlN0B4E5atzqVfNSTSfne5qGsnEQ9a3 +2HDeEvOC0zc3Xt4/IjDdpiZ7cezUoixRukotVSQbhitDwzCJ23jOiE+2izr6S2b/eXf JCIbo+miAyZdtRn9BBiH8Q83B4RfLQ5Y1XlfEiiwuhYSH9xE5TcbL5OEBs/a8LohwiAa Wb+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:user-agent:content-transfer-encoding:autocrypt :references:in-reply-to:date:to:from:subject:message-id; bh=VoTgt53C95xRn3JgdGG8t45m71NkNdi5upZrMCcg0x8=; fh=JZvUnqoG0jWph92hWpw0EINycbLveqkIcdkusZDYok4=; b=c5J1TTh8rrjUx/YAy5ad7luib+5FfCAhpyPTEmAONkMPRZITLC0WhQja61MwG4B4bO dSgD19b3kCvPJCq/ZGGBJx/1HFYsl1+SgmlrHRNk0SnmcnAC9NveC2xTaMdC3PCQFz/Y 3KW+DU/cbIkslt0ElEzk7HraT3BW9Ove5I7uC51bLR0KTeTROpp1mXM0uu+5zKHszpE6 ulbSkg/PNNSgDlC3A98t8LS4rzhDBnG4f/XtBL2YLyBjctes5uJstjuxanWhjSi+x1Nq LjfICYir2JdpTpPHs/kxGOqx9x0aOC902lfCDLVcS3Kly0BmHUF0Z+6l1b6j/PDh4b3f ydoQ==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id 2adb3069b0e04-52fc2be5f44si48012e87.8.2024.07.23.00.38.44 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 23 Jul 2024 00:38:45 -0700 (PDT) Received-SPF: pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Received: from [IPv6:::1] (host-80-81-17-52.static.customer.m-online.net [80.81.17.52]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 46N7cbNt025345 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 23 Jul 2024 09:38:38 +0200 Message-ID: <943268259224283c363eefc66452d35cebe81fa5.camel@ilbers.de> Subject: Re: [PATCH 0/2] Protect isar-apt usages in shell From: Uladzimir Bely To: Anton Mikanovich , isar-users@googlegroups.com Date: Tue, 23 Jul 2024 10:38:36 +0300 In-Reply-To: <20240712065646.2156320-1-amikan@ilbers.de> References: <20240712065646.2156320-1-amikan@ilbers.de> Autocrypt: addr=ubely@ilbers.de; prefer-encrypt=mutual; keydata=mQENBGO2eUkBCACtT+T3OrPVSExBmqfgXT3lp9XcdxRzjYp26wezkgYjjBXaf36bxtaAf S471VoQtpar0RVeFfW7WDDdfX9ZclSj36zBQe+RVSJzoNoNQfjOXWuSHb5Z+cpAFtqBY4muxK4+ia IlLJd6CN3ejOsLHATtCeHHq8wi0z2T+KdLQO+wQRgo2hjj0Lp9pGTrKJry50HP/o7Vbdu14dOx2xq r8+wPc6SQbBIrcqaa4MqCQC00vQG7eXvo+k2MOw59FDdpMH0KR9mHgp3u/s4I+4YRBArukt9G9xz/ rsEFmxAIBC6N/a6Hzwg4puc91n7ABDsPg8Vp+X3MDraujN0dvR6OKVNtABEBAAG0IFVsYWR6aW1pc iBCZWx5IDx1YmVseUBpbGJlcnMuZGU+iQFOBBMBCAA4FiEEJqPNVhVGyk12Eh+PAUQYBM/2FkoFAm O2eUkCGwMFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AACgkQAUQYBM/2FkprlAgAmuna8Hm9EyoEtTl DBGDg6Zm4ZLp5ffvZBE946h92jepDrteoxsJ7pSzJVC2HmDLa4iZUao7lLLbDsUj5x45/iLJcqBZK k3YnAxP2r6a+kI+1VVQY1pxdG1nlJAbdNzoojm/qmezNPSrqni61KVMQKsXBCWhIjSXDSM9CsBj21 a+9qaVqfxovJGTn9lgrZO+xzKQNMKZeOouJlscVuFj21P0ww3/YENiU/nMeTSuYypO76mDtAd08Jo nc3yuHa9MJGei5ixN3wT+IrGR2aL2hdw2M6NgH7sYbL2Zi4ugD6RXHJai1Bh2yvFSVqSQ+M6QOInT 4ud7wslm1XRB065dXtA== Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.52.2 (by Flathub.org) MIME-Version: 1.0 X-Spam-Status: No, score=-4.6 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,RCVD_IN_RP_CERTIFIED, RCVD_IN_RP_RNBL,RCVD_IN_RP_SAFE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-Original-Sender: ubely@ilbers.de X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de 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-TUID: Fmn9GH3K8rRO On Fri, 2024-07-12 at 09:56 +0300, Anton Mikanovich wrote: > Read operations on isar-apt should be covered by shared lock. > This was not implemented for deb_dl_dir_export and imager_run. > At least following CI error was caused by isar-apt race: >=20 > DEBUG: Executing shell function rootfs_export_package_cache > find: 'isar-apt/debian-bullseye-arm64/apt/debian- > bullseye/pool/main/e/enable-fsck': No such file or directory >=20 > Find call inside deb_dl_dir_export was trying to look into enable- > fsck > directory while is was deleted by deb_clean function of do_deploy_deb > task of enable-fsck package. >=20 > The same situation can potentially happen on imager_run call, causing > races during image preparations. >=20 > To protect isar-apt usages inside big shell functions introduce > lockrun.py helper for using with isar-apt lock. > More clear implementation will require tasks rewrite in python, which > is not an option for the big downstream projects. >=20 > Anton Mikanovich (2): > =C2=A0 deb-dl-dir: Avoid multiple find run on export > =C2=A0 meta: Cover bash isar-apt usages by isar.lock >=20 > =C2=A0meta/classes/deb-dl-dir.bbclass=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 |=C2=A0 9 +++-- > =C2=A0meta/classes/image-tools-extension.bbclass |=C2=A0 2 + > =C2=A0scripts/lockrun.py=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 | 44 > ++++++++++++++++++++++ > =C2=A03 files changed, 52 insertions(+), 3 deletions(-) > =C2=A0create mode 100755 scripts/lockrun.py >=20 > --=20 > 2.34.1 >=20 Applied to next. --=20 Best regards, Uladzimir. --=20 You received this message because you are subscribed to the Google Groups "= isar-users" group. To unsubscribe from this group and stop receiving emails from it, send an e= mail to isar-users+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/= isar-users/943268259224283c363eefc66452d35cebe81fa5.camel%40ilbers.de.