From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6979549302261547008 X-Received: by 2002:a2e:b535:: with SMTP id z21mr7772872ljm.344.1625055077536; Wed, 30 Jun 2021 05:11:17 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6512:444:: with SMTP id y4ls291857lfk.3.gmail; Wed, 30 Jun 2021 05:11:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxuLnm9yBbZplXHSz6u2cu/gEvOHVsn1Wmp3OpzGiOze1Iy6SdjScega2PNlC/HMt/vbYRj X-Received: by 2002:ac2:494e:: with SMTP id o14mr26881063lfi.399.1625055076362; Wed, 30 Jun 2021 05:11:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625055076; cv=none; d=google.com; s=arc-20160816; b=dMN8/9A4VpgU3RoW5RwZ9EIkggIkDMuueR1YWeKNUCaa/CHsC6XJEnu8ahV+KDkSUF WPxqhgdOREUvsV5+OyIiGW6Wb67Ph0UTW8nlBIkaFGzpGjbiT0UAdA/EdVlcJhY2OHUu mgbWpfhvZTPBfLFu/sCf5DNX7GcS5cP+muUIidlcW2Bx0YAmJx9GPEtm1Ya5OPbeFSS0 SlmumUojMDtoD/CHocnnP34pq2RA3hqC+hHO3G/xXJ14aD7PH2C0B65xZiA9YOdmIVBb KMlNlAfFf4Ptq5JJcmrTVeyu5VA5gBLx1rZ4nn4SNA4JSIsz174u6jpxjZi1JpmT8gu2 w5sQ== 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=WTFx5x2OBMiLgAxmSjAwHZ4+ZGCtEtwypsd4rlF1dkc=; b=KW6i+ti6EWe0FHMDzz1YlZgDlui3GQHo9TGO/ViGXt2T+0kbErXqolYr1wyyObnFBk g7iiH4aepK+QZa7hY2K4gGuIx/Dwc4aCKRwAVllpL/OaLmCAu0ruQ2HE4b3iMcAWTkJt ucdP9WBJtXyLlCiTXcB2eKjev3C8cBxiO7gMEJJUeXdfnh0kojmbIDT+9jbFVRehNMHL Erm34a1kavInF9cPEQ7ttELKqs7241vR0luK53nlnLsDUSchcrvhYOJtErH64Kn0F8Bd 6oaN3166jnT6YZN1SZOJPa5rkt331FaOgeA0hKKmwFs6K/A+FNj/J6bilnrC9cHNDu8f gmcg== 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 m18si831115lfl.1.2021.06.30.05.11.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 30 Jun 2021 05:11:16 -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 15UCBFP5031975 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 30 Jun 2021 14:11:15 +0200 Received: from [167.87.47.114] ([167.87.47.114]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id 15UCBFp0032313; Wed, 30 Jun 2021 14:11:15 +0200 Subject: Re: [PATCH 1/3] mount: Add unmount requirement to API changelog To: Anton Mikanovich , isar-users@googlegroups.com References: <20210630113547.87295-1-amikan@ilbers.de> <20210630113547.87295-2-amikan@ilbers.de> From: Jan Kiszka Message-ID: Date: Wed, 30 Jun 2021 14:11:15 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210630113547.87295-2-amikan@ilbers.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-TUID: X+/t0usm9Pr9 On 30.06.21 13:35, Anton Mikanovich wrote: > After the latest mount rebuild any usage of mount functions should be > ended with the following unmount call. > > Signed-off-by: Anton Mikanovich > --- > RECIPE-API-CHANGELOG.md | 21 +++++++++++++++++++++ > 1 file changed, 21 insertions(+) > > diff --git a/RECIPE-API-CHANGELOG.md b/RECIPE-API-CHANGELOG.md > index 806c291..546d91c 100644 > --- a/RECIPE-API-CHANGELOG.md > +++ b/RECIPE-API-CHANGELOG.md > @@ -292,3 +292,24 @@ Migrate your patches so they can be applied with "git am", or > > Kernel image name for arm64 platforms is vmlinux now. Image format was > not changed (uncompressed executable) but now it is named correctly. > + > +### Make unmounting mandatory > + > +There were mount API to provide some path inside chroots: > +``` > +dpkg_do_mounts > +buildchroot_do_mounts > +image_do_mounts > +rootfs_do_mounts > +``` > + > +From now those calls should be always followed by unmount actions: > + > +``` > +dpkg_undo_mounts > +buildchroot_undo_mounts > +image_undo_mounts > +rootfs_undo_mounts > +``` > + > +It case any unmounted paths left at the end of build warnings will be thrown. > That's only one part of the story: dpkg_do_mounts, e.g., used to be a shell function. Now it's a python function. So, do_my_task() { dpkg_do_mounts sudo chroot ... dpkg_undo_mounts } like in [1] no longer works and requires to factor the shell part and rewrite the main task in python. BTW, [1] already followed that pattern, so it's not really a new thing. Jan [1] https://github.com/siemens/meta-iot2050/blob/master/classes/npm.bbclass -- Siemens AG, T RDA IOT Corporate Competence Center Embedded Linux