From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6464921707679318016 X-Received: by 10.25.193.142 with SMTP id r136mr1360917lff.25.1505377984167; Thu, 14 Sep 2017 01:33:04 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 10.46.29.10 with SMTP id d10ls272904ljd.42.gmail; Thu, 14 Sep 2017 01:33:03 -0700 (PDT) X-Google-Smtp-Source: AOwi7QBWM5myWB30MBxAOQt8rvakd0usD00LBTF29DDuTTa/2bafAXChRQBJAaQzFNbVsFuXs1zm X-Received: by 10.25.207.83 with SMTP id f80mr1805178lfg.0.1505377983844; Thu, 14 Sep 2017 01:33:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505377983; cv=none; d=google.com; s=arc-20160816; b=rJX04xOuAqrBAxxh/UXq1hc1DWCHk2vNLBX93RKqGnXJMTiU1Mw1Qe220ZMed8lnUa zgXwhA9DFKKe/c8NRuc2NSb+v10BOgLI8ih/YHku0qi5VJUrngvkOQI/3k0r2sVlbBAJ 76SIVfxHTYU2Sx4dVwjgQb6SVs4StUEU/aenhnAuex7QCA+XPOud3ptMM0018GyQmRRc PwHODus4Kyl5ZaU1XRmKIj2BE2l45eZxOU5po30VVC5OwKjwVVdhrAXPtNoX3aSIm3sL MDfteSWp5/Eq2lS0F4RYb6AqdpkPizJS2fV78dS3j0PH0VJivDEX1sjlAMzOZF0TrTCY 4quw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:arc-authentication-results; bh=i/qKJZZ/4wUc/f6LCleLJlaXXcG4L9Ej3HWdqA1Ukhs=; b=fvV/Cwl4ELKUmAqv3v8KTh1mh9RTnu+pj/vExDqG2/CzUaeOOMh6EYG/mNZrWOCxRG 5N3gE+KFHDqD/+kgH4dF5ErJS0Elkjkzyv/wymLGEYx8BN48iVsL6yEi2VUNAEsnm0vG XIW5InsN0o+rI+ZZkKplAgAxVjjMIJFOIRMVTHakudllO++oij7o73fqPt9vb8nSiKmB cif2FxdDhsZp89k+c64KzJSlMN2DdvJ5CNlkhD/vcdj0eR65ds2aHCITVK9XPyEx79sF SMm1ifuBTAqzl6S6qVi2wM0gHtFThKLhFl3aQRQ5asCKFwmlk6NXH7/JsUIgPkXrMYRS 0N0w== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 192.35.17.2 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 thoth.sbs.de (thoth.sbs.de. [192.35.17.2]) by gmr-mx.google.com with ESMTPS id i4si52319wmi.8.2017.09.14.01.33.03 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Sep 2017 01:33:03 -0700 (PDT) Received-SPF: neutral (google.com: 192.35.17.2 is neither permitted nor denied by best guess record for domain of henning.schild@siemens.com) client-ip=192.35.17.2; Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 192.35.17.2 is neither permitted nor denied by best guess record for domain of henning.schild@siemens.com) smtp.mailfrom=henning.schild@siemens.com Received: from mail3.siemens.de (mail3.siemens.de [139.25.208.14]) by thoth.sbs.de (8.15.2/8.15.2) with ESMTPS id v8E8X3bi012840 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 14 Sep 2017 10:33:03 +0200 Received: from md1em3qc ([139.25.68.40]) by mail3.siemens.de (8.15.2/8.15.2) with ESMTP id v8E8X30k004727; Thu, 14 Sep 2017 10:33:03 +0200 Date: Thu, 14 Sep 2017 10:33:15 +0200 From: Henning Schild To: Alexander Smirnov Cc: , Claudius Heine Subject: Re: [PATCH v2 6/6] recipes-app/example-raw: add an example on how to use dpkg-raw Message-ID: <20170914103315.29a5ae7c@md1em3qc> In-Reply-To: <6e24f812-8b24-bf79-3c36-d5fe798e4a22@ilbers.de> References: <20170912155810.9434-1-henning.schild@siemens.com> <20170912155810.9434-7-henning.schild@siemens.com> <2de4ef16-3905-ffdc-d59b-cf5d2512cd79@ilbers.de> <20170913161514.4fc6199d@md1em3qc> <94cfae71-9d0d-3c32-b939-11a99cc3a969@ilbers.de> <20170913172831.223ab343@md1em3qc> <6e24f812-8b24-bf79-3c36-d5fe798e4a22@ilbers.de> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TUID: sXVfvUn7d0G7 Am Wed, 13 Sep 2017 18:38:10 +0300 schrieb Alexander Smirnov : > On 09/13/2017 06:28 PM, Henning Schild wrote: > > Am Wed, 13 Sep 2017 18:06:16 +0300 > > schrieb Alexander Smirnov : > > > >> On 09/13/2017 05:15 PM, Henning Schild wrote: > >>> Am Wed, 13 Sep 2017 16:13:42 +0300 > >>> schrieb Alexander Smirnov : > >>> > >>>> On 09/12/2017 06:58 PM, Henning Schild wrote: > >>>>> Issue: > >>>>> It might not be clear to a user how to make use of the class > >>>>> dpkg-raw. > >>>>> > >>>>> Change: > >>>>> Add an example that demonstrates some features. > >>>>> > >>>>> Impact: > >>>>> This patch does not change the behaviour of Isar. It addresses > >>>>> the issue partially, documentation would also be useful. > >>>>> > >>>> > >>>> I'd like to ask for another extra patch which adds example-raw to > >>>> default IMAGE_INSTALL in "meta-isar/conf/local.conf.sample" for > >>>> easy testing. Now for testing I have to add it manually. > >>> > >>> See, i do that in my layer ;). But if you think the example should > >>> be part of the default image i can prepare such a patch. > >> > >> There is the default build instructions in ./README.md -> > >> doc/user_manual.md, so it would be nice if all the Isar features > >> and examples will be included to this build. > >> > >>> > >>>> Again this could be done later in next series. > >>> > >>> Ok, waiting for feedback. > >> > >> As I said, let's keep this series as it is. > > > > Ok, i guess "next series" means whatever comes after this one. Not > > next iteration of this one. I am reading this almost as a "will > > merge to next", am i correct? > > Yes :-). If no other comments appear soon, will merge it to next. > Also please add chapter to technical overview. Nice, Thanks! I will wait for "next" to appear and propose a documentation patch on top of it. Or should i look at "asmirnov/next"? Henning > Alex. > > > > > Henning > > > >> Alex > >> > >>> > >>> Henning > >>> > >>>> Alex > >>>> > >>>>> Signed-off-by: Henning Schild > >>>>> --- > >>>>> .../recipes-app/example-raw/example-raw_0.1.bb | 35 > >>>>> ++++++++++++++++++++++ > >>>>> meta-isar/recipes-app/example-raw/files/README | 1 + > >>>>> meta-isar/recipes-app/example-raw/files/postinst | 16 > >>>>> ++++++++++ 3 files changed, 52 insertions(+) create mode 100644 > >>>>> meta-isar/recipes-app/example-raw/example-raw_0.1.bb create mode > >>>>> 100644 meta-isar/recipes-app/example-raw/files/README create > >>>>> mode 100644 meta-isar/recipes-app/example-raw/files/postinst > >>>>> > >>>>> diff --git > >>>>> a/meta-isar/recipes-app/example-raw/example-raw_0.1.bb > >>>>> b/meta-isar/recipes-app/example-raw/example-raw_0.1.bb new file > >>>>> mode 100644 index 0000000..d548465 --- /dev/null > >>>>> +++ b/meta-isar/recipes-app/example-raw/example-raw_0.1.bb > >>>>> @@ -0,0 +1,35 @@ > >>>>> +# Sample application using dpkg-raw, which turns a folder > >>>>> (${D}) of +# files into a .deb > >>>>> +# > >>>>> +# This software is a part of ISAR. > >>>>> + > >>>>> +DESCRIPTION = "Sample application for ISAR" > >>>>> +MAINTAINER = "Your name here " > >>>>> +DEBIAN_DEPENDS = "apt" > >>>>> + > >>>>> +SRC_URI = "file://README \ > >>>>> + file://postinst" > >>>>> + > >>>>> +inherit dpkg-raw > >>>>> + > >>>>> +do_populate_package() { > >>>>> + bbnote "Creating ${PN} binary" > >>>>> + echo "#!/bin/sh" > ${WORKDIR}/${PN} > >>>>> + echo "echo Hello ISAR! ${PN}_${PV}" >> ${WORKDIR}/${PN} > >>>>> + > >>>>> + bbnote "Putting ${PN} into package" > >>>>> + install -v -d ${D}/usr/local/bin/ > >>>>> + install -v -m 755 ${WORKDIR}/${PN} > >>>>> ${D}/usr/local/bin/${PN} + > >>>>> + bbnote "Now copy ${FILESDIR}/README into package" > >>>>> + install -v -d ${D}/usr/local/doc/ > >>>>> + install -v -m 644 ${WORKDIR}/README > >>>>> ${D}/usr/local/doc/README-${P} + > >>>>> + bbnote "Now for a debian hook, see dpkg-deb" > >>>>> + install -v -m 755 ${WORKDIR}/postinst > >>>>> ${D}/DEBIAN/postinst + > >>>>> + bbnote "Now for a fake config file" > >>>>> + echo "# empty config file" > ${WORKDIR}/${PN}.conf > >>>>> + install -v -d ${D}/usr/local/etc/ > >>>>> + install -v -m 644 ${WORKDIR}/${PN}.conf > >>>>> ${D}/usr/local/etc/${PN}.conf +} > >>>>> diff --git a/meta-isar/recipes-app/example-raw/files/README > >>>>> b/meta-isar/recipes-app/example-raw/files/README new file mode > >>>>> 100644 index 0000000..6e2ce0f > >>>>> --- /dev/null > >>>>> +++ b/meta-isar/recipes-app/example-raw/files/README > >>>>> @@ -0,0 +1 @@ > >>>>> +This is an example file that we get from FILESDIR in recipe. > >>>>> diff --git a/meta-isar/recipes-app/example-raw/files/postinst > >>>>> b/meta-isar/recipes-app/example-raw/files/postinst new file mode > >>>>> 100644 index 0000000..a28afa3 > >>>>> --- /dev/null > >>>>> +++ b/meta-isar/recipes-app/example-raw/files/postinst > >>>>> @@ -0,0 +1,16 @@ > >>>>> +#!/bin/sh > >>>>> + > >>>>> +set -e > >>>>> + > >>>>> +if ! getent group isar >/dev/null; then > >>>>> + addgroup --quiet --system isar > >>>>> +fi > >>>>> + > >>>>> +if ! getent passwd isar >/dev/null; then > >>>>> + useradd --system --gid isar --create-home \ > >>>>> + --home /var/lib/isar --no-user-group \ > >>>>> + --comment "My isar user" \ > >>>>> + isar > >>>>> +fi > >>>>> + > >>>>> +chown -R isar:isar /var/lib/isar > >>>>> > >>>> > >>> > >> > > >