From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6467463440282681344 X-Received: by 10.28.55.209 with SMTP id e200mr526487wma.0.1506333623174; Mon, 25 Sep 2017 03:00:23 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 10.46.86.197 with SMTP id k66ls2300846lje.2.gmail; Mon, 25 Sep 2017 03:00:22 -0700 (PDT) X-Google-Smtp-Source: AOwi7QCaZdpeGYxUEusUkFQjkOIUEv3cVb7BtU98GAuEwt/Og1cf8HNttdkgagj30mYwZo2jUHEW X-Received: by 10.46.43.93 with SMTP id q90mr408688lje.3.1506333622672; Mon, 25 Sep 2017 03:00:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506333622; cv=none; d=google.com; s=arc-20160816; b=e99QY33rtTKoS4qDK4LRlShUtimSjNXfZ2HePSLN7k1HkwDOjodL9bV84VX8qSLLSY 03zi/vcBKDVvcJGqMDzb4zCO7+wwtBkWq+qO/VGwj1dhSxmLpWb/5jVXJsOKXZMD63nC SIBZB3FBe2E37Cvltrlcs09Af+tuNtuXedDaOO3VKHDHQZH1tvAo/gIkJhwYQuy5I3IG Z99vtxLuNraFdjBKtWT8DrS6xFcCiYUyMsZuLId56GkRrTtoQ8QR8oGmvRqtjiECLu39 LYMeovIRGJbqMbH7k1CcTTtFx4Zx2KFvViTr/bj7Pni0LjzHvnJ3D3wysHY0dNGJqQtK gllg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=oqBo9nHN3X+30gfQSqwix5DZs00cNTn5Kx0yJHG1QYs=; b=dUqpz2R3wa6bvCMBeBATaq1EQZdDkjJv+n571H3u1jw68IZHvH1W13eSNcBTKXzb8l CNo0DgyeGYN4rNGFHYWG/oM6XayxkYo2P6eGBU/LqnfWZF8CzZFg0oPtywt3uqSp1TM8 g5GPQTlvbMtjxeD5cxU3ALmjfMVhQ6NIQcMNd9znvkUBBRxFYtHsIG682r1Pc2bdfVbW ppViTVl4OKSnc8qnOZrP5C31Hu7ZrOPFVLkuxDVu1bEckW4Ls64Euh9U0NVkNDb057Vv l2GqE7EkvsZug3nJyIYU56VwIUR6jmgytVLjtSUGzaYp++b+OUeY2pjz4oHIz3MzMRdA dXHA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: best guess record for domain of asmirnov@ilbers.de designates 85.214.62.211 as permitted sender) smtp.mailfrom=asmirnov@ilbers.de Return-Path: Received: from aqmola.ilbers.de (aqmola.ilbers.de. [85.214.62.211]) by gmr-mx.google.com with ESMTPS id 200si679424wmj.0.2017.09.25.03.00.22 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Sep 2017 03:00:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of asmirnov@ilbers.de designates 85.214.62.211 as permitted sender) client-ip=85.214.62.211; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: best guess record for domain of asmirnov@ilbers.de designates 85.214.62.211 as permitted sender) smtp.mailfrom=asmirnov@ilbers.de Received: from localhost.localdomain ([188.227.110.165]) (authenticated bits=0) by aqmola.ilbers.de (8.14.4/8.14.4/Debian-4+deb7u1) with ESMTP id v8PA07Fc002132 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 25 Sep 2017 12:00:13 +0200 From: Alexander Smirnov To: isar-users@googlegroups.com Cc: Alexander Smirnov Subject: [PATCH v3 1/4] meta-isar-bin: Add reprepro configs Date: Mon, 25 Sep 2017 12:59:57 +0300 Message-Id: <20170925100000.5368-2-asmirnov@ilbers.de> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170925100000.5368-1-asmirnov@ilbers.de> References: <20170925100000.5368-1-asmirnov@ilbers.de> X-TUID: axOZDpAS3wBO 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 + do_populate[stamp-extra-info] = "${DISTRO}-${MACHINE}" # Install Debian packages, that were built from sources -- 2.1.4