public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Alexander Smirnov <asmirnov@ilbers.de>
To: Henning Schild <henning.schild@siemens.com>
Cc: isar-users@googlegroups.com
Subject: Re: [PATCH v3 1/4] meta-isar-bin: Add reprepro configs
Date: Mon, 2 Oct 2017 18:51:50 +0300	[thread overview]
Message-ID: <17a33d72-d209-c75b-5031-cd7d86a23915@ilbers.de> (raw)
In-Reply-To: <20170925132514.6257d606@md1em3qc>

On 09/25/2017 02:25 PM, Henning Schild wrote:
> 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.
> 

I've thought about this and tried to implement, but seems it's not the 
case here:

  - Default fetch task for each image will copy template to each image 
workspace, while it's needed only if there is no already generated config.

  - This config should be generated once per-distro.

So I think this should stay like it is for now.

Alex

> Henning
> 
>>   do_populate[stamp-extra-info] = "${DISTRO}-${MACHINE}"
>>   
>>   # Install Debian packages, that were built from sources
> 

-- 
With best regards,
Alexander Smirnov

ilbers GmbH
Baierbrunner Str. 28c
D-81379 Munich
+49 (89) 122 67 24-0
http://ilbers.de/
Commercial register Munich, HRB 214197
General manager: Baurzhan Ismagulov

  reply	other threads:[~2017-10-02 15:51 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
2017-10-02 15:51     ` Alexander Smirnov [this message]
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=17a33d72-d209-c75b-5031-cd7d86a23915@ilbers.de \
    --to=asmirnov@ilbers.de \
    --cc=henning.schild@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