public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: "Andreas J. Reichel" <andreas.reichel.ext@siemens.com>
To: isar-users@googlegroups.com
Cc: Andreas Reichel <andreas.reichel.ext@siemens.com>
Subject: [PATCH v10 5/6] docs: Update user_manual.md
Date: Thu,  2 May 2019 13:37:43 +0200	[thread overview]
Message-ID: <20190502113744.31753-6-andreas.reichel.ext@siemens.com> (raw)
In-Reply-To: <20190502113744.31753-1-andreas.reichel.ext@siemens.com>

From: Andreas Reichel <andreas.reichel.ext@siemens.com>

Explain DISTRO_BOOTSTRAP_KEYS and THIRD_PARTY_APT_KEYS.
Give an example on how to use the variables to include docker-ce.

Signed-off-by: Andreas Reichel <andreas.reichel.ext@siemens.com>
---
 doc/user_manual.md | 41 ++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 40 insertions(+), 1 deletion(-)

diff --git a/doc/user_manual.md b/doc/user_manual.md
index ba57319..eb877b1 100644
--- a/doc/user_manual.md
+++ b/doc/user_manual.md
@@ -321,6 +321,7 @@ Some other variables include:
  - `HOST_DISTRO_APT_SOURCES` - List of apt source files for SDK root filesystem. This variable is optional.
  - `HOST_DISTRO_APT_PREFERENCES` - List of apt preference files for SDK root filesystem. This variable is optional.
  - `DISTRO_APT_PREMIRRORS` - The preferred mirror (append it to the default URI in the format `ftp.debian.org my.preferred.mirror`. This variable is optional.
+ - `THIRD_PARTY_APT_KEYS` - List of gpg key URIs used to verify apt repos for apt installation after bootstrapping
  - `CFG_ROOT_PW` - The encrypted root password to be set. To encrypt password use `mkpasswd`. You find `mkpasswd` in the `whois` package of Debian. If the variable is empty, root login is passwordless.
  - `CFG_ROOT_LOCKED` - If set to `1` the root account will be locked.
 
@@ -368,10 +369,12 @@ Isar can generate various images types for specific machine. The type of the ima
 The distro is defined by the set of the following variables:
 
  - `DISTRO_APT_SOURCES` - List of apt source files
- - `DISTRO_APT_KEYS` - List of gpg key URIs used to verify apt repos
+ - `DISTRO_BOOTSTRAP_KEYS` - List of gpg key URIs used to verify apt bootstrap repo
  - `DISTRO_APT_PREFERENCES` - List of apt preference files
  - `DISTRO_KERNELS` - List of supported kernel suffixes
 
+The first entry of DISTRO_APT_SOURCES is used for bootstrapping.
+
 Below is an example for Raspbian Stretch:
 ```
 DISTRO_APT_SOURCES += "conf/distro/raspbian-stretch.list"
@@ -783,3 +786,39 @@ bitbake multiconfig:qemuarm-stretch:isar-image-base
 ### Limitation
 
 Files fetched with the `SRC_URI` protocol "apt://" are not yet cached.
+
+## Add foreign packages from other repositories to the generated image
+
+### Motivation
+
+When building embedded systems with Isar, one might want to include packages that are not provided by debian by default. One example is docker-ce.
+
+### Approach/Solution
+
+Add a new sources list entry to fetch the package from, i.e. include a new apt source mirror. Then add the needed apt key for the third party repository. Add the wanted package to the IMAGE_PREINSTALL variable.
+
+### Example
+
+Add docker-ce from arm64:
+
+Create a new layer containing `conf/distro/docker-stretch.list` with the following content:
+
+```
+deb [arch=arm64] https://download.docker.com/linux/debian	stretch	stable
+```
+
+Include the layer in your project.
+
+To the local.conf add:
+
+```
+IMAGE_PREINSTALL += "docker-ce"
+THIRD_PARTY_APT_KEYS_append = " https://download.docker.com/linux/debian/gpg;md5sum=1afae06b34a13c1b3d9cb61a26285a15"
+DISTRO_APT_SOURCES_append = " conf/distro/docker-stretch.list"
+```
+
+And build the corresponding image target:
+
+```
+bitbake multiconfig:qemuarm64-stretch:isar-image-base
+```
-- 
2.21.0


  parent reply	other threads:[~2019-05-02 11:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-02 11:37 [PATCH v10 0/6] Fix usage of additional apt keys and repos Andreas J. Reichel
2019-05-02 11:37 ` [PATCH v10 1/6] Simplify and enhance apt-keyring generator Andreas J. Reichel
2019-05-02 11:37 ` [PATCH v10 2/6] Use apt-key to generate keyrings Andreas J. Reichel
2019-05-02 11:37 ` [PATCH v10 3/6] If we use a custom keyring debootstrap may fall to https Andreas J. Reichel
2019-05-02 11:37 ` [PATCH v10 4/6] raspbian-stretch: Use DISTRO_BOOTSTRAP_KEYS Andreas J. Reichel
2019-05-02 11:37 ` Andreas J. Reichel [this message]
2019-05-02 11:37 ` [PATCH v10 6/6] Give keyring to debootstrap when using cached base repo Andreas J. Reichel
2019-05-13  4:57 ` [PATCH v10 0/6] Fix usage of additional apt keys and repos Maxim Yu. Osipov

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=20190502113744.31753-6-andreas.reichel.ext@siemens.com \
    --to=andreas.reichel.ext@siemens.com \
    --cc=isar-users@googlegroups.com \
    /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