From: Claudius Heine <claudius.heine.ext@siemens.com>
To: "Maxim Yu. Osipov" <mosipov@ilbers.de>, isar-users@googlegroups.com
Subject: Re: [PATCH 9/9] doc: Creation of local apt repo caching upstream Debian packages
Date: Tue, 2 Oct 2018 16:02:54 +0200 [thread overview]
Message-ID: <cea16bf5-66b4-32b0-495b-b6ba9713f587@siemens.com> (raw)
In-Reply-To: <20181002121907.18476-10-mosipov@ilbers.de>
Hi,
On 10/2/18 2:19 PM, Maxim Yu. Osipov wrote:
> Signed-off-by: Alexander Smirnov <asmirnov@ilbers.de>
> Signed-off-by: Maxim Yu. Osipov <mosipov@ilbers.de>
> ---
> 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
next prev parent reply other threads:[~2018-10-02 14:02 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-02 12:18 [PATCH 0/9] Introduce local apt repo to cache upstream debian packages for offline usage Maxim Yu. Osipov
2018-10-02 12:18 ` [PATCH 1/9] base-apt: Add helper class Maxim Yu. Osipov
2018-10-02 13:39 ` Claudius Heine
2018-10-02 12:19 ` [PATCH 2/9] base-apt: Introduce base implementaiton Maxim Yu. Osipov
2018-10-02 14:20 ` Claudius Heine
2018-10-02 12:19 ` [PATCH 3/9] isar-boot-strap: Add option to keep cache Maxim Yu. Osipov
2018-10-02 14:49 ` Claudius Heine
2018-10-02 12:19 ` [PATCH 4/9] image: Add cache_base_repo task Maxim Yu. Osipov
2018-10-02 12:19 ` [PATCH 5/9] isar-bootstrap: Make possible to reuse the cache Maxim Yu. Osipov
2018-11-02 11:40 ` Henning Schild
2018-10-02 12:19 ` [PATCH 6/9] buildchroot: Make it buildable from base-apt Maxim Yu. Osipov
2018-10-02 12:19 ` [PATCH 7/9] workaround: Use --allow-unauthenticated working with base-apt Maxim Yu. Osipov
2018-10-02 12:19 ` [PATCH 8/9] local.conf: Add option to use cached base repository Maxim Yu. Osipov
2018-10-02 12:19 ` [PATCH 9/9] doc: Creation of local apt repo caching upstream Debian packages Maxim Yu. Osipov
2018-10-02 14:02 ` Claudius Heine [this message]
2018-10-02 14:06 ` Jan Kiszka
2018-10-04 9:03 ` Baurzhan Ismagulov
2018-10-05 12:09 ` Claudius Heine
2018-10-11 16:33 ` Baurzhan Ismagulov
2018-10-02 14:05 ` Claudius Heine
2018-11-02 12:00 ` [PATCH 0/9] Introduce local apt repo to cache upstream debian packages for offline usage Henning Schild
2018-11-09 8:04 ` Jan Kiszka
2018-11-09 9:14 ` Baurzhan Ismagulov
2018-11-29 12:53 ` Henning Schild
2018-11-04 10:07 ` Jan Kiszka
2018-11-04 20:20 ` Jan Kiszka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cea16bf5-66b4-32b0-495b-b6ba9713f587@siemens.com \
--to=claudius.heine.ext@siemens.com \
--cc=isar-users@googlegroups.com \
--cc=mosipov@ilbers.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox