From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6458972999552860160 X-Received: by 10.28.17.69 with SMTP id 66mr259910wmr.18.1503846847329; Sun, 27 Aug 2017 08:14:07 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 10.28.157.68 with SMTP id g65ls877990wme.18.canary-gmail; Sun, 27 Aug 2017 08:14:07 -0700 (PDT) X-Received: by 10.28.136.17 with SMTP id k17mr280335wmd.7.1503846847069; Sun, 27 Aug 2017 08:14:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1503846846; cv=none; d=google.com; s=arc-20160816; b=RtD94Z/jmISlRoE8Fxqy0Oh69Q8EpAJfnfa8qQMmIXK1X1tnIwS1UJSUWKuz/opgdm vgMftuxq00qNa8Pzjpq1yLqwRcYFi2KjlmkWr1QDyhpbrYQj3ff3Y/yYsHE1pHrxttmu VvHigx7s+3lKeTgBimqefp/Gpxh7g6o7IXsAM+xOIfI8/1T2hS+QL96IBH5qXxKNFYk5 OEDw4o82RsilGJ77YGAluoXQgh52QvKgpSlnUz/FMp9+N6rcXJOXmGJL2QyOBQoZaPpX IAXbkw7dWfB5aRfoVhvNibKPPYINpy2NYaxbYiR+mlp6D0T0Y8xMrG93aYc+25DqEdNs bxew== 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=wreCpRqFvh7/6Eku2KigKl+GdKPNDH75ocmdSs8H6jA=; b=wk4RvW4imgFb04Wpb9rET/Tw76ZPVPM4peWu3jWQESG1qwo87YC2QYiEj73o8vc+8f SszKQXvF43sAI6smth3NnTdmyVpSXG0nCwZIrpKTP+stRIVYfD4KFmF2um3XPOfFunyV IR3W7Klrw2ReKKGuWizqdtQpprNUZ8nRPqfPv3vuH8GRFcFZul7P/mmjxG7x/+BTMlx4 KhHzD9yHX0rqqwWN4y+zwEUaUofdOG5p/c4NqCUMCpctHOUmTVI9lXp/Kv+ZB+YjL5DA 7BbGAa6JHUSO1ZvYIPGIZTOw7cT07urPjp75phxMufa6BqBUFAf0VcmN7hDGb9P5VlI/ yyzw== 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 e123si353994wmd.8.2017.08.27.08.14.06 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 27 Aug 2017 08:14:06 -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 v7RFDkek006455 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 27 Aug 2017 17:13:56 +0200 From: Alexander Smirnov To: isar-users@googlegroups.com Cc: Alexander Smirnov Subject: [PATCH 6/6] doc/technical_overview: Describe binary cache Date: Sun, 27 Aug 2017 18:13:39 +0300 Message-Id: <20170827151339.12806-7-asmirnov@ilbers.de> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170827151339.12806-1-asmirnov@ilbers.de> References: <20170827151339.12806-1-asmirnov@ilbers.de> X-TUID: Ub2oRxhkZXe8 Describe Isar binary cache feature. Signed-off-by: Alexander Smirnov --- doc/technical_overview.md | 59 +++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 55 insertions(+), 4 deletions(-) diff --git a/doc/technical_overview.md b/doc/technical_overview.md index 20e08b4..b3265dc 100644 --- a/doc/technical_overview.md +++ b/doc/technical_overview.md @@ -100,6 +100,43 @@ Target filesystem lifecycle can be described as following: - According to the list of custom packages in bitbake recipes, the initial filesystem will be populated by successfully built packages. +## 2.5 Binary Cache + +As mentioned above, apart from fetching binary packages from upstream apt +repositories, Isar is able to build custom packages from sources. To simplify +further custom packages management, Isar implements binary caching. + +Binary cache is a typical apt repository created by Isar to store newly built +packages. This repository has mainly two goals: + + - Simplify image filesystem populating and distributing binary packages to + other systems. + + - Reuse these binaries in next builds to avoid re-building from the + scratch everytime. + +Current Isar tree provides default cache repository: `meta-isar-bin`. +Isar binary cache is described by the following files: + + - `meta-isar-bin/conf/layer.conf` + + - `meta-isar-bin/files/distributions.in` + +After system build is complete, this repo contains binary packages for all the +distros and architectures, requested in multiconfig. So this folder can be +published and used as apt repo for already installed systems. + +An important note, that Isar creates local repositories using dedicated Debian +tool reprepro. This tool takes care about: + + - Maintenance of multiple architectures and distros. + + - Internal packages database management. + + - Repo signatures management. + + - Requests about available packages in repo (name, version etc...). + # 3 Isar Internal Processes ## 3.1 General Overview @@ -174,10 +211,17 @@ contain debian folder. The build process is implemented in 3. Run dpkg-buildpackage -4. Task `do_install`: install successfully built packages +4. Further package processing depends on binary cache option: + + 1. Task `do_install_to_deploy`: install successfully built packages if + binary cache is disabled: `${BUILDCHROOT_DIR}/home/build/${PN}/*.deb` to deploy directory `${DEPLOY_DIR_DEB}` + 2. Task `do_install_to_cache`: install successfully built packages to + binary cache repository: + `${BUILDCHROOT_DIR}/home/build/${PN}/*.deb` to `${DIR_CACHE}` + ## 3.5 Populate Target Filesystem Each target image can be extended by custom packages listed in IMAGE_INSTALL @@ -185,11 +229,18 @@ variable. Task `do_populate` performs the following: 1. Parse IMAGE_INSTALL variable. -2. Find respective packages in `${DEPLOY_DIR_DEB}`. +2. Further steps depends in binary cache option. +If binary cache is disabled: + + 1. Find respective packages in `${DEPLOY_DIR_DEB}`. + + 2. Copy packages to deb folder in dedicated target filesystem. + + 3. Execute dpkg command in chroot for all the copied packages. -3. Copy them to deb folder in dedicated target filesystem. +If binary cache is enabled: -4. Execute dpkg command in chroot for all the copied packages. + 1. Call apt-get install in chroot in target image filesystem. ## 3.6 Generate Bootable Image -- 2.1.4