From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6460145511220379648 X-Received: by 10.46.22.5 with SMTP id w5mr22942ljd.18.1504181652609; Thu, 31 Aug 2017 05:14:12 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 10.28.58.12 with SMTP id h12ls1301232wma.9.canary-gmail; Thu, 31 Aug 2017 05:14:12 -0700 (PDT) X-Google-Smtp-Source: ADKCNb7ZyJQkfOMcQ6Z816OwKvkBUXKNO6WuuVtfRmpy9h6mOXgua1fYN571mkicEmpg9Trg/pSG X-Received: by 10.223.166.105 with SMTP id k96mr314333wrc.2.1504181652262; Thu, 31 Aug 2017 05:14:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1504181652; cv=none; d=google.com; s=arc-20160816; b=FJgclRaYtHG2L2V5wEQ8SMr1jvQmjscrCKW/NCg1eJL5zkdopy5k9hNkuDHVD3i7CI 8NbZQntGfea7PjooiPzwt3kAMi9eSofWTbCt2qLaPxcZHmiS6D0SKtFiIR80QDKToRbs R3NxigIJD3CCSMtBlYA9tDVdMrBWOkWbF8XsCBSQwVkWh1ygO6tbLmct3Mn5mRHiKzmx 70CGdiu3/bXMwyrgqPP5+ztsqNH1g1RdDJSpXsu9aldcrgGyXxoNAqYR2/mJFVvgxG4T OYZUJwIpFTN2CTsTTdQmz17FRGsocZyLLR8k64w8zSeBGCO4Wme8TqfikpHxoRsXxxen 2lGQ== 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:cc:to:subject :arc-authentication-results; bh=r6lBBfGXIEnQcjx1HRDR95jBplxrkkQY82Cs8DPy4JU=; b=RP9CqP1r/Kf2t0Aj5woI8fzVi1Q0/c9H2Qv2YihMm8eMIDkrJUBTiZPIdrD41jxTWx 2YHiuxpGsWY/n2C26IH2Miann8S1vHTVRKU/FUaLPuUS2+IYU+01HN1tRRPqNTepXhEn ztFqn5BnnHslWUQ214foJWbyjLrVvEi51MxOcBK3A778oUWG/SlU8x2J6gijW5pgxQ7f fYhbvnLoQ3ZuCVgyqvdH+KA6tqdSLm3Xv9jV/m5P4Fxo3KCc4LIFp3Fg6ABn5ueTMuk3 GYM8xjjZCGF7TcVGbWKUymKqBDtwyB9yJIcKZfgnmOYSjdZgx8XSQtKXK5Z/VCKrgLh9 bSiw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 194.138.37.40 is neither permitted nor denied by best guess record for domain of claudius.heine.ext@siemens.com) smtp.mailfrom=claudius.heine.ext@siemens.com Return-Path: Received: from gecko.sbs.de (gecko.sbs.de. [194.138.37.40]) by gmr-mx.google.com with ESMTPS id 75si74wma.7.2017.08.31.05.14.12 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 31 Aug 2017 05:14:12 -0700 (PDT) Received-SPF: neutral (google.com: 194.138.37.40 is neither permitted nor denied by best guess record for domain of claudius.heine.ext@siemens.com) client-ip=194.138.37.40; Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 194.138.37.40 is neither permitted nor denied by best guess record for domain of claudius.heine.ext@siemens.com) smtp.mailfrom=claudius.heine.ext@siemens.com Received: from mail1.sbs.de (mail1.sbs.de [192.129.41.35]) by gecko.sbs.de (8.15.2/8.15.2) with ESMTPS id v7VCEBKS012731 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 31 Aug 2017 14:14:11 +0200 Received: from [139.25.68.223] (linux-ses-ext02.ppmd.siemens.net [139.25.68.223]) by mail1.sbs.de (8.15.2/8.15.2) with ESMTP id v7VCEAOI011648; Thu, 31 Aug 2017 14:14:11 +0200 Subject: Re: [PATCH 5/6] meta/dpkg: add dpkg-custom class To: Henning Schild , Jan Kiszka Cc: isar-users@googlegroups.com, Alexander Smirnov , Christian Storm , Claudius Heine References: <356cb2c3f7dfead49d75580fdff10dfa8c41232e.1504119538.git.henning.schild@siemens.com> <75fe7dd9-7cf0-9f10-7060-64b69fa38194@siemens.com> <4ea25dde-acf8-f8e7-1153-9c33cabef4e3@siemens.com> <20170831113233.02d8c5b5@md1em3qc> From: Claudius Heine Message-ID: <7c037e42-d6d5-db90-74e8-0c9b2ee94d2d@siemens.com> Date: Thu, 31 Aug 2017 14:14:10 +0200 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: <20170831113233.02d8c5b5@md1em3qc> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-TUID: ujnRXeIVyY5o On 08/31/2017 11:32 AM, Henning Schild wrote: > Am Thu, 31 Aug 2017 10:42:53 +0200 > schrieb Jan Kiszka : > >> On 2017-08-31 10:38, [ext] Claudius Heine wrote: >>> Hi >>> >>> On 08/30/2017 09:03 PM, [ext] Henning Schild wrote: >>>> Issues: >>>> 1. full customizations of the images is hard to impossible to >>>> realize in a layer without touching Isar >>>> 1.1. there is no easy way to just copy a file into the image >>>> 1.2. configuration (passwords, groups, cfg-files changes) can not >>>> be done in a layer, there is no way too hook into multistrap or the >>>> configure-script >>>> >>>> Change: >>>> Introduce a class that lets users create custom debian packages on >>>> the fly, without having to create a /debian directory and actually >>>> building. That allows you to pull in debian-dependencies, you >>>> could have a package that has no content and is just there to >>>> install what you need for a feature of your product. >>>> Using package hooks (preinst, postinst ..) you can configure >>>> pretty much all you want when installing the package. >>>> The package can contain actual payload as well, basically any >>>> files that come from "somewhere else". Say binary data like >>>> wallpapers, sound files or application binaries. >>>> >>>> Impact: >>>> This patch addresses the metioned issue in a way that uses debian >>>> mechanism. All the customizations will enjoy features like >>>> - collission protection (multiple packages providing the same file) >>>> - config file protection >>>> - versioning and the ability to deploy your changes in an >>>> updateable way >>>> >>>> This patch introduces a major new feature to Isar. >>>> >>>> This class introduces a new class for building debian packages on >>>> the fly. They can basically contain anything from random sources, >>>> where building happens outside of Isar. It also allows to create >>>> meta-packages that contain nothing but pull in dependencies, once >>>> all our packets come in via multistrap that will come in handy. >>>> For rootfs configuration you would use post- and pre- scripts just >>>> like regular debian packages do. >>>> >>>> Signed-off-by: Henning Schild >>>> --- >>>> meta/classes/dpkg-custom.bbclass | 57 >>>> ++++++++++++++++++++++++++++++++++++++++ >>>> 1 file changed, 57 insertions(+) >>>> create mode 100644 meta/classes/dpkg-custom.bbclass >>> >>> Also not a big fan of this name. 'custom' is a bit too unspecific >>> for what it does. I get that your idea that those packages are >>> *custom* made, but at the same time, so are all the packages that >>> are directly created within isar. >>> >>> I liked the old 'dpkg-bin' name more, but maybe even this is a bit >>> to unspecific. How about 'dpkg-plain'? That describes better that >>> those packages are very simple, created impromptu without much to >>> it, IMO. >> >> How about dpkg-wrap, because this wraps existing stuff as-is into >> debian package? > > I explained the new names in the cover letter. dpkg-bin can not be used > because that suggests that we do not compile in this class. As of today > we do not but i can imagine a future where we do, just without the > debian/ directory. > So now dpkg-src also does not match anymore, i think. > > Any suggestions for both names taking the custom-compile into account? I would still use 'dpkg-plain' for 'dpkg-custom' and 'dpkg-src' or 'dpkg-src-dir' for 'dpkg-debian'. Customization of the current implementation of the 'dpkg-custom' class is a bit unusual, since it adds tasks before the do_install step. Maybe it needs to be refactored a bit so that packaging is done after the 'do_install' task and then it packages just everything that is in '${D}' while using the preinst and the other hooks from the WORKDIR. Maybe have an additional directory for them, just so that its a bit cleaner. As I pointed out in message <60d3f1ca-67a1-9c43-07f6-d2d89e4c2e51@siemens.com>, we should fix the general task pipeline for this. I would propose something like this: fetch, unpack, configure, compile, install, package, populate_repo So 'dpkg-custom'/'dpkg-plain' should only contain the 'do_package' and their subordinate tasks. Why would the 'dpkg-debian' class need a custom compile step? Since the /debian directory already contains instructions to build the software. If something needs to be done before or after compilation there, then just modifiy the configure or install task. Cheers, Claudius -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-54 Fax: (+49)-8142-66989-80 Email: ch@denx.de