[yocto] Cannot use "LICENSE_CREATE_PACKAGE = 1" when building the image with mdns

Stefano Cappa stefano.cappa.ks89 at gmail.com
Fri Oct 4 05:26:07 PDT 2019


I investigated a little bit.
Probably, I didn't understand your point.

The postinst script modifies nsswitch adding mdns and this is right, but
why is this interfering with the license create package?

If I remove the postinst I can build with license create package, however I
need this change to nsswitch.

Is it possibile to change the recipe of mdns to modify nsswitch without
interfering with license create package in another xxxx() { }?

Thanks



Il gio 3 ott 2019, 14:24 Stefano Cappa <stefano.cappa.ks89 at gmail.com> ha
scritto:

> I resend this email because it's not visible in yocto mailing list.
>
>
>
> Hi thank you for the answer.
>
> In my rootfs I have this nsswitch.conf:
> -------------------------------------------------------
> # /etc/nsswitch.conf
> #
> # Example configuration of GNU Name Service Switch functionality.
> # If you have the `glibc-doc' and `info' packages installed, try:
> # `info libc "Name Service Switch"' for information about this file.
>
> passwd:         compat
> group:          compat
> shadow:         compat
>
> hosts:          files myhostname  mdns dns
> networks:       files
>
> protocols:      db files
> services:       db files
> ethers:         db files
> rpc:            db files
>
> netgroup:       nis
> -------------------------------------------------------
>
> I'm not familiar with this file.
> Also changing "hosts: files myhostname  mdns dns" to "hosts: files
> mdns4_minimal [NOTFOUND=return] dns" (copied from a raspberry pi 3) I'm
> still having the same problem.
>
> What should I change to fix this issue?
>
>
>
>
> Il mar 1 ott 2019, 11:29 Stefano Cappa <stefano.cappa.ks89 at gmail.com> ha
> scritto:
>
>> Hi thank you for the answer.
>>
>> In my rootfs I have this nsswitch.conf:
>> -------------------------------------------------------
>> # /etc/nsswitch.conf
>> #
>> # Example configuration of GNU Name Service Switch functionality.
>> # If you have the `glibc-doc' and `info' packages installed, try:
>> # `info libc "Name Service Switch"' for information about this file.
>>
>> passwd:         compat
>> group:          compat
>> shadow:         compat
>>
>> hosts:          files myhostname  mdns dns
>> networks:       files
>>
>> protocols:      db files
>> services:       db files
>> ethers:         db files
>> rpc:            db files
>>
>> netgroup:       nis
>> -------------------------------------------------------
>>
>> I'm not familiar with this file.
>> Also changing "hosts: files myhostname  mdns dns" to "hosts: files
>> mdns4_minimal [NOTFOUND=return] dns" (copied from a raspberry pi 3) I'm
>> still having the same problem.
>>
>> What should I change to fix this issue?
>>
>>
>> Il lun 30 set 2019, 22:45 Khem Raj <raj.khem at gmail.com> ha scritto:
>>
>>>
>>>
>>> On 9/30/19 8:17 AM, Stefano Cappa wrote:
>>> > I saw your last patch to upgrade mdns, so I'm sending this email also
>>> to
>>> > you to try to get help.
>>> >
>>> > mdns is working correctly, however, when I try to build my image with
>>> > "LICENSE_CREATE_PACKAGE = "1"" in my local.conf as described
>>> > here
>>> https://www.yoctoproject.org/docs/2.8/dev-manual/dev-manual.html#providing-license-text
>>>  I
>>> > get this error message:
>>> >
>>> > ERROR: mydevice-image-1.0-r0 do_rootfs: Postinstall scriptlets of
>>> > ['mdns'] have failed. If the intention is to defer them to first boot,
>>> > then please place them into pkg_postinst_ontarget_${PN} ().
>>> > Deferring to first boot via 'exit 1' is no longer supported.
>>> > Details of the failure are in
>>> >
>>> /home/user/git/poky/build/tmp/work/mydevice1-image-poky-linux-gnueabi/mydevice-image/1.0-r0/temp/log.do_rootfs.
>>> > ERROR: mydevice-image-1.0-r0 do_rootfs: Function failed: do_rootfs
>>> > ERROR: Logfile of failure stored in:
>>> >
>>> /home/user/git/poky/build/tmp/work/mydevice1-poky-linux-gnueabi/mydevice-image/1.0-r0/temp/log.do_rootfs.14586
>>> > ERROR: Task (MY CUSTOM LAYER
>>> > PATH/recipes-core/images/mydevice-image.bb:do_rootfs) failed with exit
>>> > code '1'
>>> > NOTE: Tasks Summary: Attempted 4871 tasks of which 4654 didn't need to
>>> > be rerun and 1 failed.
>>> >
>>> > Do you have a solution? Why is it happening?
>>> >
>>>
>>> see mdns recipe especially
>>>
>>> pkg_postinst_${PN} (), that function is not able to execute offline
>>> during build. It could be that nsswitch.conf does not exist in your
>>> image rootfs
>>>
>>> > thank u.
>>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20191004/df15b683/attachment-0001.html>


More information about the yocto mailing list