From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6467463440282681344 X-Received: by 10.25.81.218 with SMTP id g87mr494597lfl.26.1506338696658; Mon, 25 Sep 2017 04:24:56 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 10.223.160.247 with SMTP id n52ls2655413wrn.6.gmail; Mon, 25 Sep 2017 04:24:56 -0700 (PDT) X-Google-Smtp-Source: AOwi7QA2R/BaQNf0Ked4mY+FOecfMgzeRV8pQ5nlbX81C9VR4G43aUu9iLDr0CkWBuFWUhibm0AF X-Received: by 10.28.145.82 with SMTP id t79mr14336wmd.20.1506338696345; Mon, 25 Sep 2017 04:24:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506338696; cv=none; d=google.com; s=arc-20160816; b=wztYTSDYU7LMKRDjqEEv/PAUFU0mreiGB0l/LO1HzkWOqgSBT8shkyeSRiQcRC0NuT HtztfOpv0XCa5wOd7MEeQL0oM2cqPkTtVZpW3+O0quBe9FoQsafyUFxmsFiJ3PqA/DBv 3xg3fByBoXri+JsA6KGrQJi//i5RcnYVD4ODI/QXQFHfJk0rlXYi893YbLwNsWXSnIh3 8tQ3CP+VOqydLbIyewA6xKUK/vAR6vLREUU3XrIf2EZqvscknq2P1gXlNcJobPgNSj2D 9jW7CRvVFMkS4tx5Mrn5kHKpQ7cIjkDb467K3TK8f1G3gvQax6BSKmz0JAF+zf61so7+ p+og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:arc-authentication-results; bh=wjRsJNnhAkK/GcGP6MBeICCIsLzIPXJnBdd+aOyGBGI=; b=0gVkZ2Chq1oNR4QDnhvylQypL2Vu8wgFdwU4qquRWDtuMFX31sPYgW1JTiM2rNqen6 t32vmzvUnR22LWSlWzgc5fKqDBo05lleGFXrTWLdJyR0/guloNqbslkOGL7BWOJ+q6LA 7YGpWrRmAymnldygWBWWdROx+zDc4drPD2FgyA4fB2qomKz7En0N7225OmCmceS6cIOQ KmopRRM4W+/mXzfUBKj6uJ7Xi9c9oTsiv6ShAtEVUcxdPBdxgRTjYcP52LAV/lqFZVkR 5l/O/Iq6Us9vtMI9t9mdUemy1v3MLy3ys25RSVrfTnyiyMlWC9rHOWXH3c03Zaj9VXDO I3DQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 192.35.17.2 is neither permitted nor denied by domain of henning.schild@siemens.com) smtp.mailfrom=henning.schild@siemens.com Return-Path: Received: from thoth.sbs.de (thoth.sbs.de. [192.35.17.2]) by gmr-mx.google.com with ESMTPS id 200si694533wmj.0.2017.09.25.04.24.56 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Sep 2017 04:24:56 -0700 (PDT) Received-SPF: neutral (google.com: 192.35.17.2 is neither permitted nor denied by domain of henning.schild@siemens.com) client-ip=192.35.17.2; Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 192.35.17.2 is neither permitted nor denied by domain of henning.schild@siemens.com) smtp.mailfrom=henning.schild@siemens.com Received: from mail3.siemens.de (mail3.siemens.de [139.25.208.14]) by thoth.sbs.de (8.15.2/8.15.2) with ESMTPS id v8PBOtY5027086 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 25 Sep 2017 13:24:56 +0200 Received: from md1em3qc ([139.25.68.40]) by mail3.siemens.de (8.15.2/8.15.2) with ESMTP id v8PBOtrN002779; Mon, 25 Sep 2017 13:24:55 +0200 Date: Mon, 25 Sep 2017 13:25:14 +0200 From: Henning Schild To: Alexander Smirnov Cc: Subject: Re: [PATCH v3 1/4] meta-isar-bin: Add reprepro configs Message-ID: <20170925132514.6257d606@md1em3qc> In-Reply-To: <20170925100000.5368-2-asmirnov@ilbers.de> References: <20170925100000.5368-1-asmirnov@ilbers.de> <20170925100000.5368-2-asmirnov@ilbers.de> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TUID: ZQwxQJduJb5h Am Mon, 25 Sep 2017 12:59:57 +0300 schrieb Alexander Smirnov : > Add template for reprepro configuration file and function that > generates final config for specific deistro. > > Signed-off-by: Alexander Smirnov > --- > 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