From patchwork Thu Sep 26 03:39:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "cedric.hombourger@siemens.com" X-Patchwork-Id: 3831 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Thu, 26 Sep 2024 05:43:53 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-qk1-f191.google.com (mail-qk1-f191.google.com [209.85.222.191]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 48Q3hh7f017078 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 26 Sep 2024 05:43:44 +0200 Received: by mail-qk1-f191.google.com with SMTP id af79cd13be357-7a9cc150294sf367485a.1 for ; Wed, 25 Sep 2024 20:43:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1727322217; cv=pass; d=google.com; s=arc-20240605; b=IOb/2VhMDoZDrkvMNnV8RoG5kIy+muBMcNiDAEVkomEI3q1xuwrNWT8OSakm8K74eY MKABfAljHVRr0YyH53l8X55/DhrFHwbxyyqzqC7Q3UffeIVh6M/nLte5FrhgeF1MMEm9 Twkb2s+u++WhgR56Gy90KLMjbf8FbnyJmlfxKfqNVJt7uA9pDtKutna8f1eM0FiAbltj KI2/GAXV7EDRNbzO8h5pAyl7j3Q+Kad1LpCuHefFWfiPsUOHYbwlbUux4uWHYcSrIt7h YxYocOm5muLoq+MVybxzKefHKpiz0Lfo5RyA94/LXpUO5Cl6BjNJShKyc8+5OV1Jftpp Qqow== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:feedback-id:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=tl9TKMQLhcnBEM/9Laeb+XKaYFbysUo9MBAwulhWw1k=; fh=E1obIYcDhnfCqQtEUAly3ORaYgnx8rR86Yk5Y/u2+YA=; b=MQe9k3PxjVJjJUz40ueGYLvGiFdA2oL4BIkU/Q4cHZOZh/mqtvLlznII12szDBPPbS Uje8kJW++jZgQE43mPS0fcAin/M6PLUkSduiERscvWWDNkHR4GWqmXGrr8z+bR/It/T6 B0vX/0x8CZgARr4+O5SEgSzQK6VUrVyqFrKXxD7cBh40K7eKXdlz9ir9AdhYoib0iMSE x+cSXfzzESktED2CrobtfhjAnyX4/rzZT+e557/LLdiAP6YNuRNW06DVx4znMoQW/Ybj scNWSmbYwSzi32SpBaFL1N4D9x+ePi7VHZkidSD86wUkq+vdj0914gSVrSo3iVLlTYyc Rxuw==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm2 header.b=opJser4D; spf=pass (google.com: domain of fm-1212295-202409260343358f05ab404e6db0c122-8wjpfe@rts-flowmailer.siemens.com designates 185.136.65.227 as permitted sender) smtp.mailfrom=fm-1212295-202409260343358f05ab404e6db0c122-8wjPfe@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1727322217; x=1727927017; darn=isar-build.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=tl9TKMQLhcnBEM/9Laeb+XKaYFbysUo9MBAwulhWw1k=; b=aMvJ3z6ksDMUbd273lLABz+jp4TgXX61tpm/yYrq5xk3UwZ2Zbc1cdjLcmGRLWZw5L TbAkcqamh6bV+Xwp1JXEtN6HLtdHFKWzawX+yxtWWAjPC+O5EgKKhYr+AUlzEdQhc9T/ QQBzOrTitZX5mlq8VePmDvoA/8GzuGekVxzRdVJLLlytxyYIfFb6vLBmrKHxFeXEZ5e2 6j5vyHPWj0hLWBk5d7Bx+dY1MKIUVBmWkjxckVw5Gv6/Ggb7BrvTknTfOCaJDuUI1cue dZu+eP+FrNMiadM54K1PVOdWRfKtpHmtYgareJKbIGiPgW71wHpavY7+C18szBES3zSt YbLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727322217; x=1727927017; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:x-beenthere:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=tl9TKMQLhcnBEM/9Laeb+XKaYFbysUo9MBAwulhWw1k=; b=IJSND0pJc6PjN0EHBtAoqKK+suwqIrsaOvUjXO4yc2oyXhXYV/O4K5vvGafJzN+wKE /6cWsQrGyXQpFsL+WVZyEDouMeL14O4y2nVJvymTm1Cd9p9k1aw3etC+8uKi4gmQ6/uV SmuXTPGtxp/jRJHvSswQdx/RNKvcd8o6Ff3Rt2yv4iBLNgwRIrbPkz9SckyIKLYrmJ/g 2nPTyJG4JTJh2k3Qi7jZetcx9ERKFoECDstgVv03hPs4/jsB34UvPdt7LtnexrXW57r0 8W84XaPLxAfu6pLhidibv9ARhaS4yMfvvrrQSvz3gZFCDIzVL7wIxt6+6LwVHulAmkE3 Jd8A== X-Forwarded-Encrypted: i=2; AJvYcCWcBqJj5wo+i68lIBl4dVOvqKYg4FLcASsdJD+O/4DybS/WbERgkmLirGir2k8upVvTD5Dk85Q=@isar-build.org X-Gm-Message-State: AOJu0YxlAHN3oSHhS3+a18h30GQDU+TXYPh5WfVj9T1WiMYxoPmskP5e sU73P47R4Uv0VdZpcz9f4HjVxNgtgG9TDpgxXs63h1ntWokid3+t X-Google-Smtp-Source: AGHT+IE+TivAegkf1QcUQc0eAMdopn8+qFaGxvDtlVewIOc2T8M18KKbHur8qS/11F8tvIqvUndU9g== X-Received: by 2002:a05:620a:460d:b0:7a8:491:2a04 with SMTP id af79cd13be357-7ace7157bf5mr354319885a.0.1727322217558; Wed, 25 Sep 2024 20:43:37 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:ac8:7d4a:0:b0:458:1588:173e with SMTP id d75a77b69052e-45c94adc664ls6984991cf.1.-pod-prod-03-us; Wed, 25 Sep 2024 20:43:36 -0700 (PDT) X-Received: by 2002:ac8:57ce:0:b0:455:b00:f02d with SMTP id d75a77b69052e-45b5e05004dmr67160371cf.49.1727322216418; Wed, 25 Sep 2024 20:43:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1727322216; cv=none; d=google.com; s=arc-20240605; b=S5eZXtwecogQ7aUDiajgQ6NHE3hwbLxp9z0s10mfSWLgzCj5NaV1B+0eRNxJNs2uIP No5DMcjoHyGhLiBFcrsTuilKgXwxLsdm3a/NOa9IF5sCm7SX30192BATOwk/ep9PspN1 wWGPye+i4B47UzcqhGcDdOeEV7JuNrJuLHtL52I6tYOVixKR2QGqJCBGQy2DsKhAGVPK IYlNbIJ2aI3id/hXTsgvSZShuJ/crkKshoQ99jV/v/9Qw0cXuIJ2R01J2/bAhIsXX42u 28mo7PMlmxpxGdb/qIHTsuBXfzmBf2vGR4TqtwiSMRqsHEH4eXn/6aNlqwSy4o86l40B EABw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=feedback-id:content-transfer-encoding:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=z3QSLXUOhyQ/MzBTez8rUgiw0BgSvp79tYAc4oqYBIU=; fh=1z37pEVhqwMLlkT4FDzOga7XBsM6Rzv6sXOq0pipxqo=; b=ApfSTdB9byPdiShhwGAXDfJZeUlE6fDbU82ZraqZXeCsbgy3eZ6a/IXHzAWeKjp2wl 1gek7UIyoJE9tH4KMyIuu/AF16Ec5gDJIy/Vok58gNfJt2OUZIyQV8lZaCXYkbTWuUdA FfKr36C2Q1GmD5utw6mI0ytOq3YPz+XXZTyvEYrpBNHuz8FV22tQAiXeErvHdl4Tm9ht r4RjhYMwEq46Ukxo5hsLVTFQuXp6cOGE+1I/l6zx5PZrA8LCz0OXDBqTcU4xVnqExkwQ xacrrHmJqXuUiwiLHZGSNC6yypH0aaowSBeQ3BLZ1t1BUE0SZ/8a1MB0PdPgJy3pnk4z G82w==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm2 header.b=opJser4D; spf=pass (google.com: domain of fm-1212295-202409260343358f05ab404e6db0c122-8wjpfe@rts-flowmailer.siemens.com designates 185.136.65.227 as permitted sender) smtp.mailfrom=fm-1212295-202409260343358f05ab404e6db0c122-8wjPfe@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from mta-65-227.siemens.flowmailer.net (mta-65-227.siemens.flowmailer.net. [185.136.65.227]) by gmr-mx.google.com with ESMTPS id d75a77b69052e-45b5274fc5csi2464971cf.3.2024.09.25.20.43.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Sep 2024 20:43:36 -0700 (PDT) Received-SPF: pass (google.com: domain of fm-1212295-202409260343358f05ab404e6db0c122-8wjpfe@rts-flowmailer.siemens.com designates 185.136.65.227 as permitted sender) client-ip=185.136.65.227; Received: by mta-65-227.siemens.flowmailer.net with ESMTPSA id 202409260343358f05ab404e6db0c122 for ; Thu, 26 Sep 2024 05:43:35 +0200 X-Patchwork-Original-From: "'Cedric Hombourger' via isar-users" From: "cedric.hombourger@siemens.com" To: isar-users@googlegroups.com Cc: Cedric Hombourger Subject: [PATCH v3 1/3] multiarch: introduce some helpers to later handle corner cases Date: Thu, 26 Sep 2024 05:39:33 +0200 Message-Id: <20240926033935.2955085-2-cedric.hombourger@siemens.com> In-Reply-To: <20240926033935.2955085-1-cedric.hombourger@siemens.com> References: <20240926033935.2955085-1-cedric.hombourger@siemens.com> MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-1212295:519-21489:flowmailer X-Original-Sender: cedric.hombourger@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm2 header.b=opJser4D; spf=pass (google.com: domain of fm-1212295-202409260343358f05ab404e6db0c122-8wjpfe@rts-flowmailer.siemens.com designates 185.136.65.227 as permitted sender) smtp.mailfrom=fm-1212295-202409260343358f05ab404e6db0c122-8wjPfe@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com X-Original-From: Cedric Hombourger Reply-To: Cedric Hombourger 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=-4.9 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,RCVD_IN_RP_CERTIFIED,RCVD_IN_RP_RNBL,RCVD_IN_RP_SAFE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= -native / -compat do not always apply and some corner cases were found. Introduce some helper functions to refactor the existing code without changing its semantics for now. Signed-off-by: Cedric Hombourger --- meta/classes/multiarch.bbclass | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/meta/classes/multiarch.bbclass b/meta/classes/multiarch.bbclass index bb0f7983..802686d5 100644 --- a/meta/classes/multiarch.bbclass +++ b/meta/classes/multiarch.bbclass @@ -5,25 +5,35 @@ inherit compat python() { + archDiffers = d.getVar('HOST_ARCH') != d.getVar('DISTRO_ARCH') + + def pn_multiarch_target(pn): + return pn.endswith('-native') or pn.endswith('-compat') + + def extend_provides(pn, provides, d): + if not pn_multiarch_target(pn): + all_provides = (d.getVar('PROVIDES') or '').split() + for p in all_provides: + if not pn_multiarch_target(p): + d.appendVar('PROVIDES', f' {p}-{provides}') + d.appendVar('PROVIDES', f' {pn}-{provides}') + # provide compat only when we can build it if isar_can_build_compat(d): d.appendVar('BBCLASSEXTEND', ' compat') # build native separately only when it differs from the target variant - if d.getVar('HOST_ARCH') == d.getVar('DISTRO_ARCH'): + if archDiffers is False: pn = d.getVar('PN') - if not pn.endswith('-native') and not pn.endswith('-compat'): - provides = (d.getVar('PROVIDES') or '').split() - for p in provides: - d.appendVar('PROVIDES', f' {p}-native') - d.appendVar('PROVIDES', f' {pn}-native') + if pn_multiarch_target(pn) is False: + extend_provides(pn, 'native', d) else: d.appendVar('BBCLASSEXTEND', ' native') # drop own -native build dependencies at recipe level if building natively # and not for the builder architecture depends = d.getVar('DEPENDS') - if depends is not None and d.getVar('HOST_ARCH') != d.getVar('DISTRO_ARCH') \ + if depends is not None and archDiffers \ and not bb.utils.to_boolean(d.getVar('ISAR_CROSS_COMPILE')): new_deps = [] for dep in depends.split(): From patchwork Thu Sep 26 03:39:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "cedric.hombourger@siemens.com" X-Patchwork-Id: 3832 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Thu, 26 Sep 2024 05:44:01 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-qv1-f64.google.com (mail-qv1-f64.google.com [209.85.219.64]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 48Q3his8017088 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 26 Sep 2024 05:43:45 +0200 Received: by mail-qv1-f64.google.com with SMTP id 6a1803df08f44-6c3516a3f7bsf1558376d6.1 for ; Wed, 25 Sep 2024 20:43:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1727322218; cv=pass; d=google.com; s=arc-20240605; b=ly2HuGSdlzC4t3vqJRaavpZowczYG4GaphMNayoC1nryz12j+QS9R8QZPbA28a8tFq e/Ci73jspD0IceIsr6/ZkD628Sreg7mxXMJGTMizP2XqTC8vhKLoFFNbEpT0egY7kMKC wmqGfmS2nPntFnEiqHkbU/JcC+Ud8OO8C//wvko2Q3pso8ZJqxmLSc8nMySwx+z/W8Lf X5Q+FctBFemt1Qm5v75+oIP5G7VYaYJN/E/l4ZWYx3D70mATqvkuyT0pVoeHOyEoPN+t dAgXHygM7PmVBn0yWy4S18lKtYWFW+iqxDh5897nHSAnCpKLqY1tEuZJrV2OO8cuCorC lcbg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:feedback-id:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=8AEFTbgcY2avGayLqrtyITacSf8O43cbGmaOpQC0y28=; fh=LLcYRIMIs/FDhjevUh80Xgt5tZxyDjL0eOlZnkOXK3M=; b=iUv331qDMUr6KCovD2BKPIvQ8gm/12tnyK381sEUov/QgAzt+0RJ0uzFKn/by5TjHj bHbbjEIeZXIjZnNr9bb22Eo2pr4bW/R5x9gAEFYTrg3Md2dznOPpkPBAbCuakJneutVI sCHWecp+DbaGGsQtYz5pT3QE4ZxQJFjeQOVCmw6cCZL3TycdGzT0TtxdkzFM77V8i/V5 7/7Y9olFZwa/nlRZxLV6KJHiKCL0a3rQsR3TZdSrDCQEdL+dobPH2TgIcE6Q5DQSZssO o6mZaSlFAoc9aYw/PJ77wxFHbLWZErV5KUlJqy627pba4wMfYUq29znydOzYC0/KWKp7 p8vw==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm2 header.b=gtSljolD; spf=pass (google.com: domain of fm-1212295-20240926034335b113a45c28c327f135-atcn8h@rts-flowmailer.siemens.com designates 185.136.65.226 as permitted sender) smtp.mailfrom=fm-1212295-20240926034335b113a45c28c327f135-atcn8H@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1727322218; x=1727927018; darn=isar-build.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=8AEFTbgcY2avGayLqrtyITacSf8O43cbGmaOpQC0y28=; b=MNF6bleojWgh29DzYL2R5bY3vZlkj73X05rzcmEtFpcJbYGbE1l3yXaf2A9Zw2shQy CzRhxoJ9fH1IxZD+39b0UGyw02jDh3v89gxzrjxsMrDGwSs1o0Q20YDlVIyNvMJzKp8+ vLNYuC5ypjHq/E3zgVflpLnz2PbeICk9iegSmjNN9tqBgI9fH7nU4u3UnR9vH1rupkd5 NSjKvbH1LImrAh5BMjBde+av1wn/866mZBjjHOC0Obi9UiVHCCESIgwo0xFoNKNjwijP FmlL7y9vHx5XYITqcG9QRfkMX27mBwUKIhgDiWp9M/IIOt/3O6qP/KEtYhE8o/0AzK0w yqrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727322218; x=1727927018; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:x-beenthere:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=8AEFTbgcY2avGayLqrtyITacSf8O43cbGmaOpQC0y28=; b=KYQyLdrFquS2WWzuW2wxjYUoE7MBOtSGoLMPxWO5Ck9I0Tc9NgFuJVeOgHFWgEpI2D 4b0NK/vzT6P3j4jcO2Y8SkbDHMObLrCakwXNYmcmnYuqVey0c5N7AEYTgLxjaGUmUwXR +coxFCmpmRl3ZZI4QCO9hKjkhDhzo17OyCEwJ+uZFtnQNrgLMLwNgGz8MIYnPxLhUZiK q6diIdzoqOHyHF6I+gciOEfMV4VYYNFjMsd1JxOP2ApRO32+GNNgFOgLnK+3OxRBwVw5 FnC0DUR3nLrWsMi2/MUPu6KyytblpSrfRhbEmUevHCiCDO1fVMqJ+NBMMku5ShqtbjLC 0+bw== X-Forwarded-Encrypted: i=2; AJvYcCWGrixFfC2Jeo/l+hmJBhho7s+ezMniyN+CbPktyJEemknJxFh76wkOqp4d7gtl/wa7D2kvsQc=@isar-build.org X-Gm-Message-State: AOJu0Yyu05hMxa7qzQ4MZ+485cOyeydALWb1OTICbyBkCbWKfvwiQ6QO uJZoH2c9t0oZXuu5Fbpqduq4aytDLJICK9/p2FNbsYgStfEijnOJ X-Google-Smtp-Source: AGHT+IEMLzWO10KWuHjCb6WtqvOHEojEoZa/alRzb6yWJrCvXeXLhhpw1/8j5kyKLRVIbN2iAY+hrg== X-Received: by 2002:a05:6214:40d:b0:6c3:5dbd:449c with SMTP id 6a1803df08f44-6cb1dd1bb22mr29576786d6.1.1727322217839; Wed, 25 Sep 2024 20:43:37 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6214:226a:b0:6c3:5462:e5d7 with SMTP id 6a1803df08f44-6cb2ed38302ls13777026d6.0.-pod-prod-00-us; Wed, 25 Sep 2024 20:43:37 -0700 (PDT) X-Received: by 2002:a05:6214:2aa9:b0:6bf:a3a6:e7ce with SMTP id 6a1803df08f44-6cb2f2e6ad8mr34726406d6.26.1727322217000; Wed, 25 Sep 2024 20:43:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1727322216; cv=none; d=google.com; s=arc-20240605; b=JgpVzrPoZly+M6gGzvPlEInjS207ZdnLaUMfxqCjLOYAnOTYbkDKKhDSLxfC8i9kbL bNs8CIMIeAvCVAxue+Fy5d5a0Dag1jz0z6ukFD1RqMk3y74HA8xuSHhdI5TKmBX+vH23 Xgs0dzqTUt3cjad1IGGFPElrCuNrTB70hO7ASV/fcN7BQNvkI1scJMaI9e1o3e6KGLhN ado7v3trFUhRhXR8stxIFdag3WwX6ZibdXTg5zpfhEzaSmO/AIMyjkFBM8frunC8PQ8G PvXIpYo6JcFrmLtoCxV4VO+540DAZO30/YDnDAy/xlgRmNtw7CpmTTZBW8msMrDtJ4H1 2AZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=feedback-id:content-transfer-encoding:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=4Mskw7FQg3mbz+rYSvlvPDnlN50y41OqVxuj/siB9ac=; fh=1z37pEVhqwMLlkT4FDzOga7XBsM6Rzv6sXOq0pipxqo=; b=dc3Dkh7lUAaPBVVrDpXNULlQA3j7TYbY0v7Kod1lnvHcg2lTIWV7dp84Yzc5NU9fwB Esy0X02pJKBN/Rg58VNv7VXsnA84P02OyqfQT+hJegm6NdNBao2bw/j9wssUoqmqZWmZ XSaywO/KdFt4I+UItla1QzbJbi9ldaQELgTEkCGzPLY6V3yy6hp/ooH5Y3HPRdsBrRr2 CORYeViPgOi4Bzz/6+Vgv1t65jhVTS3oinX/qIAUzcHXdWm3/De2Tsp2PiL+oCslZziz Qa7Dy2QbRkqe4GNNLf2GmCm9C680x0O+UkA0pUNpwyFOwpUBMagORz1eHC/X888s5wSa Mvlw==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm2 header.b=gtSljolD; spf=pass (google.com: domain of fm-1212295-20240926034335b113a45c28c327f135-atcn8h@rts-flowmailer.siemens.com designates 185.136.65.226 as permitted sender) smtp.mailfrom=fm-1212295-20240926034335b113a45c28c327f135-atcn8H@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from mta-65-226.siemens.flowmailer.net (mta-65-226.siemens.flowmailer.net. [185.136.65.226]) by gmr-mx.google.com with ESMTPS id 6a1803df08f44-6cb0f4be6b1si2143976d6.2.2024.09.25.20.43.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Sep 2024 20:43:36 -0700 (PDT) Received-SPF: pass (google.com: domain of fm-1212295-20240926034335b113a45c28c327f135-atcn8h@rts-flowmailer.siemens.com designates 185.136.65.226 as permitted sender) client-ip=185.136.65.226; Received: by mta-65-226.siemens.flowmailer.net with ESMTPSA id 20240926034335b113a45c28c327f135 for ; Thu, 26 Sep 2024 05:43:35 +0200 X-Patchwork-Original-From: "'Cedric Hombourger' via isar-users" From: "cedric.hombourger@siemens.com" To: isar-users@googlegroups.com Cc: Cedric Hombourger Subject: [PATCH v3 2/3] multiarch: avoid separate builds when DPKG_ARCH is all Date: Thu, 26 Sep 2024 05:39:34 +0200 Message-Id: <20240926033935.2955085-3-cedric.hombourger@siemens.com> In-Reply-To: <20240926033935.2955085-1-cedric.hombourger@siemens.com> References: <20240926033935.2955085-1-cedric.hombourger@siemens.com> MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-1212295:519-21489:flowmailer X-Original-Sender: cedric.hombourger@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm2 header.b=gtSljolD; spf=pass (google.com: domain of fm-1212295-20240926034335b113a45c28c327f135-atcn8h@rts-flowmailer.siemens.com designates 185.136.65.226 as permitted sender) smtp.mailfrom=fm-1212295-20240926034335b113a45c28c327f135-atcn8H@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com X-Original-From: Cedric Hombourger Reply-To: Cedric Hombourger 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=-4.9 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,RCVD_IN_RP_CERTIFIED,RCVD_IN_RP_RNBL,RCVD_IN_RP_SAFE, T_SPF_TEMPERROR 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: =?utf-8?q?INBOX?= Binary-independent packages (DPKG_ARCH == all) do not require separate builds for our special -compat and -native targets: extend PROVIDES for these cases. It should be noted that DPKG_ARCH is always set for all dpkg variants and defaults to "any" (only recipes setting DPKG_ARCH to "all" explicitly will be impacted). Signed-off-by: Cedric Hombourger --- meta/classes/multiarch.bbclass | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/meta/classes/multiarch.bbclass b/meta/classes/multiarch.bbclass index 802686d5..9df8eefd 100644 --- a/meta/classes/multiarch.bbclass +++ b/meta/classes/multiarch.bbclass @@ -5,7 +5,9 @@ inherit compat python() { + pn = d.getVar('PN') archDiffers = d.getVar('HOST_ARCH') != d.getVar('DISTRO_ARCH') + archIsAll = d.getVar('DPKG_ARCH') == 'all' def pn_multiarch_target(pn): return pn.endswith('-native') or pn.endswith('-compat') @@ -20,15 +22,17 @@ python() { # provide compat only when we can build it if isar_can_build_compat(d): - d.appendVar('BBCLASSEXTEND', ' compat') + # but do not build separately if architecture-independent + if archIsAll: + extend_provides(pn, 'compat', d) + else: + d.appendVar('BBCLASSEXTEND', ' compat') # build native separately only when it differs from the target variant - if archDiffers is False: - pn = d.getVar('PN') - if pn_multiarch_target(pn) is False: - extend_provides(pn, 'native', d) - else: + if archIsAll is False and archDiffers: d.appendVar('BBCLASSEXTEND', ' native') + else: + extend_provides(pn, 'native', d) # drop own -native build dependencies at recipe level if building natively # and not for the builder architecture From patchwork Thu Sep 26 03:39:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "cedric.hombourger@siemens.com" X-Patchwork-Id: 3833 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Thu, 26 Sep 2024 05:44:10 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-yw1-f184.google.com (mail-yw1-f184.google.com [209.85.128.184]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 48Q3hjwO017110 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 26 Sep 2024 05:43:45 +0200 Received: by mail-yw1-f184.google.com with SMTP id 00721157ae682-6d54ab222fcsf14526977b3.1 for ; Wed, 25 Sep 2024 20:43:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1727322219; cv=pass; d=google.com; s=arc-20240605; b=LK5XEn2LiV63+ZOkKwqQ8M4FB5fA24KNtk7cw3TtT/K494/sgaFuorH6dUsg6xQBJy Dv3Lw6Y2gjVsuLt+DuGA19I8VCjcHwueFFMLTyU9S+6/pYfVy8Iyvi/Vf/4jqoUtHvJV U5ZYL2xSbx5K/UclJIlvdrkDvW6Z1dkbwQ7697nAeod33s4Q68Z75qUYz8Hj9uZiPaq1 DpPXNTB0597eB/p+ws0weJ8SIFae8hTVFFt51b/Pq+ls1H1WwOzZZ3ZWtBpDz5E1LjLN 5cnVOnAjYJipi+WGuq8RAFYKQTseGmH7yXwa5NNr3jcaAqWfmUpjcg2B1C+UnCNYkcc5 uDDQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:feedback-id:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=9HnMGibyREsAfkfxAbfeQi9l9vzsvxo8Mtsh66cIkHs=; fh=WaZZtUncDmqC961wlorzuM3WoxF4omje2mJFKphulkU=; b=Fq+iPDy5JVKGxHhKMj14dRNY/Jj7R06sCFRorfqKfLE53Dcl2JGPRAtrrTEnxAV/0W x4+0afOjFe2N93mHIXtcYMhOu2ELH1ZEB18kLFvgQI87dURXl9En5WaoTu6XpT7BEvm/ v6LLJMWPhDnpP4aOyTE2QwEd1I8WjAfUJNBeu+8ESmUkjK7UnKT96rO0JcHxPGZroPCf KQRLtklY6moIyyZ/tpNpBRuSwKtFJUvCh1bVRGYoTzP6h95J2E7wdWtUUIabPaF6CsVx g+/B2G8XOAhuVntt3RiLB80W4V8zsLQVJQhCkur87iilq+arXbxBt8yebLWYdCVbu2OZ W+fw==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm2 header.b=N4KYC34D; spf=pass (google.com: domain of fm-1212295-202409260343352411f3dde6b420a46a-tzo5ex@rts-flowmailer.siemens.com designates 185.136.65.226 as permitted sender) smtp.mailfrom=fm-1212295-202409260343352411f3dde6b420a46a-TzO5ex@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1727322219; x=1727927019; darn=isar-build.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=9HnMGibyREsAfkfxAbfeQi9l9vzsvxo8Mtsh66cIkHs=; b=POHSeQrMiHqCtobh0CP5KXA+PdeXSNdxnH7OoVjfPCB2Yr/F2WnHRfhLFsJtesumhm YfwEaHxAb1/sZd1zxMxU1VeckZewrxZL/kQZyVUUJpEMNX6hHYJC/paV1//x0sSsh90M Wj1vKwxU7K4dnER1cIC1PURwTroaITzSouJIYSEXtFMByfRRyF2E+dvNciXhJF+UaYxY QNRh9dmmbdEN4hT6rYRd7XCcr8XDpfhQy+2zglxS6TkHRtpveLfycedaG5TyxaNcHP9h UDa+a0seTB4BarNtlXcHk/kf3Zq72sZe8SECcD03v9xwD2RWFQDnBivKDFtfMdNdBfqE xfDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727322219; x=1727927019; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:x-beenthere:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=9HnMGibyREsAfkfxAbfeQi9l9vzsvxo8Mtsh66cIkHs=; b=ivRbQacNUHObvRggFDBcvHHIi5p4kRvHYARE5qH5xyP83YMCGO+/k0SuXtwywYBFWB 9CGOOm16x7sD2NXuxAVCCqmuyGnZvfutxt/tiK/8IpTKcrOgb7UJJGkJwFecRbnkCUtx 1YdlyHMimgO2S5guO/Omx7H2Da1qcD1vra5/pJHI9RC2HKB98AYTSuYS8GkeaB/sD131 wtPVKz+udqTHorO77h0Ac6AiTOqSmBAPE8rXWxgTB2EN44BpbYsvMe87qSjaCNj6T35R 3vvPrKDFLIys2xyEO1yb3/qwgCgQJABV0RxphZzPg+Z50u+P0daKqpstRNZxc0ZOEuU8 kI0w== X-Forwarded-Encrypted: i=2; AJvYcCUuOOpy5ttakbhlekqOQveZ2NEKLpQ+89765+9Wk5zRKoXKAflRGtUmEnhBQiDIKS3uoYLdLx0=@isar-build.org X-Gm-Message-State: AOJu0YwLtpgGTaVS1Dr7DOP23HN1oeOK5s/iDEB2fKKn3HmgZalCN/+R FgoC7ph8SBaAcgabQIY7UphQFmPD4HHrUtPLUY5ceb6CPJc5tYX2 X-Google-Smtp-Source: AGHT+IFnt6LjOErkYU6K6SDHP+cMAZNS0dTOo7OOvzvEN35JfVtN9nYLNCDi45nER77p4zQD7sW8hg== X-Received: by 2002:a05:6902:2582:b0:e25:cb91:3452 with SMTP id 3f1490d57ef6-e25cb9134d2mr1439736276.31.1727322219324; Wed, 25 Sep 2024 20:43:39 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a25:b292:0:b0:e25:d03f:aac5 with SMTP id 3f1490d57ef6-e25d03fafbels72265276.1.-pod-prod-01-us; Wed, 25 Sep 2024 20:43:38 -0700 (PDT) X-Received: by 2002:a25:bb83:0:b0:e22:5049:eb6d with SMTP id 3f1490d57ef6-e24d85addf9mr4027533276.34.1727322218375; Wed, 25 Sep 2024 20:43:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1727322218; cv=none; d=google.com; s=arc-20240605; b=gMtTWeKi8hqCgqcc8GtQos3NYkj9T35rwOKSSpryZKZZZP9vWokq9K95c76lnR4ghs 7jg3ZW/SnGiIEl7pHqPHFM89rKD0MtL0F7idXIDB3Jzgpb9EQdu75Tc+6SCtPbDNOeHH bCqbhwosiRJCh6P5S7PU3XiRX0+DwbnRgyZwSsf7JMi99uUwi7DSekOFdVRWLdmQ+VT4 45G3ApnHU2h94vpg2C6LBs92J67cT645g6n0GHSNrte64RkDTyniucIHS9fCIvMzDakg VrPVv7nAJLcsOarrSMW5xp53B5tcdoC5jqhGNGkhx/gcZhIymi9/NWm3V7HRUm3m8V5l mlxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=feedback-id:content-transfer-encoding:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=HLU0u7WrnXMAbe4vdnKHkVGoGdZwygIJQA0GeGcldAE=; fh=1z37pEVhqwMLlkT4FDzOga7XBsM6Rzv6sXOq0pipxqo=; b=azU9vBuTSuxbS+czBDrpiKOI1ahTAzKyMh5dxatdHIUawMzCLTtTYiVQy0+HZySWNk p6dt2mEfek09KFXBTSjRcpd8muiE7F15lFW+CTL5O9D4UzQjMe+T/e1Da1iPq7z9Y/bE l4fTE60c0voXp5rkFLU/Tg8xv8sGjRoJiwK8vaFr/WYiwBoG79tYVV2NKzKIrV/1PBZu J8ikwvgr5YUW6nTmoqiCqZv+EGNQhoVodirLmnHxNV3abwcFczTpVbV33IjvCCuYW/IG Ijjoy06xgg4JM/X+Ks3NxN7qceH4GpCsf5ptg2nJCa5LqrSyD6/OYFAvmrXvXFYhxDxD 1Q0w==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm2 header.b=N4KYC34D; spf=pass (google.com: domain of fm-1212295-202409260343352411f3dde6b420a46a-tzo5ex@rts-flowmailer.siemens.com designates 185.136.65.226 as permitted sender) smtp.mailfrom=fm-1212295-202409260343352411f3dde6b420a46a-TzO5ex@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from mta-65-226.siemens.flowmailer.net (mta-65-226.siemens.flowmailer.net. [185.136.65.226]) by gmr-mx.google.com with ESMTPS id 3f1490d57ef6-e25ce55d01asi34857276.2.2024.09.25.20.43.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Sep 2024 20:43:37 -0700 (PDT) Received-SPF: pass (google.com: domain of fm-1212295-202409260343352411f3dde6b420a46a-tzo5ex@rts-flowmailer.siemens.com designates 185.136.65.226 as permitted sender) client-ip=185.136.65.226; Received: by mta-65-226.siemens.flowmailer.net with ESMTPSA id 202409260343352411f3dde6b420a46a for ; Thu, 26 Sep 2024 05:43:36 +0200 X-Patchwork-Original-From: "'Cedric Hombourger' via isar-users" From: "cedric.hombourger@siemens.com" To: isar-users@googlegroups.com Cc: Cedric Hombourger Subject: [PATCH v3 3/3] dpkg-raw: change DPKG_ARCH to all Date: Thu, 26 Sep 2024 05:39:35 +0200 Message-Id: <20240926033935.2955085-4-cedric.hombourger@siemens.com> In-Reply-To: <20240926033935.2955085-1-cedric.hombourger@siemens.com> References: <20240926033935.2955085-1-cedric.hombourger@siemens.com> MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-1212295:519-21489:flowmailer X-Original-Sender: cedric.hombourger@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm2 header.b=N4KYC34D; spf=pass (google.com: domain of fm-1212295-202409260343352411f3dde6b420a46a-tzo5ex@rts-flowmailer.siemens.com designates 185.136.65.226 as permitted sender) smtp.mailfrom=fm-1212295-202409260343352411f3dde6b420a46a-TzO5ex@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com X-Original-From: Cedric Hombourger Reply-To: Cedric Hombourger 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=-2.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2, RCVD_IN_PSBL,RCVD_IN_RP_CERTIFIED,RCVD_IN_RP_RNBL,RCVD_IN_RP_SAFE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= Packages created by dpkg-raw are really for configuration and data files and therefore architecture independent. DPKG_ARCH is now set to "all" and DEBIAN_MULTI_ARCH will default to "foreign" unless DPKG_ARCH is changed (it would then be reset to "no"). Signed-off-by: Cedric Hombourger --- RECIPE-API-CHANGELOG.md | 10 ++++++++++ meta/classes/dpkg-raw.bbclass | 4 ++++ 2 files changed, 14 insertions(+) diff --git a/RECIPE-API-CHANGELOG.md b/RECIPE-API-CHANGELOG.md index 21c558d2..57b2205a 100644 --- a/RECIPE-API-CHANGELOG.md +++ b/RECIPE-API-CHANGELOG.md @@ -646,3 +646,13 @@ recipe would use the following setting: ``` HEADERS_INSTALL_EXTRA += "nvidia" ``` + +### Architecture for dpkg-raw packages + +The intent of the dpkg-raw class is to easily package configuration and data +files into a Debian package. Packages to be compiled should really use other +dpkg classes where support for cross-compilation and multiarch is provided +and tested. `DPKG_ARCH` is now set to `all` for `dpkg-raw` recipes. + +This change fixes an issue where a `dpkg` package is built for `-compat` or +`-native` and `DEPENDS` on a `dpkg-raw` package. diff --git a/meta/classes/dpkg-raw.bbclass b/meta/classes/dpkg-raw.bbclass index dd7b761f..ac70d5cc 100644 --- a/meta/classes/dpkg-raw.bbclass +++ b/meta/classes/dpkg-raw.bbclass @@ -7,6 +7,10 @@ inherit dpkg D = "${WORKDIR}/image" +# Create a binary-indep package +DPKG_ARCH = "all" +DEBIAN_MULTI_ARCH = "${@ 'foreign' if '${DPKG_ARCH}' == 'all' else 'no' }" + # Populate folder that will be picked up as package do_install() { bbnote "Put your files for this package in $""{D}"