From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6463342265335021568 X-Received: by 10.46.85.7 with SMTP id j7mr2103579ljb.7.1505472702096; Fri, 15 Sep 2017 03:51:42 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 10.28.87.148 with SMTP id l142ls262880wmb.14.canary-gmail; Fri, 15 Sep 2017 03:51:41 -0700 (PDT) X-Google-Smtp-Source: ADKCNb6R4chiBSfRDu5XR4XUOMrzPCavGi6PbyZi3CLTiUJmiCP6KZx83aPQ5PfC5FhvIdF32WOq X-Received: by 10.223.160.199 with SMTP id n7mr1518440wrn.15.1505472701680; Fri, 15 Sep 2017 03:51:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505472701; cv=none; d=google.com; s=arc-20160816; b=IgMeRioGH+zsAF6R3jd8yW5bkD2d5MKpQ1nXyRVcGksrEF/OViP8z4qjjf3OeoOaIB XqKMjswi4pZJhhsvTmRNeevHMbfXBn+PgJtrKOtZyuMJzQqHV+fCHKo7i28vHN2DJHad eMs7ybQa1R80r9WRTCWYDZuQpm8TBvU7S9aqq3w0l9pSYSi/7cY2kf2V0xAH0ybfz0Ms jP0wkT2QsxPQnjtBRF2oZLq6YbCB3jneSfxdCCdc6FgTyQiyZRvarY57y8odXOyExWZs KSErGdIWCG7uOinqq8hn5Zc7G/8oxYD5iX0FHy8NSo+WYuYp9SYg9UlgCpsXCPXtov4u +ecA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:references:in-reply-to:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=mKQZyKLusFAdJmLLGxES7gVZS7DNCHCWJ4U0/mQ1CRQ=; b=X1aG3GwAlSOzik/YDLitmi2mAYaxgtZuMNV7ustqTx2d6LwYJ7fa4xpjEOcTUqEKcH iv4iu/hOMxg/bDnpofjp/ThJpm5GaC3+sSb9Ec3fBGoJI7f3c5n6JcsElyfD5nqITkMW QZfW1+XGnMomcq+GCI2LYM+YUg5DC08A3GoJcre0wGbFmFXJ81F6JPdNgcEgc/toKYur EkWq8EBw4in4DiMFhDq+52DROZVCoL4p6W8HjNQlp5sS6cnuOIgRsuZ8yzA20PRfxLA4 Fr75et3WQMrMtKDDAdkzNSxKJVz3d4pBLliOY6tcZCfU9M5MoU5y3RhpThRn6r1YTD9e neBw== 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 b130si9556wme.0.2017.09.15.03.51.41 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Sep 2017 03:51:41 -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 v8FApfMq026713 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 15 Sep 2017 12:51:41 +0200 Received: from md1em3qc.ww002.siemens.net ([139.25.68.40]) by mail1.siemens.de (8.15.2/8.15.2) with ESMTP id v8FApe5H012063; Fri, 15 Sep 2017 12:51:41 +0200 From: Henning Schild To: isar-users@googlegroups.com Cc: Alexander Smirnov , Henning Schild Subject: [PATCH 4/4] doc: Update technical overview Date: Fri, 15 Sep 2017 12:51:51 +0200 Message-Id: X-Mailer: git-send-email 2.13.5 In-Reply-To: References: MIME-Version: 1.0 In-Reply-To: References: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-TUID: Yz4GvJYFA1SP The introduction of 'dpkg-raw' opens new ways to create custom packages. Cover that in the overview. Signed-off-by: Henning Schild --- doc/technical_overview.md | 44 ++++++++++++++++++++++++++++++-------------- 1 file changed, 30 insertions(+), 14 deletions(-) diff --git a/doc/technical_overview.md b/doc/technical_overview.md index e83cbd0..f8ed9ee 100644 --- a/doc/technical_overview.md +++ b/doc/technical_overview.md @@ -24,7 +24,7 @@ executing process. Recipes in Isar can be split in two categories: infrastructure, manages Debian tools execution for package building and installation, generation root file system images - - User recipes: custom user applications, that should be builе from sources + - User recipes: custom user applications, that can be built from sources There are two types of dependencies in Isar: @@ -155,26 +155,42 @@ here: `meta-isar/recipes-core/images/files`, and it implements `do_build` task. ## 3.4 Building Custom Packages -Isar provides possibility to build Debian packages from sources. This features -works with Debian-like source packages, i.e. the source code tree should -contain debian folder. The build process is implemented in -`meta/classes/dpkg.bbclass` and consists from the following steps: +Isar provides the possibility to build Debian packages from sources. This +features works with Debian-like source packages, i.e. the source code tree +should contain debian folder. This build process is implemented in +`meta/classes/dpkg.bbclass`. -1. Task `do_fetch`: fetch source code from external link +Another way of creating Debian packages is implemented in +`meta/classes/dpkg-raw.bbclass`. This class can be used for customizations that +are not based on source code that should become a package. -2. Task `do_unpack`: unpack source code to `${WORKDIR}` +Both consist of the following steps: -3. Task `do_build`: mount folder with source code to buildchroot, switch - to buildchroot using chroot command and run `build.sh` script. The - `build.sh` script performs the following: +1. Task `do_fetch`: fetch files from external links - 1. Go to `/home/build/${PN}` +2. Task `do_unpack`: unpack those files to `${WORKDIR}` - 2. Get list of dependencies from debian/control and install them using apt. +3. Task `do_populate_package` _only_ for `dpkg-raw`: copy all you want in your + debian package to `${D}`, install hooks in `${D}/DEBIAN` - 3. Run dpkg-buildpackage +4. Task `do_build`: mount folder with unpacked files to buildchroot, execute + the actual build function `dpkg_runbuild`, and finally umount again -4. Task `do_install`: install successfully built packages + 4.1. the `dpkg_runbuild` function of `dpkg.bbclass` runs `build.sh` in the + buildchroot. That performs the following: + + 1. Go to `/home/build/${PN}` + + 2. Get list of dependencies from debian/control and install them. + + 3. Run dpkg-buildpackage + + 4.2. the `dpkg_runbuild` function of `dpkg-raw.bbclass` basically runs + `dpkg-deb` to construct a Debian package from a folder of files, + without compiling anything + + +5. Task `do_install`: install successfully built packages `${WORKDIR}/*.deb` to deploy directory `${DEPLOY_DIR_DEB}` ## 3.5 Populate Target Filesystem -- 2.13.5