From patchwork Fri Sep 27 19:06:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "alexander.heinisch" X-Patchwork-Id: 3837 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Fri, 27 Sep 2024 21:07:28 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-pl1-f190.google.com (mail-pl1-f190.google.com [209.85.214.190]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 48RJ7Q3B026067 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 27 Sep 2024 21:07:27 +0200 Received: by mail-pl1-f190.google.com with SMTP id d9443c01a7336-206d8c47496sf27501275ad.2 for ; Fri, 27 Sep 2024 12:07:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1727464040; cv=pass; d=google.com; s=arc-20240605; b=B10UHluZS7Fz4ai8Mdwq0RNJaeZbHCWS04fPLN+QAdLYHJ9yqye946C8IAWyKxm57X J3LN0ZluUIIScmYWHKL133WqebJXvziEQ9cOBOyjBiTYXXk624UXMn1JesmzM1ix1ZEX n7oZMzC0j6Pet7YJv69O1X3ZU14u9c1LSh2MNXBxt9qH6XOR/JQBCtvW+HWN8GZq3XQJ uKBS78L4iTMFwAazyCSH97ixrLUIMfuZoMSNQPDyIndc7EXv2pdhwkRnhXYuLJgoE18q LcwvaiB/Wf+O4cDfaFjbQV3U1yN0nG/LtdVgA2tTzmcwMLGnyi+om5Ah8PIQacYHzwbD EaRw== 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=NcqgPPeM+YaASNOTN8ZBk5LW6I6ObOpAbiqfyfkaMl0=; fh=k7yFM56bIkKq5ikpn+gT2a3gLLfWreZ/2eNO5wMJ/Xo=; b=H2c/4T6kkm6E8u3lCV1WayyVuoKfkIZFH1EVbluCAM/VOrmsqOgpusiLFeX6ajD2vf 5fr7Ae9cb37W1walQYinUJjZFveWR7GKqp3B4yPhOeY05Vw3GB0O53X947/dxaNlyGNM yf5iEIZ+AGoUtj59bO3RZgtUfSwkWh8NE+JZZ74rK/JyOmk6e59H5HG7VNWm6eqQiRaa l6Rf48Vg9jgVd5+erDw62jnA6PMzK4E8A6KHeaI4KLR7pDmhdLT6QGhQX9hU4/Q0X2xV OHIN+dFo3XL1XJC8CJzbylAty+0vRhOHU+h4Niapv/oJnVuutF9FrBkTOZU87XZWIfNP 2ArQ==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm2 header.b=fy4+QBAt; spf=pass (google.com: domain of fm-1326448-20240927190715d322c1e30410a1ae6e-n6itgp@rts-flowmailer.siemens.com designates 185.136.64.227 as permitted sender) smtp.mailfrom=fm-1326448-20240927190715d322c1e30410a1ae6e-n6ITGp@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=1727464040; x=1728068840; 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=NcqgPPeM+YaASNOTN8ZBk5LW6I6ObOpAbiqfyfkaMl0=; b=WCY/WdnePsyCJzSRt/lW0RZihZEsaehWtCdSjJ0huSOt1pyN2rFyszQvkcyWj+DLwb Ym2YyttWNwkHqxoHxhRlik1XU9xD1ekkkqd8PVQl03MDXHwLyThHJyJOE0Gddg3RXUJf 9RswfhUwS4GADzLMWmh3jZD22NeUZkXlQfHE6SdiS/Qqipb5rhTrxOL2E+yc+nUsdvSu 81t66RC5ynLasAMZOMhKP/S0dRO/OD4JBNA48XCEzBOWMASdr/418zhFApJVy6pVoecw q/sjJvZ2MIiLjouSaozUHv9/qFSB8m5NZeZxF3Ni5qpRtrXzQzn4u+8XfPwteFYgHJAK k2vQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727464040; x=1728068840; 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=NcqgPPeM+YaASNOTN8ZBk5LW6I6ObOpAbiqfyfkaMl0=; b=ce6umGhn59ENLT+JDHWaR1SlZ2PfXEiyCEXkrsXVOzh76mmYSvWrYaaxDa0zxuEKdg 7QKVqgRSGQfN2smNnBYMAQ+iLiS7A4vJo/oZxsxu5Vjb72ZO2j6OdPPAq9ZD/ji2JVAW 0fN43vWLesfIJkNq45dtXjogE2QHehxxT9eNAN35FdqXOihqc4iatHfTPStq5P8zQJfO n1j82ompcqkPG/K3sGNoY5T0FWfLPfGBoyQj+BvF5x4eqOMrO2rMExCZRTTMIZ7iHRWM YFncKhoEoRL67DMTpvC8y2fCwpV33CSFas1R85LV7F+cHVMtIH1j56KmJDN9Hx4wJl00 eBgA== X-Forwarded-Encrypted: i=2; AJvYcCXwz4sHD/+eGc6Zs5cAERa/qivOHIEt04l26nreMY9lp1Qdz0TUp7rjrGu2mrm+IzDoGNc1xtI=@isar-build.org X-Gm-Message-State: AOJu0Yy2RJb1cdXjI+mRfTpSNbaEFi3wPgSYM2xEk+kwwJh0ytN0m6Hh 8O5Z9dgV2mi2hXLWpcjqlG+cS684SKilc0k7pHj3/ha8ye4u9jwT X-Google-Smtp-Source: AGHT+IHM2Tya/XWHTKliiWGgrml+jwDRGNNPCusPocAxIL81nMjfA2RL9k+SFTT6Evvq/M30IY3OUQ== X-Received: by 2002:a17:902:f60e:b0:20b:4862:160 with SMTP id d9443c01a7336-20b48620357mr41000385ad.43.1727464039791; Fri, 27 Sep 2024 12:07:19 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:902:ce89:b0:205:43b8:1aa7 with SMTP id d9443c01a7336-20b19af3828ls3931075ad.0.-pod-prod-07-us; Fri, 27 Sep 2024 12:07:18 -0700 (PDT) X-Received: by 2002:a17:902:e743:b0:20b:4175:c018 with SMTP id d9443c01a7336-20b4175c254mr40006735ad.57.1727464038301; Fri, 27 Sep 2024 12:07:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1727464038; cv=none; d=google.com; s=arc-20240605; b=PA58PhufPL/rt9ZNCj7HYJWDHLgAnDqhHWNQ0FtLYINy1sUMzTTLkqUFUw7ooZfBFj SgcYgiX5yUIiXDTRqP0YI+e03g7QSWC/PR3CXgpD4qWCt51WyV6kYfN4foy4Ca5LvmkC wwp8AuqKnl5UIhzjnc2omkNoa2XtCncsSUz0NKtQY+tOq+HZgudayfSP2cj/ALz5OX5r Lumwo997K5bYkTGBL6qfL5TJ2giGOWOxiPz5QeIWVJbzCPnNUiLIx3VmaCxrljJthLXA YpbeaXGeaINz6u1I3jzJ2xLn3m/wbAg5FTWMsHHhkHzUsU6UMMuigdeIAmRYdHmGOqCO Wv/Q== 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=B4pwPnZYZEVlZr0m3U1L+hKVz1r9EBU0w/1oFjZa/j8=; fh=qlpLpZCOHpn3j/g0XGeAn8LOB72WJczsFovYQ6vHQlk=; b=OrSJgyWntVNJSrTYL5byHgJ38Vp+J5OLnDYrvZjbzM9D2nZZp5Oza9dPSX2YxpQgat gdy3h6Y8FHQsxnv4srVB+fgT/SxkyEPrR4WUOYFixzW6ol/8Hse2DY9vu91h2aufrysV bXFPwfGL4fSK7IoMqIwWNh7a/97rrNvmXy5ktXPXrlADq/40Zkku8DhBqM9CDlSnbDbU YMcbze042aApg998V4Gxq/AW739t4if3bid82yzfDU3/q1vw0RbIIp/2PLkWyVXe4WMw kjjllmrmkWe4nmyEyCR9jThZUaF2aw8sdfLyDZKQ3cwfFfWoe+1hOXW5x4mM6ljmOFXb 0DUw==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm2 header.b=fy4+QBAt; spf=pass (google.com: domain of fm-1326448-20240927190715d322c1e30410a1ae6e-n6itgp@rts-flowmailer.siemens.com designates 185.136.64.227 as permitted sender) smtp.mailfrom=fm-1326448-20240927190715d322c1e30410a1ae6e-n6ITGp@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from mta-64-227.siemens.flowmailer.net (mta-64-227.siemens.flowmailer.net. [185.136.64.227]) by gmr-mx.google.com with ESMTPS id d9443c01a7336-20b37da5e6bsi1228625ad.1.2024.09.27.12.07.17 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Sep 2024 12:07:18 -0700 (PDT) Received-SPF: pass (google.com: domain of fm-1326448-20240927190715d322c1e30410a1ae6e-n6itgp@rts-flowmailer.siemens.com designates 185.136.64.227 as permitted sender) client-ip=185.136.64.227; Received: by mta-64-227.siemens.flowmailer.net with ESMTPSA id 20240927190715d322c1e30410a1ae6e for ; Fri, 27 Sep 2024 21:07:15 +0200 X-Patchwork-Original-From: "alexander.heinisch via isar-users" From: "alexander.heinisch" To: isar-users@googlegroups.com, felix.moessbauer@siemens.com Cc: Alexander Heinisch Subject: [PATCH 3/3] Added doc to setup apt cache. Date: Fri, 27 Sep 2024 21:06:50 +0200 Message-ID: <20240927190650.128263-4-alexander.heinisch@siemens.com> In-Reply-To: <20240927190650.128263-1-alexander.heinisch@siemens.com> References: <20240927190650.128263-1-alexander.heinisch@siemens.com> MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-1326448:519-21489:flowmailer X-Original-Sender: alexander.heinisch@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm2 header.b=fy4+QBAt; spf=pass (google.com: domain of fm-1326448-20240927190715d322c1e30410a1ae6e-n6itgp@rts-flowmailer.siemens.com designates 185.136.64.227 as permitted sender) smtp.mailfrom=fm-1326448-20240927190715d322c1e30410a1ae6e-n6ITGp@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com X-Original-From: alexander.heinisch@siemens.com Reply-To: alexander.heinisch@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=-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_H3,RCVD_IN_MSPIKE_WL,RCVD_IN_RP_CERTIFIED, RCVD_IN_RP_RNBL,RCVD_IN_RP_SAFE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= From: Alexander Heinisch Signed-off-by: Alexander Heinisch --- doc/apt-cache.md | 55 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 doc/apt-cache.md diff --git a/doc/apt-cache.md b/doc/apt-cache.md new file mode 100644 index 00000000..f03ea7ee --- /dev/null +++ b/doc/apt-cache.md @@ -0,0 +1,55 @@ +# Using an APT Cache + +When working on the road limited download bandwitdth oftentimes is an issue, and increases the build times drastically. +On the other hand large corporate networks could get rate limited by debian mirrors, as many peoply / pipelines / aso. +fetch huge amounts of packets. + +An apt cache can mitigate these issues. + +## Setup + +1. Install apt cache + +``` +apt install apt-cache-ng +``` + +## Using the cache using premirrors + +1. Set `DISTRO_APT_PREMIRRORS` in your projects `bitbake` or `kas` config: + +``` +DISTRO_APT_PREMIRRORS="http://deb\.debian\.org http://localhost:3142/deb.debian.org"\n"" +``` + +1. Invoke `kas menu` and select + 1. `Mirror selection -> + 1. Use specific (Debian | Ubuntu) mirror -> + 1. URL of (Debian | Ubuntu) mirror (e.g. `http://localhost:3142/deb.debian.org`). + + +## Using the cache when snapshot builds are configured + +When you chose to use isar's snapshot mechanism: +``` +ISAR_USE_APT_SNAPSHOT = "1" +``` +you can enable the cache, depending on your build environment, as follows: + +1. Set `DISTRO_APT_SNAPSHOT_PREMIRROR_BASE` in your projects `bitbake` or `kas` config: + +``` +DISTRO_APT_SNAPSHOT_PREMIRROR_BASE=localhost:3142/snapshot.debian.org +``` + +1. Set `DISTRO_APT_SNAPSHOT_PREMIRROR_BASE` in your environment and include `kas/opt/mirror-snapshot.yaml` to your kas file or append it on kas cli invokation. + +1. Invoke `kas menu` and select + 1. `Mirror selection -> + 1. Use the distros snapshot mirror -> + 1. Use a cache for snapshot mirror and specify the snapshot mirror you prefer (e.g. `localhost:3142/snapshot.debian.org`). + + +> Note: When invoking the build in a containerized environment like `kas/kas-container menu`, you have to specify the ip address of the machine running `apt-cacher-ng`. + +> Note: To limit access to the `apt-cacher-ng`, a dummy network interface can help!