All of lore.kernel.org
 help / color / mirror / Atom feed
* do_install fails to do a package for custom directory
@ 2015-02-08 13:25 Bipnesh, Abhinav (Abhinav)
  2015-02-08 13:59 ` Gary Thomas
  2015-02-08 14:14 ` Gaurang Shastri
  0 siblings, 2 replies; 6+ messages in thread
From: Bipnesh, Abhinav (Abhinav) @ 2015-02-08 13:25 UTC (permalink / raw)
  To: yocto@yoctoproject.org

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

Hi All,

I am trying to write a custom recipe for my make based project. So I am able to compile the project and generate the binary. Now when I am trying to package using do_install() I am not able to put the package in custom directory.
So when I use ${D}${bindir} it work perfectly fine and the package has those binary. But when I tried with ${D}/system/hello  it didn't works. Below is the snapshot of the do_install ()

do_install () {
     cd ${WORKDIR}

     # init script
     install -d ${D}${sysconfdir}/init.d
     install -d ${D}${sysconfdir}/sysconfig
     install -m 755 ${WORKDIR}/test/test ${D}${sysconfdir}/init.d/test
     install -m 644 ${WORKDIR}/test/test ${D}${sysconfdir}/sysconfig/test
     # executable
     install -d ${D}/system/hello
     #install -d ${D}${bindir}
     #install -m 755 ${S}/helloworl/hello ${D}${bindir}/hello <== it works
     install -m 755 ${S}/helloworld/hello ${D}/system/hello/hello <== it doesn't work
}

So any thoughts how to fix this issue.

Thanks,
Abhinav

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

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

* Re: do_install fails to do a package for custom directory
  2015-02-08 13:25 do_install fails to do a package for custom directory Bipnesh, Abhinav (Abhinav)
@ 2015-02-08 13:59 ` Gary Thomas
  2015-02-08 14:12   ` Bipnesh, Abhinav (Abhinav)
  2015-02-08 14:14 ` Gaurang Shastri
  1 sibling, 1 reply; 6+ messages in thread
From: Gary Thomas @ 2015-02-08 13:59 UTC (permalink / raw)
  To: yocto

On 2015-02-08 06:25, Bipnesh, Abhinav (Abhinav) wrote:
> Hi All,
>
> I am trying to write a custom recipe for my make based project. So I am able to compile the project and generate the binary. Now when I am trying to package using do_install() I am
> not able to put the package in custom directory.
>
> So when I use *${D}${bindir} *it work perfectly fine and the package has those binary. But when I tried with *${D}/system/hello * it didn’t works. Below is the snapshot of the
> do_install ()
>
> do_install () {
>
>       cd ${WORKDIR}
>
>       # init script
>
>       install -d ${D}${sysconfdir}/init.d
>
>       install -d ${D}${sysconfdir}/sysconfig
>
>       install -m 755 ${WORKDIR}/test/test ${D}${sysconfdir}/init.d/test
>
>       install -m 644 ${WORKDIR}/test/test ${D}${sysconfdir}/sysconfig/test
>
>       # executable
>
>       install -d ${D}/system/hello
>
>       #install -d ${D}${bindir}
>
>       #install -m 755 ${S}/helloworl/hello ${D}${bindir}/hello çit works
>
>       install -m 755 ${S}/helloworld/hello ${D}/system/hello/hello çit doesn’t work
>
> }
>
> So any thoughts how to fix this issue.

What do you mean that it doesn't work?

Most likely is that the directory /system and it's contents
are not being packaged.  Try adding this line
   FILES_${PN} += "/system"

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


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

* Re: do_install fails to do a package for custom directory
  2015-02-08 13:59 ` Gary Thomas
@ 2015-02-08 14:12   ` Bipnesh, Abhinav (Abhinav)
  0 siblings, 0 replies; 6+ messages in thread
From: Bipnesh, Abhinav (Abhinav) @ 2015-02-08 14:12 UTC (permalink / raw)
  To: Gary Thomas, yocto@yoctoproject.org

Basically When I use install -d ${D}/system/hello the files were not getting part of it. But as you suggested putting it in FILES_${PN} =+ "/system" works.

Where I can find a tutorial for such custom recipe and not the hello world which they put in ${bindir}

-Abhinav

-----Original Message-----
From: yocto-bounces@yoctoproject.org [mailto:yocto-bounces@yoctoproject.org] On Behalf Of Gary Thomas
Sent: Sunday, February 08, 2015 19:30
To: yocto@yoctoproject.org
Subject: Re: [yocto] do_install fails to do a package for custom directory

On 2015-02-08 06:25, Bipnesh, Abhinav (Abhinav) wrote:
> Hi All,
>
> I am trying to write a custom recipe for my make based project. So I 
> am able to compile the project and generate the binary. Now when I am trying to package using do_install() I am not able to put the package in custom directory.
>
> So when I use *${D}${bindir} *it work perfectly fine and the package 
> has those binary. But when I tried with *${D}/system/hello * it didn't 
> works. Below is the snapshot of the do_install ()
>
> do_install () {
>
>       cd ${WORKDIR}
>
>       # init script
>
>       install -d ${D}${sysconfdir}/init.d
>
>       install -d ${D}${sysconfdir}/sysconfig
>
>       install -m 755 ${WORKDIR}/test/test 
> ${D}${sysconfdir}/init.d/test
>
>       install -m 644 ${WORKDIR}/test/test 
> ${D}${sysconfdir}/sysconfig/test
>
>       # executable
>
>       install -d ${D}/system/hello
>
>       #install -d ${D}${bindir}
>
>       #install -m 755 ${S}/helloworl/hello ${D}${bindir}/hello çit 
> works
>
>       install -m 755 ${S}/helloworld/hello ${D}/system/hello/hello çit 
> doesn't work
>
> }
>
> So any thoughts how to fix this issue.

What do you mean that it doesn't work?

Most likely is that the directory /system and it's contents are not being packaged.  Try adding this line
   FILES_${PN} += "/system"

--
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------
--
_______________________________________________
yocto mailing list
yocto@yoctoproject.org
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.yoctoproject.org_listinfo_yocto&d=AwIF-g&c=BFpWQw8bsuKpl1SgiZH64Q&r=geJ1wB7xRIMmteYB2Fo8esL32BOWvwP1HmY0YuLEB4E&m=ikVlWYEbDzcQy52fiUGaZTJLBE1jhjyDKMljDYnHXbo&s=GyH-GO4B3CEB3mOtSoyqyVzk8_r8Dt6Fd6328A0kUJc&e= 


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

* Re: do_install fails to do a package for custom directory
  2015-02-08 13:25 do_install fails to do a package for custom directory Bipnesh, Abhinav (Abhinav)
  2015-02-08 13:59 ` Gary Thomas
@ 2015-02-08 14:14 ` Gaurang Shastri
  2015-02-08 14:55   ` Bipnesh, Abhinav (Abhinav)
  1 sibling, 1 reply; 6+ messages in thread
From: Gaurang Shastri @ 2015-02-08 14:14 UTC (permalink / raw)
  To: Bipnesh, Abhinav (Abhinav); +Cc: yocto@yoctoproject.org

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

Hi,

I think may be you missed,

FILES_${PN} += "/system"

then you can see your binary inside ${PN} package.

//Gaurang Shastri

On Sun, Feb 8, 2015 at 6:55 PM, Bipnesh, Abhinav (Abhinav) <
abhinavbipnesh@avaya.com> wrote:

>  Hi All,
>
>
>
> I am trying to write a custom recipe for my make based project. So I am
> able to compile the project and generate the binary. Now when I am trying
> to package using do_install() I am not able to put the package in custom
> directory.
>
> So when I use *${D}${bindir} *it work perfectly fine and the package has
> those binary. But when I tried with *${D}/system/hello * it didn’t works.
> Below is the snapshot of the do_install ()
>
>
>
> do_install () {
>
>      cd ${WORKDIR}
>
>
>
>      # init script
>
>      install -d ${D}${sysconfdir}/init.d
>
>      install -d ${D}${sysconfdir}/sysconfig
>
>      install -m 755 ${WORKDIR}/test/test ${D}${sysconfdir}/init.d/test
>
>      install -m 644 ${WORKDIR}/test/test ${D}${sysconfdir}/sysconfig/test
>
>      # executable
>
>      install -d ${D}/system/hello
>
>      #install -d ${D}${bindir}
>
>      #install -m 755 ${S}/helloworl/hello ${D}${bindir}/hello ç it works
>
>      install -m 755 ${S}/helloworld/hello ${D}/system/hello/hello ç it
> doesn’t work
>
> }
>
>
>
> So any thoughts how to fix this issue.
>
>
>
> Thanks,
>
> Abhinav
>
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>
>

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

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

* Re: do_install fails to do a package for custom directory
  2015-02-08 14:14 ` Gaurang Shastri
@ 2015-02-08 14:55   ` Bipnesh, Abhinav (Abhinav)
  2015-02-09  5:45     ` Gaurang Shastri
  0 siblings, 1 reply; 6+ messages in thread
From: Bipnesh, Abhinav (Abhinav) @ 2015-02-08 14:55 UTC (permalink / raw)
  To: Gaurang Shastri; +Cc: yocto@yoctoproject.org

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

Hi All,

One more thing how to have %pre and %post defined in the recipe file. As I am not able to find the directive which can do the jobs. As I need to stop an service and the post upgrade need to start the service.

Thanks,
Abhinav

From: Gaurang Shastri [mailto:gmshastri@gmail.com]
Sent: Sunday, February 08, 2015 19:45
To: Bipnesh, Abhinav (Abhinav)
Cc: yocto@yoctoproject.org
Subject: Re: [yocto] do_install fails to do a package for custom directory

Hi,
I think may be you missed,
FILES_${PN} += "/system"
then you can see your binary inside ${PN} package.
//Gaurang Shastri

On Sun, Feb 8, 2015 at 6:55 PM, Bipnesh, Abhinav (Abhinav) <abhinavbipnesh@avaya.com<mailto:abhinavbipnesh@avaya.com>> wrote:
Hi All,

I am trying to write a custom recipe for my make based project. So I am able to compile the project and generate the binary. Now when I am trying to package using do_install() I am not able to put the package in custom directory.
So when I use ${D}${bindir} it work perfectly fine and the package has those binary. But when I tried with ${D}/system/hello  it didn’t works. Below is the snapshot of the do_install ()

do_install () {
     cd ${WORKDIR}

     # init script
     install -d ${D}${sysconfdir}/init.d
     install -d ${D}${sysconfdir}/sysconfig
     install -m 755 ${WORKDIR}/test/test ${D}${sysconfdir}/init.d/test
     install -m 644 ${WORKDIR}/test/test ${D}${sysconfdir}/sysconfig/test
     # executable
     install -d ${D}/system/hello
     #install -d ${D}${bindir}
     #install -m 755 ${S}/helloworl/hello ${D}${bindir}/hello <== it works
     install -m 755 ${S}/helloworld/hello ${D}/system/hello/hello <== it doesn’t work
}

So any thoughts how to fix this issue.

Thanks,
Abhinav

--
_______________________________________________
yocto mailing list
yocto@yoctoproject.org<mailto:yocto@yoctoproject.org>
https://lists.yoctoproject.org/listinfo/yocto<https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.yoctoproject.org_listinfo_yocto&d=AwMFaQ&c=BFpWQw8bsuKpl1SgiZH64Q&r=geJ1wB7xRIMmteYB2Fo8esL32BOWvwP1HmY0YuLEB4E&m=Iy9SmZSRA8a3TpWZ-PhWHrxbIxIS8nnOD7uMXs2GqMs&s=AZ_qNS0XO5MtD7frytoys-HR6ATQyQYHDItvpD5OjZI&e=>


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

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

* Re: do_install fails to do a package for custom directory
  2015-02-08 14:55   ` Bipnesh, Abhinav (Abhinav)
@ 2015-02-09  5:45     ` Gaurang Shastri
  0 siblings, 0 replies; 6+ messages in thread
From: Gaurang Shastri @ 2015-02-09  5:45 UTC (permalink / raw)
  To: Bipnesh, Abhinav (Abhinav); +Cc: yocto@yoctoproject.org

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

Hi,

You can refer any of the existing recipe. For eg,
http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-connectivity/dhcp/dhcp.inc

You can see how post scripts are used.

//Gaurang Shastri

On Sun, Feb 8, 2015 at 8:25 PM, Bipnesh, Abhinav (Abhinav) <
abhinavbipnesh@avaya.com> wrote:

>  Hi All,
>
>
>
> One more thing how to have %pre and %post defined in the recipe file. As I
> am not able to find the directive which can do the jobs. As I need to stop
> an service and the post upgrade need to start the service.
>
>
>
> Thanks,
>
> Abhinav
>
>
>
> *From:* Gaurang Shastri [mailto:gmshastri@gmail.com]
> *Sent:* Sunday, February 08, 2015 19:45
> *To:* Bipnesh, Abhinav (Abhinav)
> *Cc:* yocto@yoctoproject.org
> *Subject:* Re: [yocto] do_install fails to do a package for custom
> directory
>
>
>
> Hi,
>
> I think may be you missed,
>
> FILES_${PN} += "/system"
>
> then you can see your binary inside ${PN} package.
>
> //Gaurang Shastri
>
>
>
> On Sun, Feb 8, 2015 at 6:55 PM, Bipnesh, Abhinav (Abhinav) <
> abhinavbipnesh@avaya.com> wrote:
>
> Hi All,
>
>
>
> I am trying to write a custom recipe for my make based project. So I am
> able to compile the project and generate the binary. Now when I am trying
> to package using do_install() I am not able to put the package in custom
> directory.
>
> So when I use *${D}${bindir} *it work perfectly fine and the package has
> those binary. But when I tried with *${D}/system/hello * it didn’t works.
> Below is the snapshot of the do_install ()
>
>
>
> do_install () {
>
>      cd ${WORKDIR}
>
>
>
>      # init script
>
>      install -d ${D}${sysconfdir}/init.d
>
>      install -d ${D}${sysconfdir}/sysconfig
>
>      install -m 755 ${WORKDIR}/test/test ${D}${sysconfdir}/init.d/test
>
>      install -m 644 ${WORKDIR}/test/test ${D}${sysconfdir}/sysconfig/test
>
>      # executable
>
>      install -d ${D}/system/hello
>
>      #install -d ${D}${bindir}
>
>      #install -m 755 ${S}/helloworl/hello ${D}${bindir}/hello ç it works
>
>      install -m 755 ${S}/helloworld/hello ${D}/system/hello/hello ç it
> doesn’t work
>
> }
>
>
>
> So any thoughts how to fix this issue.
>
>
>
> Thanks,
>
> Abhinav
>
>
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.yoctoproject.org_listinfo_yocto&d=AwMFaQ&c=BFpWQw8bsuKpl1SgiZH64Q&r=geJ1wB7xRIMmteYB2Fo8esL32BOWvwP1HmY0YuLEB4E&m=Iy9SmZSRA8a3TpWZ-PhWHrxbIxIS8nnOD7uMXs2GqMs&s=AZ_qNS0XO5MtD7frytoys-HR6ATQyQYHDItvpD5OjZI&e=>
>
>
>

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

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

end of thread, other threads:[~2015-02-09  5:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-08 13:25 do_install fails to do a package for custom directory Bipnesh, Abhinav (Abhinav)
2015-02-08 13:59 ` Gary Thomas
2015-02-08 14:12   ` Bipnesh, Abhinav (Abhinav)
2015-02-08 14:14 ` Gaurang Shastri
2015-02-08 14:55   ` Bipnesh, Abhinav (Abhinav)
2015-02-09  5:45     ` Gaurang Shastri

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.