From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7182796543154454528 X-Received: by 2002:a67:ea0d:0:b0:3cb:88c6:293b with SMTP id g13-20020a67ea0d000000b003cb88c6293bmr3799746vso.53.1674545925305; Mon, 23 Jan 2023 23:38:45 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a67:d989:0:b0:3b0:cc1a:a953 with SMTP id u9-20020a67d989000000b003b0cc1aa953ls4976299vsj.9.-pod-prod-gmail; Mon, 23 Jan 2023 23:38:44 -0800 (PST) X-Google-Smtp-Source: AMrXdXsFPmhE+1rwa5cXIULQXYqp3AE1j4c4edMYINaB+JoyMiTY3G8IW6G7/wQnT/TmqyQd4XNA X-Received: by 2002:a05:6102:34ef:b0:3d9:928d:fa54 with SMTP id bi15-20020a05610234ef00b003d9928dfa54mr9469676vsb.23.1674545924495; Mon, 23 Jan 2023 23:38:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674545924; cv=none; d=google.com; s=arc-20160816; b=JTlpwmfrADulir3NcHMfNtBDM2MP1ev/9kUzjSnJ0NDfbIrE+ed6npSsl4q39eva3i WXT2dE7aJeDm+ChbShRIaECrVilqaunfQimqpUO9aghhYPjxR+EpLvZFLi8t/gaew+Mb PHujw5yt/BMtFyOUdYP00v216qDHxQ1oj0BX5A2EjeFuB0/+jAK7yRA0PRfISeur6/e9 zlrpQoGD501gr8drgXFd1hUBjljjTSAyPwoTN5Frje0l6NGfhQV2iwT13HBNcxvRG22/ ekGvPUB4kwrDhqLlSKLgiq8vye7Le8/K/XT4MG0FXi2R6kvC9CLFoJ+wXplV+JqmXpH7 YnUw== ARC-Message-Signature: i=1; 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:to:from; bh=Bn40otuWzJ/zCJo4pwmcHt8zGfUd+POwf2WiLuWSvlQ=; b=z8VK5JQfMNhZgHGHSuYAYscTSUzG8NUGiO+F/KJmYHFaiIDD+bAqdRNC3MtgfenNye D3rhGVBV7okDnSGuVVGuweXYT/xdvRnweNwmZ+jix+P+iNhYfO/opNDDvhdFufC0vbfr rBIArxhIhPRsTXxL48mhcFj0OLFh1y2oWcjsnxoy08XKQEBDqs3vmVF9sL1mPTj699uD aSp7OCAicg3urIk6+k6OggehmlU+AQMXhmGJlhlqla2L4bVFNux3xTnaVlsWSJLmI459 Qc9nJJdsC0KjZs8A60h0Hq6sw0uqQYmuTda/DRvly4ZScaxsoQsoxrXicbuRQV48H2nq y04Q== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Return-Path: Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id s32-20020a056130022000b005e51a1a1ef1si113793uac.2.2023.01.23.23.38.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 23 Jan 2023 23:38:44 -0800 (PST) Received-SPF: pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Received: from hp.localnet (host-80-81-17-52.static.customer.m-online.net [80.81.17.52]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 30O7cf97020145 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 24 Jan 2023 08:38:42 +0100 From: Uladzimir Bely To: isar-users@googlegroups.com Subject: Re: [PATCH v3 0/5] Improving apt cache Date: Tue, 24 Jan 2023 10:38:40 +0300 Message-ID: <2581997.vYhyI6sBWr@hp> In-Reply-To: <20230120073106.5453-1-ubely@ilbers.de> References: <20230120073106.5453-1-ubely@ilbers.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED 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-TUID: NdWLGiZsJOey In mail from =D0=BF=D1=8F=D1=82=D0=BD=D0=B8=D1=86=D0=B0, 20 =D1=8F=D0=BD=D0= =B2=D0=B0=D1=80=D1=8F 2023 =D0=B3. 10:31:01 +03 user Uladzimir Bely=20 wrote: > Currently, apt cache (e.g. `var/cache/apt/archives`) import and export > functions are not optimal. Multiple files are copied from global > DL_DIR to package WORKDIR, increasing disk IO and space needed. >=20 > Also, various chroots (bootstrap, buildchroot, sbuild chroot) include > their apt caches to sstate cache files. >=20 > This patchset switches to hardlinks instead of copies and removes apt > cache from bootstrapped images ans sstate caches. >=20 > Changes since v2: > - Don't use CACHEDIR.TAG, simply exclude var/cache/apt directory > when creating rootfs tarball for sstate-cache. > - Use symlinks when exchanging deb files between WORKDIR/rootfs > and /var/cache/apt/archives inside sbuild chroot >=20 > Changes since v1: > - Simplified cleanup of apt cache in debootstrap rootfs. > - Now "ln" instead of "cp -l" used. > - Removed apt cache contents from sstate cache. The idea is proposed > in patch 3, but it was reworked and fixed. Firstly, CACHEDIR.TAG can't > be just a file (e.g. created by 'touch'), it should include some > specific signature [1]. Secondly, it's easier to just create this tag > in bootstrapped rootfs and it will be automatically used in all > derivatives (sbuild-chroot/buildchroot/image). So, the original patch > from Roberto A. Foglietta was simplified. >=20 > This patchset includes (or absorbs) the logic from p1..p3 patches of > the series Roberto prosposed. What concerns additional patches, they > don't let us benefit much, but require quite significant changes > in Isar, so we should check twice if they are worth including. >=20 > Uladzimir Bely (5): > Clean apt cache from debootstrapped rootfs dirs > Use hardlinks in deb-dl-dir import/export > Exclude apt cache from sstate caches > Use symlinks when importing debian packages to sbuild chroot > Lightweight copy of rootfs directories if possible >=20 > meta/classes/deb-dl-dir.bbclass | 4 ++-- > meta/classes/dpkg.bbclass | 4 ++-- > meta/classes/imagetypes_container.bbclass | 2 +- > meta/classes/rootfs.bbclass | 7 ++++--- > meta/classes/sdk.bbclass | 2 +- > meta/recipes-core/isar-bootstrap/isar-bootstrap.inc | 6 +++++- > 6 files changed, 15 insertions(+), 10 deletions(-) Applied to next.