From: Benedikt Niedermayr <benbrenson89@googlemail.com>
To: isar-users@googlegroups.com
Subject: Adding additional apt repositories during the build
Date: Fri, 9 Nov 2018 11:17:39 +0100 [thread overview]
Message-ID: <42954dda-cc28-4cf4-e1fe-a3b1b636a4a3@googlemail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1657 bytes --]
Hi guys,
I wanted to add additional repositories at the beginning of the build
(e.g for installing docker-ce) and I tried to add it to the
"DISTRO_APT_KEYS" variable.
But doing that way debootstrap doesn't seem to work anymore:
| I: Retrieving InRelease
| I: Retrieving Release
| I: Retrieving Release.gpg
| I: Checking Release signature
| E: Release signed by unknown key (key id EF0F382A1A7B6500)
| WARNING: exit code 1 from a shell command.
I think the default gpg keyring gets overwritten.
Do you have any proposals or clean solutions for this?
For now I implemented a little hack to get things to work.
Maybe we need a functionality in Isar which works like a hook based
mechanism, so we can add those
to the initial build step when bootstrapping the rootfs.
isar-bootstrap-host.bbappend & isar-bootstrap-target.bbappend:
do_bootstrap_append() {
sudo install -v -m755 ${WORKDIR}/custom-setup.sh ${ROOTFSDIR}/
sudo flock "${ISAR_BOOTSTRAP_LOCK}"-c "\
set -e
export DISTRO_SUITE="${@get_distro_suite(d, True)}"
export DISTRO_ARCH="${DISTRO_ARCH}"
chroot "${ROOTFSDIR}" /custom-setup.sh
"
sudo rm -f ${ROOTFSDIR}/custom-setup.sh
}
custom-setup.sh:
GPG_URL="https://download.docker.com/linux/debian/gpg"
apt-get install --no-install-recommends -y curl apt-transport-https
ca-certificates curl gnupg2 software-properties-common
curl -fsSL $GPG_URL |apt-key add -
echo "deb [arch=$DISTRO_ARCH] https://download.docker.com/linux/debian \
$DISTRO_SUITE stable"|\
tee /etc/apt/sources.list.d/docker.list
apt-get update -y
Regards
Benedikt
[-- Attachment #2: Type: text/html, Size: 5178 bytes --]
next reply other threads:[~2018-11-09 10:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-09 10:17 Benedikt Niedermayr [this message]
2018-11-09 10:53 ` 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=42954dda-cc28-4cf4-e1fe-a3b1b636a4a3@googlemail.com \
--to=benbrenson89@googlemail.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