From patchwork Fri Apr 22 01:06:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Henning Schild X-Patchwork-Id: 1709 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3) with LMTPA; Fri, 22 Apr 2022 11:06:31 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-lf1-f57.google.com (mail-lf1-f57.google.com [209.85.167.57]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8) with ESMTPS id 23M96Tax011690 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 22 Apr 2022 11:06:29 +0200 Received: by mail-lf1-f57.google.com with SMTP id d13-20020a056512320d00b0046f5098597esf2942813lfe.16 for ; Fri, 22 Apr 2022 02:06:29 -0700 (PDT) ARC-Seal: i=3; a=rsa-sha256; t=1650618384; cv=pass; d=google.com; s=arc-20160816; b=iAB0vAmaevmFZqjerBI1MebwmzQh0rpxRQumiNOAyOpVckHiHcj4R3oZt3XabO6RuI Ev32/UTM6UnaKr5rb5wh5RRzV+ID1Pg+Eeoyd2JtU0Um5/WUBYHpLRWhuTvdRDin96as x3A5cwxJzpHrqcyIUT5dGVsHvFOUn/EoeOksbRusJy6cc/0UAlkDzTlpTZJ+83H99C4V kgAJ0ccq7Z5fdwvUCmGcfdFGAC6iVyf3PoVw63eKfHpEB6DSRURl+mpT766V5L6Ff7jn K7H8gPO65HHnOrwKdVh80xa5uAIuwaaCQPd4boY+xrnOL4eejSnOEQdRS8bJRKB8lhZH 3C0w== ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=hfqebu8+1iJ0BOcfHeSSZUcbBtgXKRUZn+6gTna8T9U=; b=qSy+EiTWKzc6Q4d1QYu5Jqq1HtZmi8YYUzXh8eX9wawMz4/dA7X3fw5SGDcPLByo4H zTSOcpaDCoDPofiGZGrG/llYWRxEbuv/6kAjN6zaWvLORl+HuMqFb4Gwtv9cam2Sipkl jMuxQHMN1wv2QY2bb94P+js5tmF6L/BPVcOliYKzwypyTNJ9e4kiS1v/eY+iAMFF98VF ooihRgfeKDSmXe/Y3xS4unNYfvK2GeH86347ob6W83obKo8USflU/rVH8p3lLI7EshEo 9nXukN56EwllRN7NOjoG81volNocYgodLifhWYa++fqOaQ6AywfMDQSPR+PYahx0CDIB 2XBA== ARC-Authentication-Results: i=3; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=selector2 header.b=p9kfZRh2; arc=pass (i=1 spf=pass spfdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of henning.schild@siemens.com designates 2a01:111:f400:7d00::616 as permitted sender) smtp.mailfrom=henning.schild@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=hfqebu8+1iJ0BOcfHeSSZUcbBtgXKRUZn+6gTna8T9U=; b=lrosj+bPw47pqhDi9b9NV9RwPsetVlL6su8zjvYo/jyfo4gy2Pd71UZnz2qP34wqOc prRKkvU9sd1LP4SvOZms+OyD+vwbAeZhShyk6XbRUXLenYA3RSZ6pLz+Si2XUaaC5YCZ 6S5AWgTU0wMq4Agw8p1yXVkGv4Gk3Td0fpXrfGtBvmhP1OtwkIiOyw2znmOw3q94IE6n 1jH9Rl3BPCza+JfoxVYzFWMclIm2q8LjZGtmNSuU+mEUsJfINPUbMK5ZXZpd2wvh9o6v BdZ+DF24e8TVfyjRkNCc5lARzRRbMY4T6R+iU/RWcGdoyTycJI9g3fSjithp282qoY32 7OnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=hfqebu8+1iJ0BOcfHeSSZUcbBtgXKRUZn+6gTna8T9U=; b=ATQpJkxrwPsv4YKhvRONt/6BlvfHMPYlH4Ln4nRPCUulqPsvTPMZwI0/hghZGsN0ew /ybNA/pwbJDXPeURF44HgoF5sxLvwSWYGVmUM0G+3c7huVtz+dBV1uAz81R7FYg6OoIT AshGLNEC+F0Mc9g+51qi201cbDlQiK/czb8mgpAtQiGTjay5Q+DzSIHBvHWHcDz+sfkl iWvaZXgHkPmn44EZBHcDOEFTfRfVc2F8uSxqkUyL5chrgvSJQfnEOWHF/BBpiEkRbdh6 FPK+FbfgYrCZOmLwJtfsDzIUXdqM6dZ55GxBCgbpdIQ7oUXdSh5i4jl4OR7BYoZQJmca g5uA== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM530tBzmF9qky5VvVV+QnuLWZWjXvRzXIswMrkd10CfoGLLDZlPPf spxZyDxs9OrniWlbaFUuiEE= X-Google-Smtp-Source: ABdhPJxulDT78z5Z8UXbvYJfXSYwwUz5JPjtWid28u085FJDbBW7FGjJ8t7qL4sYGSKjaJuHUiRW5A== X-Received: by 2002:a05:6512:3f94:b0:471:9447:f4ab with SMTP id x20-20020a0565123f9400b004719447f4abmr2411787lfa.661.1650618384167; Fri, 22 Apr 2022 02:06:24 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6512:3f16:b0:449:f5bf:6f6a with SMTP id y22-20020a0565123f1600b00449f5bf6f6als721748lfa.2.gmail; Fri, 22 Apr 2022 02:06:23 -0700 (PDT) X-Received: by 2002:a05:6512:15a7:b0:471:8bd9:b57d with SMTP id bp39-20020a05651215a700b004718bd9b57dmr2463666lfb.307.1650618383079; Fri, 22 Apr 2022 02:06:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1650618383; cv=pass; d=google.com; s=arc-20160816; b=WyETK5+OK4Vj4ZlrMHn9T1f7bE0pwxDl3oV4wXzGFrfr6HhtlIFl7ei2KzNmE+ZtwJ Zpe9c1HAFM4mbtg9X7KId1buCP7Snu4L3AjflWFqq6NUaqidetYRXhgCJm+CjWxjmN6n ACaMKa3dsiewe3XGiOlmeoVyLO5lACywqSQvUmTfxhcPi+Dxi76pTGAzDASY23FAem09 Nkex6wN+3tecXS+cd/7+tXmu2Y76SKPClBTeAjuRsSvXAI2SHwU0a32cWxEIij81mXcM MwaC6PnWZGXSBIPreXDvkQhXKZhw/Y3THERBcmrlS4QXOSG7EsijYPZkb+gmAChszwXU PrKw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=apy8p7JB5ey6U03xDcWE192WkbC5ib/hqCazS6ytqu8=; b=zkxuupRig2NyA6I95edqozQSL/ywlSUvsHo1DhtupZGKgg36AB38kuIWlJi//MORQx uSzdsV6iOPLntMODLGdbPT+0fwOSwvmpI2AqlFy894Bov648fH6UpHP32NixtGCnihw1 0TNIrRx3ETjQ6wPeqXcF7rwYoCSett3oBeTG+BcWGKLtjnUdQ3Nn93spJo/GcLAiuCl8 j0KsrcYaJ8IZvRZswifrnAGY2JL54xXYVKstieuw5L3nTnVYLIJysjCLNSySTahASQC5 Ojt6ZH6560gRvQ+x+yLtWXr7Tv/9b8TzJoQ1qkLG9/R49Zbes+IZ9Esg3rjWbMirOqkc Bp3w== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=selector2 header.b=p9kfZRh2; arc=pass (i=1 spf=pass spfdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of henning.schild@siemens.com designates 2a01:111:f400:7d00::616 as permitted sender) smtp.mailfrom=henning.schild@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on20616.outbound.protection.outlook.com. [2a01:111:f400:7d00::616]) by gmr-mx.google.com with ESMTPS id 9-20020ac24d49000000b0046bb7703c8dsi309885lfp.11.2022.04.22.02.06.22 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Apr 2022 02:06:22 -0700 (PDT) Received-SPF: pass (google.com: domain of henning.schild@siemens.com designates 2a01:111:f400:7d00::616 as permitted sender) client-ip=2a01:111:f400:7d00::616; ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dtuQ7iZ840B/A5UmWX6ZH3CD4W8p4AXYtRZUhulhsireUbg9BTNaAOn3yDeuhF69TekYqDNaNbo+Vfja4HyHW7wRNdlLd2mB6HKOhHf5cQx/ahEHw9LzW6mSyXLb/v2PpsnERE+h2WyKWzMEZyWOcfj7D/RJ4f1hmS71yYeeTGfWYDLJZTbQ5CyXrEBtJRXxkDalid1AH6bivKaSXR17kA8IpMYCUB/Vmdtl18t4u3mAxCfhOq0dqjcKWFesgCH7ZgS4cyk1RI5X9N01ZJHyKJn2LdgPZw6mqPemX/axUWXhLbdlWz/gIFTNEex01wpyLs2KKh+U3+sgHDivqkJ69A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=apy8p7JB5ey6U03xDcWE192WkbC5ib/hqCazS6ytqu8=; b=gRk726sb4ikT+vz/spfWZbK+rcRvMoGmO+KB65lLfRRUB5ZtaBRiKaqhtgOgLvWmLbXV9nl7WUuBD2SWKJuVHV23mNPfovG8hvVPDEhHioXfYTAQi6H5j1THwbbb8n/MmZCllNPiG+YqXHsFm5lDV7nKA7nsIu/r8Zce15WVNhvzhPYsw1ghxine3UWxvKojfAKoURBNHpcj04x13bW4Wpp3NHhpc9JjWyuffbsfGXtdstlhcF18I3tQ873S4YP/x2V4hSGlU5eQGB7N5mZj6/PoYuhXqzAAFG2Hdj2xej36QSfTmMjFryDF2dHRg9tJ1ws9d75gc1eA2R5YMvpldA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 194.138.21.71) smtp.rcpttodomain=googlegroups.com smtp.mailfrom=siemens.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=siemens.com; dkim=none (message not signed); arc=none Received: from SV0P279CA0044.NORP279.PROD.OUTLOOK.COM (2603:10a6:f10:13::13) by AM5PR1001MB1186.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:203:14::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.13; Fri, 22 Apr 2022 09:06:20 +0000 Received: from HE1EUR01FT040.eop-EUR01.prod.protection.outlook.com (2603:10a6:f10:13:cafe::e3) by SV0P279CA0044.outlook.office365.com (2603:10a6:f10:13::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.13 via Frontend Transport; Fri, 22 Apr 2022 09:06:19 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 194.138.21.71) smtp.mailfrom=siemens.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=siemens.com; Received-SPF: Pass (protection.outlook.com: domain of siemens.com designates 194.138.21.71 as permitted sender) receiver=protection.outlook.com; client-ip=194.138.21.71; helo=hybrid.siemens.com; Received: from hybrid.siemens.com (194.138.21.71) by HE1EUR01FT040.mail.protection.outlook.com (10.152.1.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5186.14 via Frontend Transport; Fri, 22 Apr 2022 09:06:18 +0000 Received: from DEMCHDC8A0A.ad011.siemens.net (139.25.226.106) by DEMCHDC9SKA.ad011.siemens.net (194.138.21.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Fri, 22 Apr 2022 11:06:15 +0200 Received: from localhost.localdomain (167.87.32.223) by DEMCHDC8A0A.ad011.siemens.net (139.25.226.106) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Fri, 22 Apr 2022 11:06:14 +0200 From: Henning Schild To: isar-users CC: Florian Bezdeka , Felix Moessbauer , Henning Schild Subject: [PATCH v3 1/3] bitbake: Update to 1.50.5 release Date: Fri, 22 Apr 2022 11:06:00 +0200 Message-ID: <20220422090602.21666-2-henning.schild@siemens.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220422090602.21666-1-henning.schild@siemens.com> References: <20220422090602.21666-1-henning.schild@siemens.com> MIME-Version: 1.0 X-Originating-IP: [167.87.32.223] X-ClientProxiedBy: DEMCHDC89XA.ad011.siemens.net (139.25.226.103) To DEMCHDC8A0A.ad011.siemens.net (139.25.226.106) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2536cbe7-ab08-417f-5f54-08da243f5d14 X-MS-TrafficTypeDiagnostic: AM5PR1001MB1186:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 54k+KSXHz3DfV5brnxTl7ugRJfHbxsYBmBZPo64DblKg/HKpmRfszEOSdGGXrnlzcOtE4/c0Dw0EhVUcOdZC9m/Du1dAnp2QDm+cSd1x+VgXpr1CoPZizQz4RvKO5TjAdxc1T1YfP/Xol+JowM+x83opASF/74gUrz7Mn7GJxuuk7I9MfTmMRI8CLXA2CpmhvuiC5aXUpbxdhJCOYjIvjl0NUTu81MF35Q27V/2YeRb2iW+NkmFrrC+pHwNlTLlCTri9PwbZSkYKbL8nDqjOGgIfWCdT4IT1XTS55P8uOeWVazCJ/a1bhlhCVyq1K/CExkcS8ZsE9+F48mk3MA1bTpjDkYTG54gD3j7yoZkXah/myTaksDEB3NoJJ9d9VuPOUx+wITk+C8OLE2XdB4HCV01WErdB8ethNvaOEgImpg1Ady0hLdvbX2gihB1/m9zf9mIye/jmEP3Ke5CDFqVfIFnYdZtBsqCPRu6bk65GrScXArzAg30cQRbp7LTGGlmuqkOreMdSMglKPxntsS5lbeEYpELRJfyqUc/wBi6CSPrYU5ZxqyqC5Q+y+vXgbkYWRlazeCGsCjpYWgc+t0O4UtFSdFdm75AyGc+2FcA28i9lJF7XMk6TFYhaMOzYs0SoS2AHXbmyGADybJfFPnmwTd9E5e47r9NQfeztKz4Pu2VIDywhlTCTOybkjWTKhD4gXV8ggxYUx250KteCb1qnfrLlerlYvgoBiB/J6+W8EBdentw5o25Nrvg8ggMLTVhaJoA0f122Wdu/vFaZLy2Du59jzqLulECVLQRmOoc7lIB9+yq5FWl5fw42YpVvkC/xhMXaVKeMMvycIKMiVh/FpA== X-Forefront-Antispam-Report: CIP:194.138.21.71; CTRY:DE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:hybrid.siemens.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230001)(4636009)(40470700004)(46966006)(36840700001)(1076003)(186003)(107886003)(15650500001)(6916009)(2906002)(54906003)(956004)(2616005)(8676002)(336012)(16526019)(40460700003)(316002)(356005)(86362001)(70586007)(70206006)(4326008)(36860700001)(47076005)(83380400001)(8936002)(5660300002)(508600001)(82960400001)(36756003)(30864003)(966005)(44832011)(82310400005)(26005)(81166007)(6666004)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: siemens.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Apr 2022 09:06:18.8703 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2536cbe7-ab08-417f-5f54-08da243f5d14 X-MS-Exchange-CrossTenant-Id: 38ae3bcd-9579-4fd4-adda-b42e1495d55a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=38ae3bcd-9579-4fd4-adda-b42e1495d55a; Ip=[194.138.21.71]; Helo=[hybrid.siemens.com] X-MS-Exchange-CrossTenant-AuthSource: HE1EUR01FT040.eop-EUR01.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR1001MB1186 X-Original-Sender: henning.schild@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=selector2 header.b=p9kfZRh2; arc=pass (i=1 spf=pass spfdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of henning.schild@siemens.com designates 2a01:111:f400:7d00::616 as permitted sender) smtp.mailfrom=henning.schild@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, 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-getmail-retrieved-from-mailbox: INBOX Update bitbake to the latest release in 1.50 branch. This release is tagged to the commit ID aaa7f7af23d5f89fe4a5ed48c57ea3dfca07c79d in the bitbake upstream. Signed-off-by: Henning Schild --- bitbake/lib/bb/cache.py | 3 +- bitbake/lib/bb/cooker.py | 30 ++++++++++++++-- bitbake/lib/bb/data_smart.py | 4 +-- bitbake/lib/bb/fetch2/__init__.py | 4 +++ bitbake/lib/bb/fetch2/perforce.py | 2 +- bitbake/lib/bb/fetch2/wget.py | 2 +- bitbake/lib/bb/persist_data.py | 5 +-- bitbake/lib/bb/process.py | 2 +- bitbake/lib/bb/runqueue.py | 34 +++++++++--------- bitbake/lib/bb/server/process.py | 2 +- bitbake/lib/bb/tests/fetch.py | 35 ++++++++++--------- bitbake/lib/bb/utils.py | 13 +++++-- bitbake/lib/hashserv/server.py | 4 +-- bitbake/lib/toaster/tests/builds/buildtest.py | 2 +- 14 files changed, 89 insertions(+), 53 deletions(-) diff --git a/bitbake/lib/bb/cache.py b/bitbake/lib/bb/cache.py index 27eb271798e8..5f9c0a779d75 100644 --- a/bitbake/lib/bb/cache.py +++ b/bitbake/lib/bb/cache.py @@ -19,7 +19,8 @@ import os import logging import pickle -from collections import defaultdict, Mapping +from collections import defaultdict +from collections.abc import Mapping import bb.utils from bb import PrefixLoggerAdapter import re diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py index 89f1fad08310..c946800a8c62 100644 --- a/bitbake/lib/bb/cooker.py +++ b/bitbake/lib/bb/cooker.py @@ -388,12 +388,22 @@ class BBCooker: # Create a new hash server bound to a unix domain socket if not self.hashserv: dbfile = (self.data.getVar("PERSISTENT_DIR") or self.data.getVar("CACHE")) + "/hashserv.db" + upstream = self.data.getVar("BB_HASHSERVE_UPSTREAM") or None + if upstream: + import socket + try: + sock = socket.create_connection(upstream.split(":"), 5) + sock.close() + except socket.error as e: + bb.warn("BB_HASHSERVE_UPSTREAM is not valid, unable to connect hash equivalence server at '%s': %s" + % (upstream, repr(e))) + self.hashservaddr = "unix://%s/hashserve.sock" % self.data.getVar("TOPDIR") self.hashserv = hashserv.create_server( self.hashservaddr, dbfile, sync=False, - upstream=self.data.getVar("BB_HASHSERVE_UPSTREAM") or None, + upstream=upstream, ) self.hashserv.process = multiprocessing.Process(target=self.hashserv.serve_forever) self.hashserv.process.start() @@ -805,7 +815,9 @@ class BBCooker: for dep in rq.rqdata.runtaskentries[tid].depends: (depmc, depfn, _, deptaskfn) = bb.runqueue.split_tid_mcfn(dep) deppn = self.recipecaches[depmc].pkg_fn[deptaskfn] - depend_tree["tdepends"][dotname].append("%s.%s" % (deppn, bb.runqueue.taskname_from_tid(dep))) + if depmc: + depmc = "mc:" + depmc + ":" + depend_tree["tdepends"][dotname].append("%s%s.%s" % (depmc, deppn, bb.runqueue.taskname_from_tid(dep))) if taskfn not in seen_fns: seen_fns.append(taskfn) packages = [] @@ -2204,21 +2216,33 @@ class CookerParser(object): yield not cached, mc, infos def parse_generator(self): - while True: + empty = False + while self.processes or not empty: + for process in self.processes.copy(): + if not process.is_alive(): + process.join() + self.processes.remove(process) + if self.parsed >= self.toparse: break try: result = self.result_queue.get(timeout=0.25) except queue.Empty: + empty = True pass else: + empty = False value = result[1] if isinstance(value, BaseException): raise value else: yield result + if not (self.parsed >= self.toparse): + raise bb.parse.ParseError("Not all recipes parsed, parser thread killed/died? Exiting.", None) + + def parse_next(self): result = [] parsed = None diff --git a/bitbake/lib/bb/data_smart.py b/bitbake/lib/bb/data_smart.py index 8291ca65e309..65857a9c7941 100644 --- a/bitbake/lib/bb/data_smart.py +++ b/bitbake/lib/bb/data_smart.py @@ -17,7 +17,7 @@ BitBake build tools. # Based on functions from the base bb module, Copyright 2003 Holger Schurig import copy, re, sys, traceback -from collections import MutableMapping +from collections.abc import MutableMapping import logging import hashlib import bb, bb.codeparser @@ -403,7 +403,7 @@ class DataSmart(MutableMapping): s = __expand_python_regexp__.sub(varparse.python_sub, s) except SyntaxError as e: # Likely unmatched brackets, just don't expand the expression - if e.msg != "EOL while scanning string literal": + if e.msg != "EOL while scanning string literal" and not e.msg.startswith("unterminated string literal"): raise if s == olds: break diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py index dbf8b50e68a7..1005ec10c639 100644 --- a/bitbake/lib/bb/fetch2/__init__.py +++ b/bitbake/lib/bb/fetch2/__init__.py @@ -430,6 +430,7 @@ def uri_replace(ud, uri_find, uri_replace, replacements, d, mirrortarball=None): uri_replace_decoded = list(decodeurl(uri_replace)) logger.debug2("For url %s comparing %s to %s" % (uri_decoded, uri_find_decoded, uri_replace_decoded)) result_decoded = ['', '', '', '', '', {}] + # 0 - type, 1 - host, 2 - path, 3 - user, 4- pswd, 5 - params for loc, i in enumerate(uri_find_decoded): result_decoded[loc] = uri_decoded[loc] regexp = i @@ -449,6 +450,9 @@ def uri_replace(ud, uri_find, uri_replace, replacements, d, mirrortarball=None): for l in replacements: uri_replace_decoded[loc][k] = uri_replace_decoded[loc][k].replace(l, replacements[l]) result_decoded[loc][k] = uri_replace_decoded[loc][k] + elif (loc == 3 or loc == 4) and uri_replace_decoded[loc]: + # User/password in the replacement is just a straight replacement + result_decoded[loc] = uri_replace_decoded[loc] elif (re.match(regexp, uri_decoded[loc])): if not uri_replace_decoded[loc]: result_decoded[loc] = "" diff --git a/bitbake/lib/bb/fetch2/perforce.py b/bitbake/lib/bb/fetch2/perforce.py index e2a41a4a1287..3b6fa4b1ec9a 100644 --- a/bitbake/lib/bb/fetch2/perforce.py +++ b/bitbake/lib/bb/fetch2/perforce.py @@ -134,7 +134,7 @@ class Perforce(FetchMethod): ud.setup_revisions(d) - ud.localfile = d.expand('%s_%s_%s_%s.tar.gz' % (cleanedhost, cleanedpath, cleandedmodule, ud.revision)) + ud.localfile = d.expand('%s_%s_%s_%s.tar.gz' % (cleanedhost, cleanedpath, cleanedmodule, ud.revision)) def _buildp4command(self, ud, d, command, depot_filename=None): """ diff --git a/bitbake/lib/bb/fetch2/wget.py b/bitbake/lib/bb/fetch2/wget.py index 784df70c9f62..7fa2a87ffde5 100644 --- a/bitbake/lib/bb/fetch2/wget.py +++ b/bitbake/lib/bb/fetch2/wget.py @@ -322,7 +322,7 @@ class Wget(FetchMethod): except (TypeError, ImportError, IOError, netrc.NetrcParseError): pass - with opener.open(r) as response: + with opener.open(r, timeout=30) as response: pass except urllib.error.URLError as e: if try_again: diff --git a/bitbake/lib/bb/persist_data.py b/bitbake/lib/bb/persist_data.py index c6a209fb3fc1..6f32d81afe80 100644 --- a/bitbake/lib/bb/persist_data.py +++ b/bitbake/lib/bb/persist_data.py @@ -12,6 +12,7 @@ currently, providing a key/value store accessed by 'domain'. # import collections +import collections.abc import contextlib import functools import logging @@ -19,7 +20,7 @@ import os.path import sqlite3 import sys import warnings -from collections import Mapping +from collections.abc import Mapping sqlversion = sqlite3.sqlite_version_info if sqlversion[0] < 3 or (sqlversion[0] == 3 and sqlversion[1] < 3): @@ -29,7 +30,7 @@ if sqlversion[0] < 3 or (sqlversion[0] == 3 and sqlversion[1] < 3): logger = logging.getLogger("BitBake.PersistData") @functools.total_ordering -class SQLTable(collections.MutableMapping): +class SQLTable(collections.abc.MutableMapping): class _Decorators(object): @staticmethod def retry(*, reconnect=True): diff --git a/bitbake/lib/bb/process.py b/bitbake/lib/bb/process.py index d5a1775fcec0..af5d804a1d59 100644 --- a/bitbake/lib/bb/process.py +++ b/bitbake/lib/bb/process.py @@ -60,7 +60,7 @@ class Popen(subprocess.Popen): "close_fds": True, "preexec_fn": subprocess_setup, "stdout": subprocess.PIPE, - "stderr": subprocess.STDOUT, + "stderr": subprocess.PIPE, "stdin": subprocess.PIPE, "shell": False, } diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py index 10511a09dc1c..cd10da8b3a6f 100644 --- a/bitbake/lib/bb/runqueue.py +++ b/bitbake/lib/bb/runqueue.py @@ -926,38 +926,36 @@ class RunQueueData: # # Once all active tasks are marked, prune the ones we don't need. - delcount = {} - for tid in list(self.runtaskentries.keys()): - if tid not in runq_build: - delcount[tid] = self.runtaskentries[tid] - del self.runtaskentries[tid] - # Handle --runall if self.cooker.configuration.runall: # re-run the mark_active and then drop unused tasks from new list + reduced_tasklist = set(self.runtaskentries.keys()) + for tid in list(self.runtaskentries.keys()): + if tid not in runq_build: + reduced_tasklist.remove(tid) runq_build = {} for task in self.cooker.configuration.runall: if not task.startswith("do_"): task = "do_{0}".format(task) runall_tids = set() - for tid in list(self.runtaskentries): + for tid in reduced_tasklist: wanttid = "{0}:{1}".format(fn_from_tid(tid), task) - if wanttid in delcount: - self.runtaskentries[wanttid] = delcount[wanttid] if wanttid in self.runtaskentries: runall_tids.add(wanttid) for tid in list(runall_tids): - mark_active(tid,1) + mark_active(tid, 1) if self.cooker.configuration.force: invalidate_task(tid, False) - for tid in list(self.runtaskentries.keys()): - if tid not in runq_build: - delcount[tid] = self.runtaskentries[tid] - del self.runtaskentries[tid] + delcount = set() + for tid in list(self.runtaskentries.keys()): + if tid not in runq_build: + delcount.add(tid) + del self.runtaskentries[tid] + if self.cooker.configuration.runall: if len(self.runtaskentries) == 0: bb.msg.fatal("RunQueue", "Could not find any tasks with the tasknames %s to run within the recipes of the taskgraphs of the targets %s" % (str(self.cooker.configuration.runall), str(self.targets))) @@ -971,16 +969,16 @@ class RunQueueData: for task in self.cooker.configuration.runonly: if not task.startswith("do_"): task = "do_{0}".format(task) - runonly_tids = { k: v for k, v in self.runtaskentries.items() if taskname_from_tid(k) == task } + runonly_tids = [k for k in self.runtaskentries.keys() if taskname_from_tid(k) == task] - for tid in list(runonly_tids): - mark_active(tid,1) + for tid in runonly_tids: + mark_active(tid, 1) if self.cooker.configuration.force: invalidate_task(tid, False) for tid in list(self.runtaskentries.keys()): if tid not in runq_build: - delcount[tid] = self.runtaskentries[tid] + delcount.add(tid) del self.runtaskentries[tid] if len(self.runtaskentries) == 0: diff --git a/bitbake/lib/bb/server/process.py b/bitbake/lib/bb/server/process.py index 07bb785a1822..fcdce19717d2 100644 --- a/bitbake/lib/bb/server/process.py +++ b/bitbake/lib/bb/server/process.py @@ -659,7 +659,7 @@ class BBUIEventQueue: self.reader = ConnectionReader(readfd) self.t = threading.Thread() - self.t.setDaemon(True) + self.t.daemon = True self.t.run = self.startCallbackHandler self.t.start() diff --git a/bitbake/lib/bb/tests/fetch.py b/bitbake/lib/bb/tests/fetch.py index f5d557e8c000..3b64584da0e9 100644 --- a/bitbake/lib/bb/tests/fetch.py +++ b/bitbake/lib/bb/tests/fetch.py @@ -431,6 +431,10 @@ class MirrorUriTest(FetcherTest): ("git://someserver.org/bitbake;tag=1234567890123456789012345678901234567890;branch=master", "git://someserver.org/bitbake;branch=master", "git://git.openembedded.org/bitbake;protocol=http") : "git://git.openembedded.org/bitbake;tag=1234567890123456789012345678901234567890;branch=master;protocol=http", + ("git://user1@someserver.org/bitbake;tag=1234567890123456789012345678901234567890;branch=master", "git://someserver.org/bitbake;branch=master", "git://user2@git.openembedded.org/bitbake;protocol=http") + : "git://user2@git.openembedded.org/bitbake;tag=1234567890123456789012345678901234567890;branch=master;protocol=http", + + #Renaming files doesn't work #("http://somewhere.org/somedir1/somefile_1.2.3.tar.gz", "http://somewhere.org/somedir1/somefile_1.2.3.tar.gz", "http://somewhere2.org/somedir3/somefile_2.3.4.tar.gz") : "http://somewhere2.org/somedir3/somefile_2.3.4.tar.gz" #("file://sstate-xyz.tgz", "file://.*/.*", "file:///somewhere/1234/sstate-cache") : "file:///somewhere/1234/sstate-cache/sstate-xyz.tgz", @@ -491,7 +495,7 @@ class GitDownloadDirectoryNamingTest(FetcherTest): super(GitDownloadDirectoryNamingTest, self).setUp() self.recipe_url = "git://git.openembedded.org/bitbake" self.recipe_dir = "git.openembedded.org.bitbake" - self.mirror_url = "git://github.com/openembedded/bitbake.git" + self.mirror_url = "git://github.com/openembedded/bitbake.git;protocol=https" self.mirror_dir = "github.com.openembedded.bitbake.git" self.d.setVar('SRCREV', '82ea737a0b42a8b53e11c9cde141e9e9c0bd8c40') @@ -539,7 +543,7 @@ class TarballNamingTest(FetcherTest): super(TarballNamingTest, self).setUp() self.recipe_url = "git://git.openembedded.org/bitbake" self.recipe_tarball = "git2_git.openembedded.org.bitbake.tar.gz" - self.mirror_url = "git://github.com/openembedded/bitbake.git" + self.mirror_url = "git://github.com/openembedded/bitbake.git;protocol=https" self.mirror_tarball = "git2_github.com.openembedded.bitbake.git.tar.gz" self.d.setVar('BB_GENERATE_MIRROR_TARBALLS', '1') @@ -573,7 +577,7 @@ class GitShallowTarballNamingTest(FetcherTest): super(GitShallowTarballNamingTest, self).setUp() self.recipe_url = "git://git.openembedded.org/bitbake" self.recipe_tarball = "gitshallow_git.openembedded.org.bitbake_82ea737-1_master.tar.gz" - self.mirror_url = "git://github.com/openembedded/bitbake.git" + self.mirror_url = "git://github.com/openembedded/bitbake.git;protocol=https" self.mirror_tarball = "gitshallow_github.com.openembedded.bitbake.git_82ea737-1_master.tar.gz" self.d.setVar('BB_GIT_SHALLOW', '1') @@ -985,7 +989,7 @@ class FetcherNetworkTest(FetcherTest): def test_git_submodule_dbus_broker(self): # The following external repositories have show failures in fetch and unpack operations # We want to avoid regressions! - url = "gitsm://github.com/bus1/dbus-broker;protocol=git;rev=fc874afa0992d0c75ec25acb43d344679f0ee7d2;branch=main" + url = "gitsm://github.com/bus1/dbus-broker;protocol=https;rev=fc874afa0992d0c75ec25acb43d344679f0ee7d2;branch=main" fetcher = bb.fetch.Fetch([url], self.d) fetcher.download() # Previous cwd has been deleted @@ -1001,7 +1005,7 @@ class FetcherNetworkTest(FetcherTest): @skipIfNoNetwork() def test_git_submodule_CLI11(self): - url = "gitsm://github.com/CLIUtils/CLI11;protocol=git;rev=bd4dc911847d0cde7a6b41dfa626a85aab213baf;branch=main" + url = "gitsm://github.com/CLIUtils/CLI11;protocol=https;rev=bd4dc911847d0cde7a6b41dfa626a85aab213baf;branch=main" fetcher = bb.fetch.Fetch([url], self.d) fetcher.download() # Previous cwd has been deleted @@ -1016,12 +1020,12 @@ class FetcherNetworkTest(FetcherTest): @skipIfNoNetwork() def test_git_submodule_update_CLI11(self): """ Prevent regression on update detection not finding missing submodule, or modules without needed commits """ - url = "gitsm://github.com/CLIUtils/CLI11;protocol=git;rev=cf6a99fa69aaefe477cc52e3ef4a7d2d7fa40714;branch=main" + url = "gitsm://github.com/CLIUtils/CLI11;protocol=https;rev=cf6a99fa69aaefe477cc52e3ef4a7d2d7fa40714;branch=main" fetcher = bb.fetch.Fetch([url], self.d) fetcher.download() # CLI11 that pulls in a newer nlohmann-json - url = "gitsm://github.com/CLIUtils/CLI11;protocol=git;rev=49ac989a9527ee9bb496de9ded7b4872c2e0e5ca;branch=main" + url = "gitsm://github.com/CLIUtils/CLI11;protocol=https;rev=49ac989a9527ee9bb496de9ded7b4872c2e0e5ca;branch=main" fetcher = bb.fetch.Fetch([url], self.d) fetcher.download() # Previous cwd has been deleted @@ -1035,7 +1039,7 @@ class FetcherNetworkTest(FetcherTest): @skipIfNoNetwork() def test_git_submodule_aktualizr(self): - url = "gitsm://github.com/advancedtelematic/aktualizr;branch=master;protocol=git;rev=d00d1a04cc2366d1a5f143b84b9f507f8bd32c44" + url = "gitsm://github.com/advancedtelematic/aktualizr;branch=master;protocol=https;rev=d00d1a04cc2366d1a5f143b84b9f507f8bd32c44" fetcher = bb.fetch.Fetch([url], self.d) fetcher.download() # Previous cwd has been deleted @@ -1055,7 +1059,7 @@ class FetcherNetworkTest(FetcherTest): """ Prevent regression on deeply nested submodules not being checked out properly, even though they were fetched. """ # This repository also has submodules where the module (name), path and url do not align - url = "gitsm://github.com/azure/iotedge.git;protocol=git;rev=d76e0316c6f324345d77c48a83ce836d09392699" + url = "gitsm://github.com/azure/iotedge.git;protocol=https;rev=d76e0316c6f324345d77c48a83ce836d09392699" fetcher = bb.fetch.Fetch([url], self.d) fetcher.download() # Previous cwd has been deleted @@ -1113,7 +1117,7 @@ class SVNTest(FetcherTest): bb.process.run("svn co %s svnfetch_co" % self.repo_url, cwd=self.tempdir) # Github will emulate SVN. Use this to check if we're downloding... - bb.process.run("svn propset svn:externals 'bitbake svn://vcs.pcre.org/pcre2/code' .", + bb.process.run("svn propset svn:externals 'bitbake https://github.com/PhilipHazel/pcre2.git' .", cwd=os.path.join(self.tempdir, 'svnfetch_co', 'trunk')) bb.process.run("svn commit --non-interactive -m 'Add external'", cwd=os.path.join(self.tempdir, 'svnfetch_co', 'trunk')) @@ -1231,7 +1235,7 @@ class FetchLatestVersionTest(FetcherTest): test_git_uris = { # version pattern "X.Y.Z" - ("mx-1.0", "git://github.com/clutter-project/mx.git;branch=mx-1.4", "9b1db6b8060bd00b121a692f942404a24ae2960f", "") + ("mx-1.0", "git://github.com/clutter-project/mx.git;branch=mx-1.4;protocol=https", "9b1db6b8060bd00b121a692f942404a24ae2960f", "") : "1.99.4", # version pattern "vX.Y" # mirror of git.infradead.org since network issues interfered with testing @@ -1258,9 +1262,9 @@ class FetchLatestVersionTest(FetcherTest): : "0.4.3", ("build-appliance-image", "git://git.yoctoproject.org/poky", "b37dd451a52622d5b570183a81583cc34c2ff555", "(?P(([0-9][\.|_]?)+[0-9]))") : "11.0.0", - ("chkconfig-alternatives-native", "git://github.com/kergoth/chkconfig;branch=sysroot", "cd437ecbd8986c894442f8fce1e0061e20f04dee", "chkconfig\-(?P((\d+[\.\-_]*)+))") + ("chkconfig-alternatives-native", "git://github.com/kergoth/chkconfig;branch=sysroot;protocol=https", "cd437ecbd8986c894442f8fce1e0061e20f04dee", "chkconfig\-(?P((\d+[\.\-_]*)+))") : "1.3.59", - ("remake", "git://github.com/rocky/remake.git", "f05508e521987c8494c92d9c2871aec46307d51d", "(?P(\d+\.(\d+\.)*\d*(\+dbg\d+(\.\d+)*)*))") + ("remake", "git://github.com/rocky/remake.git;protocol=https", "f05508e521987c8494c92d9c2871aec46307d51d", "(?P(\d+\.(\d+\.)*\d*(\+dbg\d+(\.\d+)*)*))") : "3.82+dbg0.9", } @@ -1354,9 +1358,6 @@ class FetchCheckStatusTest(FetcherTest): "http://downloads.yoctoproject.org/releases/opkg/opkg-0.1.7.tar.gz", "http://downloads.yoctoproject.org/releases/opkg/opkg-0.3.0.tar.gz", "ftp://sourceware.org/pub/libffi/libffi-1.20.tar.gz", - "http://ftp.gnu.org/gnu/autoconf/autoconf-2.60.tar.gz", - "https://ftp.gnu.org/gnu/chess/gnuchess-5.08.tar.gz", - "https://ftp.gnu.org/gnu/gmp/gmp-4.0.tar.gz", # GitHub releases are hosted on Amazon S3, which doesn't support HEAD "https://github.com/kergoth/tslib/releases/download/1.1/tslib-1.1.tar.xz" ] @@ -2047,7 +2048,7 @@ class GitShallowTest(FetcherTest): @skipIfNoNetwork() def test_bitbake(self): - self.git('remote add --mirror=fetch origin git://github.com/openembedded/bitbake', cwd=self.srcdir) + self.git('remote add --mirror=fetch origin https://github.com/openembedded/bitbake', cwd=self.srcdir) self.git('config core.bare true', cwd=self.srcdir) self.git('fetch', cwd=self.srcdir) diff --git a/bitbake/lib/bb/utils.py b/bitbake/lib/bb/utils.py index b282d09abfce..2a150fe9c73e 100644 --- a/bitbake/lib/bb/utils.py +++ b/bitbake/lib/bb/utils.py @@ -16,7 +16,8 @@ import bb.msg import multiprocessing import fcntl import importlib -from importlib import machinery +import importlib.machinery +import importlib.util import itertools import subprocess import glob @@ -451,6 +452,10 @@ def lockfile(name, shared=False, retry=True, block=False): consider the possibility of sending a signal to the process to break out - at which point you want block=True rather than retry=True. """ + if len(name) > 255: + root, ext = os.path.splitext(name) + name = root[:255 - len(ext)] + ext + dirname = os.path.dirname(name) mkdirhier(dirname) @@ -487,7 +492,7 @@ def lockfile(name, shared=False, retry=True, block=False): return lf lf.close() except OSError as e: - if e.errno == errno.EACCES: + if e.errno == errno.EACCES or e.errno == errno.ENAMETOOLONG: logger.error("Unable to acquire lock '%s', %s", e.strerror, name) sys.exit(1) @@ -1616,7 +1621,9 @@ def load_plugins(logger, plugins, pluginpath): logger.debug('Loading plugin %s' % name) spec = importlib.machinery.PathFinder.find_spec(name, path=[pluginpath] ) if spec: - return spec.loader.load_module() + mod = importlib.util.module_from_spec(spec) + spec.loader.exec_module(mod) + return mod logger.debug('Loading plugins from %s...' % pluginpath) diff --git a/bitbake/lib/hashserv/server.py b/bitbake/lib/hashserv/server.py index a0dc0c170f2b..df0fa0a07937 100644 --- a/bitbake/lib/hashserv/server.py +++ b/bitbake/lib/hashserv/server.py @@ -521,7 +521,7 @@ class Server(object): def start_tcp_server(self, host, port): self.server = self.loop.run_until_complete( - asyncio.start_server(self.handle_client, host, port, loop=self.loop) + asyncio.start_server(self.handle_client, host, port) ) for s in self.server.sockets: @@ -546,7 +546,7 @@ class Server(object): # Work around path length limits in AF_UNIX os.chdir(os.path.dirname(path)) self.server = self.loop.run_until_complete( - asyncio.start_unix_server(self.handle_client, os.path.basename(path), loop=self.loop) + asyncio.start_unix_server(self.handle_client, os.path.basename(path)) ) finally: os.chdir(cwd) diff --git a/bitbake/lib/toaster/tests/builds/buildtest.py b/bitbake/lib/toaster/tests/builds/buildtest.py index 872bbd377510..13b51fb0d8e4 100644 --- a/bitbake/lib/toaster/tests/builds/buildtest.py +++ b/bitbake/lib/toaster/tests/builds/buildtest.py @@ -119,7 +119,7 @@ class BuildTest(unittest.TestCase): if os.environ.get("TOASTER_TEST_USE_SSTATE_MIRROR"): ProjectVariable.objects.get_or_create( name="SSTATE_MIRRORS", - value="file://.* http://autobuilder.yoctoproject.org/pub/sstate/PATH;downloadfilename=PATH", + value="file://.* http://sstate.yoctoproject.org/PATH;downloadfilename=PATH", project=project) ProjectTarget.objects.create(project=project, From patchwork Fri Apr 22 01:06:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Henning Schild X-Patchwork-Id: 1707 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3) with LMTPA; Fri, 22 Apr 2022 11:06:23 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-wm1-f62.google.com (mail-wm1-f62.google.com [209.85.128.62]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8) with ESMTPS id 23M96N8p011653 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 22 Apr 2022 11:06:23 +0200 Received: by mail-wm1-f62.google.com with SMTP id p31-20020a05600c1d9f00b0038ed0964a90sf3525112wms.4 for ; Fri, 22 Apr 2022 02:06:23 -0700 (PDT) ARC-Seal: i=3; a=rsa-sha256; t=1650618378; cv=pass; d=google.com; s=arc-20160816; b=q9ly/IwsAOh3DZKL6NESLHAeFGqmXP4UFd0oRZGXZmeIEDw/uZpkbeNWgTh8V15mQh eBIrn1TA7ijctR1aj2BPeH3/RZYDcJDcPQNMdoPsDoe7Vsn38kk1M9embFqr8y1Z4Vy/ fLmf7/Pr9NrTuagVHiLXV5mmOdVfrF719eLOUhJ61ojBV89BFNiqh2kQCaomXSklboq6 0GE3AxokQll0wPdAoEOl6tMxAYI107iLRM3hJtw3RfbGkISbQxUunlH3G9F8UL1BBhaW 3vWV1sUzFVQzwXn2cUWt/KmPJ0YRyU1DyHjBWFZbpAFWqwQSD8wru3/IhFfWFzetVaq+ +6KQ== ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=TPIRfG1hOJhs6NKHTeqA165O2YCLBaTkoLlq3pWXC1Q=; b=WqxVHsMetKUA+bOPW2nFAhe0IcH+AkvJ0V2g3cA9BnPeDJk0acMfD3NlGjvZVShF1f c5D/dCEerEhxMte1Nyz72nEGEoPQCBI3zabfdZi+6WOe0k2O13oo5IXW58omCDRtP2kE u9Iv5igtHbF69ZIR5glSR4GO9V14sQecdrErnLObiLgbffnF2RnqJKImp5hXSL3dLoqw OLI9UN0OqA4dACJzbMlGcxzBQfjwI9ekK05HHGKTbJZuipsoIXu32HpPbdMGQr311KHh AkKB2PlIgO8iPJQdvtGd9FBYxJmcxBL64w2sscCXXQ7ZUUx0kHu9NcVzl23myaOSXuvK 1pnw== ARC-Authentication-Results: i=3; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=selector2 header.b=NmBIb1NF; arc=pass (i=1 spf=pass spfdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of henning.schild@siemens.com designates 2a01:111:f400:7d00::609 as permitted sender) smtp.mailfrom=henning.schild@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=TPIRfG1hOJhs6NKHTeqA165O2YCLBaTkoLlq3pWXC1Q=; b=n1g9am9f0ZlHKsgFc4Ta0aAzDR1ZVEB8D1Ka3L70pfZHbBdUb/irOMY//AvpxVu2Ma ZlSzlHpkx8MqQcqnolojEMm2ENsV11nztEz8sZ572dgX7eky0Qy+yIlkJhAycnw7rucr LMG5AJl//I8h4uy65ZpvwuHtfx+QfJEZSaDnYuO+q3lT+yIdQvslCUECoMOZRk2saIq+ NeZdJY/AmOJ9ru6HLN/9jwSzoejw8TRbKEbQ2kvGQ0F62U0/1MZSgo5wWMyaB+Pkf3th TccGnj36xIKXifMqnIPcpn6f4f2bBqKxjFPnMPArH7ilm0Yloi6BEtk1s8xPaIoDLMTT g9rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=TPIRfG1hOJhs6NKHTeqA165O2YCLBaTkoLlq3pWXC1Q=; b=xukK2brh1hpdrqNLkDYgl84CSjT69VAyqGrFmkqCMLs2QmO57kG4jd1Vp/Sg3MQpq0 N4rW1I0b58gj+KjRlBRL5O3e2MXJZqsggreVQeNsSXrB32NOqRiIZFqa1SreuZE83TWG Jgz/LahyLzQmHIadAb0iLEphsyEC8E5eEaOMEcBpFUaXN+iWX0oz7pp4holVsB/I+4TF XJJWCKXnqNAjuAkDPCP8nSOD6fpf+/GNy17UQITwpmiODtc4RKzcYzdJLpSjErmlMbtx AO6erx3EMJjwSadBqBqp0uicVaFgKojDUO+iERhG9BC1I6w4f0VQ+EEBphF9XgiQNEgr 6j5g== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM531OHLFbU1fBD7d4FLm+h82OfQsQEmeqLyso0sfrjHgfJ4WsCJNk sw7tpBbP58HkYO9OYUUIUWc= X-Google-Smtp-Source: ABdhPJwRnklS7F5q6xQlntt16nXNJEqUZzVJ1KqR0mtzt+4H6mSorIcyUEIbv8BxUwr2PlpOh5ZsYw== X-Received: by 2002:a5d:4303:0:b0:207:a7d8:4ce6 with SMTP id h3-20020a5d4303000000b00207a7d84ce6mr2911591wrq.101.1650618377908; Fri, 22 Apr 2022 02:06:17 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:600c:1d8a:b0:38e:d19c:f24f with SMTP id p10-20020a05600c1d8a00b0038ed19cf24fls146408wms.3.canary-gmail; Fri, 22 Apr 2022 02:06:17 -0700 (PDT) X-Received: by 2002:a05:600c:1f11:b0:392:aaf8:df7c with SMTP id bd17-20020a05600c1f1100b00392aaf8df7cmr3181372wmb.148.1650618377002; Fri, 22 Apr 2022 02:06:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1650618376; cv=pass; d=google.com; s=arc-20160816; b=pyIftoYuR2vwXTGMYWtHLHjXlUdocJG6OtRpqgPAjz7+9/7L4r94xZgCxyy6oE5qmk e3FSTfLjzR8Jl0Q1hMS0Nq1mvyR2Gd6UfMsLMPDpNUbUxgWXwf6Nip7wPH4ISk09l32D M5x6vIcgoRat6a1PBp5gGg98dutr1UoiU6jrhFiBx8mMKCL7nqmA3BEuqv8hzyxbd82D cdirVKUgkii91P3OjjtyymFGDBV5GekghK+n4gHTwID0s1R55MFV1VqOSbzNtdhENYDn 3knI+GZLSOXOLuAugoFP5qgd5x7651cEMlLDly7zngqB15rwe935OZRXu1Q9I5uIIpxw cUhA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=kc/l4svPQZh+71Kev8W21NOMxAxI+f2o9obhmmu2u0k=; b=BoR/GMmqoOjdlMVm4OXQktWVb9FxArQj5pdUt6dGFHcXPvV6kDrGdlfE9zeGj1M9mN 9btPNeaudkQTKZGwUOALXMH6f41n9eW2Ky4z/1hzSqkWbuWPSXJLWtMuX/IWAswYrXaI 8eobXKHtF/8iF6afYjJZyOo8cquQZHhZv8WjF/C+I9C2EZK6D6zHiRKcdB64IC56vLHX CtqvAfL4gzDQUM/qLJCsRP0NI2znSN5Lx+wPWu/AQtWQ+WVujO5fJHrvjOqpwUDqETEM sSLlU9aHV3iU6G+VPKXy2w9JYqMqNxki0Jh1IwgGeVw46wJsAV9Pq6JFcs/d1eQiWdhU OOsw== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=selector2 header.b=NmBIb1NF; arc=pass (i=1 spf=pass spfdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of henning.schild@siemens.com designates 2a01:111:f400:7d00::609 as permitted sender) smtp.mailfrom=henning.schild@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on20609.outbound.protection.outlook.com. [2a01:111:f400:7d00::609]) by gmr-mx.google.com with ESMTPS id g13-20020adfd1ed000000b0020412d0d89fsi299016wrd.1.2022.04.22.02.06.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Apr 2022 02:06:16 -0700 (PDT) Received-SPF: pass (google.com: domain of henning.schild@siemens.com designates 2a01:111:f400:7d00::609 as permitted sender) client-ip=2a01:111:f400:7d00::609; ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EtDSwlrOvhjUY/EwVXanJYaaUFTTD1F+bo/ax3hWwLNYKW6U6xGjazct3QJbfIoZIFF+wMfq90u3BDTOIxgtERVFItlopBExtQVjVRhZ35h8ybjgiufNNPN3TOkF3cnj/m/RyYI8hk0zMWWdjeoVEOERX20OUaSBKt88PCwFrivwd68Q8srp8LdlUE1LJtSIYVqNZTRkmpNMBUQ2KQJ1enflrypqv8GaLm3EwJjAc05PPHd84DhW0KYAO9fs8nnmnpA0M8l3Uz1VuQy1CxUxcDOSc8lZ1udMPkNM9rAUEQg+D0fc3cRPbVRRt/JoZmdrdIrH+jbqqTor57XKdxZ9KA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=kc/l4svPQZh+71Kev8W21NOMxAxI+f2o9obhmmu2u0k=; b=fGOS/MQnn9xCYFwHBBo7iwSsF9FKRwIgCz0Cugr8o61pXY79GIynMHC3wLR22UwZpjK/niBbAN5lKTRTpvo2qJm3Bk64DN88xrSZw2OEOckc6OF9PTfzcmk+mGGJLgnLpdiKRJKD2iuUFWIxZyXpdxUSdmmgBj6klomvpheIqpr0GdTeFQLS7v2y8PNNk/5eNJ92gPLqcgpeFsRKjw/c1DWf7FOU0GIiUTz4a2cEMwGWeHgBfNTgk7RgTtsbMDFTD6f4wZHOehAcXJqx/hhdbF/NI4NQW9YNKcmJZdetMCWY8zWlTy18dpf2hN9peLzh4LAMfY1g/Gh/Fy358sQ0LQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 194.138.21.70) smtp.rcpttodomain=googlegroups.com smtp.mailfrom=siemens.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=siemens.com; dkim=none (message not signed); arc=none Received: from DU2P250CA0022.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:231::27) by DB8PR10MB3894.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:163::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.13; Fri, 22 Apr 2022 09:06:15 +0000 Received: from DB5EUR01FT039.eop-EUR01.prod.protection.outlook.com (2603:10a6:10:231:cafe::c2) by DU2P250CA0022.outlook.office365.com (2603:10a6:10:231::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.15 via Frontend Transport; Fri, 22 Apr 2022 09:06:15 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 194.138.21.70) smtp.mailfrom=siemens.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=siemens.com; Received-SPF: Pass (protection.outlook.com: domain of siemens.com designates 194.138.21.70 as permitted sender) receiver=protection.outlook.com; client-ip=194.138.21.70; helo=hybrid.siemens.com; Received: from hybrid.siemens.com (194.138.21.70) by DB5EUR01FT039.mail.protection.outlook.com (10.152.5.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5186.14 via Frontend Transport; Fri, 22 Apr 2022 09:06:15 +0000 Received: from DEMCHDC8A0A.ad011.siemens.net (139.25.226.106) by DEMCHDC9SJA.ad011.siemens.net (194.138.21.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Fri, 22 Apr 2022 11:06:15 +0200 Received: from localhost.localdomain (167.87.32.223) by DEMCHDC8A0A.ad011.siemens.net (139.25.226.106) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Fri, 22 Apr 2022 11:06:15 +0200 From: Henning Schild To: isar-users CC: Florian Bezdeka , Felix Moessbauer , Henning Schild Subject: [PATCH v3 2/3] wic: align our fork of common.wks.inc with wic version we carry Date: Fri, 22 Apr 2022 11:06:01 +0200 Message-ID: <20220422090602.21666-3-henning.schild@siemens.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220422090602.21666-1-henning.schild@siemens.com> References: <20220422090602.21666-1-henning.schild@siemens.com> MIME-Version: 1.0 X-Originating-IP: [167.87.32.223] X-ClientProxiedBy: DEMCHDC89XA.ad011.siemens.net (139.25.226.103) To DEMCHDC8A0A.ad011.siemens.net (139.25.226.106) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6776340a-e814-449e-54b0-08da243f5b4b X-MS-TrafficTypeDiagnostic: DB8PR10MB3894:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: WHyiVTPUUDBMPnkxPFWYlzingr5SD7wzGQfuyR6fGnfBRx2FaKssTAhut8kuV7fzidvXGMUTEJNdLg9h6MrAeri8vf62Tbp3uZY2vuFi6Qg9JYbjgvk2/oHkqDhzwQC/59Qm6aZR4O+/8eRZ4pE3PuWS5POTBK5C39LjigWYJkHV8z/xBCD/ZR09/Fx8QYRg7V2fXDtvfxYID2ct1kJJvXhLTGm14yDhWx3E8KpzMr5YzwZypR/LTMb6HNi2x+nCfJh6jhIaMz3xgNhmkHaKIG6u7ZnvdnxybDkOHlAIzdUnOUI+IDtM9n0NQAOmgI13Ol83/OazqYeF/fs6Rcev5xuHT+PZqEmjmXfs2oUgIS2HN0NNHh1PHdHY/efFNWtreB9CSTfIbSIk+cuaJYUzRkKlkzQWg0npNbr9SascaJLVk+L2siK44H7M/+YpRQ/iNCnSBQJYxGwa7Qo+LTVq7pMznVvnHjrYpC6cpO3UIhlJEN8mg5Iiu710e5nrT/wSe74t65EMXvjhg8KL1h3rXG2eH1/9Z6wJyOaAKRVV+yAD0VUX/7WIWVXWYeStSsGh+YFmrrkYO78PkHB4JpxeFAq8VPxbGB2gWYVr/D4kStHb+0cnnQqColTEVagPop0j34e7j31c86Ow8FJz00kgPJpKlnUgQ3SA1PsVR69SSSxxuos3LiUjknHKPekVsJo7 X-Forefront-Antispam-Report: CIP:194.138.21.70; CTRY:DE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:hybrid.siemens.com; PTR:hybrid.siemens.com; CAT:NONE; SFS:(13230001)(4636009)(36840700001)(40470700004)(46966006)(70206006)(70586007)(83380400001)(82960400001)(2616005)(107886003)(8936002)(36860700001)(956004)(7596003)(356005)(7636003)(4326008)(54906003)(8676002)(86362001)(6916009)(2906002)(316002)(82310400005)(336012)(6666004)(47076005)(1076003)(5660300002)(508600001)(40460700003)(44832011)(186003)(36756003)(4744005)(16526019)(26005); DIR:OUT; SFP:1101; X-OriginatorOrg: siemens.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Apr 2022 09:06:15.8768 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6776340a-e814-449e-54b0-08da243f5b4b X-MS-Exchange-CrossTenant-Id: 38ae3bcd-9579-4fd4-adda-b42e1495d55a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=38ae3bcd-9579-4fd4-adda-b42e1495d55a; Ip=[194.138.21.70]; Helo=[hybrid.siemens.com] X-MS-Exchange-CrossTenant-AuthSource: DB5EUR01FT039.eop-EUR01.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR10MB3894 X-Original-Sender: henning.schild@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=selector2 header.b=NmBIb1NF; arc=pass (i=1 spf=pass spfdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of henning.schild@siemens.com designates 2a01:111:f400:7d00::609 as permitted sender) smtp.mailfrom=henning.schild@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, 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-getmail-retrieved-from-mailbox: INBOX Signed-off-by: Henning Schild --- meta-isar/scripts/lib/wic/canned-wks/common-isar.wks.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-isar/scripts/lib/wic/canned-wks/common-isar.wks.inc b/meta-isar/scripts/lib/wic/canned-wks/common-isar.wks.inc index a65e64675090..fe028b50e155 100644 --- a/meta-isar/scripts/lib/wic/canned-wks/common-isar.wks.inc +++ b/meta-isar/scripts/lib/wic/canned-wks/common-isar.wks.inc @@ -1,3 +1,3 @@ # This file is included into 3 canned wks files from this directory part /boot --source bootimg-pcbios-isar --ondisk sda --label boot --active --align 1024 -part / --source rootfs --ondisk sda --fstype=ext4 --mkfs-extraopts "-T default" --label platform --align 1024 --exclude-path=boot +part / --source rootfs --use-uuid --fstype=ext4 --label platform --align 1024 --exclude-path=boot --mkfs-extraopts "-T default" From patchwork Fri Apr 22 01:06:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Henning Schild X-Patchwork-Id: 1710 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3) with LMTPA; Fri, 22 Apr 2022 11:06:39 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-wr1-f63.google.com (mail-wr1-f63.google.com [209.85.221.63]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8) with ESMTPS id 23M96bi6011707 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 22 Apr 2022 11:06:38 +0200 Received: by mail-wr1-f63.google.com with SMTP id x4-20020adfbb44000000b0020ac8fd27b6sf289448wrg.10 for ; Fri, 22 Apr 2022 02:06:38 -0700 (PDT) ARC-Seal: i=3; a=rsa-sha256; t=1650618392; cv=pass; d=google.com; s=arc-20160816; b=idW/qDVFJgZfL4C/NZx2QHZoIxRm0YkuX5zm79brTbBx034AZ3nM8LUMFUBENjVOrh 7c/B7fX2Nt39vcFn6szXWrIDCX0XG5rGqmijyIxNdfdDUI/yA3EzypCSiB9q4YxFQLxl D27RsT4IGIur98dOw39FF0o+rBiib+QAG0l2GC0kWoChx6lMzwux0Pk/AD14yjUXedO7 Xyb0/V3gAtDvGXpAQPSJ92HMKwqZEhBhcPAU+uYTMEbxe7WodvTcpDBUlQ8YWREAyfAn Vcfdz5ifpIJN03GRFySkn2IwHycWeaajENXR7lJ1mw/ctJriAjIIjQYESoqagtWKiiSv xJ2g== ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=bvWVSrxD2qrnCFBE5eNvrmWwRr2VOqXVZxlVe/3nsus=; b=cf13zSM79VCoCxKJcwUqYsC1RfKeJXzTzujV02tx8VEELBX4iTh+kIBXxNv219NziH jFqEUipTKfG0DEycsknBcMHRMAtLCuQq6xQlJsPDZ8y587SJtfjWPSh8sMvaLlkOo3SH XCKdHfaL/34YCeEFq79ak7Fi5AvetxPeZNq7aQNDPEjn5q9ePWfj4ZOarXgmBm0OTLFh sGi5XwCvS/0qJPXWKUIIqntMu/Wb6iOB/xJmQiICKyVB+0nE2rCzf8zNf/8tb6f7Kffi D/G2f4Aa2gdrkN+WbfdEuobim9IqpQWgSu7lojSrhjPsL4CynTzRttd5hWpjhFK1Jh6E 1Duw== ARC-Authentication-Results: i=3; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=selector2 header.b=CxC2H4dr; arc=pass (i=1 spf=pass spfdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of henning.schild@siemens.com designates 2a01:111:f400:fe02::61c as permitted sender) smtp.mailfrom=henning.schild@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=bvWVSrxD2qrnCFBE5eNvrmWwRr2VOqXVZxlVe/3nsus=; b=a/h/eFjnV75z6ToTgzhpzqJ2ZTY+2OLDcFRiJxrKE/LqhCKR6scN2a01ghnU4JCDQq X7g6WOZ5yJE0fqV4wy2/W7Z/NxjvTmUAuI8Ks4TnnlivkjtfLInSZdthOW7vgqUMoGPG c9JI08Z5HVmyjGK5m8gUSm9cbtR+1zGrs7U6sNXcWq6aixD44fBrAwr/k0KrLUOynCVV xgF5Iv0zYX3926yXoSjaeoJkEnh0MaWHV5aIEHAfenEZuyFYV/NXrTPR9hctqbKKkoZi bUGhlah0mKeChDeuUFxlfeB+bliph2wYCyYtPxIPfKhPOGhWG9FvKyOPB+Tm+R1AT8xc 1C0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=bvWVSrxD2qrnCFBE5eNvrmWwRr2VOqXVZxlVe/3nsus=; b=RVKzgQWoR5vVgSNbof53VK2vyHeyCXX0l3Ok1OIvoo+fpm5ckTMR8Cy8pg/JmYKYpp 6NneL60+ZFL/hcuD4WVpdoY6vGiMGL22VIoGjz8uujTpJD/ZSb5MtGu0TF/ukxA+MPby 00SZi8gGPb4+qcYmmEwjaKBAy8KQOKpsDWkx1WDD/KTxyPGmJKom8Ae3G1dOhqD7/FGP SXzpZ7XoymDAoHR0d23wdhzmvXyh9zMRF9i5OJ/3358/fXzAzIQlPrvfvgeSme+Jti0b JrbQ+kQqZUPLHQj3jjtL2V9US5Cl0ixjfi9q+QJap078EBylJBcmW7tdJSOAzvzR5zJ/ jJnA== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM530iHVQt140/bEeJVK2As5D3mtRzJvCilAPBE2pvxr/tiIc0UwGP nYQfdi3cOboW16Tl/bc6jM8= X-Google-Smtp-Source: ABdhPJwibOOLIdR1/ij0NzB49gBtDIfjaGUJeIdzaOiYm+lQb2f81oqBNnPjZYhc1gWxH8hNgZN7eA== X-Received: by 2002:a5d:6d0f:0:b0:20a:897d:ad95 with SMTP id e15-20020a5d6d0f000000b0020a897dad95mr3043686wrq.113.1650618392581; Fri, 22 Apr 2022 02:06:32 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6000:1d8c:b0:207:aa22:e989 with SMTP id bk12-20020a0560001d8c00b00207aa22e989ls430611wrb.1.gmail; Fri, 22 Apr 2022 02:06:31 -0700 (PDT) X-Received: by 2002:a5d:514e:0:b0:207:ac9c:878b with SMTP id u14-20020a5d514e000000b00207ac9c878bmr2861639wrt.252.1650618391628; Fri, 22 Apr 2022 02:06:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1650618391; cv=pass; d=google.com; s=arc-20160816; b=p/0cwsgxjNbBmg35nbZLtR+3nZyzKE3l2V4txN/W/DAgN2espuoeSwU4cBMGyzo5Gp Yn6497ehIyaIGNdIPKGtmNpLQNYiT0QLjdzj0j4GfRbvF/RLK65HscJVk+CZsrqZWOry 1/NhAFNcUMuCIAD8tfXhBcbxDFMBVwuFHvvepQoDSVNuJEwkEZmiUGgRtF8wbvR16B71 JagwqD3HfzgqHRdHU4YPHDGSf2GIfnoI95LaaIIA3SHaMgWGyHqE9DRqCTyYF5nLkI+a iIUY6S3HOpTFpuny8pF3slSZVqm5IIL1Rb2TnmH1RopEHobM0Yb9QeVCuCZRPaRZ57CO Ubgw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=l8bHYJbZKVCR0mWwQ+duqXG18R02Me2hCU5vPaZr/ZQ=; b=Mi/wX/aB7as1vTz7kYdCEkf+6OnUXttiqHlYPs4BBGtUUexLKwQkDLc3KuuPzC64CS vC0HNz5RhtqjDre3TTQPKC77MoZwg9/PW/ws7Re0PPp8O+7xYrch0PJt4ixnhjT0v+DE ulEvFdsmFfZ6EB/Zr9NM9Lh+7lMfoYyNj3AEZyx0/UTSdOkYG/x8gtN7JvPmM5hk80c6 XGVcGzjflapMIB5patuc+/+0AdlaDIILxtZq5FQldJFSrFe6t5Tezp9OEiKklMMwYAvV 16gwTo502rc4vlBk1Rc0XdqypW1HBS2rY4qF8t3//R3/rNYg0jR24IGZt8e1JmpOEvOo UY0A== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=selector2 header.b=CxC2H4dr; arc=pass (i=1 spf=pass spfdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of henning.schild@siemens.com designates 2a01:111:f400:fe02::61c as permitted sender) smtp.mailfrom=henning.schild@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on061c.outbound.protection.outlook.com. [2a01:111:f400:fe02::61c]) by gmr-mx.google.com with ESMTPS id l20-20020a05600c1d1400b0038ed7affcc5si334419wms.0.2022.04.22.02.06.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Apr 2022 02:06:31 -0700 (PDT) Received-SPF: pass (google.com: domain of henning.schild@siemens.com designates 2a01:111:f400:fe02::61c as permitted sender) client-ip=2a01:111:f400:fe02::61c; ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lfbkoZUW9AfosUCoSnCEp0VwbnlD9/bZ/zXWcms23brBq2qRw24iOPwNfCoY1pe2g/wzA+DJs558vFQCa2x2o4/drXPUODeZGK7AYIV9VMEj4d+fgn9TM917u+KTWnYN/FVk3sw7u+oT52ea64wWNB6jWGJ165dFHLlZq9Cm6zv0Uas+EILAJrxzmC12n8wMVP4ahD/f+1TpNoZNDuDmD7kNnt2DUhgJiWhTh8phhO5xS6SsyMUjl4NBJrqYym7/pp1YpaD1EOFhK9+NphFuBwEy/x9Gzhkh5LbYr/lEuvmpAl4D42sOiNUaMpcxm/5gZPFA6YX0BQcnCYZblWh2Xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=l8bHYJbZKVCR0mWwQ+duqXG18R02Me2hCU5vPaZr/ZQ=; b=HIgxDEMarnVky0G1/AEo99HFTs21OlA4qcGCx4DIzGDPJ9fWicGWLsQ2C0atwwxHaamhVNDViNGOCESwBNPKxzT2YBxC4CXFJivMpdCKMLoebfNS3OEZNx2uVmo1Oesaph8wRpVjKOydqGNCUtfxKUbEmtcs4gr4aLePOBmDDcN+T7YMMRibeXS2K7AWAKQM/2VHKJNYpA+KQG7bEf+EEG8x/M4gGa5xUOJ0/NfN+UIiDFwW8LmEVMu/V68YGuYCU5kNmwdawLNM/kckW9yIYzSnEh71d/eLuUnG5fgVmiF+KcEhBWkTPyiTBrOlShmP4X8jgNTlrM7Fmns6zFZP/Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 194.138.21.71) smtp.rcpttodomain=googlegroups.com smtp.mailfrom=siemens.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=siemens.com; dkim=none (message not signed); arc=none Received: from OL1P279CA0026.NORP279.PROD.OUTLOOK.COM (2603:10a6:e10:13::13) by VI1PR10MB2701.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:803:e4::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.14; Fri, 22 Apr 2022 09:06:29 +0000 Received: from HE1EUR01FT039.eop-EUR01.prod.protection.outlook.com (2603:10a6:e10:13:cafe::bc) by OL1P279CA0026.outlook.office365.com (2603:10a6:e10:13::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.14 via Frontend Transport; Fri, 22 Apr 2022 09:06:29 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 194.138.21.71) smtp.mailfrom=siemens.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=siemens.com; Received-SPF: Pass (protection.outlook.com: domain of siemens.com designates 194.138.21.71 as permitted sender) receiver=protection.outlook.com; client-ip=194.138.21.71; helo=hybrid.siemens.com; Received: from hybrid.siemens.com (194.138.21.71) by HE1EUR01FT039.mail.protection.outlook.com (10.152.0.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5186.14 via Frontend Transport; Fri, 22 Apr 2022 09:06:28 +0000 Received: from DEMCHDC89XA.ad011.siemens.net (139.25.226.103) by DEMCHDC9SKA.ad011.siemens.net (194.138.21.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Fri, 22 Apr 2022 11:06:28 +0200 Received: from localhost.localdomain (167.87.32.223) by DEMCHDC89XA.ad011.siemens.net (139.25.226.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Fri, 22 Apr 2022 11:06:27 +0200 From: Henning Schild To: isar-users CC: Florian Bezdeka , Felix Moessbauer , Henning Schild Subject: [PATCH v3 3/3] wic: Update to the latest revision Date: Fri, 22 Apr 2022 11:06:02 +0200 Message-ID: <20220422090602.21666-4-henning.schild@siemens.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220422090602.21666-1-henning.schild@siemens.com> References: <20220422090602.21666-1-henning.schild@siemens.com> MIME-Version: 1.0 X-Originating-IP: [167.87.32.223] X-ClientProxiedBy: DEMCHDC8A0A.ad011.siemens.net (139.25.226.106) To DEMCHDC89XA.ad011.siemens.net (139.25.226.103) X-TM-AS-Product-Ver: SMEX-14.0.0.3080-8.6.1018-26680.007 X-TM-AS-Result: No-10--19.402100-8.000000 X-TMASE-MatchedRID: 1bqTB6DINGwxQoi9/6SsEOR2wTyDK+hOr2UyNwpTWtQD2WXLXdz+AUi8 rgutezVpt5bYHTs7Q/A+msbci1PK/7xa/Llo3F1JVNzhnQBnMrolIDLYIzxNsbNE9DxPih7l6qG 5M9QNAO3/SxGp1my2djSbetwwGHidnxrGmxC9IkwsajutCYsq0+kfPO9/GUD1bWsCUkrA4EmUct Rw0zzl2qxYwOgmTdZNc9rDOIgOR4MYtJKm+g1AYmLefidyCJTePpiGIbEbcbr/Te3t5cJMG4Isz Sp8a7FyyJyq8H6JxQtpGe7B2ogoe236OCJd4LUnfzTIT43EIZHSIgvB03GEkpN65fjGjYMQF4r8 H5YrEqzVjNsehGf0vRnnwgnhLPPgicv0w1I+NekgdMcw7rJi9AQzzdNT/YKECL8RFER/j9PoeKA MszIu5kekR3VSvOYVlAGLLXlMxLLNcK6QcbDKfUKrG0/aLDqrJnckDi37jO7bTbThIInD+ky2Qe lP2Gj6xuio8Dr7zyS3PHL1WfR90jeE2Ubp26Qvdf+lE2YTgm4fOkhin3u41u9VsdrlGzy3WRYtB XVuRSW6pZ/o2Hu2YZ2ZVnBunOh+0VJXjGqtaWrTdBk0FPP/O743GvbpHo/VxVQFfLw4zf9rakIC cm9AUeWTwJYZ5m89olw1EpjN+eRc89L5Use7WBdbug1FfrKlsdoCspOmzJYzn/LxI9LW3f6lpfp te41hLiZLllxuDKS/PA740bxeAOBQXcxANx2HMMCvVPyDeE++oN4OftRf3nn1bPylbIYyS/jUVc 3i41mVDBAppAT/pWN3vsqnLZk03qQUi7o6ngybKItl61J/yUGDDkbg1gJk32mPO5tnasfCttcwY NipX4VH0dq7wY7up8Odl1VwpCSUTGVAhB5EbQ== X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--19.402100-8.000000 X-TMASE-Version: SMEX-14.0.0.3080-8.6.1018-26680.007 X-TM-SNTS-SMTP: 901405B59ABC6D666C8B86DA28CA42FB4468BD44DCA7E2039914C71AA67FB8CA2000:8 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2f5260cd-28e3-4194-56f2-08da243f630c X-MS-TrafficTypeDiagnostic: VI1PR10MB2701:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Hjybsmos7Gt4FVTJG6o25EO+2hO+5I9NrOZmMdSNq/zvILTCMaLv/GJK9Zg/BWDMptBijFHsaoHazoDffm7oxhOzVmcUMY6QnYbyhG2WonuLougSbVdpvs/ThUkOPFPNTESA1DdBELBwJBphaHiIFYKth7jjFUz327W1ZkgYHdoq7J4l8zd3X22ZwQ2t1EGgBuhrq9ekRlju5rnoQKbcFmhgGA9plFHsEtRETQkL8jbfRouUZbYtTMqkMRmXfItfaF8KqzCPBWX6j4XLJ27AT3RBhtrjTasovkq60mriorW3ozXy0Q9AZmM9RZqDbciNa/zWAuRDekTFkSBpz61GMiZyAfPlO0tl5TnZ6PH90Ulb83YK4/eAgm6xFkEMSOnA3QQO38xPsZSn2wod4Cj5G6XYF9xKeZh+NCNivElWI7DOE47ZoVApeS8xRZX0ED6qc0edZfB9Bpd+OhBbECzmpmjy5kx5cRYxBgdBUOiG8JZViMwds8UdYpFIZnFeD+X5gy2c32v0Y732kmYogoS75mknNPQNMp8FEZHboEH/2VTQpENoAd+CD2oPfnv4Jh3hbq6JZ00igKfY/niTKxZvpWiN1qGCiOx435V+9ZioanDGLnGdJHIMS50B9e73RcB7NqAQ93XMCnQ4mueVdFWL+Zjoba2CLUDiZcFL8RE5vLkccS+j7dxqkLkAnJQoRzSqMm9JwFP9iIeKc2phrxbM5wT+82RBzqsa6pC5eQeXLLNn22etDcj/KITOWTfyH6kzrw1xw2xdrAeZDuSLnvxeFuefyab5xxSx11OBPsDZSdo= X-Forefront-Antispam-Report: CIP:194.138.21.71; CTRY:DE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:hybrid.siemens.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230001)(4636009)(36840700001)(40470700004)(46966006)(16526019)(8936002)(82960400001)(966005)(36756003)(44832011)(508600001)(4326008)(6666004)(5660300002)(30864003)(70586007)(70206006)(8676002)(82310400005)(6916009)(26005)(54906003)(2616005)(186003)(81166007)(15650500001)(36860700001)(2906002)(356005)(956004)(86362001)(40460700003)(83380400001)(107886003)(1076003)(336012)(47076005)(316002)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: siemens.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Apr 2022 09:06:28.8857 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2f5260cd-28e3-4194-56f2-08da243f630c X-MS-Exchange-CrossTenant-Id: 38ae3bcd-9579-4fd4-adda-b42e1495d55a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=38ae3bcd-9579-4fd4-adda-b42e1495d55a; Ip=[194.138.21.71]; Helo=[hybrid.siemens.com] X-MS-Exchange-CrossTenant-AuthSource: HE1EUR01FT039.eop-EUR01.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR10MB2701 X-Original-Sender: henning.schild@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=selector2 header.b=CxC2H4dr; arc=pass (i=1 spf=pass spfdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of henning.schild@siemens.com designates 2a01:111:f400:fe02::61c as permitted sender) smtp.mailfrom=henning.schild@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_MED, DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, 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-getmail-retrieved-from-mailbox: INBOX Update to the latest wic from OE-core. OE-core Revision: 712552b5cc427d7be1258c45886de9b57f7272c9 Signed-off-by: Henning Schild --- .../wic/plugins/source/bootimg-efi-isar.py | 77 ++++++++++++++++--- .../wic/plugins/source/bootimg-pcbios-isar.py | 6 +- scripts/lib/wic/canned-wks/common.wks.inc | 2 +- scripts/lib/wic/canned-wks/directdisk-gpt.wks | 2 +- scripts/lib/wic/canned-wks/mkefidisk.wks | 2 +- scripts/lib/wic/engine.py | 6 +- scripts/lib/wic/help.py | 10 ++- scripts/lib/wic/ksparser.py | 8 +- scripts/lib/wic/misc.py | 4 +- scripts/lib/wic/partition.py | 25 ++++-- scripts/lib/wic/pluginbase.py | 8 +- scripts/lib/wic/plugins/imager/direct.py | 11 ++- scripts/lib/wic/plugins/source/bootimg-efi.py | 74 +++++++++++++++--- .../lib/wic/plugins/source/bootimg-pcbios.py | 6 +- scripts/lib/wic/plugins/source/rawcopy.py | 35 ++++++++- scripts/lib/wic/plugins/source/rootfs.py | 2 +- scripts/wic | 9 ++- 17 files changed, 231 insertions(+), 56 deletions(-) diff --git a/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py b/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py index 5ba0777ad244..a24e04f309da 100644 --- a/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py +++ b/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py @@ -12,6 +12,7 @@ import logging import os +import tempfile import shutil import re @@ -129,12 +130,13 @@ class BootimgEFIPlugin(SourcePlugin): bootloader = creator.ks.bootloader loader_conf = "" - loader_conf += "default boot\n" + if source_params.get('create-unified-kernel-image') != "true": + loader_conf += "default boot\n" loader_conf += "timeout %d\n" % bootloader.timeout initrd = source_params.get('initrd') - if initrd: + if initrd and source_params.get('create-unified-kernel-image') != "true": # obviously we need to have a common common deploy var bootimg_dir = get_bitbake_var("DEPLOY_DIR_IMAGE") if not bootimg_dir: @@ -195,11 +197,12 @@ class BootimgEFIPlugin(SourcePlugin): for rd in initrds: boot_conf += "initrd /%s\n" % rd - logger.debug("Writing systemd-boot config " - "%s/hdd/boot/loader/entries/boot.conf", cr_workdir) - cfg = open("%s/hdd/boot/loader/entries/boot.conf" % cr_workdir, "w") - cfg.write(boot_conf) - cfg.close() + if source_params.get('create-unified-kernel-image') != "true": + logger.debug("Writing systemd-boot config " + "%s/hdd/boot/loader/entries/boot.conf", cr_workdir) + cfg = open("%s/hdd/boot/loader/entries/boot.conf" % cr_workdir, "w") + cfg.write(boot_conf) + cfg.close() @classmethod @@ -300,11 +303,63 @@ class BootimgEFIPlugin(SourcePlugin): kernel = "%s-%s.bin" % \ (get_bitbake_var("KERNEL_IMAGETYPE"), get_bitbake_var("INITRAMFS_LINK_NAME")) - install_cmd = "install -m 0644 %s/%s %s/%s" % \ - (staging_kernel_dir, kernel, hdddir, kernel) + if source_params.get('create-unified-kernel-image') == "true": + initrd = source_params.get('initrd') + if not initrd: + raise WicError("initrd= must be specified when create-unified-kernel-image=true, exiting") + + deploy_dir = get_bitbake_var("DEPLOY_DIR_IMAGE") + efi_stub = glob("%s/%s" % (deploy_dir, "linux*.efi.stub")) + if len(efi_stub) == 0: + raise WicError("Unified Kernel Image EFI stub not found, exiting") + efi_stub = efi_stub[0] + + with tempfile.TemporaryDirectory() as tmp_dir: + label = source_params.get('label') + label_conf = "root=%s" % creator.rootdev + if label: + label_conf = "LABEL=%s" % label + + bootloader = creator.ks.bootloader + cmdline = open("%s/cmdline" % tmp_dir, "w") + cmdline.write("%s %s" % (label_conf, bootloader.append)) + cmdline.close() + + initrds = initrd.split(';') + initrd = open("%s/initrd" % tmp_dir, "wb") + for f in initrds: + with open("%s/%s" % (deploy_dir, f), 'rb') as in_file: + shutil.copyfileobj(in_file, initrd) + initrd.close() + + # Searched by systemd-boot: + # https://systemd.io/BOOT_LOADER_SPECIFICATION/#type-2-efi-unified-kernel-images + install_cmd = "install -d %s/EFI/Linux" % hdddir + exec_cmd(install_cmd) + + staging_dir_host = get_bitbake_var("STAGING_DIR_HOST") + + # https://www.freedesktop.org/software/systemd/man/systemd-stub.html + objcopy_cmd = "objcopy \ + --add-section .osrel=%s --change-section-vma .osrel=0x20000 \ + --add-section .cmdline=%s --change-section-vma .cmdline=0x30000 \ + --add-section .linux=%s --change-section-vma .linux=0x2000000 \ + --add-section .initrd=%s --change-section-vma .initrd=0x3000000 \ + %s %s" % \ + ("%s/usr/lib/os-release" % staging_dir_host, + cmdline.name, + "%s/%s" % (staging_kernel_dir, kernel), + initrd.name, + efi_stub, + "%s/EFI/Linux/linux.efi" % hdddir) + exec_cmd(objcopy_cmd) + else: + install_cmd = "install -m 0644 %s/%s %s/%s" % \ + (staging_kernel_dir, kernel, hdddir, kernel) + + install_cmd = isar_populate_boot_cmd(rootfs_dir['ROOTFS_DIR'], hdddir) + exec_cmd(install_cmd) - install_cmd = isar_populate_boot_cmd(rootfs_dir['ROOTFS_DIR'], hdddir) - exec_cmd(install_cmd) if get_bitbake_var("IMAGE_EFI_BOOT_FILES"): for src_path, dst_path in cls.install_task: diff --git a/meta/scripts/lib/wic/plugins/source/bootimg-pcbios-isar.py b/meta/scripts/lib/wic/plugins/source/bootimg-pcbios-isar.py index 9136d4f215ca..7fb0f2a87394 100644 --- a/meta/scripts/lib/wic/plugins/source/bootimg-pcbios-isar.py +++ b/meta/scripts/lib/wic/plugins/source/bootimg-pcbios-isar.py @@ -213,8 +213,10 @@ class BootimgPcbiosIsarPlugin(SourcePlugin): # dosfs image, created by mkdosfs bootimg = "%s/boot%s.img" % (cr_workdir, part.lineno) - dosfs_cmd = "mkdosfs -n boot -i %s -S 512 -C %s %d" % \ - (part.fsuuid, bootimg, blocks) + label = part.label if part.label else "boot" + + dosfs_cmd = "mkdosfs -n %s -i %s -S 512 -C %s %d" % \ + (label, part.fsuuid, bootimg, blocks) exec_native_cmd(dosfs_cmd, native_sysroot) mcopy_cmd = "mcopy -i %s -s %s/* ::/" % (bootimg, hdddir) diff --git a/scripts/lib/wic/canned-wks/common.wks.inc b/scripts/lib/wic/canned-wks/common.wks.inc index 4fd29fa8c119..89880b417b6e 100644 --- a/scripts/lib/wic/canned-wks/common.wks.inc +++ b/scripts/lib/wic/canned-wks/common.wks.inc @@ -1,3 +1,3 @@ # This file is included into 3 canned wks files from this directory part /boot --source bootimg-pcbios --ondisk sda --label boot --active --align 1024 -part / --source rootfs --use-uuid --fstype=ext4 --mkfs-extraopts "-T default" --label platform --align 1024 +part / --source rootfs --use-uuid --fstype=ext4 --label platform --align 1024 diff --git a/scripts/lib/wic/canned-wks/directdisk-gpt.wks b/scripts/lib/wic/canned-wks/directdisk-gpt.wks index cf16c0c30bbd..8d7d8de6ea7e 100644 --- a/scripts/lib/wic/canned-wks/directdisk-gpt.wks +++ b/scripts/lib/wic/canned-wks/directdisk-gpt.wks @@ -4,7 +4,7 @@ part /boot --source bootimg-pcbios --ondisk sda --label boot --active --align 1024 -part / --source rootfs --ondisk sda --fstype=ext4 --mkfs-extraopts "-T default" --label platform --align 1024 --use-uuid +part / --source rootfs --ondisk sda --fstype=ext4 --label platform --align 1024 --use-uuid bootloader --ptable gpt --timeout=0 --append="rootwait rootfstype=ext4 video=vesafb vga=0x318 console=tty0 console=ttyS0,115200n8" diff --git a/scripts/lib/wic/canned-wks/mkefidisk.wks b/scripts/lib/wic/canned-wks/mkefidisk.wks index d1878e23e5a3..9f534fe18471 100644 --- a/scripts/lib/wic/canned-wks/mkefidisk.wks +++ b/scripts/lib/wic/canned-wks/mkefidisk.wks @@ -4,7 +4,7 @@ part /boot --source bootimg-efi --sourceparams="loader=grub-efi" --ondisk sda --label msdos --active --align 1024 -part / --source rootfs --ondisk sda --fstype=ext4 --mkfs-extraopts "-T default" --label platform --align 1024 --use-uuid +part / --source rootfs --ondisk sda --fstype=ext4 --label platform --align 1024 --use-uuid part swap --ondisk sda --size 44 --label swap1 --fstype=swap diff --git a/scripts/lib/wic/engine.py b/scripts/lib/wic/engine.py index 018815b96688..674ccfc24418 100644 --- a/scripts/lib/wic/engine.py +++ b/scripts/lib/wic/engine.py @@ -19,10 +19,10 @@ import os import tempfile import json import subprocess +import shutil import re from collections import namedtuple, OrderedDict -from distutils.spawn import find_executable from wic import WicError from wic.filemap import sparse_copy @@ -245,7 +245,7 @@ class Disk: for path in pathlist.split(':'): self.paths = "%s%s:%s" % (native_sysroot, path, self.paths) - self.parted = find_executable("parted", self.paths) + self.parted = shutil.which("parted", path=self.paths) if not self.parted: raise WicError("Can't find executable parted") @@ -283,7 +283,7 @@ class Disk: "resize2fs", "mkswap", "mkdosfs", "debugfs","blkid"): aname = "_%s" % name if aname not in self.__dict__: - setattr(self, aname, find_executable(name, self.paths)) + setattr(self, aname, shutil.which(name, path=self.paths)) if aname not in self.__dict__ or self.__dict__[aname] is None: raise WicError("Can't find executable '{}'".format(name)) return self.__dict__[aname] diff --git a/scripts/lib/wic/help.py b/scripts/lib/wic/help.py index bd3a2b97dfaf..4ff7470a6a79 100644 --- a/scripts/lib/wic/help.py +++ b/scripts/lib/wic/help.py @@ -637,7 +637,7 @@ DESCRIPTION oe-core: directdisk.bbclass and mkefidisk.sh. The difference between wic and those examples is that with wic the functionality of those scripts is implemented by a general-purpose partitioning - 'language' based on Redhat kickstart syntax). + 'language' based on Red Hat kickstart syntax). The initial motivation and design considerations that lead to the current tool are described exhaustively in Yocto Bug #3847 @@ -840,8 +840,8 @@ DESCRIPTION meanings. The commands are based on the Fedora kickstart documentation but with modifications to reflect wic capabilities. - http://fedoraproject.org/wiki/Anaconda/Kickstart#part_or_partition - http://fedoraproject.org/wiki/Anaconda/Kickstart#bootloader + https://pykickstart.readthedocs.io/en/latest/kickstart-docs.html#part-or-partition + https://pykickstart.readthedocs.io/en/latest/kickstart-docs.html#bootloader Commands @@ -930,6 +930,7 @@ DESCRIPTION ext4 btrfs squashfs + erofs swap --fsoptions: Specifies a free-form string of options to be @@ -990,6 +991,9 @@ DESCRIPTION multiple partitions and we want to keep the right permissions and usernames in all the partitions. + --no-fstab-update: This option is specific to wic. It does not update the + '/etc/fstab' stock file for the given partition. + --extra-space: This option is specific to wic. It adds extra space after the space filled by the content of the partition. The final size can go diff --git a/scripts/lib/wic/ksparser.py b/scripts/lib/wic/ksparser.py index 3eb669da39ca..0df9eb0d057d 100644 --- a/scripts/lib/wic/ksparser.py +++ b/scripts/lib/wic/ksparser.py @@ -157,7 +157,8 @@ class KickStart(): part.add_argument('--fsoptions', dest='fsopts') part.add_argument('--fstype', default='vfat', choices=('ext2', 'ext3', 'ext4', 'btrfs', - 'squashfs', 'vfat', 'msdos', 'swap')) + 'squashfs', 'vfat', 'msdos', 'erofs', + 'swap')) part.add_argument('--mkfs-extraopts', default='') part.add_argument('--label') part.add_argument('--use-label', action='store_true') @@ -184,6 +185,7 @@ class KickStart(): part.add_argument('--use-uuid', action='store_true') part.add_argument('--uuid') part.add_argument('--fsuuid') + part.add_argument('--no-fstab-update', action='store_true') bootloader = subparsers.add_parser('bootloader') bootloader.add_argument('--append') @@ -229,6 +231,10 @@ class KickStart(): err = "%s:%d: SquashFS does not support LABEL" \ % (confpath, lineno) raise KickStartError(err) + # erofs does not support filesystem labels + if parsed.fstype == 'erofs' and parsed.label: + err = "%s:%d: erofs does not support LABEL" % (confpath, lineno) + raise KickStartError(err) if parsed.fstype == 'msdos' or parsed.fstype == 'vfat': if parsed.fsuuid: if parsed.fsuuid.upper().startswith('0X'): diff --git a/scripts/lib/wic/misc.py b/scripts/lib/wic/misc.py index 57c042c503e6..3e118229960b 100644 --- a/scripts/lib/wic/misc.py +++ b/scripts/lib/wic/misc.py @@ -16,9 +16,9 @@ import logging import os import re import subprocess +import shutil from collections import defaultdict -from distutils import spawn from wic import WicError @@ -122,7 +122,7 @@ def find_executable(cmd, paths): if provided and "%s-native" % recipe in provided: return True - return spawn.find_executable(cmd, paths) + return shutil.which(cmd, path=paths) def exec_native_cmd(cmd_and_args, native_sysroot, pseudo=""): """ diff --git a/scripts/lib/wic/partition.py b/scripts/lib/wic/partition.py index 76d144d12d30..09e491dd494d 100644 --- a/scripts/lib/wic/partition.py +++ b/scripts/lib/wic/partition.py @@ -54,6 +54,7 @@ class Partition(): self.uuid = args.uuid self.fsuuid = args.fsuuid self.type = args.type + self.no_fstab_update = args.no_fstab_update self.updated_fstab_path = None self.has_fstab = False self.update_fstab_in_rootfs = False @@ -104,7 +105,7 @@ class Partition(): extra_blocks = self.extra_space rootfs_size = actual_rootfs_size + extra_blocks - rootfs_size *= self.overhead_factor + rootfs_size = int(rootfs_size * self.overhead_factor) logger.debug("Added %d extra blocks to %s to get to %d total blocks", extra_blocks, self.mountpoint, rootfs_size) @@ -141,9 +142,9 @@ class Partition(): native_sysroot) self.source_file = "%s/fs.%s" % (cr_workdir, self.fstype) else: - if self.fstype == 'squashfs': - raise WicError("It's not possible to create empty squashfs " - "partition '%s'" % (self.mountpoint)) + if self.fstype in ('squashfs', 'erofs'): + raise WicError("It's not possible to create empty %s " + "partition '%s'" % (self.fstype, self.mountpoint)) rootfs = "%s/fs_%s.%s.%s" % (cr_workdir, self.label, self.lineno, self.fstype) @@ -170,7 +171,7 @@ class Partition(): # Split sourceparams string of the form key1=val1[,key2=val2,...] # into a dict. Also accepts valueless keys i.e. without = splitted = self.sourceparams.split(',') - srcparams_dict = dict(par.split('=', 1) for par in splitted if par) + srcparams_dict = dict((par.split('=', 1) + [None])[:2] for par in splitted if par) plugin = PluginMgr.get_plugins('source')[self.source] plugin.do_configure_partition(self, srcparams_dict, creator, @@ -286,7 +287,7 @@ class Partition(): (self.fstype, extraopts, rootfs, label_str, self.fsuuid, rootfs_dir) exec_native_cmd(mkfs_cmd, native_sysroot, pseudo=pseudo) - if self.updated_fstab_path and self.has_fstab: + if self.updated_fstab_path and self.has_fstab and not self.no_fstab_update: debugfs_script_path = os.path.join(cr_workdir, "debugfs_script") with open(debugfs_script_path, "w") as f: f.write("cd etc\n") @@ -350,7 +351,7 @@ class Partition(): mcopy_cmd = "mcopy -i %s -s %s/* ::/" % (rootfs, rootfs_dir) exec_native_cmd(mcopy_cmd, native_sysroot) - if self.updated_fstab_path and self.has_fstab: + if self.updated_fstab_path and self.has_fstab and not self.no_fstab_update: mcopy_cmd = "mcopy -i %s %s ::/etc/fstab" % (rootfs, self.updated_fstab_path) exec_native_cmd(mcopy_cmd, native_sysroot) @@ -369,6 +370,16 @@ class Partition(): (rootfs_dir, rootfs, extraopts) exec_native_cmd(squashfs_cmd, native_sysroot, pseudo=pseudo) + def prepare_rootfs_erofs(self, rootfs, cr_workdir, oe_builddir, rootfs_dir, + native_sysroot, pseudo): + """ + Prepare content for a erofs rootfs partition. + """ + extraopts = self.mkfs_extraopts or '' + erofs_cmd = "mkfs.erofs %s -U %s %s %s" % \ + (extraopts, self.fsuuid, rootfs, rootfs_dir) + exec_native_cmd(erofs_cmd, native_sysroot, pseudo=pseudo) + def prepare_empty_partition_ext(self, rootfs, oe_builddir, native_sysroot): """ diff --git a/scripts/lib/wic/pluginbase.py b/scripts/lib/wic/pluginbase.py index d9b4e57747e7..b64568339b1b 100644 --- a/scripts/lib/wic/pluginbase.py +++ b/scripts/lib/wic/pluginbase.py @@ -9,9 +9,11 @@ __all__ = ['ImagerPlugin', 'SourcePlugin'] import os import logging +import types from collections import defaultdict -from importlib.machinery import SourceFileLoader +import importlib +import importlib.util from wic import WicError from wic.misc import get_bitbake_var @@ -54,7 +56,9 @@ class PluginMgr: mname = fname[:-3] mpath = os.path.join(ppath, fname) logger.debug("loading plugin module %s", mpath) - SourceFileLoader(mname, mpath).load_module() + spec = importlib.util.spec_from_file_location(mname, mpath) + module = importlib.util.module_from_spec(spec) + spec.loader.exec_module(module) return PLUGINS.get(ptype) diff --git a/scripts/lib/wic/plugins/imager/direct.py b/scripts/lib/wic/plugins/imager/direct.py index ea709e8c545d..35fff7c10242 100644 --- a/scripts/lib/wic/plugins/imager/direct.py +++ b/scripts/lib/wic/plugins/imager/direct.py @@ -77,7 +77,8 @@ class DirectPlugin(ImagerPlugin): image_path = self._full_path(self.workdir, self.parts[0].disk, "direct") self._image = PartitionedImage(image_path, self.ptable_format, - self.parts, self.native_sysroot) + self.parts, self.native_sysroot, + options.extra_space) def setup_workdir(self, workdir): if workdir: @@ -116,7 +117,7 @@ class DirectPlugin(ImagerPlugin): updated = False for part in self.parts: if not part.realnum or not part.mountpoint \ - or part.mountpoint == "/": + or part.mountpoint == "/" or not part.mountpoint.startswith('/'): continue if part.use_uuid: @@ -258,6 +259,8 @@ class DirectPlugin(ImagerPlugin): if part.mountpoint == "/": if part.uuid: return "PARTUUID=%s" % part.uuid + elif part.label: + return "PARTLABEL=%s" % part.label else: suffix = 'p' if part.disk.startswith('mmcblk') else '' return "/dev/%s%s%-d" % (part.disk, suffix, part.realnum) @@ -293,7 +296,7 @@ class PartitionedImage(): Partitioned image in a file. """ - def __init__(self, path, ptable_format, partitions, native_sysroot=None): + def __init__(self, path, ptable_format, partitions, native_sysroot=None, extra_space=0): self.path = path # Path to the image file self.numpart = 0 # Number of allocated partitions self.realpart = 0 # Number of partitions in the partition table @@ -314,6 +317,7 @@ class PartitionedImage(): self.sector_size = SECTOR_SIZE self.native_sysroot = native_sysroot num_real_partitions = len([p for p in self.partitions if not p.no_table]) + self.extra_space = extra_space # calculate the real partition number, accounting for partitions not # in the partition table and logical partitions @@ -483,6 +487,7 @@ class PartitionedImage(): self.min_size += GPT_OVERHEAD self.min_size *= self.sector_size + self.min_size += self.extra_space def _create_partition(self, device, parttype, fstype, start, size): """ Create a partition on an image described by the 'device' object. """ diff --git a/scripts/lib/wic/plugins/source/bootimg-efi.py b/scripts/lib/wic/plugins/source/bootimg-efi.py index cdc72543c200..0391aebdc840 100644 --- a/scripts/lib/wic/plugins/source/bootimg-efi.py +++ b/scripts/lib/wic/plugins/source/bootimg-efi.py @@ -12,6 +12,7 @@ import logging import os +import tempfile import shutil import re @@ -119,12 +120,13 @@ class BootimgEFIPlugin(SourcePlugin): bootloader = creator.ks.bootloader loader_conf = "" - loader_conf += "default boot\n" + if source_params.get('create-unified-kernel-image') != "true": + loader_conf += "default boot\n" loader_conf += "timeout %d\n" % bootloader.timeout initrd = source_params.get('initrd') - if initrd: + if initrd and source_params.get('create-unified-kernel-image') != "true": # obviously we need to have a common common deploy var bootimg_dir = get_bitbake_var("DEPLOY_DIR_IMAGE") if not bootimg_dir: @@ -183,11 +185,12 @@ class BootimgEFIPlugin(SourcePlugin): for rd in initrds: boot_conf += "initrd /%s\n" % rd - logger.debug("Writing systemd-boot config " - "%s/hdd/boot/loader/entries/boot.conf", cr_workdir) - cfg = open("%s/hdd/boot/loader/entries/boot.conf" % cr_workdir, "w") - cfg.write(boot_conf) - cfg.close() + if source_params.get('create-unified-kernel-image') != "true": + logger.debug("Writing systemd-boot config " + "%s/hdd/boot/loader/entries/boot.conf", cr_workdir) + cfg = open("%s/hdd/boot/loader/entries/boot.conf" % cr_workdir, "w") + cfg.write(boot_conf) + cfg.close() @classmethod @@ -288,9 +291,60 @@ class BootimgEFIPlugin(SourcePlugin): kernel = "%s-%s.bin" % \ (get_bitbake_var("KERNEL_IMAGETYPE"), get_bitbake_var("INITRAMFS_LINK_NAME")) - install_cmd = "install -m 0644 %s/%s %s/%s" % \ - (staging_kernel_dir, kernel, hdddir, kernel) - exec_cmd(install_cmd) + if source_params.get('create-unified-kernel-image') == "true": + initrd = source_params.get('initrd') + if not initrd: + raise WicError("initrd= must be specified when create-unified-kernel-image=true, exiting") + + deploy_dir = get_bitbake_var("DEPLOY_DIR_IMAGE") + efi_stub = glob("%s/%s" % (deploy_dir, "linux*.efi.stub")) + if len(efi_stub) == 0: + raise WicError("Unified Kernel Image EFI stub not found, exiting") + efi_stub = efi_stub[0] + + with tempfile.TemporaryDirectory() as tmp_dir: + label = source_params.get('label') + label_conf = "root=%s" % creator.rootdev + if label: + label_conf = "LABEL=%s" % label + + bootloader = creator.ks.bootloader + cmdline = open("%s/cmdline" % tmp_dir, "w") + cmdline.write("%s %s" % (label_conf, bootloader.append)) + cmdline.close() + + initrds = initrd.split(';') + initrd = open("%s/initrd" % tmp_dir, "wb") + for f in initrds: + with open("%s/%s" % (deploy_dir, f), 'rb') as in_file: + shutil.copyfileobj(in_file, initrd) + initrd.close() + + # Searched by systemd-boot: + # https://systemd.io/BOOT_LOADER_SPECIFICATION/#type-2-efi-unified-kernel-images + install_cmd = "install -d %s/EFI/Linux" % hdddir + exec_cmd(install_cmd) + + staging_dir_host = get_bitbake_var("STAGING_DIR_HOST") + + # https://www.freedesktop.org/software/systemd/man/systemd-stub.html + objcopy_cmd = "objcopy \ + --add-section .osrel=%s --change-section-vma .osrel=0x20000 \ + --add-section .cmdline=%s --change-section-vma .cmdline=0x30000 \ + --add-section .linux=%s --change-section-vma .linux=0x2000000 \ + --add-section .initrd=%s --change-section-vma .initrd=0x3000000 \ + %s %s" % \ + ("%s/usr/lib/os-release" % staging_dir_host, + cmdline.name, + "%s/%s" % (staging_kernel_dir, kernel), + initrd.name, + efi_stub, + "%s/EFI/Linux/linux.efi" % hdddir) + exec_cmd(objcopy_cmd) + else: + install_cmd = "install -m 0644 %s/%s %s/%s" % \ + (staging_kernel_dir, kernel, hdddir, kernel) + exec_cmd(install_cmd) if get_bitbake_var("IMAGE_EFI_BOOT_FILES"): for src_path, dst_path in cls.install_task: diff --git a/scripts/lib/wic/plugins/source/bootimg-pcbios.py b/scripts/lib/wic/plugins/source/bootimg-pcbios.py index f2639e700493..32e47f183146 100644 --- a/scripts/lib/wic/plugins/source/bootimg-pcbios.py +++ b/scripts/lib/wic/plugins/source/bootimg-pcbios.py @@ -186,8 +186,10 @@ class BootimgPcbiosPlugin(SourcePlugin): # dosfs image, created by mkdosfs bootimg = "%s/boot%s.img" % (cr_workdir, part.lineno) - dosfs_cmd = "mkdosfs -n boot -i %s -S 512 -C %s %d" % \ - (part.fsuuid, bootimg, blocks) + label = part.label if part.label else "boot" + + dosfs_cmd = "mkdosfs -n %s -i %s -S 512 -C %s %d" % \ + (label, part.fsuuid, bootimg, blocks) exec_native_cmd(dosfs_cmd, native_sysroot) mcopy_cmd = "mcopy -i %s -s %s/* ::/" % (bootimg, hdddir) diff --git a/scripts/lib/wic/plugins/source/rawcopy.py b/scripts/lib/wic/plugins/source/rawcopy.py index 3c4997d8ba5e..7c90cd3cf82b 100644 --- a/scripts/lib/wic/plugins/source/rawcopy.py +++ b/scripts/lib/wic/plugins/source/rawcopy.py @@ -4,6 +4,8 @@ import logging import os +import signal +import subprocess from wic import WicError from wic.pluginbase import SourcePlugin @@ -29,15 +31,34 @@ class RawCopyPlugin(SourcePlugin): cmd = 'btrfs filesystem label %s %s' % (dst, label) elif fstype == 'swap': cmd = 'mkswap -L %s %s' % (label, dst) - elif fstype == 'squashfs': - raise WicError("It's not possible to update a squashfs " - "filesystem label '%s'" % (label)) + elif fstype in ('squashfs', 'erofs'): + raise WicError("It's not possible to update a %s " + "filesystem label '%s'" % (fstype, label)) else: raise WicError("Cannot update filesystem label: " "Unknown fstype: '%s'" % (fstype)) exec_cmd(cmd) + @staticmethod + def do_image_uncompression(src, dst, workdir): + def subprocess_setup(): + # Python installs a SIGPIPE handler by default. This is usually not what + # non-Python subprocesses expect. + # SIGPIPE errors are known issues with gzip/bash + signal.signal(signal.SIGPIPE, signal.SIG_DFL) + + extension = os.path.splitext(src)[1] + decompressor = { + ".bz2": "bzip2", + ".gz": "gzip", + ".xz": "xz" + }.get(extension) + if not decompressor: + raise WicError("Not supported compressor filename extension: %s" % extension) + cmd = "%s -dc %s > %s" % (decompressor, src, dst) + subprocess.call(cmd, preexec_fn=subprocess_setup, shell=True, cwd=workdir) + @classmethod def do_prepare_partition(cls, part, source_params, cr, cr_workdir, oe_builddir, bootimg_dir, kernel_dir, @@ -56,7 +77,13 @@ class RawCopyPlugin(SourcePlugin): if 'file' not in source_params: raise WicError("No file specified") - src = os.path.join(kernel_dir, source_params['file']) + if 'unpack' in source_params: + img = os.path.join(kernel_dir, source_params['file']) + src = os.path.join(cr_workdir, os.path.splitext(source_params['file'])[0]) + RawCopyPlugin.do_image_uncompression(img, src, cr_workdir) + else: + src = os.path.join(kernel_dir, source_params['file']) + dst = os.path.join(cr_workdir, "%s.%s" % (os.path.basename(source_params['file']), part.lineno)) if not os.path.exists(os.path.dirname(dst)): diff --git a/scripts/lib/wic/plugins/source/rootfs.py b/scripts/lib/wic/plugins/source/rootfs.py index 96d940a91d61..2e34e715ca73 100644 --- a/scripts/lib/wic/plugins/source/rootfs.py +++ b/scripts/lib/wic/plugins/source/rootfs.py @@ -218,7 +218,7 @@ class RootfsPlugin(SourcePlugin): # Update part.has_fstab here as fstab may have been added or # removed by the above modifications. part.has_fstab = os.path.exists(os.path.join(new_rootfs, "etc/fstab")) - if part.update_fstab_in_rootfs and part.has_fstab: + if part.update_fstab_in_rootfs and part.has_fstab and not part.no_fstab_update: fstab_path = os.path.join(new_rootfs, "etc/fstab") # Assume that fstab should always be owned by root with fixed permissions install_cmd = "install -m 0644 %s %s" % (part.updated_fstab_path, fstab_path) diff --git a/scripts/wic b/scripts/wic index a741aed364bf..aee63a45aacf 100755 --- a/scripts/wic +++ b/scripts/wic @@ -22,9 +22,9 @@ import sys import argparse import logging import subprocess +import shutil from collections import namedtuple -from distutils import spawn # External modules scripts_path = os.path.dirname(os.path.realpath(__file__)) @@ -47,7 +47,7 @@ if os.environ.get('SDKTARGETSYSROOT'): break sdkroot = os.path.dirname(sdkroot) -bitbake_exe = spawn.find_executable('bitbake') +bitbake_exe = shutil.which('bitbake') if bitbake_exe: bitbake_path = scriptpath.add_bitbake_lib_path() import bb @@ -159,6 +159,9 @@ def wic_create_subcommand(options, usage_str): "(Use -e/--image-name to specify it)") native_sysroot = options.native_sysroot + if options.kernel_dir: + kernel_dir = options.kernel_dir + if not options.vars_dir and (not native_sysroot or not os.path.isdir(native_sysroot)): logger.info("Building wic-tools...\n") subprocess.check_call(["bitbake", "wic-tools"]) @@ -346,6 +349,8 @@ def wic_init_parser_create(subparser): default=False, help="output debug information") subparser.add_argument("-i", "--imager", dest="imager", default="direct", help="the wic imager plugin") + subparser.add_argument("--extra-space", type=int, dest="extra_space", + default=0, help="additional free disk space to add to the image") return