Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id CA33CC54E76 for ; Mon, 20 Nov 2023 13:25:29 +0000 (UTC) Received: from EUR05-DB8-obe.outbound.protection.outlook.com (EUR05-DB8-obe.outbound.protection.outlook.com [40.107.20.108]) by mx.groups.io with SMTP id smtpd.web11.50078.1700486720786642997 for ; Mon, 20 Nov 2023 05:25:23 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@arrigroup.onmicrosoft.com header.s=selector1-arrigroup-onmicrosoft-com header.b=fenAwIhz; spf=pass (domain: arri.de, ip: 40.107.20.108, mailfrom: ceggers@arri.de) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Sm72sCEWXGHFl8JHCapKr0zKn5QVl085nSf0Xe98zQu3bCWXst/oxTuT8iMhtYJi7nZTIkGYq+V4xwqT6LYjGeVanyIc3bPDjD+UfZl3AWLJYeNx3Vn822rbQqi7mrw/GEhq38db/4ANX9kRxS40Yuejk56zRNHlOb1j5BWs1uFQeaA7UJpQbEiBRIc1uaBzTop1O3BW2ICLEA5hZso/+buXkLEos8cxMMIJ1IoWvJdpA+jWErNztrASbYxdhPFWtHA12Tn5jRmxYh65TvTEIqtGA0px17voayEJwXDhbTGRdncFKF/FJmuVIGBk1zDvIbjPE3lvGFLhtQJjMUJk1A== 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=QQlYonyGOJbyaKFr0hQBI2QcPHOD4P6fIiPWhgXpch4=; b=jqLr9oUaZCFXok8+jNkQo6f027pPOYnYiPRHuCUJIF41fx2Ehx4TULlTosHGniCi6NBb60idaVf5eyHl3VmblZSXZR+K2iuwJ0jyiH0QLVgf3Zb8/pzQmN6699RdU1UhSJZMjq09d8jJFLBXR0iGj26/YmPZ3psJQGPwUyLoBp3I64rTM6HS+G14wToc0qTUMfrz63bwhQmmhLmuAvZC5/PyKh8Pd+L7CUohTKUQfpsLlghIz6LIKl9DHgKUGhTX/O3awyuvshevArIE3qrmsBAQFmD7AvrMRiY90Qoy1zLpFhA7oS+WkOMK2Fr+/Ewgpws9JNHolC+APHYr0/gbgQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 52.169.0.179) smtp.rcpttodomain=ew.tq-group.com smtp.mailfrom=arri.de; dmarc=bestguesspass action=none header.from=arri.de; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arrigroup.onmicrosoft.com; s=selector1-arrigroup-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QQlYonyGOJbyaKFr0hQBI2QcPHOD4P6fIiPWhgXpch4=; b=fenAwIhzvuBcOrKItfqWtoNuXNxfRfh0Pi9bViWQoVZU0mxAfEI1484OKYQaxSffAVgje/kiTyTxx+4d+vDYTaDJzP/qmegz33Y2E5VZFLhc6A5AltLTCrHhyRbF2Po132dtfEIA2QV5zvO83xHDC5lui3cVopOu43OTf95OZyY= Received: from AM6P192CA0087.EURP192.PROD.OUTLOOK.COM (2603:10a6:209:8d::28) by PAWPR07MB9300.eurprd07.prod.outlook.com (2603:10a6:102:2f2::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7002.27; Mon, 20 Nov 2023 13:25:17 +0000 Received: from AMS0EPF0000019C.eurprd05.prod.outlook.com (2603:10a6:209:8d:cafe::ce) by AM6P192CA0087.outlook.office365.com (2603:10a6:209:8d::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7002.26 via Frontend Transport; Mon, 20 Nov 2023 13:25:16 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 52.169.0.179) smtp.mailfrom=arri.de; dkim=none (message not signed) header.d=none;dmarc=bestguesspass action=none header.from=arri.de; Received-SPF: Pass (protection.outlook.com: domain of arri.de designates 52.169.0.179 as permitted sender) receiver=protection.outlook.com; client-ip=52.169.0.179; helo=eu2.smtp.exclaimer.net; pr=C Received: from eu2.smtp.exclaimer.net (52.169.0.179) by AMS0EPF0000019C.mail.protection.outlook.com (10.167.16.248) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.7025.12 via Frontend Transport; Mon, 20 Nov 2023 13:25:15 +0000 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (104.47.13.50) by eu2.smtp.exclaimer.net (52.169.0.179) with Exclaimer Signature Manager ESMTP Proxy eu2.smtp.exclaimer.net (tlsversion=TLS12, tlscipher=TLS_ECDHE_WITH_AES256_SHA384); Mon, 20 Nov 2023 13:25:16 +0000 X-ExclaimerHostedSignatures-MessageProcessed: true X-ExclaimerProxyLatency: 30418870 X-ExclaimerImprintLatency: 3287481 X-ExclaimerImprintAction: ccc348b10a844e67b2cc96ae7dd78a03 Content-Type: multipart/related; boundary="----_=_NextPart_c0df72a8-71ea-4114-97a0-475f2ad34f12" Received: from AM4PR07CA0011.eurprd07.prod.outlook.com (2603:10a6:205:1::24) by PAWPR07MB9204.eurprd07.prod.outlook.com (2603:10a6:102:2e3::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7002.26; Mon, 20 Nov 2023 13:25:08 +0000 Received: from AM3PEPF0000A796.eurprd04.prod.outlook.com (2603:10a6:205:1:cafe::f4) by AM4PR07CA0011.outlook.office365.com (2603:10a6:205:1::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7025.16 via Frontend Transport; Mon, 20 Nov 2023 13:25:08 +0000 X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 217.111.95.7) smtp.mailfrom=arri.de; dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arri.de; Received-SPF: Fail (protection.outlook.com: domain of arri.de does not designate 217.111.95.7 as permitted sender) receiver=protection.outlook.com; client-ip=217.111.95.7; helo=mta.arri.de; Received: from mta.arri.de (217.111.95.7) by AM3PEPF0000A796.mail.protection.outlook.com (10.167.16.101) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7025.13 via Frontend Transport; Mon, 20 Nov 2023 13:25:07 +0000 Received: from n95hx1g2.localnet (10.30.5.31) by mta.arri.de (10.10.18.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Mon, 20 Nov 2023 14:25:06 +0100 From: Christian Eggers To: Markus Niebel , Martin Jansa CC: Alexander Kanavin , Subject: Re: [bitbake-devel] npm/npmsw fetchers: Support for "offline" builds? Date: Mon, 20 Nov 2023 14:25:06 +0100 Message-ID: <2178448.Icojqenx9y@n95hx1g2> Organization: Arnold & Richter Cine Technik GmbH & Co. Betriebs KG In-Reply-To: References: <4851356.GXAFRqVoOG@n95hx1g2> <70e7245a5f6b37f9045027f90c665c244a28a234.camel@ew.tq-group.com> MIME-Version: 1.0 X-Originating-IP: [10.30.5.31] X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: AM3PEPF0000A796:EE_|PAWPR07MB9204:EE_|AMS0EPF0000019C:EE_|PAWPR07MB9300:EE_ X-MS-Office365-Filtering-Correlation-Id: 3880d754-61e3-41de-ab7c-08dbe9cc22b0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: icpB7eMDOOLJ/Smuw3ovdORQ7aQBDl7BywIiqMqtWLKbsQvL4yepFMEZFCf/RYO9cX4BnDeot5f6+wbNazt/ll/TIk0V/1DOCKqv4bwAvwEM5V7GV4Jgy8QRThrH3/AJURPr/MDoNXp3lwd+nT1FL2jXYZnJpHr10ehaj7eyw6vY3wI0glRtW/XuiS9eTA92arIPnWywhEKIc/Q0OSjbg95Ta8FR5fcghPgtGuNpJr33c9SlbQwHFyXZ7oAs2QqV5HNQKfHQ/FaXC8/QAKA9sRIj89L76sTQp+wZPMiGBiiQtoWa0eDlBbuKiv4LUSrIGrZdg/QqLgVdkLoIyowAiilCf+vZraCOMBmxXfFk6+DnoUHLfxxOST7RtRiMQV6MO61KjNBKeAsn4muFqNKHKQG7d45I2UcH6OLquPCtpmF7dBNFdK4084legbZDVemv3D6S5MWwYE3/pkCZ0N5MyI6IA+Qi+ivgocEwl0BDFEF2BvIALuwLollAK7QtkbZN6DMYEYQL2g4Elm94Pgaocw5R5+DzALBsoXSY9yRPqD/eVkJBIKzQinhset3T9gb/Q3fdLdIoSYXTYQY+jOxBEGg4WGB7nabs1MK7m8wdjwztnvGSOrhhTsB82/KoayQa33LXbDHy4teJ5toipPP+W2DQs2zYopWFBRHa1ywLaDB3V5AU3XWsSwhyDoguVCURUf9FiGVxP7Jkx/rYH5D8O1yhrXndWGowoUq8DUPt7UoERSZEXKxyoUsaR9kAradFddcPWmsSnNzLuM6NCaCgMFvhNkXwhzzplrblzY0Z7LlMvmnNLhhNgT1SoLi96r+F X-Forefront-Antispam-Report-Untrusted: CIP:217.111.95.7;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mta.arri.de;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(4636009)(376002)(396003)(346002)(136003)(39850400004)(230922051799003)(186009)(82310400011)(64100799003)(451199024)(1800799012)(46966006)(36840700001)(110136005)(426003)(336012)(66574015)(70206006)(70586007)(316002)(54906003)(16526019)(26005)(8676002)(4326008)(8936002)(41300700001)(81166007)(356005)(36860700001)(47076005)(33716001)(86362001)(2906002)(82740400003)(5660300002)(9576002)(83380400001)(53546011)(36916002)(40480700001)(966005)(478600001)(9686003)(39026012)(36900700001);DIR:OUT;SFP:1102; X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAWPR07MB9204 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AMS0EPF0000019C.eurprd05.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 0319e1eb-2ea4-4dee-1022-08dbe9cc1cfd X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: u2Qqhx9jbkyx1DSLxyKBrIV2RC/163qkWB5exd8K8mp2+GwsDUMcMjJEcAy3OodSleqCRnuAKb7dgiakzilw0dshWd+qkxnY7s3ixJHFghDlyFR3rCNo836epntMCMToc2VJy8ob0+bQxDaFNxfJQaGyjo4yQD9alPRY+4dPRs4pkegXsBIaxE547WUJeWEobUPKhoXaHFOo9Kr276BKXwrCkpD9sbkWTBhWPHSfvGgvNNKdKmOiAuYUB5qrlj8RKpLu2KChjQiFdq9SNoC4jkC58nkMNuAf/ulplYiM0CbK4GwEBzpuAGgNTdhQpJHrzBZ6Y6uurPutXlNi4CfGW3dI8ffRsfDFQX4Vp8WckgUdRaVk0SbS3pcBB1x4fNj5jzurXXEaFCEaPQ3S3/wMjca8wghJuWmCuMuIpTqJWtbHHVCv5fSkqf0EWurikglqpyYXNiyD9mmDF0qYZ5MmWlglZgvYfqcSETDYVn+pB4JIImuNCYwWdVEhlxBT7JbH2mvsmaOFS4EyqqQ8zWJ93dl0rzsK2R2JZMkGsfYRTo8FLwaVvHIFc9vIZ9gDfp/rr8W3eFA9xERNM4q/yN7AjcDjxSb0DCYD1/trWNCyFADrd5n/UtsrVO1wE5gwdDa3zbN/HC3mzUsT1dnOAZVO+y7W9ZFUHM/gTz7pHqEQhXjMX0F9SlpBSN7Ra+AVKE278TFhRkOJy1PdRNJxC+xZ3sYH1qAC8LDTTkQCS3oNqLWne+hf670w47QF9ZCMEISiyH6TcAlYciJ4A0wjB5ymbroJbpJ+fl6gfKwfEjuq3s6mgul/ooCS0TdEITZm4/4S1A/wbqn+XxcCxPOEPHInoDi6yG+iLfhBqS0rWpOBz4Htf1jc1Sfh/PAmVt9Rm6Mb X-Forefront-Antispam-Report: CIP:52.169.0.179;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:eu2.smtp.exclaimer.net;PTR:eu2.smtp.exclaimer.net;CAT:NONE;SFS:(13230031)(4636009)(376002)(136003)(396003)(346002)(39850400004)(230922051799003)(1800799012)(82310400011)(451199024)(7200799017)(186009)(1690799017)(64100799003)(40470700004)(46966006)(36840700001)(40480700001)(8676002)(4326008)(8936002)(9576002)(45080400002)(26005)(82740400003)(8400799017)(70586007)(2906002)(54906003)(15974865002)(110136005)(316002)(86362001)(5660300002)(478600001)(70206006)(966005)(36916002)(33964004)(53546011)(7596003)(7636003)(36860700001)(166002)(40460700003)(47076005)(83380400001)(33716001)(16526019)(426003)(41300700001)(9686003)(66574015)(336012)(39026012);DIR:OUT;SFP:1102; X-OriginatorOrg: arri.de X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Nov 2023 13:25:15.6723 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3880d754-61e3-41de-ab7c-08dbe9cc22b0 X-MS-Exchange-CrossTenant-Id: e6a73a5a-614d-4c51-b3e3-53b660a9433a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e6a73a5a-614d-4c51-b3e3-53b660a9433a;Ip=[52.169.0.179];Helo=[eu2.smtp.exclaimer.net] X-MS-Exchange-CrossTenant-AuthSource: AMS0EPF0000019C.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAWPR07MB9300 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 20 Nov 2023 13:25:29 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/bitbake-devel/message/15538 This is a multi-part message in MIME format. ------_=_NextPart_c0df72a8-71ea-4114-97a0-475f2ad34f12 Content-Type: multipart/alternative; boundary="----_=_NextPart_b7492bad-f996-4d58-8f4c-cd69119fea37" ------_=_NextPart_b7492bad-f996-4d58-8f4c-cd69119fea37 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 On Monday, 20 November 2023, 14:14:32 CET, Martin Jansa wrote: > On Mon, Nov 20, 2023 at 2:01=E2=80=AFPM Markus Niebel > wrote: > > > Am Montag, dem 20.11.2023 um 13:19 +0100 schrieb Christian Eggers: > > > > > > Hi Alex, > > > > > > On Monday, 20 November 2023, 12:05:28 CET, Alexander Kanavin wrote: > > > > > > > On Mon, 20 Nov 2023 at 11:59, Christian Eggers > > > wrote: > > > > > > > > > When having NPM based application in my SDK (e.g. quicktype [1], > > > recipe is > > > > > attached), the "fetch" tasks perform a full build of nodejs > > > before starting > > > > > the actual download of the quicktype sources. But building nodejs > > > (and its > > > > > dependencies) during the "fetch" stage, compromises my wish to > > > perform the > > > > > actual build in an offline environment. > > > > > > > > > > > > > I'm not sure I understand what is being compromised here. If you > > > want an > > > > offline build, throw away the sstate cache that was created in the > > > fetching > > > > step, and nodejs will be again rebuilt together with everything > > > else. > > > > > > my intend is to run as few build scripts as possible as long as the > > > build > > > machine has access to the internet. For security reasons I would like > > > to divide > > > the build into two stages, one stage for downloading (with internet > > > access enabled) > > > and one stage for compiling (without internet access). > > > > > > While I highly trust the OpenEmbedded/Yocto projects, I fear that > > > single upstream > > > projects may become targets for supply chain attacks in the future. > > > Running > > > the package Makefiles/scripts etc. on a machine (e.g. docker) without > > > network > > > access reduces the possibility for manipulated packages to retrieve > > > internal > > > secrets and upload them to the internet. > > > > > > Are there any other use cases why people want to perform an "offline" > > > build? > > > > > > > At least offline builds are useful for release builds to make sure no > > recipe tries to bypass the normal fetch logic. We saw this several > > times in the past with silicon vendor stuff - recipes tried to fetch > > things during configuration or as part of compilation. > > > > Another thing I can imagine are builds against an internal PREMIRROR > > for several reasons. > > > > Yes, but bitbake and oe do that automatically (even in "online" build) no= w > with following changes: > > bitbake can now restrict network access in various tasks based on > "network" flag as implemented in: > > https://git.openembedded.org/bitbake/commit/?id=3D0746b6a2a32fec4c18bf1a5= 2b1454ca4c04bf543 > > https://git.openembedded.org/bitbake/commit/?id=3D9d6341df611a1725090444f= 6f8eb0244aed08213 > and oe now enables network mostly only in do_fetch and few special > tasks as implemented in: > > https://git.openembedded.org/openembedded-core/commit/?id=3D7ce1e88a3ad85= bbb925bb9f7167dc0a5fd1c27f4 > > so unless your evil vendor doesn't enable network flag on (m)any tasks, > they shouldn't be able to bypass the normal fetch logic. If I had known all this before, this would have saved me some time for the complex setup of my (docker) build pipeline ... With my concrete intend to improve security on my build machine, being able to ensure/enforce this behavior would be great (bb.utils.disable_network on= ly produces a debug message if unshare() returned an error). _______________________________________________________ Christian Eggers Software Engineer =E2=80=8B ARRI Arnold & Richter Cine Technik GmbH & Co. Betriebs KG Arriweg 17, 83071 Stephanskirchen www.arri.com +49 8036 3009-3118 CEggers@arri.de =E2=80=8B Get all the latest information from www.arri.com, Facebook, Twitter, Instag= ram, LinkedIn and YouTube and X. Arnold & Richter Cine Technik GmbH & Co. Betriebs KG Sitz: M=C3=BCnchen - Registergericht: Amtsgericht M=C3=BCnchen - Handelsreg= isternummer: HRA 57918 Pers=C3=B6nlich haftender Gesellschafter: Arnold & Richter Cine Technik Gmb= H Sitz: M=C3=BCnchen - Registergericht: Amtsgericht M=C3=BCnchen - Handelsreg= isternummer: HRB 54477 Gesch=C3=A4ftsf=C3=BChrer: Dr. Matthias Erb (Chairman); Lars Weyer; Stephan= Schenk; Walter Trauninger =E2=80=8B ------_=_NextPart_b7492bad-f996-4d58-8f4c-cd69119fea37 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
On Monday, 20 November 2023, 14:14:32 CET, Ma= rtin Jansa wrote:
> On Mon, Nov 20, 2023 at 2:01=E2=80=AFPM Markus = Niebel <Markus.Niebel@ew.tq-group.com>
> wrote:
> > > Am Montag, dem 20.11.2023 um 13:19 +0100 schrieb Christian Egg= ers:
> > >
> > > Hi Alex,
> > >> > > On Monday, 20 November 2023, 12:05:28 CET, Alexander Kan= avin wrote:
> > >
> > > >
<= td align=3D"left" style=3D"vertical-align:top;">
__________________________________________= _____________​
=
Christian 
Eggers
Software Engineer
​
ARRI
Arnold &= amp; Richter Cine Technik GmbH & Co. = ;Betriebs KG 
Arriweg 17, 
83071 
Stephanskirche= n
www.arri.com 

3D""+49 8036 3009-3118
3D""= CEggers@arri.de

​
3D"SkyPanel
Get all the latest&= nbsp;information from = www.arri.com,&nbs= p;Facebook, Twitter, Instagram,&n= bsp;LinkedIn and YouTube and = X.

Arnold = ;& Richter Cine Technik GmbH & Co.&nb= sp;Betriebs KG
Sitz: München =E2=80=91 Regist= ergericht: Amtsgericht München =E2=80=91 Handelsre= gisternummer: HRA 57918
Persönlich haftender = Gesellschafter: Arnold & Richter Cine Technik&= nbsp;GmbH
Sitz: München =E2=80=91 Registergericht:=  Amtsgericht München =E2=80=91 Handelsregisternumm= er: HRB 54477
Geschäftsführer: Dr. Matth= ias Erb (Chairman); Lars Weyer; Stephan Schen= k; Walter Trauninger

​
On Mon, 20 Nov 2023 at 11:59, Christian Eg= gers <ceggers@arri.de>
> > > wrote:
> > >= >
> > > > > When having NPM based application in my= SDK (e.g. quicktype [1],
> > > recipe is
> > >= > > attached), the "fetch" tasks perform a full build of n= odejs
> > > before starting
> > > > > the= actual download of the quicktype sources. But building nodejs
> &g= t; > (and its
> > > > > dependencies) during the &qu= ot;fetch" stage, compromises my wish to
> > > perform th= e
> > > > > actual build in an offline environment.
> > > > >
> > > >
> > > >= ; I'm not sure I understand what is being compromised here. If you
> > > want an
> > > > offline build, throw away = the sstate cache that was created in the
> > > fetching
= > > > > step, and nodejs will be again rebuilt together with ev= erything
> > > else.
> > >
> > > = my intend is to run as few build scripts as possible as long as the
&g= t; > > build
> > > machine has access to the internet. = For security reasons I would like
> > > to divide
> &= gt; > the build into two stages, one stage for downloading (with interne= t
> > > access enabled)
> > > and one stage for= compiling (without internet access).
> > >
> > &g= t; While I highly trust the OpenEmbedded/Yocto projects, I fear that
&= gt; > > single upstream
> > > projects may become targe= ts for supply chain attacks in the future.
> > > Running
> > > the package Makefiles/scripts etc. on a machine (e.g. docke= r) without
> > > network
> > > access reduces t= he possibility for manipulated packages to retrieve
> > > int= ernal
> > > secrets and upload them to the internet.
>= ; > >
> > > Are there any other use cases why people wa= nt to perform an "offline"
> > > build?
> &= gt; >
> >
> > At least offline builds are useful f= or release builds to make sure no
> > recipe tries to bypass the= normal fetch logic. We saw this several
> > times in the past w= ith silicon vendor stuff - recipes tried to fetch
> > things dur= ing configuration or as part of compilation.
> >
> > = Another thing I can imagine are builds against an internal PREMIRROR
&= gt; > for several reasons.
> >
>
> Yes, but = bitbake and oe do that automatically (even in "online" build) now=
> with following changes:
>
> bitbake can no= w restrict network access in various tasks based on
> "network= " flag as implemented in:
>
> https://git.openembedde= d.org/bitbake/commit/?id=3D0746b6a2a32fec4c18bf1a52b1454ca4c04bf543
&g= t;
> https://git.openembedded.org/bitbake/commit/?id=3D9d6341df611= a1725090444f6f8eb0244aed08213
> and oe now enables network most= ly only in do_fetch and few special
> tasks as implemented in:
>
> https://git.openembedded.org/openembedded-core/commit/?id= =3D7ce1e88a3ad85bbb925bb9f7167dc0a5fd1c27f4
>
> so unless = your evil vendor doesn't enable network flag on (m)any tasks,
>= they shouldn't be able to bypass the normal fetch logic.

If= I had known all this before, this would have saved me some time for thecomplex setup of my (docker) build pipeline ...

With my concr= ete intend to improve security on my build machine, being able
to ensu= re/enforce this behavior would be great (bb.utils.disable_network only
produces a debug message if unshare() returned an error).




------_=_NextPart_b7492bad-f996-4d58-8f4c-cd69119fea37-- ------_=_NextPart_c0df72a8-71ea-4114-97a0-475f2ad34f12 Content-Type: image/png; name="image482188.png" Content-Transfer-Encoding: base64 Content-ID: Content-Description: image482188.png Content-Disposition: inline; creation-date="Mon, 20 Nov 2023 13:25:16 +0000"; filename=image482188.png; modification-date="Mon, 20 Nov 2023 13:25:16 +0000"; size=528 iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACx jwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGlSURBVDhP1ZOxSgNBEIZ3o6QSSWGRwiJFCl9A iCDEIqKFgo2FYGHjA1hYRZ0sGrURgq0WgkoqEUHQShJMYWFhmcLCwsIHsJBEs/5zmTvvJIE9sPGD Zf7Zu/tvdndW/TVaogcRDSWVKlilMhvGVGQ6FoEhzAaTWt9AFji31q7C9Jh1HBISFSpbQPDMGK31 NlcsqTOBIRxmRPmkUTGJdubHUKmsxDA5ic6EDV8k+jRa1i6KdiYw/LL2QiTzDrNpY8yb5M4EhlvG XKNdniXl9pkTHYvwkrlXDkTxIR3tEWUkcyZi2FbqBOGxm6lUR+tT7k/JnYgYYs8+sHfzkP7eTaJ1 LmGaktyjTDSGsSxphMjV89khyqGx7yG96rC3r7g5S5vGNHaJsrb7LI3RwPw6btQDv8f0NGRwTWYT Wlch/eo+Mc5gPoWPfu9tpVgqrbGIHkoIVHOLQ5qAQVOmuNqVHma8guDK9jVkisY029aOQ/JhcYU9 wbLPRaoBiX2p1+utu1rtqpDPV9FKHVQziiqH5fETzMr40yHe68hcfPaJRnHyI5L+K5T6BsZ9gKi6 xb3hAAAAAElFTkSuQmCC ------_=_NextPart_c0df72a8-71ea-4114-97a0-475f2ad34f12 Content-Type: image/png; name="image340352.png" Content-Transfer-Encoding: base64 Content-ID: Content-Description: image340352.png Content-Disposition: inline; creation-date="Mon, 20 Nov 2023 13:25:16 +0000"; filename=image340352.png; modification-date="Mon, 20 Nov 2023 13:25:16 +0000"; size=824 iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACx jwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAALNSURBVDhPtZQ/SNVRFMfv1Z/S4PCGBoeg1Uih oaFB8j1wMGgweBJBgUNRUQ2BQaH2e79SaKipwcGhlkioQEiooT++7RUOBkYODg0GgiIOLyi1bp/v /d3fL8U31hfuO/ec3z3nfM895z7zr2GDbIg4jgutxvQ6Yw5IRy5uGzOfJMmKP9AADQMSaH+LtQ/5 WEaNUutfEHj5t3OXbyfJTDDl2BNwPI7LxtoJthFOD5A1WM0hf7QY04FDB98vohdZjzeduwbjOnuP piA9QrBnMJjl4KHRJBmD3hJlF5HdW8Z8HU6SqeFKpeScu4BLmUoepd4pcoYqs9XaLwo2UqkMoEfo YjrIysreNs6dI+kk515b516wf4ptgETPdSBnqDtDRFuUIJ1g0s/jOE3pJ7TQZ30AY9pg4tmyn8E2 AYE29mlmdVMNwInrSFbG4vgq5kvY7lHeLZ0ROFcj0SrbCFYfZNM9N1n7XveLOucZajQQCl6TTsYr MFv66dyo1wNItoFQg4QF/dAwL0GnfnxAnP2cqZu6S3WSD1MEwLQbnFVpdcpdlM6ZNcSatfaw9Cyg 2Ml5G7bd3ubcJ8md0D2RTEzmU0uOPLEPyM8yIiLqEYIXZMtY7wTJhsI2K1tJ2hHtEPgs3QfcVPdS HGP5UijhtGSGO3F8EuOw9pmzGNOkSbYbkHkjGxWkGK9UXsGqk7Hp4tBLTN3oU2RcQvahH0VO49DP XgxF4iyr8Is5zJ6hZyg08TY5XCDY3WbnzgTnMnKEz5FeBgN/ijG5gW1fSKLh7tr5pnOGguaPUjXQ 93l6GhlddlsYl13gmfZzVTXNbTB5NAfp8a5a/Vjq6flO0JsM6yD3sspaf1utruu77qy3WDzeWyo9 4T6HKO8bPunsBuximIHs+kfRo1eThA1KrHM46/w8pV/nzyNrZo6GATNwBRqjPtgeRK2H7i6MJEk+ Nv8ZxvwBPgIhrepF7fMAAAAASUVORK5CYII= ------_=_NextPart_c0df72a8-71ea-4114-97a0-475f2ad34f12--