All of lore.kernel.org
 help / color / mirror / Atom feed
* recipe removing (some)contents of /etc
@ 2015-05-14 15:27 Oliver
  2015-05-14 15:36 ` Gary Thomas
  2015-05-14 16:14 ` Smith, Virgil
  0 siblings, 2 replies; 10+ messages in thread
From: Oliver @ 2015-05-14 15:27 UTC (permalink / raw)
  To: yocto

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

Hello
I have the below's simple recipe(starting a script in sysV runlevel 2), but when I add it to the image with 
IMAGE_INSTALL += "canlogger"in my local.conf, most of the contents of /etc gets removed/overwritten making the system unbootable.

Does someone sees something wrong?

#####
DESCRIPTION = "Start CAN services logging"
SECTION = "examples"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
PR = "r0"

SRC_URI += "file://canlogger"

INITSCRIPT_NAME = "canlogger"
INITSCRIPT_PARAMS = "start 98 2 ."

do_install() {
    install -d ${D}${sysconfdir}/init.d/
    install -m 0755 ${WORKDIR}/canlogger ${D}${sysconfdir}/init.d/canlogger
}

inherit update-rc.d
#####

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

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

* Re: recipe removing (some)contents of /etc
  2015-05-14 15:27 recipe removing (some)contents of /etc Oliver
@ 2015-05-14 15:36 ` Gary Thomas
  2015-05-14 16:14 ` Smith, Virgil
  1 sibling, 0 replies; 10+ messages in thread
From: Gary Thomas @ 2015-05-14 15:36 UTC (permalink / raw)
  To: yocto

On 2015-05-14 09:27, Oliver wrote:
> Hello
>
> I have the below's simple recipe(starting a script in sysV runlevel 2), but when I add it to the image with
> IMAGE_INSTALL += "canlogger"
> in my local.conf, most of the contents of /etc gets removed/overwritten making the system unbootable.

What image are you building?

You should probably use this line instead
   CORE_IMAGE_EXTRA_INSTALL = "canlogger"

>
> Does someone sees something wrong?
>
> #####
> DESCRIPTION = "Start CAN services logging"
> SECTION = "examples"
> LICENSE = "MIT"
> LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
> PR = "r0"
>
> SRC_URI += "file://canlogger"
>
> INITSCRIPT_NAME = "canlogger"
> INITSCRIPT_PARAMS = "start 98 2 ."
>
> do_install() {
>      install -d ${D}${sysconfdir}/init.d/
>      install -m 0755 ${WORKDIR}/canlogger ${D}${sysconfdir}/init.d/canlogger
> }
>
> inherit update-rc.d
> #####
>
>
>

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------


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

* Re: recipe removing (some)contents of /etc
  2015-05-14 15:27 recipe removing (some)contents of /etc Oliver
  2015-05-14 15:36 ` Gary Thomas
@ 2015-05-14 16:14 ` Smith, Virgil
  2015-05-14 16:18   ` Robert P. J. Day
  1 sibling, 1 reply; 10+ messages in thread
From: Smith, Virgil @ 2015-05-14 16:14 UTC (permalink / raw)
  To: Oliver, yocto

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

This seems to bite a lot of people (myself included).
Change
IMAGE_INSTALL += “canlogger”
to
IMAGE_INSTALL_append = “ canlogger”
or possibly better
EXTRA_IMAGE_INSTALL_append = “ canlogger”

+= is evaluated immediately during parsing just like = and therefore behaves just like = if the variable did not yet exist.  This then defeats the ?= assignment of IMAGE_INSTALL in your distro/.conf, image recipe, or core-image.bbclass.

The “override syntax” _append gets appended POST parsing and so does not preempt the ?= default assignment.

From: yocto-bounces@yoctoproject.org [mailto:yocto-bounces@yoctoproject.org] On Behalf Of Oliver
Sent: Thursday, May 14, 2015 10:27 AM
To: yocto@yoctoproject.org
Subject: [yocto] recipe removing (some)contents of /etc

Hello

I have the below's simple recipe(starting a script in sysV runlevel 2), but when I add it to the image with
IMAGE_INSTALL += "canlogger"
in my local.conf, most of the contents of /etc gets removed/overwritten making the system unbootable.

Does someone sees something wrong?

#####
DESCRIPTION = "Start CAN services logging"
SECTION = "examples"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302<file:///\\$%7bCOMMON_LICENSE_DIR%7d\MIT;md5=0835ade698e0bcf8506ecda2f7b4f302>"
PR = "r0"

SRC_URI += "file://canlogger<file:///\\canlogger>"

INITSCRIPT_NAME = "canlogger"
INITSCRIPT_PARAMS = "start 98 2 ."

do_install() {
    install -d ${D}${sysconfdir}/init.d/
    install -m 0755 ${WORKDIR}/canlogger ${D}${sysconfdir}/init.d/canlogger
}

inherit update-rc.d
#####


________________________________

Notice to recipient: This email is meant for only the intended recipient of the transmission, and may be a communication privileged by law, subject to export control restrictions or that otherwise contains proprietary information. If you receive this email by mistake, please notify us immediately by replying to this message and then destroy it and do not review, disclose, copy or distribute it. Thank you in advance for your cooperation.

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

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

* Re: recipe removing (some)contents of /etc
  2015-05-14 16:14 ` Smith, Virgil
@ 2015-05-14 16:18   ` Robert P. J. Day
  2015-05-14 16:34     ` Smith, Virgil
  0 siblings, 1 reply; 10+ messages in thread
From: Robert P. J. Day @ 2015-05-14 16:18 UTC (permalink / raw)
  To: Smith, Virgil; +Cc: yocto

[-- Attachment #1: Type: TEXT/PLAIN, Size: 861 bytes --]

On Thu, 14 May 2015, Smith, Virgil wrote:

>
> This seems to bite a lot of people (myself included).
>
> Change
>
> IMAGE_INSTALL += “canlogger”
>
> to
>
> IMAGE_INSTALL_append = “ canlogger”
>
> or possibly better
>
> EXTRA_IMAGE_INSTALL_append = “ canlogger”

  if you're putting this in local.conf, i'm pretty sure the preferred
syntax is just:

  EXTRA_IMAGE_INSTALL = "canlogger"

no?

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================

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

* Re: recipe removing (some)contents of /etc
  2015-05-14 16:18   ` Robert P. J. Day
@ 2015-05-14 16:34     ` Smith, Virgil
  2015-05-14 16:41       ` Paul Eggleton
  0 siblings, 1 reply; 10+ messages in thread
From: Smith, Virgil @ 2015-05-14 16:34 UTC (permalink / raw)
  To: yocto

> > Change
> > IMAGE_INSTALL += “canlogger”
> > to
> > IMAGE_INSTALL_append = “ canlogger”
> > or possibly better
> > EXTRA_IMAGE_INSTALL_append = “ canlogger”
>
>   if you're putting this in local.conf, i'm pretty sure the preferred syntax is just:
>   EXTRA_IMAGE_INSTALL = "canlogger"

Yes, I think rday is correct and the intended purpose of EXTRA_IMAGE_INSTALL is to be used entirely from local.conf and thereby avoid the += vs ?= vs _append issues I mentioned.  At least EXTRA_IMAGE_FEATURES is listed this way in the Yocto manual.

To force an analogy, rday told you what side of the street is safe to walk on (use EXTRA_IMAGE_FEATURES) and I pointed out what dog bit you and how to pull his teeth (use _append).  However, depending on your situation, I may not have gotten all of those teeth (there are other issues with machine/other overrides potentially influencing variable values).

________________________________

Notice to recipient: This email is meant for only the intended recipient of the transmission, and may be a communication privileged by law, subject to export control restrictions or that otherwise contains proprietary information. If you receive this email by mistake, please notify us immediately by replying to this message and then destroy it and do not review, disclose, copy or distribute it. Thank you in advance for your cooperation.

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

* Re: recipe removing (some)contents of /etc
  2015-05-14 16:34     ` Smith, Virgil
@ 2015-05-14 16:41       ` Paul Eggleton
  2015-05-14 16:48         ` Robert P. J. Day
  2015-05-14 21:36         ` Oliver
  0 siblings, 2 replies; 10+ messages in thread
From: Paul Eggleton @ 2015-05-14 16:41 UTC (permalink / raw)
  To: Smith, Virgil, Robert P. J. Day; +Cc: yocto

On Thursday 14 May 2015 16:34:56 Smith, Virgil wrote:
> > > Change
> > > IMAGE_INSTALL += “canlogger”
> > > to
> > > IMAGE_INSTALL_append = “ canlogger”
> > > or possibly better
> > > EXTRA_IMAGE_INSTALL_append = “ canlogger”
> >
> >
> >
> >   if you're putting this in local.conf, i'm pretty sure the preferred
> >   syntax is just:
> EXTRA_IMAGE_INSTALL = "canlogger"
> 
> 
> Yes, I think rday is correct and the intended purpose of EXTRA_IMAGE_INSTALL
> is to be used entirely from local.conf and thereby avoid the += vs ?= vs
> _append issues I mentioned.  At least EXTRA_IMAGE_FEATURES is listed this
> way in the Yocto manual.

There's no such thing as EXTRA_IMAGE_INSTALL, not in the core system anyway. 
There is CORE_IMAGE_EXTRA_INSTALL though which you can add to with += (since 
there aren't any default items in it, unlike IMAGE_INSTALL).

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


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

* Re: recipe removing (some)contents of /etc
  2015-05-14 16:41       ` Paul Eggleton
@ 2015-05-14 16:48         ` Robert P. J. Day
  2015-05-14 21:36         ` Oliver
  1 sibling, 0 replies; 10+ messages in thread
From: Robert P. J. Day @ 2015-05-14 16:48 UTC (permalink / raw)
  To: Paul Eggleton; +Cc: yocto

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1481 bytes --]

On Thu, 14 May 2015, Paul Eggleton wrote:

> On Thursday 14 May 2015 16:34:56 Smith, Virgil wrote:
> > > > Change
> > > > IMAGE_INSTALL += “canlogger”
> > > > to
> > > > IMAGE_INSTALL_append = “ canlogger”
> > > > or possibly better
> > > > EXTRA_IMAGE_INSTALL_append = “ canlogger”
> > >
> > >
> > >
> > >   if you're putting this in local.conf, i'm pretty sure the preferred
> > >   syntax is just:
> > EXTRA_IMAGE_INSTALL = "canlogger"
> >
> >
> > Yes, I think rday is correct and the intended purpose of EXTRA_IMAGE_INSTALL
> > is to be used entirely from local.conf and thereby avoid the += vs ?= vs
> > _append issues I mentioned.  At least EXTRA_IMAGE_FEATURES is listed this
> > way in the Yocto manual.
>
> There's no such thing as EXTRA_IMAGE_INSTALL, not in the core system anyway.
> There is CORE_IMAGE_EXTRA_INSTALL though which you can add to with += (since
> there aren't any default items in it, unlike IMAGE_INSTALL).

  ack, you're right, i was thinking of EXTRA_IMAGE_FEATURES, i think.

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================

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

* Re: recipe removing (some)contents of /etc
  2015-05-14 16:41       ` Paul Eggleton
  2015-05-14 16:48         ` Robert P. J. Day
@ 2015-05-14 21:36         ` Oliver
  2015-05-14 22:01           ` Gary Thomas
  1 sibling, 1 reply; 10+ messages in thread
From: Oliver @ 2015-05-14 21:36 UTC (permalink / raw)
  To: yocto



> What image are you building?

it is a Freescale iMX6 target, the image name is exactly a fsl-image-qt5 with a playground layer

>> You should probably use this line instead
>>    CORE_IMAGE_EXTRA_INSTALL = "canlogger"

>> There is CORE_IMAGE_EXTRA_INSTALL though which you can add to with += (since 
>> there aren't any default items in it, unlike IMAGE_INSTALL).


My understanding these are the preferred options

> > > IMAGE_INSTALL_append = “ canlogger”

But would this still do? (just for my self-learning)

I have other recipes(not *.bbappend) which end up in the image without adding any explicit statement, just the fact of being part of the layer includes them, is there any explanation?

I am still missing something to get the whole picture...

Thanks a lot for the detailed explanations
best Regards
Oliver


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

* Re: recipe removing (some)contents of /etc
  2015-05-14 21:36         ` Oliver
@ 2015-05-14 22:01           ` Gary Thomas
  2015-05-15 11:07             ` Oliver
  0 siblings, 1 reply; 10+ messages in thread
From: Gary Thomas @ 2015-05-14 22:01 UTC (permalink / raw)
  To: yocto

On 2015-05-14 15:36, Oliver wrote:
>
>
>> What image are you building?
>
> it is a Freescale iMX6 target, the image name is exactly a fsl-image-qt5 with a playground layer
>
>>> You should probably use this line instead
>>>     CORE_IMAGE_EXTRA_INSTALL = "canlogger"
>
>>> There is CORE_IMAGE_EXTRA_INSTALL though which you can add to with += (since
>>> there aren't any default items in it, unlike IMAGE_INSTALL).
>
>
> My understanding these are the preferred options
>
>>>> IMAGE_INSTALL_append = “ canlogger”
>
> But would this still do? (just for my self-learning)

The recommended way is to use CORE_IMAGE_EXTRA_INSTALL.
Why would you want to use some other method which might not work?

>
> I have other recipes(not *.bbappend) which end up in the image without adding any explicit statement, just the fact of being part of the layer includes them, is there any explanation?

Something must cause them to be included, either explicitly or implicitly.

What package(s) in particular are you asking about?

You can find out why recipes are included, etc, by looking at
the output from bitbake.  Try this:
   % bitbake fsl-image-qt5 -g -u depexp

This will bring up a "dependency explorer" where you can see what
depends on what (directly at build time or implicitly at runtime).

>
> I am still missing something to get the whole picture...
>
> Thanks a lot for the detailed explanations
> best Regards
> Oliver
>

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------


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

* Re: recipe removing (some)contents of /etc
  2015-05-14 22:01           ` Gary Thomas
@ 2015-05-15 11:07             ` Oliver
  0 siblings, 0 replies; 10+ messages in thread
From: Oliver @ 2015-05-15 11:07 UTC (permalink / raw)
  To: yocto



> The recommended way is to use CORE_IMAGE_EXTRA_INSTALL.

Ok, this one worked! thanks


>> I have other recipes(not *.bbappend) which end up in the image without adding any explicit statement, just the fact of being part of the layer includes them, is there any explanation?
> Something must cause them to be included, either explicitly or implicitly.


Therefore if it is included implicitly involves dependencies or requirements by other recipes.

> What package(s) in particular are you asking about?


Both components were simple recipes created by my own.

I have discovered the root of my confusion, I had a "Hello World" recipe in my layer, which was in the image, hence I thought It was included implicitly. 

But I was wrong, /usr/bin/hello was already in the default image, some other layer/recipe adds it.

Whats the experts' way to find out the origin of a deployed file?

Hopefully there is a faster way than searching whole $BUILD/tmp/work

Thanks again

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world

------------------------------------------------------------
-- 
_______________________________________________
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


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

end of thread, other threads:[~2015-05-15 11:07 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-14 15:27 recipe removing (some)contents of /etc Oliver
2015-05-14 15:36 ` Gary Thomas
2015-05-14 16:14 ` Smith, Virgil
2015-05-14 16:18   ` Robert P. J. Day
2015-05-14 16:34     ` Smith, Virgil
2015-05-14 16:41       ` Paul Eggleton
2015-05-14 16:48         ` Robert P. J. Day
2015-05-14 21:36         ` Oliver
2015-05-14 22:01           ` Gary Thomas
2015-05-15 11:07             ` Oliver

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.