From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6465956022541352960 X-Received: by 10.28.109.193 with SMTP id b62mr905985wmi.16.1505723626982; Mon, 18 Sep 2017 01:33:46 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 10.25.161.206 with SMTP id k197ls401189lfe.29.gmail; Mon, 18 Sep 2017 01:33:46 -0700 (PDT) X-Google-Smtp-Source: AOwi7QAvE6axFZgcvE7VKghfuSb4MYqNqQ4seye6kcQjxlhdU4whF+n28aksTnWpoKMt0afZ44IT X-Received: by 10.46.32.39 with SMTP id g39mr2785386ljg.17.1505723626519; Mon, 18 Sep 2017 01:33:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505723626; cv=none; d=google.com; s=arc-20160816; b=O63NmHflC1+qvfJl8QIorKXqwCpvWCzaKdz/TvyXiT85yEkrDVrrtxuLXJU4NWZhfm txyRYTI5ndzXKhZq6m96UkaM/oOIT2emC+9+ERxyRQYiORxwrjo7WPiy9Q3nny/Xw9OB 1L7Iv5oKCbkSrzdvhhpDMJ/5UV8ckLkG9XQclcrpMfb59b84C2E9ERDbeNYwCnyoBWZj TmiTiiBS1+0Vi555a/RrYLlN5nGzgmeTXblZLH64YcMak361ERu+BphqSzTO40eiKhtq ViIGZIhY11FyBqqsjkoCnDDFcKRkh7KKyySeXEEQQJfEa8CBAcokVYogu4+PBP2TQXvC ifwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:to:subject :arc-authentication-results; bh=jgH8nhI8sojjqQNJlvSiXJ92UZzDpComTJHXcpLo014=; b=X48QwqSKAmyKR6C9Frcar3igTjDaGFifpgG3O6ikz1i2/NARQvYUGb902qPY0GXyKs MzRDTVC7rkXMMtzRKgI38q9RpT/1D4DdU0FhXA09r1uN289lpccTzW7b4USX09T8wAOV QxVGH5ok9Wgla2cIlJlUJdrxjoZzC4xfDtgaRY27MEDCQrfa5I34oEx5hf8A9WvkLBXR bxrFdzUsN8syKX9vhDwRPJuzlXeUI3N/ul8qOI6Ii1HrRb+I7b6J/7jEDXic2Gr8q1mm qA+ipwtVRxJQqj05q0X65xkn7GCsni4y9mAImTsOc693FjtdKBuQYjuYvutQ9PJvvXJV mLmg== 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 b130si379104wme.0.2017.09.18.01.33.46 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Sep 2017 01:33:46 -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 [10.0.2.15] ([188.227.110.165]) (authenticated bits=0) by aqmola.ilbers.de (8.14.4/8.14.4/Debian-4+deb7u1) with ESMTP id v8I8Xhmo005079 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Mon, 18 Sep 2017 10:33:45 +0200 Subject: Re: [PATCH 3/4] doc: update user-manual.md To: Henning Schild , isar-users@googlegroups.com References: From: Alexander Smirnov Message-ID: <6458a21d-133e-e57e-0e88-7da19d8a9328@ilbers.de> Date: Mon, 18 Sep 2017 11:33:38 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-TUID: snqFrub13GPc On 09/15/2017 01:51 PM, Henning Schild wrote: > 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() { > +.... Probably replace '....' by a comment. In the class there is already the line: bbnote "Put your files for this package in ${D}" Otherwise this example is incomplete and have no sense, because anyway you have to read dpkg-raw class. > +} > +``` > +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 From this context it's not clear, who is maintainer of the package: author, committer? If I add my new package, what should be written in this field? Also I've noticed that MAINTAINER variable is introduced in this example only, but previous example (### Compilation of debianized-sources) in the text doesn't have this field. Is there any reason of doing so? Alex > + - `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. >