From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6607733288662466560 X-Received: by 2002:a50:974f:: with SMTP id d15-v6mr3101306edb.9.1538488975260; Tue, 02 Oct 2018 07:02:55 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a50:a924:: with SMTP id l33-v6ls4778982edc.8.gmail; Tue, 02 Oct 2018 07:02:54 -0700 (PDT) X-Google-Smtp-Source: ACcGV60ldPeCqJzCMGF/voT0f4jpptpCKtSMv9Qlw/1fHZsqxdRXFc5XEbN4CMU2jeihTynd0ufz X-Received: by 2002:a50:974f:: with SMTP id d15-v6mr3101297edb.9.1538488974844; Tue, 02 Oct 2018 07:02:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538488974; cv=none; d=google.com; s=arc-20160816; b=cQnt/7AgtaVSkobPcJ7P4teHdZQt796QaqKyfA6yAO5sZ/I8u+M9kUPUYjRsQMnSfD 6GfMLqWcJfoZoRkFGpdw/e+DIg7/rGoHoNEVvv5FR7O/GKuINCEPriP6+q/lSucYgWLW 8DTCvMWXxCY+kOXvaefO5410d5aqmzxB7r6CfqHZjfGEpXQDa/UMA4Idt1QND2VJCPPG 5c7GJjPUSreeEr+JeHK6mnzotdIxXhysSKuqMSqdZOpdzJR3qyvU/EZ9Nfzbge+1EX6b D6H7eov1dMYHx4+ZF5ptomOHD236ydtprcmXTcG2y0f8qyrdJBD3FVYIlRVX/B7vgcID kgZQ== 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:from:references:to:subject; bh=gDh78ygxxjwvZKGF4mLDviymOc0nAim3DzJ2I7aoZ9k=; b=AWj2R7i/EVJHR2wNUbsVWzLf7DlbwLw7SoCJOlK/qqOzZEoay8I9d7vAsMNxFtegnB LHPneSOug9dN+sy/fbOlxDTU80wfu+V/JzSLL8iCbAnE8KK2F85ZrBU+qtBHFnEE2Eyf VK9ftQdK792h56txbd1Kjm1NyG6UkB1kCWgtlGKiRn5b3i/JhddnxqvRmbzHex/hR9ZB fRF9sH4y0Z1LNI5pJQWF7AOeO3K81pqymQbAwL+++euivri2x03JOwZ0Jht9elybibQq lrEBWqYcYGBu5rKcZcGtsWFmzPI/rosprdSrRc63wgOUjJeeBXaYq8es/ADmLMVDQW2Q k70g== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of claudius.heine.ext@siemens.com designates 194.138.37.39 as permitted sender) smtp.mailfrom=claudius.heine.ext@siemens.com Return-Path: Received: from lizzard.sbs.de (lizzard.sbs.de. [194.138.37.39]) by gmr-mx.google.com with ESMTPS id f18-v6si487143edj.3.2018.10.02.07.02.54 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Oct 2018 07:02:54 -0700 (PDT) Received-SPF: pass (google.com: domain of claudius.heine.ext@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 claudius.heine.ext@siemens.com designates 194.138.37.39 as permitted sender) smtp.mailfrom=claudius.heine.ext@siemens.com Received: from mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by lizzard.sbs.de (8.15.2/8.15.2) with ESMTPS id w92E2sdA028338 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 2 Oct 2018 16:02:54 +0200 Received: from [139.25.69.181] (linux-ses-ext02.ppmd.siemens.net [139.25.69.181]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id w92E2s7O004520; Tue, 2 Oct 2018 16:02:54 +0200 Subject: Re: [PATCH 9/9] doc: Creation of local apt repo caching upstream Debian packages To: "Maxim Yu. Osipov" , isar-users@googlegroups.com References: <20181002121907.18476-1-mosipov@ilbers.de> <20181002121907.18476-10-mosipov@ilbers.de> From: Claudius Heine Message-ID: Date: Tue, 2 Oct 2018 16:02:54 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: <20181002121907.18476-10-mosipov@ilbers.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-TUID: xnRQ26cgmTFt Hi, On 10/2/18 2:19 PM, Maxim Yu. Osipov wrote: > Signed-off-by: Alexander Smirnov > Signed-off-by: Maxim Yu. Osipov > --- > doc/user_manual.md | 39 +++++++++++++++++++++++++++++++++++++++ > 1 file changed, 39 insertions(+) > > diff --git a/doc/user_manual.md b/doc/user_manual.md > index db58cf1..d69dd0d 100644 > --- a/doc/user_manual.md > +++ b/doc/user_manual.md > @@ -19,6 +19,8 @@ Copyright (C) 2016-2017, ilbers GmbH > - [Add a Custom Application](https://github.com/ilbers/isar/blob/master/doc/user_manual.md#add-a-custom-application) > - [Enabling Cross-compilation](https://github.com/ilbers/isar/blob/master/doc/user_manual.md#isar-cross-compilation) > - [Create an ISAR SDK root filesystem](https://github.com/ilbers/isar/blob/master/doc/user_manual.md#create-an-isar-sdk-root-filesystem) > + - [Creation of local apt repo caching upstream Debian packages](https://github.com/ilbers/isar/blob/master/doc/user_manual.md#creation-repo-caching-upstream-debian) > + > > ## Introduction > > @@ -686,3 +688,40 @@ ii crossbuild-essential-armhf 12.3 all Inf > /usr/share/doc/libhello-dev/copyright > ~# > ``` > + > +## Creation of local apt repo caching upstream Debian packages > + > +### Motivation > + > +Cache upstream debian packages to reduce time for further downloads and to be able to work offline. > + > +### Solution > + > + - Trigger creation of local apt caching Debian packages during image generation. > + > +``` > +bitbake -c cache_base_repo multiconfig:qemuarm-stretch:isar-image-base > +``` > + > + - Set `ISAR_USE_CACHED_BASE_REPO` in `conf/local.conf`: > + > +``` > +# Uncomment this to enable use of cached base repository > +#ISAR_USE_CACHED_BASE_REPO ?= "1" No that doesn't make sense to me. In my opinion its very important to not have such flags or commands. Caching and reproducible builds should be the default operation, upgrading or removing the cache should be an extra step. The cache should be created and used on every image build. On the first build the cache is empty and on the next build its full, so it will be used. Use apt preferences to git the cache a higher priority than the upstream repos to archive that. Also if the sources.list is different when setting `ISAR_USE_CACHED_BASE_REPO` than the image is different from the first one. Also please avoid those binary settings like `ISAR_USE_CACHED_BASE_REPO`. That just bad design because it leads to every tiny setting having an own variable. Use FEATURE variables with entries like: `ISAR_BUILD_FEATURE = "cross-build use-cache ..."` Yes cross-builds should have been done like this as well IMO. Cheers, Claudius > +``` > + - Remove build artifacts to use only local base-apt: > + > +``` > +sudo rm -rf tmp/stamps/ tmp/work/ tmp/deploy/isar-apt/ tmp/deploy/images > + > +``` > + > + - Trigger again generation of image (now using local caching repo): > + > +``` > +bitbake multiconfig:qemuarm-stretch:isar-image-base > +``` > + > +### Limitation > + > +So far the local base-apt repo is not gpg signed. > -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-54 Fax: (+49)-8142-66989-80 Email: ch@denx.de