All of lore.kernel.org
 help / color / mirror / Atom feed
* #yocto howto use deltask
@ 2020-07-06 11:00 Hans-Ulrich Schlieben
  2020-07-06 11:16 ` [yocto] " Alexander Kanavin
  2020-07-06 11:50 ` Quentin Schulz
  0 siblings, 2 replies; 5+ messages in thread
From: Hans-Ulrich Schlieben @ 2020-07-06 11:00 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 1061 bytes --]

Hi,

my image build fails with:
ERROR: ims-image-fieldgate-1.0-r0 do_rootfs: The following packages could not be configured offline and rootfs is read-only: ['apparmor']

The image build succeeds if i remove the task pkg_postinst_ontarget_${PN} from apparmor_2.13.3.bb.

I tried to use deltask in my apparmor_2.13.3.bbappend with different settings:
deltask postinst_ontarget
deltask postinst
deltask pkg_postinst
deltask pkg_postinst_ontarget_
deltask pkg_postinst_ontarget_apparmor
deltask pkg_postinst_ontarget_apparmor_2

and

postinst_ontarget[noexec] = "1"
postinst[noexec] = "1"
pkg_postinst[noexec] = "1"
pkg_postinst_ontarget_[noexec] = "1"
pkg_postinst_ontarget_apparmor[noexec] = "1"
pkg_postinst_ontarget_apparmor_2[noexec] = "1"

but to no avail - I always get the rootfs error.

I know how to patch source files. But it seems there is no way to patch a recipe.
My workaround would be to make a copy of the apparmor recipe without the postinst part.

Is there a better or another way to do this?

Best regards

hu

[-- Attachment #2: Type: text/html, Size: 1364 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [yocto] #yocto howto use deltask
  2020-07-06 11:00 #yocto howto use deltask Hans-Ulrich Schlieben
@ 2020-07-06 11:16 ` Alexander Kanavin
  2020-07-06 17:54   ` Hans-Ulrich Schlieben
  2020-07-06 11:50 ` Quentin Schulz
  1 sibling, 1 reply; 5+ messages in thread
From: Alexander Kanavin @ 2020-07-06 11:16 UTC (permalink / raw)
  To: Hans-Ulrich Schlieben; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 1384 bytes --]

You need to look into what the postinst_ontarget actually does, and why can
it only happen on target. Or do not use a readonly rootfs.

Alex

On Mon, 6 Jul 2020 at 13:00, Hans-Ulrich Schlieben <
hu.schlieben@codewrights.de> wrote:

> Hi,
>
> my image build fails with:
> ERROR: ims-image-fieldgate-1.0-r0 do_rootfs: The following packages could
> not be configured offline and rootfs is read-only: ['apparmor']
>
> The image build succeeds if i remove the task pkg_postinst_ontarget_${PN}
> from apparmor_2.13.3.bb.
>
> I tried to use deltask in my apparmor_2.13.3.bbappend with different
> settings:
> deltask postinst_ontarget
> deltask postinst
> deltask pkg_postinst
> deltask pkg_postinst_ontarget_
> deltask pkg_postinst_ontarget_apparmor
> deltask pkg_postinst_ontarget_apparmor_2
>
> and
>
> postinst_ontarget[noexec] = "1"
> postinst[noexec] = "1"
> pkg_postinst[noexec] = "1"
> pkg_postinst_ontarget_[noexec] = "1"
> pkg_postinst_ontarget_apparmor[noexec] = "1"
> pkg_postinst_ontarget_apparmor_2[noexec] = "1"
>
> but to no avail - I always get the rootfs error.
>
> I know how to patch source files. But it seems there is no way to patch a
> recipe.
> My workaround would be to make a copy of the apparmor recipe without the
> postinst part.
>
> Is there a better or another way to do this?
>
> Best regards
>
> hu
>
> 
>

[-- Attachment #2: Type: text/html, Size: 1999 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [yocto] #yocto howto use deltask
  2020-07-06 11:00 #yocto howto use deltask Hans-Ulrich Schlieben
  2020-07-06 11:16 ` [yocto] " Alexander Kanavin
@ 2020-07-06 11:50 ` Quentin Schulz
  2020-07-07  7:46   ` Hans-Ulrich Schlieben
  1 sibling, 1 reply; 5+ messages in thread
From: Quentin Schulz @ 2020-07-06 11:50 UTC (permalink / raw)
  To: Hans-Ulrich Schlieben; +Cc: yocto

Hi,

On Mon, Jul 06, 2020 at 04:00:11AM -0700, Hans-Ulrich Schlieben wrote:
> Hi,
> 
> my image build fails with:
> ERROR: ims-image-fieldgate-1.0-r0 do_rootfs: The following packages could not be configured offline and rootfs is read-only: ['apparmor']
> 
> The image build succeeds if i remove the task pkg_postinst_ontarget_${PN} from apparmor_2.13.3.bb.
> 
> I tried to use deltask in my apparmor_2.13.3.bbappend with different settings:
> deltask postinst_ontarget
> deltask postinst
> deltask pkg_postinst
> deltask pkg_postinst_ontarget_
> deltask pkg_postinst_ontarget_apparmor
> deltask pkg_postinst_ontarget_apparmor_2
> 
> and
> 
> postinst_ontarget[noexec] = "1"
> postinst[noexec] = "1"
> pkg_postinst[noexec] = "1"
> pkg_postinst_ontarget_[noexec] = "1"
> pkg_postinst_ontarget_apparmor[noexec] = "1"
> pkg_postinst_ontarget_apparmor_2[noexec] = "1"
> 

What about:

pkg_postinst_ontarget_${PN}() {
	:
}

in your bbappend? This should effectively override the task from a
bbappend (except if there are _append for the task).

Can't comment on this being a good solution to your problem but that
should work to remove the content of pkg_postinst_ontarget.

Quentin

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [yocto] #yocto howto use deltask
  2020-07-06 11:16 ` [yocto] " Alexander Kanavin
@ 2020-07-06 17:54   ` Hans-Ulrich Schlieben
  0 siblings, 0 replies; 5+ messages in thread
From: Hans-Ulrich Schlieben @ 2020-07-06 17:54 UTC (permalink / raw)
  To: Alexander Kanavin; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 3163 bytes --]

Hi,

my image build fails with:
ERROR: ims-image-fieldgate-1.0-r0 do_rootfs: The following packages could not be configured offline and rootfs is read-only: ['apparmor']

The image build succeeds if i remove the task pkg_postinst_ontarget_${PN} from apparmor_2.13.3.bb<https://eur04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapparmor_2.13.3.bb%2F&data=01%7C01%7Chu.schlieben%40codewrights.de%7Cfe392d24b5284c78ae0a08d8219e19d7%7C0974af9b352b437cb606e9f242c0c227%7C0&sdata=GjjlvmP6ni3iVbHIo8xGcUmI2j3MabDipZTbZ3siwB4%3D&reserved=0>.
I tried to use deltask in my apparmor_2.13.3.bbappend with different settings:
deltask postinst_ontarget
deltask postinst
deltask pkg_postinst
deltask pkg_postinst_ontarget_
deltask pkg_postinst_ontarget_apparmor
deltask pkg_postinst_ontarget_apparmor_2

and

postinst_ontarget[noexec] = "1"
postinst[noexec] = "1"
pkg_postinst[noexec] = "1"
pkg_postinst_ontarget_[noexec] = "1"
pkg_postinst_ontarget_apparmor[noexec] = "1"
pkg_postinst_ontarget_apparmor_2[noexec] = "1"

but to no avail - I always get the rootfs error.

I know how to patch source files. But it seems there is no way to patch a recipe.
My workaround would be to make a copy of the apparmor recipe without the postinst part.

Is there a better or another way to do this?

Best regards

hu


Von: Alexander Kanavin <alex.kanavin@gmail.com>
Gesendet: Monday, 6 July 2020 13:17
An: Hans-Ulrich Schlieben <hu.schlieben@codewrights.de>
Cc: yocto@lists.yoctoproject.org
Betreff: Re: [yocto] #yocto howto use deltask

You need to look into what the postinst_ontarget actually does, and why can it only happen on target. Or do not use a readonly rootfs.

Alex

On Mon, 6 Jul 2020 at 13:00, Hans-Ulrich Schlieben <hu.schlieben@codewrights.de<mailto:hu.schlieben@codewrights.de>> wrote:
Hi,

my image build fails with:
ERROR: ims-image-fieldgate-1.0-r0 do_rootfs: The following packages could not be configured offline and rootfs is read-only: ['apparmor']

The image build succeeds if i remove the task pkg_postinst_ontarget_${PN} from apparmor_2.13.3.bb<https://eur04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fapparmor_2.13.3.bb%2F&data=01%7C01%7Chu.schlieben%40codewrights.de%7Cfe392d24b5284c78ae0a08d8219e19d7%7C0974af9b352b437cb606e9f242c0c227%7C0&sdata=GjjlvmP6ni3iVbHIo8xGcUmI2j3MabDipZTbZ3siwB4%3D&reserved=0>.
I tried to use deltask in my apparmor_2.13.3.bbappend with different settings:
deltask postinst_ontarget
deltask postinst
deltask pkg_postinst
deltask pkg_postinst_ontarget_
deltask pkg_postinst_ontarget_apparmor
deltask pkg_postinst_ontarget_apparmor_2

and

postinst_ontarget[noexec] = "1"
postinst[noexec] = "1"
pkg_postinst[noexec] = "1"
pkg_postinst_ontarget_[noexec] = "1"
pkg_postinst_ontarget_apparmor[noexec] = "1"
pkg_postinst_ontarget_apparmor_2[noexec] = "1"

but to no avail - I always get the rootfs error.

I know how to patch source files. But it seems there is no way to patch a recipe.
My workaround would be to make a copy of the apparmor recipe without the postinst part.

Is there a better or another way to do this?

Best regards

hu


[-- Attachment #2: Type: text/html, Size: 7619 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [yocto] #yocto howto use deltask
  2020-07-06 11:50 ` Quentin Schulz
@ 2020-07-07  7:46   ` Hans-Ulrich Schlieben
  0 siblings, 0 replies; 5+ messages in thread
From: Hans-Ulrich Schlieben @ 2020-07-07  7:46 UTC (permalink / raw)
  To: Quentin Schulz; +Cc: yocto

Hi Quentin,

thank you, the empty variant "removes" the task and the read-only-rootfs check works:
pkg_postinst_ontarget_${PN}() {
}

There are some issues which let me into the wrong direction. First I commented out the former code in the bbappend file. Apparmor builds, but the read-only-rootfs check fails:
pkg_postinst_ontarget_${PN} () {
#if [ ! -d /etc/apparmor.d/cache ] ; then
#    mkdir /etc/apparmor.d/cache
#fi
}

The same result you get with an empty line in the task:
pkg_postinst_ontarget_${PN}() {

}

For the following cases you get a parser errors:
pkg_postinst_ontarget_${PN}() {
 }
pkg_postinst_ontarget_${PN}() { }
pkg_postinst_ontarget_${PN}() {}

Thank you and best regards

hu


-----Ursprüngliche Nachricht-----
Von: Quentin Schulz <quentin.schulz@streamunlimited.com> 
Gesendet: Monday, 6 July 2020 13:51
An: Hans-Ulrich Schlieben <hu.schlieben@codewrights.de>
Cc: yocto@lists.yoctoproject.org
Betreff: Re: [yocto] #yocto howto use deltask

Hi,

On Mon, Jul 06, 2020 at 04:00:11AM -0700, Hans-Ulrich Schlieben wrote:
> Hi,
> 
> my image build fails with:
> ERROR: ims-image-fieldgate-1.0-r0 do_rootfs: The following packages 
> could not be configured offline and rootfs is read-only: ['apparmor']
> 
> The image build succeeds if i remove the task pkg_postinst_ontarget_${PN} from apparmor_2.13.3.bb.
> 
> I tried to use deltask in my apparmor_2.13.3.bbappend with different settings:
> deltask postinst_ontarget
> deltask postinst
> deltask pkg_postinst
> deltask pkg_postinst_ontarget_
> deltask pkg_postinst_ontarget_apparmor deltask 
> pkg_postinst_ontarget_apparmor_2
> 
> and
> 
> postinst_ontarget[noexec] = "1"
> postinst[noexec] = "1"
> pkg_postinst[noexec] = "1"
> pkg_postinst_ontarget_[noexec] = "1"
> pkg_postinst_ontarget_apparmor[noexec] = "1"
> pkg_postinst_ontarget_apparmor_2[noexec] = "1"
> 

What about:

pkg_postinst_ontarget_${PN}() {
	:
}

in your bbappend? This should effectively override the task from a bbappend (except if there are _append for the task).

Can't comment on this being a good solution to your problem but that should work to remove the content of pkg_postinst_ontarget.

Quentin

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-07-07  7:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-06 11:00 #yocto howto use deltask Hans-Ulrich Schlieben
2020-07-06 11:16 ` [yocto] " Alexander Kanavin
2020-07-06 17:54   ` Hans-Ulrich Schlieben
2020-07-06 11:50 ` Quentin Schulz
2020-07-07  7:46   ` Hans-Ulrich Schlieben

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.