* [PATCH 1/2] meta-isar: add example recipe for deploying prebuilt debs
@ 2021-02-12 13:17 Henning Schild
2021-02-12 13:17 ` [PATCH 2/2] doc/user_manual.md: add a section on how to deal with " Henning Schild
2021-02-12 16:42 ` [PATCH 1/2] meta-isar: add example recipe for deploying " Jan Kiszka
0 siblings, 2 replies; 5+ messages in thread
From: Henning Schild @ 2021-02-12 13:17 UTC (permalink / raw)
To: isar-users; +Cc: jan.kiszka, Henning Schild
From: Henning Schild <henning.schild@siemens.com>
Signed-off-by: Henning Schild <henning.schild@siemens.com>
---
meta-isar/conf/local.conf.sample | 2 +-
.../example-prebuilt-dummy_0.1.bb | 15 ++++++++++++
.../example-prebuilt/example-prebuilt_0.1.bb | 23 +++++++++++++++++++
3 files changed, 39 insertions(+), 1 deletion(-)
create mode 100644 meta-isar/recipes-app/example-prebuilt-dummy/example-prebuilt-dummy_0.1.bb
create mode 100644 meta-isar/recipes-app/example-prebuilt/example-prebuilt_0.1.bb
diff --git a/meta-isar/conf/local.conf.sample b/meta-isar/conf/local.conf.sample
index 107496c163..cc0b5c66bb 100644
--- a/meta-isar/conf/local.conf.sample
+++ b/meta-isar/conf/local.conf.sample
@@ -172,7 +172,7 @@ CONF_VERSION = "1"
#
# The default list of extra packages to be installed.
-IMAGE_INSTALL = "hello-isar example-raw example-module-${KERNEL_NAME} enable-fsck isar-exclude-docs samefile hello isar-disable-apt-cache cowsay"
+IMAGE_INSTALL = "hello-isar example-raw example-module-${KERNEL_NAME} enable-fsck isar-exclude-docs samefile hello isar-disable-apt-cache cowsay example-prebuilt"
#
# Enable cross-compilation support
diff --git a/meta-isar/recipes-app/example-prebuilt-dummy/example-prebuilt-dummy_0.1.bb b/meta-isar/recipes-app/example-prebuilt-dummy/example-prebuilt-dummy_0.1.bb
new file mode 100644
index 0000000000..92273dc886
--- /dev/null
+++ b/meta-isar/recipes-app/example-prebuilt-dummy/example-prebuilt-dummy_0.1.bb
@@ -0,0 +1,15 @@
+# Sample recipe to create a dummy package used for example-prebuilt
+#
+# This software is a part of ISAR.
+
+DESCRIPTION = "Sample application for ISAR"
+MAINTAINER = "Your name here <you@domain.com>"
+
+SRC_URI = ""
+
+inherit dpkg-raw
+
+# we provide a deb under another name
+do_prepare_build_append() {
+ sed -i 's/example-prebuilt-dummy/example-prebuilt/g' ${S}/debian/*
+}
diff --git a/meta-isar/recipes-app/example-prebuilt/example-prebuilt_0.1.bb b/meta-isar/recipes-app/example-prebuilt/example-prebuilt_0.1.bb
new file mode 100644
index 0000000000..4f224a48ec
--- /dev/null
+++ b/meta-isar/recipes-app/example-prebuilt/example-prebuilt_0.1.bb
@@ -0,0 +1,23 @@
+# Sample recipe to include a prebuilt deb archive into an isar build
+#
+# This software is a part of ISAR.
+
+## hacks for the sake of the example
+DEPENDS += "${PN}-dummy"
+do_fetch[depends] += "${PN}-dummy:do_deploy_deb"
+do_fetch[file-checksums] = ""
+FILESPATH_prepend := "${REPO_ISAR_DIR}/${DISTRO}/pool/main/e/${PN}/:"
+
+## start of real example, the below is relevant
+
+# note the unpack=false
+SRC_URI = "file://${PN}_${PV}_${DISTRO_ARCH}.deb;unpack=false"
+
+inherit dpkg-base
+
+# in case you have multiple debs or PN does not match
+#PROVIDES="foobar blabla"
+
+do_dpkg_build() {
+ bbnote "Not building a package"
+}
--
2.26.2
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/2] doc/user_manual.md: add a section on how to deal with prebuilt debs
2021-02-12 13:17 [PATCH 1/2] meta-isar: add example recipe for deploying prebuilt debs Henning Schild
@ 2021-02-12 13:17 ` Henning Schild
2021-02-12 16:39 ` Jan Kiszka
2021-02-12 16:42 ` [PATCH 1/2] meta-isar: add example recipe for deploying " Jan Kiszka
1 sibling, 1 reply; 5+ messages in thread
From: Henning Schild @ 2021-02-12 13:17 UTC (permalink / raw)
To: isar-users; +Cc: jan.kiszka, Henning Schild
From: Henning Schild <henning.schild@siemens.com>
Signed-off-by: Henning Schild <henning.schild@siemens.com>
---
doc/user_manual.md | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/doc/user_manual.md b/doc/user_manual.md
index a4f3d1de9d..86bfa99bca 100644
--- a/doc/user_manual.md
+++ b/doc/user_manual.md
@@ -691,6 +691,17 @@ For the variables please have a look at the previous example, the following new
Have a look at the `example-raw` recipe to get an idea how the `dpkg-raw` class can be used to customize your image.
Note that the package will be build using the whole debian package workflow, so your package will be checked by many debhelper scripts. If those helpers point out quality issues it might be a good idea to fix them. But `example-raw` also shows how rules can still be violated.
+### Prebuilt .deb packages from somewhere
+
+In some cases you might find yourself having a `.deb` that someone did build, but not a proper debian repository to add to `DISTRO_APT_SOURCES` to get it from.
+
+Such single debs can be included if need be. It is always a better idea to have
+a proper debian repository.
+
+Where you write a recipe that just fetches those debs to its `WORKDIR` and deploys them. They can then be installed via `IMAGE_INSTALL`.
+
+Have a look at `example-prebuilt`.
+
## Isar Cross-compilation
### Motivation
--
2.26.2
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] doc/user_manual.md: add a section on how to deal with prebuilt debs
2021-02-12 13:17 ` [PATCH 2/2] doc/user_manual.md: add a section on how to deal with " Henning Schild
@ 2021-02-12 16:39 ` Jan Kiszka
0 siblings, 0 replies; 5+ messages in thread
From: Jan Kiszka @ 2021-02-12 16:39 UTC (permalink / raw)
To: Henning Schild, isar-users
On 12.02.21 14:17, Henning Schild wrote:
> From: Henning Schild <henning.schild@siemens.com>
>
> Signed-off-by: Henning Schild <henning.schild@siemens.com>
> ---
> doc/user_manual.md | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/doc/user_manual.md b/doc/user_manual.md
> index a4f3d1de9d..86bfa99bca 100644
> --- a/doc/user_manual.md
> +++ b/doc/user_manual.md
> @@ -691,6 +691,17 @@ For the variables please have a look at the previous example, the following new
> Have a look at the `example-raw` recipe to get an idea how the `dpkg-raw` class can be used to customize your image.
> Note that the package will be build using the whole debian package workflow, so your package will be checked by many debhelper scripts. If those helpers point out quality issues it might be a good idea to fix them. But `example-raw` also shows how rules can still be violated.
>
> +### Prebuilt .deb packages from somewhere
> +
> +In some cases you might find yourself having a `.deb` that someone did build, but not a proper debian repository to add to `DISTRO_APT_SOURCES` to get it from.
> +
> +Such single debs can be included if need be. It is always a better idea to have
> +a proper debian repository.
> +
> +Where you write a recipe that just fetches those debs to its `WORKDIR` and deploys them. They can then be installed via `IMAGE_INSTALL`.
> +
> +Have a look at `example-prebuilt`.
> +
> ## Isar Cross-compilation
>
> ### Motivation
>
Uups, completely missed that - and did my own quick hack. Let me check
the differences...
Jan
--
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] meta-isar: add example recipe for deploying prebuilt debs
2021-02-12 13:17 [PATCH 1/2] meta-isar: add example recipe for deploying prebuilt debs Henning Schild
2021-02-12 13:17 ` [PATCH 2/2] doc/user_manual.md: add a section on how to deal with " Henning Schild
@ 2021-02-12 16:42 ` Jan Kiszka
2021-02-12 18:47 ` Henning Schild
1 sibling, 1 reply; 5+ messages in thread
From: Jan Kiszka @ 2021-02-12 16:42 UTC (permalink / raw)
To: Henning Schild, isar-users
[-- Attachment #1: Type: text/plain, Size: 3360 bytes --]
On 12.02.21 14:17, Henning Schild wrote:
> From: Henning Schild <henning.schild@siemens.com>
>
> Signed-off-by: Henning Schild <henning.schild@siemens.com>
> ---
> meta-isar/conf/local.conf.sample | 2 +-
> .../example-prebuilt-dummy_0.1.bb | 15 ++++++++++++
> .../example-prebuilt/example-prebuilt_0.1.bb | 23 +++++++++++++++++++
> 3 files changed, 39 insertions(+), 1 deletion(-)
> create mode 100644 meta-isar/recipes-app/example-prebuilt-dummy/example-prebuilt-dummy_0.1.bb
> create mode 100644 meta-isar/recipes-app/example-prebuilt/example-prebuilt_0.1.bb
>
> diff --git a/meta-isar/conf/local.conf.sample b/meta-isar/conf/local.conf.sample
> index 107496c163..cc0b5c66bb 100644
> --- a/meta-isar/conf/local.conf.sample
> +++ b/meta-isar/conf/local.conf.sample
> @@ -172,7 +172,7 @@ CONF_VERSION = "1"
>
> #
> # The default list of extra packages to be installed.
> -IMAGE_INSTALL = "hello-isar example-raw example-module-${KERNEL_NAME} enable-fsck isar-exclude-docs samefile hello isar-disable-apt-cache cowsay"
> +IMAGE_INSTALL = "hello-isar example-raw example-module-${KERNEL_NAME} enable-fsck isar-exclude-docs samefile hello isar-disable-apt-cache cowsay example-prebuilt"
>
> #
> # Enable cross-compilation support
> diff --git a/meta-isar/recipes-app/example-prebuilt-dummy/example-prebuilt-dummy_0.1.bb b/meta-isar/recipes-app/example-prebuilt-dummy/example-prebuilt-dummy_0.1.bb
> new file mode 100644
> index 0000000000..92273dc886
> --- /dev/null
> +++ b/meta-isar/recipes-app/example-prebuilt-dummy/example-prebuilt-dummy_0.1.bb
> @@ -0,0 +1,15 @@
> +# Sample recipe to create a dummy package used for example-prebuilt
> +#
> +# This software is a part of ISAR.
> +
> +DESCRIPTION = "Sample application for ISAR"
> +MAINTAINER = "Your name here <you@domain.com>"
> +
> +SRC_URI = ""
> +
> +inherit dpkg-raw
> +
> +# we provide a deb under another name
> +do_prepare_build_append() {
> + sed -i 's/example-prebuilt-dummy/example-prebuilt/g' ${S}/debian/*
> +}
> diff --git a/meta-isar/recipes-app/example-prebuilt/example-prebuilt_0.1.bb b/meta-isar/recipes-app/example-prebuilt/example-prebuilt_0.1.bb
> new file mode 100644
> index 0000000000..4f224a48ec
> --- /dev/null
> +++ b/meta-isar/recipes-app/example-prebuilt/example-prebuilt_0.1.bb
> @@ -0,0 +1,23 @@
> +# Sample recipe to include a prebuilt deb archive into an isar build
> +#
> +# This software is a part of ISAR.
> +
> +## hacks for the sake of the example
> +DEPENDS += "${PN}-dummy"
> +do_fetch[depends] += "${PN}-dummy:do_deploy_deb"
> +do_fetch[file-checksums] = ""
> +FILESPATH_prepend := "${REPO_ISAR_DIR}/${DISTRO}/pool/main/e/${PN}/:"
I think my approach is clearer /wrt not having the need for this here -
and the companion package.
> +
> +## start of real example, the below is relevant
> +
> +# note the unpack=false
> +SRC_URI = "file://${PN}_${PV}_${DISTRO_ARCH}.deb;unpack=false"
> +
> +inherit dpkg-base
> +
> +# in case you have multiple debs or PN does not match
> +#PROVIDES="foobar blabla"
> +
> +do_dpkg_build() {
> + bbnote "Not building a package"
> +}
>
Otherwise, we are on the same page I think. Yours is more verbose in
several places.
Jan
--
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 7571 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] meta-isar: add example recipe for deploying prebuilt debs
2021-02-12 16:42 ` [PATCH 1/2] meta-isar: add example recipe for deploying " Jan Kiszka
@ 2021-02-12 18:47 ` Henning Schild
0 siblings, 0 replies; 5+ messages in thread
From: Henning Schild @ 2021-02-12 18:47 UTC (permalink / raw)
To: Jan Kiszka; +Cc: isar-users
[-- Attachment #1: Type: text/plain, Size: 3948 bytes --]
Am Fri, 12 Feb 2021 17:42:07 +0100
schrieb Jan Kiszka <jan.kiszka@siemens.com>:
> On 12.02.21 14:17, Henning Schild wrote:
> > From: Henning Schild <henning.schild@siemens.com>
> >
> > Signed-off-by: Henning Schild <henning.schild@siemens.com>
> > ---
> > meta-isar/conf/local.conf.sample | 2 +-
> > .../example-prebuilt-dummy_0.1.bb | 15 ++++++++++++
> > .../example-prebuilt/example-prebuilt_0.1.bb | 23
> > +++++++++++++++++++ 3 files changed, 39 insertions(+), 1 deletion(-)
> > create mode 100644
> > meta-isar/recipes-app/example-prebuilt-dummy/example-prebuilt-dummy_0.1.bb
> > create mode 100644
> > meta-isar/recipes-app/example-prebuilt/example-prebuilt_0.1.bb
> >
> > diff --git a/meta-isar/conf/local.conf.sample
> > b/meta-isar/conf/local.conf.sample index 107496c163..cc0b5c66bb
> > 100644 --- a/meta-isar/conf/local.conf.sample
> > +++ b/meta-isar/conf/local.conf.sample
> > @@ -172,7 +172,7 @@ CONF_VERSION = "1"
> >
> > #
> > # The default list of extra packages to be installed.
> > -IMAGE_INSTALL = "hello-isar example-raw
> > example-module-${KERNEL_NAME} enable-fsck isar-exclude-docs
> > samefile hello isar-disable-apt-cache cowsay" +IMAGE_INSTALL =
> > "hello-isar example-raw example-module-${KERNEL_NAME} enable-fsck
> > isar-exclude-docs samefile hello isar-disable-apt-cache cowsay
> > example-prebuilt" # # Enable cross-compilation support diff --git
> > a/meta-isar/recipes-app/example-prebuilt-dummy/example-prebuilt-dummy_0.1.bb
> > b/meta-isar/recipes-app/example-prebuilt-dummy/example-prebuilt-dummy_0.1.bb
> > new file mode 100644 index 0000000000..92273dc886 --- /dev/null
> > +++
> > b/meta-isar/recipes-app/example-prebuilt-dummy/example-prebuilt-dummy_0.1.bb
> > @@ -0,0 +1,15 @@ +# Sample recipe to create a dummy package used
> > for example-prebuilt +#
> > +# This software is a part of ISAR.
> > +
> > +DESCRIPTION = "Sample application for ISAR"
> > +MAINTAINER = "Your name here <you@domain.com>"
> > +
> > +SRC_URI = ""
> > +
> > +inherit dpkg-raw
> > +
> > +# we provide a deb under another name
> > +do_prepare_build_append() {
> > + sed -i 's/example-prebuilt-dummy/example-prebuilt/g'
> > ${S}/debian/* +}
> > diff --git
> > a/meta-isar/recipes-app/example-prebuilt/example-prebuilt_0.1.bb
> > b/meta-isar/recipes-app/example-prebuilt/example-prebuilt_0.1.bb
> > new file mode 100644 index 0000000000..4f224a48ec --- /dev/null
> > +++ b/meta-isar/recipes-app/example-prebuilt/example-prebuilt_0.1.bb
> > @@ -0,0 +1,23 @@
> > +# Sample recipe to include a prebuilt deb archive into an isar
> > build +#
> > +# This software is a part of ISAR.
> > +
> > +## hacks for the sake of the example
> > +DEPENDS += "${PN}-dummy"
> > +do_fetch[depends] += "${PN}-dummy:do_deploy_deb"
> > +do_fetch[file-checksums] = ""
> > +FILESPATH_prepend :=
> > "${REPO_ISAR_DIR}/${DISTRO}/pool/main/e/${PN}/:"
>
> I think my approach is clearer /wrt not having the need for this here
> - and the companion package.
Agreed, this includes some "magic" that might be hard to maintain. And
that requires the comments of what it "real" and what is "hack"
Was just looking for a way to come up with a deb that will always be
there, without providing a bad example of how such a deb could become
available.
> > +
> > +## start of real example, the below is relevant
> > +
> > +# note the unpack=false
> > +SRC_URI = "file://${PN}_${PV}_${DISTRO_ARCH}.deb;unpack=false"
> > +
> > +inherit dpkg-base
> > +
> > +# in case you have multiple debs or PN does not match
> > +#PROVIDES="foobar blabla"
> > +
> > +do_dpkg_build() {
> > + bbnote "Not building a package"
> > +}
> >
>
> Otherwise, we are on the same page I think. Yours is more verbose in
> several places.
Let us discuss how to improve your approach and NOT MERGE THIS, yes RFC
... REJECT ...
Henning
> Jan
>
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 7821 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-02-12 18:47 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-12 13:17 [PATCH 1/2] meta-isar: add example recipe for deploying prebuilt debs Henning Schild
2021-02-12 13:17 ` [PATCH 2/2] doc/user_manual.md: add a section on how to deal with " Henning Schild
2021-02-12 16:39 ` Jan Kiszka
2021-02-12 16:42 ` [PATCH 1/2] meta-isar: add example recipe for deploying " Jan Kiszka
2021-02-12 18:47 ` Henning Schild
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox