From patchwork Fri Oct 11 10:00:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Mikanovich X-Patchwork-Id: 3861 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Fri, 11 Oct 2024 12:01:10 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-pf1-f186.google.com (mail-pf1-f186.google.com [209.85.210.186]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 49BA18DL008686 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 11 Oct 2024 12:01:09 +0200 Received: by mail-pf1-f186.google.com with SMTP id d2e1a72fcca58-71e108cc964sf2094508b3a.3 for ; Fri, 11 Oct 2024 03:01:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1728640863; cv=pass; d=google.com; s=arc-20240605; b=jAmtQ1iPelT/RmGUsn+N3VGmpCParf5Uak5T3E0FbMz4VUOSs8qoDBwpgi7Rb1+Y4J bIpqvAijj4rbia82hqVHDOwrX9zf+u2mGlnhecRHBpSBzf974/5Rb+sdBHthPk13+bxs nQBsXgvddUuVX43KDCdsFJ0ugudVgv7eIKqNNlOztrwUH68ijhDx3nTqJY8tpxVpJxBD OiYDJCQAlS7xve8xv+MSOKU792se5wMmXzF7Lln9JtmUiHN2QqjCNk2xdVAWDhcIWLSW kD0Yn7pQEKtS0eldEmWQT1djVCcTSK7rzR3OiWtnI/FmeYkwkkkl/7Lb5u0CC73+PIqB i72Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=zvaPtv5j008YOFOZ99aaBe+7/F22BQuzMUT7LIPvBFM=; fh=I5kzIE4/+fx0TllKw+j/8GvGWx8IzPPf4/k9V0lZqo4=; b=fXwCf/EuxFScaWDMhbtEOc375oQ1UsxuTm7LyhGBufazh2VN5/pMyuYFgGe2nTbVOt H6mgiVGbMTo0PQ//CzxvowDRflzTEU7cTBseqiz5Qv0q/D0Aw1k6BjBVgm2zVApgVD46 D/JmPbB6+kajpAouyOQGnUrkmjmR0MXCUy4oeyYBXuF6z0ZkPKFXFM2TIcXSUgWYauHF +NJwDD9DNCNRgrIWBJGSMiCOJ0Aa0rO9oyO1Ipfx54ukbgppKLUmJlHyJwaDf0KupDBB BKL4vrSjTrXd6zHI0J+tvA3j7jpTbmOO4wajzWnG20+YPvMhw3qGtq3rqA6DUpO0Zpmd OnaA==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=amikan@ilbers.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1728640863; x=1729245663; 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:references:in-reply-to:message-id :date:subject:cc:to:from:sender:from:to:cc:subject:date:message-id :reply-to; bh=zvaPtv5j008YOFOZ99aaBe+7/F22BQuzMUT7LIPvBFM=; b=BIBscG4OaC6v4zSoj5VF8s07TQgPoO8b752RwXmn20sXVU75g/2zm1funCIY9wXIoU Sv3Vtuqf0UGngq9PbWC13ULYbWax32FZ+iySgcbO2CShUinMDASFkDqG/22h/6eXcTew IHsgBVItot36cnWO4Zdlk4aBtpkbjeTQ9iiM/R7c6g9/kPuvO5ju8Nbt2fSu+kJRmJQc 2/92ZRX6uVWH4oS9ME2hSUvRIjiJYQdCB+ROBrxUiYPNJiWJGo5GwvyQXSR5HmjmNVtr 5GamUEUypLnscQou5Tqt/ZSuCVrjCkvU4qi9GhatvgC6MWG6C3dFIlfFBidX3o2XtAo0 Iy+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728640863; x=1729245663; 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 :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:sender:from:to:cc:subject:date :message-id:reply-to; bh=zvaPtv5j008YOFOZ99aaBe+7/F22BQuzMUT7LIPvBFM=; b=EKNDMTp7/OEIijQWzeHe20CU0lZ3Bnpyg8KZZaf1fTvqNdp/wCbAJMBCHW2qyC7T1S PefkdwX1atTFiGgw/6IgDUzV3obkOZ57J6wglUJm8ypjs++M7td8xQ0nkMZHEwxR+0/y jyRQYkgkgE6P6Pdj6gHGYUUV4ZZBsVHLeilFXsCvyWU5FPxtcDdHZ1Uu60kg4Ejyfqx6 G5j5042LojjBJorpfMUNPMGLFwxHFmhyBe1UP7EFNhTcDa0HsEycRGLvy1aH1YhgsDrS BNzpy6ZWiJfU/ZV3M0ZHejyh6sw1Ag2fsz6Lv3PFb6YYZSZBDwFMDf8j6JqXEe9CSojc n7XQ== Sender: isar-users@googlegroups.com X-Forwarded-Encrypted: i=2; AJvYcCWR6j/UH8TEcKQcenIKojTAv0+I2ChfQu5S6dc3zSHT1CdoQxC4kBlzoH6O0cEqSEbbhrN1TCQ=@isar-build.org X-Gm-Message-State: AOJu0Ywc33FuaZ+kw4lS1tapzMcFiGN2F44ijDuv2VXtOBjbTHILmwF7 JihwrG+B9vvdfUQeKGZceu4HfswqB2R2Cr1aLMgxBoH7ykSatBfW X-Google-Smtp-Source: AGHT+IF0/SVU8RhxYhos71BK5H6HkVL66jpZk995b4BTiQP57wV6Hfy8+bn4C9Di22yYuSERM/SrXQ== X-Received: by 2002:a05:6a00:92a6:b0:71d:ebac:c5e with SMTP id d2e1a72fcca58-71e380c3e25mr3527017b3a.25.1728640862874; Fri, 11 Oct 2024 03:01:02 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6a00:ccd:b0:714:24c0:3a4b with SMTP id d2e1a72fcca58-71e270598d7ls1822180b3a.1.-pod-prod-09-us; Fri, 11 Oct 2024 03:01:01 -0700 (PDT) X-Received: by 2002:a05:6a21:1192:b0:1d8:a49b:ee71 with SMTP id adf61e73a8af0-1d8bcf50852mr3157175637.29.1728640861474; Fri, 11 Oct 2024 03:01:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1728640861; cv=none; d=google.com; s=arc-20240605; b=ERGF9VWtO2hWzzS14zAtA2I34LITIVGJcPrJVcZUfvbe4x+O8QXHj+d3mRBDDueUYK Wgxa+FrG1gCSBrA5BU+5ObPxooOHwyYuKcXzKO2JjrEJkRJTkr/Q32zKZIVCkGDl72Lp k7rS3CMkMdVCVuJB5IMt6xhF3dKyEwrKhLPVaVPZ8G7NzPkQKWh02EXEl/gCpskLuXur rhVh85Y/i483gyRtAeyK+xIu1FWQy+CIcFKo9/0imK1jUCtk9pLIP4VB9lPMfyRt9GBn WRluhtUJmtVm/2OSGvI4PWcjtYsCE+8kWgndh3+BJKk3+aTMhJB4iK+NfWniWyOnFSgN JjjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=AYFEroLKHKq1GvznrCw9qWQqx9Xvm9zmd45euIzjARM=; fh=/h9QQkzJ8EboVkWg45aWwpaUro6WMavIVd2OhN45RtE=; b=Z5vh04L7YrzF5hlXi9uBwlFhIIH3mwjUlCpv/yEZGPp6oL9qRDN0ssgnRlsvlAFrgD KpDMNSp+fDpolsfdBUNeqcKWCHBbkcD9qDYsedFAduUmwRqzkQhemoyDDKTjWCn6EW+o ln5tWm7sCcjXfayoeTPto+VD8zKKpB0fHIsyeY/geSXR01YkwZtimCtsujxQ6o8PV9tF /7rGzBgLRjNUI4A3vURwD5HXn3DElynw4Gc8m56dtuzPj2/KeydfLbJu8eoZSLfL0c2d DYaEcFdyLiMvCI8DHyDQyy3NkP/3SmsZpjm06FTex4KB3KaVj8PF/JEEWvgW10g/7+aT KlVQ==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=amikan@ilbers.de Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id 41be03b00d2f7-7ea448e38cdsi174267a12.1.2024.10.11.03.01.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 11 Oct 2024 03:01:01 -0700 (PDT) Received-SPF: pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Received: from user-B660.promwad.corp ([159.148.83.114]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 49BA0vWI008632 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 11 Oct 2024 12:00:58 +0200 From: Anton Mikanovich To: isar-users@googlegroups.com Cc: Anton Mikanovich Subject: [PATCH v3 1/8] CI: Do not lose output on bitbake / qemu exit Date: Fri, 11 Oct 2024 13:00:43 +0300 Message-Id: <20241011100050.322686-2-amikan@ilbers.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241011100050.322686-1-amikan@ilbers.de> References: <20241011100050.322686-1-amikan@ilbers.de> 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_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,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: amikan@ilbers.de X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=amikan@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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= If bitbake or qemu exit before we completely read their stdout/stderr, messages are lost. With this change, we read the subprocess output before terminating ourselves. Signed-off-by: Anton Mikanovich --- testsuite/cibuilder.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/testsuite/cibuilder.py b/testsuite/cibuilder.py index 4a605f50..0d0de99e 100755 --- a/testsuite/cibuilder.py +++ b/testsuite/cibuilder.py @@ -257,7 +257,7 @@ class CIBuilder(Test): poller = select.poll() poller.register(p1.stdout, select.POLLIN) poller.register(p1.stderr, select.POLLIN) - while p1.poll() is None: + while True: events = poller.poll(1000) for fd, event in events: if event != select.POLLIN: @@ -266,6 +266,8 @@ class CIBuilder(Test): self.log.info(p1.stdout.readline().rstrip()) if fd == p1.stderr.fileno(): app_log.error(p1.stderr.readline().rstrip()) + if p1.poll() is not None: + break p1.wait() if p1.returncode: self.fail("Bitbake failed") @@ -533,7 +535,7 @@ class CIBuilder(Test): databuf = bytearray(b'') databuf_size = 1024 * 2 + len(login_prompt) - while time.time() < timeout and p1.poll() is None: + while time.time() < timeout: events = poller.poll(1000 * (timeout - time.time())) for fd, event in events: if event != select.POLLIN: @@ -547,6 +549,8 @@ class CIBuilder(Test): return 0 if fd == p1.stderr.fileno(): app_log.error(p1.stderr.readline().rstrip()) + if p1.poll() is not None: + break self.log.error("Didn't get login prompt") return 1 From patchwork Fri Oct 11 10:00:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Mikanovich X-Patchwork-Id: 3862 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Fri, 11 Oct 2024 12:01:11 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-qt1-f184.google.com (mail-qt1-f184.google.com [209.85.160.184]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 49BA196M008701 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 11 Oct 2024 12:01:10 +0200 Received: by mail-qt1-f184.google.com with SMTP id d75a77b69052e-4604a54afccsf13973991cf.0 for ; Fri, 11 Oct 2024 03:01:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1728640863; cv=pass; d=google.com; s=arc-20240605; b=OMoPLnMSEU1CQ85B6kAeTH79mYTKTSTSZsvf3H0qQa8L+9SKVrMIrjE2FYKiQB4rtC VAfF0eoLu7PAV59E/x0TfRip5jxea//1zOAKUcaGqJBT0zr/ds9eyxSFdKS+lPzM8tnE 9LeRezF4u5595uaa0jeBF7uVBBk8FfmJwGuQydZMCfDW5bKBkOUrq0+5IpmBNRARbduf 7lvIL/1U1tqaczjUOSmWA5Todm2dTQrHU3AvvXARUecpPoE/x6ZPji47+4OZpIwXTYFr FbdisL7p3L4TmYs35qqeWeUG3T6uqQMwhNplPGEa9An5mDgPcdrfYN88QLsTZE3vDN1E Dxpw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=Uw9JeSEoykYDykaYbLpJ4C3+r3jn6umIavz42tu6Ep4=; fh=7IzGFiPMfuwMhe766N289imhS+TH69zg6+ObVaRwKjc=; b=e/zaUc94I5zO3CECEvx0XanN6pcONOPt9Vp0fsUkmqrgVDtacrrvPK5opPzaIiCpEY 22SKiLOiPqmMUhvly/lqdg0IVO1qDURsV2T5Zni7ZCkzqSpxnoZ9JXs37T9+dhkyIKLK pCRIiPBSqvX9yo7hbr5XdGKZyorDrnMrsyCr00POp7FAxoV7dxVsJ5Gdb28XfTvaUbTh 8rb4ojKtbhzimlElaJfMPZMTcZAX65jwYjJIUOLbEa0kW2XiVWlhKDFa8tQPcBVv5WKx hRVMWtImcs51VQ9McQ/2N4b4pFLs6vmLHm0GwoOeXlb1VJq4Cf/rHCUgyjGmmO2/TAgS cQAw==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=amikan@ilbers.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1728640863; x=1729245663; 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:references:in-reply-to:message-id :date:subject:cc:to:from:sender:from:to:cc:subject:date:message-id :reply-to; bh=Uw9JeSEoykYDykaYbLpJ4C3+r3jn6umIavz42tu6Ep4=; b=v0f6H67uZim7CbyKEsRJVw7fkD7lB+af/Ix8DM+1NxoQ9bkWez3wf5N+ShHeo5qJfe uZLRkEGQbQyqNXrwyYnNGDgCF8r6fJE/wWdULH61hdAOhK8GcZfWO4EZwiTE5Uf2VD+8 yfEF1F4BtwkyY8XaqolZVjPLiRKU5F5XKk7QgZzQgDNKs03tdFCBZaynGT6bZs0bTZZE pf2OMwtTWpPVf1AUAYzLBD787sVRfh0DLjOmofkjrzK9lHXSiH8A7x4IWCAqftqrdXrM EwnDHxcG3ZnrDQ5pGilVxCk9RAys1M5kOSq7bDz8iczg5NrYUMURuyuEbiVg7SG3PsAv 58Vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728640863; x=1729245663; 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 :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:sender:from:to:cc:subject:date :message-id:reply-to; bh=Uw9JeSEoykYDykaYbLpJ4C3+r3jn6umIavz42tu6Ep4=; b=TjcvvtNYR7DrXAhTdJA1zWFGdlCZrK/iyigBeOpbht55yjTsg9X3stMR8txd3ibf47 2OKoCC+vu3s4EMsclLgQ2PPLWDasKZctHljXcJHyYKc1UC7KJ4pkjvF6E8E/XC0Pccwu jDQFiWZNUcpvRdgjCIrBUmqmc5Oj0FIDYI5Ft5e1UOrXiqZ6lOvwS649ZFfIAm2c15g3 Uw8vsQD34i6uZhK6u37MotS3rDwJy8groYU2BIAWXdLpPozNmRUCC0VGycLtY7suo2oK NLVZ8mqX4+T07dRBKKR1nrx3HOjHCh0MufeJXKb9tpu+Q7Hmvr9U5aEn4Y5eca6jyndH RXFQ== Sender: isar-users@googlegroups.com X-Forwarded-Encrypted: i=2; AJvYcCXw1E/RXgqHO+kTCbBS91qQH1/DIPUsvJ5TTzUP0yUTMnr2yYcZfaFSTml9TNijyLcGgVAFoE8=@isar-build.org X-Gm-Message-State: AOJu0YwrOXsPWbpCnkIoBVdfr9lLNRAgC97k/du6Ezz+PSGeuTRlCQXF rHzw6XIXe0amwZYv0EJPVG3519ygqQJQUGh5J0O6NTDQXjw/bIUf X-Google-Smtp-Source: AGHT+IEsAoxe5SZyElVFIdfrAjDnnT1Ph//cG2YeSVcnQRJ0h/hhkUV2aNrdU455ty0TEwE/nClKXw== X-Received: by 2002:a05:622a:305:b0:45f:873:ff5e with SMTP id d75a77b69052e-4604bc9d9cfmr26576001cf.57.1728640863117; Fri, 11 Oct 2024 03:01:03 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:622a:312:b0:458:2bcd:ed1 with SMTP id d75a77b69052e-4603fb37be4ls33164321cf.0.-pod-prod-05-us; Fri, 11 Oct 2024 03:01:02 -0700 (PDT) X-Received: by 2002:a05:622a:401a:b0:45b:16f5:6c1a with SMTP id d75a77b69052e-4604bbb86abmr28112111cf.16.1728640862106; Fri, 11 Oct 2024 03:01:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1728640862; cv=none; d=google.com; s=arc-20240605; b=L+6N1KYJ+fxQZrWy6qWB2s2xnuH4i9wEmeJiyNPXVYM4YannE/qAcotB+sKSR1T1Z6 Yc9x20uZBX93wgM4XBpJ1fADQVBAwctJbp/bVVtLqyBZZrl+kTg/dU01PTk/VUsSvwZ/ BLWdK1y1qHWMdGbsA0Rn+l98R7Kfx7SKWsx24jZg7uloyzJCIecLTGqMvk9nC+H5qbph gBlCGLAjpQudZEebowNPSvQq3tPe7kGIh35DDvCcJ7DdN+4QPTchxjGHG+TJn8kQxdMM HDOC5BebFd/1fVmvxMblZxwc2/mLzYtG+9weiUa7UeCUzw1z37K1RK+cPO1UL4HsAb9R 6UiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=rggpTtItiookqved/UxmACuuVr3M6G11mbLjx7k1C+c=; fh=/h9QQkzJ8EboVkWg45aWwpaUro6WMavIVd2OhN45RtE=; b=BhEPLjwjEL7M2bLfUEQg0mdUmfnXNMHbQ+jhT/Oei5bdBXuBzKQWHdqQeOR6VqGUux A6hIYsqJg9zGpJ3rys8J0QV5m0Gkxrd92rpXfcco8pSGAtbiDz1Qf4eJgI2e4EqO/Yzh 8OyZZy9FEnirrWxbj2lMIvN9xz6cFzTXOHHwJ9SnABvLWe7KHuG9aGfulj1XN453xQFB RCOI/e0nU85rh9WoqNPtExM8DuLI/I9eKiqLYPuRy30X61QyyQhHoh+bbRMHG1FzcQdy UNaszd7uV4fDpcJ1fI+LZYytv81A5u/KJt6+pNsmY9eLYkYX6WaHSvaP8GrY+wpizZYt 0VUw==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=amikan@ilbers.de Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id d75a77b69052e-4604be1effdsi560991cf.3.2024.10.11.03.01.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 11 Oct 2024 03:01:01 -0700 (PDT) Received-SPF: pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Received: from user-B660.promwad.corp ([159.148.83.114]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 49BA0vWJ008632 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 11 Oct 2024 12:00:59 +0200 From: Anton Mikanovich To: isar-users@googlegroups.com Cc: Anton Mikanovich Subject: [PATCH v3 2/8] isar-events: Unhide mounts left behind Date: Fri, 11 Oct 2024 13:00:44 +0300 Message-Id: <20241011100050.322686-3-amikan@ilbers.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241011100050.322686-1-amikan@ilbers.de> References: <20241011100050.322686-1-amikan@ilbers.de> 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_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,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: amikan@ilbers.de X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=amikan@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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= Fail the existing build testcases on mounts left behind by calling the cleanup handler once per build (controlled by a new variable). Specifically: 1. Execute cleanup handler only once per build. 2. Output error messages in case of umount failure. 3. Unmount /proc/mounts in reverse order to unmount subdirectories first. 4. Introduce ISAR_FAIL_ON_CLEANUP bitbake variable: - 0 or unset: Output a warning, unmount, build succeeds (default). - 1: Output a warning, keep mounts left behind, build fails. Signed-off-by: Anton Mikanovich --- RECIPE-API-CHANGELOG.md | 9 +++++++ meta/classes/isar-events.bbclass | 40 +++++++++++++++++++++++++------- 2 files changed, 41 insertions(+), 8 deletions(-) diff --git a/RECIPE-API-CHANGELOG.md b/RECIPE-API-CHANGELOG.md index 8eeaf325..608d0cc3 100644 --- a/RECIPE-API-CHANGELOG.md +++ b/RECIPE-API-CHANGELOG.md @@ -665,3 +665,12 @@ package on an `amd64` host: you would expect the -native variant to produce an `amd64` package and -compat an 'armhf` package: it will however remain `arm64` and build of dependent recipes (image or dpkg) may fail because of the architecture mismatch. + +### Changes in cleanup handler + +Bitbake BuildCompleted event handler is now executed only once per build and +always outputs a warning if mounts are left behind after the build. + +Bitbake exit status depends on ISAR_FAIL_ON_CLEANUP bitbake variable: + - 0 or unset: Output a warning, unmount, build succeeds (default). + - 1: Output a warning, keep mounts left behind, build fails. diff --git a/meta/classes/isar-events.bbclass b/meta/classes/isar-events.bbclass index f5061a8b..76b713c7 100644 --- a/meta/classes/isar-events.bbclass +++ b/meta/classes/isar-events.bbclass @@ -4,6 +4,10 @@ # Copyright (C) 2015-2017 ilbers GmbH # Copyright (c) Siemens AG, 2018 +# If set to 1, the build will fail on mounts found during cleanup, +# keeping those mounts left behind +ISAR_FAIL_ON_CLEANUP ?= "0" + addhandler build_started python build_started() { @@ -48,17 +52,37 @@ python build_completed() { if not tmpdir: return + # bitbake calls cleanup for every multiconfig listed in BBMULTICONFIG plus + # one for the entire build. E.g., if BBMULTICONFIG="mc1 mc2 mc3", we call + # "bitbake mc1 mc2", the following cleanups would be called: + # "c1 c2 c3 cdefault". + # Skip running cleanup for additional multiconfigs + mc = d.getVar('BB_CURRENT_MC') + if mc != 'default': + return + + fail_on_cleanup = bb.utils.to_boolean(d.getVar('ISAR_FAIL_ON_CLEANUP')) + basepath = tmpdir + '/work/' - with open('/proc/mounts') as f: - for line in f.readlines(): - if basepath in line: - bb.debug(1, '%s left mounted, unmounting...' % line.split()[1]) - subprocess.call( - ["sudo", "umount", line.split()[1]], - stdout=subprocess.DEVNULL, - stderr=subprocess.DEVNULL, + for line in reversed(list(open('/proc/mounts'))): + if basepath not in line: + continue + msg_line = f"{line.split()[1]} left mounted" + # If bitbake is started manually, bb.warn and bb.error go to stdout; + # with bb.error, bitbake additionally fails the build. Under CI, + # bb.warn and bb.error currently go to a file. + if fail_on_cleanup: + bb.error(msg_line) + else: + msg_line += ', unmounting...' + bb.warn(msg_line) + try: + subprocess.run( + f"sudo umount {line.split()[1]}", shell=True, check=True ) + except subprocess.CalledProcessError as e: + bb.error(str(e)) # Cleanup build UUID, the next bitbake run will generate new one bb.persist_data.persist('BB_ISAR_UUID_DATA', d).clear() From patchwork Fri Oct 11 10:00:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Mikanovich X-Patchwork-Id: 3863 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Fri, 11 Oct 2024 12:01:11 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-pl1-f184.google.com (mail-pl1-f184.google.com [209.85.214.184]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 49BA19PF008703 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 11 Oct 2024 12:01:10 +0200 Received: by mail-pl1-f184.google.com with SMTP id d9443c01a7336-20bb491189asf25397315ad.3 for ; Fri, 11 Oct 2024 03:01:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1728640864; cv=pass; d=google.com; s=arc-20240605; b=Mj0AZbuwkAA+3VQCincFQKOJ7q/XzVkJR1pwE8D6oUP6RMqp8LvXO70qINFF7hcLvI QMz/+x8yQD0Q/t7YlSggJwpaQWLaYNDTiTN/1xnxn1G2MvEqi+0j/GqnbrVnhLgFdbgg 9U0HAUQ4IpFlQOVbbIx9WjmGRRmID7b8LXQnpWMshtm1A/zqKlhAWtXyoWdT8Km1LgUc p596bJN5KgAw/X3uyVVmdAolwc/IcG18sX7KvjqJDcmQxLUVhWuB2Rxczm+v8ip8asWU IgpluOlQCDL6Wy7cCqo8qhYNEqV7k7J4Gl62wvc4ndSyulfK1e0Kz2rfTFiX1++eEQVm m58Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=ANPqhS7BVnBK8KVRMcnEINoqAKGrN93iCxCRWPiiOzA=; fh=ZSTnxHbG1mJ9XDQa92x0wRbMrzcbsVYeLHr+jvLLZ+I=; b=Y5rju4LT/ni9hXR4KtTpRHfO21pEumwrgwf5jXKEQ4pPMXMaGCGIForgftugvAzc+7 VH3JkDSdXI5RLd0CgYMJ8a8dRAtVayA65kU2aUMdQUJY4pGCa4yp8O40JHDmx60LqBNX tBw3GeGaEUNJyfEVfBwSE5q3lRl7QhGdOHnsc9xpzsV6GnZUWmxI2215X+RbY4rF74Jh z7OfLzvUbThL12ZXrQoY+8Yzo5blA3EslpYcS7cWVXAvQgoCF7+rNi4M05S3vC9/BWlh fhSmDWnWyU1Z5FjtX9o0QTYj3sb3Yha8g3fI4wURhl2l2yifgFRre359E1LzIbWZB+au HLjg==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=amikan@ilbers.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1728640864; x=1729245664; 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:references:in-reply-to:message-id :date:subject:cc:to:from:sender:from:to:cc:subject:date:message-id :reply-to; bh=ANPqhS7BVnBK8KVRMcnEINoqAKGrN93iCxCRWPiiOzA=; b=JWJnFVX6iBtJX2aH96fbMB7xzXzrakIzHfyHRpNdSaeMQBHpOx9yxzaR7HGOBcE7li 24EH8RlNKwte/zpBl63FDxt71mcmvvGNW1YdcooGPKsCkuO9PI+9DbCVkP2HUUbrlg7L 83WDUY8wYGXM6oJoixa6Gzoy4BDCaNQLkmVJ+F1qilBlICMQ9kTUA6IMRtcxmGA4B0kA 3dq3QuQoBzjgJNfUudk3oRQjAr/WZq886nH2ZDr63KEM4YZtb8FBF4e0JNDuPa6tJRbK bO5hdt/VrE/TqGXi/vlCG3liy9E/M/6vimbrFUfSKzQwsizfyLzTynnADFVq2+osJDmU oRBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728640864; x=1729245664; 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 :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:sender:from:to:cc:subject:date :message-id:reply-to; bh=ANPqhS7BVnBK8KVRMcnEINoqAKGrN93iCxCRWPiiOzA=; b=uAnVw0vRs9LWfO/L/oZDhQdvoccenG6tJy8uzFa5lvOwzXicXlXUrk0QAdwCj3AEV1 +gxxnoyTNT/VAjdoTtDVFE1g8QoXKl55PQ1j3JvM6oaVWLVVWgv0hTe62ZlQXzsX8/dv 3WJZjV6GbczZFwfbTZ0EQ2fEglE2sRnFalyqRiOVAqg5eh+cBXeojDmIMWx/n7ZXSMTJ hIwkhrDtSs5mM19pKnNZZXrJPQNfJiMsq7xr7U3zifns8IMiZn57/QzTFGW3s6GlRn3k zlZ8y/94kqLrFqYqm48Yu43vskE/eFtIcd4+jXkR8Z8ccKugM2NxJbLTNgebh8DUzhTP Z0CQ== Sender: isar-users@googlegroups.com X-Forwarded-Encrypted: i=2; AJvYcCXlau3D5NMXwjLQFue3o9onfaXdi+dGLg17Yx7XJ/qBUbGX1SIq+LcGEInRGFfbdnHTB4rOD/o=@isar-build.org X-Gm-Message-State: AOJu0YxNCstcaIEn390E8ECKMDaj0N6PFT2Mwwa0P89njZE2teD7TeUw 4iPS6vxrScdzomdo/KtQya+P2FMPUX5Z2yMynrOV5SMdhZsdHYew X-Google-Smtp-Source: AGHT+IGfcj0kykpo7EbarddJiblG/C7Z9yig8n7mXKbmLn6AXzemjhk25mzc8fbj6p15swpWoWOI3w== X-Received: by 2002:a17:902:d4c8:b0:20c:aa41:997a with SMTP id d9443c01a7336-20caa419b7bmr11551345ad.34.1728640863618; Fri, 11 Oct 2024 03:01:03 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:902:f54f:b0:1eb:1517:836a with SMTP id d9443c01a7336-20c8069569els6884595ad.0.-pod-prod-06-us; Fri, 11 Oct 2024 03:01:02 -0700 (PDT) X-Received: by 2002:a17:902:ced0:b0:20c:a498:1e4d with SMTP id d9443c01a7336-20ca498217emr23127625ad.60.1728640862433; Fri, 11 Oct 2024 03:01:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1728640862; cv=none; d=google.com; s=arc-20240605; b=OGwWDBpjtBf9JrlfIJU+Bn2aCY6XKFeJBcXd4cdgKUYfReUploGDJg5RN55HLfAW2S jdWbrXGkiWqHrSt3POYTIYWm8AnsZWOvxAi+5yw/AQTul9Zqgc2sndboxoV3LJoKC7w7 GQZtx7lrYH76ZwZXPAg1uNue1ikHsO6i64nHF8Hv1l3GtZtPMfkuHFXuhHfvhjJ0S4nA A99qWdtnt+t9db28bn6Ls3uJVRts2XdYf3NxsJnAiL2TkMEvM+2luMqKdp1ovyDdwIvQ 0tMy3XKhclLhUYOHSzT2kUnGGMvHwXhNwksL5Jd+dvGZP4+CIIagqeo1ONFBBS1fsBOP YCGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=NaEGP3P6XxEkBgmpg8JB+thxTNG0P+egjcJqWTY7Oy0=; fh=/h9QQkzJ8EboVkWg45aWwpaUro6WMavIVd2OhN45RtE=; b=lSVy3vfTVoEeRS4yPbgKR3vDpet3ReqYqpMKCGzZW+Cc7Mqqu4YQTYvubKRJPHlGJT r3TtXRihnEt91Crb4EJ4ECXKu6B5MWkwjQQXHONN95nKtRY+o22m1CHVDGmPx8Mdd319 pFtFHplC7Xa7deWW5h6ZRzTO5CFP+3v2hA0Mt7EokBDfgOysUSRfFlYe+DzsZD+MygPf pmpXcLJRPvGneXrOyRphX23ExKxcbhS3Pd0H9LBl5s9RV3dPmNbjwvx1+ETbXkes+n7Y y7wJ2hRT9NeYJ5/Q2XxIErHjbsQnGconGyawLaBFULwKcAJe5WynuENXYuFKw+587OnJ g7Aw==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=amikan@ilbers.de Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id d9443c01a7336-20c8bbfb14esi1250585ad.6.2024.10.11.03.01.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 11 Oct 2024 03:01:02 -0700 (PDT) Received-SPF: pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Received: from user-B660.promwad.corp ([159.148.83.114]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 49BA0vWK008632 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 11 Oct 2024 12:01:00 +0200 From: Anton Mikanovich To: isar-users@googlegroups.com Cc: Anton Mikanovich Subject: [PATCH v3 3/8] CI: Pass ISAR_FAIL_ON_CLEANUP from environment to bitbake Date: Fri, 11 Oct 2024 13:00:45 +0300 Message-Id: <20241011100050.322686-4-amikan@ilbers.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241011100050.322686-1-amikan@ilbers.de> References: <20241011100050.322686-1-amikan@ilbers.de> 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_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,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: amikan@ilbers.de X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=amikan@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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= Setting the variable to 1 in the CI environment would make the job fail if any mounts are left behind after building. To test: $ ISAR_FAIL_ON_CLEANUP=1 ../scripts/ci_build.sh -T dev Signed-off-by: Anton Mikanovich --- testsuite/cibuilder.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/testsuite/cibuilder.py b/testsuite/cibuilder.py index 0d0de99e..9fa3d86c 100755 --- a/testsuite/cibuilder.py +++ b/testsuite/cibuilder.py @@ -129,6 +129,7 @@ class CIBuilder(Test): # get parameters from environment distro_apt_premir = os.getenv('DISTRO_APT_PREMIRRORS') + fail_on_cleanup = os.getenv('ISAR_FAIL_ON_CLEANUP') self.log.info( f"===================================================\n" @@ -204,7 +205,9 @@ class CIBuilder(Test): if sstate_dir: f.write('SSTATE_DIR = "%s"\n' % sstate_dir) if image_install is not None: - f.write('IMAGE_INSTALL = "%s"' % image_install) + f.write('IMAGE_INSTALL = "%s"\n' % image_install) + if fail_on_cleanup == '1': + f.write('ISAR_FAIL_ON_CLEANUP = "1"\n') # include ci_build.conf in local.conf with open(self.build_dir + '/conf/local.conf', 'r+') as f: From patchwork Fri Oct 11 10:00:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Mikanovich X-Patchwork-Id: 3864 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Fri, 11 Oct 2024 12:01:12 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-pl1-f192.google.com (mail-pl1-f192.google.com [209.85.214.192]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 49BA1Arw008714 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 11 Oct 2024 12:01:11 +0200 Received: by mail-pl1-f192.google.com with SMTP id d9443c01a7336-20c9673e8cdsf11298485ad.3 for ; Fri, 11 Oct 2024 03:01:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1728640865; cv=pass; d=google.com; s=arc-20240605; b=ZsunWqv/tRde45H/aQIM0AoyZRDmEBE/9J0U07+AIxUKEfjMYc6XkfHqMRaYyoXdqn OIFZxMapyC/2TyxPXdwy9qnLl1+UgBjQw07rxY3kOWuA1YZEQuFTVtkj370ibOrILLY1 32Xt85ewg6MakpMH1tL/LqGe0AT/JHNl29GSInXKSntCl1RK4Fnt9peiQSUat377P++z PIF1SmFi6VZP+J3rPwDF1HuE9U2eo40H+K4zL0AwoQAlXn7HSedhPY2X02IYpTuDnee7 5PPmjHXjSi18epi9UC3rkyyoH21VkLfU73zZbqGjEJlVtBH8sw8ZCwUvIn23uu0seiJs NN5Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=cHicdqCX0DkE396uF0hSsJhO2b6DZ01e2ZAaF6XwwA8=; fh=n98ClXTKdMYclGhXE/0Ts2XtHKKRcxLiLkVh3k2enZg=; b=IImEJfd42qHtC5QvfeAFlPXQkfUQczaMMjqjwUaGHBLUI7HdgDyWHmAFav1o46i61r wd0jF8mv+Fze0NOhKCJGrAKG5FpauEwTJYt7QKh3QEk04BfYsBSnHA6+7kRLlO9FGzul lo0XmHF4iB4Uk/2qHtezdyGpTFN+BL9SevSxEfRspDty86tJK0RL/AH0mICeVVxvvHw0 vS4e+RKU+BR1TMhfNpoE4eOMWHZwjtCU2cOHZ3K5v9QKow2uuet2dPBfqFkwdw/QYGUR 4kVlhZ1o7lObb02h7AceFhCx3NbUWdzhQN0TSQIiEclx67MHr7cLg4T9wBiFJvQThxaf 9UcQ==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=amikan@ilbers.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1728640865; x=1729245665; 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:references:in-reply-to:message-id :date:subject:cc:to:from:sender:from:to:cc:subject:date:message-id :reply-to; bh=cHicdqCX0DkE396uF0hSsJhO2b6DZ01e2ZAaF6XwwA8=; b=EtSH29vI3LfrZ5M0L0rROEo2yojznbSKGmDoElpHfFsBfbK1VFd1l5c3DeD17luzrN yTHVryw8dclhWgNn6c/MJUU16bx0Z8vdpCkwA3G8RZgm+CfKHp5oJH6V5BrY2MC6IZDW JHspbZiQWDFiT8QKSOOok7+MLrjzRy0GZfTvJRVF7fHQ84buC6MOvDW6gdj5qSzNl2Dg DzEahesbs0z0bJ4n3WdSWM9LX/Kr7KhjD8Xpr2oUsCtxyR5qlR9w4ozxaiHYbqoOKbRq hX2FYX7GyTBSzA50kGZmDBme1kHyJm+17FB9vNLJXLAHP72IelyWBC97rrs9xxKNPndr ciDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728640865; x=1729245665; 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 :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:sender:from:to:cc:subject:date :message-id:reply-to; bh=cHicdqCX0DkE396uF0hSsJhO2b6DZ01e2ZAaF6XwwA8=; b=dWI4Mihgm2gs+PZD2xZTukwkeUO+99I023/QW9et8yf/MylP9zCOwTaUflRe4mY+07 T36UeXbiIYo8t7iveiAGJn3TCN1djhMABRBwoDbNWvCebaxeu6qc9y1TVVntvRBuLqPj S5A7RSvxSPgdczFbO5SIxLyfDPibiSQmH/xvSO+zFJJdAFpsh7hKqSpws/8y5CMVbaMq A0z4lrUNYRm1KfIxYYwY8/YArGA8UIuDsM6JBILdVf6TuHL3h6Mkb1e3Rgc/7cSdYa/T TEksw5dsOJCj9X/T7zECcQ7szHWTSWc1OvzDp0CfqQIvnX7re68uW+T7Qe3wE/4sv5aQ 61oQ== Sender: isar-users@googlegroups.com X-Forwarded-Encrypted: i=2; AJvYcCVS/IgYQ0SmW3597zJumSCi300GlWZkf30Ex3Lg6bYuIPDuNoBYbKwpZwZywXtF1HhHUTSV3jk=@isar-build.org X-Gm-Message-State: AOJu0YyOGcaMpDeMtFOABeevA4MDU5XydtUiIBynldjwIEH3REz07z5b dkI7eWjrZagQRDTVLR8J542esG4PwZ9cCPZ04sciaj1FtOfgR4Fn X-Google-Smtp-Source: AGHT+IGosN77At2JTm0+xTJEvVX4BIJiEIoaO1fxp+WxNKs6+NhhkLGxWQKHRNqm1//hLMo9VXhjnw== X-Received: by 2002:a17:902:e845:b0:20b:a6f5:2780 with SMTP id d9443c01a7336-20ca1459d58mr35572975ad.17.1728640865043; Fri, 11 Oct 2024 03:01:05 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:902:d48a:b0:206:8932:d4fa with SMTP id d9443c01a7336-20c8069c09els19483905ad.0.-pod-prod-09-us; Fri, 11 Oct 2024 03:01:04 -0700 (PDT) X-Received: by 2002:a17:903:2310:b0:20c:3d9e:5f2b with SMTP id d9443c01a7336-20ca16fb8a0mr28949935ad.57.1728640863775; Fri, 11 Oct 2024 03:01:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1728640863; cv=none; d=google.com; s=arc-20240605; b=RleGvDfbuRUCVOR95X+OBWWwcFnvSlN7choVoJBdnPOVZwZadqEGqPLetARGcC7XSH B2O+n+vGdiiSE6j4KJ2E4m8axGKDrEFa2GPaMGjJ3ob7h4ZQVIbMk5pCpQNCyTNN787s acGJT30bqIPRddOrX0ZJqbJ+f7Nak527TMChl83ID0c8zxR0UCva7CJ67CZAssbyEb13 +FQOmbN97umSaRHWekwbk+qdoV85NL2YmQX/mjul/bBe0w9RCXt6/7VIEXT26h/2hLRd MvnU7PQ8lNIgeNxu7kCnLo125kUy+7c99gQyV0N17llJW+Rvg5z5Fj6u27bLrxPbzS5P 1ckQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=CafFxxDQJ/OMrOeNCg+XJGcdCM19hgXn7pbBHnyvhEw=; fh=ayfAe8qmvuhnFlecYJaCAyE02arlonJgV2H/zKorYgo=; b=INz0oid0aHqMUVH7SB9BUe2RRUQ0ja1bdNkvbN9c5Ls4o4hnP0O4Hzu+Kksp1uBvvw k+SUm/0Oh0hWIj1a7CCFh1pysBFJjjTMLOYYx7prYX1AD1ClI4J6hHYmHk6NQiFPOnXf 2uEHw3dvfWKUzNLMMSTOjLaMVKuiRjkKc+1oRNck7C2WlTu7VN63RuuwWTgOnMERD18O xmgD6Xm7j+qegJQ0szs0+Ad195MAPQ83ecREWeASwp4EDq1gv0Myb9sODVOKbQ18gKSe zfHDjT7YgkWC0aiSIrCe4QQ1XKDWGZDbACcVc51B0VsMDTDCS5GymAo6ifLjCtU/9zZN CeZQ==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=amikan@ilbers.de Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id d9443c01a7336-20c8bac50b0si1191415ad.3.2024.10.11.03.01.03 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 11 Oct 2024 03:01:03 -0700 (PDT) Received-SPF: pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Received: from user-B660.promwad.corp ([159.148.83.114]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 49BA0vWL008632 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 11 Oct 2024 12:01:01 +0200 From: Anton Mikanovich To: isar-users@googlegroups.com Cc: Jan Kiszka Subject: [PATCH v3 4/8] image: Avoid breaking the build when mounts are no longer present on umount Date: Fri, 11 Oct 2024 13:00:46 +0300 Message-Id: <20241011100050.322686-5-amikan@ilbers.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241011100050.322686-1-amikan@ilbers.de> References: <20241011100050.322686-1-amikan@ilbers.de> 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_DNSWL_BLOCKED,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: amikan@ilbers.de X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=amikan@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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= From: Jan Kiszka This does not seem to trigger yet because we always have those mountpoints present. But if that is no longer the case, we will bail out when mountpoint fails due to the set -e. Fixes: 165519a7b314 ("sudo: Fail on the first error") Signed-off-by: Jan Kiszka --- meta/classes/image.bbclass | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass index 0c162aa3..9d5b782a 100644 --- a/meta/classes/image.bbclass +++ b/meta/classes/image.bbclass @@ -418,24 +418,31 @@ do_rootfs_finalize() { -maxdepth 1 -name 'qemu-*-static' -type f -delete fi - mountpoint -q '${ROOTFSDIR}/isar-apt' && \ - umount '${ROOTFSDIR}/isar-apt' && \ + if mountpoint -q '${ROOTFSDIR}/isar-apt'; then + umount '${ROOTFSDIR}/isar-apt' rmdir --ignore-fail-on-non-empty ${ROOTFSDIR}/isar-apt + fi - mountpoint -q '${ROOTFSDIR}/base-apt' && \ - umount '${ROOTFSDIR}/base-apt' && \ + if mountpoint -q '${ROOTFSDIR}/base-apt'; then + umount '${ROOTFSDIR}/base-apt' rmdir --ignore-fail-on-non-empty ${ROOTFSDIR}/base-apt + fi - mountpoint -q '${ROOTFSDIR}/dev/pts' && \ + if mountpoint -q '${ROOTFSDIR}/dev/pts'; then umount '${ROOTFSDIR}/dev/pts' - mountpoint -q '${ROOTFSDIR}/dev/shm' && \ + fi + if mountpoint -q '${ROOTFSDIR}/dev/shm'; then umount '${ROOTFSDIR}/dev/shm' - mountpoint -q '${ROOTFSDIR}/dev' && \ + fi + if mountpoint -q '${ROOTFSDIR}/dev'; then umount '${ROOTFSDIR}/dev' - mountpoint -q '${ROOTFSDIR}/proc' && \ + fi + if mountpoint -q '${ROOTFSDIR}/proc'; then umount '${ROOTFSDIR}/proc' - mountpoint -q '${ROOTFSDIR}/sys' && \ + fi + if mountpoint -q '${ROOTFSDIR}/sys'; then umount '${ROOTFSDIR}/sys' + fi if [ -e "${ROOTFSDIR}/etc/apt/sources-list" ]; then mv "${ROOTFSDIR}/etc/apt/sources-list" \ From patchwork Fri Oct 11 10:00:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Mikanovich X-Patchwork-Id: 3865 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Fri, 11 Oct 2024 12:01:14 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-ot1-f62.google.com (mail-ot1-f62.google.com [209.85.210.62]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 49BA1CdK008733 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 11 Oct 2024 12:01:13 +0200 Received: by mail-ot1-f62.google.com with SMTP id 46e09a7af769-70937ade3desf1092281a34.2 for ; Fri, 11 Oct 2024 03:01:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1728640866; cv=pass; d=google.com; s=arc-20240605; b=XG4GpSS06uO4y6xslZ+zLOZ+7ONznLcgdM46bMg6bDvau6KLS6L7X05Hy6coH90oUp 8ChiZ5N+GBGnohDb55kkBFS6nDohVhVRCGeEkK9A9jsscpoE2HJ5oI5plt5yQrPYlZnw IPC9KC8jTjC1qSFt8aoEw/m+25TBmKMDBnAH2AD242DfpfLHpmuh80cTEoQ7teEstGeV lBkgPJVs5nB+61UgaCIk4K8UKcYFSnEK1BqzeyBIMwIeUyAr94MqHVeCSrNt1XB08qtb fejBm7+xWu0xJg1MLcgShDu1iIBGdiXunh/lY501nhmizu833UAY82uSgXAD98bEu++I 3h6A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=7grNpAoxAN2YLhzE1f0rdnLvLJ8te4vvQL6gV5/wIPk=; fh=aW58qMcHt2bjb29nZ6qjeq8tmD7EXFCJzioIpVDbv2o=; b=EIQqCVVFW7lIjhp9VPQOEQHHGY2h3CuMxe+m4J+fxgXsvSccawqDu78PsV2jwfaX/B kKQzjBkMc1fFrbWqhFl0PWmfeHnf0BsBNAMdyP+cJp9XdVW9SYJwKf5S/2s0lf2ryNp1 L3lLfhn7I/MopkktWXZEFbZDnSKmggEZzUIjxVENKs+oFZ958Azy+qPZR1fLvzl0iT8C cxuM5xHtlTh/PlMTMpFy1/Fq+LRdU9E3SV36zAIvifmnwrWWDTfyHtgn5+iWFiQ3Ax+e VMVOjsr3LDMyoGFdNBAf4/Fh1wL2UiHe9JwuMlFWi8gDimuRlm0hMRXfSwEsv2HZhDBK 8zHQ==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=amikan@ilbers.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1728640866; x=1729245666; 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:references:in-reply-to:message-id :date:subject:cc:to:from:sender:from:to:cc:subject:date:message-id :reply-to; bh=7grNpAoxAN2YLhzE1f0rdnLvLJ8te4vvQL6gV5/wIPk=; b=A8Bv6VcmqBg/ywNdYsQWmI8HZAGChuzKrjMdiRidsXE93KaqbnN8hm0qP77rBmf5lV tPC4oniGlvLz/s2gB9OnUUgKmuNpxSrqrmkpTAgi7E8rNgjrv1LIhGOPEO9q0Dt3FpGD eWDwKgfis9/kCK4nZr+NwVaUS/SwqOTNzKQFQyJbG8jkXXfNUWk60BcWX35ATyfo3kwR Y3FWzjIS1vFIjCagyY5fwI9wCvGFVjIopNoNOwNNIcM6PgKUuLK1tv8krohgfeqanN5V SWTieZEKb0vFII9wFQSEMkVA495vCf/WNH8F9DR3AF/FO277CKG/8PpAh7HzPgfqTH89 g/RQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728640866; x=1729245666; 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 :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:sender:from:to:cc:subject:date :message-id:reply-to; bh=7grNpAoxAN2YLhzE1f0rdnLvLJ8te4vvQL6gV5/wIPk=; b=PJigKWLOXPhywe2A0IS/9qLtrdP9yqx5UjNTT2jCtx3KgLiZ7TIElBFQuFfLHXi33/ F9QLEMluof2omsP4dX0ZBXpDT7+aggZAao+pWH1Nl0VldtBWmlcXD+LJ8xQg7y78wYQx v1mWA/PjPlCWyjEz+ikXlmiuMVu1CQbgWnmj7GpdpvYI97gBFNTGIPYjjZsDdGgU0lJl zhL4/nhOlNf5mcC2+7UisIp0rlFVXApFK4FJulWba7uQ6dZXtBIC7wKLiL3p7Ia7sEvv gnICJ/tYhxAPxmvLei3t+rFXPZ6iKVazj8r//d7wLbiuDX3MVl6ihEgYzuKXffZ+dV0c ftSg== Sender: isar-users@googlegroups.com X-Forwarded-Encrypted: i=2; AJvYcCWCPhnQLXtIlC98RstcAnynzlWynjiLN/q7SU5zvusdQgW5qDjymSWB325oukGvn8JqxNeb8Fs=@isar-build.org X-Gm-Message-State: AOJu0YwnK+MofnXuAHv/kdcS4+tcq4EjMPotKMKbKM+usOedYdp/r8Sr DGeMFs0CfuPorPNNla4bcuNnAFHcfWCyQlZ93COabvBCXRxOcLOi X-Google-Smtp-Source: AGHT+IGNaFkOpx95TlV0vCmkO9DXYWiNK1yr4rv98bladNdikQx71vaKcORxljlGgDV3/MwxSE7z+A== X-Received: by 2002:a05:6830:258c:b0:717:d48c:593 with SMTP id 46e09a7af769-717d6445b16mr1168536a34.10.1728640866416; Fri, 11 Oct 2024 03:01:06 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a4a:e38c:0:b0:5e7:af90:76b5 with SMTP id 006d021491bc7-5e990b1ffa1ls732249eaf.0.-pod-prod-07-us; Fri, 11 Oct 2024 03:01:05 -0700 (PDT) X-Received: by 2002:a05:6830:915:b0:717:d601:eb43 with SMTP id 46e09a7af769-717d64fe404mr1033474a34.26.1728640865274; Fri, 11 Oct 2024 03:01:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1728640865; cv=none; d=google.com; s=arc-20240605; b=FH8Gv549tL2wgOjgo2SKcy4QDCexJpU3ibl8KMUP6ZugIZdA8XAXgI3qeXhYUHOWyG z9iZjIH+8hs1FD31UniR0rMuhrfPewdtmvYG6wwEvgr9Q25rhKfa67G8QnGMcoJ952oY iovj4JPZt9IgNK+4wSfx4xmNw5sY6EjO7IwBq6N5FwYFx6Q0RijyEqfHP/hWCJwuPVRJ 2/3Y4CkRXVel6eKkFc7IQXk1+2gHTJ7D3M32qZXKVZ70Rm77EmcITknPBDvf1i85HMdp fGtg7OQP21eFJo0WIzxUTjMx1jskb3p/RLXMihBiuzAQOZO+WRJWg+XyqxbhZ7EHVa+c 54IA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=+j9WCd7MUU3bwwJzOPz6IhzlPzKTOE5scvISNzGkx9g=; fh=ayfAe8qmvuhnFlecYJaCAyE02arlonJgV2H/zKorYgo=; b=Q4W1T5QYWDkPqeW1Dh4fVG3PHeRTBss84xVDbEiyghPAxmEwUFeVqP6HKb7pB5XMUG mChq7aCQLoQQaWfHwoUunyDjqXlorSp94iScEQ63FYEs5GvC7XVYn+FgFsWB2KLot4vR Ev0ItjgwtZNY7icGSdEeFHqV0nM+lPvkMtnoMNbYAlFSvfMUjubNi53QOWHUuC1UQqtx ZwdnI04MIm6jJSx69UMDsIjtpt84WvdDmJU9ITS1ivNOyqa6ugGB9Z0pdv6W91sl6HDo mgBJypVBSzOwJ5vg1oCZBrpECAsSpyZIx3hiKFsvjeJwLN5l1CsEVzzn/fUTm1VtuGn/ yTfQ==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=amikan@ilbers.de Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id 46e09a7af769-717cfed0e73si132856a34.1.2024.10.11.03.01.04 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 11 Oct 2024 03:01:04 -0700 (PDT) Received-SPF: pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Received: from user-B660.promwad.corp ([159.148.83.114]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 49BA0vWM008632 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 11 Oct 2024 12:01:02 +0200 From: Anton Mikanovich To: isar-users@googlegroups.com Cc: Jan Kiszka Subject: [PATCH v3 5/8] rootfs: Provide rootfs_do_umounts Date: Fri, 11 Oct 2024 13:00:47 +0300 Message-Id: <20241011100050.322686-6-amikan@ilbers.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241011100050.322686-1-amikan@ilbers.de> References: <20241011100050.322686-1-amikan@ilbers.de> 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_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,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: amikan@ilbers.de X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=amikan@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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= From: Jan Kiszka This will be used more frequently soon to avoid dangling mounts. Signed-off-by: Jan Kiszka --- meta/classes/image.bbclass | 28 ++-------------------------- meta/classes/rootfs.bbclass | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 26 deletions(-) diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass index 9d5b782a..1eb974e8 100644 --- a/meta/classes/image.bbclass +++ b/meta/classes/image.bbclass @@ -405,6 +405,8 @@ def apt_list_files(d): IMAGE_LISTS = "${@ ' '.join(apt_list_files(d)) }" do_rootfs_finalize() { + rootfs_do_umounts + sudo -s <<'EOSUDO' set -e @@ -418,32 +420,6 @@ do_rootfs_finalize() { -maxdepth 1 -name 'qemu-*-static' -type f -delete fi - if mountpoint -q '${ROOTFSDIR}/isar-apt'; then - umount '${ROOTFSDIR}/isar-apt' - rmdir --ignore-fail-on-non-empty ${ROOTFSDIR}/isar-apt - fi - - if mountpoint -q '${ROOTFSDIR}/base-apt'; then - umount '${ROOTFSDIR}/base-apt' - rmdir --ignore-fail-on-non-empty ${ROOTFSDIR}/base-apt - fi - - if mountpoint -q '${ROOTFSDIR}/dev/pts'; then - umount '${ROOTFSDIR}/dev/pts' - fi - if mountpoint -q '${ROOTFSDIR}/dev/shm'; then - umount '${ROOTFSDIR}/dev/shm' - fi - if mountpoint -q '${ROOTFSDIR}/dev'; then - umount '${ROOTFSDIR}/dev' - fi - if mountpoint -q '${ROOTFSDIR}/proc'; then - umount '${ROOTFSDIR}/proc' - fi - if mountpoint -q '${ROOTFSDIR}/sys'; then - umount '${ROOTFSDIR}/sys' - fi - if [ -e "${ROOTFSDIR}/etc/apt/sources-list" ]; then mv "${ROOTFSDIR}/etc/apt/sources-list" \ "${ROOTFSDIR}/etc/apt/sources.list.d/bootstrap.list" diff --git a/meta/classes/rootfs.bbclass b/meta/classes/rootfs.bbclass index f0abd795..ef40cbdf 100644 --- a/meta/classes/rootfs.bbclass +++ b/meta/classes/rootfs.bbclass @@ -65,6 +65,38 @@ rootfs_do_mounts() { EOSUDO } +rootfs_do_umounts() { + sudo -s <<'EOSUDO' + set -e + if mountpoint -q '${ROOTFSDIR}/isar-apt'; then + umount '${ROOTFSDIR}/isar-apt' + rmdir --ignore-fail-on-non-empty ${ROOTFSDIR}/isar-apt + fi + + if mountpoint -q '${ROOTFSDIR}/base-apt'; then + umount '${ROOTFSDIR}/base-apt' + rmdir --ignore-fail-on-non-empty ${ROOTFSDIR}/base-apt + fi + + if mountpoint -q '${ROOTFSDIR}/dev/pts'; then + umount '${ROOTFSDIR}/dev/pts' + fi + if mountpoint -q '${ROOTFSDIR}/dev/shm'; then + umount '${ROOTFSDIR}/dev/shm' + fi + if mountpoint -q '${ROOTFSDIR}/dev'; then + umount '${ROOTFSDIR}/dev' + fi + if mountpoint -q '${ROOTFSDIR}/proc'; then + umount '${ROOTFSDIR}/proc' + fi + if mountpoint -q '${ROOTFSDIR}/sys'; then + umount '${ROOTFSDIR}/sys' + fi + +EOSUDO +} + rootfs_do_qemu() { if [ '${@repr(d.getVar('ROOTFS_ARCH') == d.getVar('HOST_ARCH'))}' = 'False' ] then From patchwork Fri Oct 11 10:00:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Mikanovich X-Patchwork-Id: 3866 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Fri, 11 Oct 2024 12:01:14 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-pl1-f186.google.com (mail-pl1-f186.google.com [209.85.214.186]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 49BA1CxH008742 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 11 Oct 2024 12:01:13 +0200 Received: by mail-pl1-f186.google.com with SMTP id d9443c01a7336-206da734c53sf20441575ad.2 for ; Fri, 11 Oct 2024 03:01:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1728640867; cv=pass; d=google.com; s=arc-20240605; b=ZNNXuCGMmVorBTMCJ6Xiu+gyaSlsCPnbmmoQJ3Q/9a1bCf/yOX/JP3nDhYmNcjPt/s JhUNAb6ryFiR4+r8XDJvG0UBzw7GfmYuR93GAb0G1nxSwRC/+DOK0nNNNQy9iW7/IYU2 aI7ablQxgLxfqi8NRTubILicKuZ0Jbl/Ki7IXFDIArkZkBJVa/O8CbX9pwtyjfvqx+S3 pHufPqjLEwN4+Su4GeGq85LWn8rqfewTlN6bzhSQxKKa/mRvjxXewwUJR2qujGxSm4kv xPgPyCWziy04fusMtrzjGO1ionFaM35LdXtNVqpvwACyN/5guFzucP7xko6h8OnLWwQ9 2xww== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=ySYx5XyYfCYpAvuvvdY/JZ/O3UkaWDX0NQkSjkSYYCY=; fh=w45JUC3w4UHLktzAZYIx35Ax9ScZj3sBcUYF5VM94oU=; b=SpdCS+0Ct3J8Y1TJJYaJ8ArgzqOOrtRxVdB7BLJbp6+5qpCO6Gq/WJ0FyPmZkZgTeB s1gDcnnQRZrFz9wgkS86PFnOlSZ9uCTABCudFIc0/4hCt8PDlL1Y1e4YpjlNAZTJ2F0s mmLMqnAYu9+i+JlbP11etPCKISxidVJZ5uyBFIQXyVf1dzfi2+6v2uNxP5PeluVeFu5L TnrZIhv54LAyRrWdlfpY4DRANwg7sFjy+83iEZZmhMjeX4PYhwzDS1H1dHHb/jRhRSQ/ IpYsrrWTTAaIc6fE7ud71Q0W46EpctKg44p2pm9bPjAo1K+32Ufh1sRz6wp4aKIcISG+ QHCA==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=amikan@ilbers.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1728640867; x=1729245667; 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:references:in-reply-to:message-id :date:subject:cc:to:from:sender:from:to:cc:subject:date:message-id :reply-to; bh=ySYx5XyYfCYpAvuvvdY/JZ/O3UkaWDX0NQkSjkSYYCY=; b=fLhvo/nLzoEDpmAPbmqwvd5FJv7XV0yZU9myzDWQrNdgBQwqUjwubJ7yvgrjPULwHz L2bS8HYQJnW7gYncMqR6jjHuYV1YcVV+PVEPWXpwRHOmYu131N8I7OEBPbEzeu0K8e0r WcfufylhtUpdyjMINAX6uRykxk4mtU0kubRJAyrf51lUNCXbklYDXNCpKkiRsb9salTV DP68VIzEsV/vXMJZG3q28HZtUqWQZ3ISkTHVo2vFaHLEkZAiWeD/PpkWZgAX3qthEJ0G g9KbXH0XKnGf54BpdTgnDV26XPDLtzCSkio8Z/aFFYPKvZdxJprzSvQ7C9xgE25sWZaf K3Gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728640867; x=1729245667; 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 :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:sender:from:to:cc:subject:date :message-id:reply-to; bh=ySYx5XyYfCYpAvuvvdY/JZ/O3UkaWDX0NQkSjkSYYCY=; b=WP+aZ8vC6ZTlAdVy7TYVHM1jfgpVjp/aTH+jWVULbyCAmdIxiUwZIRYwOvCmC6VcI8 tRztpK2J+ztHNeCDpt+e2FnEUoTTBXw/m0ohp9H3QqLDVOo937eiXxhYakSUHIhF8bvW P/v78eZDbYpl2jZgpoNXaS0jHERa6MAvmiNJHC+wNz4kKCQj1YX002zX+2x1qOWs0xNQ vaqfhc+Lr7WcFd/1SQbcXmaHStjDa22JXzoGZEh4fTh1C1ZD/FGTU3fkzGRPYEf+HVee ProExggqc1Xyw4ybmS6e8dbP1ApqKQykEywjsBEMXe8jVq9MBw6lCfd6BaWgh6pU9+dl MmhA== Sender: isar-users@googlegroups.com X-Forwarded-Encrypted: i=2; AJvYcCWxoOYuNKKf+vkuWZqTLcGnVbUSm2Vqd+ET2exCO7Y8vZyQOO7GncDQqh51cnduFMwTu5/vTaQ=@isar-build.org X-Gm-Message-State: AOJu0YyjMdWZ2q68TYITBOG80MFWQcaUMgowhiu/xQhZvfN98+WUUK/L UxRdsyMZFgjAITYeaJcFGrcRaGJdxO2/UL/oKROmr+INVXzokD69 X-Google-Smtp-Source: AGHT+IETIoQnP4pAxh0njF/sD7aTZad5z3qJWtZum0HMN9t97exrnXrZICpaEIC5mnC/p+iI2bhOQw== X-Received: by 2002:a17:903:1c6:b0:205:810a:190a with SMTP id d9443c01a7336-20ca1429edamr26076245ad.2.1728640866888; Fri, 11 Oct 2024 03:01:06 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:902:f64b:b0:20c:7ee8:fc58 with SMTP id d9443c01a7336-20c80a9ce09ls16353015ad.2.-pod-prod-03-us; Fri, 11 Oct 2024 03:01:06 -0700 (PDT) X-Received: by 2002:a17:902:e801:b0:20c:9821:6997 with SMTP id d9443c01a7336-20ca142a39amr20208945ad.8.1728640865659; Fri, 11 Oct 2024 03:01:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1728640865; cv=none; d=google.com; s=arc-20240605; b=HkkEqkYDxwTqtdPDF5Nn3VZzsr3bozYCg+24rzM3TRY6G9Dqtl2Eem1gCeSkeF3CS/ u2fawh121ipPTENAkiapkmMHcy+/2uYDM7H6ixmXJ2noQVLkSVnUEdERrtjhCIkolh+W QF7aXiDzwUeokjJ4L9sd66rs4lj216BZsDPm0alRzjZ4L6X1Rj5VDOBh82q3NBA1jkS5 3PDLbaEDuwtzVPnqITbJ/7VR97SGssVQYDlIg8JwrGsl+T7PJpx3Z3fl68AVkNQEjhxR jztO+VUi2wYu33WnPPWcMfJ5Eo2zQx5HueAIZLQdUzJURdMWemNYbEFgXHYav1ESrZXG 49hQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=ObYhF58yBJtCSX6wy0PkCjfIk0crapp/tvemsmN4/ro=; fh=unzF2H8SoHC4UmJ7rsp0QDWQYwP71BX6w6q8J2FCpNU=; b=QNt3R89/QFPrSqNRkmCvV+V0OtnXeSZmCe3sIY+3dpi7mi6dQJ307nmAGMPdtvvjc4 LN0AIe7ODCussLf60cc/dUY7jKGr2fzexEmKFZlm1vjtQdFc/WkxNZA+x9jyg273kx7a 14VVR5paoLsfH8GHF3E2bungOgzk1mHYKKg8qW1Jc5ywaugZF8Zkm2x+OHDAaH5VORiY EZrq02pjl755Nm54itPvb1+Roo+RI2AM7Qqr62oQGpgk9WoLBKm3cyyjfr+z5UnJ/OCE ncFubVkmF2j/QfmmK9ctW5p/zaDdzzjP0zxurkZJIr4zCcMq+eGM7oY8yqw9rnsVtcG1 CzFw==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=amikan@ilbers.de Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id d9443c01a7336-20c8babc7f7si1425565ad.1.2024.10.11.03.01.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 11 Oct 2024 03:01:05 -0700 (PDT) Received-SPF: pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Received: from user-B660.promwad.corp ([159.148.83.114]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 49BA0vWN008632 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 11 Oct 2024 12:01:03 +0200 From: Anton Mikanovich To: isar-users@googlegroups.com Cc: Jan Kiszka , Anton Mikanovich Subject: [PATCH v3 6/8] initramfs: Add missing umounts after generation Date: Fri, 11 Oct 2024 13:00:48 +0300 Message-Id: <20241011100050.322686-7-amikan@ilbers.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241011100050.322686-1-amikan@ilbers.de> References: <20241011100050.322686-1-amikan@ilbers.de> 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_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,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: amikan@ilbers.de X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=amikan@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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= From: Jan Kiszka Failing to unmount what was mounted via rootfs_do_mounts can cause troubles on rebuilds. To reproduce: . ./isar-init-build-env newbuild mount >01.txt cat >conf/local.conf <02.txt diff -Naurp 01.txt 02.txt +tmpfs on newbuild/tmp/work/debian-bookworm-amd64/sbuild-chroot-target/1.0-r0/rootfs/dev type tmpfs (rw,nosuid,size=4096k,nr_inodes=65536,mode=755,inode64) +tmpfs on newbuild/tmp/work/debian-bookworm-amd64/isar-initramfs-qemuamd64/1.0-r0/rootfs/dev type tmpfs (rw,nosuid,size=4096k,nr_inodes=65536,mode=755,inode64) Signed-off-by: Jan Kiszka Signed-off-by: Anton Mikanovich --- meta/classes/initramfs.bbclass | 2 ++ 1 file changed, 2 insertions(+) diff --git a/meta/classes/initramfs.bbclass b/meta/classes/initramfs.bbclass index 6886b95a..42013356 100644 --- a/meta/classes/initramfs.bbclass +++ b/meta/classes/initramfs.bbclass @@ -45,6 +45,8 @@ do_generate_initramfs() { update-initramfs -u -v ; \ fi' + rootfs_do_umounts + if [ ! -e "${INITRAMFS_ROOTFS}/initrd.img" ]; then bberror "No initramfs was found after generation!" fi From patchwork Fri Oct 11 10:00:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Mikanovich X-Patchwork-Id: 3867 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Fri, 11 Oct 2024 12:01:16 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-qk1-f186.google.com (mail-qk1-f186.google.com [209.85.222.186]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 49BA1DND008801 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 11 Oct 2024 12:01:14 +0200 Received: by mail-qk1-f186.google.com with SMTP id af79cd13be357-7ae48475234sf459966185a.0 for ; Fri, 11 Oct 2024 03:01:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1728640867; cv=pass; d=google.com; s=arc-20240605; b=DulaZn20l8xcdsXflMsc3JSXDkaE3QXK/Af/8YJBmoQGOxo5+W79efqBbz5MFotlKD zoLZ+ta+pdIUfP7fjRVTGneu4MKMGczxql4DPrAySlUa/AY+4XTJfP+vbKbgeyzJ8DS4 b54pAW66JgBVs0ykAu3JE13onHFSkAmL9yLscL9KnLn7WWBh5elOOG/JB5CZbrEcbN9I T8x1T5sI2d7SdDCJk3MG3NUIM5iUV4AzzrZ5XH7N6iNWKaO6mLnwUL6ckKMK4RSK5mHL 7fJfT+U0yj1HFSoc/MVIFFyu+V7k7qwKr1b7mLjYtl5wPB2BSIohwUYn0lM7IMMr7Q7e FjWA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=NzOesAfV6DU2kRsMJ0UXq3v7iw/78hP9tIRT0ssPL5Q=; fh=IEhoMCG/dCWgSzpHCqn0XJlsH/yqkQmPc9v92P3nmtU=; b=D55111SeTrvges5rFpoNISBTWMKKbD8v6ySe/6lMInJxyNA51CKSgtcORcCszdKPJM U0NyYe35YsULiSgRjdOEY196b5Ad536Mz/jy/yXIsDwdQBKaMufmdLdATk+SSx8Zxpor 7smoamhIYF7Rn4z1oM7pXSo+D6cKTdJYC6X0+PZd7NEgnQkhvdG+ROZioqKkyBZqngmZ n3irhzBRHYkYUfnhcv+JEjyPdeb6X3e2sri8FMJqTKLJe2YmoQOJ4Md03JLK4nl2xETG 1fufCX2t7lFe1ph0yc+ZJ2y9eSeakTHFjk7TAGe7JFXRqYDumRf5Rj4+nQCSfS9u7Z4D c0ng==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=amikan@ilbers.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1728640867; x=1729245667; 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:references:in-reply-to:message-id :date:subject:cc:to:from:sender:from:to:cc:subject:date:message-id :reply-to; bh=NzOesAfV6DU2kRsMJ0UXq3v7iw/78hP9tIRT0ssPL5Q=; b=Hic//QMGW6oJ2CRQUJLlzn4SqjkjcsQRKlZmUfzufXMSttQ02wgzEmRHiAaPzWXrPH maTOh1M5aj6K+im1QJncnzLOZJWmRPaYCLVPJwEoURqSiwLZSnJiY55BTpBieOgjnVfh t7srY6t4jF3MbH4ghPhvHW3yC8uPlx0up4UFExUhZEFy8tBskPVStsETms0h4W1x1YcI TAmb7Del+So4pgAxVYyNCsalcEGkIH5ZdN66+UIamUG0bphdCprdOpq8JFFibjePQ4Y1 /kxp+lMNeoJdnuh1K0fmZNVRdy9zN8/K9ejqoMXwOvjTcBYwpo+vxfQtSR5n1iFhnTmp NxnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728640867; x=1729245667; 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 :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:sender:from:to:cc:subject:date :message-id:reply-to; bh=NzOesAfV6DU2kRsMJ0UXq3v7iw/78hP9tIRT0ssPL5Q=; b=mZQ7fgT20LfTgRIRuwc2k8jNB625fggRkYgcs2EV3Bze9RIiE9ruqAOz1afUw/K8ib crxCOsO4FY6CHnWr4kTQi0lTzFuUHvFIcwj7NENy/jR+5gTydWdSLkA0snTcMINXGxtU 4V3wZdZ9YFDCewonQBx5rGNjTIwJbktdKfJSfHMM/JBLiqa+vlaM12iPZ/3fZM/rMg0L WEXWjWyerPdQs8CbfDE87F70uK9F/Lq26wTJ/bct70GD0gBmym1YLD2KvnvzyMchO6uG WZj5YX9p8aRKhn2Rns6Rv0jrU+E2FVuGnA5D4smEsgqMAWibconL0Vq4/cONagrvmfgt 8qkw== Sender: isar-users@googlegroups.com X-Forwarded-Encrypted: i=2; AJvYcCWsUz1EFtb+q7g6vGUe1NNSE6zy9GFy+eAXRKZ7SMoCwNsbb3CCXHIqbeH5Mur2qiiILYTmQr0=@isar-build.org X-Gm-Message-State: AOJu0YzxfDoG23vSakHdNqmVlRh0UwIwQ/lGelGtZLq4q07x1AWwPLDo nv+coNWHfy6vfIQNRB5sDSbnEAINQLoiRxvVJr5f12QL2h6QNXzd X-Google-Smtp-Source: AGHT+IGlE+uuFJPFxt3KtmEfgaqXtRNBt4CAlRhd5aTg5X+daUflENDDsZloPDuWWba2Bdd+joh2vw== X-Received: by 2002:a05:6214:33c4:b0:6cb:ce4c:1cc2 with SMTP id 6a1803df08f44-6cbeff66007mr33723636d6.29.1728640866990; Fri, 11 Oct 2024 03:01:06 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6214:260e:b0:6b0:862d:9779 with SMTP id 6a1803df08f44-6cbe548f84als29765546d6.0.-pod-prod-04-us; Fri, 11 Oct 2024 03:01:06 -0700 (PDT) X-Received: by 2002:a05:620a:4488:b0:7a9:8876:4217 with SMTP id af79cd13be357-7b11a3843b8mr344078385a.25.1728640866337; Fri, 11 Oct 2024 03:01:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1728640866; cv=none; d=google.com; s=arc-20240605; b=NibRGO+C8FB76KYbnAN2OseDVbWxb9PB1LwQWYzRyUaQJ9o4nqHS080RVeJLPLJKHf jhgpC4pqVAuPsnIwer33xsQ1Gi9BsyoJEKJKai1BkRFixuIYxXJaV7/sp5ngdxvINTd0 xlzarsLAaGsK5v83tLAHLCld9kjnH1bE9GWGru9aEIU4pZLDr0luPC3mK53VhbM4vo9j CR3q8+JPfRucUudVwlAMI7Wpy4T3jTprovPZQW4fX3HDwrNoyJekZ36CFJjvJ9zDAbVH C+PPUKUJ53DRV/IVBVz33bCelNU4O+ngi+WjL8xiouZ1AKGxIVMKCcOkcH+PWOcHIu8c SzWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=LFqdscIyuyH7v9IH973uboDrXiUGQASG8pNGrdgiYcs=; fh=+XrxACcU08BQoTNb4LOPSrVTQ061QS53EcHPaZcNlwA=; b=RKrJX06YHWI4LUg5hMcdC4IxlEMOgmpoUmX95sU5cki5XDji0g3DMmLB4MqynBWdv7 INqhbwXWH+OiPoavRjp/2VNED0/ENyfcoKvPF/LUdqT8YowmtBaOm00pSYE3YT2AY1oU tzFrSWuMf48T6oTvwJOARIwxtvz3w6/SNbCp72MT1Z6RbqJji/SP5fdawewiqML/Fbql ktvddF9C7eIYfGlkrZPs/NV3qxkxrxQEb3f6I8VOBZWfBfdYeuCKyqm+KYUG2dQItuCI wG+m3nhADyP7p7P4RkUYBQJUSN5+MAuqpOv8x8Wx04Ik74DNQThrqD1mQ4Fs+5HPoJsO WoDg==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=amikan@ilbers.de Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id d75a77b69052e-4604807bc45si1287261cf.5.2024.10.11.03.01.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 11 Oct 2024 03:01:06 -0700 (PDT) Received-SPF: pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Received: from user-B660.promwad.corp ([159.148.83.114]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 49BA0vWO008632 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 11 Oct 2024 12:01:04 +0200 From: Anton Mikanovich To: isar-users@googlegroups.com Cc: Florian Bezdeka , Anton Mikanovich Subject: [PATCH v3 7/8] rootfs: Add missing umounts in rootfs_postprocess() and rootfs_install() Date: Fri, 11 Oct 2024 13:00:49 +0300 Message-Id: <20241011100050.322686-8-amikan@ilbers.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241011100050.322686-1-amikan@ilbers.de> References: <20241011100050.322686-1-amikan@ilbers.de> 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_DNSWL_BLOCKED,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: amikan@ilbers.de X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=amikan@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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= From: Florian Bezdeka Calls to rootfs_do_mounts should always be paired with calls to rootfs_do_umounts. With this change, it is done in do_rootfs_install and do_rootfs_postprocess. In case there was an exception thrown within the try blocks they will be re-raised after the finally block has been processed. This way we try to avoid leaking mounts but unmounting might still fail. In any case we tried our best to clean up. To reproduce: . ./isar-init-build-env newbuild mount >01.txt cat >conf/local.conf <02.txt diff -Naurp 01.txt 02.txt +tmpfs on newbuild/tmp/work/debian-bookworm-amd64/sbuild-chroot-target/1.0-r0/rootfs/dev type tmpfs (rw,nosuid,size=4096k,nr_inodes=65536,mode=755,inode64) Signed-off-by: Florian Bezdeka Signed-off-by: Anton Mikanovich --- meta/classes/rootfs.bbclass | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/meta/classes/rootfs.bbclass b/meta/classes/rootfs.bbclass index ef40cbdf..c7011508 100644 --- a/meta/classes/rootfs.bbclass +++ b/meta/classes/rootfs.bbclass @@ -248,18 +248,21 @@ python do_rootfs_install() { progress_reporter = bb.progress.MultiStageProgressReporter(d, stage_weights) d.rootfs_progress = progress_reporter - for cmd in cmds: - progress_reporter.next_stage() + try: + for cmd in cmds: + progress_reporter.next_stage() - if (d.getVarFlag(cmd, 'isar-apt-lock') or "") == "acquire-before": - lock = bb.utils.lockfile(d.getVar("REPO_ISAR_DIR") + "/isar.lock", - shared=True) + if (d.getVarFlag(cmd, 'isar-apt-lock') or "") == "acquire-before": + lock = bb.utils.lockfile(d.getVar("REPO_ISAR_DIR") + "/isar.lock", + shared=True) - bb.build.exec_func(cmd, d) + bb.build.exec_func(cmd, d) - if (d.getVarFlag(cmd, 'isar-apt-lock') or "") == "release-after": - bb.utils.unlockfile(lock) - progress_reporter.finish() + if (d.getVarFlag(cmd, 'isar-apt-lock') or "") == "release-after": + bb.utils.unlockfile(lock) + progress_reporter.finish() + finally: + bb.build.exec_func('rootfs_do_umounts', d) } addtask rootfs_install before do_rootfs_postprocess after do_unpack @@ -379,9 +382,13 @@ python do_rootfs_postprocess() { if cmds is None or not cmds.strip(): return cmds = cmds.split() - for i, cmd in enumerate(cmds): - bb.build.exec_func(cmd, d) - progress_reporter.update(int(i / len(cmds) * 100)) + + try: + for i, cmd in enumerate(cmds): + bb.build.exec_func(cmd, d) + progress_reporter.update(int(i / len(cmds) * 100)) + finally: + bb.build.exec_func('rootfs_do_umounts', d) } addtask rootfs_postprocess before do_rootfs after do_unpack From patchwork Fri Oct 11 10:00:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Mikanovich X-Patchwork-Id: 3868 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Fri, 11 Oct 2024 12:01:16 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-pg1-f190.google.com (mail-pg1-f190.google.com [209.85.215.190]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 49BA1Ejx008824 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 11 Oct 2024 12:01:15 +0200 Received: by mail-pg1-f190.google.com with SMTP id 41be03b00d2f7-7cbe272efa6sf1875959a12.3 for ; Fri, 11 Oct 2024 03:01:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1728640869; cv=pass; d=google.com; s=arc-20240605; b=EaFUMsV8bBjW8LVUNFeBXqYlismND87v1+L6q8qzVkYhcHBjvpDZ/l0l0QO+NHdDzA uGAZFyRfBXRaL7AHGEgzpxsImOooM+oyKDe98GnIDGOCvfnl8oibjCJmCQJX6L9wef2q yhYtgYk97USYbMSq6v/HkjMmpkVniWA0TYbuCf4VeLH/4379I7HjNDvwrZqp54qN/qLM IL41F6euy4eOOULlhVDoY914IsDfHJ2xp7sgX70zqM4QxG5jKMoyO0xkCM4ciZk2cGEa 0J8qbr9C2g9XpncxxFR7+kGXsQyhBldXe5u1v6yoCOL/6YTTrzFB00CHAQRxtNkil4uB gICw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=9t6Vq2p5F4BD42580+9liNuY6lsX1MbLkM9lTwu5Zd4=; fh=YFzy1FAtmbDcBw1SgeNSOnfi97b23R2fhXpu4TOASPQ=; b=ZL+Fzyw8GAkPew5gNq49rrTTXw1X8296b+qVq4FL7zeMsJElfeHUJhylb7mE+6kN3d 757XMPOqConQIgqumQhubAqm55oc8jsIu+Pi6U1svd2Pc3mfOnN7eki0onhr4qlDhELB T+gf92L5qyjhfVqcuuUqvu1n5EdOdZE6O/4qPXlL1K5QvzUBsLyby+kMlTaEgtp6sdxh KnnRWQi/DHzl1egTjAAA8B4QfWfnsOC6hWR5G4SzLPVcOxhNh3gok+vfoAR2unKkxI95 xf9udHtuxnsK45ENOMt7BUrKxvVFpzyzzcnOqGCPqbSMStAdRHoB9m8A1WKhHlfNhrUa WXbg==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=amikan@ilbers.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1728640869; x=1729245669; 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:references:in-reply-to:message-id :date:subject:cc:to:from:sender:from:to:cc:subject:date:message-id :reply-to; bh=9t6Vq2p5F4BD42580+9liNuY6lsX1MbLkM9lTwu5Zd4=; b=toJxY5q42EMJBGoC+vCSuYioAkQUBEqcBBx+cZCkZjmh7OyRSNs/FPS2R7fgltYNP/ MHDZxUrSrTApGNvCr2USgohehoksnY6CnolfjVzwqgaecCim9f2S88XngXemBo93TvmW yF0Zgn0AVGkSwTMQvygnwZmXPfEItcgUSVv4JKeXzUl43tqV2/xQ/6JetYJddTj2nk0T p2wDbPpxuCwx1G1nFSvhpcZ4/Pju4VlQzI2Xhs1DQn1ykJyMt9RD//eEt+cWBHBInGdS sozfOQHzhv6al48gPoMd6xWRw8VpeGdoQxGRmnsSgu2T+Msif7888KGbK7K660x1FDyd vRtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728640869; x=1729245669; 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 :references:in-reply-to:message-id:date:subject:cc:to:from :x-beenthere:x-gm-message-state:sender:from:to:cc:subject:date :message-id:reply-to; bh=9t6Vq2p5F4BD42580+9liNuY6lsX1MbLkM9lTwu5Zd4=; b=X+nGKBNtcwDDhsVhrY0YHPiRarwkOvj6kVntjWCLCsYxUvfdbEHVBEsHCUG310mxnT zylitAMKwQM6q4KSn0LbK+USa/AGgI7Qb1sJkf1uAv5TVVFI87tf3qxidsAgd+Y+et/d YQlGTX+rJ7mW0sArt3+F8N39heitU8vMNQdgv6ZFCs+5g5PZBZjClhzBlhG/98j+JXeo BEndQzmsnjRmtcKMCoMi4fKTfp7HM8cSh/bc3JOoPHl74xwUCf9aDf2nItHrziUc7rM8 mhqotDST0fYvc6K3S5juosQcNi+ob0WuUHLaWPIHdL581/RXLgCn9MrLJws/UsSqctif oitg== Sender: isar-users@googlegroups.com X-Forwarded-Encrypted: i=2; AJvYcCX7vweO1kCXag4qLmL+rbbZ8NTV3coAzquA0hqGDj4NluUZT/7qZjI8R8P3GAGP1a7wlLOH6Cw=@isar-build.org X-Gm-Message-State: AOJu0YxrNHm8KYnNo39NClX130FzkPnTiNVg8bSm6zX6ptNL19Uqe/5P mTxX7LVN4ifSuVXoVajnZy0hLwPS7O9JdX4yVsEBHb3Xq6jVeIPR X-Google-Smtp-Source: AGHT+IGX93FLV9vOY4cv/ZvZgZjBK/MS+817W+zPdqI+/T8RMtHZZUoZkykqd6JgJW0OvA5YelxlcA== X-Received: by 2002:a05:6a21:1786:b0:1cf:6533:5c86 with SMTP id adf61e73a8af0-1d8bcf41d86mr2785345637.21.1728640869165; Fri, 11 Oct 2024 03:01:09 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:90a:8a15:b0:2e0:79a0:bd97 with SMTP id 98e67ed59e1d1-2e2c81f42edls1377046a91.0.-pod-prod-01-us; Fri, 11 Oct 2024 03:01:08 -0700 (PDT) X-Received: by 2002:a17:90b:33d1:b0:2e2:acd7:1df0 with SMTP id 98e67ed59e1d1-2e2f0dd5ec3mr2209444a91.41.1728640867891; Fri, 11 Oct 2024 03:01:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1728640867; cv=none; d=google.com; s=arc-20240605; b=i0939hr1TkVh478/mmRnaY6xoOC5Yt8sANZ8sNQgviq8W9XG4N1tKU59XMxN1/galU lG3gCNEH0Mv4fBbYxWAfhp94GJtBvRLdFKgNyZJ8sst8sAFoKGZk2HqjlpFis7AlSu/5 oUg/lOUceYYiEwo5XtVz6k8yMKD+MDgj3aVtZ0T3YtMIwQZjQMioo080gYxa7d5gonjH du3ipZSha/xQZMegXT6r1X9E3YUXTbSQ49oX7z3I3I3kGP3l9sGJNJFiq4VuIXMn578f R+nEQ7CsamAfFsRwn7mavQTEmM4tzAYnubtVhNbVItezAKINhSFtcjSulOymQRzOH9/L rahQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=4YD3qD9Hl9OR7+d5AooDuYg4c93EVDoah5pZUp32DTw=; fh=/h9QQkzJ8EboVkWg45aWwpaUro6WMavIVd2OhN45RtE=; b=EXqIZI7b/hvTCK4C/TiKuxF7f3Bb0tcUoqhTSZChhn/wxIQXSPlRXy6MXqd82VArQu 4W8fpyeFt2qgBqxs9R/HrmVjXPtQLAPuBIIJeXoql/w7p8cLE8FGQcsikjpcziNH/mk8 dcsUHCGU9TOG4kLM/zRIy1r0T+UfBigJtQqeyM8GkoiG3hBU3rvaJeZoGREytPH091/P 5ctmKyyKfFxhMvw2YrBsp1uGGWgkebletjfwAD7wRlupdM8RQI0/X9iqUID7Suvef1b1 PpwMGpGRaXfkLawZCR8Ot7O9XGD27lCKWbsVR0z4K/b95FcYjUggholsVqfk1ZLNuRad lzfA==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=amikan@ilbers.de Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id 98e67ed59e1d1-2e2cc1d9c1bsi281971a91.0.2024.10.11.03.01.07 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 11 Oct 2024 03:01:07 -0700 (PDT) Received-SPF: pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Received: from user-B660.promwad.corp ([159.148.83.114]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 49BA0vWP008632 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 11 Oct 2024 12:01:05 +0200 From: Anton Mikanovich To: isar-users@googlegroups.com Cc: Anton Mikanovich Subject: [PATCH v3 8/8] image: Do not call rootfs_do_umounts twice Date: Fri, 11 Oct 2024 13:00:50 +0300 Message-Id: <20241011100050.322686-9-amikan@ilbers.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241011100050.322686-1-amikan@ilbers.de> References: <20241011100050.322686-1-amikan@ilbers.de> 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_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,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: amikan@ilbers.de X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of amikan@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=amikan@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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= As now every rootfs_do_mounts should be followed by rootfs_do_umounts in the same task, there is no need in calling umount inside do_rootfs_finalize. Signed-off-by: Anton Mikanovich --- RECIPE-API-CHANGELOG.md | 6 ++++++ meta/classes/image.bbclass | 2 -- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/RECIPE-API-CHANGELOG.md b/RECIPE-API-CHANGELOG.md index 608d0cc3..56ebfeb7 100644 --- a/RECIPE-API-CHANGELOG.md +++ b/RECIPE-API-CHANGELOG.md @@ -674,3 +674,9 @@ always outputs a warning if mounts are left behind after the build. Bitbake exit status depends on ISAR_FAIL_ON_CLEANUP bitbake variable: - 0 or unset: Output a warning, unmount, build succeeds (default). - 1: Output a warning, keep mounts left behind, build fails. + +### Stricter rootfs mounts management + +rootfs_do_umounts is not called from do_rootfs_finalize anymore. + +Every individual task that does mounting must also do the umounting at its end. diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass index 1eb974e8..472df3cf 100644 --- a/meta/classes/image.bbclass +++ b/meta/classes/image.bbclass @@ -405,8 +405,6 @@ def apt_list_files(d): IMAGE_LISTS = "${@ ' '.join(apt_list_files(d)) }" do_rootfs_finalize() { - rootfs_do_umounts - sudo -s <<'EOSUDO' set -e