From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6467463440282681344 X-Received: by 10.223.175.194 with SMTP id y2mr262282wrd.8.1505894320722; Wed, 20 Sep 2017 00:58:40 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 10.46.65.217 with SMTP id d86ls68684ljf.21.gmail; Wed, 20 Sep 2017 00:58:40 -0700 (PDT) X-Google-Smtp-Source: AOwi7QD77y77GBbQn04Ksx2B0uD3fMlYkIRGaovMFwM4OPInZX+9JFYHpq5h3YmPpAAZnuVE2/Qi X-Received: by 10.25.162.201 with SMTP id l192mr121716lfe.39.1505894320266; Wed, 20 Sep 2017 00:58:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505894320; cv=none; d=google.com; s=arc-20160816; b=UhbSR5ezdWosmVB5Xip9bOSzJ/OsucUGgosEW1+J9ooIKN7CCwzWncXdEwPV68MXhO Dp2ybkgn8sZ4EKsCUoDt3eSwnh5N4GHq66GXlHRS3HH036i5UEEm5FKpO2imt/RR1KKO HPIFSGVfgwSua/bvNFitS5epkxm9F2q22iAyF8dwFkV8Hq/F57IBwQNrSGDu/10p3YWQ +Aes0osF1Ys5a0y/E7qO+kW1Zh9etaEJiNKXMe5j4L2XpI3vY87sPyUUGfgnOpe1IKWC VdSYlDRqldPlDZK3VYF5wg6HFQXvdKb1OdhJ0b0sXH50KRSCLZaq4SB0REswoGshonJc CiXQ== 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=0WPpqlRq89tIlIp1AxHIoJsKrcPScgDxY4IQwOK0Koc=; b=DpfoJtLQjmVAkicEXqOJ4KgqY1CmgtKtHj5m6+ULqSsgZfbzBPTJFYVxj1Jehepu5A iFyn7eejh1wmD+Giq3/e2wji8VmxT+2usaWumnZX3m1pgpnuqrssp0VM5q6Jh1Q+HEAY Wl1EoaVGKexWIbcLyM29IWHiKrhgAu0A8awG85dBdlDOHwpee8vESmkXaeoJhmvvYVvP j75hJ8UDuD4yaX1/7HFkjgAe+8dRiCoJY4NB6bJuBqR92U0JLSU/ObqOv/MfMSVHzR6c 8ZC9AEAAuNgMOrB3CuuQvVLlscpTTbw+i8u/IKFwcxmNRrmgR7DSK3BJA8sjVX4EaZu4 jg3g== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 192.35.17.28 is neither permitted nor denied by best guess record for domain of henning.schild@siemens.com) smtp.mailfrom=henning.schild@siemens.com Return-Path: Received: from goliath.siemens.de (goliath.siemens.de. [192.35.17.28]) by gmr-mx.google.com with ESMTPS id l133si81124wmb.3.2017.09.20.00.58.40 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Sep 2017 00:58:40 -0700 (PDT) Received-SPF: neutral (google.com: 192.35.17.28 is neither permitted nor denied by best guess record for domain of henning.schild@siemens.com) client-ip=192.35.17.28; Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 192.35.17.28 is neither permitted nor denied by best guess record for domain of henning.schild@siemens.com) smtp.mailfrom=henning.schild@siemens.com Received: from mail1.siemens.de (mail1.siemens.de [139.23.33.14]) by goliath.siemens.de (8.15.2/8.15.2) with ESMTPS id v8K7wdFT011952 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 20 Sep 2017 09:58:39 +0200 Received: from md1em3qc ([139.25.68.40]) by mail1.siemens.de (8.15.2/8.15.2) with ESMTP id v8K7wd60003844; Wed, 20 Sep 2017 09:58:39 +0200 Date: Wed, 20 Sep 2017 09:58:54 +0200 From: Henning Schild To: Alexander Smirnov Cc: Subject: Re: [PATCH v2 1/4] meta-isar-bin: Add reprepro configs Message-ID: <20170920095854.33e57f4a@md1em3qc> In-Reply-To: <20170919122052.28688-2-asmirnov@ilbers.de> References: <20170919122052.28688-1-asmirnov@ilbers.de> <20170919122052.28688-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: UheUIG9ryS9R Am Tue, 19 Sep 2017 15:20:49 +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 | 25 +++++++++++++++++++++++++ > 4 files changed, 40 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..30f241a 100644 > --- a/meta/classes/image.bbclass > +++ b/meta/classes/image.bbclass > @@ -10,6 +10,31 @@ IMAGE_ROOTFS = "${WORKDIR}/rootfs" > > inherit ${IMAGE_TYPE} > > +# Generate apt cache configuration file > +python __anonymous () { > + DISTRO = d.getVar("DISTRO", True) > + DEBFILESDIR = d.getVar("DEBFILESDIR", True) > + DEBCACHEDIR = d.getVar("DEBCACHEDIR", True) > + > + cache_conf_path = os.path.join(DEBCACHEDIR, DISTRO, "conf") > + cache_conf_file = os.path.join(cache_conf_path, "distributions") > + cache_conf_file_in = os.path.join(DEBFILESDIR, > "distributions.in") + > + import subprocess > + > + if not os.path.exists(cache_conf_path): > + os.makedirs(cache_conf_path) > + > + if not os.path.exists(cache_conf_file): > + f = open(cache_conf_file, "w") > + subprocess.check_call([ > + "sed", > + "-e", "s#{DISTRO_NAME}#" + d.getVar("DEBDISTRONAME", > True) + "#g", > + cache_conf_file_in, > + ], stdout=f) > + f.close() > +} Why is this not just a regular task early in the image chain? Henning > do_populate[stamp-extra-info] = "${DISTRO}-${MACHINE}" > > # Install Debian packages, that were built from sources