From: Andreas Reichel <andreas.reichel.ext@siemens.com>
To: "[ext] Henning Schild" <henning.schild@siemens.com>
Cc: isar-users@googlegroups.com,
Alexander Smirnov <asmirnov@ilbers.de>,
Claudius Heine <ch@denx.de>
Subject: Re: [PATCH v2 6/6] recipes-app/example-raw: add an example on how to use dpkg-raw
Date: Wed, 13 Sep 2017 13:39:35 +0200 [thread overview]
Message-ID: <20170913113934.GA15762@iiotirae> (raw)
In-Reply-To: <20170912155810.9434-7-henning.schild@siemens.com>
On Tue, Sep 12, 2017 at 05:58:10PM +0200, [ext] 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.
>
> Signed-off-by: Henning Schild <henning.schild@siemens.com>
> ---
> .../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 <you@domain.com>"
> +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}
Maybe "Creating executable content"? Nowhere a binary is created...
> +
> + bbnote "Putting ${PN} into package"
> + install -v -d ${D}/usr/local/bin/
> + install -v -m 755 ${WORKDIR}/${PN} ${D}/usr/local/bin/${PN}
> +
Maybe "Packaging ${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"
Maybe "Generating config file"
Kind regards
Andreas
> + 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
> --
> 2.13.5
>
> --
> You received this message because you are subscribed to the Google Groups "isar-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
> To post to this group, send email to isar-users@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/isar-users/20170912155810.9434-7-henning.schild%40siemens.com.
> For more options, visit https://groups.google.com/d/optout.
--
Andreas Reichel
Dipl.-Phys. (Univ.)
Software Consultant
Andreas.Reichel@tngtech.com, +49-174-3180074
TNG Technology Consulting GmbH, Betastr. 13a, 85774 Unterfoehring
Geschaeftsfuehrer: Henrik Klagges, Dr. Robert Dahlke, Gerhard Mueller
Sitz: Unterfoehring * Amtsgericht Muenchen * HRB 135082
next prev parent reply other threads:[~2017-09-13 11:40 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-12 15:58 [PATCH v2 0/6] v4 of the custom debian package Henning Schild
2017-09-12 15:58 ` [PATCH v2 1/6] meta: Move 'do_fetch' and 'do_unpack' to base-class Henning Schild
2017-09-12 15:58 ` [PATCH v2 2/6] meta/dpkg-debian: Move 'do_install' to new dpkg-base.bbclass Henning Schild
2017-09-12 15:58 ` [PATCH v2 3/6] meta/dpkg: pull out actual build command from 'do_build' Henning Schild
2017-09-13 12:44 ` Alexander Smirnov
2017-09-13 13:41 ` Henning Schild
2017-09-13 14:40 ` Claudius Heine
2017-09-13 15:27 ` Henning Schild
2017-09-12 15:58 ` [PATCH v2 4/6] meta/dpkg: Move 'do_build' and buildchroot stuff to dpkg-base.bbclass Henning Schild
2017-09-12 15:58 ` [PATCH v2 5/6] meta/dpkg: add dpkg-raw class Henning Schild
2017-09-12 15:58 ` [PATCH v2 6/6] recipes-app/example-raw: add an example on how to use dpkg-raw Henning Schild
2017-09-13 11:39 ` Andreas Reichel [this message]
2017-09-14 7:28 ` Alexander Smirnov
2017-09-14 8:11 ` Henning Schild
2017-09-13 13:13 ` Alexander Smirnov
2017-09-13 14:15 ` Henning Schild
2017-09-13 15:06 ` Alexander Smirnov
2017-09-13 15:28 ` Henning Schild
2017-09-13 15:38 ` Alexander Smirnov
2017-09-14 8:33 ` Henning Schild
2017-09-12 17:07 ` [PATCH v2 0/6] v4 of the custom debian package Henning Schild
2017-09-13 15:00 ` [PATCH][FYI] dpkg-raw: Allow multiconfig build Alexander Smirnov
2017-09-13 15:09 ` Alexander Smirnov
2017-09-14 8:31 ` Henning Schild
2017-09-14 17:18 ` [PATCH v2 0/6] v4 of the custom debian package Alexander Smirnov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170913113934.GA15762@iiotirae \
--to=andreas.reichel.ext@siemens.com \
--cc=asmirnov@ilbers.de \
--cc=ch@denx.de \
--cc=henning.schild@siemens.com \
--cc=isar-users@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox