From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6607733288662466560 X-Received: by 2002:adf:f389:: with SMTP id m9-v6mr1495092wro.11.1541362835646; Sun, 04 Nov 2018 12:20:35 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a1c:28c2:: with SMTP id o185-v6ls994678wmo.23.gmail; Sun, 04 Nov 2018 12:20:35 -0800 (PST) X-Google-Smtp-Source: AJdET5ejAllbV+xN44yI0HxltxP8cHrHE3r9LBZaISLXCW9yTyp2Vn0/H2bD2Vxw0Bd5g2xeC0A0 X-Received: by 2002:a1c:814d:: with SMTP id c74-v6mr564482wmd.19.1541362835137; Sun, 04 Nov 2018 12:20:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541362835; cv=none; d=google.com; s=arc-20160816; b=ARGq29o8Dkh1c5j05kOctoBAMbfU9k86Pi8ugKz/9ErmlBqdwgF8PifmS6X2k7JG76 v44bqUaY6ZYgTLagJxT4xseuTtgGbr6GmwOy1swAJlQ2nWNC4Xtn7EDcf49epV82gDWT HCNENo5kNlt/RaPx0PK+paFe/TwZ/CNTWUoidJ3kflWXlTuxV16X5j1SzBlMjsPJrb1h VA+IMGDsSjfPgPksrI432eqiFu+C6OXqNsyRGJoF9XkNzblQVi8qPXIRcm1kttFEEj0p TRLfnHDXbn2cHbZ7TsiAC36MikaJyTxXqcQ22FIjPFVgh5eibqNFRbVqnnLXdiXM2c56 /2/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:references:to:from:subject; bh=y0FWotLMa3TeYRtNIdaPneljB/s1lTqt5zrGvcimDQw=; b=LVMGMvNwbQ3pZ23v20M5TQaW28K8xaprtDuNpPGjU3F/I5fTQ7nIN9JHRxLIcuXDqM 49Kn1QCFhMDruJUZIlKsQM7r9MWbZTXV0/GirnmO/eL25LnRcn9zMTbySkxSr51UAlow 5pDR6ibDSfyZP2wtNQ0m/qiAwQPHS64HSpcuLNrCnefoh+zcu0AhvH3hW3I2lpfk3dIs aoELTv2MuahgrmiXD5C6MvVjG9MHdoYLgDw9P900lWLcrZBYSF2f1zjcyNofPpOtAq7C ntvjl7qO6JQrHk/Ajhc25/Ykh6uyE+yaFDyaHZ37cty4OOyEAq8V3Xv9wMitNZDLUFdl AOOw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 194.138.37.39 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com Return-Path: Received: from lizzard.sbs.de (lizzard.sbs.de. [194.138.37.39]) by gmr-mx.google.com with ESMTPS id n6-v6si722857wrj.4.2018.11.04.12.20.35 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 04 Nov 2018 12:20:35 -0800 (PST) Received-SPF: pass (google.com: domain of jan.kiszka@siemens.com designates 194.138.37.39 as permitted sender) client-ip=194.138.37.39; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 194.138.37.39 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com Received: from mail1.sbs.de (mail1.sbs.de [192.129.41.35]) by lizzard.sbs.de (8.15.2/8.15.2) with ESMTPS id wA4KKYqp000955 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 4 Nov 2018 21:20:34 +0100 Received: from [167.87.7.36] ([167.87.7.36]) by mail1.sbs.de (8.15.2/8.15.2) with ESMTP id wA4KKG08015526; Sun, 4 Nov 2018 21:20:17 +0100 Subject: Re: [PATCH 0/9] Introduce local apt repo to cache upstream debian packages for offline usage From: Jan Kiszka To: "Maxim Yu. Osipov" , isar-users@googlegroups.com References: <20181002121907.18476-1-mosipov@ilbers.de> Message-ID: <9b27ce53-be62-cecb-6eb6-1e7ecf7f4788@siemens.com> Date: Sun, 4 Nov 2018 21:20:16 +0100 User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-TUID: RW04ccUL380R On 04.11.18 11:07, Jan Kiszka wrote:> On 02.10.18 14:18, Maxim Yu. Osipov wrote: >> Hello everybody, >> >> This series by Alexander Smirnov, >> >> 1) Introduces dedicated local apt (base-apt) repo for upstream Debian packages >> >> 2) Caches in base-apt repo upstream Debian packages during image generation. >> >> 3) After this step, image can be built offline using only base-apt repo. >> >> Usage instructions can be found in the last patch. >> TODO: >> Sign the repo with gpg > > There are more, in fact: > > - enable support for cross-build: dependencies of buildchroot-target are > not cached which breaks the rebuild - probably related to the strange > way of creating the repo via a task. Maybe apt-cacher can help. Played a bit more with it, and it's not cross-build: diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass index ad19f3d..d033cf5 100644 --- a/meta/classes/image.bbclass +++ b/meta/classes/image.bbclass @@ -143,7 +143,7 @@ do_cache_base_repo() { fi } -addtask cache_base_repo after do_rootfs +addtask cache_base_repo after do_rootfs do_install_imager_deps # Imager are expected to run natively, thus will use the target buildchroot. ISAR_CROSS_COMPILE = "0" I.e., we simply ignored the dependencies of the imager. Cross-building is fine now as well. > > - move base_apt out of tmp - it belongs to downloads. That will also > make it easier to purge tmp completely in order trigger a rebuild. > > - get rid of the control knobs, at least make them opt-out instead of > opt-in. I see no reason why the cache can't be created by default and > why it can't be used by default if it's there - we do the same with > other downloads. - make sure you can switch between cached and non-cached build on-the- fly, without requiring to purge all build results. That's important when you want to add packages that are not yet cached, at least as long as we allow to control the mode manually. > > I'm also curious if the apt-cacher-ng Henning mentioned can help to make things > simpler. > > Thanks, > Jan > Jan -- Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux