[yocto] Need help for custom recipe

2015-02-02 Thread Bipnesh, Abhinav (Abhinav)
Hi,

I am trying to write an custom recipe for one of the application. In the 
do_install() I am using an external script for creating rpm of the application. 
Below is the recipe file which I have written.

SUMMARY = Hello World
DESCRIPTION = A recipe for HelloWorld

LICENSE = MIT
LIC_FILES_CHKSUM = 
file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302file:///\\$%7bCOMMON_LICENSE_DIR%7d\MIT;md5=0835ade698e0bcf8506ecda2f7b4f302

# Upstream names releases after SVN revs
#SRCREV = 100
SRCREV = ${AUTOREV}
PV = r${SRCREV}
DEPENDS = boost util-linux curl

SRC_URI = file://helloworld.c
S = ${WORKDIR}

do_install () {
sh ${WORKDIR}/ build.sh

}

Now as this is a makefile based project. Now when I fire bitbake helloworld I 
am able to build the RPM of the package using build.sh file.

But when I try to check these RPM under build_dir/tmp/deploy it is not found.

Any thoughts how to fix the same.

Thanks,
Abhinav
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Need help for custom recipe

2015-02-02 Thread Bipnesh, Abhinav (Abhinav)
Hi Paul,

Actually we do have existing scripts which create RPM's for other platform i.e. 
Linux. We would be cross compile the code and want to use the existing scripts 
for doing it. As the existing RPM spec contain lot of logic for post install, 
upgrade use case etc. So we can use the current infrastructure but it will be a 
re-work for us.
So we were thinking to use it.

Thanks,
Abhinav

From: Paul Eggleton [paul.eggle...@linux.intel.com]
Sent: Monday, February 02, 2015 10:11 PM
To: Bipnesh, Abhinav (Abhinav)
Cc: yocto@yoctoproject.org
Subject: Re: [yocto] Need help for custom recipe

Hi Abhinav,

On Monday 02 February 2015 14:04:49 Bipnesh, Abhinav wrote:
 I am trying to write an custom recipe for one of the application. In the
 do_install() I am using an external script for creating rpm of the
 application. Below is the recipe file which I have written.

 SUMMARY = Hello World
 DESCRIPTION = A recipe for HelloWorld

 LICENSE = MIT
 LIC_FILES_CHKSUM =
 file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302file:
 ///\\$%7bCOMMON_LICENSE_DIR%7d\MIT;md5=0835ade698e0bcf8506ecda2f7b4f302

 # Upstream names releases after SVN revs
 #SRCREV = 100
 SRCREV = ${AUTOREV}
 PV = r${SRCREV}
 DEPENDS = boost util-linux curl

 SRC_URI = file://helloworld.c
 S = ${WORKDIR}

 do_install () {
 sh ${WORKDIR}/ build.sh

 }

 Now as this is a makefile based project. Now when I fire bitbake helloworld
 I am able to build the RPM of the package using build.sh file.

 But when I try to check these RPM under build_dir/tmp/deploy it is not
 found.

My first question is why do you need to create the RPMs in a custom manner like
this? By doing so you are bypassing quite a lot of well-tested logic that we
have written around packaging.

Cheers,
Paul

--

Paul Eggleton
Intel Open Source Technology Centre
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Need help for custom recipe

2015-02-02 Thread Paul Eggleton
Hi Abhinav,

On Monday 02 February 2015 14:04:49 Bipnesh, Abhinav wrote:
 I am trying to write an custom recipe for one of the application. In the
 do_install() I am using an external script for creating rpm of the
 application. Below is the recipe file which I have written.
 
 SUMMARY = Hello World
 DESCRIPTION = A recipe for HelloWorld
 
 LICENSE = MIT
 LIC_FILES_CHKSUM =
 file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302file:
 ///\\$%7bCOMMON_LICENSE_DIR%7d\MIT;md5=0835ade698e0bcf8506ecda2f7b4f302
 
 # Upstream names releases after SVN revs
 #SRCREV = 100
 SRCREV = ${AUTOREV}
 PV = r${SRCREV}
 DEPENDS = boost util-linux curl
 
 SRC_URI = file://helloworld.c
 S = ${WORKDIR}
 
 do_install () {
 sh ${WORKDIR}/ build.sh
 
 }
 
 Now as this is a makefile based project. Now when I fire bitbake helloworld
 I am able to build the RPM of the package using build.sh file.
 
 But when I try to check these RPM under build_dir/tmp/deploy it is not
 found.

My first question is why do you need to create the RPMs in a custom manner like 
this? By doing so you are bypassing quite a lot of well-tested logic that we 
have written around packaging.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Need help for custom recipe

2015-02-02 Thread Paul Eggleton
On Monday 02 February 2015 16:46:37 Bipnesh, Abhinav wrote:
 Paul Eggleton wrote:
  On Monday 02 February 2015 14:04:49 Bipnesh, Abhinav wrote:
   I am trying to write an custom recipe for one of the application. In the
   do_install() I am using an external script for creating rpm of the
   application.
 
  My first question is why do you need to create the RPMs in a custom manner
  like this? By doing so you are bypassing quite a lot of well-tested logic
  that we have written around packaging.

 Actually we do have existing scripts which create RPM's for other platform
 i.e. Linux. We would be cross compile the code and want to use the existing
 scripts for doing it. As the existing RPM spec contain lot of logic for
 post install, upgrade use case etc. So we can use the current
 infrastructure but it will be a re-work for us. So we were thinking to use
 it.

I'd have to say this is something we don't support. If you want to do this you 
would need to disable the current packaging tasks and stage the package files 
yourself, but that's going to take almost as much work as converting over your 
postinstall scripts to be specified within the recipe. You would also lose all 
of the package QA checks that we currently run.

Cheers,
Paul

-- 



Paul Eggleton
Intel Open Source Technology Centre
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Need help for custom recipe

2015-02-02 Thread Bipnesh, Abhinav (Abhinav)
Hi,

Thanks for providing input. I would need to evaluate the modification required 
to override such thing. One quick query in the do_install() can we have the 
check as we do normally in the RPM spec file.
I mean to say %file and some logic like if this exist then execute a particular 
block. A post and prerun section. As what I can understand is that do_install 
or internally do_package generate its own SPEC file and create RPM.
Sorry for ask such thing as I am not able to find a document reference or an 
example which shows how we can achieve the same.

Thanks,
Abhinav

From: Burton, Ross [ross.bur...@intel.com]
Sent: Monday, February 02, 2015 10:44 PM
To: Bipnesh, Abhinav (Abhinav)
Cc: yocto@yoctoproject.org
Subject: Re: [yocto] Need help for custom recipe

On 2 February 2015 at 16:54, Paul Eggleton 
paul.eggle...@linux.intel.commailto:paul.eggle...@linux.intel.com wrote:
I'd have to say this is something we don't support. If you want to do this you
would need to disable the current packaging tasks and stage the package files
yourself, but that's going to take almost as much work as converting over your
postinstall scripts to be specified within the recipe. You would also lose all
of the package QA checks that we currently run.

If you *really* want to do this then you'll probably need a custom do_package 
to put the RPMs you've generated in the place that bitbake expects them, or 
maybe a custom do_deploy.  At this point you're subverting the system so you'll 
have to look at the default tasks to work out how they operate and how to 
replace them.

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


Re: [yocto] Need help for custom recipe

2015-02-02 Thread Burton, Ross
On 2 February 2015 at 16:54, Paul Eggleton paul.eggle...@linux.intel.com
wrote:

 I'd have to say this is something we don't support. If you want to do this
 you
 would need to disable the current packaging tasks and stage the package
 files
 yourself, but that's going to take almost as much work as converting over
 your
 postinstall scripts to be specified within the recipe. You would also lose
 all
 of the package QA checks that we currently run.


If you *really* want to do this then you'll probably need a custom
do_package to put the RPMs you've generated in the place that bitbake
expects them, or maybe a custom do_deploy.  At this point you're subverting
the system so you'll have to look at the default tasks to work out how they
operate and how to replace them.

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