From: Henning Schild <henning.schild@siemens.com>
To: Alexander Smirnov <asmirnov@ilbers.de>
Cc: <isar-users@googlegroups.com>
Subject: Re: [PATCH v3 1/4] meta-isar-bin: Add reprepro configs
Date: Mon, 25 Sep 2017 13:25:14 +0200 [thread overview]
Message-ID: <20170925132514.6257d606@md1em3qc> (raw)
In-Reply-To: <20170925100000.5368-2-asmirnov@ilbers.de>
Am Mon, 25 Sep 2017 12:59:57 +0300
schrieb Alexander Smirnov <asmirnov@ilbers.de>:
> Add template for reprepro configuration file and function that
> generates final config for specific deistro.
>
> Signed-off-by: Alexander Smirnov <asmirnov@ilbers.de>
> ---
> meta-isar-bin/conf/layer.conf | 11 +++++++++++
> meta-isar-bin/files/distributions.in | 3 +++
> meta-isar/conf/bblayers.conf.sample | 1 +
> meta/classes/image.bbclass | 13 +++++++++++++
> 4 files changed, 28 insertions(+)
> create mode 100644 meta-isar-bin/conf/layer.conf
> create mode 100644 meta-isar-bin/files/distributions.in
>
> diff --git a/meta-isar-bin/conf/layer.conf
> b/meta-isar-bin/conf/layer.conf new file mode 100644
> index 0000000..3518184
> --- /dev/null
> +++ b/meta-isar-bin/conf/layer.conf
> @@ -0,0 +1,11 @@
> +# This software is a part of ISAR.
> +# Copyright (C) 2017 ilbers GmbH
> +
> +# Codename of the repository created by the caching class
> +DEBDISTRONAME = "isar"
> +
> +# Path to the caching repository
> +DEBCACHEDIR ?= "${LAYERDIR}/apt"
> +
> +# Path to the configuration files templates used by `reprepro`
> +DEBFILESDIR ?= "${LAYERDIR}/files"
> diff --git a/meta-isar-bin/files/distributions.in
> b/meta-isar-bin/files/distributions.in new file mode 100644
> index 0000000..cd214c6
> --- /dev/null
> +++ b/meta-isar-bin/files/distributions.in
> @@ -0,0 +1,3 @@
> +Codename: {DISTRO_NAME}
> +Architectures: i386 armhf amd64 source
> +Components: main
> diff --git a/meta-isar/conf/bblayers.conf.sample
> b/meta-isar/conf/bblayers.conf.sample index 80867e7..53a362b 100644
> --- a/meta-isar/conf/bblayers.conf.sample
> +++ b/meta-isar/conf/bblayers.conf.sample
> @@ -8,6 +8,7 @@ BBFILES ?= ""
> BBLAYERS ?= " \
> ##ISARROOT##/meta \
> ##ISARROOT##/meta-isar \
> + ##ISARROOT##/meta-isar-bin \
> "
> BBLAYERS_NON_REMOVABLE ?= " \
> ##ISARROOT##/meta \
> diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
> index 5bf9524..9ab9b19 100644
> --- a/meta/classes/image.bbclass
> +++ b/meta/classes/image.bbclass
> @@ -10,6 +10,19 @@ IMAGE_ROOTFS = "${WORKDIR}/rootfs"
>
> inherit ${IMAGE_TYPE}
>
> +CACHE_CONF_DIR = "${DEBCACHEDIR}/${DISTRO}/conf"
> +do_cache_config[dirs] = "${CACHE_CONF_DIR}"
> +do_cache_config[stamp-extra-info] = "${DISTRO}"
> +
> +do_cache_config() {
> + if [ ! -e "${CACHE_CONF_DIR}/distributions" ]; then
> + sed -e "s#{DISTRO_NAME}#"${DEBDISTRONAME}"#g" \
> + ${DEBFILESDIR}/distributions.in >
> ${CACHE_CONF_DIR}/distributions
> + fi
> +}
> +
> +addtask cache_config before do_fetch
Looking at the patch from Claudius, this one should probably use the
fetcher for the .in-file as well. The step would naturally go after
do_unpack.
Henning
> do_populate[stamp-extra-info] = "${DISTRO}-${MACHINE}"
>
> # Install Debian packages, that were built from sources
next prev parent reply other threads:[~2017-09-25 11:24 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-25 9:59 [PATCH v3 0/4] Basic binary cache implementation Alexander Smirnov
2017-09-25 9:59 ` [PATCH v3 1/4] meta-isar-bin: Add reprepro configs Alexander Smirnov
2017-09-25 11:25 ` Henning Schild [this message]
2017-10-02 15:51 ` Alexander Smirnov
2017-09-25 9:59 ` [PATCH v3 2/4] meta-isar-bin: Generate cache repos Alexander Smirnov
2017-09-25 11:43 ` Henning Schild
2017-09-25 12:31 ` Alexander Smirnov
2017-09-25 13:52 ` Henning Schild
2017-09-25 9:59 ` [PATCH v3 3/4] meta-isar-bin: Populate cache Alexander Smirnov
2017-09-25 10:00 ` [PATCH v3 4/4] meta-isar-bin: Install packages via multistrap Alexander Smirnov
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=20170925132514.6257d606@md1em3qc \
--to=henning.schild@siemens.com \
--cc=asmirnov@ilbers.de \
--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