From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6465956022541352960 X-Received: by 10.46.43.133 with SMTP id r5mr2037042ljr.4.1505472702063; Fri, 15 Sep 2017 03:51:42 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 10.25.81.11 with SMTP id f11ls265291lfb.26.gmail; Fri, 15 Sep 2017 03:51:41 -0700 (PDT) X-Google-Smtp-Source: AOwi7QBGHAopGN6rygT9KSduzJn2LrHAwcCFa2sHDZuFukMBj3F2HoRNrVsiIQhnZJMKeV5lYfw8 X-Received: by 10.25.212.195 with SMTP id l186mr127643lfg.31.1505472701628; 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=MGg8vCATNhNVlhaf59lbdgfIIJfeam6sX115kfgKUnG3fPsCgOPFTggQsKJaIl1Wvw SGmqvkvn1PcNgfNZnAhhjzpGAMSSrcczAAhpxIfUq32PqIFTj18oyysk2N+AKthJhJgP mpb+oJyR8UOPgxx2Y6L0w40RoPoL5Fm5AwV/t0gdTiYShK6EZuNKCho/5wySE28zeyia azbPwt5Uh+aaNKSWFb/ttrM+nwxSUwJ3B08Zv3zA/FJVz1XK3hdMifLArRoutOzazcTZ Tcxf5DRv8GOKFH80ZULnQcUuKFFNfSHljX5pWsqKLPRt15M6/7KXbyG/uAktXMDec49L yhSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=0Ufv2JRFOj3XcCCG1fGTxWmJEWApySLezOmB5IfNnQI=; b=gz4La/6ZgCALaLWcr4qnsd+amsu76o+kM1UicMMpq36/RIH51N4WzU7HncMEHNHYmG ASpMI8iRDuWm7Mr0PnqzJx9SfEsOj3irplGRJD5HIAApUwYTgBfFCCMjDGjDM8zJpGUu vBsBeOaVV/Owoike0VVYV9ZU95I7tUJeNI5FRuVHLXDvtH8Q2gGVBIjLD5GpyjwR+6Fd hRtVMcDYGpy1JPDk2H/nU/O5m+GJoOzSftDPCxzRE2YBA35jZ7K/YkxgfhUdsYwQdGL7 HBH56l3nGvn7kmm9m4qZh6PqirUcky+f9qibkgqkWRjyQ/BHnhPYmt8aHXOqFUQuHJt6 Ie3Q== 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 l133si11623wmb.3.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 v8FApfsF026710 (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 v8FApe5G012063; Fri, 15 Sep 2017 12:51:41 +0200 From: Henning Schild To: isar-users@googlegroups.com Cc: Alexander Smirnov , Henning Schild Subject: [PATCH 3/4] doc: update user-manual.md Date: Fri, 15 Sep 2017 12:51:50 +0200 Message-Id: X-Mailer: git-send-email 2.13.5 In-Reply-To: References: In-Reply-To: References: X-TUID: qTNJWQufpZCx The introduction of 'dpkg-raw.bbclass' changed the way people can customize their images. Cover the new way in the manual. Along the way also fix a few mistakes and slightly change structure. Signed-off-by: Henning Schild --- doc/user_manual.md | 52 +++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 43 insertions(+), 9 deletions(-) diff --git a/doc/user_manual.md b/doc/user_manual.md index 4707a68..e2837c4 100644 --- a/doc/user_manual.md +++ b/doc/user_manual.md @@ -254,9 +254,9 @@ Isar workflow consists of stages described below. This filesystem is used as a build environment to compile custom packages. It is generated using `apt` binaries repository, selected by the user in configuration file. Please refer to distro configuration chapter for more information. -### Custom Package Compilation +### Custom Package Generation -During this stage Isar processes custom packages selected by the user and generates binary `*.deb` packages for the target. Please refer to custom packages compilation section for more information. +During this stage Isar processes custom packages selected by the user and generates binary `*.deb` packages for the target. Please refer to custom packages generation section for more information. ### Generation of Basic Target Filesystem @@ -336,14 +336,14 @@ DISTRO = "distro-name" --- -## Custom Package Compilation +## Custom Package Generation -Isar provides possibility to compile and install custom packages. The current version supports only building `deb` packages using `dpkg-buildpackage`, so the sources should contain the `debian` directory with necessary meta information. To add new package to image, it needs the following: +To add new package to an image, do the following: - - Create package recipe and put it in your `isar` layer. + - Create a package recipe and put it in your `isar` layer. - Append `IMAGE_INSTALL` variable by this recipe name. If this package should be included for all the machines, put `IMAGE_INSTALL` to `local.conf` file. If you want to include this package for specific machine, put it to your machine configuration file. -Please refer to `add custom application` section for more information about writing recipes. +Please refer to `Add a Custom Application` section for more information about writing recipes. --- @@ -484,12 +484,18 @@ Isar contains two image type classes that can be used as reference: ## Add a Custom Application -Before creating new recipe it's highly recommended to take a look into the BitBake user manual mentioned in Terms and Definitions section. +Before creating a new recipe it's highly recommended to take a look into the BitBake user manual mentioned in Terms and Definitions section. -Current Isar version supports building packages in Debian format only. The package must contain the `debian` directory with the necessary metadata. +Isar currently supports two ways of creating custom packages. -A typical Isar recipe looks like this: +### Compilation of debianized-sources +The `deb` packages are built using `dpkg-buildpackage`, so the sources should contain the `debian` directory with necessary meta information. This way is the default way of adding software that needs to be compiled from source. The bbclass for this approach is called `dpkg`. + +**NOTE:** If the sources do not contain a `debian` directory your recipe can fetch, create, or ship that. + + +#### Example ``` DESCRIPTION = "Sample application for ISAR" @@ -523,3 +529,31 @@ This approach prevents duplication of the license files in different packages. - `SRC_REV` - Source code revision to fetch. Please check the BitBake user manual for supported download formats. The last line in the example above adds recipe to the Isar work chain. + +### Packages without source + +If your customization is not about compiling from source there is a second way of creating `deb` packages. That way can be used for cases like: + + - packaging binaries/files that where built outside of Isar + - customization of the rootfs with package-hooks + - pulling in dependancies (meta-packages) + +The bbclass for this approach is called `dpkg-raw`. + +#### Example +``` +DESCRIPTION = "Sample application for ISAR" +MAINTAINER = "Your name here " +DEBIAN_DEPENDS = "apt" + +inherit dpkg-raw + +do_populate_package() { +.... +} +``` +For the variables please have a look at the previous example, the following new variables are used in this recipe: + - `MAINTAINER` - The maintainer of the `deb` package we create + - `DEBIAN_DEPENDS` - Debian packages that the package depends on + +Have a look at the `example-raw` recipe to get an idea how the `dpkg-raw` class can be used to customize your image. -- 2.13.5